From 8a0685d49f679d6f98de2f357f1ec74590573852 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 29 Apr 2012 23:36:57 +0100 Subject: make ResId::toString a non-static member Change-Id: I756c0a19bea7b1cc0e290d9f382a04d655819bfb --- sfx2/inc/sfx2/objface.hxx | 2 +- sfx2/inc/sfx2/sfxresid.hxx | 2 ++ sfx2/source/appl/lnkbase2.cxx | 2 +- sfx2/source/appl/shutdownicon.cxx | 6 ++---- sfx2/source/doc/doctempl.cxx | 4 ++-- sfx2/source/doc/docvor.cxx | 2 +- sfx2/source/doc/objmisc.cxx | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'sfx2') diff --git a/sfx2/inc/sfx2/objface.hxx b/sfx2/inc/sfx2/objface.hxx index c4d38f288345..bf03889b7e8e 100644 --- a/sfx2/inc/sfx2/objface.hxx +++ b/sfx2/inc/sfx2/objface.hxx @@ -82,7 +82,7 @@ public: const char* GetClassName() const { return pName; } bool HasName() const { return 0 != aNameResId.GetId(); } rtl::OUString GetName() const - { return HasName() ? ResId::toString(aNameResId) : rtl::OUString(); } + { return HasName() ? aNameResId.toString() : rtl::OUString(); } ResMgr* GetResMgr() const { return aNameResId.GetResMgr(); } diff --git a/sfx2/inc/sfx2/sfxresid.hxx b/sfx2/inc/sfx2/sfxresid.hxx index 42a5593606c2..fc860e8e1d02 100644 --- a/sfx2/inc/sfx2/sfxresid.hxx +++ b/sfx2/inc/sfx2/sfxresid.hxx @@ -39,6 +39,8 @@ public: static void DeleteResMgr(); }; +#define SFX2_RESSTR(x) SfxResId(x).toString() + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index cf1a651a3160..842a83ec0fa8 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -494,7 +494,7 @@ bool SvBaseLink::ExecuteEdit( const String& _rNewName ) pImpl->m_pLinkMgr->GetDisplayNames( this, &sApp, &sTopic, &sItem ); if( nObjType == OBJECT_CLIENT_DDE ) { - sError = SfxResId( STR_DDE_ERROR ); + sError = SFX2_RESSTR(STR_DDE_ERROR); sal_uInt16 nFndPos = sError.Search( '%' ); if( STRING_NOTFOUND != nFndPos ) diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index be58cbca81c0..2fec49473611 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -390,8 +390,7 @@ OUString ShutdownIcon::GetResString( int id ) if( !m_pResMgr || !m_pResMgr->IsAvailable( aResId ) ) return OUString(); - ResId aRes( id, *m_pResMgr ); - return ResId::toString( aRes ); + return ResId(id, *m_pResMgr).toString(); } // --------------------------------------------------------------------------- @@ -831,8 +830,7 @@ rtl::OUString ShutdownIcon::getShortcutName() if( pMgr ) { ::SolarMutexGuard aGuard; - SfxResId aRes( STR_QUICKSTART_LNKNAME ); - aShortcutName = ResId::toString( aRes ); + aShortcutName = SFX2_RESSTR(STR_QUICKSTART_LNKNAME); } #ifdef WNT aShortcutName += OUString( RTL_CONSTASCII_USTRINGPARAM( ".lnk" ) ); diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 37edcd03a2e4..3b48b431b294 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -599,8 +599,8 @@ OUString SfxDocumentTemplates::ConvertResourceString ( { for( int i = 0; i < nCount; ++i ) { - if( rString == ResId::toString( SfxResId( nSourceResIds + i) ) ) - return ResId::toString( SfxResId( nDestResIds + i ) ); + if( rString == SFX2_RESSTR(nSourceResIds + i)) + return SFX2_RESSTR(nDestResIds + i); } return rString; } diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 6ab4cb41919e..5ed00278bebf 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -1766,7 +1766,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu ) { if(0 == pFocusBox->GetModel()->GetDepth(pEntry)) { - const rtl::OUString aNoName(ResId::toString(SfxResId(STR_NONAME))); + const rtl::OUString aNoName(SFX2_RESSTR(STR_NONAME)); SvLBoxEntry* pParent = pFocusBox->GetParent(pEntry); rtl::OUString aName(aNoName); sal_Int32 n = 1; diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index b7c8c51eb360..2d6398b3da69 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -869,7 +869,7 @@ String SfxObjectShell::GetTitle return X(pImp->aTitle); // must it be numbered? - rtl::OUString aNoName(ResId::toString(SfxResId(STR_NONAME))); + rtl::OUString aNoName(SFX2_RESSTR(STR_NONAME)); if (pImp->bIsNamedVisible) { // Append number -- cgit