diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2021-04-10 22:25:41 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2021-04-10 22:26:48 +0100 |
commit | b0fc51bd57f0ea67466c272ba3d91adbb183d261 (patch) | |
tree | 8a7e65a62afde4c9d377caf185741a94f7bba014 | |
parent | First cut at extended document comment / Resolve state reading. (diff) | |
download | core-feature/docx-commentsex.tar.gz core-feature/docx-commentsex.zip |
First cut at export of comments extended data to docx.
feature/docx-commentsex
Change-Id: Ie75d45bda47a4d33a1045687045c9a3ca3b82cbe
-rw-r--r-- | include/oox/token/relationship.hxx | 1 | ||||
-rw-r--r-- | oox/source/token/namespaces.txt | 1 | ||||
-rw-r--r-- | oox/source/token/relationship.inc | 1 | ||||
-rw-r--r-- | oox/source/token/tokens.txt | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 14 |
5 files changed, 20 insertions, 0 deletions
diff --git a/include/oox/token/relationship.hxx b/include/oox/token/relationship.hxx index adc25f4a73b6..7b9e18397a31 100644 --- a/include/oox/token/relationship.hxx +++ b/include/oox/token/relationship.hxx @@ -21,6 +21,7 @@ enum class Relationship ACTIVEXCONTROLBINARY, CHART, COMMENTS, + COMMENTS_EXTENDED, COMMENTAUTHORS, CONTROL, CTRLPROP, diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt index 604541129469..20d283415069 100644 --- a/oox/source/token/namespaces.txt +++ b/oox/source/token/namespaces.txt @@ -84,6 +84,7 @@ p14 http://schemas.microsoft.com/office/powerpoint/2010/main # MSO 2012/2013 extensions --------------------------------------------------------- +w15 http://schemas.microsoft.com/office/word/2012/wordml p15 http://schemas.microsoft.com/office/powerpoint/2012/main x12ac http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac diff --git a/oox/source/token/relationship.inc b/oox/source/token/relationship.inc index 2b973ded1653..b3c016fd7596 100644 --- a/oox/source/token/relationship.inc +++ b/oox/source/token/relationship.inc @@ -1,6 +1,7 @@ {Relationship::ACTIVEXCONTROLBINARY, "http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary"}, {Relationship::CHART, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"}, {Relationship::COMMENTS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"}, +{Relationship::COMMENTS_EXTENDED, "http://schemas.microsoft.com/office/2011/relationships/commentsExtended"}, {Relationship::COMMENTAUTHORS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors"}, {Relationship::CONTROL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/control"}, {Relationship::CTRLPROP, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp"}, diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index 3929d8c93808..f2dd9ddbdfe6 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -1314,12 +1314,14 @@ comma command commandType comment +commentEx commentList commentPr commentRangeEnd commentRangeStart commentReference comments +commentsEx comp compact compactData @@ -5672,6 +5674,7 @@ vt w w10 w14 +w15 wAfter wArH wBefore diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index ad5104b6dd7f..4e1186c46c23 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -740,6 +740,20 @@ void DocxExport::WritePostitFields() m_pAttrOutput->WritePostitFields(); m_pAttrOutput->SetSerializer( m_pDocumentFS ); pPostitFS->endElementNS( XML_w, XML_comments ); + + m_pFilter->addRelation( m_pDocumentFS->getOutputStream(), + oox::getRelationship(Relationship::COMMENTS_EXTENDED), + "commentsExtended.xml" ); + + ::sax_fastparser::FSHelperPtr pExtendedFS = + m_pFilter->openFragmentStreamWithSerializer( "word/comments.xml", + "application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml" ); + + pExtendedFS->startElementNS( XML_w15, XML_commentsEx, MainXmlNamespaces()); +// m_pAttrOutput->SetSerializer( pExtendedFS ); +// m_pAttrOutput->WritePostitFields(); +// m_pAttrOutput->SetSerializer( m_pDocumentFS ); + pExtendedFS->endElementNS( XML_w15, XML_commentsEx ); } } |