diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:22:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:00:26 +0000 |
commit | 8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch) | |
tree | 2dbddceebf0f96492adc5652697e8efce8a8ba06 /extensions/source/resource | |
parent | fe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff) |
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'extensions/source/resource')
-rw-r--r-- | extensions/source/resource/ResourceIndexAccess.cxx | 14 | ||||
-rw-r--r-- | extensions/source/resource/oooresourceloader.cxx | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/extensions/source/resource/ResourceIndexAccess.cxx b/extensions/source/resource/ResourceIndexAccess.cxx index 66c263df941c..c9b9a581b36e 100644 --- a/extensions/source/resource/ResourceIndexAccess.cxx +++ b/extensions/source/resource/ResourceIndexAccess.cxx @@ -122,7 +122,7 @@ Reference<XInterface> initResourceIndexAccess(ResourceIndexAccess* pResourceInde // and will crash on getByIndex calls, better just give back an empty Reference // so that such ResourceStringIndexAccess instances are never release into the wild throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("resource manager could not get initialized")), + OUString("resource manager could not get initialized"), /* xResult */ Reference<XInterface>()); return xResult; } @@ -153,8 +153,8 @@ Sequence<OUString> SAL_CALL ResourceIndexAccess::getElementNames( ) if( aResult.getLength() == 0) { aResult.realloc(2); - aResult[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("String")); - aResult[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("StringList")); + aResult[0] = OUString("String"); + aResult[1] = OUString("StringList"); } return aResult; } @@ -174,7 +174,7 @@ Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx) SolarMutexGuard aGuard; if(!m_pResMgr.get()) throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("resource manager not available")), + OUString("resource manager not available"), Reference<XInterface>()); const ResId aId(static_cast<sal_uInt16>(nIdx), *m_pResMgr); @@ -182,7 +182,7 @@ Any SAL_CALL ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx) if(!m_pResMgr->IsAvailable(aId)) throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("string resource for id not available")), + OUString("string resource for id not available"), Reference<XInterface>()); return makeAny(OUString(String(aId))); @@ -197,14 +197,14 @@ Any SAL_CALL ResourceStringListIndexAccess::getByIndex(sal_Int32 nIdx) if(!m_pResMgr.get()) throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("resource manager not available")), + OUString("resource manager not available"), Reference<XInterface>()); const ResId aId(static_cast<sal_uInt16>(nIdx), *m_pResMgr); aId.SetRT(RSC_STRINGARRAY); if(!m_pResMgr->IsAvailable(aId)) throw RuntimeException( - OUString(RTL_CONSTASCII_USTRINGPARAM("string list resource for id not available")), + OUString("string list resource for id not available"), Reference<XInterface>()); const ResStringArray aStringList(aId); Sequence<PropertyValue> aPropList(aStringList.Count()); diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx index 2c0920c954cf..25900c823f62 100644 --- a/extensions/source/resource/oooresourceloader.cxx +++ b/extensions/source/resource/oooresourceloader.cxx @@ -202,7 +202,7 @@ namespace extensions { namespace resource } // supported resource types so far: strings - m_aResourceTypes[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "string" ) ) ] = + m_aResourceTypes[ ::rtl::OUString( "string" ) ] = ResourceTypePtr( new StringResourceAccess ); } |