diff options
author | Jan Holesovsky <kendy@collabora.com> | 2013-10-08 08:56:06 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-10-08 13:52:10 +0200 |
commit | 6ab170647c902753eec4ec9b4f6a32c5ce130e5c (patch) | |
tree | 0b69111320d6912f1b9119b825d5b7cc70ebab5e /sw/source/filter | |
parent | a5aa1b29d5fb9a8a3045ba36fa0de4a0718bed54 (diff) |
DOCX export: Move output of section breaks to a separate method.
It does not really belong to StartParagraphProperties(), and also hinders
re-uisng StartParagraphProperties() in DocDefaults().
Change-Id: I178f69a81fd65ad2d21916c45249357728c2629c
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/ww8/attributeoutputbase.hxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.hxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.hxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8attributeoutput.hxx | 5 |
7 files changed, 29 insertions, 7 deletions
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index c25f64875377..414e52b34113 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -144,8 +144,11 @@ public: /// End of the paragraph. virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0; + /// Called in order to output section breaks. + virtual void SectionBreaks(const SwTxtNode& rNode) = 0; + /// Called before we start outputting the attributes. - virtual void StartParagraphProperties( const SwTxtNode& rNode ) = 0; + virtual void StartParagraphProperties() = 0; /// Called after we end outputting the attributes. virtual void EndParagraphProperties() = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 8e3c1c324441..6b5198a8919b 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -465,7 +465,7 @@ void DocxAttributeOutput::EmptyParagraph() m_pSerializer->singleElementNS( XML_w, XML_p, FSEND ); } -void DocxAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode ) +void DocxAttributeOutput::SectionBreaks(const SwTxtNode& rNode) { // output page/section breaks // Writer can have them at the beginning of a paragraph, or at the end, but @@ -486,7 +486,10 @@ void DocxAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode ) const SwFrmFmt *pFmt = pTableNode->GetTable().GetFrmFmt(); m_rExport.OutputSectionBreaks( &(pFmt->GetAttrSet()), *pTableNode ); } +} +void DocxAttributeOutput::StartParagraphProperties() +{ m_pSerializer->mark( ); m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND ); diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 2e99f9d1589c..e88202adc705 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -114,8 +114,11 @@ public: /// Empty paragraph. virtual void EmptyParagraph(); + /// Called in order to output section breaks. + virtual void SectionBreaks(const SwTxtNode& rNode); + /// Called before we start outputting the attributes. - virtual void StartParagraphProperties( const SwTxtNode& rNode ); + virtual void StartParagraphProperties(); /// Called after we end outputting the attributes. virtual void EndParagraphProperties(); diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 953f416ba15a..c47abef45e20 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -331,7 +331,7 @@ void RtfAttributeOutput::EmptyParagraph() m_rExport.Strm() << m_rExport.sNewLine << OOO_STRING_SVTOOLS_RTF_PAR << ' '; } -void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode ) +void RtfAttributeOutput::SectionBreaks(const SwTxtNode& rNode) { SAL_INFO("sw.rtf", OSL_THIS_FUNC); OSL_ENSURE(m_aStyles.getLength() == 0, "m_aStyles is not empty"); @@ -359,6 +359,11 @@ void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode ) m_rExport.OutputSectionBreaks( &(pFmt->GetAttrSet()), *pTableNode ); } m_bBufferSectionBreaks = false; +} + +void RtfAttributeOutput::StartParagraphProperties() +{ + SAL_INFO("sw.rtf", OSL_THIS_FUNC); OStringBuffer aPar; if (!m_rExport.bRTFFlySyntax) diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index aeb52648eb28..0426749b6ec4 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -50,8 +50,11 @@ public: /// Empty paragraph. virtual void EmptyParagraph(); + /// Called in order to output section breaks. + virtual void SectionBreaks(const SwTxtNode& rNode); + /// Called before we start outputting the attributes. - virtual void StartParagraphProperties( const SwTxtNode& rNode ); + virtual void StartParagraphProperties(); /// Called after we end outputting the attributes. virtual void EndParagraphProperties(); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index c607163ec4be..5fce527fcf49 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2054,7 +2054,9 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } while ( nAktPos < nEnd ); - AttrOutput().StartParagraphProperties( rNode ); + AttrOutput().SectionBreaks(rNode); + + AttrOutput().StartParagraphProperties(); AttrOutput().ParagraphStyle( nStyle ); diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index 24346d74c5f2..e60c3e920915 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -35,8 +35,11 @@ public: /// End of the paragraph. virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ); + /// Called in order to output section breaks. + virtual void SectionBreaks(const SwTxtNode& /*rNode*/) {} + /// Called before we start outputting the attributes. - virtual void StartParagraphProperties( const SwTxtNode& /*rNode*/ ) {} + virtual void StartParagraphProperties() {} /// Called after we end outputting the attributes. virtual void EndParagraphProperties() {} |