summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxattributeoutput.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-07-13 11:42:28 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-07-13 15:23:54 +0200
commit423433ee105faea7775a3869dbf4054ab960480c (patch)
tree9352d5188ec32f67d2cbad849d6bbc0a88ea7b55 /sw/source/filter/ww8/docxattributeoutput.cxx
parent2e6f9dff530f16db33c52ab289efe18f96f71bb0 (diff)
DocxAttributeOutput: overwrite WritePostitFieldStart/End
Change-Id: If8ecbc9a831f26cab81ba47af9114b608592524b
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index e5af71947460..4d14585c9d58 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -566,6 +566,7 @@ void DocxAttributeOutput::EndRun()
}
DoWriteBookmarks( );
+ WriteCommentRanges();
m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND ); // merges with "postponed run start", see above
@@ -593,6 +594,22 @@ void DocxAttributeOutput::EndRun()
EndRedline();
}
+void DocxAttributeOutput::WriteCommentRanges()
+{
+ if (m_bPostitStart)
+ {
+ m_bPostitStart = false;
+ OString idstr = OString::valueOf( sal_Int32( m_postitFieldsMaxId ));
+ m_pSerializer->singleElementNS( XML_w, XML_commentRangeStart, FSNS( XML_w, XML_id ), idstr.getStr(), FSEND );
+ }
+ if (m_bPostitEnd)
+ {
+ m_bPostitEnd = false;
+ OString idstr = OString::valueOf( sal_Int32( m_postitFieldsMaxId ));
+ m_pSerializer->singleElementNS( XML_w, XML_commentRangeEnd, FSNS( XML_w, XML_id ), idstr.getStr(), FSEND );
+ }
+}
+
void DocxAttributeOutput::DoWriteBookmarks()
{
// Write the start bookmarks
@@ -3323,6 +3340,16 @@ void DocxAttributeOutput::WritePostitFieldReference()
}
}
+void DocxAttributeOutput::WritePostitFieldStart()
+{
+ m_bPostitStart = true;
+}
+
+void DocxAttributeOutput::WritePostitFieldEnd()
+{
+ m_bPostitEnd = true;
+}
+
void DocxAttributeOutput::WritePostitFields()
{
for( unsigned int i = 0;
@@ -4301,6 +4328,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
m_bOpenedSectPr( false ),
m_sFieldBkm( ),
m_nNextMarkId( 0 ),
+ m_bPostitStart(false),
+ m_bPostitEnd(false),
m_pTableWrt( NULL ),
m_bTableCellOpen( false ),
m_nTableDepth( 0 ),