diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-08 09:33:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-08 09:21:06 +0000 |
commit | dca61b588a2426cfe9a18e4a1074b380e42884d7 (patch) | |
tree | db4436c600c08086c0da7fb09c290705b33beb4d /oox | |
parent | 6aa8e86f3a80b7cbfb81500a6bb5cfeaca97791b (diff) |
loplugin:expandablemethods in lotuswordpro..package
Change-Id: Ic9827c998f4f78775fdf5c1eaf9d4749d4986102
Reviewed-on: https://gerrit.libreoffice.org/30682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/drawingml/chart/typegroupconverter.hxx | 4 | ||||
-rw-r--r-- | oox/source/drawingml/chart/typegroupconverter.cxx | 7 | ||||
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 16 | ||||
-rw-r--r-- | oox/source/ole/vbaproject.cxx | 13 |
4 files changed, 7 insertions, 33 deletions
diff --git a/oox/inc/drawingml/chart/typegroupconverter.hxx b/oox/inc/drawingml/chart/typegroupconverter.hxx index 22a134ce8951..9ab86c8aa241 100644 --- a/oox/inc/drawingml/chart/typegroupconverter.hxx +++ b/oox/inc/drawingml/chart/typegroupconverter.hxx @@ -133,10 +133,8 @@ public: /** Returns the object type for a series depending on the chart type. */ ObjectType getSeriesObjectType() const; - /** Returns true, if this chart type has to reverse its series order. */ - bool isReverseSeries() const; /** Returns series title, if the chart type group contains only one single series. */ - OUString getSingleSeriesTitle() const; + OUString getSingleSeriesTitle() const; /** Creates a coordinate system according to the contained chart type. */ css::uno::Reference< css::chart2::XCoordinateSystem > diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx index f6c88e763376..c92ee47f03bd 100644 --- a/oox/source/drawingml/chart/typegroupconverter.cxx +++ b/oox/source/drawingml/chart/typegroupconverter.cxx @@ -222,11 +222,6 @@ ObjectType TypeGroupConverter::getSeriesObjectType() const (maTypeInfo.mbSeriesIsFrame2d ? OBJECTTYPE_FILLEDSERIES2D : OBJECTTYPE_LINEARSERIES2D); } -bool TypeGroupConverter::isReverseSeries() const -{ - return maTypeInfo.mbReverseSeries && !mb3dChart && !isStacked() && !isPercent(); -} - OUString TypeGroupConverter::getSingleSeriesTitle() const { OUString aSeriesTitle; @@ -349,7 +344,7 @@ void TypeGroupConverter::convertFromModel( const Reference< XDiagram >& rxDiagra aSeries.push_back( std::make_shared<SeriesConverter>( *this, **aIt ) ); // reverse series order for some unstacked 2D chart types - if( isReverseSeries() ) + if( maTypeInfo.mbReverseSeries && !mb3dChart && !isStacked() && !isPercent() ) ::std::reverse( aSeries.begin(), aSeries.end() ); // decide whether to use varying colors for each data point diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index a63fe323300c..373e665cd14a 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -519,16 +519,11 @@ void StringHelper::appendToken( OUStringBuffer& rStr, const OUString& rToken, sa rStr.append( rToken ); } -void StringHelper::appendIndex( OUStringBuffer& rStr, const OUString& rIdx ) -{ - rStr.append( '[' ).append( rIdx ).append( ']' ); -} - void StringHelper::appendIndex( OUStringBuffer& rStr, sal_Int64 nIdx ) { OUStringBuffer aToken; appendDec( aToken, nIdx ); - appendIndex( rStr, aToken.makeStringAndClear() ); + rStr.append( '[' ).append( aToken.makeStringAndClear() ).append( ']' ); } OUString StringHelper::getToken( const OUString& rData, sal_Int32& rnPos, sal_Unicode cSep ) @@ -1449,7 +1444,7 @@ void Config::eraseNameList( const String& rListName ) NameListRef Config::getNameList( const String& rListName ) const { - return implGetNameList( rListName ); + return mxCfgData->getNameList( rListName ); } bool Config::implIsValid() const @@ -1462,11 +1457,6 @@ const OUString* Config::implGetOption( const OUString& rKey ) const return mxCfgData->getOption( rKey ); } -NameListRef Config::implGetNameList( const OUString& rListName ) const -{ - return mxCfgData->getNameList( rListName ); -} - Output::Output( const Reference< XComponentContext >& rxContext, const OUString& rFileName ) : mxStrm( InputOutputHelper::openTextOutputStream( rxContext, rFileName, RTL_TEXTENCODING_UTF8 ) ), mnCol( 0 ), @@ -2458,7 +2448,7 @@ bool RecordObjectBase::implIsValid() const void RecordObjectBase::implDump() { - NameListRef xRecNames = getRecNames(); + NameListRef xRecNames = maRecNames.getNameList( cfg() ); ItemFormatMap aSimpleRecs( maSimpleRecs.getNameList( cfg() ) ); while( implStartRecord( *mxBaseStrm, mnRecPos, mnRecId, mnRecSize ) ) diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx index e71669600647..b520d652f8d6 100644 --- a/oox/source/ole/vbaproject.cxx +++ b/oox/source/ole/vbaproject.cxx @@ -165,7 +165,8 @@ bool VbaProject::importVbaProject( StorageBase& rVbaPrjStrg ) GraphicHelper grfHlp( mxContext, xFrame, noStorage ); importVbaProject( rVbaPrjStrg, grfHlp ); // return true if something has been imported - return hasModules() || hasDialogs(); + return (mxBasicLib.is() && mxBasicLib->hasElements()) || + (mxDialogLib.is() && mxDialogLib->hasElements()); } void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper ) @@ -187,16 +188,6 @@ void VbaProject::registerMacroAttacher( const VbaMacroAttacherRef& rxAttacher ) maMacroAttachers.push_back( rxAttacher ); } -bool VbaProject::hasModules() const -{ - return mxBasicLib.is() && mxBasicLib->hasElements(); -} - -bool VbaProject::hasDialogs() const -{ - return mxDialogLib.is() && mxDialogLib->hasElements(); -} - // protected ------------------------------------------------------------------ void VbaProject::addDummyModule( const OUString& rName, sal_Int32 nType ) |