summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-17 09:17:48 +0200
committerNoel Grandin <noel@peralex.com>2014-03-17 13:30:52 +0200
commit12bb4fdddd3c72a9fc9209288cc8e827bf353920 (patch)
tree8ef0f79c52fc7207bc13f7e56a70389605335f7a /cui
parent7e8af4b249132764d9eca559b4a6e2449d4d26f8 (diff)
cui: prefer passing OUString by reference
Change-Id: I1a4d36a329a0eac8b9bb3d9b0a5434ffc843bde2
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/hldocntp.cxx2
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx10
-rw-r--r--cui/source/dialogs/scriptdlg.cxx4
-rw-r--r--cui/source/factory/dlgfact.hxx4
-rw-r--r--cui/source/inc/autocdlg.hxx4
-rw-r--r--cui/source/inc/hlmarkwn.hxx8
-rw-r--r--cui/source/inc/scriptdlg.hxx4
-rw-r--r--cui/source/options/optaboutconfig.cxx2
-rw-r--r--cui/source/options/optaboutconfig.hxx2
-rw-r--r--cui/source/options/optlingu.cxx7
-rw-r--r--cui/source/options/optsave.cxx2
-rw-r--r--cui/source/tabpages/autocdlg.cxx4
12 files changed, 27 insertions, 26 deletions
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index d6320a45f700..28577d74ea3e 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -56,7 +56,7 @@ struct DocumentTypeData
{
OUString aStrURL;
OUString aStrExt;
- DocumentTypeData (OUString aURL, OUString aExt) : aStrURL(aURL), aStrExt(aExt)
+ DocumentTypeData (const OUString& aURL, const OUString& aExt) : aStrURL(aURL), aStrExt(aExt)
{}
};
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 67903b4d29d1..77aff951ff2d 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -56,7 +56,7 @@ struct TargetData
OUString aUStrLinkname;
bool bIsTarget;
- TargetData (OUString aUStrLName, bool bTarget)
+ TargetData (const OUString& aUStrLName, bool bTarget)
: bIsTarget(bTarget)
{
if (bIsTarget)
@@ -269,7 +269,7 @@ void SvxHlinkDlgMarkWnd::RestoreLastSelection()
|*
|************************************************************************/
-void SvxHlinkDlgMarkWnd::RefreshTree (OUString aStrURL)
+void SvxHlinkDlgMarkWnd::RefreshTree (const OUString& aStrURL)
{
OUString aUStrURL;
@@ -307,7 +307,7 @@ void SvxHlinkDlgMarkWnd::RefreshTree (OUString aStrURL)
|*
|************************************************************************/
-sal_Bool SvxHlinkDlgMarkWnd::RefreshFromDoc(OUString aURL)
+sal_Bool SvxHlinkDlgMarkWnd::RefreshFromDoc(const OUString& aURL)
{
mnError = LERR_NOERROR;
@@ -497,7 +497,7 @@ void SvxHlinkDlgMarkWnd::ClearTree()
|*
|************************************************************************/
-SvTreeListEntry* SvxHlinkDlgMarkWnd::FindEntry (OUString aStrName)
+SvTreeListEntry* SvxHlinkDlgMarkWnd::FindEntry (const OUString& aStrName)
{
sal_Bool bFound=sal_False;
SvTreeListEntry* pEntry = maLbTree.First();
@@ -520,7 +520,7 @@ SvTreeListEntry* SvxHlinkDlgMarkWnd::FindEntry (OUString aStrName)
|*
|************************************************************************/
-bool SvxHlinkDlgMarkWnd::SelectEntry(OUString aStrMark)
+bool SvxHlinkDlgMarkWnd::SelectEntry(const OUString& aStrMark)
{
SvTreeListEntry* pEntry = FindEntry(aStrMark);
if (!pEntry)
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 7192521be328..90cac374df88 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -352,7 +352,7 @@ void SFTreeListBox::ExpandAllTrees()
SAL_WNODEPRECATED_DECLARATIONS_PUSH
SvTreeListEntry * SFTreeListBox::insertEntry(
OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent,
- bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, OUString factoryURL )
+ bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, const OUString& factoryURL )
{
SvTreeListEntry * p;
if( nBitmap == RID_CUIIMG_DOC && !factoryURL.isEmpty() )
@@ -454,7 +454,7 @@ CuiInputDialog::CuiInputDialog(Window * pParent, sal_uInt16 nMode )
// ScriptOrgDialog ------------------------------------------------------------
-SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, OUString language )
+SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, const OUString& language )
: SfxModalDialog(pParent, "ScriptOrganizerDialog",
"cui/ui/scriptorganizer.ui")
, m_sLanguage(language)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 28622add604c..03d4ca9cca59 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -283,8 +283,8 @@ class AbstractSvxHlinkDlgMarkWnd_Impl : public AbstractSvxHlinkDlgMarkWnd
virtual void SetSizePixel( const Size& rNewSize );
virtual Size GetSizePixel() const;
virtual bool MoveTo( Point aNewPos ) const;
- virtual bool ConnectToDialog( bool bDoit = true )const;
- virtual void RefreshTree ( const OUString& aStrURL ) ;
+ virtual bool ConnectToDialog( bool bDoit = true ) const;
+ virtual void RefreshTree ( const OUString& aStrURL );
virtual void SelectEntry ( const OUString& aStrMark );
virtual sal_uInt16 SetError( sal_uInt16 nError) ;
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index ab5a31cc7826..1a0292f50191 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -273,8 +273,8 @@ public:
virtual void StateChanged(StateChangedType nStateChange);
void SetLanguage(LanguageType eSet);
- void DeleteEntry(OUString sShort, OUString sLong);
- void NewEntry(OUString sShort, OUString sLong, bool bKeepSourceFormatting);
+ void DeleteEntry(const OUString& sShort, const OUString& sLong);
+ void NewEntry(const OUString& sShort, const OUString& sLong, bool bKeepSourceFormatting);
};
// class OfaAutocorrExceptPage ---------------------------------------------
diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx
index 4e7652a8ef6b..ecc027190462 100644
--- a/cui/source/inc/hlmarkwn.hxx
+++ b/cui/source/inc/hlmarkwn.hxx
@@ -71,10 +71,10 @@ private:
sal_uInt16 mnError;
protected:
- sal_Bool RefreshFromDoc( OUString aURL );
+ sal_Bool RefreshFromDoc( const OUString& aURL );
void RestoreLastSelection();
- SvTreeListEntry* FindEntry(OUString aStrName);
+ SvTreeListEntry* FindEntry(const OUString& aStrName);
void ClearTree();
int FillTree( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xLinks, SvTreeListEntry* pParentEntry =NULL );
@@ -88,8 +88,8 @@ public:
~SvxHlinkDlgMarkWnd();
sal_Bool MoveTo ( Point aNewPos );
- void RefreshTree(OUString aStrURL);
- bool SelectEntry(OUString aStrMark);
+ void RefreshTree(const OUString& aStrURL);
+ bool SelectEntry(const OUString& aStrMark);
sal_Bool ConnectToDialog( sal_Bool bDoit = sal_True );
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index 89db028fed58..bb3fa60f0916 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -86,7 +86,7 @@ public:
SvTreeListEntry * pParent,
bool bChildrenOnDemand,
std::auto_ptr< SFEntry > aUserData,
- OUString factoryURL );
+ const OUString& factoryURL );
SvTreeListEntry * insertEntry(OUString const & rText, sal_uInt16 nBitmap,
SvTreeListEntry * pParent,
bool bChildrenOnDemand,
@@ -177,7 +177,7 @@ protected:
public:
// prob need another arg in the ctor
// to specify the language or provider
- SvxScriptOrgDialog( Window* pParent, OUString language );
+ SvxScriptOrgDialog( Window* pParent, const OUString& language );
~SvxScriptOrgDialog();
virtual short Execute();
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 6e0a0f345f7e..80504a5395fb 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -381,7 +381,7 @@ void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAcces
}
}
-Reference< XNameAccess > CuiAboutConfigTabPage::getConfigAccess( OUString sNodePath, sal_Bool bUpdate )
+Reference< XNameAccess > CuiAboutConfigTabPage::getConfigAccess( const OUString& sNodePath, sal_Bool bUpdate )
{
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx
index 0f8027219b1b..135fc21e39c5 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -62,7 +62,7 @@ public:
void InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue);
void Reset(/* const SfxItemSet&*/ );
void FillItems(const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& xNameAccess);
- com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > getConfigAccess( OUString sNodePath, sal_Bool bUpdate );
+ com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > getConfigAccess( const OUString& sNodePath, sal_Bool bUpdate );
virtual sal_Bool FillItemSet( /* SfxItemSet& rSet*/ );
virtual Size GetOptimalSize() const;
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 8297b609965b..d0cac4e3cc4d 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -130,10 +130,11 @@ static sal_Int32 lcl_SeqGetEntryPos(
return i < nLen ? i : -1;
}
-static void lcl_OpenURL( OUString sURL )
+static void lcl_OpenURL( const OUString& _sURL )
{
- if ( !sURL.isEmpty() )
+ if ( !_sURL.isEmpty() )
{
+ OUString sURL = _sURL;
localizeWebserviceURI(sURL);
try
{
@@ -200,7 +201,7 @@ class ModuleUserData_Impl
OUString sImplName;
public:
- ModuleUserData_Impl( OUString sImpName, sal_Bool bIsParent, sal_Bool bChecked, sal_uInt8 nSetType, sal_uInt8 nSetIndex ) :
+ ModuleUserData_Impl( const OUString& sImpName, sal_Bool bIsParent, sal_Bool bChecked, sal_uInt8 nSetType, sal_uInt8 nSetIndex ) :
bParent(bIsParent),
bIsChecked(bChecked),
nType(nSetType),
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index e4b6e58a6706..b9490de6c6a4 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -345,7 +345,7 @@ sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet )
-sal_Bool isODFFormat( OUString sFilter )
+sal_Bool isODFFormat( const OUString& sFilter )
{
static const char* aODFFormats[] =
{
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 8611fc758a19..300f8766095a 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1130,7 +1130,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox)
return 0;
};
-void OfaAutocorrReplacePage::NewEntry(OUString sShort, OUString sLong, bool bKeepSourceFormatting)
+void OfaAutocorrReplacePage::NewEntry(const OUString& sShort, const OUString& sLong, bool bKeepSourceFormatting)
{
DoubleStringArray& rNewArray = aChangesTable[eLang].aNewEntries;
for (sal_uInt32 i = 0; i < rNewArray.size(); i++)
@@ -1160,7 +1160,7 @@ void OfaAutocorrReplacePage::NewEntry(OUString sShort, OUString sLong, bool bKee
rNewArray.back().pUserData = &bHasSelectionText;
}
-void OfaAutocorrReplacePage::DeleteEntry(OUString sShort, OUString sLong)
+void OfaAutocorrReplacePage::DeleteEntry(const OUString& sShort, const OUString& sLong)
{
DoubleStringArray& rNewArray = aChangesTable[eLang].aNewEntries;
for (sal_uInt32 i = 0; i < rNewArray.size(); i++)