summaryrefslogtreecommitdiff
path: root/xmlhelp/source/treeview/tvread.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmlhelp/source/treeview/tvread.cxx')
-rw-r--r--xmlhelp/source/treeview/tvread.cxx50
1 files changed, 33 insertions, 17 deletions
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index bc7af59f5e..f8a85c2ee9 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -38,13 +38,8 @@
#include <vos/diagnose.hxx>
#endif
#include "tvread.hxx"
-#ifdef SYSTEM_EXPAT
#include <expat.h>
-#else
-#include <expat/xmlparse.h>
-#endif
#include <osl/file.hxx>
-#include <unotools/configmgr.hxx>
#include <com/sun/star/frame/XConfigManager.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/PropertyState.hpp>
@@ -708,11 +703,32 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
rtl::OUString productName( getKey( xHierAccess,"Product/ooName" ) );
setupversion = getKey( xHierAccess,"Product/ooSetupVersion" );
setupextension = rtl::OUString();
- utl::ConfigManager * mgr = utl::ConfigManager::GetConfigManager();
- if (mgr != NULL) {
- mgr->GetDirectConfigProperty(utl::ConfigManager::PRODUCTEXTENSION) >>=
- setupextension;
+
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xConfigProvider(
+ xSMgr ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")), uno::UNO_QUERY_THROW);
+
+ uno::Sequence < uno::Any > lParams(1);
+ beans::PropertyValue aParam ;
+ aParam.Name = ::rtl::OUString::createFromAscii("nodepath");
+ aParam.Value <<= ::rtl::OUString::createFromAscii("/org.openoffice.Setup/Product");
+ lParams[0] = uno::makeAny(aParam);
+
+ // open it
+ uno::Reference< uno::XInterface > xCFG( xConfigProvider->createInstanceWithArguments(
+ ::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"),
+ lParams) );
+
+ uno::Reference< container::XNameAccess > xDirectAccess(xCFG, uno::UNO_QUERY);
+ uno::Any aRet = xDirectAccess->getByName(::rtl::OUString::createFromAscii("ooSetupExtension"));
+
+ aRet >>= setupextension;
}
+ catch ( uno::Exception& )
+ {
+ }
+
rtl::OUString productVersion( setupversion +
rtl::OUString::createFromAscii( " " ) +
setupextension );
@@ -1129,7 +1145,7 @@ void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< ::r
{
rv.clear();
rtl::OUString aExtensionPath = xPackage->getURL();
- Sequence< rtl::OUString > aEntrySeq = m_xSFA->getFolderContents( aExtensionPath, true );
+ Sequence< rtl::OUString > aEntrySeq = m_xSFA->getFolderContents( aExtensionPath, true );
const rtl::OUString* pSeq = aEntrySeq.getConstArray();
sal_Int32 nCount = aEntrySeq.getLength();
@@ -1153,7 +1169,7 @@ void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< ::r
rv.push_back( aPureEntry );
}
}
- }
+ }
}
@@ -1269,14 +1285,14 @@ rtl::OUString TreeFileIterator::implGetTreeFileFromPackage
::std::vector< ::rtl::OUString > av;
implGetLanguageVectorFromPackage( av, xPackage );
::std::vector< ::rtl::OUString >::const_iterator pFound = av.end();
- try
- {
- pFound = ::comphelper::Locale::getFallback( av, m_aLanguage );
- }
+ try
+ {
+ pFound = ::comphelper::Locale::getFallback( av, m_aLanguage );
+ }
catch( ::comphelper::Locale::MalFormedLocaleException& )
{}
- if( pFound != av.end() )
- aLanguage = *pFound;
+ if( pFound != av.end() )
+ aLanguage = *pFound;
}
}