LibreOffice Module xmerge (master) 1
|
Generic small device implementation of DocumentMerger
for the SxcPluginFactory
.
More...
Public Member Functions | |
DocumentMergerImpl (org.openoffice.xmerge.Document doc, ConverterCapabilities cc) | |
Constructor. More... | |
void | merge (Document modifiedDoc) throws MergeException |
This method will find the changes that had happened in the modifiedDoc Document object given the designated original Document . More... | |
void | merge (Document modifiedDoc) throws MergeException |
This method will find the changes that had happened in the modifiedDoc Document object given the designated original Document . More... | |
Private Member Functions | |
Node | matchWorkSheet (Node orgSheet, NodeList modSheetList) |
Try to find a WorkSheet from the modified WorkSheetList that has a matching table name from the original WorkSheet. More... | |
Private Attributes | |
final ConverterCapabilities | cc_ |
final org.openoffice.xmerge.Document | orig |
Generic small device implementation of DocumentMerger
for the SxcPluginFactory
.
Used with SXC Document
objects.
Definition at line 49 of file sxc/DocumentMergerImpl.java.
|
inline |
Constructor.
doc | The original "Office" Document to merge. |
cc | The ConverterCapabilities . |
Definition at line 60 of file sxc/DocumentMergerImpl.java.
References org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.cc_, and org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.orig.
|
inlineprivate |
Try to find a WorkSheet from the modified WorkSheetList that has a matching table name from the original WorkSheet.
orgSheet | The original WorkSheet. |
modSheetList | The modified WorkSheet. |
Node
in modSheetList that matches the orgSheet
. Definition at line 155 of file sxc/DocumentMergerImpl.java.
References org.openoffice.xmerge.converter.xml.OfficeConstants.ATTRIBUTE_TABLE_NAME, i, and String.
Referenced by org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.merge().
|
inline |
This method will find the changes that had happened in the modifiedDoc
Document
object given the designated original Document
.
Note that this process may need the knowledge of the conversion process since some conversion process are lossy. Items/Data that are lost during the conversion process are not classified as changes. The main target of this method is to apply the changes done in modifiedDoc
into the assigned original Document
object, thus it also will try to preserve items that were originally in the original Document
, but never got transferred during the serialize
process/method call. After this method call, the original Document
object will contain the changes applied.
This method may or may not be thread-safe. Also, it is expected that the user uses only one instance of a DocumentMerger
object per merge process. Create another DocumentMerger
object for another merge process.
modifiedDoc | device Document object. |
MergeException | If any merge error occurs. |
Implements org.openoffice.xmerge.DocumentMerger.
Definition at line 66 of file sxc/DocumentMergerImpl.java.
References org.openoffice.xmerge.merger.MergeAlgorithm.applyDifference(), org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.cc_, org.openoffice.xmerge.merger.DiffAlgorithm.computeDiffs(), org.openoffice.xmerge.merger.Difference.debug(), org.openoffice.xmerge.util.XmlUtil.deepClone(), i, org.openoffice.xmerge.util.Debug.INFO, org.openoffice.xmerge.util.Debug.isFlagSet(), org.openoffice.xmerge.util.Debug.log(), org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.matchWorkSheet(), org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.orig, org.openoffice.xmerge.converter.xml.OfficeConstants.TAG_OFFICE_BODY, and org.openoffice.xmerge.converter.xml.OfficeConstants.TAG_TABLE.
|
private |
Definition at line 51 of file sxc/DocumentMergerImpl.java.
Referenced by org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.DocumentMergerImpl(), and org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.merge().
|
private |
Definition at line 52 of file sxc/DocumentMergerImpl.java.
Referenced by org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.DocumentMergerImpl(), and org.openoffice.xmerge.converter.xml.sxc.DocumentMergerImpl.merge().