diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-13 15:26:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-15 09:21:47 +0100 |
commit | 684d499a42215bc50fcbce3e233a16c3282d9eb6 (patch) | |
tree | 0b67a4b0cb5bee787413148b2d449ff7b4523b14 /unotools | |
parent | 5bc86df0c8a013af21d5fbc8f6e024db6f0b9936 (diff) |
make it a const array
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/configmgr.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index 7f411eab6803..913f809aa412 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -64,8 +64,8 @@ using ::rtl::OString; #define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)) //----------------------------------------------------------------------------- -const char* pConfigBaseURL = "/org.openoffice."; -const char* pAccessSrvc = "com.sun.star.configuration.ConfigurationUpdateAccess"; +const char aConfigBaseURL[] = "/org.openoffice."; +const char aAccessSrvc[] = "com.sun.star.configuration.ConfigurationUpdateAccess"; namespace { @@ -252,7 +252,7 @@ Reference< XHierarchicalNameAccess> ConfigManager::AcquireTree(utl::ConfigItem& } OSL_ENSURE(bFound, "AcquireTree: ConfigItem unknown!"); #endif - OUString sPath(OUString::createFromAscii(pConfigBaseURL)); + OUString sPath(RTL_CONSTASCII_USTRINGPARAM(aConfigBaseURL)); sPath += rCfgItem.GetSubTreeName(); Sequence< Any > aArgs(2); Any* pArgs = aArgs.getArray(); @@ -287,7 +287,7 @@ Reference< XHierarchicalNameAccess> ConfigManager::AcquireTree(utl::ConfigItem& try { xIFace = xCfgProvider->createInstanceWithArguments( - OUString::createFromAscii(pAccessSrvc), + OUString(RTL_CONSTASCII_USTRINGPARAM(aAccessSrvc)), aArgs); } catch (const Exception& rEx) @@ -357,7 +357,7 @@ ConfigManager& ConfigManager::GetConfigManager() rtl::OUString ConfigManager::GetConfigBaseURL() { - return OUString::createFromAscii(pConfigBaseURL); + return OUString(RTL_CONSTASCII_USTRINGPARAM(aConfigBaseURL)); } Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp) @@ -463,7 +463,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp) } } - OUString sPath = OUString::createFromAscii(pConfigBaseURL); + OUString sPath(RTL_CONSTASCII_USTRINGPARAM(aConfigBaseURL)); switch(eProp) { case LOCALE: sPath += UNISTRING("Setup/L10N"); break; @@ -493,7 +493,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp) try { xIFace = xCfgProvider->createInstanceWithArguments( - OUString::createFromAscii(pAccessSrvc), + OUString(RTL_CONSTASCII_USTRINGPARAM(aAccessSrvc)), aArgs); } @@ -625,7 +625,7 @@ Reference< XHierarchicalNameAccess> ConfigManager::GetHierarchyAccess(const OUSt try { xIFace = xCfgProvider->createInstanceWithArguments( - OUString::createFromAscii(pAccessSrvc), + OUString(RTL_CONSTASCII_USTRINGPARAM(aAccessSrvc)), aArgs); } #if OSL_DEBUG_LEVEL > 1 @@ -648,7 +648,7 @@ Reference< XHierarchicalNameAccess> ConfigManager::GetHierarchyAccess(const OUSt Any ConfigManager::GetLocalProperty(const OUString& rProperty) { - OUString sPath(OUString::createFromAscii(pConfigBaseURL)); + OUString sPath(RTL_CONSTASCII_USTRINGPARAM(aConfigBaseURL)); sPath += rProperty; OUString sNode, sProperty; @@ -680,7 +680,7 @@ Any ConfigManager::GetLocalProperty(const OUString& rProperty) void ConfigManager::PutLocalProperty(const OUString& rProperty, const Any& rValue) { - OUString sPath(OUString::createFromAscii(pConfigBaseURL)); + OUString sPath(RTL_CONSTASCII_USTRINGPARAM(aConfigBaseURL)); sPath += rProperty; OUString sNode, sProperty; |