[Libreoffice-commits] core.git: cui/source include/svtools include/svx svtools/source svx/source
Noel Grandin
noel at peralex.com
Thu Mar 13 04:14:36 PDT 2014
cui/source/factory/dlgfact.cxx | 4 ++--
cui/source/factory/dlgfact.hxx | 4 ++--
include/svtools/ServerDetailsControls.hxx | 4 ++--
include/svtools/inettbc.hxx | 2 +-
include/svtools/place.hxx | 2 +-
include/svtools/toolboxcontroller.hxx | 2 +-
include/svx/DescriptionGenerator.hxx | 2 +-
include/svx/nbdtmg.hxx | 4 ++--
include/svx/svxdlg.hxx | 8 ++++----
include/svx/xmleohlp.hxx | 2 +-
svtools/source/config/helpopt.cxx | 2 +-
svtools/source/config/miscopt.cxx | 2 +-
svtools/source/config/slidesorterbaropt.cxx | 2 +-
svtools/source/config/toolpanelopt.cxx | 2 +-
svtools/source/control/inettbc.cxx | 4 +++-
svtools/source/dialogs/ServerDetailsControls.cxx | 2 +-
svtools/source/uno/toolboxcontroller.cxx | 2 +-
svx/source/accessibility/DescriptionGenerator.cxx | 2 +-
svx/source/gengal/gengal.cxx | 4 ++--
svx/source/sidebar/nbdtmg.cxx | 4 ++--
svx/source/toolbars/fontworkbar.cxx | 2 +-
svx/source/xml/xmleohlp.cxx | 5 +++--
22 files changed, 35 insertions(+), 32 deletions(-)
New commits:
commit 41776e53c54968881021c25f1173d190cfd2ba5d
Author: Noel Grandin <noel at peralex.com>
Date: Thu Mar 13 13:12:33 2014 +0200
svtools,svx: prefer passing OUString and OString by reference
Change-Id: Iceb2cbcda9d8ddb4ee00db9365c751e0e5d8b3a6
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index cf9696b..d5bc424 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 ee41b25..2804ecb 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 02c2673..6155b4b 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 d0d3a00..0ee7b10 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 406d75c..e46eba4 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 316354a..445cd41 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 a1eb17b..0cf5593 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 189dc05..c82c65c 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 8c5fce0..e5cd519 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 2773d8e..2795155 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 a646c17..7284b52 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 c94a4d0..c5a2ffa 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 4ae14c4..d9a31d8 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 ccc9755..1e89f3f 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 33bcf89..5a2e8b8 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 a270a5d..7300d4f 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 8568d0b..95addd7 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 f77314a..4b2aaf4 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 1df2f62..4cb4b14 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 cf2ad6e..1b6458c 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 320eb29..ab56932 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 cc4c7f7..2eff25c 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 )
More information about the Libreoffice-commits
mailing list