diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-19 10:02:29 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-20 11:17:22 +0200 |
commit | 8d54796bf152499ecbe61788be64c9035f725dfa (patch) | |
tree | 9516219cf8e60bdd46597e522ca4e9fde9b8f407 | |
parent | e4740dbecfce958c2c707d8cc92e6dbe52f4b71b (diff) |
enhance pass-by-ref plugin to detect large arguments
Detect arguments larger than 64 chars passed by value.
Change-Id: I9b0ea9ccb99d115984a26eab67c9cf6afd5f6cae
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
75 files changed, 135 insertions, 127 deletions
diff --git a/bridges/inc/bridges/cpp_uno/shared/bridge.hxx b/bridges/inc/bridges/cpp_uno/shared/bridge.hxx index ba086598479e..e9f776500f10 100644 --- a/bridges/inc/bridges/cpp_uno/shared/bridge.hxx +++ b/bridges/inc/bridges/cpp_uno/shared/bridge.hxx @@ -78,7 +78,7 @@ public: private: Bridge(Bridge &); // not implemented - void operator =(Bridge); // not implemented + void operator =(const Bridge&); // not implemented Bridge( uno_ExtEnvironment * pCppEnv_, uno_ExtEnvironment * pUnoEnv_, diff --git a/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx b/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx index f6e50a9e9bbc..13330619c257 100644 --- a/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx +++ b/bridges/inc/bridges/cpp_uno/shared/cppinterfaceproxy.hxx @@ -67,7 +67,7 @@ public: private: CppInterfaceProxy(CppInterfaceProxy &); // not implemented - void operator =(CppInterfaceProxy); // not implemented + void operator =(const CppInterfaceProxy&); // not implemented CppInterfaceProxy( Bridge * pBridge_, uno_Interface * pUnoI_, diff --git a/bridges/inc/bridges/cpp_uno/shared/unointerfaceproxy.hxx b/bridges/inc/bridges/cpp_uno/shared/unointerfaceproxy.hxx index 7fac67110847..cb9fceeb64af 100644 --- a/bridges/inc/bridges/cpp_uno/shared/unointerfaceproxy.hxx +++ b/bridges/inc/bridges/cpp_uno/shared/unointerfaceproxy.hxx @@ -74,7 +74,7 @@ public: private: UnoInterfaceProxy(UnoInterfaceProxy &); // not implemented - void operator =(UnoInterfaceProxy); // not implemented + void operator =(const UnoInterfaceProxy&); // not implemented UnoInterfaceProxy( Bridge * pBridge_, com::sun::star::uno::XInterface * pCppI_, diff --git a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx index 7ff0e3492173..613358dc84e0 100644 --- a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx +++ b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx @@ -122,7 +122,7 @@ private: class BaseOffset; VtableFactory(VtableFactory &); // not implemented - void operator =(VtableFactory); // not implemented + void operator =(const VtableFactory&); // not implemented bool createBlock(Block &block, sal_Int32 slotCount) const; diff --git a/codemaker/source/cppumaker/includes.hxx b/codemaker/source/cppumaker/includes.hxx index a149dc568f89..0eb5ccaf8006 100644 --- a/codemaker/source/cppumaker/includes.hxx +++ b/codemaker/source/cppumaker/includes.hxx @@ -68,7 +68,7 @@ public: private: Includes(Includes &); // not implemented - void operator =(Includes); // not implemented; + void operator =(const Includes&); // not implemented; bool isInterfaceType(OString const & entityName) const; diff --git a/codemaker/source/javamaker/classfile.hxx b/codemaker/source/javamaker/classfile.hxx index 15465d0132c7..7b22d8279c16 100644 --- a/codemaker/source/javamaker/classfile.hxx +++ b/codemaker/source/javamaker/classfile.hxx @@ -131,7 +131,7 @@ public: private: Code(Code &); // not implemented - void operator =(Code); // not implemented + void operator =(const Code&); // not implemented Code(ClassFile & classFile); @@ -182,7 +182,7 @@ private: typedef std::map< rtl::OString, sal_uInt16 > Map; ClassFile(ClassFile &); // not implemented - void operator =(ClassFile); // not implemented + void operator =(const ClassFile&); // not implemented sal_uInt16 nextConstantPoolIndex(sal_uInt16 width); sal_uInt16 addUtf8Info(rtl::OString const & value); diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx index c4951e82ca7c..7ad891728238 100644 --- a/compilerplugins/clang/passstuffbyref.cxx +++ b/compilerplugins/clang/passstuffbyref.cxx @@ -8,6 +8,7 @@ */ #include <string> +#include <set> #include "plugin.hxx" @@ -46,27 +47,32 @@ bool PassStuffByRef::VisitFunctionDecl(const FunctionDecl * functionDecl) { continue; } string typeName = t1.getUnqualifiedType().getCanonicalType().getAsString(); - if (typeName == "class rtl::OUString") { - report( - DiagnosticsEngine::Warning, - "passing OUString by value, rather pass by reference .e.g. 'const OUString&'", - pvDecl->getSourceRange().getBegin()) - << pvDecl->getSourceRange(); + + bool bFound = false; + if (typeName == "class rtl::OUString" || + typeName == "class rtl::OString" || + typeName.find("class com::sun::star::uno::Sequence") == 0) { + bFound = true; } - else if (typeName == "class rtl::OString") { - report( - DiagnosticsEngine::Warning, - "passing OString by value, rather pass by reference .e.g. 'const OString&'", - pvDecl->getSourceRange().getBegin()) - << pvDecl->getSourceRange(); + + if (!bFound && !t1->isIncompleteType()) { + const clang::Type* type = t1.getTypePtrOrNull(); + if (type != nullptr) { + clang::CharUnits size = compiler.getASTContext().getTypeSizeInChars(type); + if (size.getQuantity() > 64) { + bFound = true; + } + } } - else if (typeName.find("class com::sun::star::uno::Sequence") == 0) { + + if (bFound) { report( DiagnosticsEngine::Warning, - "passing css::uno::Sequence by value, rather pass by reference .e.g. 'const css::uno::Sequence&' " + typeName, + "passing " + typeName + " by value, rather pass by reference .e.g. 'const " + typeName + "&'", pvDecl->getSourceRange().getBegin()) << pvDecl->getSourceRange(); } + } return true; } diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index 011c56cf4141..709e4ea3ebd6 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -62,7 +62,7 @@ public: void ShowParaControl(bool bCharOnly = false); void EnableTransparency(bool bColor, bool bGraphic); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; protected: virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE; diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index 762c316d6ec1..a8eb384753ff 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -51,7 +51,7 @@ public: virtual void Reset( const SfxItemSet& ) SAL_OVERRIDE; void HideShadowControls(); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; protected: virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 8d21e27b90a7..d90c2cb94594 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -165,7 +165,7 @@ public: void SetPreviewBackgroundToCharacter(); void DisableControls( sal_uInt16 nDisable ); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; // class SvxCharEffectsPage ---------------------------------------------- @@ -241,7 +241,7 @@ public: void EnableFlash(); /// the writer uses SID_ATTR_BRUSH as font background void SetPreviewBackgroundToCharacter(); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; // class SvxCharPositionPage --------------------------------------------- @@ -318,7 +318,7 @@ public: virtual void FillUserData() SAL_OVERRIDE; /// the writer uses SID_ATTR_BRUSH as font background void SetPreviewBackgroundToCharacter(); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; // class SvxCharTwoLinesPage --------------------------------------------- @@ -360,7 +360,7 @@ public: virtual bool FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE; /// the writer uses SID_ATTR_BRUSH as font background void SetPreviewBackgroundToCharacter(); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; #endif // INCLUDED_CUI_SOURCE_INC_CHARDLG_HXX diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx index 85d0e45f0bf3..b5763e941a9f 100644 --- a/cui/source/inc/connect.hxx +++ b/cui/source/inc/connect.hxx @@ -71,7 +71,7 @@ public: void Construct(); void SetView( const SdrView* pSdrView ) { pView = pSdrView; } - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; /* Derived from SfxSingleTabDialog, in order to be informed about diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index b39c01375b83..4358fc457a21 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -173,7 +173,7 @@ public: void SetPageType(sal_uInt16 nInType) { nPageType = nInType; } void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; } - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; /************************************************************************/ @@ -312,7 +312,7 @@ public: void SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; } void SetPos( sal_uInt16 nInPos ) { nPos = nInPos; } void SetAreaTP( bool* pIn ) { pbAreaTP = pIn; } - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; void SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; } void SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; } void SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; } @@ -371,7 +371,7 @@ public: void SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; } void SetAreaTP( bool* pIn ) { pbAreaTP = pIn; } void SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; } - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; void DisablePage( bool bIn ) { bDisable = bIn; } }; diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index a1a28627a855..7384ec32b137 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -234,7 +234,7 @@ public: void SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; } void SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; } - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; }; diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx index 3ccba230f07e..a7a8cf94f8f5 100644 --- a/cui/source/inc/macroass.hxx +++ b/cui/source/inc/macroass.hxx @@ -64,7 +64,7 @@ public: void SetMacroTbl( const SvxMacroTableDtor& rTbl ); virtual void ScriptChanged(); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated (const SfxAllItemSet& aSet) SAL_OVERRIDE; using TabPage::ActivatePage; // FIXME WTF is this nonsense? virtual void ActivatePage( const SfxItemSet& ) SAL_OVERRIDE; void LaunchFillGroup(); diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx index f8ce64198639..e8fb79426b74 100644 --- a/cui/source/inc/measure.hxx +++ b/cui/source/inc/measure.hxx @@ -77,7 +77,7 @@ public: void Construct(); void SetView( const SdrView* pSdrView ) { pView = pSdrView; } - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx index 419ea6c98964..bb7bbe82e605 100644 --- a/cui/source/inc/numfmt.hxx +++ b/cui/source/inc/numfmt.hxx @@ -85,7 +85,7 @@ public: void SetOkHdl( const Link& rOkHandler ); void HideLanguage(bool nFlag=true); virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; private: SvxNumberFormatTabPage( Window* pParent, const SfxItemSet& rCoreAttrs ); diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index b4e46aaea77c..5e115fde8a63 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -155,7 +155,7 @@ class SvxBulletPickTabPage : public SfxTabPage virtual void Reset( const SfxItemSet& rSet ) SAL_OVERRIDE; void SetCharFmtName(const OUString& rName){sBulletCharFmtName = rName;} - virtual void PageCreated(SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; #define NUM_VALUSET_COUNT 16 @@ -200,7 +200,7 @@ class SvxNumPickTabPage : public SfxTabPage void SetCharFmtNames(const OUString& rCharName, const OUString& rBulName) { sNumCharFmtName = rCharName; sBulletCharFmtName = rBulName;} - virtual void PageCreated(SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; @@ -363,7 +363,7 @@ class SvxNumOptionsTabPage : public SfxTabPage ListBox& GetCharFmtListBox() {return *m_pCharFmtLB;} void SetModified(bool bRepaint = true); - virtual void PageCreated(SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; /** Get the numberings provided by the i18n framework (CTL, Asian, ...) and add them to the listbox. Extended numbering schemes present in the @@ -459,7 +459,7 @@ public: void SetMetric(FieldUnit eSet); void SetModified(bool bRepaint = true); - virtual void PageCreated(SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; #endif diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index ff4a3c315592..56b7bef96783 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -191,7 +191,7 @@ public: { ePaperStart = eStart, ePaperEnd = eEnd; } void SetCollectionList(const std::vector<OUString> &aList); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; #endif // INCLUDED_CUI_SOURCE_INC_PAGE_HXX diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index afa569ae448c..81dc3919eb5d 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -113,7 +113,7 @@ public: void EnableAutoFirstLine(); void EnableAbsLineDist(long nMinTwip); void EnableNegativeMode(); - virtual void PageCreated(SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; virtual ~SvxStdParagraphTabPage(); }; @@ -167,7 +167,7 @@ public: virtual void Reset( const SfxItemSet& rSet ) SAL_OVERRIDE; void EnableJustifyExt(); - virtual void PageCreated(SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; // class SvxExtParagraphTabPage ------------------------------------------ @@ -252,7 +252,7 @@ private: DECL_LINK( PageBreakPosHdl_Impl, ListBox* ); DECL_LINK( PageBreakTypeHdl_Impl, ListBox* ); - virtual void PageCreated(SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx index 31b3e3db664f..2f8a384039fb 100644 --- a/cui/source/inc/tabstpge.hxx +++ b/cui/source/inc/tabstpge.hxx @@ -117,7 +117,7 @@ private: DECL_LINK( GetFillCharHdl_Impl, Edit* ); DECL_LINK( GetDezCharHdl_Impl, Edit* ); - virtual void PageCreated(SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; #endif // INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx index 18c3b4aeaada..24c360595956 100644 --- a/cui/source/inc/textattr.hxx +++ b/cui/source/inc/textattr.hxx @@ -87,7 +87,7 @@ public: void Construct(); void SetView( const SdrView* pSdrView ) { pView = pSdrView; } - virtual void PageCreated(SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; #endif // INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 110fc148254c..374f79dc19b2 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1832,7 +1832,7 @@ void SvxBackgroundTabPage::EnableTransparency(bool bColor, bool bGraphic) m_pColTransMF->Show(bColor); } -void SvxBackgroundTabPage::PageCreated (SfxAllItemSet aSet) +void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,false); diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index bf03f68796a3..476b7b3e5b40 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -1193,7 +1193,7 @@ void SvxBorderTabPage::DataChanged( const DataChangedEvent& rDCEvt ) SfxTabPage::DataChanged( rDCEvt ); } -void SvxBorderTabPage::PageCreated (SfxAllItemSet aSet) +void SvxBorderTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pSWModeItem,SfxUInt16Item,SID_SWMODE_TYPE,false); SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,false); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 10ff5977e639..1f0e585609f4 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1265,7 +1265,7 @@ void SvxCharNamePage::SetPreviewBackgroundToCharacter() } -void SvxCharNamePage::PageCreated (SfxAllItemSet aSet) +void SvxCharNamePage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pFontListItem,SvxFontListItem,SID_ATTR_CHAR_FONTLIST,false); SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,false); @@ -2518,7 +2518,7 @@ void SvxCharEffectsPage::SetPreviewBackgroundToCharacter() } -void SvxCharEffectsPage::PageCreated (SfxAllItemSet aSet) +void SvxCharEffectsPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pDisableCtlItem,SfxUInt16Item,SID_DISABLE_CTL,false); SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,false); @@ -3289,7 +3289,7 @@ void SvxCharPositionPage::SetPreviewBackgroundToCharacter() m_bPreviewBackgroundToCharacter = true; } -void SvxCharPositionPage::PageCreated (SfxAllItemSet aSet) +void SvxCharPositionPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,false); if (pFlagItem) @@ -3533,7 +3533,7 @@ void SvxCharTwoLinesPage::SetPreviewBackgroundToCharacter() } -void SvxCharTwoLinesPage::PageCreated (SfxAllItemSet aSet) +void SvxCharTwoLinesPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,false); if (pFlagItem) diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index 8b32636848d4..dbc40966f05e 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -508,7 +508,7 @@ void SvxConnectionPage::FillTypeLB() } } } -void SvxConnectionPage::PageCreated (SfxAllItemSet aSet) +void SvxConnectionPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG(&aSet,pOfaPtrItem,OfaPtrItem,SID_OBJECT_LIST,false); if (pOfaPtrItem) diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 159389d57f38..cc180d67f4ba 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -209,7 +209,7 @@ void _SfxMacroTabPage::ActivatePage( const SfxItemSet& ) LaunchFillGroup(); } -void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) +void _SfxMacroTabPage::PageCreated(const SfxAllItemSet& aSet) { const SfxPoolItem* pEventsItem; if( !mpImpl->bGotEvents && SFX_ITEM_SET == aSet.GetItemState( SID_EVENTCONFIG, true, &pEventsItem ) ) diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 853fe8f0582f..61b2baac7a26 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -808,7 +808,7 @@ void SvxMeasurePage::FillUnitLB() m_pLbUnit->SetEntryData( nPos, (void*)nUnit ); } } -void SvxMeasurePage::PageCreated (SfxAllItemSet aSet) +void SvxMeasurePage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pOfaPtrItem,OfaPtrItem,SID_OBJECT_LIST,false); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index bd2eb9906f72..76a7743f29e7 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -1720,7 +1720,7 @@ void SvxNumberFormatTabPage::AddAutomaticLanguage_Impl(LanguageType eAutoLang, b m_pLbLanguage->SelectEntryPos(nPos); } -void SvxNumberFormatTabPage::PageCreated (SfxAllItemSet aSet) +void SvxNumberFormatTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pNumberInfoItem,SvxNumberInfoItem,SID_ATTR_NUMBERFORMAT_INFO,false); SFX_ITEMSET_ARG (&aSet,pLinkItem,SfxLinkItem,SID_LINK_TYPE,false); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 826e60061e51..70911201f7d5 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -512,7 +512,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, DoubleClickHdl_Impl) } -void SvxBulletPickTabPage::PageCreated(SfxAllItemSet aSet) +void SvxBulletPickTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pBulletCharFmt,SfxStringItem,SID_BULLET_CHAR_FMT,false); @@ -762,7 +762,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, DoubleClickHdl_Impl) return 0; } -void SvxNumPickTabPage::PageCreated(SfxAllItemSet aSet) +void SvxNumPickTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pNumCharFmt,SfxStringItem,SID_NUM_CHAR_FMT,false); SFX_ITEMSET_ARG (&aSet,pBulletCharFmt,SfxStringItem,SID_BULLET_CHAR_FMT,false); @@ -3492,7 +3492,7 @@ void SvxNumOptionsTabPage::SetModified(bool bRepaint) } } -void SvxNumOptionsTabPage::PageCreated(SfxAllItemSet aSet) +void SvxNumOptionsTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pListItem,SfxStringListItem,SID_CHAR_FMT_LIST_BOX,false); SFX_ITEMSET_ARG (&aSet,pNumCharFmt,SfxStringItem,SID_NUM_CHAR_FMT,false); @@ -3514,7 +3514,7 @@ void SvxNumOptionsTabPage::PageCreated(SfxAllItemSet aSet) SetMetric(static_cast<FieldUnit>(pMetricItem->GetValue())); } -void SvxNumPositionTabPage::PageCreated(SfxAllItemSet aSet) +void SvxNumPositionTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pMetricItem,SfxAllEnumItem,SID_METRIC_ITEM,false); diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index fbc24a7d7176..9622108e51a1 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -1672,7 +1672,7 @@ bool SvxPageDescPage::IsMarginOutOfRange() return bRet; } -void SvxPageDescPage::PageCreated (SfxAllItemSet aSet) +void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pModeItem,SfxAllEnumItem,SID_ENUM_PAGE_MODE,false); SFX_ITEMSET_ARG (&aSet,pPaperStartItem,SfxAllEnumItem,SID_PAPER_START,false); diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 271065b76fe4..6dba191153fc 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -915,7 +915,7 @@ void SvxStdParagraphTabPage::EnableAbsLineDist(long nMinTwip) nMinFixDist = nMinTwip; } -void SvxStdParagraphTabPage::PageCreated(SfxAllItemSet aSet) +void SvxStdParagraphTabPage::PageCreated(const SfxAllItemSet& aSet) { /* different bit represent call to different method of SvxStdParagraphTabPage @@ -1310,7 +1310,7 @@ void SvxParaAlignTabPage::EnableJustifyExt() } -void SvxParaAlignTabPage::PageCreated (SfxAllItemSet aSet) +void SvxParaAlignTabPage::PageCreated (const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pBoolItem,SfxBoolItem,SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,false); if (pBoolItem) @@ -2104,7 +2104,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakTypeHdl_Impl, ListBox *, pListBox ) return 0; } -void SvxExtParagraphTabPage::PageCreated(SfxAllItemSet aSet) +void SvxExtParagraphTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pDisablePageBreakItem,SfxBoolItem,SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,false); diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 0e990637db30..32896237893b 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -724,7 +724,7 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, ModifyHdl_Impl) return 0; } -void SvxTabulatorTabPage::PageCreated(SfxAllItemSet aSet) +void SvxTabulatorTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pControlItem,SfxUInt16Item,SID_SVXTABULATORTABPAGE_CONTROLFLAGS,false); if (pControlItem) diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index aa5bf41a3114..f349198f8ac4 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -699,7 +699,7 @@ bool SvxTextAttrPage::IsTextDirectionLeftToRight (void) const return bLeftToRightDirection; } -void SvxTextAttrPage::PageCreated(SfxAllItemSet aSet) +void SvxTextAttrPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pViewItem,OfaPtrItem,SID_SVXTEXTATTRPAGE_VIEW,false); diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index b927c39eef55..eb0add42eb74 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -560,7 +560,7 @@ void SvxTransparenceTabPage::InvalidatePreview (bool bEnable) } } -void SvxTransparenceTabPage::PageCreated (SfxAllItemSet aSet) +void SvxTransparenceTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,false); SFX_ITEMSET_ARG (&aSet,pDlgTypeItem,SfxUInt16Item,SID_DLG_TYPE,false); @@ -2374,7 +2374,7 @@ void SvxAreaTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt ) ModifyTileHdl_Impl( pWindow ); } -void SvxAreaTabPage::PageCreated (SfxAllItemSet aSet) +void SvxAreaTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pColorListItem,SvxColorListItem,SID_COLOR_TABLE,false); SFX_ITEMSET_ARG (&aSet,pGradientListItem,SvxGradientListItem,SID_GRADIENT_LIST,false); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 536595696dd0..d6878cd78e23 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -1821,7 +1821,7 @@ void SvxLineTabPage::DataChanged( const DataChangedEvent& rDCEvt ) } } -void SvxLineTabPage::PageCreated (SfxAllItemSet aSet) +void SvxLineTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pColorListItem,SvxColorListItem,SID_COLOR_TABLE,false); SFX_ITEMSET_ARG (&aSet,pDashListItem,SvxDashListItem,SID_DASH_LIST,false); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 161d576d4d7d..15c58c1c29d4 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -541,7 +541,7 @@ void SvxShadowTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt ) ModifyShadowHdl_Impl( pWindow ); } -void SvxShadowTabPage::PageCreated (SfxAllItemSet aSet) +void SvxShadowTabPage::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pColorListItem,SvxColorListItem,SID_COLOR_TABLE,false); SFX_ITEMSET_ARG (&aSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,false); diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index 1411a8d029a3..4fd318180eef 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -324,7 +324,7 @@ void OTableEditorInsNewUndoAct::Redo() } // class OPrimKeyUndoAct -OPrimKeyUndoAct::OPrimKeyUndoAct( OTableEditorCtrl* pOwner, MultiSelection aDeletedKeys, MultiSelection aInsertedKeys) : +OPrimKeyUndoAct::OPrimKeyUndoAct( OTableEditorCtrl* pOwner, const MultiSelection& aDeletedKeys, const MultiSelection& aInsertedKeys) : OTableEditorUndoAct( pOwner ,STR_TABLEDESIGN_UNDO_PRIMKEY) ,m_aDelKeys( aDeletedKeys ) ,m_aInsKeys( aInsertedKeys ) diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx index 38bf92834ba8..d16e55272fbd 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.hxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx @@ -142,7 +142,7 @@ namespace dbaui virtual void Redo() SAL_OVERRIDE; public: TYPEINFO_OVERRIDE(); - OPrimKeyUndoAct( OTableEditorCtrl* pOwner, MultiSelection aDeletedKeys, MultiSelection aInsertedKeys ); + OPrimKeyUndoAct( OTableEditorCtrl* pOwner, const MultiSelection& aDeletedKeys, const MultiSelection& aInsertedKeys ); virtual ~OPrimKeyUndoAct(); }; } diff --git a/include/codemaker/exceptiontree.hxx b/include/codemaker/exceptiontree.hxx index f689b882844c..ab395c68be17 100644 --- a/include/codemaker/exceptiontree.hxx +++ b/include/codemaker/exceptiontree.hxx @@ -108,7 +108,7 @@ public: private: ExceptionTree(ExceptionTree &); // not implemented - void operator =(ExceptionTree); // not implemented + void operator =(const ExceptionTree&); // not implemented ExceptionTreeNode m_root; }; diff --git a/include/codemaker/generatedtypeset.hxx b/include/codemaker/generatedtypeset.hxx index f3c7b9235b8e..ee27e6f71ec4 100644 --- a/include/codemaker/generatedtypeset.hxx +++ b/include/codemaker/generatedtypeset.hxx @@ -61,7 +61,7 @@ public: private: GeneratedTypeSet(GeneratedTypeSet &); // not implemented - void operator =(GeneratedTypeSet); // not implemented + void operator =(const GeneratedTypeSet&); // not implemented boost::unordered_set< OString, OStringHash > m_set; }; diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 0711fb6e9464..98dfeddd87b9 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -284,7 +284,7 @@ public: OUString GetUserData() { return aUserString; } virtual void FillUserData(); virtual bool IsReadOnly() const; - virtual void PageCreated (SfxAllItemSet aSet); + virtual void PageCreated (const SfxAllItemSet& aSet); static const SfxPoolItem* GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot, bool bDeep = true ); void SetFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame); diff --git a/include/tools/resmgr.hxx b/include/tools/resmgr.hxx index b25cc0a2c8c1..7a492285b03f 100644 --- a/include/tools/resmgr.hxx +++ b/include/tools/resmgr.hxx @@ -134,8 +134,8 @@ public: /// Language-dependent resource library static ResMgr* SearchCreateResMgr( const sal_Char* pPrefixName, LanguageTag& rLocale ); - static ResMgr* CreateResMgr( const sal_Char* pPrefixName, - LanguageTag aLocale = LanguageTag( LANGUAGE_SYSTEM) ); + static ResMgr* CreateResMgr( const sal_Char* pPrefixName, + const LanguageTag& aLocale = LanguageTag( LANGUAGE_SYSTEM) ); #ifdef DBG_UTIL /// Test whether resource still exists diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 04b18776ab07..0c185253e461 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1360,7 +1360,7 @@ private: const Size& rSrcSizePixel ); SAL_DLLPRIVATE Bitmap BlendBitmap( - Bitmap aBmp, + Bitmap& aBmp, BitmapReadAccess* pP, BitmapReadAccess* pA, const sal_Int32 nOffY, @@ -1375,7 +1375,7 @@ private: const long* pMapY ); SAL_DLLPRIVATE Bitmap BlendBitmapWithAlpha( - Bitmap aBmp, + Bitmap& aBmp, BitmapReadAccess* pP, BitmapReadAccess* pA, const Rectangle& aDstRect, diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index fb49bf7e53a2..421205650886 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -499,7 +499,7 @@ public: * update script types on demand if they have not been determined. */ sal_uInt8 GetRangeScriptType( sc::CellTextAttrStoreType::iterator& itPos, SCROW nRow1, SCROW nRow2, - sc::CellStoreType::iterator itr); + const sc::CellStoreType::iterator& itr); void SetScriptType( SCROW nRow, sal_uInt8 nType ); void UpdateScriptTypes( SCROW nRow1, SCROW nRow2 ); @@ -611,7 +611,7 @@ private: void ActivateNewFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell, bool bJoin = true ); void AttachNewFormulaCells( const sc::CellStoreType::position_type& aPos, size_t nLength ); void BroadcastNewCell( SCROW nRow ); - bool UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, sc::CellStoreType::iterator& itr ); + bool UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, const sc::CellStoreType::iterator& itr ); const ScFormulaCell* FetchFormulaCell( SCROW nRow ) const; diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index f4e00c6614c6..485f5e8d8634 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2874,7 +2874,7 @@ class FindEditCellsHandler public: FindEditCellsHandler(ScColumn& rColumn, sc::CellTextAttrStoreType& rAttrs, - sc::CellStoreType::iterator rCellItr) : + const sc::CellStoreType::iterator& rCellItr) : mrColumn(rColumn), miAttrPos(rAttrs.begin()), miCellPos(rCellItr) {} bool operator() (size_t, const EditTextObject*) diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index d6019bed5f30..7e5a4a67ca3e 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1830,7 +1830,7 @@ sal_uInt8 ScColumn::GetScriptType( SCROW nRow ) const } sal_uInt8 ScColumn::GetRangeScriptType( - sc::CellTextAttrStoreType::iterator& itPos, SCROW nRow1, SCROW nRow2, sc::CellStoreType::iterator itrCells ) + sc::CellTextAttrStoreType::iterator& itPos, SCROW nRow1, SCROW nRow2, const sc::CellStoreType::iterator& itrCells ) { if (!ValidRow(nRow1) || !ValidRow(nRow2) || nRow1 > nRow2) return 0; @@ -2183,7 +2183,7 @@ namespace { template<typename _Blk> void getBlockIterators( - sc::CellStoreType::iterator it, size_t& rLenRemain, + const sc::CellStoreType::iterator& it, size_t& rLenRemain, typename _Blk::iterator& rData, typename _Blk::iterator& rDataEnd ) { rData = _Blk::begin(*it->data); @@ -2203,14 +2203,14 @@ void getBlockIterators( bool appendToBlock( ScDocument* pDoc, sc::FormulaGroupContext& rCxt, sc::FormulaGroupContext::ColArray& rColArray, - size_t nPos, size_t nArrayLen, sc::CellStoreType::iterator it, const sc::CellStoreType::iterator& itEnd ) + size_t nPos, size_t nArrayLen, const sc::CellStoreType::iterator& _it, const sc::CellStoreType::iterator& itEnd ) { svl::SharedStringPool& rPool = pDoc->GetSharedStringPool(); size_t nLenRemain = nArrayLen - nPos; double fNan; rtl::math::setNan(&fNan); - for (; it != itEnd; ++it) + for (sc::CellStoreType::iterator it = _it; it != itEnd; ++it) { switch (it->type) { @@ -2343,7 +2343,7 @@ void copyFirstStringBlock( sc::FormulaGroupContext::ColArray* copyFirstFormulaBlock( - sc::FormulaGroupContext& rCxt, sc::CellStoreType::iterator itBlk, size_t nArrayLen, + sc::FormulaGroupContext& rCxt, const sc::CellStoreType::iterator& itBlk, size_t nArrayLen, SCTAB nTab, SCCOL nCol ) { double fNan; diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index e8769823ea40..3d447d121289 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -520,7 +520,7 @@ void ScColumn::BroadcastNewCell( SCROW nRow ) Broadcast(nRow); } -bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, sc::CellStoreType::iterator& itr ) +bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, const sc::CellStoreType::iterator& itr ) { if (rAttr.mnScriptType != SC_SCRIPTTYPE_UNKNOWN) // Already updated. Nothing to do. @@ -533,9 +533,9 @@ bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, sc::CellSt return false; sc::CellStoreType::position_type pos = maCells.position(itr, nRow); - itr = pos.first; + sc::CellStoreType::iterator itr2 = pos.first; size_t nOffset = pos.second; - ScRefCellValue aCell = GetCellValue( itr, nOffset ); + ScRefCellValue aCell = GetCellValue( itr2, nOffset ); ScAddress aPos(nCol, nRow, nTab); const SfxItemSet* pCondSet = NULL; diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx index d779f67fe422..ca9de2431425 100644 --- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx +++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx @@ -30,7 +30,7 @@ namespace { void lclWriteCorrelationFormulas( AddressWalkerWriter& aOutput, FormulaTemplate& aTemplate, - ScRangeList aRangeList, const OUString& aTemplateString) + const ScRangeList& aRangeList, const OUString& aTemplateString) { for (size_t i = 0; i < aRangeList.size(); i++) { diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx index c39302bb38af..51b9541dabc7 100644 --- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx +++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx @@ -64,7 +64,7 @@ void FormulaTemplate::applyRange(const OUString& aVariable, ScRange aRange) mTemplate = mTemplate.replaceAll(aVariable, aString); } -void FormulaTemplate::applyRangeList(const OUString& aVariable, ScRangeList aRangeList) +void FormulaTemplate::applyRangeList(const OUString& aVariable, const ScRangeList& aRangeList) { OUString aString; aRangeList.Format(aString, SCR_ABS, mDocument); diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx index 17f12234f785..853fa5ad3a50 100644 --- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx +++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx @@ -45,7 +45,7 @@ public: void autoReplaceAddress(const OUString& aVariable, ScAddress aAddress); void applyRange(const OUString& aVariable, ScRange aRange); - void applyRangeList(const OUString& aVariable, ScRangeList aRangeList); + void applyRangeList(const OUString& aVariable, const ScRangeList& aRangeList); void applyAddress(const OUString& aVariable, ScAddress aAddress); void applyString(const OUString& aVariable, const OUString& aValue); void applyNumber(const OUString& aVariable, sal_Int32 aValue); diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx index 098b9101c733..2b262a642fe6 100644 --- a/sc/source/ui/inc/namedefdlg.hxx +++ b/sc/source/ui/inc/namedefdlg.hxx @@ -74,7 +74,7 @@ protected: public: ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, - ScViewData* pViewData, std::map<OUString, ScRangeName*> aRangeMap, + ScViewData* pViewData, const std::map<OUString, ScRangeName*>& aRangeMap, const ScAddress& aCursorPos, const bool bUndo); virtual ~ScNameDefDlg() {}; diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx index 83ed95ee9672..3ab5d2fa9b61 100644 --- a/sc/source/ui/namedlg/namedefdlg.cxx +++ b/sc/source/ui/namedlg/namedefdlg.cxx @@ -33,7 +33,7 @@ #define ABS_DREF3D ABS_DREF | SCA_TAB_3D ScNameDefDlg::ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, - ScViewData* pViewData, std::map<OUString, ScRangeName*> aRangeMap, + ScViewData* pViewData, const std::map<OUString, ScRangeName*>& aRangeMap, const ScAddress& aCursorPos, const bool bUndo ) : ScAnyRefDlg( pB, pCW, pParent, "DefineNameDialog", "modules/scalc/ui/definename.ui" ) , diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx index 50b41a220852..eaf7233563a7 100644 --- a/sd/source/ui/dlg/prntopts.cxx +++ b/sd/source/ui/dlg/prntopts.cxx @@ -235,7 +235,7 @@ void SdPrintOptions::SetDrawMode() } } -void SdPrintOptions::PageCreated (SfxAllItemSet +void SdPrintOptions::PageCreated (const SfxAllItemSet& #ifdef MACOSX aSet #endif diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index c8775db4fbd5..bf80be0d46da 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -649,7 +649,7 @@ void SdTpOptionsMisc::UpdateCompatibilityControls (void) m_pCbxUsePrinterMetrics->Enable (bIsEnabled); } -void SdTpOptionsMisc::PageCreated (SfxAllItemSet aSet) +void SdTpOptionsMisc::PageCreated(const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_SDMODE_FLAG,false); if (pFlagItem) diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx index 17ec12f4b3cf..0de3e9c62ca5 100644 --- a/sd/source/ui/inc/prntopts.hxx +++ b/sd/source/ui/inc/prntopts.hxx @@ -69,8 +69,8 @@ public: virtual bool FillItemSet( SfxItemSet& ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE; - void SetDrawMode(); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + void SetDrawMode(); + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx index f2ede261aeb8..cfc9d9ebbb0d 100644 --- a/sd/source/ui/inc/tpoption.hxx +++ b/sd/source/ui/inc/tpoption.hxx @@ -149,7 +149,7 @@ public: <member>SetDrawMode()</member> method more than once. */ void SetImpressMode (void); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; using TabPage::ActivatePage; using TabPage::DeactivatePage; diff --git a/sfx2/source/appl/imestatuswindow.hxx b/sfx2/source/appl/imestatuswindow.hxx index 7d7428f4cbe2..116812defaee 100644 --- a/sfx2/source/appl/imestatuswindow.hxx +++ b/sfx2/source/appl/imestatuswindow.hxx @@ -89,7 +89,7 @@ public: private: ImeStatusWindow(ImeStatusWindow &); // not implemented - void operator =(ImeStatusWindow); // not implemented + void operator =(const ImeStatusWindow&); // not implemented virtual ~ImeStatusWindow(); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 2f2c6f91d301..7cdc84401841 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -321,7 +321,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet, return pItem; } -void SfxTabPage::PageCreated( SfxAllItemSet /*aSet*/ ) +void SfxTabPage::PageCreated( const SfxAllItemSet& /*aSet*/ ) { DBG_ASSERT(false, "SfxTabPage::PageCreated should not be called"); } diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index 2df3af1bbf1e..53fa381747d5 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -621,7 +621,7 @@ void ResourceManager::StorePanelExpansionState ( void ResourceManager::GetToolPanelNodeNames ( ::std::vector<OUString>& rMatchingNames, - const ::utl::OConfigurationTreeRoot aRoot) const + const ::utl::OConfigurationTreeRoot& aRoot) const { Sequence<OUString> aChildNodeNames (aRoot.getNodeNames()); const sal_Int32 nCount (aChildNodeNames.getLength()); diff --git a/sfx2/source/sidebar/ResourceManager.hxx b/sfx2/source/sidebar/ResourceManager.hxx index 9ec6e1f0dbf3..7ce2a02e0695 100644 --- a/sfx2/source/sidebar/ResourceManager.hxx +++ b/sfx2/source/sidebar/ResourceManager.hxx @@ -119,7 +119,7 @@ private: const ::rtl::OUString& rsModuleName) const; void GetToolPanelNodeNames ( ::std::vector<rtl::OUString>& rMatchingNames, - const ::utl::OConfigurationTreeRoot aRoot) const; + const ::utl::OConfigurationTreeRoot& aRoot) const; bool IsDeckEnabled ( const ::rtl::OUString& rsDeckId, const Context& rContext, diff --git a/stoc/source/javavm/interact.hxx b/stoc/source/javavm/interact.hxx index da4aa2d6a154..af1658a9ef54 100644 --- a/stoc/source/javavm/interact.hxx +++ b/stoc/source/javavm/interact.hxx @@ -52,7 +52,7 @@ private: class RetryContinuation; InteractionRequest(InteractionRequest &); // not implemented - void operator =(InteractionRequest); // not implemented + void operator =(const InteractionRequest&); // not implemented virtual ~InteractionRequest(); diff --git a/stoc/source/javavm/javavm.hxx b/stoc/source/javavm/javavm.hxx index 63683945b416..f665b0b09c62 100644 --- a/stoc/source/javavm/javavm.hxx +++ b/stoc/source/javavm/javavm.hxx @@ -122,7 +122,7 @@ public: private: JavaVirtualMachine(JavaVirtualMachine &); // not implemented - void operator =(JavaVirtualMachine); // not implemented + void operator =(const JavaVirtualMachine&); // not implemented virtual ~JavaVirtualMachine(); diff --git a/sw/source/core/uibase/inc/optpage.hxx b/sw/source/core/uibase/inc/optpage.hxx index ddf79b070474..42bd08e77603 100644 --- a/sw/source/core/uibase/inc/optpage.hxx +++ b/sw/source/core/uibase/inc/optpage.hxx @@ -131,7 +131,7 @@ public: void SetFax( const std::vector<OUString>& ); void SelectFax( const OUString& ); void SetPreview(bool bPrev); - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated( const SfxAllItemSet& aSet) SAL_OVERRIDE; }; @@ -202,7 +202,7 @@ public: virtual void Reset( const SfxItemSet& rSet ) SAL_OVERRIDE; void SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;} - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated( const SfxAllItemSet& aSet ) SAL_OVERRIDE; }; class SwTableOptionsTabPage : public SfxTabPage @@ -244,7 +244,7 @@ public: virtual void Reset( const SfxItemSet& rSet ) SAL_OVERRIDE; void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;} - virtual void PageCreated (SfxAllItemSet aSet) SAL_OVERRIDE; + virtual void PageCreated( const SfxAllItemSet& aSet) SAL_OVERRIDE; }; @@ -290,7 +290,7 @@ public: virtual void Reset( const SfxItemSet& rSet ) SAL_OVERRIDE; void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; } - virtual void PageCreated( SfxAllItemSet aSet ) SAL_OVERRIDE; + virtual void PageCreated( const SfxAllItemSet& aSet ) SAL_OVERRIDE; }; /*----------------------------------------------------------------------- diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 6199f3c56db7..097e31aa53b1 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -488,7 +488,7 @@ IMPL_LINK_NOARG_INLINE_START(SwAddPrinterTabPage, SelectHdl) } IMPL_LINK_NOARG_INLINE_END(SwAddPrinterTabPage, SelectHdl) -void SwAddPrinterTabPage::PageCreated (SfxAllItemSet aSet) +void SwAddPrinterTabPage::PageCreated( const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pListItem,SfxBoolItem,SID_FAX_LIST,false); SFX_ITEMSET_ARG (&aSet,pPreviewItem,SfxBoolItem,SID_PREVIEWFLAG_TYPE,false); @@ -1058,7 +1058,7 @@ IMPL_LINK( SwStdFontTabPage, LoseFocusHdl, ComboBox*, pBox ) return 0; } -void SwStdFontTabPage::PageCreated (SfxAllItemSet aSet) +void SwStdFontTabPage::PageCreated( const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt16Item, SID_FONTMODE_TYPE, false); if (pFlagItem) @@ -1256,7 +1256,7 @@ IMPL_LINK_NOARG(SwTableOptionsTabPage, CheckBoxHdl) return 0; } -void SwTableOptionsTabPage::PageCreated (SfxAllItemSet aSet) +void SwTableOptionsTabPage::PageCreated( const SfxAllItemSet& aSet) { SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,false); if (pWrtSh) @@ -1334,7 +1334,7 @@ SfxTabPage* SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet& return new SwShdwCrsrOptionsTabPage( pParent, rSet ); } -void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet ) +void SwShdwCrsrOptionsTabPage::PageCreated( const SfxAllItemSet& aSet ) { SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,false); if (pWrtSh) diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 55610d82d7c6..7de0a56f6b4b 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -1329,12 +1329,13 @@ ResMgr* ResMgr::CreateFallbackResMgr( const ResId& rId, const Resource* pResourc } ResMgr* ResMgr::CreateResMgr( const sal_Char* pPrefixName, - LanguageTag aLocale ) + const LanguageTag& _aLocale ) { osl::Guard<osl::Mutex> aGuard( getResMgrMutex() ); OUString aPrefix( pPrefixName, strlen( pPrefixName ), osl_getThreadTextEncoding() ); + LanguageTag aLocale = _aLocale; if( aLocale.isSystemLocale() ) aLocale = ResMgrContainer::get().getDefLocale(); diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index bc9dba17c114..594f8ae38898 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -111,7 +111,7 @@ std::vector<OUString> getContents(OUString const & url) { } } -OUString getCasePreservingUrl(INetURLObject url) { +OUString getCasePreservingUrl(const INetURLObject& url) { return content(url).executeCommand( OUString("getCasePreservingURL"), diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx index 1888c3734d59..f163f3f3343e 100644 --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -90,7 +90,7 @@ private: const OUString m_aContextParam; StringHashMap m_aTypedCustomHandlers; UUIInteractionHelper(UUIInteractionHelper &); // not implemented - void operator =(UUIInteractionHelper); // not implemented + void operator =(const UUIInteractionHelper&); // not implemented public: UUIInteractionHelper( diff --git a/vcl/source/filter/sgffilt.hxx b/vcl/source/filter/sgffilt.hxx index 5269e1c78510..9256c61770fc 100644 --- a/vcl/source/filter/sgffilt.hxx +++ b/vcl/source/filter/sgffilt.hxx @@ -24,7 +24,7 @@ sal_uInt8 CheckSgfTyp(SvStream& rInp, sal_uInt16& nVersion); bool SgfBMapFilter(SvStream& rInp, SvStream& rOut); bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf); -bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ); +bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, const INetURLObject& aIniPath ); // constants for CheckSgfTyp() #define SGF_BITIMAGE 1 /* Bitmap */ diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index cfbf3964d1bf..1785e693217a 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -838,7 +838,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) return bRet; } -bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) +bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, const INetURLObject& _aIniPath ) { #if OSL_DEBUG_LEVEL > 1 // check record size. New compiler possibly aligns different! if (sizeof(ObjTextType)!=ObjTextTypeSize) return false; @@ -850,6 +850,7 @@ bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) sal_uLong nNext; bool bRet=false; // return value + INetURLObject aIniPath = _aIniPath; aIniPath.Append(OUString("sgf.ini")); pSgfFonts = new SgfFontLst; diff --git a/vcl/source/filter/sgvmain.hxx b/vcl/source/filter/sgvmain.hxx index 94e0470b1eb8..726815299ac4 100644 --- a/vcl/source/filter/sgvmain.hxx +++ b/vcl/source/filter/sgvmain.hxx @@ -272,7 +272,7 @@ public: INetURLObject aFltPath; // for GraphicFilter friend SvStream& ReadBmapType(SvStream& rIStream, BmapType& rBmap); virtual void Draw(OutputDevice& rOut) SAL_OVERRIDE; - void SetPaths( const INetURLObject rFltPath ); + void SetPaths( const INetURLObject& rFltPath ); }; #define GrupSize 48 diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 48ba6b11bd3c..a25bcc78aff5 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -1493,7 +1493,7 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXAr SetGfxMode( nOldGfxMode ); } -void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ) +void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx& rBitmap ) { BitmapEx aBmpEx( rBitmap ); if ( mbComplexClip ) diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index 893ed048004c..d925bc7c6c6a 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -645,7 +645,7 @@ class WinMtfOutput void ImplResizeObjectArry( sal_uInt32 nNewEntry ); void ImplSetNonPersistentLineColorTransparenz(); void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ); - void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ); + void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx& rBitmap ); public: diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index c80ee4b99489..78302b37e28f 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -1239,7 +1239,7 @@ namespace } Bitmap OutputDevice::BlendBitmapWithAlpha( - Bitmap aBmp, + Bitmap& aBmp, BitmapReadAccess* pP, BitmapReadAccess* pA, const Rectangle& aDstRect, @@ -1337,7 +1337,7 @@ Bitmap OutputDevice::BlendBitmapWithAlpha( } Bitmap OutputDevice::BlendBitmap( - Bitmap aBmp, + Bitmap& aBmp, BitmapReadAccess* pP, BitmapReadAccess* pA, const sal_Int32 nOffY, diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx index 2dbad33eed52..5d038828a031 100644 --- a/writerfilter/source/rtftok/rtfvalue.cxx +++ b/writerfilter/source/rtftok/rtfvalue.cxx @@ -21,7 +21,7 @@ namespace rtftok RTFValue::RTFValue(int nValue, const OUString& sValue, RTFSprms rAttributes, RTFSprms rSprms, uno::Reference<drawing::XShape> xShape, uno::Reference<io::XInputStream> xStream, uno::Reference<embed::XEmbeddedObject> xObject, bool bForceString, - RTFShape aShape) + const RTFShape& aShape) : m_nValue(nValue), m_sValue(sValue), m_xShape(xShape), @@ -138,7 +138,7 @@ RTFValue::RTFValue(uno::Reference<embed::XEmbeddedObject> xObject) m_pShape.reset(new RTFShape()); } -RTFValue::RTFValue(RTFShape aShape) +RTFValue::RTFValue(const RTFShape& aShape) : m_nValue(), m_sValue(), m_xShape(), diff --git a/writerfilter/source/rtftok/rtfvalue.hxx b/writerfilter/source/rtftok/rtfvalue.hxx index 210cbb5a629d..5a6d20464940 100644 --- a/writerfilter/source/rtftok/rtfvalue.hxx +++ b/writerfilter/source/rtftok/rtfvalue.hxx @@ -28,7 +28,7 @@ public: typedef boost::shared_ptr<RTFValue> Pointer_t; RTFValue(int nValue, const OUString& sValue, RTFSprms rAttributes, RTFSprms rSprms, css::uno::Reference<css::drawing::XShape> rShape, css::uno::Reference<css::io::XInputStream> rStream, css::uno::Reference<css::embed::XEmbeddedObject> rObject, bool bForceString, - RTFShape aShape); + const RTFShape& aShape); RTFValue(); RTFValue(int nValue); RTFValue(const OUString& sValue, bool bForce = false); @@ -37,7 +37,7 @@ public: RTFValue(css::uno::Reference<css::drawing::XShape> rShape); RTFValue(css::uno::Reference<css::io::XInputStream> rStream); RTFValue(css::uno::Reference<css::embed::XEmbeddedObject> rObject); - RTFValue(RTFShape aShape); + RTFValue(const RTFShape& aShape); virtual ~RTFValue(); void setString(const OUString& sValue); virtual int getInt() const SAL_OVERRIDE; |