diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-17 09:16:07 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-17 13:30:51 +0200 |
commit | cc2700245d911c14114ce7346357b1a4d008cc06 (patch) | |
tree | 01cbc1d1796ac8bab2e844d6d8bb29d8932fac3b /sd | |
parent | 769a6c20c4eb9e081cdc46dd638f67927fc7bc25 (diff) |
sd: prefer passing OUString by reference
Change-Id: Ide21e1f51284fb2d4c7aaaa358417c6080b2fdde
Diffstat (limited to 'sd')
26 files changed, 39 insertions, 38 deletions
diff --git a/sd/inc/TransitionPreset.hxx b/sd/inc/TransitionPreset.hxx index a09504088cd3..35476da02c8d 100644 --- a/sd/inc/TransitionPreset.hxx +++ b/sd/inc/TransitionPreset.hxx @@ -69,7 +69,7 @@ private: static bool importTransitionsFile( TransitionPresetList& rList, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, UStringMap& rTransitionNameMape, - OUString aFilename ); + const OUString& aFilename ); }; } diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 40a4dcf15358..f10aef2752b1 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -260,7 +260,7 @@ public: virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect); - void SetLayoutName(OUString aName); + void SetLayoutName(const OUString& aName); virtual OUString GetLayoutName() const { return maLayoutName; } void SetFileName(const OUString& aName) { maFileName = aName; } diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index 966ccde50185..a12d112bdd5a 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -92,7 +92,7 @@ TransitionPreset::TransitionPreset( const ::com::sun::star::uno::Reference< ::co bool TransitionPreset::importTransitionsFile( TransitionPresetList& rList, Reference< XMultiServiceFactory >& xServiceFactory, UStringMap& rTransitionNameMape, - OUString aURL ) + const OUString& aURL ) { // import transition presets Reference< XAnimationNode > xAnimationNode; diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 61c453397fef..f8654f0dbe15 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -356,7 +356,7 @@ lcl_removeUnusedStyles(SfxStyleSheetBasePool* const pStyleSheetPool, SdStyleShee rStyles = aUsedStyles; } -SfxStyleSheet *lcl_findStyle(SdStyleSheetVector& rStyles, OUString aStyleName) +SfxStyleSheet *lcl_findStyle(SdStyleSheetVector& rStyles, const OUString& aStyleName) { for(SdStyleSheetVector::const_iterator aIt(rStyles.begin()), aLast(rStyles.end()); aIt != aLast; ++aIt) { diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index b576742aa4bf..f8429c582333 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -494,7 +494,7 @@ void SdDrawDocument::CreateLayoutTemplates() pSSPool->CreateLayoutStyleSheets(aPrefix); } -static Any implMakeSolidCellStyle( SdStyleSheetPool* pSSPool, const OUString& rName, const OUString rParent, const Color& rColor ) +static Any implMakeSolidCellStyle( SdStyleSheetPool* pSSPool, const OUString& rName, const OUString& rParent, const Color& rColor ) { SfxStyleSheetBase* pSheet = &(pSSPool->Make(rName, SD_STYLE_FAMILY_CELL, SFXSTYLEBIT_AUTO)); pSheet->SetParent(rParent); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index adc8f73af4d0..728fb46e3d11 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2500,7 +2500,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO |* Set the name of the layout |* \************************************************************************/ -void SdPage::SetLayoutName(OUString aName) +void SdPage::SetLayoutName(const OUString& aName) { maLayoutName = aName; diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 6b88b0bc6e75..3dfd66f4a6fc 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -86,7 +86,7 @@ OUString lcl_findRenamedStyleName(std::vector< std::pair< OUString, OUString > > return OUString(); } -SfxStyleSheet *lcl_findStyle(SdStyleSheetVector& rStyles, OUString aStyleName) +SfxStyleSheet *lcl_findStyle(SdStyleSheetVector& rStyles, const OUString& aStyleName) { if( aStyleName.isEmpty() ) return NULL; diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index 4efbd3b47f0e..b4f9e641ebda 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -125,7 +125,7 @@ protected: sal_uInt32 GetNewSlideId() { return mnSlideIdMax ++; } sal_uInt32 GetNewSlideMasterId() { return mnSlideMasterIdMax ++; } - sal_Int32 GetAuthorIdAndLastIndex( OUString sAuthor, sal_Int32& nLastIndex ); + sal_Int32 GetAuthorIdAndLastIndex( const OUString& sAuthor, sal_Int32& nLastIndex ); private: void AddLayoutIdAndRelation( ::sax_fastparser::FSHelperPtr pFS, sal_Int32 nLayoutFileId ); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index ce475906721d..74d06fe8907f 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1226,7 +1226,7 @@ void PowerPointExport::WriteAnimations( FSHelperPtr pFS ) } -static OUString lcl_GetInitials( OUString sName ) +static OUString lcl_GetInitials( const OUString& sName ) { OUStringBuffer sRet; @@ -1272,7 +1272,7 @@ void PowerPointExport::WriteAuthors() pFS->endElementNS( XML_p, XML_cmAuthorLst ); } -sal_Int32 PowerPointExport::GetAuthorIdAndLastIndex( OUString sAuthor, sal_Int32& nLastIndex ) +sal_Int32 PowerPointExport::GetAuthorIdAndLastIndex( const OUString& sAuthor, sal_Int32& nLastIndex ) { if ( maAuthors.count( sAuthor ) <= 0 ) { struct AuthorComments aAuthorComments; diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index b8322c444e52..38ff219d8124 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -333,7 +333,7 @@ static OUString getParagraphStyle( SdrOutliner* pOutliner, sal_Int32 nPara ) // constructor for the html export helper classes HtmlExport::HtmlExport( - OUString aPath, + const OUString& aPath, const Sequence< PropertyValue >& rParams, SdDrawDocument* pExpDoc, ::sd::DrawDocShell* pDocShell ) diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index b98105fca328..bb4d01f6c798 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -210,7 +210,7 @@ class HtmlExport OUString GetButtonName( int nButton ) const; public: - HtmlExport( OUString aPath, const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rParams, SdDrawDocument* pExpDoc, ::sd::DrawDocShell* pDocShell ); + HtmlExport( const OUString& aPath, const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rParams, SdDrawDocument* pExpDoc, ::sd::DrawDocShell* pDocShell ); virtual ~HtmlExport(); static OUString ColorToHTMLString( Color aColor ); diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 8cbc95ab13ee..8c714a2faeea 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -2251,7 +2251,7 @@ IMPL_LINK_NOARG(CustomAnimationTextAnimTabPage, implSelectHdl) -CustomAnimationDialog::CustomAnimationDialog(Window* pParent, STLPropertySet* pSet, OString sPage) +CustomAnimationDialog::CustomAnimationDialog(Window* pParent, STLPropertySet* pSet, const OString& sPage) : TabDialog( pParent, "CustomAnimationProperties", "modules/simpress/ui/customanimationproperties.ui") , mpSet( pSet ) , mpResultSet( 0 ) diff --git a/sd/source/ui/animations/CustomAnimationDialog.hxx b/sd/source/ui/animations/CustomAnimationDialog.hxx index f7d350bfc7f0..daeb6f2b1104 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.hxx +++ b/sd/source/ui/animations/CustomAnimationDialog.hxx @@ -150,7 +150,7 @@ class STLPropertySet; class CustomAnimationDialog : public TabDialog { public: - CustomAnimationDialog(Window* pParent, STLPropertySet* pSet, OString Page = OString()); + CustomAnimationDialog(Window* pParent, STLPropertySet* pSet, const OString& Page = OString()); ~CustomAnimationDialog(); STLPropertySet* getDefaultSet() { return mpSet; } diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 16d8e9e5cd82..0e946f04115e 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -203,7 +203,7 @@ static OUString getDescription( const Any& rTarget, bool bWithText = true ) class CustomAnimationListEntryItem : public SvLBoxString { public: - CustomAnimationListEntryItem( SvTreeListEntry*,sal_uInt16 nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ); + CustomAnimationListEntryItem( SvTreeListEntry*,sal_uInt16 nFlags, const OUString& aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ); virtual ~CustomAnimationListEntryItem(); void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ); SvLBoxItem* Create() const; @@ -219,7 +219,7 @@ private: -CustomAnimationListEntryItem::CustomAnimationListEntryItem( SvTreeListEntry* pEntry, sal_uInt16 nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ) +CustomAnimationListEntryItem::CustomAnimationListEntryItem( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ) : SvLBoxString( pEntry, nFlags, aDescription ) , mpParent( pParent ) , maDescription( aDescription ) @@ -355,7 +355,7 @@ CustomAnimationListEntry::~CustomAnimationListEntry() class CustomAnimationTriggerEntryItem : public SvLBoxString { public: - CustomAnimationTriggerEntryItem( SvTreeListEntry*,sal_uInt16 nFlags, OUString aDescription ); + CustomAnimationTriggerEntryItem( SvTreeListEntry*,sal_uInt16 nFlags, const OUString& aDescription ); virtual ~CustomAnimationTriggerEntryItem(); virtual sal_uInt16 IsA(); void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ); @@ -370,7 +370,7 @@ private: -CustomAnimationTriggerEntryItem::CustomAnimationTriggerEntryItem( SvTreeListEntry* pEntry, sal_uInt16 nFlags, OUString aDescription ) +CustomAnimationTriggerEntryItem::CustomAnimationTriggerEntryItem( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& aDescription ) : SvLBoxString( pEntry, nFlags, aDescription ), maDescription( aDescription ) { } diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 958808ade2a6..96006e00f292 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1556,7 +1556,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper } } -void CustomAnimationPane::showOptions(OString sPage) +void CustomAnimationPane::showOptions(const OString& sPage) { STLPropertySet* pSet = createSelectionSet(); diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/animations/CustomAnimationPane.hxx index 54564b5bb109..fe89da0fc74f 100644 --- a/sd/source/ui/animations/CustomAnimationPane.hxx +++ b/sd/source/ui/animations/CustomAnimationPane.hxx @@ -104,7 +104,7 @@ private: void updateMotionPathTags(); void markShapesFromSelectedEffects(); - void showOptions(OString sPage = OString()); + void showOptions(const OString& sPage = OString()); void moveSelection( bool bUp ); void onPreview( bool bForcePreview ); diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 8c9453ef264c..f1c0ece15283 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -49,7 +49,7 @@ template< class T > T getSafeValue( const Any& rAny ) // - SdOptionsItem - -SdOptionsItem::SdOptionsItem( const SdOptionsGeneric& rParent, const OUString rSubTree ) : +SdOptionsItem::SdOptionsItem( const SdOptionsGeneric& rParent, const OUString& rSubTree ) : ConfigItem ( rSubTree ), mrParent ( rParent ) { diff --git a/sd/source/ui/func/unprlout.cxx b/sd/source/ui/func/unprlout.cxx index 1100fc60b8d4..5d85e83fc585 100644 --- a/sd/source/ui/func/unprlout.cxx +++ b/sd/source/ui/func/unprlout.cxx @@ -30,8 +30,8 @@ TYPEINIT1(SdPresentationLayoutUndoAction, SdUndoAction); SdPresentationLayoutUndoAction::SdPresentationLayoutUndoAction( SdDrawDocument* pTheDoc, - OUString aTheOldLayoutName, - OUString aTheNewLayoutName, + const OUString& aTheOldLayoutName, + const OUString& aTheNewLayoutName, AutoLayout eTheOldAutoLayout, AutoLayout eTheNewAutoLayout, sal_Bool bSet, diff --git a/sd/source/ui/inc/RemoteServer.hxx b/sd/source/ui/inc/RemoteServer.hxx index f873fcd512a3..3c450f0e4e87 100644 --- a/sd/source/ui/inc/RemoteServer.hxx +++ b/sd/source/ui/inc/RemoteServer.hxx @@ -45,7 +45,7 @@ namespace sd OUString mAddress; enum PROTOCOL { NETWORK = 1, BLUETOOTH }; - ClientInfo( const OUString rName, const OUString rAddress ) : + ClientInfo( const OUString& rName, const OUString& rAddress ) : mName( rName ), mAddress( rAddress ) {} }; @@ -66,7 +66,7 @@ namespace sd // For the control dialog SD_DLLPUBLIC static std::vector<ClientInfo*> getClients(); SD_DLLPUBLIC static sal_Bool connectClient( ClientInfo *pClient, - OUString aPin ); + const OUString& aPin ); /// ensure that discoverability (eg. for Bluetooth) is enabled SD_DLLPUBLIC static void ensureDiscoverable(); diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index a3856b0f3928..01b22b53893b 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -59,7 +59,7 @@ private: public: - SdOptionsItem( const SdOptionsGeneric& rParent, const OUString rSubTree ); + SdOptionsItem( const SdOptionsGeneric& rParent, const OUString& rSubTree ); virtual ~SdOptionsItem(); virtual void Commit(); diff --git a/sd/source/ui/inc/unmodpg.hxx b/sd/source/ui/inc/unmodpg.hxx index f96f4ac5b7d8..fd74d186b8d5 100644 --- a/sd/source/ui/inc/unmodpg.hxx +++ b/sd/source/ui/inc/unmodpg.hxx @@ -45,7 +45,7 @@ public: ModifyPageUndoAction( SdDrawDocument* pTheDoc, SdPage* pThePage, - OUString aTheNewName, + const OUString& aTheNewName, AutoLayout eTheNewAutoLayout, sal_Bool bTheNewBckgrndVisible, sal_Bool bTheNewBckgrndObjsVisible); diff --git a/sd/source/ui/inc/unoaprms.hxx b/sd/source/ui/inc/unoaprms.hxx index e866a7c650a7..678641dc9e8a 100644 --- a/sd/source/ui/inc/unoaprms.hxx +++ b/sd/source/ui/inc/unoaprms.hxx @@ -104,7 +104,7 @@ public: { bOldDimHide = bTheOldDimHide; bNewDimHide = bTheNewDimHide; } void SetSoundOn(sal_Bool bTheOldSoundOn, sal_Bool bTheNewSoundOn) { bOldSoundOn = bTheOldSoundOn; bNewSoundOn = bTheNewSoundOn; } - void SetSound(OUString aTheOldSound, OUString aTheNewSound) + void SetSound(const OUString& aTheOldSound, const OUString& aTheNewSound) { aOldSoundFile = aTheOldSound; aNewSoundFile = aTheNewSound; } void SetBlueScreen(Color aTheOldBlueScreen, Color aTheNewBlueScreen) { aOldBlueScreen = aTheOldBlueScreen; aNewBlueScreen = aTheNewBlueScreen; } @@ -114,7 +114,7 @@ public: { pOldPathObj = pTheOldPath; pNewPathObj = pTheNewPath; } void SetClickAction(::com::sun::star::presentation::ClickAction eTheOldAction, ::com::sun::star::presentation::ClickAction eTheNewAction) { eOldClickAction = eTheOldAction; eNewClickAction = eTheNewAction; } - void SetBookmark(OUString aTheOldBookmark, OUString aTheNewBookmark) + void SetBookmark(const OUString& aTheOldBookmark, const OUString& aTheNewBookmark) { aOldBookmark = aTheOldBookmark; aNewBookmark = aTheNewBookmark; } void SetInvisibleInPres(sal_Bool bTheOldInvisibleInPres, sal_Bool bTheNewInvisibleInPres) { bOldInvisibleInPres = bTheOldInvisibleInPres; bNewInvisibleInPres = bTheNewInvisibleInPres; } diff --git a/sd/source/ui/inc/unprlout.hxx b/sd/source/ui/inc/unprlout.hxx index 1b72d1940cd2..3ff3a90ee08c 100644 --- a/sd/source/ui/inc/unprlout.hxx +++ b/sd/source/ui/inc/unprlout.hxx @@ -39,8 +39,8 @@ class SdPresentationLayoutUndoAction : public SdUndoAction public: TYPEINFO(); SdPresentationLayoutUndoAction(SdDrawDocument* pTheDoc, - OUString aTheOldLayoutName, - OUString aTheNewLayoutName, + const OUString& aTheOldLayoutName, + const OUString& aTheNewLayoutName, AutoLayout eTheOldAutoLayout, AutoLayout eTheNewAutoLayout, sal_Bool bSet, diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx index 7ee3e32b06d1..ba998880b303 100644 --- a/sd/source/ui/remotecontrol/ImagePreparer.cxx +++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx @@ -201,7 +201,7 @@ void ImagePreparer::sendNotes( sal_uInt32 aSlideNumber ) Transmitter::PRIORITY_LOW ); } -sal_Bool ExportTo( uno::Reference< drawing::XDrawPage>& aNotesPage, OUString aUrl ); +sal_Bool ExportTo( uno::Reference< drawing::XDrawPage>& aNotesPage, const OUString& aUrl ); // Code copied from sdremote/source/presenter/PresenterNotesView.cxx OString ImagePreparer::prepareNotes( sal_uInt32 aSlideNumber ) @@ -283,7 +283,7 @@ OString ImagePreparer::prepareNotes( sal_uInt32 aSlideNumber ) aRet.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ); } -sal_Bool ExportTo( uno::Reference< drawing::XDrawPage>& aNotesPage, OUString aUrl ) +sal_Bool ExportTo( uno::Reference< drawing::XDrawPage>& aNotesPage, const OUString& aUrl ) { OUString aFilterName( "XHTML Draw File" ); uno::Reference< document::XExporter > xExporter; diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 51796cc0b6bb..529193ac1928 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -52,9 +52,10 @@ namespace sd { BufferedStreamSocket *mpStreamSocket; OUString mPin; - ClientInfoInternal( const OUString rName, - const OUString rAddress, - BufferedStreamSocket *pSocket, OUString rPin ): + ClientInfoInternal( const OUString& rName, + const OUString& rAddress, + BufferedStreamSocket *pSocket, + const OUString& rPin ): ClientInfo( rName, rAddress ), mpStreamSocket( pSocket ), mPin( rPin ) {} @@ -249,7 +250,7 @@ std::vector<ClientInfo*> RemoteServer::getClients() return aClients; } -sal_Bool RemoteServer::connectClient( ClientInfo* pClient, OUString aPin ) +sal_Bool RemoteServer::connectClient( ClientInfo* pClient, const OUString& aPin ) { SAL_INFO( "sdremote", "RemoteServer::connectClient called" ); if ( !spServer ) diff --git a/sd/source/ui/view/unmodpg.cxx b/sd/source/ui/view/unmodpg.cxx index cc5a675dfc50..7775201c2c76 100644 --- a/sd/source/ui/view/unmodpg.cxx +++ b/sd/source/ui/view/unmodpg.cxx @@ -39,7 +39,7 @@ TYPEINIT1(ModifyPageUndoAction, SdUndoAction); ModifyPageUndoAction::ModifyPageUndoAction( SdDrawDocument* pTheDoc, SdPage* pThePage, - OUString aTheNewName, + const OUString& aTheNewName, AutoLayout eTheNewAutoLayout, sal_Bool bTheNewBckgrndVisible, sal_Bool bTheNewBckgrndObjsVisible) |