loplugin:passstuffbyref in oox

Change-Id: Iec989e9060c77dd5b010224b37633179cee4f7e9
This commit is contained in:
Noel Grandin
2016-04-13 11:25:07 +02:00
parent 299d938bf0
commit d60d957a68
22 changed files with 44 additions and 44 deletions

View File

@@ -74,7 +74,7 @@ public:
void parseStream( StorageBase& rStorage, const OUString& rStreamName )
throw( css::xml::sax::SAXException, css::io::IOException, css::uno::RuntimeException );
css::uno::Reference< css::xml::sax::XFastTokenHandler >
const css::uno::Reference< css::xml::sax::XFastTokenHandler >&
getTokenHandler() const { return mxTokenHandler; }
private:

View File

@@ -94,9 +94,9 @@ public:
sal_Int16 getTransparency() const;
/** Returns the scheme name from the a:schemeClr element for interoperability purposes */
OUString getSchemeName() const { return msSchemeName; }
const OUString& getSchemeName() const { return msSchemeName; }
/** Returns the unaltered list of transformations for interoperability purposes */
css::uno::Sequence< css::beans::PropertyValue > getTransformations() const { return maInteropTransformations;}
const css::uno::Sequence< css::beans::PropertyValue >& getTransformations() const { return maInteropTransformations;}
/** Translates between color transformation tokens and their names */
static OUString getColorTransformationName( sal_Int32 nElement );

View File

@@ -94,7 +94,7 @@ public:
GraphicProperties& getGraphicProperties() { return *mpGraphicPropertiesPtr; }
const GraphicProperties& getGraphicProperties() const { return *mpGraphicPropertiesPtr; }
CustomShapePropertiesPtr getCustomShapeProperties(){ return mpCustomShapePropertiesPtr; }
CustomShapePropertiesPtr& getCustomShapeProperties(){ return mpCustomShapePropertiesPtr; }
Shape3DProperties& get3DProperties() { return *mp3DPropertiesPtr; }
const Shape3DProperties& get3DProperties() const { return *mp3DPropertiesPtr; }
@@ -118,9 +118,9 @@ public:
std::vector< ShapePtr >& getChildren() { return maChildren; }
void setName( const OUString& rName ) { msName = rName; }
OUString getName( ) { return msName; }
const OUString& getName( ) { return msName; }
void setId( const OUString& rId ) { msId = rId; }
OUString getId() { return msId; }
const OUString& getId() { return msId; }
void setHidden( bool bHidden ) { mbHidden = bHidden; }
void setHiddenMasterShape( bool bHiddenMasterShape ) { mbHiddenMasterShape = bHiddenMasterShape; }
void setSubType( sal_Int32 nSubType ) { mnSubType = nSubType; }
@@ -137,9 +137,9 @@ public:
void setTableType();
void setTextBody(const TextBodyPtr & pTextBody);
TextBodyPtr getTextBody() { return mpTextBody;}
const TextBodyPtr& getTextBody() { return mpTextBody;}
void setMasterTextListStyle( const TextListStylePtr& pMasterTextListStyle );
TextListStylePtr getMasterTextListStyle() const { return mpMasterTextListStyle; }
const TextListStylePtr& getMasterTextListStyle() const { return mpMasterTextListStyle; }
ShapeStyleRefMap& getShapeStyleRefs() { return maShapeStyleRefs; }
const ShapeStyleRefMap& getShapeStyleRefs() const { return maShapeStyleRefs; }

View File

@@ -36,7 +36,7 @@ public:
virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
ShapePtr getShape() { return mpShapePtr;}
const ShapePtr& getShape() { return mpShapePtr;}
protected:

View File

@@ -207,7 +207,7 @@ public:
virtual ~ChartExport() {}
sal_Int32 GetChartID( );
css::uno::Reference< css::frame::XModel > getModel(){ return mxChartModel; }
const css::uno::Reference< css::frame::XModel >& getModel(){ return mxChartModel; }
void WriteChartObj( const css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nChartCount );

View File

@@ -129,7 +129,7 @@ public:
DrawingML( ::sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* pFB = nullptr, DocumentType eDocumentType = DOCUMENT_PPTX, DMLTextExport* pTextExport = nullptr )
: meDocumentType( eDocumentType ), mpTextExport(pTextExport), mpFS( pFS ), mpFB( pFB ), mbIsBackgroundDark( false ) {}
void SetFS( ::sax_fastparser::FSHelperPtr pFS ) { mpFS = pFS; }
::sax_fastparser::FSHelperPtr GetFS() { return mpFS; }
const ::sax_fastparser::FSHelperPtr& GetFS() { return mpFS; }
::oox::core::XmlFilterBase* GetFB() { return mpFB; }
DocumentType GetDocumentType() { return meDocumentType; }
/// The application-specific text exporter callback, if there is one.

View File

@@ -84,7 +84,7 @@ public:
VMLExport( ::sax_fastparser::FSHelperPtr pSerializer, VMLTextExport* pTextExport = nullptr );
virtual ~VMLExport();
::sax_fastparser::FSHelperPtr
const ::sax_fastparser::FSHelperPtr&
GetFS() { return m_pSerializer; }
void SetFS(const ::sax_fastparser::FSHelperPtr& pSerializer);

View File

@@ -74,7 +74,7 @@ public:
const css::uno::Reference< css::xml::sax::XFastAttributeList >& rxAttribs );
/** Returns the wrapped com.sun.star.xml.sax.XFastAttributeList object. */
css::uno::Reference< css::xml::sax::XFastAttributeList >
const css::uno::Reference< css::xml::sax::XFastAttributeList >&
getFastAttributeList() const { return mxAttribs; }
/** Returns true, if the specified attribute is present. */

View File

@@ -38,7 +38,7 @@ public:
virtual ~GrabBagStack();
OUString getCurrentName() { return mCurrentElement.maElementName;}
const OUString& getCurrentName() { return mCurrentElement.maElementName;}
css::beans::PropertyValue getRootProperty();

View File

@@ -71,7 +71,7 @@ public:
bool is() const { return mxPropSet.is(); }
/** Returns the contained XPropertySet interface. */
css::uno::Reference< css::beans::XPropertySet >
const css::uno::Reference< css::beans::XPropertySet >&
getXPropertySet() const { return mxPropSet; }
/** Returns true, if the specified property is supported by the property set. */

View File

@@ -972,7 +972,7 @@ public:
convertAndInsert( const EmbeddedControl& rControl, sal_Int32& rnCtrlIndex );
/** Returns the XIndexContainer interface of the UNO control form, if existing. */
css::uno::Reference< css::container::XIndexContainer >
const css::uno::Reference< css::container::XIndexContainer >&
getXForm() const { return mxFormIC; }
private:

View File

@@ -72,8 +72,8 @@ public:
const ControlConverter& rConv,
ApiControlType eCtrlType,
sal_Int32 nCtrlIndex ) const;
::rtl::OUString getControlSource() { return maControlSource; }
::rtl::OUString getRowSource() { return maRowSource; }
const OUString& getControlSource() { return maControlSource; }
const OUString& getRowSource() { return maRowSource; }
protected:
OUString maName; ///< Name of the control.
OUString maTag; ///< User defined tag.

View File

@@ -77,11 +77,11 @@ class Comment
{
text = _text;
}
OUString get_text()
const OUString& get_text()
{
return text;
}
css::util::DateTime getDateTime()
const css::util::DateTime& getDateTime()
{
return aDateTime;
}

View File

@@ -49,9 +49,9 @@ public:
virtual const oox::drawingml::table::TableStyleListPtr getTableStyles() override;
virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override;
SlidePersistPtr getActualSlidePersist() const { return mpActualSlidePersist; };
const SlidePersistPtr& getActualSlidePersist() const { return mpActualSlidePersist; };
void setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; };
std::map< OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; };
std::map< OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; };
std::vector< SlidePersistPtr >& getDrawPages(){ return maDrawPages; };
std::vector< SlidePersistPtr >& getMasterPages(){ return maMasterPages; };
std::vector< SlidePersistPtr >& getNotesPages(){ return maNotesPages; };

View File

@@ -59,31 +59,31 @@ public:
oox::drawingml::ShapePtr pShapesPtr, const ::oox::drawingml::TextListStylePtr & );
~SlidePersist();
css::uno::Reference< css::drawing::XDrawPage > getPage() const { return mxPage; };
const css::uno::Reference< css::drawing::XDrawPage >& getPage() const { return mxPage; };
#if OSL_DEBUG_LEVEL > 0
static css::uno::WeakReference< css::drawing::XDrawPage > mxDebugPage;
#endif
void setMasterPersist( SlidePersistPtr pMasterPersistPtr ){ mpMasterPagePtr = pMasterPersistPtr; }
SlidePersistPtr getMasterPersist() const { return mpMasterPagePtr; }
const SlidePersistPtr& getMasterPersist() const { return mpMasterPagePtr; }
void setPath( const OUString& rPath ) { maPath = rPath; }
const OUString getPath() const { return maPath; }
const OUString& getPath() const { return maPath; }
void setLayoutPath( const OUString& rLayoutPath ) { maLayoutPath = rLayoutPath; }
const OUString getLayoutPath() const { return maLayoutPath; }
const OUString& getLayoutPath() const { return maLayoutPath; }
void setTheme( const oox::drawingml::ThemePtr& rThemePtr ){ mpThemePtr = rThemePtr; }
oox::drawingml::ThemePtr getTheme() const { return mpThemePtr; }
const oox::drawingml::ThemePtr& getTheme() const { return mpThemePtr; }
oox::drawingml::ClrSchemePtr getClrScheme() const { return mpClrSchemePtr; }
const oox::drawingml::ClrSchemePtr& getClrScheme() const { return mpClrSchemePtr; }
void setClrMap( const oox::drawingml::ClrMapPtr pClrMapPtr ){ mpClrMapPtr = pClrMapPtr; }
oox::drawingml::ClrMapPtr getClrMap() const { return mpClrMapPtr; }
const oox::drawingml::ClrMapPtr& getClrMap() const { return mpClrMapPtr; }
void setBackgroundProperties( const oox::drawingml::FillPropertiesPtr& rFillPropertiesPtr ){ mpBackgroundPropertiesPtr = rFillPropertiesPtr; }
const oox::drawingml::FillPropertiesPtr getBackgroundProperties() const { return mpBackgroundPropertiesPtr; }
const oox::drawingml::FillPropertiesPtr& getBackgroundProperties() const { return mpBackgroundPropertiesPtr; }
bool isMasterPage() const { return mbMaster; }
bool isNotesPage() const { return mbNotes; }
@@ -92,13 +92,13 @@ public:
short getLayoutFromValueToken();
oox::drawingml::TextListStylePtr getDefaultTextStyle() const { return maDefaultTextStylePtr; }
oox::drawingml::TextListStylePtr getTitleTextStyle() const { return maTitleTextStylePtr; }
oox::drawingml::TextListStylePtr getBodyTextStyle() const { return maBodyTextStylePtr; }
oox::drawingml::TextListStylePtr getNotesTextStyle() const { return maNotesTextStylePtr; }
oox::drawingml::TextListStylePtr getOtherTextStyle() const { return maOtherTextStylePtr; }
const oox::drawingml::TextListStylePtr& getDefaultTextStyle() const { return maDefaultTextStylePtr; }
const oox::drawingml::TextListStylePtr& getTitleTextStyle() const { return maTitleTextStylePtr; }
const oox::drawingml::TextListStylePtr& getBodyTextStyle() const { return maBodyTextStylePtr; }
const oox::drawingml::TextListStylePtr& getNotesTextStyle() const { return maNotesTextStylePtr; }
const oox::drawingml::TextListStylePtr& getOtherTextStyle() const { return maOtherTextStylePtr; }
oox::drawingml::ShapePtr getShapes() { return maShapesPtr; }
const oox::drawingml::ShapePtr& getShapes() { return maShapesPtr; }
void hideShapesAsMasterShapes();
::std::list< std::shared_ptr< TimeNode > >& getTimeNodeList() { return maTimeNodeList; }
oox::ppt::HeaderFooter& getHeaderFooter(){ return maHeaderFooter; };

View File

@@ -70,7 +70,7 @@ public:
void setHorzOverflowToken( sal_Int32 nToken ){ mnHorzOverflowToken = nToken; };
void setTextBody( const oox::drawingml::TextBodyPtr& pTextBody ){ mpTextBody = pTextBody; };
oox::drawingml::TextBodyPtr getTextBody(){ return mpTextBody; };
const oox::drawingml::TextBodyPtr& getTextBody(){ return mpTextBody; };
void pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase,
const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle,

View File

@@ -596,7 +596,7 @@ ContextHandlerRef GeomGuideListContext::onCreateContext( sal_Int32 aElementToken
return this;
}
static const OUString GetGeomGuideName( const OUString& rValue )
static const OUString& GetGeomGuideName( const OUString& rValue )
{
return rValue;
}

View File

@@ -262,7 +262,7 @@ class Diagram
{
public:
void setData( const DiagramDataPtr & );
DiagramDataPtr getData() const
const DiagramDataPtr& getData() const
{
return mpData;
}

View File

@@ -359,8 +359,8 @@ public:
sResult = maGUID.copy(1, maGUID.getLength() - 2 );
return sResult;
}
OUString getFullName() { return maFullName; }
OUString getTypeName() { return maTypeName; }
const OUString& getFullName() { return maFullName; }
const OUString& getTypeName() { return maTypeName; }
bool isValid() { return mpModel != nullptr; }
void exportName( const Reference< XOutputStream >& rxOut );
void exportCompObj( const Reference< XOutputStream >& rxOut );

View File

@@ -27,7 +27,7 @@ public:
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
oox::drawingml::ShapePtr getShape()
const oox::drawingml::ShapePtr& getShape()
{
return mpShape;
}

View File

@@ -27,7 +27,7 @@ public:
virtual oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken, const oox::AttributeList& rAttribs) override;
oox::drawingml::ShapePtr getShape()
const oox::drawingml::ShapePtr& getShape()
{
return mpShape;
}

View File

@@ -27,7 +27,7 @@ public:
virtual oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken, const oox::AttributeList& rAttribs) override;
oox::drawingml::ShapePtr getShape()
const oox::drawingml::ShapePtr& getShape()
{
return mpShape;
}