}
return destination;
}
public static Tabs apply(Tabs source, Tabs destination) {
CTTabStop sourceTabStop = null;
CTTabStop destinationTabStop = null;
//Tabs are relative to each other, therefore if there are any tabs in the source
//they should replace those in the destination and not be added to the destination.
if (!isEmpty(source)) {
if (destination == null)
destination = Context.getWmlObjectFactory().createTabs();
destination.getTab().clear();
for (int i=0; i<source.getTab().size(); i++) {
sourceTabStop = source.getTab().get(i);
destinationTabStop = Context.getWmlObjectFactory().createCTTabStop();
destinationTabStop.setLeader(sourceTabStop.getLeader()); //enum
destinationTabStop.setPos(sourceTabStop.getPos()); //atomic
destinationTabStop.setVal(sourceTabStop.getVal()); //enum
if (destinationTabStop != null) {
destination.getTab().add(destinationTabStop);
}
}