cui: prefer passing OUString by reference
Change-Id: I1a4d36a329a0eac8b9bb3d9b0a5434ffc843bde2
This commit is contained in:
parent
7e8af4b249
commit
12bb4fdddd
12 changed files with 27 additions and 26 deletions
|
@ -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)
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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) ;
|
||||
|
||||
|
|
|
@ -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 ---------------------------------------------
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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() );
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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[] =
|
||||
{
|
||||
|
|
|
@ -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++)
|
||||
|
|
Loading…
Reference in a new issue