diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-06-06 12:49:17 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-06-06 20:10:19 +0200 |
commit | 2a11499583cfc8c65e2fa99fbcdfdd7b94e966c1 (patch) | |
tree | f8df3592c32458b3d8bbbecdcf182d3b96e1fdb5 /sw | |
parent | 62d270116bf34778bf581f21b27fa9cdbff7de0e (diff) |
sw: simplify identical branches in WW8AttributeOutput::DefaultStyle
Change-Id: I0d500ecbcd0bc0d6b9f772304345acd4ddb5df11
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/attributeoutputbase.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 13 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8attributeoutput.hxx | 2 |
7 files changed, 10 insertions, 21 deletions
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 092153ad0cbf..d09988f179df 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -267,7 +267,7 @@ public: virtual void EndStyles( sal_uInt16 nNumberOfStyles ) = 0; /// Write default style. - virtual void DefaultStyle( sal_uInt16 nStyle ) = 0; + virtual void DefaultStyle() = 0; /// Start of a style in the styles table. virtual void StartStyle( const OUString& rName, StyleType eType, diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 6dc190e64660..9e40395a5c63 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4107,14 +4107,10 @@ void DocxAttributeOutput::EndStyles( sal_uInt16 nNumberOfStyles ) m_pSerializer->endElementNS( XML_w, XML_styles ); } -void DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle ) +void DocxAttributeOutput::DefaultStyle() { // are these the values of enum ww::sti (see ../inc/wwstyles.hxx)? -#if OSL_DEBUG_LEVEL > 1 - OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )- %d", nStyle ); -#else - (void) nStyle; // to quiet the warning -#endif + OSL_TRACE("TODO DocxAttributeOutput::DefaultStyle()"); } /* Writes <a:srcRect> tag back to document.xml if a file conatins a cropped image. diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 611ad01d5527..ab0a43aced06 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -250,7 +250,7 @@ public: virtual void EndStyles( sal_uInt16 nNumberOfStyles ) override; /// Write default style. - virtual void DefaultStyle( sal_uInt16 nStyle ) override; + virtual void DefaultStyle() override; /// Write Doc Defaults void DocDefaults( ); diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 854b599cb941..7fbcee28b5c8 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1129,7 +1129,7 @@ void RtfAttributeOutput::EndStyles(sal_uInt16 /*nNumberOfStyles*/) m_rExport.Strm().WriteChar('}'); } -void RtfAttributeOutput::DefaultStyle(sal_uInt16 /*nStyle*/) +void RtfAttributeOutput::DefaultStyle() { /* noop, the default style is always 0 in RTF */ } diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index 1c3e32ed9445..baa3ccec2781 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -134,7 +134,7 @@ public: virtual void EndStyles(sal_uInt16 nNumberOfStyles) override; /// Write default style. - virtual void DefaultStyle(sal_uInt16 nStyle) override; + virtual void DefaultStyle() override; /// Start of a style in the styles table. virtual void StartStyle(const OUString& rName, StyleType eType, diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index e7121afd7aa0..21fcf6290e02 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -563,16 +563,9 @@ void MSWordStyles::GetStyleData( SwFormat* pFormat, bool& bFormatColl, sal_uInt1 nNext = GetSlot( pNext ); } -void WW8AttributeOutput::DefaultStyle( sal_uInt16 nStyle ) +void WW8AttributeOutput::DefaultStyle() { - if ( nStyle == 10 ) // Default Char-Style ( only WW ) - { - m_rWW8Export.pTableStrm->WriteUInt16(0); // empty Style - } - else - { - m_rWW8Export.pTableStrm->WriteUInt16(0); // empty Style - } + m_rWW8Export.pTableStrm->WriteUInt16(0); // empty Style } void MSWordStyles::OutputStyle(const SwNumRule* pNumRule, sal_uInt16 nPos) @@ -588,7 +581,7 @@ void MSWordStyles::OutputStyle(const SwNumRule* pNumRule, sal_uInt16 nPos) void MSWordStyles::OutputStyle( SwFormat* pFormat, sal_uInt16 nPos ) { if ( !pFormat ) - m_rExport.AttrOutput().DefaultStyle( nPos ); + m_rExport.AttrOutput().DefaultStyle(); else { bool bFormatColl; diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index f48eb3816b51..68216d26bfa6 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -120,7 +120,7 @@ public: virtual void EndStyles( sal_uInt16 nNumberOfStyles ) override; /// Write default style. - virtual void DefaultStyle( sal_uInt16 nStyle ) override; + virtual void DefaultStyle() override; /// Start of a style in the styles table. virtual void StartStyle( const OUString& rName, StyleType eType, |