summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-11-11 22:48:37 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-11-11 22:49:21 +0100
commitc1758889cbd5e8e4afb1044425c908715eb3e1cd (patch)
treeff58b017da12c009f0b17c067787d1dbbd52eb7a /svtools
parent4ffcc73fa25f174c2d1e161f02cce2d7afc15e3b (diff)
Heavily simplified utl::ConfigManager.
Diffstat (limited to 'svtools')
-rw-r--r--svtools/CppunitTest_svtools_filters_test.mk5
-rw-r--r--svtools/prj/build.lst2
-rw-r--r--svtools/source/config/itemholder2.cxx1
-rw-r--r--svtools/source/dialogs/insdlg.cxx24
-rw-r--r--svtools/source/filter/FilterConfigItem.cxx5
5 files changed, 15 insertions, 22 deletions
diff --git a/svtools/CppunitTest_svtools_filters_test.mk b/svtools/CppunitTest_svtools_filters_test.mk
index 3ccbd5d06c30..48c39f461b01 100644
--- a/svtools/CppunitTest_svtools_filters_test.mk
+++ b/svtools/CppunitTest_svtools_filters_test.mk
@@ -63,9 +63,14 @@ $(eval $(call gb_CppunitTest_add_type_rdbs,svtools_filters_test,\
types \
))
+$(eval $(call gb_CppunitTest_add_old_components,svtools_filters_test,\
+ configmgr \
+))
+
$(eval $(call gb_CppunitTest_set_args,svtools_filters_test,\
--headless \
--protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
+ "-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry)" \
))
# vim: set noet sw=4 ts=4:
diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst
index d18c9f9df2a2..b18ec977b997 100644
--- a/svtools/prj/build.lst
+++ b/svtools/prj/build.lst
@@ -1,2 +1,2 @@
-st svtools : TRANSLATIONS:translations svl offapi toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal salhelper sot jvmfwk LIBXSLT:libxslt ure test NULL
+st svtools : TRANSLATIONS:translations svl offapi toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper configmgr sal salhelper sot jvmfwk LIBXSLT:libxslt ure test NULL
st svtools\prj nmake - all st_prj NULL
diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx
index 74766fa2e534..dadb1d6f75ec 100644
--- a/svtools/source/config/itemholder2.cxx
+++ b/svtools/source/config/itemholder2.cxx
@@ -71,7 +71,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/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index 7d6bcb9187cf..79e5a6f934fc 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -157,22 +157,6 @@ void SvObjectServerList::FillInsertObjects()
::rtl::OUString aStringProductVersion( RTL_CONSTASCII_USTRINGPARAM( "%PRODUCTVERSION" ) );
sal_Int32 nStringProductVersionLength = aStringProductVersion.getLength();
- // TODO/LATER: Do the request only once ( needs incompatible change )
- ::rtl::OUString aProductName;
- ::rtl::OUString aProductVersion;
- uno::Any aProperty =
- ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
- if ( !( aProperty >>= aProductName ) )
- {
- OSL_FAIL( "Coudn't get PRODUCTNAME variable!\n" );
- aProductName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StarOffice" ) );
- }
- aProperty = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION );
- if ( !( aProperty >>= aProductVersion ) )
- {
- OSL_FAIL( "Coudn't get PRODUCTVERSION variable!\n" );
- }
-
for( nInd = 0; nInd < seqNames.getLength(); nInd++ )
{
uno::Reference< container::XNameAccess > xEntry ;
@@ -190,7 +174,9 @@ void SvObjectServerList::FillInsertObjects()
sal_Int32 nIndex = aUIName.indexOf( aStringProductName );
while( nIndex != -1 )
{
- aUIName = aUIName.replaceAt( nIndex, nStringProductNameLength, aProductName );
+ aUIName = aUIName.replaceAt(
+ nIndex, nStringProductNameLength,
+ utl::ConfigManager::getProductName() );
nIndex = aUIName.indexOf( aStringProductName );
}
@@ -198,7 +184,9 @@ void SvObjectServerList::FillInsertObjects()
nIndex = aUIName.indexOf( aStringProductVersion );
while( nIndex != -1 )
{
- aUIName = aUIName.replaceAt( nIndex, nStringProductVersionLength, aProductVersion );
+ aUIName = aUIName.replaceAt(
+ nIndex, nStringProductVersionLength,
+ utl::ConfigManager::getProductVersion() );
nIndex = aUIName.indexOf( aStringProductVersion );
}
}
diff --git a/svtools/source/filter/FilterConfigItem.cxx b/svtools/source/filter/FilterConfigItem.cxx
index bbe40a0604c0..c6dbc5197ce8 100644
--- a/svtools/source/filter/FilterConfigItem.cxx
+++ b/svtools/source/filter/FilterConfigItem.cxx
@@ -121,8 +121,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(
@@ -131,6 +129,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;