diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-31 10:29:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-31 10:31:25 +0000 |
commit | aeeabc36fd0a4a71238c8c3df2e80ea324f9bac0 (patch) | |
tree | e329e090adf73c37d18897ddacbd6b1e07382512 /unotools/source/config/eventcfg.cxx | |
parent | 40f186a73225f0fcbce828c97d6395dfffb79a90 (diff) |
loplugin:oncevar in unoxml..toolkit
Change-Id: I3b97665908be0a44d24192433bdc9c2bd9008736
Reviewed-on: https://gerrit.libreoffice.org/30431
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/config/eventcfg.cxx')
-rw-r--r-- | unotools/source/config/eventcfg.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index 6b70a39e902d..f9e846ea2bf6 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -40,7 +40,6 @@ using namespace ::osl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star; -static const char ROOTNODE_EVENTS[] = "Office.Events/ApplicationEvents"; #define PATHDELIMITER "/" #define SETNODE_BINDINGS "Bindings" #define PROPERTYNAME_BINDINGURL "BindingURL" @@ -107,7 +106,7 @@ public: GlobalEventConfig_Impl::GlobalEventConfig_Impl() - : ConfigItem( ROOTNODE_EVENTS, ConfigItemMode::ImmediateUpdate ) + : ConfigItem( "Office.Events/ApplicationEvents", ConfigItemMode::ImmediateUpdate ) { // the supported event names for (const GlobalEventId id : o3tl::enumrange<GlobalEventId>()) @@ -169,15 +168,15 @@ void GlobalEventConfig_Impl::ImplCommit() ClearNodeSet( SETNODE_BINDINGS ); Sequence< beans::PropertyValue > seqValues( 1 ); OUString sNode; - static const char sPrefix[] = SETNODE_BINDINGS PATHDELIMITER "BindingType['"; - static const char sPostfix[] = "']" PATHDELIMITER PROPERTYNAME_BINDINGURL; //step through the list of events for(int i=0;it!=it_end;++it,++i) { //no point in writing out empty bindings! if(it->second.isEmpty() ) continue; - sNode = sPrefix + it->first + sPostfix; + sNode = SETNODE_BINDINGS PATHDELIMITER "BindingType['" + + it->first + + "']" PATHDELIMITER PROPERTYNAME_BINDINGURL; OSL_TRACE("writing binding for: %s",OUStringToOString(sNode , RTL_TEXTENCODING_ASCII_US ).pData->buffer); seqValues[ 0 ].Name = sNode; seqValues[ 0 ].Value <<= it->second; |