diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-22 16:10:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-23 10:20:46 +0000 |
commit | ae7b4576d7df85b41c914c14cc87674428d2ac79 (patch) | |
tree | d78111d7823ac56b293f9adb78672271fa672009 /framework | |
parent | 1a412714031bf6cf3f7962b044b2edea74899b46 (diff) |
overly static lingering OUStrings
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/jobs/jobexecutor.cxx | 20 | ||||
-rw-r--r-- | framework/source/services/pathsettings.cxx | 18 |
2 files changed, 19 insertions, 19 deletions
diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx index 22e1da15cf22..9fe0b3da4061 100644 --- a/framework/source/jobs/jobexecutor.cxx +++ b/framework/source/jobs/jobexecutor.cxx @@ -223,12 +223,12 @@ void SAL_CALL JobExecutor::trigger( const ::rtl::OUString& sEvent ) throw(css::u void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent ) throw(css::uno::RuntimeException) { - static ::rtl::OUString EVENT_ON_NEW = DECLARE_ASCII("OnNew" ); // Doc UI event - static ::rtl::OUString EVENT_ON_LOAD = DECLARE_ASCII("OnLoad" ); // Doc UI event - static ::rtl::OUString EVENT_ON_CREATE = DECLARE_ASCII("OnCreate" ); // Doc API event - static ::rtl::OUString EVENT_ON_LOAD_FINISHED = DECLARE_ASCII("OnLoadFinished" ); // Doc API event - static ::rtl::OUString EVENT_ON_DOCUMENT_OPENED = DECLARE_ASCII("onDocumentOpened" ); // Job UI event : OnNew or OnLoad - static ::rtl::OUString EVENT_ON_DOCUMENT_ADDED = DECLARE_ASCII("onDocumentAdded" ); // Job API event : OnCreate or OnLoadFinished + const char EVENT_ON_NEW[] = "OnNew"; // Doc UI event + const char EVENT_ON_LOAD[] = "OnLoad"; // Doc UI event + const char EVENT_ON_CREATE[] = "OnCreate"; // Doc API event + const char EVENT_ON_LOAD_FINISHED[] = "OnLoadFinished"; // Doc API event + ::rtl::OUString EVENT_ON_DOCUMENT_OPENED("onDocumentOpened"); // Job UI event : OnNew or OnLoad + ::rtl::OUString EVENT_ON_DOCUMENT_ADDED("onDocumentAdded"); // Job API event : OnCreate or OnLoadFinished /* SAFE { */ ReadGuard aReadLock(m_aLock); @@ -251,8 +251,8 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent // Special feature: If the events "OnNew" or "OnLoad" occures - we generate our own event "onDocumentOpened". if ( - (aEvent.EventName.equals(EVENT_ON_NEW )) || - (aEvent.EventName.equals(EVENT_ON_LOAD)) + (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_NEW))) || + (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_LOAD))) ) { if (m_lEvents.find(EVENT_ON_DOCUMENT_OPENED) != m_lEvents.end()) @@ -261,8 +261,8 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent // Special feature: If the events "OnCreate" or "OnLoadFinished" occures - we generate our own event "onDocumentAdded". if ( - (aEvent.EventName.equals(EVENT_ON_CREATE )) || - (aEvent.EventName.equals(EVENT_ON_LOAD_FINISHED)) + (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_CREATE))) || + (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_LOAD_FINISHED))) ) { if (m_lEvents.find(EVENT_ON_DOCUMENT_ADDED) != m_lEvents.end()) diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index d70d2b334987..9bdd098a1d9a 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -63,8 +63,8 @@ // ______________________________________________ // non exported const -const ::rtl::OUString CFGPROP_USERPATHS(RTL_CONSTASCII_USTRINGPARAM("UserPaths")); -const ::rtl::OUString CFGPROP_WRITEPATH(RTL_CONSTASCII_USTRINGPARAM("WritePath")); +#define CFGPROP_USERPATHS rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UserPaths")) +#define CFGPROP_WRITEPATH rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WritePath")) /* 0 : old style "Template" string using ";" as seperator @@ -73,9 +73,9 @@ const ::rtl::OUString CFGPROP_WRITEPATH(RTL_CONSTASCII_USTRINGPARAM("WritePath") 3 : write path "Template_write" string */ -const ::rtl::OUString POSTFIX_INTERNAL_PATHS(RTL_CONSTASCII_USTRINGPARAM("_internal")); -const ::rtl::OUString POSTFIX_USER_PATHS(RTL_CONSTASCII_USTRINGPARAM("_user")); -const ::rtl::OUString POSTFIX_WRITE_PATH(RTL_CONSTASCII_USTRINGPARAM("_writable")); +#define POSTFIX_INTERNAL_PATHS rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_internal")) +#define POSTFIX_USER_PATHS rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_user")) +#define POSTFIX_WRITE_PATH rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_writable")) const sal_Int32 IDGROUP_OLDSTYLE = 0; const sal_Int32 IDGROUP_INTERNAL_PATHS = 1; @@ -270,8 +270,8 @@ OUStringList PathSettings::impl_readOldFormat(const ::rtl::OUString& sPath) // NO substitution here ! It's done outside ... PathSettings::PathInfo PathSettings::impl_readNewFormat(const ::rtl::OUString& sPath) { - const static ::rtl::OUString CFGPROP_INTERNALPATHS(RTL_CONSTASCII_USTRINGPARAM("InternalPaths")); - const static ::rtl::OUString CFGPROP_ISSINGLEPATH(RTL_CONSTASCII_USTRINGPARAM("IsSinglePath")); + const ::rtl::OUString CFGPROP_INTERNALPATHS(RTL_CONSTASCII_USTRINGPARAM("InternalPaths")); + const ::rtl::OUString CFGPROP_ISSINGLEPATH(RTL_CONSTASCII_USTRINGPARAM("IsSinglePath")); css::uno::Reference< css::container::XNameAccess > xCfg = fa_getCfgNew(); @@ -1109,7 +1109,7 @@ css::uno::Reference< css::util::XStringSubstitution > PathSettings::fa_getSubsti //----------------------------------------------------------------------------- css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgOld() { - const static ::rtl::OUString CFG_NODE_OLD(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/Path/Current")); + const ::rtl::OUString CFG_NODE_OLD(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/Path/Current")); // SAFE -> ReadGuard aReadLock(m_aLock); @@ -1139,7 +1139,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgOld() //----------------------------------------------------------------------------- css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgNew() { - const static ::rtl::OUString CFG_NODE_NEW(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Paths/Paths")); + const ::rtl::OUString CFG_NODE_NEW(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Paths/Paths")); // SAFE -> ReadGuard aReadLock(m_aLock); |