diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-03 14:15:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-07 06:38:52 +0000 |
commit | 7f509501e9b042aeae0cdcc8e267550a45ab43c2 (patch) | |
tree | 083402ff5d359eaa2df5a0c20dd6efe25ffab3cb /framework/source/loadenv/loadenv.cxx | |
parent | 12ca2d6d32d750abe0d452387c0b51bcedf54f58 (diff) |
loplugin:oncevar in framework
Change-Id: I7528a4afd59a19b069bcad2106ca80f429ef12e0
Reviewed-on: https://gerrit.libreoffice.org/30525
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/loadenv/loadenv.cxx')
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 7610c5f54ae3..c225542be62f 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -726,8 +726,6 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>&, OUStrin void LoadEnv::impl_detectTypeAndFilter() throw(LoadEnvException, css::uno::RuntimeException, std::exception) { - static const char TYPEPROP_PREFERREDFILTER[] = "PreferredFilter"; - static const char FILTERPROP_FLAGS [] = "Flags"; static sal_Int32 FILTERFLAG_TEMPLATEPATH = 16; // SAFE -> @@ -799,7 +797,7 @@ void LoadEnv::impl_detectTypeAndFilter() try { ::comphelper::SequenceAsHashMap lTypeProps(xTypeCont->getByName(sType)); - sFilter = lTypeProps.getUnpackedValueOrDefault(TYPEPROP_PREFERREDFILTER, OUString()); + sFilter = lTypeProps.getUnpackedValueOrDefault("PreferredFilter", OUString()); if (!sFilter.isEmpty()) { // SAFE -> @@ -828,7 +826,7 @@ void LoadEnv::impl_detectTypeAndFilter() try { ::comphelper::SequenceAsHashMap lFilterProps(xFilterCont->getByName(sFilter)); - sal_Int32 nFlags = lFilterProps.getUnpackedValueOrDefault(FILTERPROP_FLAGS, (sal_Int32)0); + sal_Int32 nFlags = lFilterProps.getUnpackedValueOrDefault("Flags", (sal_Int32)0); bIsOwnTemplate = ((nFlags & FILTERFLAG_TEMPLATEPATH) == FILTERFLAG_TEMPLATEPATH); } catch(const css::container::NoSuchElementException&) @@ -1657,8 +1655,6 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::awt::XWindow >& xWindow) { - static const char PACKAGE_SETUP_MODULES[] = "/org.openoffice.Setup/Office/Factories"; - // no window -> action not possible if (!xWindow.is()) return; @@ -1720,7 +1716,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw // get access to the configuration of this office module css::uno::Reference< css::container::XNameAccess > xModuleCfg(::comphelper::ConfigurationHelper::openConfig( xContext, - PACKAGE_SETUP_MODULES, + "/org.openoffice.Setup/Office/Factories", ::comphelper::EConfigurationModes::ReadOnly), css::uno::UNO_QUERY_THROW); |