summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-13 13:12:33 +0200
committerNoel Grandin <noel@peralex.com>2014-03-13 13:13:38 +0200
commit41776e53c54968881021c25f1173d190cfd2ba5d (patch)
tree82a10d8f6b237879bde8acdc38e0f9e07bbfb87e
parentd575b23c187fb66bbe13c4fe6df8a8cb1ccbc135 (diff)
svtools,svx: prefer passing OUString and OString by reference
Change-Id: Iceb2cbcda9d8ddb4ee00db9365c751e0e5d8b3a6
-rw-r--r--cui/source/factory/dlgfact.cxx4
-rw-r--r--cui/source/factory/dlgfact.hxx4
-rw-r--r--include/svtools/ServerDetailsControls.hxx4
-rw-r--r--include/svtools/inettbc.hxx2
-rw-r--r--include/svtools/place.hxx2
-rw-r--r--include/svtools/toolboxcontroller.hxx2
-rw-r--r--include/svx/DescriptionGenerator.hxx2
-rw-r--r--include/svx/nbdtmg.hxx4
-rw-r--r--include/svx/svxdlg.hxx8
-rw-r--r--include/svx/xmleohlp.hxx2
-rw-r--r--svtools/source/config/helpopt.cxx2
-rw-r--r--svtools/source/config/miscopt.cxx2
-rw-r--r--svtools/source/config/slidesorterbaropt.cxx2
-rw-r--r--svtools/source/config/toolpanelopt.cxx2
-rw-r--r--svtools/source/control/inettbc.cxx4
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx2
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx2
-rw-r--r--svx/source/accessibility/DescriptionGenerator.cxx2
-rw-r--r--svx/source/gengal/gengal.cxx4
-rw-r--r--svx/source/sidebar/nbdtmg.cxx4
-rw-r--r--svx/source/toolbars/fontworkbar.cxx2
-rw-r--r--svx/source/xml/xmleohlp.cxx5
22 files changed, 35 insertions, 32 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index cf9696bbbcb3..d5bc424f3711 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -578,12 +578,12 @@ bool AbstractSvxHlinkDlgMarkWnd_Impl::ConnectToDialog( bool bDoit )const
return pDlg->ConnectToDialog(bDoit);
}
-void AbstractSvxHlinkDlgMarkWnd_Impl::RefreshTree ( OUString aStrURL )
+void AbstractSvxHlinkDlgMarkWnd_Impl::RefreshTree ( const OUString& aStrURL )
{
pDlg->RefreshTree(aStrURL);
}
-void AbstractSvxHlinkDlgMarkWnd_Impl::SelectEntry ( OUString aStrMark )
+void AbstractSvxHlinkDlgMarkWnd_Impl::SelectEntry ( const OUString& aStrMark )
{
pDlg->SelectEntry(aStrMark);
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index ee41b25021f3..2804ecbc3099 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -285,8 +285,8 @@ class AbstractSvxHlinkDlgMarkWnd_Impl : public AbstractSvxHlinkDlgMarkWnd
virtual Size GetSizePixel() const;
virtual bool MoveTo( Point aNewPos ) const;
virtual bool ConnectToDialog( bool bDoit = true )const;
- virtual void RefreshTree ( OUString aStrURL ) ;
- virtual void SelectEntry ( OUString aStrMark );
+ virtual void RefreshTree ( const OUString& aStrURL ) ;
+ virtual void SelectEntry ( const OUString& aStrMark );
virtual sal_uInt16 SetError( sal_uInt16 nError) ;
};
diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx
index 02c2673e331e..6155b4b394b2 100644
--- a/include/svtools/ServerDetailsControls.hxx
+++ b/include/svtools/ServerDetailsControls.hxx
@@ -62,7 +62,7 @@ class HostDetailsContainer : public DetailsContainer
Edit* m_pEDPath;
public:
- HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, OUString sScheme );
+ HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, const OUString& sScheme );
virtual ~HostDetailsContainer( ) { };
virtual void show( bool bShow = true );
@@ -70,7 +70,7 @@ class HostDetailsContainer : public DetailsContainer
virtual bool setUrl( const INetURLObject& rUrl );
protected:
- void setScheme( OUString sScheme ) { m_sScheme = sScheme; }
+ void setScheme( const OUString& sScheme ) { m_sScheme = sScheme; }
/** Verifies that the schement split from the URL can be handled by
the container and set the proper controls accordingly if needed.
diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx
index d0d3a00ff561..0ee7b1064edc 100644
--- a/include/svtools/inettbc.hxx
+++ b/include/svtools/inettbc.hxx
@@ -78,7 +78,7 @@ public:
void UpdatePickList( );
- static OUString ParseSmart( OUString aText, OUString aBaseURL, const OUString& aWorkDir );
+ static OUString ParseSmart( const OUString& aText, const OUString& aBaseURL, const OUString& aWorkDir );
void SetFilter(const OUString& _sFilter);
diff --git a/include/svtools/place.hxx b/include/svtools/place.hxx
index 406d75c6c2e6..e46eba4e2785 100644
--- a/include/svtools/place.hxx
+++ b/include/svtools/place.hxx
@@ -22,7 +22,7 @@ private:
public:
- Place( OUString sName, OUString sUrl, bool bEditable = false ) :
+ Place( const OUString& sName, const OUString& sUrl, bool bEditable = false ) :
msName( sName ),
maUrl( sUrl ),
mbEditable( bEditable ) {};
diff --git a/include/svtools/toolboxcontroller.hxx b/include/svtools/toolboxcontroller.hxx
index 316354a783a5..445cd4169b39 100644
--- a/include/svtools/toolboxcontroller.hxx
+++ b/include/svtools/toolboxcontroller.hxx
@@ -71,7 +71,7 @@ class SVT_DLLPUBLIC ToolboxController :
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& getContext() const;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > getLayoutManager() const;
- void updateStatus( const OUString aCommandURL );
+ void updateStatus( const OUString& aCommandURL );
void updateStatus();
// XInterface
diff --git a/include/svx/DescriptionGenerator.hxx b/include/svx/DescriptionGenerator.hxx
index a1eb17b01d9f..0cf5593d5384 100644
--- a/include/svx/DescriptionGenerator.hxx
+++ b/include/svx/DescriptionGenerator.hxx
@@ -64,7 +64,7 @@ public:
An introductory description of the shape that is made more
specific by later calls to <member>addProperty</member>.
*/
- void Initialize (OUString sPrefix);
+ void Initialize (const OUString& sPrefix);
/** Initialize the description with the specified string from the
resource followed by the shape's style in parantheses and a colon.
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index 189dc053ae43..c82c65ce05ab 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -234,8 +234,8 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
SfxMapUnit GetMapUnit();
protected:
bool bIsLoading;
- void ImplLoad(OUString filename);
- void ImplStore(OUString filename);
+ void ImplLoad(const OUString& filename);
+ void ImplStore(const OUString& filename);
};
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 8c5fce0d8807..e5cd519f60d4 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -132,10 +132,10 @@ public:
class AbstractSvxHlinkDlgMarkWnd :public VclAbstractDialog
{
public:
- virtual bool MoveTo ( Point aNewPos )const = 0;
- virtual bool ConnectToDialog( bool bDoit = true )const = 0;
- virtual void RefreshTree ( OUString aStrURL ) = 0;
- virtual void SelectEntry ( OUString aStrMark ) = 0;
+ virtual bool MoveTo ( Point aNewPos ) const = 0;
+ virtual bool ConnectToDialog( bool bDoit = true ) const = 0;
+ virtual void RefreshTree ( const OUString& aStrURL ) = 0;
+ virtual void SelectEntry ( const OUString& aStrMark ) = 0;
virtual sal_uInt16 SetError( sal_uInt16 nError) = 0;
// in class Window
virtual void SetSizePixel( const Size& rNewSize ) = 0;
diff --git a/include/svx/xmleohlp.hxx b/include/svx/xmleohlp.hxx
index 2773d8ef3260..27951556a9a3 100644
--- a/include/svx/xmleohlp.hxx
+++ b/include/svx/xmleohlp.hxx
@@ -137,7 +137,7 @@ public:
virtual sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
- static void splitObjectURL(OUString aURLNoPar,
+ static void splitObjectURL(const OUString& aURLNoPar,
OUString& rContainerStorageName,
OUString& rObjectStorageName);
};
diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx
index a646c17a4a0f..7284b524b9e6 100644
--- a/svtools/source/config/helpopt.cxx
+++ b/svtools/source/config/helpopt.cxx
@@ -135,7 +135,7 @@ SvtHelpOptions_Impl::SvtHelpOptions_Impl()
}
-static int lcl_MapPropertyName( const OUString rCompare,
+static int lcl_MapPropertyName( const OUString& rCompare,
const uno::Sequence< OUString>& aInternalPropertyNames)
{
for(int nProp = 0; nProp < aInternalPropertyNames.getLength(); ++nProp)
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index c94a4d020465..c5a2ffa1996f 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -436,7 +436,7 @@ SvtMiscOptions_Impl::~SvtMiscOptions_Impl()
}
}
-static int lcl_MapPropertyName( const OUString rCompare,
+static int lcl_MapPropertyName( const OUString& rCompare,
const uno::Sequence< OUString>& aInternalPropertyNames)
{
for(int nProp = 0; nProp < aInternalPropertyNames.getLength(); ++nProp)
diff --git a/svtools/source/config/slidesorterbaropt.cxx b/svtools/source/config/slidesorterbaropt.cxx
index 4ae14c40633d..d9a31d8cce09 100644
--- a/svtools/source/config/slidesorterbaropt.cxx
+++ b/svtools/source/config/slidesorterbaropt.cxx
@@ -182,7 +182,7 @@ SvtSlideSorterBarOptions_Impl::~SvtSlideSorterBarOptions_Impl()
Commit();
}
-static int lcl_MapPropertyName( const OUString rCompare,
+static int lcl_MapPropertyName( const OUString& rCompare,
const uno::Sequence< OUString>& aInternalPropertyNames)
{
for(int nProp = 0; nProp < aInternalPropertyNames.getLength(); ++nProp)
diff --git a/svtools/source/config/toolpanelopt.cxx b/svtools/source/config/toolpanelopt.cxx
index ccc975543886..1e89f3fdcf7e 100644
--- a/svtools/source/config/toolpanelopt.cxx
+++ b/svtools/source/config/toolpanelopt.cxx
@@ -180,7 +180,7 @@ SvtToolPanelOptions_Impl::~SvtToolPanelOptions_Impl()
Commit();
}
-static int lcl_MapPropertyName( const OUString rCompare,
+static int lcl_MapPropertyName( const OUString& rCompare,
const uno::Sequence< OUString>& aInternalPropertyNames)
{
for(int nProp = 0; nProp < aInternalPropertyNames.getLength(); ++nProp)
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 33bcf894b1b7..5a2e8b822b73 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -469,9 +469,11 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
}
-OUString SvtURLBox::ParseSmart( OUString aText, OUString aBaseURL, const OUString& aWorkDir )
+OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseURL, const OUString& aWorkDir )
{
OUString aMatch;
+ OUString aText = _aText;
+ OUString aBaseURL = _aBaseURL;
// parse ~ for Unix systems
// does nothing for Windows
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index a270a5dfe7b3..7300d4fc92d5 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -69,7 +69,7 @@ IMPL_LINK( DetailsContainer, ValueChangeHdl, void *, EMPTYARG )
return 0;
}
-HostDetailsContainer::HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, OUString sScheme ) :
+HostDetailsContainer::HostDetailsContainer( VclBuilderContainer* pBuilder, sal_uInt16 nPort, const OUString& sScheme ) :
DetailsContainer( pBuilder, "HostDetails" ),
m_nDefaultPort( nPort ),
m_sScheme( sScheme )
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 8568d0b78577..95addd72ff6c 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -633,7 +633,7 @@ void ToolboxController::updateStatus()
bindListener();
}
-void ToolboxController::updateStatus( const OUString aCommandURL )
+void ToolboxController::updateStatus( const OUString& aCommandURL )
{
Reference< XDispatch > xDispatch;
Reference< XStatusListener > xStatusListener;
diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx
index f77314abd58f..4b2aaf43d311 100644
--- a/svx/source/accessibility/DescriptionGenerator.cxx
+++ b/svx/source/accessibility/DescriptionGenerator.cxx
@@ -88,7 +88,7 @@ void DescriptionGenerator::Initialize (sal_Int32 nResourceId)
-void DescriptionGenerator::Initialize (OUString sPrefix)
+void DescriptionGenerator::Initialize (const OUString& sPrefix)
{
msDescription = sPrefix;
if (mxSet.is())
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 1df2f62395ea..4cb4b147a239 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -69,8 +69,8 @@ void disposeGallery( Gallery* pGallery )
delete pGallery;
}
-static void createTheme( OUString aThemeName, OUString aGalleryURL,
- OUString aDestDir, std::vector<INetURLObject> &rFiles,
+static void createTheme( const OUString& aThemeName, const OUString& aGalleryURL,
+ const OUString& aDestDir, std::vector<INetURLObject> &rFiles,
bool bRelativeURLs )
{
Gallery* pGallery;
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index cf2ad6e55fda..1b6458c67f2e 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -173,7 +173,7 @@ OUString NBOTypeMgrBase::GetBulCharFmtName()
{
return aNumCharFmtName;
}
-void NBOTypeMgrBase::ImplLoad(OUString filename)
+void NBOTypeMgrBase::ImplLoad(const OUString& filename)
{
bIsLoading = true;
SfxMapUnit eOldCoreUnit=eCoreUnit;
@@ -213,7 +213,7 @@ void NBOTypeMgrBase::ImplLoad(OUString filename)
eCoreUnit = eOldCoreUnit;
bIsLoading = false;
}
-void NBOTypeMgrBase::ImplStore(OUString filename)
+void NBOTypeMgrBase::ImplStore(const OUString& filename)
{
if (bIsLoading) return;
SfxMapUnit eOldCoreUnit=eCoreUnit;
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 320eb29864a1..ab5693244d77 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -337,7 +337,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem
#include <svx/fmpage.hxx>
#include <svl/itempool.hxx>
-void GetGeometryForCustomShape( SdrCustomShapeGeometryItem& rGeometryItem, const OUString rCustomShape )
+void GetGeometryForCustomShape( SdrCustomShapeGeometryItem& rGeometryItem, const OUString& rCustomShape )
{
const OUString sType( "Type" );
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index cc4c7f744662..2eff25cd2a00 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -177,11 +177,12 @@ void SAL_CALL SvXMLEmbeddedObjectHelper::disposing()
}
-void SvXMLEmbeddedObjectHelper::splitObjectURL(OUString aURLNoPar,
+void SvXMLEmbeddedObjectHelper::splitObjectURL(const OUString& _aURLNoPar,
OUString& rContainerStorageName,
OUString& rObjectStorageName)
{
- DBG_ASSERT( '#' != aURLNoPar[0], "invalid object URL" );
+ DBG_ASSERT( '#' != _aURLNoPar[0], "invalid object URL" );
+ OUString aURLNoPar = _aURLNoPar;
sal_Int32 _nPos = aURLNoPar.lastIndexOf( '/' );
if( -1 == _nPos )