Kaydet (Commit) 12bb4fdd authored tarafından Noel Grandin's avatar Noel Grandin

cui: prefer passing OUString by reference

Change-Id: I1a4d36a329a0eac8b9bb3d9b0a5434ffc843bde2
üst 7e8af4b2
...@@ -56,7 +56,7 @@ struct DocumentTypeData ...@@ -56,7 +56,7 @@ struct DocumentTypeData
{ {
OUString aStrURL; OUString aStrURL;
OUString aStrExt; OUString aStrExt;
DocumentTypeData (OUString aURL, OUString aExt) : aStrURL(aURL), aStrExt(aExt) DocumentTypeData (const OUString& aURL, const OUString& aExt) : aStrURL(aURL), aStrExt(aExt)
{} {}
}; };
......
...@@ -56,7 +56,7 @@ struct TargetData ...@@ -56,7 +56,7 @@ struct TargetData
OUString aUStrLinkname; OUString aUStrLinkname;
bool bIsTarget; bool bIsTarget;
TargetData (OUString aUStrLName, bool bTarget) TargetData (const OUString& aUStrLName, bool bTarget)
: bIsTarget(bTarget) : bIsTarget(bTarget)
{ {
if (bIsTarget) if (bIsTarget)
...@@ -269,7 +269,7 @@ void SvxHlinkDlgMarkWnd::RestoreLastSelection() ...@@ -269,7 +269,7 @@ void SvxHlinkDlgMarkWnd::RestoreLastSelection()
|* |*
|************************************************************************/ |************************************************************************/
void SvxHlinkDlgMarkWnd::RefreshTree (OUString aStrURL) void SvxHlinkDlgMarkWnd::RefreshTree (const OUString& aStrURL)
{ {
OUString aUStrURL; OUString aUStrURL;
...@@ -307,7 +307,7 @@ void SvxHlinkDlgMarkWnd::RefreshTree (OUString aStrURL) ...@@ -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; mnError = LERR_NOERROR;
...@@ -497,7 +497,7 @@ void SvxHlinkDlgMarkWnd::ClearTree() ...@@ -497,7 +497,7 @@ void SvxHlinkDlgMarkWnd::ClearTree()
|* |*
|************************************************************************/ |************************************************************************/
SvTreeListEntry* SvxHlinkDlgMarkWnd::FindEntry (OUString aStrName) SvTreeListEntry* SvxHlinkDlgMarkWnd::FindEntry (const OUString& aStrName)
{ {
sal_Bool bFound=sal_False; sal_Bool bFound=sal_False;
SvTreeListEntry* pEntry = maLbTree.First(); SvTreeListEntry* pEntry = maLbTree.First();
...@@ -520,7 +520,7 @@ SvTreeListEntry* SvxHlinkDlgMarkWnd::FindEntry (OUString aStrName) ...@@ -520,7 +520,7 @@ SvTreeListEntry* SvxHlinkDlgMarkWnd::FindEntry (OUString aStrName)
|* |*
|************************************************************************/ |************************************************************************/
bool SvxHlinkDlgMarkWnd::SelectEntry(OUString aStrMark) bool SvxHlinkDlgMarkWnd::SelectEntry(const OUString& aStrMark)
{ {
SvTreeListEntry* pEntry = FindEntry(aStrMark); SvTreeListEntry* pEntry = FindEntry(aStrMark);
if (!pEntry) if (!pEntry)
......
...@@ -352,7 +352,7 @@ void SFTreeListBox::ExpandAllTrees() ...@@ -352,7 +352,7 @@ void SFTreeListBox::ExpandAllTrees()
SAL_WNODEPRECATED_DECLARATIONS_PUSH SAL_WNODEPRECATED_DECLARATIONS_PUSH
SvTreeListEntry * SFTreeListBox::insertEntry( SvTreeListEntry * SFTreeListBox::insertEntry(
OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, 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; SvTreeListEntry * p;
if( nBitmap == RID_CUIIMG_DOC && !factoryURL.isEmpty() ) if( nBitmap == RID_CUIIMG_DOC && !factoryURL.isEmpty() )
...@@ -454,7 +454,7 @@ CuiInputDialog::CuiInputDialog(Window * pParent, sal_uInt16 nMode ) ...@@ -454,7 +454,7 @@ CuiInputDialog::CuiInputDialog(Window * pParent, sal_uInt16 nMode )
// ScriptOrgDialog ------------------------------------------------------------ // ScriptOrgDialog ------------------------------------------------------------
SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, OUString language ) SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, const OUString& language )
: SfxModalDialog(pParent, "ScriptOrganizerDialog", : SfxModalDialog(pParent, "ScriptOrganizerDialog",
"cui/ui/scriptorganizer.ui") "cui/ui/scriptorganizer.ui")
, m_sLanguage(language) , m_sLanguage(language)
......
...@@ -283,8 +283,8 @@ class AbstractSvxHlinkDlgMarkWnd_Impl : public AbstractSvxHlinkDlgMarkWnd ...@@ -283,8 +283,8 @@ class AbstractSvxHlinkDlgMarkWnd_Impl : public AbstractSvxHlinkDlgMarkWnd
virtual void SetSizePixel( const Size& rNewSize ); virtual void SetSizePixel( const Size& rNewSize );
virtual Size GetSizePixel() const; virtual Size GetSizePixel() const;
virtual bool MoveTo( Point aNewPos ) const; virtual bool MoveTo( Point aNewPos ) const;
virtual bool ConnectToDialog( bool bDoit = true )const; virtual bool ConnectToDialog( bool bDoit = true ) const;
virtual void RefreshTree ( const OUString& aStrURL ) ; virtual void RefreshTree ( const OUString& aStrURL );
virtual void SelectEntry ( const OUString& aStrMark ); virtual void SelectEntry ( const OUString& aStrMark );
virtual sal_uInt16 SetError( sal_uInt16 nError) ; virtual sal_uInt16 SetError( sal_uInt16 nError) ;
......
...@@ -273,8 +273,8 @@ public: ...@@ -273,8 +273,8 @@ public:
virtual void StateChanged(StateChangedType nStateChange); virtual void StateChanged(StateChangedType nStateChange);
void SetLanguage(LanguageType eSet); void SetLanguage(LanguageType eSet);
void DeleteEntry(OUString sShort, OUString sLong); void DeleteEntry(const OUString& sShort, const OUString& sLong);
void NewEntry(OUString sShort, OUString sLong, bool bKeepSourceFormatting); void NewEntry(const OUString& sShort, const OUString& sLong, bool bKeepSourceFormatting);
}; };
// class OfaAutocorrExceptPage --------------------------------------------- // class OfaAutocorrExceptPage ---------------------------------------------
......
...@@ -71,10 +71,10 @@ private: ...@@ -71,10 +71,10 @@ private:
sal_uInt16 mnError; sal_uInt16 mnError;
protected: protected:
sal_Bool RefreshFromDoc( OUString aURL ); sal_Bool RefreshFromDoc( const OUString& aURL );
void RestoreLastSelection(); void RestoreLastSelection();
SvTreeListEntry* FindEntry(OUString aStrName); SvTreeListEntry* FindEntry(const OUString& aStrName);
void ClearTree(); void ClearTree();
int FillTree( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xLinks, SvTreeListEntry* pParentEntry =NULL ); int FillTree( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xLinks, SvTreeListEntry* pParentEntry =NULL );
...@@ -88,8 +88,8 @@ public: ...@@ -88,8 +88,8 @@ public:
~SvxHlinkDlgMarkWnd(); ~SvxHlinkDlgMarkWnd();
sal_Bool MoveTo ( Point aNewPos ); sal_Bool MoveTo ( Point aNewPos );
void RefreshTree(OUString aStrURL); void RefreshTree(const OUString& aStrURL);
bool SelectEntry(OUString aStrMark); bool SelectEntry(const OUString& aStrMark);
sal_Bool ConnectToDialog( sal_Bool bDoit = sal_True ); sal_Bool ConnectToDialog( sal_Bool bDoit = sal_True );
......
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
SvTreeListEntry * pParent, SvTreeListEntry * pParent,
bool bChildrenOnDemand, bool bChildrenOnDemand,
std::auto_ptr< SFEntry > aUserData, std::auto_ptr< SFEntry > aUserData,
OUString factoryURL ); const OUString& factoryURL );
SvTreeListEntry * insertEntry(OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * insertEntry(OUString const & rText, sal_uInt16 nBitmap,
SvTreeListEntry * pParent, SvTreeListEntry * pParent,
bool bChildrenOnDemand, bool bChildrenOnDemand,
...@@ -177,7 +177,7 @@ protected: ...@@ -177,7 +177,7 @@ protected:
public: public:
// prob need another arg in the ctor // prob need another arg in the ctor
// to specify the language or provider // to specify the language or provider
SvxScriptOrgDialog( Window* pParent, OUString language ); SvxScriptOrgDialog( Window* pParent, const OUString& language );
~SvxScriptOrgDialog(); ~SvxScriptOrgDialog();
virtual short Execute(); virtual short Execute();
......
...@@ -381,7 +381,7 @@ void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAcces ...@@ -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() ); uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
......
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
void InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue); void InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue);
void Reset(/* const SfxItemSet&*/ ); void Reset(/* const SfxItemSet&*/ );
void FillItems(const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& xNameAccess); 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 sal_Bool FillItemSet( /* SfxItemSet& rSet*/ );
virtual Size GetOptimalSize() const; virtual Size GetOptimalSize() const;
......
...@@ -130,10 +130,11 @@ static sal_Int32 lcl_SeqGetEntryPos( ...@@ -130,10 +130,11 @@ static sal_Int32 lcl_SeqGetEntryPos(
return i < nLen ? i : -1; 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); localizeWebserviceURI(sURL);
try try
{ {
...@@ -200,7 +201,7 @@ class ModuleUserData_Impl ...@@ -200,7 +201,7 @@ class ModuleUserData_Impl
OUString sImplName; OUString sImplName;
public: 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), bParent(bIsParent),
bIsChecked(bChecked), bIsChecked(bChecked),
nType(nSetType), nType(nSetType),
......
...@@ -345,7 +345,7 @@ sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet ) ...@@ -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[] = static const char* aODFFormats[] =
{ {
......
...@@ -1130,7 +1130,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox) ...@@ -1130,7 +1130,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox)
return 0; 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; DoubleStringArray& rNewArray = aChangesTable[eLang].aNewEntries;
for (sal_uInt32 i = 0; i < rNewArray.size(); i++) for (sal_uInt32 i = 0; i < rNewArray.size(); i++)
...@@ -1160,7 +1160,7 @@ void OfaAutocorrReplacePage::NewEntry(OUString sShort, OUString sLong, bool bKee ...@@ -1160,7 +1160,7 @@ void OfaAutocorrReplacePage::NewEntry(OUString sShort, OUString sLong, bool bKee
rNewArray.back().pUserData = &bHasSelectionText; 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; DoubleStringArray& rNewArray = aChangesTable[eLang].aNewEntries;
for (sal_uInt32 i = 0; i < rNewArray.size(); i++) for (sal_uInt32 i = 0; i < rNewArray.size(); i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment