summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-11-11 22:48:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-11-11 22:48:55 +0100
commit533e3c648db45ba7c7804928a5759e2b60fdb9a2 (patch)
treefc87b9b04ff771e1cc002874971e278ea95d4bb7
parentcleanup list length mismatch (diff)
downloadbinfilter-533e3c648db45ba7c7804928a5759e2b60fdb9a2.tar.gz
binfilter-533e3c648db45ba7c7804928a5759e2b60fdb9a2.zip
Heavily simplified utl::ConfigManager.
-rw-r--r--binfilter/bf_svtools/source/config/svt_defaultoptions.cxx1
-rw-r--r--binfilter/bf_svtools/source/config/svt_itemholder1.cxx1
-rw-r--r--binfilter/bf_svtools/source/config/svt_itemholder2.cxx1
-rw-r--r--binfilter/bf_svtools/source/config/svt_pathoptions.cxx21
-rw-r--r--binfilter/bf_svtools/source/config/svt_useroptions.cxx11
-rw-r--r--binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigItem.cxx5
-rw-r--r--binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx14
7 files changed, 14 insertions, 40 deletions
diff --git a/binfilter/bf_svtools/source/config/svt_defaultoptions.cxx b/binfilter/bf_svtools/source/config/svt_defaultoptions.cxx
index 4082d8b4e..b101b6351 100644
--- a/binfilter/bf_svtools/source/config/svt_defaultoptions.cxx
+++ b/binfilter/bf_svtools/source/config/svt_defaultoptions.cxx
@@ -200,7 +200,6 @@ Sequence< OUString > GetDefaultPropertyNames()
SvtDefaultOptions_Impl::SvtDefaultOptions_Impl() : ConfigItem( ASCII_STR("Office.Common/Path/Default") )
{
- /*ConfigManager* pCfgMgr =*/ ConfigManager::GetConfigManager();
Sequence< OUString > aNames = GetDefaultPropertyNames();
Sequence< Any > aValues = GetProperties( aNames );
EnableNotification( aNames );
diff --git a/binfilter/bf_svtools/source/config/svt_itemholder1.cxx b/binfilter/bf_svtools/source/config/svt_itemholder1.cxx
index fa18956c4..68287e73d 100644
--- a/binfilter/bf_svtools/source/config/svt_itemholder1.cxx
+++ b/binfilter/bf_svtools/source/config/svt_itemholder1.cxx
@@ -94,7 +94,6 @@ ItemHolder1::ItemHolder1()
if (xCfg.is())
xCfg->addEventListener(static_cast< css::lang::XEventListener* >(this));
}
-// #i37892 got errorhandling from ConfigManager::GetConfigurationProvider()
#ifdef DBG_UTIL
catch(css::uno::Exception& rEx)
{
diff --git a/binfilter/bf_svtools/source/config/svt_itemholder2.cxx b/binfilter/bf_svtools/source/config/svt_itemholder2.cxx
index 1aa981fbc..bdbe347d7 100644
--- a/binfilter/bf_svtools/source/config/svt_itemholder2.cxx
+++ b/binfilter/bf_svtools/source/config/svt_itemholder2.cxx
@@ -78,7 +78,6 @@ ItemHolder2::ItemHolder2()
if (xCfg.is())
xCfg->addEventListener(static_cast< css::lang::XEventListener* >(this));
}
-// #i37892 got errorhandling from ConfigManager::GetConfigurationProvider()
catch(css::uno::RuntimeException& rREx)
{
throw rREx;
diff --git a/binfilter/bf_svtools/source/config/svt_pathoptions.cxx b/binfilter/bf_svtools/source/config/svt_pathoptions.cxx
index 54ea6ae5e..1c86bafc1 100644
--- a/binfilter/bf_svtools/source/config/svt_pathoptions.cxx
+++ b/binfilter/bf_svtools/source/config/svt_pathoptions.cxx
@@ -512,22 +512,11 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() :
}
// Set language type!
- Any aLocale = ConfigManager::GetConfigManager().GetDirectConfigProperty( ConfigManager::LOCALE );
- OUString aLocaleStr;
- if ( aLocale >>= aLocaleStr )
- {
- sal_Int32 nIndex = 0;
- m_aLocale.Language = aLocaleStr.getToken(0, '-', nIndex );
- m_aLocale.Country = aLocaleStr.getToken(0, '-', nIndex );
- m_aLocale.Variant = aLocaleStr.getToken(0, '-', nIndex );
- }
- else
- {
- DBG_ERRORFILE( "wrong any type" );
- m_aLocale.Language = OStringToOUString(OString("en"), RTL_TEXTENCODING_UTF8);
- m_aLocale.Country = OStringToOUString(OString("US"), RTL_TEXTENCODING_UTF8);
- m_aLocale.Variant = OStringToOUString(OString(""), RTL_TEXTENCODING_UTF8);
- }
+ OUString aLocaleStr( ConfigManager::getLocale() );
+ sal_Int32 nIndex = 0;
+ m_aLocale.Language = aLocaleStr.getToken(0, '-', nIndex );
+ m_aLocale.Country = aLocaleStr.getToken(0, '-', nIndex );
+ m_aLocale.Variant = aLocaleStr.getToken(0, '-', nIndex );
}
// -----------------------------------------------------------------------
diff --git a/binfilter/bf_svtools/source/config/svt_useroptions.cxx b/binfilter/bf_svtools/source/config/svt_useroptions.cxx
index d358f86c3..00f870a70 100644
--- a/binfilter/bf_svtools/source/config/svt_useroptions.cxx
+++ b/binfilter/bf_svtools/source/config/svt_useroptions.cxx
@@ -28,7 +28,6 @@
#include <bf_svtools/useroptions.hxx>
-#include <unotools/configmgr.hxx>
#include <tools/debug.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
@@ -73,7 +72,6 @@ private:
String m_aEmptyString;
String m_aFullName;
- String m_aLocale;
sal_Bool m_bIsROCompany;
sal_Bool m_bIsROFirstName;
@@ -128,7 +126,6 @@ public:
const String& GetApartment() const { return m_aApartment; }
const String& GetFullName();
- const String& GetLocale() const { return m_aLocale; }
};
// global ----------------------------------------------------------------
@@ -217,14 +214,6 @@ SvtUserOptions_Impl::SvtUserOptions_Impl() :
InitUserPropertyNames();
EnableNotification( PropertyNames::get() );
Load();
- Any aAny = ConfigManager::GetConfigManager().GetDirectConfigProperty( ConfigManager::LOCALE );
- OUString aLocale;
- if ( aAny >>= aLocale )
- m_aLocale = String( aLocale );
- else
- {
- DBG_ERRORFILE( "SvtUserOptions_Impl::SvtUserOptions_Impl(): no locale found" );
- }
}
// -----------------------------------------------------------------------
diff --git a/binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigItem.cxx b/binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigItem.cxx
index 79df6dc39..7f355cb55 100644
--- a/binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigItem.cxx
+++ b/binfilter/bf_svtools/source/filter.vcl/filter/svt_FilterConfigItem.cxx
@@ -122,8 +122,6 @@ void FilterConfigItem::ImpInitTree( const String& rSubTree )
{
bModified = sal_False;
- OUString sTree( ConfigManager::GetConfigBaseURL() );
- sTree += rSubTree;
Reference< XMultiServiceFactory > xSMGR = getProcessServiceFactory(); // get global uno service manager
Reference< XMultiServiceFactory > xCfgProv(
@@ -132,6 +130,9 @@ void FilterConfigItem::ImpInitTree( const String& rSubTree )
if ( xCfgProv.is() )
{
+ OUString sTree(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.")) +
+ rSubTree);
if ( ImpIsTreeAvailable( xCfgProv, String( sTree ) ) )
{
Any aAny;
diff --git a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx
index ec661a6da..b53c8e875 100644
--- a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx
+++ b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx
@@ -223,20 +223,18 @@ rtl::OUString lcl_GetProductName()
// get the correct product name from the configuration
::rtl::OUStringBuffer aName;
- utl::ConfigManager& rMgr = utl::ConfigManager::GetConfigManager();
- ::rtl::OUString aValue;
- uno::Any aAny = rMgr.GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME);
::rtl::OUString os( RTL_CONSTASCII_USTRINGPARAM("$_OS") );
::rtl::Bootstrap::expandMacros(os);
- if ( (aAny >>= aValue) && aValue.getLength() )
+ rtl::OUString aValue( utl::ConfigManager::getProductName() );
+ if ( !aValue.isEmpty() )
aName.append( aValue ).append( (sal_Unicode)' ' );
- aAny = rMgr.GetDirectConfigProperty(utl::ConfigManager::PRODUCTVERSION);
- if ( (aAny >>= aValue) && aValue.getLength() )
+ aValue = utl::ConfigManager::getProductVersion();
+ if ( !aValue.isEmpty() )
aName.append( aValue ).append( (sal_Unicode)' ' );
- aAny = rMgr.GetDirectConfigProperty(utl::ConfigManager::PRODUCTEXTENSION);
- if ( (aAny >>= aValue) && aValue.getLength() )
+ aValue = utl::ConfigManager::getProductExtension();
+ if ( !aValue.isEmpty() )
aName.append( aValue ).append( (sal_Unicode)' ' );
aName.append( (sal_Unicode)'(' );
aName.append( os );