basic/source/basmgr/basicmanagerrepository.cxx | 4 - basic/source/basmgr/basmgr.cxx | 24 +++---- basic/source/classes/sbunoobj.cxx | 23 ++----- basic/source/inc/sbunoobj.hxx | 8 +- basic/source/runtime/runtime.cxx | 3 basic/source/sbx/sbxvar.cxx | 2 basic/source/uno/dlgcont.cxx | 2 basic/source/uno/namecont.cxx | 6 - basic/source/uno/scriptcont.cxx | 2 connectivity/source/commontools/dbtools.cxx | 10 +-- connectivity/source/drivers/dbase/DTable.cxx | 2 connectivity/source/drivers/dbase/dindexnode.cxx | 2 connectivity/source/drivers/mork/MDriver.cxx | 2 connectivity/source/drivers/mork/MDriver.hxx | 2 connectivity/source/drivers/mysql/YUsers.cxx | 4 - connectivity/source/inc/dbase/DTable.hxx | 2 connectivity/source/inc/dbase/dindexnode.hxx | 2 drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 34 +++++----- drawinglayer/source/dumper/EnhancedShapeDumper.hxx | 34 +++++----- drawinglayer/source/dumper/XShapeDumper.cxx | 52 ++++++++-------- editeng/source/editeng/editeng.cxx | 4 - editeng/source/editeng/editview.cxx | 4 - editeng/source/editeng/impedit.hxx | 14 ++-- editeng/source/editeng/impedit2.cxx | 2 editeng/source/editeng/impedit4.cxx | 10 +-- editeng/source/outliner/outlin2.cxx | 4 - formula/source/core/api/FormulaCompiler.cxx | 10 +-- include/basic/sbxvar.hxx | 2 include/connectivity/CommonTools.hxx | 10 +-- include/drawinglayer/XShapeDumper.hxx | 4 - include/editeng/editeng.hxx | 4 - include/editeng/editview.hxx | 4 - include/editeng/outliner.hxx | 4 - include/formula/FormulaCompiler.hxx | 6 - include/oox/core/xmlfilterbase.hxx | 4 - include/oox/crypto/DocumentDecryption.hxx | 2 include/oox/export/chartexport.hxx | 67 ++++++++++----------- include/oox/export/drawingml.hxx | 62 +++++++++---------- include/oox/export/shapes.hxx | 58 +++++++++--------- include/oox/export/vmlexport.hxx | 2 include/oox/helper/grabbagstack.hxx | 2 include/oox/helper/propertymap.hxx | 6 - include/oox/ppt/pptshapegroupcontext.hxx | 2 include/oox/vml/vmlformatting.hxx | 2 include/oox/vml/vmltextbox.hxx | 2 include/svl/IndexedStyleSheets.hxx | 6 - include/svl/currencytable.hxx | 2 include/svl/documentlockfile.hxx | 2 include/svl/style.hxx | 2 include/svl/stylepool.hxx | 2 oox/inc/drawingml/chart/typegroupconverter.hxx | 2 oox/inc/drawingml/table/tablecell.hxx | 2 oox/inc/drawingml/table/tableproperties.hxx | 2 oox/source/core/xmlfilterbase.cxx | 20 +++--- oox/source/crypto/DocumentDecryption.cxx | 2 oox/source/drawingml/chart/typegroupconverter.cxx | 2 oox/source/drawingml/table/tablecell.cxx | 4 - oox/source/drawingml/table/tableproperties.cxx | 6 - oox/source/export/chartexport.cxx | 62 +++++++++---------- oox/source/export/drawingml.cxx | 60 +++++++++--------- oox/source/export/shapes.cxx | 60 +++++++++--------- oox/source/export/vmlexport.cxx | 2 oox/source/helper/grabbagstack.cxx | 2 oox/source/helper/propertymap.cxx | 10 +-- oox/source/ole/vbaexport.cxx | 10 +-- oox/source/ppt/pptshapegroupcontext.cxx | 2 oox/source/shape/ShapeFilterBase.cxx | 2 oox/source/shape/ShapeFilterBase.hxx | 2 oox/source/vml/vmlformatting.cxx | 2 oox/source/vml/vmltextbox.cxx | 2 sc/inc/compiler.hxx | 6 - sc/source/core/tool/compiler.cxx | 6 - sd/source/filter/eppt/pptx-epptooxml.cxx | 12 +-- svl/source/items/IndexedStyleSheets.cxx | 6 - svl/source/items/style.cxx | 2 svl/source/items/stylepool.cxx | 2 svl/source/misc/documentlockfile.cxx | 2 svl/source/numbers/currencytable.cxx | 2 78 files changed, 404 insertions(+), 415 deletions(-)
New commits: commit cb9bcae7baf70eba601daba8857bdea783ad0dca Author: Noel Grandin <n...@peralex.com> Date: Mon Apr 11 11:38:23 2016 +0200 clang-tidy performance-unnecessary-value-param in formula Change-Id: I9f90c55f74216c2f3452e5b30d85b304668330b3 diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index fbf800a..baacb94 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -150,7 +150,7 @@ public: private: bool getOpCodeString( OUString& rStr, sal_uInt16 nOp ); - void putDefaultOpCode( FormulaCompiler::NonConstOpCodeMapPtr xMap, sal_uInt16 nOp, const CharClass* pCharClass ); + void putDefaultOpCode( const FormulaCompiler::NonConstOpCodeMapPtr& xMap, sal_uInt16 nOp, const CharClass* pCharClass ); private: FormulaCompiler::SeparatorType meSepType; @@ -236,7 +236,7 @@ bool OpCodeList::getOpCodeString( OUString& rStr, sal_uInt16 nOp ) return false; } -void OpCodeList::putDefaultOpCode( FormulaCompiler::NonConstOpCodeMapPtr xMap, sal_uInt16 nOp, +void OpCodeList::putDefaultOpCode( const FormulaCompiler::NonConstOpCodeMapPtr& xMap, sal_uInt16 nOp, const CharClass* pCharClass ) { ResId aRes( nOp, *ResourceManager::getResManager()); @@ -767,15 +767,15 @@ void FormulaCompiler::loadSymbols( sal_uInt16 nSymbols, FormulaGrammar::Grammar } } -void FormulaCompiler::fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr /*xMap */) const +void FormulaCompiler::fillFromAddInCollectionUpperName( const NonConstOpCodeMapPtr& /*xMap */) const { } -void FormulaCompiler::fillFromAddInCollectionEnglishName( NonConstOpCodeMapPtr /*xMap */) const +void FormulaCompiler::fillFromAddInCollectionEnglishName( const NonConstOpCodeMapPtr& /*xMap */) const { } -void FormulaCompiler::fillFromAddInMap( NonConstOpCodeMapPtr /*xMap*/, FormulaGrammar::Grammar /*_eGrammar */) const +void FormulaCompiler::fillFromAddInMap( const NonConstOpCodeMapPtr& /*xMap*/, FormulaGrammar::Grammar /*_eGrammar */) const { } diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index 081afa6..2c96dee 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -271,9 +271,9 @@ public: protected: virtual OUString FindAddInFunction( const OUString& rUpperName, bool bLocalFirst ) const; - virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const; - virtual void fillFromAddInMap( NonConstOpCodeMapPtr xMap, FormulaGrammar::Grammar _eGrammar ) const; - virtual void fillFromAddInCollectionEnglishName( NonConstOpCodeMapPtr xMap ) const; + virtual void fillFromAddInCollectionUpperName( const NonConstOpCodeMapPtr& xMap ) const; + virtual void fillFromAddInMap( const NonConstOpCodeMapPtr& xMap, FormulaGrammar::Grammar _eGrammar ) const; + virtual void fillFromAddInCollectionEnglishName( const NonConstOpCodeMapPtr& xMap ) const; virtual void fillAddInToken(::std::vector< css::sheet::FormulaOpCodeMapEntry >& _rVec, bool _bIsEnglish) const; virtual void SetError(sal_uInt16 nError); diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index a037023..d8f5e3e 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -445,9 +445,9 @@ public: private: // FormulaCompiler virtual OUString FindAddInFunction( const OUString& rUpperName, bool bLocalFirst ) const override; - virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const override; - virtual void fillFromAddInCollectionEnglishName( NonConstOpCodeMapPtr xMap ) const override; - virtual void fillFromAddInMap( NonConstOpCodeMapPtr xMap, formula::FormulaGrammar::Grammar _eGrammar ) const override; + virtual void fillFromAddInCollectionUpperName( const NonConstOpCodeMapPtr& xMap ) const override; + virtual void fillFromAddInCollectionEnglishName( const NonConstOpCodeMapPtr& xMap ) const override; + virtual void fillFromAddInMap( const NonConstOpCodeMapPtr& xMap, formula::FormulaGrammar::Grammar _eGrammar ) const override; virtual void fillAddInToken(::std::vector< css::sheet::FormulaOpCodeMapEntry >& _rVec,bool _bIsEnglish) const override; virtual bool HandleExternalReference(const formula::FormulaToken& _aToken) override; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 38e2da0..51cb1e9a 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -97,7 +97,7 @@ static const sal_Char* pInternal[2] = { "TTT", "__DEBUG_VAR" }; using namespace ::com::sun::star::i18n; -void ScCompiler::fillFromAddInMap( NonConstOpCodeMapPtr xMap,FormulaGrammar::Grammar _eGrammar ) const +void ScCompiler::fillFromAddInMap( const NonConstOpCodeMapPtr& xMap,FormulaGrammar::Grammar _eGrammar ) const { size_t nSymbolOffset; switch( _eGrammar ) @@ -125,7 +125,7 @@ void ScCompiler::fillFromAddInMap( NonConstOpCodeMapPtr xMap,FormulaGrammar::Gra } } -void ScCompiler::fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const +void ScCompiler::fillFromAddInCollectionUpperName( const NonConstOpCodeMapPtr& xMap ) const { ScUnoAddInCollection* pColl = ScGlobal::GetAddInCollection(); long nCount = pColl->GetFuncCount(); @@ -138,7 +138,7 @@ void ScCompiler::fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) c } } -void ScCompiler::fillFromAddInCollectionEnglishName( NonConstOpCodeMapPtr xMap ) const +void ScCompiler::fillFromAddInCollectionEnglishName( const NonConstOpCodeMapPtr& xMap ) const { ScUnoAddInCollection* pColl = ScGlobal::GetAddInCollection(); long nCount = pColl->GetFuncCount(); commit 5cf725b626428b09072e6a3464765c3069f1e43f Author: Noel Grandin <n...@peralex.com> Date: Mon Apr 11 11:20:44 2016 +0200 clang-tidy performance-unnecessary-value-param in editeng Change-Id: Idfebcc36c756023e491baf2c4259bd580785dd44 diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 09e4b2d..485f2f7 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2136,7 +2136,7 @@ void EditEngine::SetAllMisspellRanges( const std::vector<editeng::MisspellRanges pImpEditEngine->SetAllMisspellRanges(rRanges); } -void EditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) +void EditEngine::SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars ) { ImpEditEngine::SetForbiddenCharsTable( xForbiddenChars ); } @@ -2281,7 +2281,7 @@ bool EditEngine::UpdateFieldsOnly() return pImpEditEngine->UpdateFields(); } -void EditEngine::RemoveFields( std::function<bool ( const SvxFieldData* )> isFieldData ) +void EditEngine::RemoveFields( const std::function<bool ( const SvxFieldData* )>& isFieldData ) { pImpEditEngine->UpdateFields(); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 8c89c96..a3ed225 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -75,8 +75,8 @@ using namespace com::sun::star::beans; // static LanguageType EditView::CheckLanguage( const OUString &rText, - Reference< linguistic2::XSpellChecker1 > xSpell, - Reference< linguistic2::XLanguageGuessing > xLangGuess, + const Reference< linguistic2::XSpellChecker1 >& xSpell, + const Reference< linguistic2::XLanguageGuessing >& xLangGuess, bool bIsParaText ) { LanguageType nLang = LANGUAGE_NONE; diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 7ab03f8..fa70b1e 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -952,14 +952,14 @@ public: void AddPortionIterated( EditView& rEditView, const EditSelection &rSel, - css::uno::Reference< css::linguistic2::XSpellAlternatives > xAlt, + const css::uno::Reference< css::linguistic2::XSpellAlternatives >& xAlt, svx::SpellPortions& rToFill); //adds one portion to the SpellPortions - void AddPortion( - const EditSelection &rSel, - css::uno::Reference< css::linguistic2::XSpellAlternatives > xAlt, - svx::SpellPortions& rToFill, - bool bIsField ); + void AddPortion( + const EditSelection &rSel, + const css::uno::Reference< css::linguistic2::XSpellAlternatives >& xAlt, + svx::SpellPortions& rToFill, + bool bIsField ); bool Search( const SvxSearchItem& rSearchItem, EditView* pView ); bool ImpSearch( const SvxSearchItem& rSearchItem, const EditSelection& rSearchSelection, const EditPaM& rStartPos, EditSelection& rFoundSel ); @@ -1008,7 +1008,7 @@ public: bool IsAddExtLeading() const { return bAddExtLeading; } rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const; - static void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); + static void SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars ); /** sets a link that is called at the beginning of a drag operation at an edit view */ void SetBeginDropHdl( const Link<EditView*,void>& rLink ) { maBeginDropHdl = rLink; } diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index ce82d71..b934c30 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -4280,7 +4280,7 @@ rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTabl return xF; } -void ImpEditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) +void ImpEditEngine::SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars ) { EE_DLL().GetGlobalData()->SetForbiddenCharsTable( xForbiddenChars ); } diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index bbce370..64960f1 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -2018,9 +2018,9 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView, // Adds one portion to the SpellPortions void ImpEditEngine::AddPortion( const EditSelection& rSel, - uno::Reference< XSpellAlternatives > xAlt, - svx::SpellPortions& rToFill, - bool bIsField) + const uno::Reference< XSpellAlternatives >& xAlt, + svx::SpellPortions& rToFill, + bool bIsField) { if(rSel.HasRange()) { @@ -2042,8 +2042,8 @@ void ImpEditEngine::AddPortion( void ImpEditEngine::AddPortionIterated( EditView& rEditView, const EditSelection& rSel, - Reference< XSpellAlternatives > xAlt, - svx::SpellPortions& rToFill) + const Reference< XSpellAlternatives >& xAlt, + svx::SpellPortions& rToFill) { if (rSel.HasRange()) { diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 7126a91..927b947 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -153,7 +153,7 @@ bool Outliner::UpdateFields() return pEditEngine->UpdateFields(); } -void Outliner::RemoveFields( std::function<bool ( const SvxFieldData* )> isFieldData ) +void Outliner::RemoveFields( const std::function<bool ( const SvxFieldData* )>& isFieldData ) { pEditEngine->RemoveFields( isFieldData ); } @@ -398,7 +398,7 @@ Reference< XSpellChecker1 > Outliner::GetSpeller() return pEditEngine->GetSpeller(); } -void Outliner::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) +void Outliner::SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars ) { EditEngine::SetForbiddenCharsTable( xForbiddenChars ); } diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 3f9fe0c..267f0f0 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -425,7 +425,7 @@ public: void GetAllMisspellRanges( std::vector<editeng::MisspellRanges>& rRanges ) const; void SetAllMisspellRanges( const std::vector<editeng::MisspellRanges>& rRanges ); - static void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); + static void SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars ); void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; @@ -453,7 +453,7 @@ public: bool UpdateFields(); bool UpdateFieldsOnly(); - void RemoveFields( std::function<bool ( const SvxFieldData* )> isFieldData = [] (const SvxFieldData* ){return true;} ); + void RemoveFields( const std::function<bool ( const SvxFieldData* )>& isFieldData = [] (const SvxFieldData* ){return true;} ); sal_uInt16 GetFieldCount( sal_Int32 nPara ) const; EFieldInfo GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const; diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 73ceaac..163ea7c 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -253,8 +253,8 @@ public: */ static LanguageType CheckLanguage( const OUString &rText, - css::uno::Reference< css::linguistic2::XSpellChecker1 > xSpell, - css::uno::Reference< css::linguistic2::XLanguageGuessing > xLangGuess, + const css::uno::Reference< css::linguistic2::XSpellChecker1 >& xSpell, + const css::uno::Reference< css::linguistic2::XLanguageGuessing >& xLangGuess, bool bIsParaText ); /// Allows adjusting the point or mark of the selection to a document coordinate. void SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark); diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index d8c990a..c385b48 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -900,7 +900,7 @@ public: void QuickFormatDoc(); bool UpdateFields(); - void RemoveFields( std::function<bool ( const SvxFieldData* )> isFieldData = [] (const SvxFieldData* ){return true;} ); + void RemoveFields( const std::function<bool ( const SvxFieldData* )>& isFieldData = [] (const SvxFieldData* ){return true;} ); void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ); virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rTxtColor, Color*& rFldColor ); @@ -910,7 +910,7 @@ public: GetSpeller(); void SetHyphenator( css::uno::Reference< css::linguistic2::XHyphenator >& xHyph ); - static void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); + static void SetForbiddenCharsTable( const rtl::Reference<SvxForbiddenCharactersTable>& xForbiddenChars ); // Deprecated void SetDefaultLanguage( LanguageType eLang ); commit fad7d4417e3b4a9d0dda505d4b9aa99d2715aa54 Author: Noel Grandin <n...@peralex.com> Date: Mon Apr 11 10:56:59 2016 +0200 clang-tidy performance-unnecessary-value-param in drawinglayer Change-Id: I59d65ba81afab41e781f9dea5339a01d7918c51c diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index 681508e..d033e98 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -17,7 +17,7 @@ using namespace com::sun::star; // ---------- EnhancedCustomShapeExtrusion.idl ---------- -void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference< beans::XPropertySet > xPropSet) +void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(const uno::Reference< beans::XPropertySet >& xPropSet) { { uno::Any anotherAny = xPropSet->getPropertyValue("Extrusion"); @@ -185,7 +185,7 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeParameterPair(drawing::Enhanced } } -void EnhancedShapeDumper::dumpDepthAsElement(drawing::EnhancedCustomShapeParameterPair aDepth) +void EnhancedShapeDumper::dumpDepthAsElement(const drawing::EnhancedCustomShapeParameterPair& aDepth) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Depth" )); dumpEnhancedCustomShapeParameterPair(aDepth); @@ -286,7 +286,7 @@ void EnhancedShapeDumper::dumpShadeModeAsAttribute(drawing::ShadeMode eShadeMode } } -void EnhancedShapeDumper::dumpRotateAngleAsElement(drawing::EnhancedCustomShapeParameterPair aRotateAngle) +void EnhancedShapeDumper::dumpRotateAngleAsElement(const drawing::EnhancedCustomShapeParameterPair& aRotateAngle) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RotateAngle" )); dumpEnhancedCustomShapeParameterPair(aRotateAngle); @@ -305,7 +305,7 @@ void EnhancedShapeDumper::dumpShininessAsAttribute(double aShininess) xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shininess"), "%f", aShininess); } -void EnhancedShapeDumper::dumpSkewAsElement(drawing::EnhancedCustomShapeParameterPair aSkew) +void EnhancedShapeDumper::dumpSkewAsElement(const drawing::EnhancedCustomShapeParameterPair& aSkew) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Skew" )); dumpEnhancedCustomShapeParameterPair(aSkew); @@ -341,7 +341,7 @@ void EnhancedShapeDumper::dumpViewPointAsElement(drawing::Position3D aViewPoint) xmlTextWriterEndElement( xmlWriter ); } -void EnhancedShapeDumper::dumpOriginAsElement(drawing::EnhancedCustomShapeParameterPair aOrigin) +void EnhancedShapeDumper::dumpOriginAsElement(const drawing::EnhancedCustomShapeParameterPair& aOrigin) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Origin" )); dumpEnhancedCustomShapeParameterPair(aOrigin); @@ -360,7 +360,7 @@ void EnhancedShapeDumper::dumpExtrusionColorAsAttribute(bool bExtrusionColor) // ---------- EnhancedCustomShapeGeometry.idl ----------- -void EnhancedShapeDumper::dumpEnhancedCustomShapeGeometryService(uno::Reference< beans::XPropertySet > xPropSet) +void EnhancedShapeDumper::dumpEnhancedCustomShapeGeometryService(const uno::Reference< beans::XPropertySet >& xPropSet) { { uno::Any anotherAny = xPropSet->getPropertyValue("Type"); @@ -617,7 +617,7 @@ void EnhancedShapeDumper::dumpHandlesAsElement(const uno::Sequence< beans::Prope // ---------- EnhancedCustomShapeHandle.idl ----------- -void EnhancedShapeDumper::dumpEnhancedCustomShapeHandleService(uno::Reference< beans::XPropertySet > xPropSet) +void EnhancedShapeDumper::dumpEnhancedCustomShapeHandleService(const uno::Reference< beans::XPropertySet >& xPropSet) { { uno::Any anotherAny = xPropSet->getPropertyValue("MirroredX"); @@ -719,14 +719,14 @@ void EnhancedShapeDumper::dumpSwitchedAsAttribute(bool bSwitched) xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("switched"), "%s", "false"); } -void EnhancedShapeDumper::dumpPositionAsElement(drawing::EnhancedCustomShapeParameterPair aPosition) +void EnhancedShapeDumper::dumpPositionAsElement(const drawing::EnhancedCustomShapeParameterPair& aPosition) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Position" )); dumpEnhancedCustomShapeParameterPair(aPosition); xmlTextWriterEndElement( xmlWriter ); } -void EnhancedShapeDumper::dumpPolarAsElement(drawing::EnhancedCustomShapeParameterPair aPolar) +void EnhancedShapeDumper::dumpPolarAsElement(const drawing::EnhancedCustomShapeParameterPair& aPolar) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Polar" )); dumpEnhancedCustomShapeParameterPair(aPolar); @@ -781,42 +781,42 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeParameter(drawing::EnhancedCust xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%" SAL_PRIdINT32, aType); } -void EnhancedShapeDumper::dumpRangeXMinimumAsElement(drawing::EnhancedCustomShapeParameter aRangeXMinimum) +void EnhancedShapeDumper::dumpRangeXMinimumAsElement(const drawing::EnhancedCustomShapeParameter& aRangeXMinimum) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RangeXMinimum" )); dumpEnhancedCustomShapeParameter(aRangeXMinimum); xmlTextWriterEndElement( xmlWriter ); } -void EnhancedShapeDumper::dumpRangeXMaximumAsElement(drawing::EnhancedCustomShapeParameter aRangeXMaximum) +void EnhancedShapeDumper::dumpRangeXMaximumAsElement(const drawing::EnhancedCustomShapeParameter& aRangeXMaximum) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RangeXMaximum" )); dumpEnhancedCustomShapeParameter(aRangeXMaximum); xmlTextWriterEndElement( xmlWriter ); } -void EnhancedShapeDumper::dumpRangeYMinimumAsElement(drawing::EnhancedCustomShapeParameter aRangeYMinimum) +void EnhancedShapeDumper::dumpRangeYMinimumAsElement(const drawing::EnhancedCustomShapeParameter& aRangeYMinimum) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RangeYMinimum" )); dumpEnhancedCustomShapeParameter(aRangeYMinimum); xmlTextWriterEndElement( xmlWriter ); } -void EnhancedShapeDumper::dumpRangeYMaximumAsElement(drawing::EnhancedCustomShapeParameter aRangeYMaximum) +void EnhancedShapeDumper::dumpRangeYMaximumAsElement(const drawing::EnhancedCustomShapeParameter& aRangeYMaximum) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RangeYMaximum" )); dumpEnhancedCustomShapeParameter(aRangeYMaximum); xmlTextWriterEndElement( xmlWriter ); } -void EnhancedShapeDumper::dumpRadiusRangeMinimumAsElement(drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum) +void EnhancedShapeDumper::dumpRadiusRangeMinimumAsElement(const drawing::EnhancedCustomShapeParameter& aRadiusRangeMinimum) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RadiusRangeMinimum" )); dumpEnhancedCustomShapeParameter(aRadiusRangeMinimum); xmlTextWriterEndElement( xmlWriter ); } -void EnhancedShapeDumper::dumpRadiusRangeMaximumAsElement(drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum) +void EnhancedShapeDumper::dumpRadiusRangeMaximumAsElement(const drawing::EnhancedCustomShapeParameter& aRadiusRangeMaximum) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RadiusRangeMaximum" )); dumpEnhancedCustomShapeParameter(aRadiusRangeMaximum); @@ -827,7 +827,7 @@ void EnhancedShapeDumper::dumpRadiusRangeMaximumAsElement(drawing::EnhancedCusto // ---------- EnhancedCustomShapePath.idl --------------- -void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< beans::XPropertySet > xPropSet) +void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(const uno::Reference< beans::XPropertySet >& xPropSet) { { uno::Any anotherAny = xPropSet->getPropertyValue("Coordinates"); @@ -1034,7 +1034,7 @@ void EnhancedShapeDumper::dumpSubViewSizeAsElement(const uno::Sequence< awt::Siz // ---------- EnhancedCustomShapeTextPath.idl --------------- -void EnhancedShapeDumper::dumpEnhancedCustomShapeTextPathService(uno::Reference< beans::XPropertySet > xPropSet) +void EnhancedShapeDumper::dumpEnhancedCustomShapeTextPathService(const uno::Reference< beans::XPropertySet >& xPropSet) { { uno::Any anotherAny = xPropSet->getPropertyValue("TextPath"); diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.hxx b/drawinglayer/source/dumper/EnhancedShapeDumper.hxx index a9547be..58f7e5f 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.hxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.hxx @@ -45,10 +45,10 @@ public: void dumpEnhancedCustomShapeParameter(css::drawing::EnhancedCustomShapeParameter aParameter); // EnhancedCustomShapeExtrusion.idl - void dumpEnhancedCustomShapeExtrusionService(css::uno::Reference< css::beans::XPropertySet > xPropSet); + void dumpEnhancedCustomShapeExtrusionService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet); void dumpExtrusionAsAttribute(bool bExtrusion); void dumpBrightnessAsAttribute(double aBrightness); - void dumpDepthAsElement(css::drawing::EnhancedCustomShapeParameterPair aDepth); + void dumpDepthAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aDepth); void dumpDiffusionAsAttribute(double aDiffusion); void dumpNumberOfLineSegmentsAsAttribute(sal_Int32 aNumberOfLineSegments); void dumpLightFaceAsAttribute(bool bLightFace); @@ -60,18 +60,18 @@ public: void dumpSecondLightDirectionAsElement(css::drawing::Direction3D aSecondLightDirection); void dumpMetalAsAttribute(bool bMetal); void dumpShadeModeAsAttribute(css::drawing::ShadeMode eShadeMode); - void dumpRotateAngleAsElement(css::drawing::EnhancedCustomShapeParameterPair aRotateAngle); + void dumpRotateAngleAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aRotateAngle); void dumpRotationCenterAsElement(css::drawing::Direction3D aRotationCenter); void dumpShininessAsAttribute(double aShininess); - void dumpSkewAsElement(css::drawing::EnhancedCustomShapeParameterPair aSkew); + void dumpSkewAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aSkew); void dumpSpecularityAsAttribute(double aSpecularity); void dumpProjectionModeAsAttribute(css::drawing::ProjectionMode eProjectionMode); void dumpViewPointAsElement(css::drawing::Position3D aViewPoint); - void dumpOriginAsElement(css::drawing::EnhancedCustomShapeParameterPair aOrigin); + void dumpOriginAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aOrigin); void dumpExtrusionColorAsAttribute(bool bExtrusionColor); // EnhancedCustomShapeGeometry.idl - void dumpEnhancedCustomShapeGeometryService(css::uno::Reference< css::beans::XPropertySet > xPropSet); + void dumpEnhancedCustomShapeGeometryService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet); void dumpTypeAsAttribute(const OUString& sType); void dumpViewBoxAsElement(css::awt::Rectangle aViewBox); void dumpMirroredXAsAttribute(bool bMirroredX); // also used in EnhancedCustomShapeHandle @@ -85,23 +85,23 @@ public: void dumpHandlesAsElement(const css::uno::Sequence< css::beans::PropertyValues >& aHandles); // EnhancedCustomShapeHandle.idl - void dumpEnhancedCustomShapeHandleService(css::uno::Reference< css::beans::XPropertySet > xPropSet); + void dumpEnhancedCustomShapeHandleService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet); void dumpSwitchedAsAttribute(bool bSwitched); - void dumpPositionAsElement(css::drawing::EnhancedCustomShapeParameterPair aPosition); - void dumpPolarAsElement(css::drawing::EnhancedCustomShapeParameterPair aPolar); + void dumpPositionAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aPosition); + void dumpPolarAsElement(const css::drawing::EnhancedCustomShapeParameterPair& aPolar); void dumpRefXAsAttribute(sal_Int32 aRefX); void dumpRefYAsAttribute(sal_Int32 aRefY); void dumpRefAngleAsAttribute(sal_Int32 aRefAngle); void dumpRefRAsAttribute(sal_Int32 aRefR); - void dumpRangeXMinimumAsElement(css::drawing::EnhancedCustomShapeParameter aRangeXMinimum); - void dumpRangeXMaximumAsElement(css::drawing::EnhancedCustomShapeParameter aRangeXMaximum); - void dumpRangeYMinimumAsElement(css::drawing::EnhancedCustomShapeParameter aRangeYMinimum); - void dumpRangeYMaximumAsElement(css::drawing::EnhancedCustomShapeParameter aRangeXMaximum); - void dumpRadiusRangeMinimumAsElement(css::drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum); - void dumpRadiusRangeMaximumAsElement(css::drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum); + void dumpRangeXMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRangeXMinimum); + void dumpRangeXMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRangeXMaximum); + void dumpRangeYMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRangeYMinimum); + void dumpRangeYMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRangeXMaximum); + void dumpRadiusRangeMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRadiusRangeMinimum); + void dumpRadiusRangeMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter& aRadiusRangeMaximum); // EnhancedCustomShapePath.idl - void dumpEnhancedCustomShapePathService(css::uno::Reference< css::beans::XPropertySet > xPropSet); + void dumpEnhancedCustomShapePathService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet); void dumpCoordinatesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair >& aCoordinates); void dumpSegmentsAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment >& aSegments); void dumpStretchXAsAttribute(sal_Int32 aStretchX); @@ -116,7 +116,7 @@ public: void dumpSubViewSizeAsElement(const css::uno::Sequence< css::awt::Size >& aSubViewSize); // EnhancedCustomShapePath.idl - void dumpEnhancedCustomShapeTextPathService(css::uno::Reference< css::beans::XPropertySet > xPropSet); + void dumpEnhancedCustomShapeTextPathService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet); void dumpTextPathAsAttribute(bool bTextPath); void dumpTextPathModeAsAttribute(css::drawing::EnhancedCustomShapeTextPathMode eTextPathMode); void dumpScaleXAsAttribute(bool bScaleX); diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx index c3546b3..5855148 100644 --- a/drawinglayer/source/dumper/XShapeDumper.cxx +++ b/drawinglayer/source/dumper/XShapeDumper.cxx @@ -49,7 +49,7 @@ void dumpFillGradientNameAsAttribute(const OUString& sGradName, xmlTextWriterPtr void dumpFillGradientAsElement(const css::awt::Gradient& rGradient, xmlTextWriterPtr xmlWriter); void dumpFillHatchAsElement(const css::drawing::Hatch& rHatch, xmlTextWriterPtr xmlWriter); void dumpFillBackgroundAsAttribute(bool bBackground, xmlTextWriterPtr xmlWriter); -void dumpFillBitmapAsElement(css::uno::Reference<css::awt::XBitmap> xBitmap, xmlTextWriterPtr xmlWriter); +void dumpFillBitmapAsElement(const css::uno::Reference<css::awt::XBitmap>& xBitmap, xmlTextWriterPtr xmlWriter); void dumpFillBitmapURLAsAttribute(const OUString& sBitmapURL, xmlTextWriterPtr xmlWriter); void dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, xmlTextWriterPtr xmlWriter); void dumpFillBitmapPositionOffsetYAsAttribute(sal_Int32 aBitmapPositionOffsetY, xmlTextWriterPtr xmlWriter); @@ -147,17 +147,17 @@ void dumpPositionAsAttribute(const css::awt::Point& rPoint, xmlTextWriterPtr xml void dumpSizeAsAttribute(const css::awt::Size& rSize, xmlTextWriterPtr xmlWriter); // the rest -void dumpShapeDescriptorAsAttribute( css::uno::Reference< css::drawing::XShapeDescriptor > xDescr, xmlTextWriterPtr xmlWriter ); -void dumpXShape(css::uno::Reference< css::drawing::XShape > xShape, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties); -void dumpXShapes( css::uno::Reference< css::drawing::XShapes > xShapes, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties ); -void dumpTextPropertiesService(css::uno::Reference< css::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); -void dumpFillPropertiesService(css::uno::Reference< css::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); -void dumpLinePropertiesService(css::uno::Reference< css::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); -void dumpShadowPropertiesService(css::uno::Reference< css::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); -void dumpPolyPolygonDescriptorService(css::uno::Reference< css::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); -void dumpShapeService(css::uno::Reference< css::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties); -void dumpPolyPolygonBezierDescriptorService(css::uno::Reference< css::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); -void dumpCustomShapeService(css::uno::Reference< css::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter); +void dumpShapeDescriptorAsAttribute( const css::uno::Reference< css::drawing::XShapeDescriptor >& xDescr, xmlTextWriterPtr xmlWriter ); +void dumpXShape(const css::uno::Reference< css::drawing::XShape >& xShape, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties); +void dumpXShapes( const css::uno::Reference< css::drawing::XShapes >& xShapes, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties ); +void dumpTextPropertiesService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter); +void dumpFillPropertiesService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter); +void dumpLinePropertiesService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter); +void dumpShadowPropertiesService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter); +void dumpPolyPolygonDescriptorService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter); +void dumpShapeService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties); +void dumpPolyPolygonBezierDescriptorService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter); +void dumpCustomShapeService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter); int writeCallback(void* pContext, const char* sBuffer, int nLen) @@ -305,7 +305,7 @@ void dumpFillBackgroundAsAttribute(bool bBackground, xmlTextWriterPtr xmlWriter) xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "false"); } -void dumpFillBitmapAsElement(uno::Reference<awt::XBitmap> xBitmap, xmlTextWriterPtr xmlWriter) +void dumpFillBitmapAsElement(const uno::Reference<awt::XBitmap>& xBitmap, xmlTextWriterPtr xmlWriter) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillBitmap" )); if (xBitmap.is()) @@ -1086,7 +1086,7 @@ void dumpSizeAsAttribute(const awt::Size& rSize, xmlTextWriterPtr xmlWriter) xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("sizeY"), "%" SAL_PRIdINT32, rSize.Height); } -void dumpShapeDescriptorAsAttribute( uno::Reference< drawing::XShapeDescriptor > xDescr, xmlTextWriterPtr xmlWriter ) +void dumpShapeDescriptorAsAttribute( const uno::Reference< drawing::XShapeDescriptor >& xDescr, xmlTextWriterPtr xmlWriter ) { xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%s", OUStringToOString(xDescr->getShapeType(), RTL_TEXTENCODING_UTF8).getStr()); @@ -1216,7 +1216,7 @@ void dumpCustomShapeReplacementURLAsAttribute(const OUString& sCustomShapeReplac // methods dumping whole services -void dumpTextPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter) +void dumpTextPropertiesService(const uno::Reference< beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter) { uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo(); if(xInfo->hasPropertyByName("CharHeight")) @@ -1376,7 +1376,7 @@ void dumpTextPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, x } } -void dumpFillPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter) +void dumpFillPropertiesService(const uno::Reference< beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter) { { uno::Any anotherAny = xPropSet->getPropertyValue("FillStyle"); @@ -1524,7 +1524,7 @@ void dumpFillPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, x } } -void dumpLinePropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter) +void dumpLinePropertiesService(const uno::Reference< beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter) { { uno::Any anotherAny = xPropSet->getPropertyValue("LineStyle"); @@ -1618,7 +1618,7 @@ void dumpLinePropertiesService(uno::Reference< beans::XPropertySet > xPropSet, x } } -void dumpShadowPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter) +void dumpShadowPropertiesService(const uno::Reference< beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter) { { uno::Any anotherAny = xPropSet->getPropertyValue("Shadow"); @@ -1652,7 +1652,7 @@ void dumpShadowPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, } } -void dumpPolyPolygonDescriptorService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter) +void dumpPolyPolygonDescriptorService(const uno::Reference< beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter) { { uno::Any anotherAny = xPropSet->getPropertyValue("PolygonKind"); @@ -1674,7 +1674,7 @@ void dumpPolyPolygonDescriptorService(uno::Reference< beans::XPropertySet > xPro } } -void dumpShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties) +void dumpShapeService(const uno::Reference< beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties) { uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo(); { @@ -1753,7 +1753,7 @@ void dumpShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWri } } -void dumpPolyPolygonBezierDescriptorService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter) +void dumpPolyPolygonBezierDescriptorService(const uno::Reference< beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter) { { uno::Any anotherAny = xPropSet->getPropertyValue("PolygonKind"); @@ -1775,7 +1775,7 @@ void dumpPolyPolygonBezierDescriptorService(uno::Reference< beans::XPropertySet } } -void dumpCustomShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter) +void dumpCustomShapeService(const uno::Reference< beans::XPropertySet >& xPropSet, xmlTextWriterPtr xmlWriter) { uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo(); { @@ -1805,7 +1805,7 @@ void dumpCustomShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlT } } -void dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties) +void dumpXShape(const uno::Reference< drawing::XShape >& xShape, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties) { xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShape" ) ); uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY_THROW); @@ -1921,7 +1921,7 @@ void dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWr xmlTextWriterEndElement( xmlWriter ); } -void dumpXShapes( uno::Reference< drawing::XShapes > xShapes, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties ) +void dumpXShapes( const uno::Reference< drawing::XShapes >& xShapes, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties ) { xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShapes" ) ); uno::Reference< container::XIndexAccess > xIA( xShapes, uno::UNO_QUERY_THROW); @@ -1936,7 +1936,7 @@ void dumpXShapes( uno::Reference< drawing::XShapes > xShapes, xmlTextWriterPtr x } } //end of namespace -OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes, bool bDumpInteropProperties) +OUString XShapeDumper::dump(const uno::Reference<drawing::XShapes>& xPageShapes, bool bDumpInteropProperties) { OStringBuffer aString; xmlOutputBufferPtr xmlOutBuffer = xmlOutputBufferCreateIO( writeCallback, closeCallback, &aString, nullptr ); @@ -1960,7 +1960,7 @@ OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes, bool b return OUString::fromUtf8(aString.makeStringAndClear()); } -OUString XShapeDumper::dump(uno::Reference<drawing::XShape> xPageShapes, bool bDumpInteropProperties) +OUString XShapeDumper::dump(const uno::Reference<drawing::XShape>& xPageShapes, bool bDumpInteropProperties) { OStringBuffer aString; xmlOutputBufferPtr xmlOutBuffer = xmlOutputBufferCreateIO( writeCallback, closeCallback, &aString, nullptr ); diff --git a/include/drawinglayer/XShapeDumper.hxx b/include/drawinglayer/XShapeDumper.hxx index 0982908..0e4650b 100644 --- a/include/drawinglayer/XShapeDumper.hxx +++ b/include/drawinglayer/XShapeDumper.hxx @@ -46,8 +46,8 @@ class DRAWINGLAYER_DLLPUBLIC XShapeDumper public: XShapeDumper(); - static OUString dump(css::uno::Reference<css::drawing::XShapes> xPageShapes, bool bDumpInteropProperties=false); - static OUString dump(css::uno::Reference<css::drawing::XShape> xPageShapes, bool bDumpInteropProperties=false); + static OUString dump(const css::uno::Reference<css::drawing::XShapes>& xPageShapes, bool bDumpInteropProperties=false); + static OUString dump(const css::uno::Reference<css::drawing::XShape>& xPageShapes, bool bDumpInteropProperties=false); }; #endif commit f3120c0aa898eca9d28c75c037497dbf63effc2f Author: Noel Grandin <n...@peralex.com> Date: Mon Apr 11 10:31:30 2016 +0200 clang-tidy performance-unnecessary-value-param in connectivity Change-Id: Ie84eeac24f22c5e3d3a4f63728a73023d626ccc0 diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index b859e6f..28cfb40 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -2007,8 +2007,8 @@ void checkDisposed(bool _bThrow) throw ( DisposedException ) } -OSQLColumns::Vector::const_iterator find(OSQLColumns::Vector::const_iterator first, - OSQLColumns::Vector::const_iterator last, +OSQLColumns::Vector::const_iterator find(const OSQLColumns::Vector::const_iterator& first, + const OSQLColumns::Vector::const_iterator& last, const OUString& _rVal, const ::comphelper::UStringMixEqual& _rCase) { @@ -2016,8 +2016,8 @@ OSQLColumns::Vector::const_iterator find(OSQLColumns::Vector::const_iterator fir return find(first,last,sName,_rVal,_rCase); } -OSQLColumns::Vector::const_iterator findRealName(OSQLColumns::Vector::const_iterator first, - OSQLColumns::Vector::const_iterator last, +OSQLColumns::Vector::const_iterator findRealName(const OSQLColumns::Vector::const_iterator& first, + const OSQLColumns::Vector::const_iterator& last, const OUString& _rVal, const ::comphelper::UStringMixEqual& _rCase) { @@ -2026,7 +2026,7 @@ OSQLColumns::Vector::const_iterator findRealName(OSQLColumns::Vector::const_iter } OSQLColumns::Vector::const_iterator find(OSQLColumns::Vector::const_iterator first, - OSQLColumns::Vector::const_iterator last, + const OSQLColumns::Vector::const_iterator& last, const OUString& _rProp, const OUString& _rVal, const ::comphelper::UStringMixEqual& _rCase) diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 88acc97..2bee713 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1662,7 +1662,7 @@ static double toDouble(const OString& rString) } -bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow, const Reference<XIndexAccess>& _xCols, const bool bForceAllFields) +bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRow, const Reference<XIndexAccess>& _xCols, const bool bForceAllFields) { OSL_ENSURE(m_pBuffer,"Buffer is NULL!"); if ( !m_pBuffer ) diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 1697b7f..5f1501d 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -479,7 +479,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage) } -void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) +void ONDXPage::Merge(sal_uInt16 nParentNodePos, const ONDXPagePtr& xPage) { DBG_ASSERT(HasParent(), "kein Vater vorhanden"); DBG_ASSERT(nParentNodePos != NODE_NOTFOUND, "Falscher Indexaufbau"); diff --git a/connectivity/source/drivers/mork/MDriver.cxx b/connectivity/source/drivers/mork/MDriver.cxx index 85a17ec..8092c9a 100644 --- a/connectivity/source/drivers/mork/MDriver.cxx +++ b/connectivity/source/drivers/mork/MDriver.cxx @@ -21,7 +21,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_com return cppu::acquire(new MorkDriver(context)); } -MorkDriver::MorkDriver(css::uno::Reference< css::uno::XComponentContext > const context): +MorkDriver::MorkDriver(const css::uno::Reference< css::uno::XComponentContext >& context): context_(context), m_xFactory(context_->getServiceManager(), css::uno::UNO_QUERY) { diff --git a/connectivity/source/drivers/mork/MDriver.hxx b/connectivity/source/drivers/mork/MDriver.hxx index 7564956..1989091 100644 --- a/connectivity/source/drivers/mork/MDriver.hxx +++ b/connectivity/source/drivers/mork/MDriver.hxx @@ -33,7 +33,7 @@ class MorkDriver: public cppu::WeakImplHelper< css::lang::XServiceInfo, css::sdbc::XDriver > { public: - explicit MorkDriver(css::uno::Reference< css::uno::XComponentContext > const context); + explicit MorkDriver(const css::uno::Reference< css::uno::XComponentContext >& context); static OUString getImplementationName_Static() throw(css::uno::RuntimeException); static css::uno::Sequence< OUString > getSupportedServiceNames_Static() diff --git a/connectivity/source/drivers/mysql/YUsers.cxx b/connectivity/source/drivers/mysql/YUsers.cxx index e43f540..32b10fc 100644 --- a/connectivity/source/drivers/mysql/YUsers.cxx +++ b/connectivity/source/drivers/mysql/YUsers.cxx @@ -70,9 +70,7 @@ sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Referen { OUString aSql( "GRANT USAGE ON * TO " ); OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); - OUString sUserName( _rForName ); - aSql += ::dbtools::quoteName(aQuote,sUserName) - + " @\"%\" "; + aSql += ::dbtools::quoteName(aQuote,_rForName) + " @\"%\" "; OUString sPassword; descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPassword; if ( !sPassword.isEmpty() ) diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx index ad579e8..dcfa89a 100644 --- a/connectivity/source/inc/dbase/DTable.hxx +++ b/connectivity/source/inc/dbase/DTable.hxx @@ -110,7 +110,7 @@ namespace connectivity bool WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr); bool WriteBuffer(); - bool UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols, bool bForceAllFields); + bool UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRow, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols, bool bForceAllFields); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> isUniqueByColumnName(sal_Int32 _nColumnPos); bool AllocBuffer(); diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 7f60083..cc24a7c 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -141,7 +141,7 @@ namespace connectivity // Split and merge ONDXNode Split(ONDXPage& rPage); - void Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage); + void Merge(sal_uInt16 nParentNodePos, const ONDXPagePtr& xPage); // Access operators ONDXNode& operator[] (sal_uInt16 nPos); diff --git a/include/connectivity/CommonTools.hxx b/include/connectivity/CommonTools.hxx index afd3e71..e9da889 100644 --- a/include/connectivity/CommonTools.hxx +++ b/include/connectivity/CommonTools.hxx @@ -110,16 +110,16 @@ namespace connectivity // search from first to last the column with the name _rVal // when no such column exist last is returned OOO_DLLPUBLIC_DBTOOLS - OSQLColumns::Vector::const_iterator find( OSQLColumns::Vector::const_iterator first, - OSQLColumns::Vector::const_iterator last, + OSQLColumns::Vector::const_iterator find( const OSQLColumns::Vector::const_iterator& first, + const OSQLColumns::Vector::const_iterator& last, const OUString& _rVal, const ::comphelper::UStringMixEqual& _rCase); // search from first to last the column with the realname _rVal // when no such column exist last is returned OOO_DLLPUBLIC_DBTOOLS - OSQLColumns::Vector::const_iterator findRealName( OSQLColumns::Vector::const_iterator first, - OSQLColumns::Vector::const_iterator last, + OSQLColumns::Vector::const_iterator findRealName( const OSQLColumns::Vector::const_iterator& first, + const OSQLColumns::Vector::const_iterator& last, const OUString& _rVal, const ::comphelper::UStringMixEqual& _rCase); @@ -128,7 +128,7 @@ namespace connectivity // when no such column exist last is returned OOO_DLLPUBLIC_DBTOOLS OSQLColumns::Vector::const_iterator find( OSQLColumns::Vector::const_iterator first, - OSQLColumns::Vector::const_iterator last, + const OSQLColumns::Vector::const_iterator& last, const OUString& _rProp, const OUString& _rVal, const ::comphelper::UStringMixEqual& _rCase); commit f678b82f0e4dea47dfc8938f01442b6eb1ce23ad Author: Noel Grandin <n...@peralex.com> Date: Mon Apr 11 10:20:19 2016 +0200 clang-tidy performance-unnecessary-value-param in basic Change-Id: I997213ca28efc2df04d454ffaf3c81c9cbad09ac diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 559ed3a..7737ec8 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -183,7 +183,7 @@ namespace basic /** removes the Model/BasicManager pair given by iterator from our store */ - void impl_removeFromRepository( BasicManagerStore::iterator _pos ); + void impl_removeFromRepository( const BasicManagerStore::iterator& _pos ); private: StarBASIC* impl_getDefaultAppBasicLibrary(); @@ -520,7 +520,7 @@ namespace basic } - void ImplRepository::impl_removeFromRepository( BasicManagerStore::iterator _pos ) + void ImplRepository::impl_removeFromRepository( const BasicManagerStore::iterator& _pos ) { OSL_PRECOND( _pos != m_aStore.end(), "ImplRepository::impl_removeFromRepository: invalid position!" ); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 4ac8556..dd8602f 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -149,8 +149,8 @@ public: , maLibName( aLibName ) {} static void insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont, BasicManager* pMgr, - uno::Any aLibAny, const OUString& aLibName ); - static void addLibraryModulesImpl( BasicManager* pMgr, uno::Reference< container::XNameAccess > xLibNameAccess, + const uno::Any& aLibAny, const OUString& aLibName ); + static void addLibraryModulesImpl( BasicManager* pMgr, const uno::Reference< container::XNameAccess >& xLibNameAccess, const OUString& aLibName ); @@ -172,7 +172,7 @@ public: void BasMgrContainerListenerImpl::insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont, - BasicManager* pMgr, uno::Any aLibAny, const OUString& aLibName ) + BasicManager* pMgr, const uno::Any& aLibAny, const OUString& aLibName ) { Reference< container::XNameAccess > xLibNameAccess; aLibAny >>= xLibNameAccess; @@ -203,7 +203,7 @@ void BasMgrContainerListenerImpl::insertLibraryImpl( const uno::Reference< scrip void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr, - uno::Reference< container::XNameAccess > xLibNameAccess, const OUString& aLibName ) + const uno::Reference< container::XNameAccess >& xLibNameAccess, const OUString& aLibName ) { uno::Sequence< OUString > aModuleNames = xLibNameAccess->getElementNames(); sal_Int32 nModuleCount = aModuleNames.getLength(); @@ -840,8 +840,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) if ( !aLibs.isEmpty() ) { - OUString aCurStorageName( aStorName ); - INetURLObject aCurStorage( aCurStorageName, INetProtocol::File ); + INetURLObject aCurStorage( aStorName, INetProtocol::File ); sal_Int32 nLibs = comphelper::string::getTokenCount(aLibs, LIB_SEP); for ( sal_Int32 nLib = 0; nLib < nLibs; nLib++ ) { @@ -1544,17 +1543,16 @@ namespace SbMethod* lcl_queryMacro( BasicManager* i_manager, OUString const& i_fullyQualifiedName ) { sal_Int32 nLast = 0; - const OUString sParse = i_fullyQualifiedName; - OUString sLibName = sParse.getToken( (sal_Int32)0, (sal_Unicode)'.', nLast ); - OUString sModule = sParse.getToken( (sal_Int32)0, (sal_Unicode)'.', nLast ); + OUString sLibName = i_fullyQualifiedName.getToken( (sal_Int32)0, (sal_Unicode)'.', nLast ); + OUString sModule = i_fullyQualifiedName.getToken( (sal_Int32)0, (sal_Unicode)'.', nLast ); OUString sMacro; if(nLast >= 0) { - sMacro = sParse.copy(nLast); + sMacro = i_fullyQualifiedName.copy(nLast); } else { - sMacro = sParse; + sMacro = i_fullyQualifiedName; } utl::TransliterationWrapper& rTransliteration = SbGlobal::GetTransliteration(); @@ -1846,7 +1844,7 @@ void ModuleContainer_Impl::insertByName( const OUString& aName, const uno::Any& throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { uno::Type aModuleType = cppu::UnoType<script::XStarBasicModuleInfo>::get(); - uno::Type aAnyType = aElement.getValueType(); + const uno::Type& aAnyType = aElement.getValueType(); if( aModuleType != aAnyType ) { throw lang::IllegalArgumentException(); @@ -2022,7 +2020,7 @@ void DialogContainer_Impl::insertByName( const OUString& aName, const uno::Any& { (void)aName; uno::Type aModuleType = cppu::UnoType<script::XStarBasicDialogInfo>::get(); - uno::Type aAnyType = aElement.getValueType(); + const uno::Type& aAnyType = aElement.getValueType(); if( aModuleType != aAnyType ) { throw lang::IllegalArgumentException(); diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 610622c..a39697d 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -523,7 +523,7 @@ SbxDataType unoToSbxType( const Reference< XIdlClass >& xIdlClass ) static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int32 >& indices, Sequence< sal_Int32 >& sizes, const Any& aValue, sal_Int32& dimension, bool bIsZeroIndex, Type* pType = nullptr ) { - Type aType = aValue.getValueType(); + const Type& aType = aValue.getValueType(); TypeClass eTypeClass = aType.getTypeClass(); sal_Int32 dimCopy = dimension; @@ -605,7 +605,7 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) { - Type aType = aValue.getValueType(); + const Type& aType = aValue.getValueType(); TypeClass eTypeClass = aType.getTypeClass(); switch( eTypeClass ) { @@ -2671,11 +2671,10 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, SbxClassType t ) try { Reference< XNameAccess > xNameAccess( mxUnoAccess->queryAdapter( cppu::UnoType<XPropertySet>::get()), UNO_QUERY ); - OUString aUName2( rName ); - if( xNameAccess.is() && xNameAccess->hasByName( aUName2 ) ) + if( xNameAccess.is() && xNameAccess->hasByName( rName ) ) { - Any aAny = xNameAccess->getByName( aUName2 ); + Any aAny = xNameAccess->getByName( rName ); // ATTENTION: Because of XNameAccess, the variable generated here // may not be included as a fixed property in the object and therefore @@ -3328,12 +3327,11 @@ VBAConstantHelper::isVBAConstantType( const OUString& rName ) { init(); bool bConstant = false; - OUString sKey( rName ); VBAConstantsVector::const_iterator it = aConstCache.begin(); for( ; it != aConstCache.end(); ++it ) { - if( sKey.equalsIgnoreAsciiCase( *it ) ) + if( rName.equalsIgnoreAsciiCase( *it ) ) { bConstant = true; break; @@ -3348,9 +3346,7 @@ VBAConstantHelper::getVBAConstant( const OUString& rName ) SbxVariable* pConst = nullptr; init(); - OUString sKey( rName ); - - VBAConstantsHash::const_iterator it = aConstHash.find( sKey.toAsciiLowerCase() ); + VBAConstantsHash::const_iterator it = aConstHash.find( rName.toAsciiLowerCase() ); if ( it != aConstHash.end() ) { @@ -3399,8 +3395,7 @@ SbxVariable* SbUnoClass::Find( const OUString& rName, SbxClassType ) if( m_xClass.is() ) { // Is it a field(?) - OUString aUStr( rName ); - Reference< XIdlField > xField = m_xClass->getField( aUStr ); + Reference< XIdlField > xField = m_xClass->getField( rName ); Reference< XIdlClass > xClass; if( xField.is() ) { @@ -4499,7 +4494,7 @@ void SAL_CALL ModuleInvocationProxy::removeEventListener( const Reference< XEven Reference< XInterface > createComListener( const Any& aControlAny, const OUString& aVBAType, - const OUString& aPrefix, SbxObjectRef xScopeObj ) + const OUString& aPrefix, const SbxObjectRef& xScopeObj ) { Reference< XInterface > xRet; @@ -4572,7 +4567,7 @@ static StarBasicDisposeItem* lcl_getOrCreateItemForBasic( StarBASIC* pBasic ) } void registerComponentToBeDisposedForBasic - ( Reference< XComponent > xComponent, StarBASIC* pBasic ) + ( const Reference< XComponent >& xComponent, StarBASIC* pBasic ) { StarBasicDisposeItem* pItem = lcl_getOrCreateItemForBasic( pBasic ); pItem->m_vComImplementsObjects.push_back( xComponent ); diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index 457fd07..cbc3c6f 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -38,7 +38,7 @@ #include <vector> #include <map> -void registerComponentToBeDisposedForBasic( css::uno::Reference< css::lang::XComponent > xComponent, StarBASIC* pBasic ); +void registerComponentToBeDisposedForBasic( const css::uno::Reference< css::lang::XComponent >& xComponent, StarBASIC* pBasic ); class StructRefInfo { @@ -389,9 +389,9 @@ public: SbxVariable* getDefaultProp( SbxVariable* pRef ); css::uno::Reference< css::uno::XInterface > createComListener( const css::uno::Any& aControlAny, - const OUString& aVBAType, - const OUString& aPrefix, - SbxObjectRef xScopeObj ); + const OUString& aVBAType, + const OUString& aPrefix, + const SbxObjectRef& xScopeObj ); bool checkUnoObjectType(SbUnoObject& refVal, const OUString& aClass); diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index dade0d5..c643df7 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -1899,10 +1899,9 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b { Any aControlAny = pUnoObj->getUnoAny(); OUString aDeclareClassName = refVar->GetDeclareClassName(); - OUString aVBAType = aDeclareClassName; OUString aPrefix = refVar->GetName(); SbxObjectRef xScopeObj = refVar->GetParent(); - xComListener = createComListener( aControlAny, aVBAType, aPrefix, xScopeObj ); + xComListener = createComListener( aControlAny, aDeclareClassName, aPrefix, xScopeObj ); refVal->SetDeclareClassName( aDeclareClassName ); refVal->SetComListener( xComListener, &rBasic ); // Hold reference diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 2036137..bc5c8f2 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -450,7 +450,7 @@ void SbxVariable::SetDeclareClassName( const OUString& rDeclareClassName ) pImpl->m_aDeclareClassName = rDeclareClassName; } -void SbxVariable::SetComListener( css::uno::Reference< css::uno::XInterface > xComListener, +void SbxVariable::SetComListener( const css::uno::Reference< css::uno::XInterface >& xComListener, StarBASIC* pParentBasic ) { SbxVariableImpl* pImpl = getImpl(); diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index ba60807..b5b20ff 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -112,7 +112,7 @@ bool SAL_CALL SfxDialogLibraryContainer::isLibraryElementValid(const Any& rEleme } bool writeOasis2OOoLibraryElement( - Reference< XInputStream > xInput, Reference< XOutputStream > xOutput ) + const Reference< XInputStream >& xInput, const Reference< XOutputStream >& xOutput ) { Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 5945253..45d35f0 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -144,7 +144,7 @@ sal_Bool NameContainer::hasByName( const OUString& aName ) void NameContainer::replaceByName( const OUString& aName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException, std::exception) { - Type aAnyType = aElement.getValueType(); + const Type& aAnyType = aElement.getValueType(); if( mType != aAnyType ) { throw IllegalArgumentException(); @@ -200,7 +200,7 @@ void NameContainer::insertCheck(const OUString& aName, const Any& aElement) void NameContainer::insertNoCheck(const OUString& aName, const Any& aElement) throw(IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception) { - Type aAnyType = aElement.getValueType(); + const Type& aAnyType = aElement.getValueType(); if( mType != aAnyType ) { throw IllegalArgumentException(); @@ -584,7 +584,7 @@ static void checkAndCopyFileImpl( const INetURLObject& rSourceFolderInetObj, const INetURLObject& rTargetFolderInetObj, const OUString& rCheckFileName, const OUString& rCheckExtension, - Reference< XSimpleFileAccess3 > xSFI ) + const Reference< XSimpleFileAccess3 >& xSFI ) { INetURLObject aTargetFolderInetObj( rTargetFolderInetObj ); aTargetFolderInetObj.insertName( rCheckFileName, true, INetURLObject::LAST_SEGMENT, diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 87a106e..64fdfe0 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -546,7 +546,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& } -void setStreamKey( uno::Reference< io::XStream > xStream, const OUString& aPass ) +void setStreamKey( const uno::Reference< io::XStream >& xStream, const OUString& aPass ) { uno::Reference< embed::XEncryptionProtectedSource > xEncrStream( xStream, uno::UNO_QUERY ); if ( xEncrStream.is() ) diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx index 6dfd7e2..4892121 100644 --- a/include/basic/sbxvar.hxx +++ b/include/basic/sbxvar.hxx @@ -295,7 +295,7 @@ public: const OUString& GetDeclareClassName(); void SetDeclareClassName( const OUString& ); - void SetComListener( css::uno::Reference< css::uno::XInterface > xComListener, + void SetComListener( const css::uno::Reference< css::uno::XInterface >& xComListener, StarBASIC* pParentBasic ); void ClearComListener(); commit bfff081e74ad06a7e353669eec345c6440db57cb Author: Noel Grandin <n...@peralex.com> Date: Mon Apr 11 10:07:25 2016 +0200 clang-tidy performance-unnecessary-value-param in svl Change-Id: I8abc272d12e62e25be358dc4c73008971f1cd609 diff --git a/include/svl/IndexedStyleSheets.hxx b/include/svl/IndexedStyleSheets.hxx index 1067316..790a078 100644 --- a/include/svl/IndexedStyleSheets.hxx +++ b/include/svl/IndexedStyleSheets.hxx @@ -86,15 +86,15 @@ public: * If the style sheet is already contained, this call has no effect. */ void - AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style); + AddStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style); /** Removes a style sheet. */ bool - RemoveStyleSheet(rtl::Reference< SfxStyleSheetBase > style); + RemoveStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style); /** Check whether a specified style sheet is stored. */ bool - HasStyleSheet(rtl::Reference< SfxStyleSheetBase > style) const; + HasStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) const; /** Obtain the number of style sheets which are held */ unsigned diff --git a/include/svl/currencytable.hxx b/include/svl/currencytable.hxx index 964038d..2753916 100644 --- a/include/svl/currencytable.hxx +++ b/include/svl/currencytable.hxx @@ -36,7 +36,7 @@ public: size_t size() const; - void insert(iterator it, std::unique_ptr<NfCurrencyEntry> p); + void insert(const iterator& it, std::unique_ptr<NfCurrencyEntry> p); }; #endif diff --git a/include/svl/documentlockfile.hxx b/include/svl/documentlockfile.hxx index b658dcc..98dde75 100644 --- a/include/svl/documentlockfile.hxx +++ b/include/svl/documentlockfile.hxx @@ -39,7 +39,7 @@ class SVL_DLLPUBLIC DocumentLockFile : public LockFileCommon css::uno::Reference< css::io::XInputStream > OpenStream(); - void WriteEntryToStream( const LockFileEntry& aEntry, css::uno::Reference< css::io::XOutputStream > xStream ); + void WriteEntryToStream( const LockFileEntry& aEntry, const css::uno::Reference< css::io::XOutputStream >& xStream ); public: DocumentLockFile( const OUString& aOrigURL ); diff --git a/include/svl/style.hxx b/include/svl/style.hxx index 79814cc..dc9c99d 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -208,7 +208,7 @@ protected: virtual ~SfxStyleSheetBasePool(); - void StoreStyleSheet(rtl::Reference< SfxStyleSheetBase >); + void StoreStyleSheet(const rtl::Reference< SfxStyleSheetBase >&); /** Obtain the indexed style sheets. */ diff --git a/include/svl/stylepool.hxx b/include/svl/stylepool.hxx index 93caa6a..461ba2f 100644 --- a/include/svl/stylepool.hxx +++ b/include/svl/stylepool.hxx @@ -69,7 +69,7 @@ public: virtual ~StylePool(); - static OUString nameOf( SfxItemSet_Pointer_t pSet ); + static OUString nameOf( const SfxItemSet_Pointer_t& pSet ); }; class SVL_DLLPUBLIC IStylePoolIteratorAccess diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx index f543d18..750a7fd 100644 --- a/svl/source/items/IndexedStyleSheets.cxx +++ b/svl/source/items/IndexedStyleSheets.cxx @@ -86,7 +86,7 @@ IndexedStyleSheets::GetNumberOfStyleSheets() const } void -IndexedStyleSheets::AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style) +IndexedStyleSheets::AddStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) { if (!HasStyleSheet(style)) { mStyleSheets.push_back(style); @@ -96,7 +96,7 @@ IndexedStyleSheets::AddStyleSheet(rtl::Reference< SfxStyleSheetBase > style) } bool -IndexedStyleSheets::RemoveStyleSheet(rtl::Reference< SfxStyleSheetBase > style) +IndexedStyleSheets::RemoveStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) { rtl::OUString styleName = style->GetName(); std::vector<unsigned> positions = FindPositionsByName(styleName); @@ -207,7 +207,7 @@ IndexedStyleSheets::~IndexedStyleSheets() {;} bool -IndexedStyleSheets::HasStyleSheet(rtl::Reference< SfxStyleSheetBase > style) const +IndexedStyleSheets::HasStyleSheet(const rtl::Reference< SfxStyleSheetBase >& style) const { rtl::OUString styleName = style->GetName(); std::vector<unsigned> positions = FindPositionsByName(styleName); diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 1ec3a18..4221020 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -965,7 +965,7 @@ SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const css::uno::Reference< } void -SfxStyleSheetBasePool::StoreStyleSheet(rtl::Reference< SfxStyleSheetBase > xStyle) +SfxStyleSheetBasePool::StoreStyleSheet(const rtl::Reference< SfxStyleSheetBase >& xStyle) { pImp->mxIndexedStyleSheets->AddStyleSheet(xStyle); } diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index f75435a..f260672 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -332,7 +332,7 @@ namespace { * This static method creates a unique name from a shared pointer to a SfxItemSet * The name is the memory address of the SfxItemSet itself. */ -OUString StylePool::nameOf( SfxItemSet_Pointer_t pSet ) +OUString StylePool::nameOf( const SfxItemSet_Pointer_t& pSet ) { return OUString::number( reinterpret_cast<sal_IntPtr>( pSet.get() ), 16 ); } diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx index 6cd1699..d71e2e9 100644 --- a/svl/source/misc/documentlockfile.cxx +++ b/svl/source/misc/documentlockfile.cxx @@ -63,7 +63,7 @@ DocumentLockFile::~DocumentLockFile() } -void DocumentLockFile::WriteEntryToStream( const LockFileEntry& aEntry, uno::Reference< io::XOutputStream > xOutput ) +void DocumentLockFile::WriteEntryToStream( const LockFileEntry& aEntry, const uno::Reference< io::XOutputStream >& xOutput ) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/svl/source/numbers/currencytable.cxx b/svl/source/numbers/currencytable.cxx index 17e362d..380e47b 100644 --- a/svl/source/numbers/currencytable.cxx +++ b/svl/source/numbers/currencytable.cxx @@ -29,7 +29,7 @@ size_t NfCurrencyTable::size() const return maData.size(); } -void NfCurrencyTable::insert(iterator it, std::unique_ptr<NfCurrencyEntry> p) +void NfCurrencyTable::insert(const iterator& it, std::unique_ptr<NfCurrencyEntry> p) { maData.insert(it, std::move(p)); } commit 9f877f677346968774d4366f105114fe7f36dd69 Author: Noel Grandin <n...@peralex.com> Date: Mon Apr 11 09:23:29 2016 +0200 clang-tidy performance-unnecessary-value-param in oox Change-Id: I1ac86906ea21c00f8d77834c94583be7d9e9974e diff --git a/include/oox/core/xmlfilterbase.hxx b/include/oox/core/xmlfilterbase.hxx index b55a421..8418439 100644 --- a/include/oox/core/xmlfilterbase.hxx +++ b/include/oox/core/xmlfilterbase.hxx @@ -217,7 +217,7 @@ public: @return *this */ - XmlFilterBase& exportDocumentProperties( css::uno::Reference< css::document::XDocumentProperties > xProperties ); + XmlFilterBase& exportDocumentProperties( const css::uno::Reference< css::document::XDocumentProperties >& xProperties ); void importDocumentProperties(); @@ -226,7 +226,7 @@ public: bool isMSO2007Document() const; void checkDocumentProperties( - css::uno::Reference<css::document::XDocumentProperties> xDocProps); + const css::uno::Reference<css::document::XDocumentProperties>& xDocProps); protected: virtual css::uno::Reference< css::io::XInputStream > diff --git a/include/oox/crypto/DocumentDecryption.hxx b/include/oox/crypto/DocumentDecryption.hxx index b494ea2..d6b867b 100644 --- a/include/oox/crypto/DocumentDecryption.hxx +++ b/include/oox/crypto/DocumentDecryption.hxx @@ -55,7 +55,7 @@ public: oox::ole::OleStorage& rOleStorage, css::uno::Reference< css::uno::XComponentContext > xContext); - bool decrypt(css::uno::Reference< css::io::XStream > xDocumentStream); + bool decrypt(const css::uno::Reference< css::io::XStream >& xDocumentStream); bool readEncryptionInfo(); bool generateEncryptionKey(const OUString& rPassword); diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx index 93842e4..7fa4664 100644 --- a/include/oox/export/chartexport.hxx +++ b/include/oox/export/chartexport.hxx @@ -121,39 +121,39 @@ private: void InitPlotArea(); void _ExportContent(); - void exportChartSpace( css::uno::Reference< - css::chart::XChartDocument > rChartDoc, + void exportChartSpace( const css::uno::Reference< + css::chart::XChartDocument >& rChartDoc, bool bIncludeTable ); - void exportChart( css::uno::Reference< - css::chart::XChartDocument > rChartDoc ); - void exportExternalData( css::uno::Reference< - css::chart::XChartDocument > rChartDoc ); - void exportLegend( css::uno::Reference< - css::chart::XChartDocument > rChartDoc ); - void exportTitle( css::uno::Reference< - css::drawing::XShape > xShape ); + void exportChart( const css::uno::Reference< + css::chart::XChartDocument >& rChartDoc ); + void exportExternalData( const css::uno::Reference< + css::chart::XChartDocument >& rChartDoc ); + void exportLegend( const css::uno::Reference< + css::chart::XChartDocument >& rChartDoc ); + void exportTitle( const css::uno::Reference< + css::drawing::XShape >& xShape ); void exportPlotArea( ); - void exportPlotAreaShapeProps( css::uno::Reference< css::beans::XPropertySet > xPropSet ); - void exportFill( css::uno::Reference< css::beans::XPropertySet > xPropSet ); - void exportGradientFill( css::uno::Reference< css::beans::XPropertySet > xPropSet ); - void exportBitmapFill( css::uno::Reference< css::beans::XPropertySet > xPropSet ); + void exportPlotAreaShapeProps( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ); + void exportFill( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ); + void exportGradientFill( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ); + void exportBitmapFill( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ); void exportDataTable( ); - void exportAreaChart( css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportBarChart( css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportBubbleChart( css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportDoughnutChart( css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportLineChart( css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportPieChart( css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportRadarChart( css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportScatterChart( css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportStockChart( css::uno::Reference< css::chart2::XChartType > xChartType ); - void exportSurfaceChart( css::uno::Reference< css::chart2::XChartType > xChartType ); + void exportAreaChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); + void exportBarChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); + void exportBubbleChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); + void exportDoughnutChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); + void exportLineChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); + void exportPieChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); + void exportRadarChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); + void exportScatterChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); + void exportStockChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); + void exportSurfaceChart( const css::uno::Reference< css::chart2::XChartType >& xChartType ); void exportHiLowLines(); - void exportUpDownBars(css::uno::Reference< css::chart2::XChartType > xChartType ); + void exportUpDownBars(const css::uno::Reference< css::chart2::XChartType >& xChartType ); - void exportAllSeries(css::uno::Reference<css::chart2::XChartType> xChartType, bool& rPrimaryAxes); - void exportSeries(css::uno::Reference< css::chart2::XChartType > xChartType, + void exportAllSeries(const css::uno::Reference<css::chart2::XChartType>& xChartType, bool& rPrimaryAxes); + void exportSeries(const css::uno::Reference< css::chart2::XChartType >& xChartType, css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries> >& rSeriesSeq, bool& rPrimaryAxes); void exportCandleStickSeries( const css::uno::Sequence< @@ -166,19 +166,19 @@ private: const css::uno::Reference< css::chart2::data::XDataSequence >& xValueSeq ); void exportSeriesValues( const css::uno::Reference< css::chart2::data::XDataSequence >& xValueSeq, sal_Int32 nValueType = XML_val ); - void exportShapeProps( css::uno::Reference< css::beans::XPropertySet > xPropSet ); - void exportTextProps(css::uno::Reference< css::beans::XPropertySet > xPropSet); + void exportShapeProps( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ); + void exportTextProps(const css::uno::Reference< css::beans::XPropertySet >& xPropSet); void exportDataPoints( const css::uno::Reference< css::beans::XPropertySet >& xSeriesProperties, sal_Int32 nSeriesLength ); void exportDataLabels( const css::uno::Reference<css::chart2::XDataSeries>& xSeries, sal_Int32 nSeriesLength, sal_Int32 eChartType ); void exportGrouping( bool isBar = false ); - void exportTrendlines( css::uno::Reference< css::chart2::XDataSeries > xSeries ); - void exportMarker( css::uno::Reference< css::chart2::XDataSeries > xSeries ); + void exportTrendlines( const css::uno::Reference< css::chart2::XDataSeries >& xSeries ); + void exportMarker( const css::uno::Reference< css::chart2::XDataSeries >& xSeries ); void exportSmooth(); void exportFirstSliceAng(); - void exportErrorBar(css::uno::Reference< css::beans::XPropertySet > xErrorBarProps, + void exportErrorBar(const css::uno::Reference< css::beans::XPropertySet >& xErrorBarProps, bool bYError); void exportManualLayout(const css::chart2::RelativePosition& rPos, const css::chart2::RelativeSize& rSize); @@ -197,8 +197,7 @@ private: void exportView3D(); bool isDeep3dChart(); - void exportMissingValueTreatment(css::uno::Reference< - css::beans::XPropertySet> xPropSet); + void exportMissingValueTreatment(const css::uno::Reference<css::beans::XPropertySet>& xPropSet); OUString getNumberFormatCode(sal_Int32 nKey) const; diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 9305c01..fe2a8c7 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -109,11 +109,11 @@ protected: css::uno::Reference<css::drawing::XShape> m_xParent; bool mbIsBackgroundDark; - bool GetProperty( css::uno::Reference< css::beans::XPropertySet > rXPropSet, const OUString& aName ); - bool GetPropertyAndState( css::uno::Reference< css::beans::XPropertySet > rXPropSet, - css::uno::Reference< css::beans::XPropertyState > rXPropState, + bool GetProperty( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& aName ); + bool GetPropertyAndState( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, + const css::uno::Reference< css::beans::XPropertyState >& rXPropState, const OUString& aName, css::beans::PropertyState& eState ); - OUString GetFieldValue( css::uno::Reference< css::text::XTextRange > rRun, bool& bIsURLField ); + OUString GetFieldValue( const css::uno::Reference< css::text::XTextRange >& rRun, bool& bIsURLField ); /// If bRelPathToMedia is true add "../" to image folder path while adding the image relationship @@ -143,60 +143,60 @@ public: void WriteColor( const OUString& sColorSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations ); void WriteColorTransformations( const css::uno::Sequence< css::beans::PropertyValue >& aTransformations ); void WriteGradientStop( sal_uInt16 nStop, sal_uInt32 nColor ); - void WriteLineArrow( css::uno::Reference< css::beans::XPropertySet > rXPropSet, bool bLineStart ); + void WriteLineArrow( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, bool bLineStart ); void WriteConnectorConnections( EscherConnectorListEntry& rConnectorEntry, sal_Int32 nStartID, sal_Int32 nEndID ); void WriteSolidFill( sal_uInt32 nColor, sal_Int32 nAlpha = MAX_PERCENT ); void WriteSolidFill( const OUString& sSchemeName, const css::uno::Sequence< css::beans::PropertyValue >& aTransformations ); - void WriteSolidFill( css::uno::Reference< css::beans::XPropertySet > rXPropSet ); - void WriteGradientFill( css::uno::Reference< css::beans::XPropertySet > rXPropSet ); + void WriteSolidFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet ); + void WriteGradientFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet ); void WriteGradientFill( css::awt::Gradient rGradient ); void WriteGrabBagGradientFill( const css::uno::Sequence< css::beans::PropertyValue >& aGradientStops, css::awt::Gradient rGradient); - void WriteBlipOrNormalFill( css::uno::Reference< css::beans::XPropertySet > rXPropSet, + void WriteBlipOrNormalFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& rURLPropName ); - void WriteBlipFill( css::uno::Reference< css::beans::XPropertySet > rXPropSet, + void WriteBlipFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& sBitmapURL, sal_Int32 nXmlNamespace, bool bWriteMode, bool bRelPathToMedia = false ); - void WriteBlipFill( css::uno::Reference< css::beans::XPropertySet > rXPropSet, + void WriteBlipFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& sURLPropName ); - void WriteBlipFill( css::uno::Reference< css::beans::XPropertySet > rXPropSet, + void WriteBlipFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& sURLPropName, sal_Int32 nXmlNamespace ); - void WritePattFill( css::uno::Reference< css::beans::XPropertySet > rXPropSet ); - void WriteSrcRect( css::uno::Reference< css::beans::XPropertySet >, const OUString& ); - void WriteOutline( css::uno::Reference< css::beans::XPropertySet > rXPropSet ); - void WriteStretch( css::uno::Reference< css::beans::XPropertySet > rXPropSet, const OUString& rURL ); + void WritePattFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet ); + void WriteSrcRect( const css::uno::Reference< css::beans::XPropertySet >&, const OUString& ); + void WriteOutline( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet ); + void WriteStretch( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& rURL ); void WriteLinespacing( css::style::LineSpacing& rLineSpacing ); - OUString WriteBlip( css::uno::Reference< css::beans::XPropertySet > rXPropSet, + OUString WriteBlip( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& rURL, bool bRelPathToMedia = false , const Graphic *pGraphic=nullptr ); - void WriteBlipMode( css::uno::Reference< css::beans::XPropertySet > rXPropSet, const OUString& rURL ); + void WriteBlipMode( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& rURL ); - void WriteShapeTransformation( css::uno::Reference< css::drawing::XShape > rXShape, + void WriteShapeTransformation( const css::uno::Reference< css::drawing::XShape >& rXShape, sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, bool bSuppressRotation = false ); void WriteTransformation( const Rectangle& rRectangle, sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, sal_Int32 nRotation = 0 ); - void WriteText( css::uno::Reference< css::uno::XInterface > rXIface, const OUString& presetWarp, bool bBodyPr = true, bool bText = true, sal_Int32 nXmlNamespace = 0); - void WriteParagraph( css::uno::Reference< css::text::XTextContent > rParagraph ); - void WriteParagraphProperties( css::uno::Reference< css::text::XTextContent > rParagraph ); - void WriteParagraphNumbering( css::uno::Reference< css::beans::XPropertySet > rXPropSet, + void WriteText( const css::uno::Reference< css::uno::XInterface >& rXIface, const OUString& presetWarp, bool bBodyPr = true, bool bText = true, sal_Int32 nXmlNamespace = 0); + void WriteParagraph( const css::uno::Reference< css::text::XTextContent >& rParagraph ); + void WriteParagraphProperties( const css::uno::Reference< css::text::XTextContent >& rParagraph ); + void WriteParagraphNumbering( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, sal_Int16 nLevel ); - void WriteRun( css::uno::Reference< css::text::XTextRange > rRun ); - void WriteRunProperties( css::uno::Reference< css::beans::XPropertySet > rRun, bool bIsField, sal_Int32 nElement = XML_rPr ,bool bCheckDirect = true); + void WriteRun( const css::uno::Reference< css::text::XTextRange >& rRun ); + void WriteRunProperties( const css::uno::Reference< css::beans::XPropertySet >& rRun, bool bIsField, sal_Int32 nElement = XML_rPr ,bool bCheckDirect = true); void WritePresetShape( const char* pShape ); void WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, const css::beans::PropertyValue& rProp ); - void WriteCustomGeometry( css::uno::Reference<css::drawing::XShape> rXShape ); + void WriteCustomGeometry( const css::uno::Reference<css::drawing::XShape>& rXShape ); void WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon ); - void WriteFill( css::uno::Reference< css::beans::XPropertySet > xPropSet ); - void WriteShapeStyle( css::uno::Reference< css::beans::XPropertySet > rXPropSet ); - void WriteShapeEffects( css::uno::Reference< css::beans::XPropertySet > rXPropSet ); + void WriteFill( const css::uno::Reference< css::beans::XPropertySet >& xPropSet ); + void WriteShapeStyle( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet ); + void WriteShapeEffects( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet ); void WriteShapeEffect( const OUString& sName, const css::uno::Sequence< css::beans::PropertyValue >& aEffectProps ); - void WriteShape3DEffects( css::uno::Reference< css::beans::XPropertySet > rXPropSet ); - void WriteArtisticEffect( css::uno::Reference< css::beans::XPropertySet > rXPropSet ); + void WriteShape3DEffects( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet ); + void WriteArtisticEffect( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet ); OString WriteWdpPicture( const OUString& rFileId, const css::uno::Sequence< sal_Int8 >& rPictureData ); - sal_Int32 getBulletMarginIndentation (css::uno::Reference< css::beans::XPropertySet > rXPropSet,sal_Int16 nLevel, const OUString& propName); + sal_Int32 getBulletMarginIndentation (const css::uno::Reference< css::beans::XPropertySet >& rXPropSet,sal_Int16 nLevel, const OUString& propName); static void ResetCounters(); diff --git a/include/oox/export/shapes.hxx b/include/oox/export/shapes.hxx index ab67def..b2cb828 100644 --- a/include/oox/export/shapes.hxx +++ b/include/oox/export/shapes.hxx @@ -80,7 +80,7 @@ private: struct ShapeHash { - size_t operator()( const css::uno::Reference < css::drawing::XShape > ) const; + size_t operator()( const css::uno::Reference < css::drawing::XShape >& ) const; }; public: @@ -89,7 +89,7 @@ public: protected: sal_Int32 mnShapeIdMax, mnPictureIdMax; - void WriteGraphicObjectShapePart( css::uno::Reference< css::drawing::XShape > xShape, const Graphic *pGraphic=nullptr ); + void WriteGraphicObjectShapePart( const css::uno::Reference< css::drawing::XShape >& xShape, const Graphic *pGraphic=nullptr ); private: sal_Int32 mnXmlNamespace; @@ -108,34 +108,34 @@ public: ShapeExport( sal_Int32 nXmlNamespace, ::sax_fastparser::FSHelperPtr pFS, ShapeHashMap* pShapeMap = nullptr, ::oox::core::XmlFilterBase* pFB = nullptr, DocumentType eDocumentType = DOCUMENT_PPTX, DMLTextExport* pTextExport = nullptr ); virtual ~ShapeExport() {} - void SetURLTranslator(std::shared_ptr<URLTransformer> pTransformer); + void SetURLTranslator(const std::shared_ptr<URLTransformer>& pTransformer); - static bool NonEmptyText( css::uno::Reference< css::uno::XInterface > xIface ); + static bool NonEmptyText( const css::uno::Reference< css::uno::XInterface >& xIface ); ShapeExport& - WriteBezierShape( css::uno::Reference< css::drawing::XShape > xShape, bool bClosed ); + WriteBezierShape( const css::uno::Reference< css::drawing::XShape >& xShape, bool bClosed ); ShapeExport& - WriteClosedBezierShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteClosedBezierShape( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteConnectorShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteConnectorShape( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteCustomShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteCustomShape( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteEllipseShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteEllipseShape( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteGraphicObjectShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteGraphicObjectShape( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteGroupShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteGroupShape( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteLineShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteLineShape( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteNonVisualDrawingProperties( css::uno::Reference< css::drawing::XShape > xShape, const char* sName ); + WriteNonVisualDrawingProperties( const css::uno::Reference< css::drawing::XShape >& xShape, const char* sName ); virtual ShapeExport& - WriteNonVisualProperties( css::uno::Reference< css::drawing::XShape > xShape ); + WriteNonVisualProperties( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteOpenBezierShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteOpenBezierShape( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteRectangleShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteRectangleShape( const css::uno::Reference< css::drawing::XShape >& xShape ); /** * Write the DrawingML for a particular shape. @@ -174,28 +174,28 @@ public: * @param xShape The shape to export as DrawingML. * @return <tt>*this</tt> */ - ShapeExport& WriteShape( css::uno::Reference< css::drawing::XShape > xShape ); - ShapeExport& WriteTextBox( css::uno::Reference< css::uno::XInterface > xIface, sal_Int32 nXmlNamespace ); + ShapeExport& WriteShape( const css::uno::Reference< css::drawing::XShape >& xShape ); + ShapeExport& WriteTextBox( const css::uno::Reference< css::uno::XInterface >& xIface, sal_Int32 nXmlNamespace ); virtual ShapeExport& - WriteTextShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteTextShape( const css::uno::Reference< css::drawing::XShape >& xShape ); ShapeExport& - WriteTableShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteTableShape( const css::uno::Reference< css::drawing::XShape >& xShape ); void WriteMathShape(css::uno::Reference<css::drawing::XShape> const& xShape); ShapeExport& - WriteOLE2Shape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteOLE2Shape( const css::uno::Reference< css::drawing::XShape >& xShape ); virtual ShapeExport& - WriteUnknownShape( css::uno::Reference< css::drawing::XShape > xShape ); + WriteUnknownShape( const css::uno::Reference< css::drawing::XShape >& xShape ); - void WriteTable( css::uno::Reference< css::drawing::XShape > rXShape ); + void WriteTable( const css::uno::Reference< css::drawing::XShape >& rXShape ); - void WriteTableCellProperties(css::uno::Reference< css::beans::XPropertySet > rXPropSet); + void WriteTableCellProperties(const css::uno::Reference< css::beans::XPropertySet >& rXPropSet); - void WriteTableCellBorders(css::uno::Reference< css::beans::XPropertySet > rXPropSet); + void WriteTableCellBorders(const css::uno::Reference< css::beans::XPropertySet >& rXPropSet); - sal_Int32 GetNewShapeID( const css::uno::Reference< css::drawing::XShape > rShape ); - sal_Int32 GetNewShapeID( const css::uno::Reference< css::drawing::XShape > rShape, ::oox::core::XmlFilterBase* pFB ); - sal_Int32 GetShapeID( const css::uno::Reference< css::drawing::XShape > rShape ); - static sal_Int32 GetShapeID( const css::uno::Reference< css::drawing::XShape > rShape, ShapeHashMap* pShapeMap ); + sal_Int32 GetNewShapeID( const css::uno::Reference< css::drawing::XShape >& rShape ); + sal_Int32 GetNewShapeID( const css::uno::Reference< css::drawing::XShape >& rShape, ::oox::core::XmlFilterBase* pFB ); + sal_Int32 GetShapeID( const css::uno::Reference< css::drawing::XShape >& rShape ); + static sal_Int32 GetShapeID( const css::uno::Reference< css::drawing::XShape >& rShape, ShapeHashMap* pShapeMap ); }; }} diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx index 7b4cb27..4855f51 100644 --- a/include/oox/export/vmlexport.hxx +++ b/include/oox/export/vmlexport.hxx @@ -87,7 +87,7 @@ public: ::sax_fastparser::FSHelperPtr GetFS() { return m_pSerializer; } - void SetFS(::sax_fastparser::FSHelperPtr pSerializer); + void SetFS(const ::sax_fastparser::FSHelperPtr& pSerializer); /// Export the sdr object as VML. /// diff --git a/include/oox/helper/grabbagstack.hxx b/include/oox/helper/grabbagstack.hxx index c7ba1b1..aba5af2 100644 --- a/include/oox/helper/grabbagstack.hxx +++ b/include/oox/helper/grabbagstack.hxx @@ -42,7 +42,7 @@ public: css::beans::PropertyValue getRootProperty(); ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits