diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/config.hxx | 14 | ||||
-rw-r--r-- | tools/inc/tools/resid.hxx | 10 | ||||
-rw-r--r-- | tools/source/rc/resmgr.cxx | 2 | ||||
-rw-r--r-- | tools/source/string/strucvt.cxx | 12 |
4 files changed, 18 insertions, 20 deletions
diff --git a/tools/inc/tools/config.hxx b/tools/inc/tools/config.hxx index 59b813a83344..a40111838235 100644 --- a/tools/inc/tools/config.hxx +++ b/tools/inc/tools/config.hxx @@ -41,14 +41,14 @@ struct ImplGroupData; class TOOLS_DLLPUBLIC Config { private: - XubString maFileName; - rtl::OString maGroupName; + rtl::OUString maFileName; + rtl::OString maGroupName; ImplConfigData* mpData; ImplGroupData* mpActGroup; - sal_uIntPtr mnDataUpdateId; - sal_uInt16 mnLockCount; - sal_Bool mbPersistence; - sal_Bool mbDummy1; + sal_uIntPtr mnDataUpdateId; + sal_uInt16 mnLockCount; + sal_Bool mbPersistence; + sal_Bool mbDummy1; #ifdef _CONFIG_CXX TOOLS_DLLPRIVATE sal_Bool ImplUpdateConfig() const; @@ -59,7 +59,7 @@ public: Config( const XubString& rFileName ); ~Config(); - const XubString& GetPathName() const { return maFileName; } + const rtl::OUString& GetPathName() const { return maFileName; } void SetGroup(const rtl::OString& rGroup); const rtl::OString& GetGroup() const { return maGroupName; } diff --git a/tools/inc/tools/resid.hxx b/tools/inc/tools/resid.hxx index 2230556354ae..a96c1e21f5ef 100644 --- a/tools/inc/tools/resid.hxx +++ b/tools/inc/tools/resid.hxx @@ -29,8 +29,9 @@ #ifndef _TOOLS_RESID_HXX #define _TOOLS_RESID_HXX -#include <tools/solar.h> #include <osl/diagnose.h> +#include <rtl/ustring.hxx> +#include <tools/solar.h> #include "tools/toolsdllapi.h" struct RSHEADER_TYPE; @@ -44,10 +45,6 @@ class ResMgr; //- ResId - //--------- -namespace rtl { - class OUString; -} - class ResId { /* @@ -164,7 +161,8 @@ class ResId sal_uInt32 GetId() const { return m_nResId & ~RSC_DONTRELEASE; } RSHEADER_TYPE* GetpResource() const { return m_pResource; } - static TOOLS_DLLPUBLIC rtl::OUString toString(const ResId& rId); + TOOLS_DLLPUBLIC rtl::OUString toString() const; + TOOLS_DLLPUBLIC operator rtl::OUString() const { return toString(); } }; #endif // _RESID_HXX diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 5a70c10e95f1..2c315f189596 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -737,7 +737,7 @@ UniString GetTypeRes_Impl( const ResId& rTypeId ) rTypeId.SetRT( RSC_STRING ); if ( rTypeId.GetResMgr()->IsAvailable( rTypeId ) ) { - aTypStr = ResId::toString(rTypeId); + aTypStr = rTypeId.toString(); // Versions Resource Klassenzeiger ans Ende setzen rTypeId.GetResMgr()->Increment( sizeof( RSHEADER_TYPE ) ); } diff --git a/tools/source/string/strucvt.cxx b/tools/source/string/strucvt.cxx index 94884db24c27..f8d2dbd0d6b3 100644 --- a/tools/source/string/strucvt.cxx +++ b/tools/source/string/strucvt.cxx @@ -124,7 +124,7 @@ UniString& UniString::Assign( const rtl::OUString& rStr ) UniString::UniString( const ResId& rResId ) : mpData(NULL) { - rtl::OUString sStr(ResId::toString(rResId)); + rtl::OUString sStr(rResId.toString()); DBG_CTOR( UniString, DbgCheckUniString ); @@ -144,19 +144,19 @@ UniString::UniString( const ResId& rResId ) } -rtl::OUString ResId::toString(const ResId& rResId) +rtl::OUString ResId::toString() const { - rResId.SetRT( RSC_STRING ); - ResMgr* pResMgr = rResId.GetResMgr(); + SetRT( RSC_STRING ); + ResMgr* pResMgr = GetResMgr(); - if ( !pResMgr || !pResMgr->GetResource( rResId ) ) + if ( !pResMgr || !pResMgr->GetResource( *this ) ) { rtl::OUString sRet; #if OSL_DEBUG_LEVEL > 0 sRet = rtl::OUStringBuffer(). appendAscii(RTL_CONSTASCII_STRINGPARAM("<resource id ")). - append(static_cast<sal_Int32>(rResId.GetId())). + append(static_cast<sal_Int32>(GetId())). appendAscii(RTL_CONSTASCII_STRINGPARAM(" not found>")). makeStringAndClear(); #endif |