summaryrefslogtreecommitdiff
path: root/unotools/source/config/lingucfg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-31 10:29:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-31 10:31:25 +0000
commitaeeabc36fd0a4a71238c8c3df2e80ea324f9bac0 (patch)
treee329e090adf73c37d18897ddacbd6b1e07382512 /unotools/source/config/lingucfg.cxx
parent40f186a73225f0fcbce828c97d6395dfffb79a90 (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/lingucfg.cxx')
-rw-r--r--unotools/source/config/lingucfg.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 451518e1bb6c..c9d9c639c6a1 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -785,12 +785,7 @@ bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const
static SvtLinguConfigItem *pCfgItem = nullptr;
static sal_Int32 nCfgItemRefCount = 0;
-static const char aG_SupportedDictionaryFormats[] = "SupportedDictionaryFormats";
static const char aG_Dictionaries[] = "Dictionaries";
-static const char aG_Locations[] = "Locations";
-static const char aG_Format[] = "Format";
-static const char aG_Locales[] = "Locales";
-static const char aG_DisabledDictionaries[] = "DisabledDictionaries";
SvtLinguConfig::SvtLinguConfig()
{
@@ -905,7 +900,7 @@ bool SvtLinguConfig::GetSupportedDictionaryFormatsFor(
xNA.set( xNA->getByName("ServiceManager"), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rSetName ), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rSetEntry ), uno::UNO_QUERY_THROW );
- if (xNA->getByName( aG_SupportedDictionaryFormats ) >>= rFormatList)
+ if (xNA->getByName( "SupportedDictionaryFormats" ) >>= rFormatList)
bSuccess = true;
DBG_ASSERT( rFormatList.getLength(), "supported dictionary format list is empty" );
}
@@ -953,9 +948,9 @@ bool SvtLinguConfig::GetDictionaryEntry(
uno::Sequence< OUString > aLocations;
OUString aFormatName;
uno::Sequence< OUString > aLocaleNames;
- bSuccess = (xNA->getByName( aG_Locations ) >>= aLocations) &&
- (xNA->getByName( aG_Format ) >>= aFormatName) &&
- (xNA->getByName( aG_Locales ) >>= aLocaleNames);
+ bSuccess = (xNA->getByName( "Locations" ) >>= aLocations) &&
+ (xNA->getByName( "Format" ) >>= aFormatName) &&
+ (xNA->getByName( "Locales" ) >>= aLocaleNames);
DBG_ASSERT( aLocations.getLength(), "Dictionary locations not set" );
DBG_ASSERT( !aFormatName.isEmpty(), "Dictionary format name not set" );
DBG_ASSERT( aLocaleNames.getLength(), "No locales set for the dictionary" );
@@ -993,7 +988,7 @@ uno::Sequence< OUString > SvtLinguConfig::GetDisabledDictionaries() const
{
uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName("ServiceManager"), uno::UNO_QUERY_THROW );
- xNA->getByName( aG_DisabledDictionaries ) >>= aResult;
+ xNA->getByName( "DisabledDictionaries" ) >>= aResult;
}
catch (uno::Exception &)
{