[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/svx sc/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Feb 7 06:02:23 UTC 2017


 compilerplugins/clang/unusedenumconstants.py |    6 ++++++
 include/svx/svdpage.hxx                      |    1 -
 sc/source/filter/inc/stylesbuffer.hxx        |   13 ++-----------
 sc/source/filter/oox/pagesettings.cxx        |    2 +-
 sc/source/filter/oox/richstring.cxx          |    4 ++--
 sc/source/filter/oox/stylesbuffer.cxx        |    9 ++++-----
 6 files changed, 15 insertions(+), 20 deletions(-)

New commits:
commit 62410ecd5de7d514f8078727616a9a637fa171af
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Feb 6 14:50:37 2017 +0200

    remove unused constant from SdrInsertReasonKind enum
    
    Change-Id: I29fda2c0124b438eb9a2926c6dfefa801c670a27
    Reviewed-on: https://gerrit.libreoffice.org/33968
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index b60f12a..71befa1 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -53,7 +53,6 @@ class SfxStyleSheet;
 class SvxUnoDrawPagesAccess;
 
 enum class SdrInsertReasonKind {
-    Unknown,
     Streaming,  /// importing document
     Undo,       /// from Undo
     Copy,       /// something copied...
commit c1380c00397aa251627fb81f1665704416e1a4f8
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Feb 6 14:03:46 2017 +0200

    drop unused FONT_PROPTYPE_CELL constant
    
    which makes this enum not necessary anymore
    
    Change-Id: I0194634d357569aee502f1e8a7fd95c49e23040c
    Reviewed-on: https://gerrit.libreoffice.org/33967
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index 3b5585e..670bb00 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -92,6 +92,11 @@ for d in definitionSet:
          "include/vcl/settings.hxx", # stored in a setting, can't remove it without potentially triggering UBSAN
          "basic/source/inc/opcodes.hxx", # can't touch this without breaking unit tests, not sure why
          "include/unotools/securityoptions.hxx", # comes from the UI
+         "sot/source/sdstor/stgelem.hxx",
+         "sd/source/filter/eppt/epptbase.hxx",
+         "include/registry/refltype.hxx",
+         "include/registry/version.h",
+         "include/svtools/rtftoken.h",
         # unit test code
          "cppu/source/uno/check.cxx",
         # general weird nonsense going on
@@ -115,6 +120,7 @@ for d in definitionSet:
          "include/oox/drawingml/shapepropertymap.hxx",
          "include/svl/nfkeytab.hx",
          "include/svl/zforlist.hxx",
+         "include/svtools/svtabbx.hxx",
         # represents constants from an external API
          "opencl/inc/opencl_device_selection.h",
          "vcl/inc/sft.hxx",
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index 64231e9..9f9a357 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -158,13 +158,6 @@ struct FontModel
     void                setBiffEscapement( sal_uInt16 nEscapement );
 };
 
-/** Enumerates different types of API font property sets. */
-enum FontPropertyType
-{
-    FONT_PROPTYPE_CELL,             /// Font properties in a spreadsheet cell (table::Cell service).
-    FONT_PROPTYPE_TEXT              /// Font properties in a text object (text::Text service).
-};
-
 /** Contains used flags for all API font attributes. */
 struct ApiFontUsedFlags
 {
@@ -254,12 +247,10 @@ public:
     void                fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkipPoolDefs = false ) const;
     /** Writes all font attributes to the passed property map. */
     void                writeToPropertyMap(
-                            PropertyMap& rPropMap,
-                            FontPropertyType ePropType ) const;
+                            PropertyMap& rPropMap ) const;
     /** Writes all font attributes to the passed property set. */
     void                writeToPropertySet(
-                            PropertySet& rPropSet,
-                            FontPropertyType ePropType ) const;
+                            PropertySet& rPropSet ) const;
 
 private:
     FontModel           maModel;
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index 5af216a..f8b1277 100644
--- a/sc/source/filter/oox/pagesettings.cxx
+++ b/sc/source/filter/oox/pagesettings.cxx
@@ -754,7 +754,7 @@ void HeaderFooterParser::setAttributes()
         Font aFont( *this, maFontModel );
         aFont.finalizeImport();
         PropertySet aPropSet( getEndPos() );
-        aFont.writeToPropertySet( aPropSet, FONT_PROPTYPE_TEXT );
+        aFont.writeToPropertySet( aPropSet );
         getStartPos()->gotoEnd( false );
         getEndPos()->gotoEnd( false );
     }
diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx
index c4e5f18..f88297f 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -98,7 +98,7 @@ void RichStringPortion::convert( const Reference< XText >& rxText, bool bReplace
         if( mxFont.get() )
         {
             PropertySet aPropSet( xRange );
-            mxFont->writeToPropertySet( aPropSet, FONT_PROPTYPE_TEXT );
+            mxFont->writeToPropertySet( aPropSet );
         }
     }
 
@@ -145,7 +145,7 @@ void RichStringPortion::writeFontProperties( const Reference<XText>& rxText ) co
     PropertySet aPropSet(rxText);
 
     if (mxFont.get())
-        mxFont->writeToPropertySet(aPropSet, FONT_PROPTYPE_TEXT);
+        mxFont->writeToPropertySet(aPropSet);
 }
 
 void FontPortionModel::read( SequenceInputStream& rStrm )
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index 68253bd..a4de365 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -967,7 +967,7 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip
     }
 }
 
-void Font::writeToPropertyMap( PropertyMap& rPropMap, FontPropertyType ePropType ) const
+void Font::writeToPropertyMap( PropertyMap& rPropMap ) const
 {
     // font name properties
     if( maUsedFlags.mbNameUsed )
@@ -1033,15 +1033,14 @@ void Font::writeToPropertyMap( PropertyMap& rPropMap, FontPropertyType ePropType
     if( maUsedFlags.mbEscapementUsed )
     {
         rPropMap.setProperty( PROP_CharEscapement, maApiData.mnEscapement);
-        if( ePropType == FONT_PROPTYPE_TEXT )
-            rPropMap.setProperty( PROP_CharEscapementHeight, maApiData.mnEscapeHeight);
+        rPropMap.setProperty( PROP_CharEscapementHeight, maApiData.mnEscapeHeight);
     }
 }
 
-void Font::writeToPropertySet( PropertySet& rPropSet, FontPropertyType ePropType ) const
+void Font::writeToPropertySet( PropertySet& rPropSet ) const
 {
     PropertyMap aPropMap;
-    writeToPropertyMap( aPropMap, ePropType );
+    writeToPropertyMap( aPropMap );
     rPropSet.setProperties( aPropMap );
 }
 


More information about the Libreoffice-commits mailing list