[Libreoffice-commits] core.git: include/xmloff sw/source xmloff/source

Noel Grandin noel at peralex.com
Tue Mar 8 10:37:33 UTC 2016


 include/xmloff/txtparae.hxx      |    9 ++++-----
 include/xmloff/xmlexp.hxx        |    6 +++---
 sw/source/filter/xml/xmlfmte.cxx |    2 +-
 xmloff/source/core/xmlexp.cxx    |   12 ++++++------
 xmloff/source/text/txtparae.cxx  |   15 +++++++--------
 5 files changed, 21 insertions(+), 23 deletions(-)

New commits:
commit 7f40ed57eb921e491f2fb83c820cb453babd9843
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Mar 8 09:22:37 2016 +0200

    loplugin:constantparam in xmloff
    
    Change-Id: I531dcf0861ab5a545eec16bf4aa92ac92eb9626e
    Reviewed-on: https://gerrit.libreoffice.org/23022
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index beb70c4..b6b273d 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -263,7 +263,7 @@ protected:
     virtual void exportStyleAttributes(
         const css::uno::Reference< css::style::XStyle > & rStyle ) override;
 
-    void exportPageFrames( bool bAutoStyles, bool bProgress );
+    void exportPageFrames( bool bProgress );
     void exportFrameFrames( bool bAutoStyles, bool bProgress,
             const css::uno::Reference< css::text::XTextFrame > *pParentTxtFrame = nullptr );
 
@@ -469,9 +469,8 @@ public:
     void exportTextDeclarations(
         const css::uno::Reference< css::text::XText > & rText );
 
-    /// true: export only those declarations that are used;
-    /// false: export all declarations
-    void exportUsedDeclarations( bool bOnlyUsed );
+    /// export all declarations
+    void exportUsedDeclarations();
 
     /// Export the list of change information (enclosed by <tracked-changes>)
     /// (or the necessary automatic styles)
@@ -555,7 +554,7 @@ public:
 
     void exportFramesBoundToPage( bool bIsProgress = false )
     {
-        exportPageFrames( false, bIsProgress );
+        exportPageFrames( bIsProgress );
     }
     void exportFramesBoundToFrame(
             const css::uno::Reference< css::text::XTextFrame >& rParentTxtFrame,
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index 1ec40d1..27016cf 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -172,10 +172,10 @@ private:
 
     SAL_DLLPRIVATE void ImplExportMeta(); // <office:meta>
     SAL_DLLPRIVATE void ImplExportSettings(); // <office:settings>
-    SAL_DLLPRIVATE void ImplExportStyles( bool bUsed ); // <office:styles>
-    SAL_DLLPRIVATE void ImplExportAutoStyles( bool bUsed );
+    SAL_DLLPRIVATE void ImplExportStyles(); // <office:styles>
+    SAL_DLLPRIVATE void ImplExportAutoStyles();
         // <office:automatic-styles>
-    SAL_DLLPRIVATE void ImplExportMasterStyles( bool bUsed );
+    SAL_DLLPRIVATE void ImplExportMasterStyles();
         // <office:master-styles>
     SAL_DLLPRIVATE void ImplExportContent(); // <office:body>
     virtual void SetBodyAttributes();
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index b5df169..9d8ef8a 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -199,7 +199,7 @@ void SwXMLExport::_ExportAutoStyles()
     // in single-stream case), then we can save ourselves a bit of
     // work and memory by not collecting field masters
     if( !(getExportFlags() & SvXMLExportFlags::STYLES) )
-        GetTextParagraphExport()->exportUsedDeclarations( false );
+        GetTextParagraphExport()->exportUsedDeclarations();
 
     // exported in _ExportContent
     if( getExportFlags() & SvXMLExportFlags::CONTENT )
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 9e04ef0..12f4a14 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1136,7 +1136,7 @@ void SvXMLExport::ImplExportSettings()
     }
 }
 
-void SvXMLExport::ImplExportStyles( bool )
+void SvXMLExport::ImplExportStyles()
 {
     CheckAttrList();
 
@@ -1166,7 +1166,7 @@ void SvXMLExport::ImplExportStyles( bool )
     }
 }
 
-void SvXMLExport::ImplExportAutoStyles( bool )
+void SvXMLExport::ImplExportAutoStyles()
 {
     // transfer style names (+ families) FROM other components (if appropriate)
     OUString sStyleNames( "StyleNames" );
@@ -1192,7 +1192,7 @@ void SvXMLExport::ImplExportAutoStyles( bool )
     }
 }
 
-void SvXMLExport::ImplExportMasterStyles( bool )
+void SvXMLExport::ImplExportMasterStyles()
 {
     {
         // <style:master-styles>
@@ -1443,15 +1443,15 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
 
         // styles
         if( mnExportFlags & SvXMLExportFlags::STYLES )
-            ImplExportStyles( false );
+            ImplExportStyles();
 
         // autostyles
         if( mnExportFlags & SvXMLExportFlags::AUTOSTYLES )
-            ImplExportAutoStyles( false );
+            ImplExportAutoStyles();
 
         // masterstyles
         if( mnExportFlags & SvXMLExportFlags::MASTERSTYLES )
-            ImplExportMasterStyles( false );
+            ImplExportMasterStyles();
 
         // content
         if( mnExportFlags & SvXMLExportFlags::CONTENT )
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 7758c14..b2c4320 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1356,8 +1356,7 @@ SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateParaDefaultExtPropMappe
     return new XMLTextExportPropertySetMapper( pPropMapper, rExport );
 }
 
-void XMLTextParagraphExport::exportPageFrames( bool bAutoStyles,
-                                               bool bIsProgress )
+void XMLTextParagraphExport::exportPageFrames( bool bIsProgress )
 {
     const TextContentSet& rTexts = pBoundFrameSets->GetTexts()->GetPageBoundContents();
     const TextContentSet& rGraphics = pBoundFrameSets->GetGraphics()->GetPageBoundContents();
@@ -1366,19 +1365,19 @@ void XMLTextParagraphExport::exportPageFrames( bool bAutoStyles,
     for(TextContentSet::const_iterator_t it = rTexts.getBegin();
         it != rTexts.getEnd();
         ++it)
-        exportTextFrame(*it, bAutoStyles, bIsProgress, true);
+        exportTextFrame(*it, false/*bAutoStyles*/, bIsProgress, true);
     for(TextContentSet::const_iterator_t it = rGraphics.getBegin();
         it != rGraphics.getEnd();
         ++it)
-        exportTextGraphic(*it, bAutoStyles);
+        exportTextGraphic(*it, false/*bAutoStyles*/);
     for(TextContentSet::const_iterator_t it = rEmbeddeds.getBegin();
         it != rEmbeddeds.getEnd();
         ++it)
-        exportTextEmbedded(*it, bAutoStyles);
+        exportTextEmbedded(*it, false/*bAutoStyles*/);
     for(TextContentSet::const_iterator_t it = rShapes.getBegin();
         it != rShapes.getEnd();
         ++it)
-        exportShape(*it, bAutoStyles);
+        exportShape(*it, false/*bAutoStyles*/);
 }
 
 void XMLTextParagraphExport::exportFrameFrames(
@@ -3557,9 +3556,9 @@ void XMLTextParagraphExport::exportTextDeclarations(
     pFieldExport->ExportFieldDeclarations(rText);
 }
 
-void XMLTextParagraphExport::exportUsedDeclarations( bool bOnlyUsed )
+void XMLTextParagraphExport::exportUsedDeclarations()
 {
-    pFieldExport->SetExportOnlyUsedFieldDeclarations( bOnlyUsed );
+    pFieldExport->SetExportOnlyUsedFieldDeclarations( false/*bOnlyUsed*/ );
 }
 
 void XMLTextParagraphExport::exportTrackedChanges(bool bAutoStyles)


More information about the Libreoffice-commits mailing list