diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-06 14:03:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-07 06:01:50 +0000 |
commit | c1380c00397aa251627fb81f1665704416e1a4f8 (patch) | |
tree | a7feb23ea1e8d4faec03ffbd80c716fe8fca3f9a | |
parent | d91c81e4335ccf6a383d1d66d789f2478c92bc7a (diff) |
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@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rwxr-xr-x | compilerplugins/clang/unusedenumconstants.py | 6 | ||||
-rw-r--r-- | sc/source/filter/inc/stylesbuffer.hxx | 13 | ||||
-rw-r--r-- | sc/source/filter/oox/pagesettings.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/richstring.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 9 |
5 files changed, 15 insertions, 19 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py index 3b5585ef4fc9..670bb005eaab 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 64231e96636b..9f9a357d2208 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 5af216a589d4..f8b12771eca5 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 c4e5f1822575..f88297f800d5 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 68253bd06064..a4de36586112 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 ); } |