diff options
author | sb <sb@openoffice.org> | 2010-03-04 23:05:27 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-03-04 23:05:27 +0100 |
commit | c79b576a3dbbbce2a67c6215a4180ac060131790 (patch) | |
tree | 32e1b51bf16b501fd7eea6d23f0610eee339fa5f /xmlhelp | |
parent | ff783db420cdb801613ca46ffec6dc6812d9ad0d (diff) | |
parent | 0d0b4e1cdd842808707e570b1dea125f312f2a50 (diff) |
merged in re/DEV300_next towards DEV300_m74
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 28 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.hxx | 6 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/provider.cxx | 35 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 15 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 37 |
5 files changed, 9 insertions, 112 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index b472daec5a62..a2c70ca45b71 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -134,26 +134,11 @@ rtl::OUString Databases::expandURL( const rtl::OUString& aURL, Reference< uno::X return aRetURL; } - -// Hold Packages to improve performance (#i106100) -// The PackageManager implementation seems to completely throw away all cached data -// as soon as the last reference to a XPackage dies. Maybe this should be changed. -struct ImplPackageSequenceHolder -{ - Sequence< Reference< deployment::XPackage > > m_aUserPackagesSeq; - Sequence< Reference< deployment::XPackage > > m_aSharedPackagesSeq; -}; - -static ImplPackageSequenceHolder* GpPackageSequenceHolder = NULL; - Databases::Databases( sal_Bool showBasic, const rtl::OUString& instPath, const com::sun::star::uno::Sequence< rtl::OUString >& imagesZipPaths, const rtl::OUString& productName, const rtl::OUString& productVersion, - const rtl::OUString& vendorName, - const rtl::OUString& vendorVersion, - const rtl::OUString& vendorShort, const rtl::OUString& styleSheet, Reference< uno::XComponentContext > xContext ) : m_xContext( xContext ), @@ -185,9 +170,7 @@ Databases::Databases( sal_Bool showBasic, m_vReplacement[0] = productName; m_vReplacement[1] = productVersion; - m_vReplacement[2] = vendorName; - m_vReplacement[3] = vendorVersion; - m_vReplacement[4] = vendorShort; + // m_vReplacement[2...4] (vendorName/-Version/-Short) are empty strings m_vReplacement[5] = productName; m_vReplacement[6] = productVersion; @@ -196,7 +179,6 @@ Databases::Databases( sal_Bool showBasic, m_xSFA = Reference< ucb::XSimpleFileAccess >( m_xSMgr->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), m_xContext ), UNO_QUERY_THROW ); - GpPackageSequenceHolder = new ImplPackageSequenceHolder(); } Databases::~Databases() @@ -244,8 +226,6 @@ Databases::~Databases() ++it; } } - - delete GpPackageSequenceHolder; } static bool impl_getZipFile( @@ -1567,9 +1547,6 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextUserHelpPack thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString::createFromAscii("user") ); m_aUserPackagesSeq = xUserManager->getDeployedPackages ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); - if( GpPackageSequenceHolder != NULL ) - GpPackageSequenceHolder->m_aUserPackagesSeq = m_aUserPackagesSeq; - m_bUserPackagesLoaded = true; } @@ -1599,9 +1576,6 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextSharedHelpPa thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString::createFromAscii("shared") ); m_aSharedPackagesSeq = xSharedManager->getDeployedPackages ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); - if( GpPackageSequenceHolder != NULL ) - GpPackageSequenceHolder->m_aSharedPackagesSeq = m_aSharedPackagesSeq; - m_bSharedPackagesLoaded = true; } diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx index 4bdb2a605dd7..6468c5732c6b 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.hxx +++ b/xmlhelp/source/cxxhelp/provider/databases.hxx @@ -189,9 +189,6 @@ namespace chelp { const com::sun::star::uno::Sequence< rtl::OUString >& imagesZipPaths, const rtl::OUString& productName, const rtl::OUString& productVersion, - const rtl::OUString& vendorName, - const rtl::OUString& vendorVersion, - const rtl::OUString& vendorShort, const rtl::OUString& styleSheet, com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext ); @@ -291,9 +288,6 @@ namespace chelp { rtl::OUString getProductName() const { return m_vReplacement[0]; } rtl::OUString getProductVersion() const { return m_vReplacement[1]; } - rtl::OUString getVendorName() const { return m_vReplacement[2]; } - rtl::OUString getVendorVersion() const { return m_vReplacement[3]; } - rtl::OUString getVendorShort() const { return m_vReplacement[4]; } rtl::OUString expandURL( const rtl::OUString& aURL ); diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx index 1f0b7c59f92c..c21b5aca3ba5 100644 --- a/xmlhelp/source/cxxhelp/provider/provider.cxx +++ b/xmlhelp/source/cxxhelp/provider/provider.cxx @@ -45,7 +45,6 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #endif #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/beans/PropertyState.hpp> #include <com/sun/star/container/XContainer.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameReplace.hpp> @@ -308,9 +307,6 @@ void ContentProvider::init() * now determing * productname, * productversion, - * vendorname, - * vendorversion, - * vendorshort */ xHierAccess = getHierAccess( sProvider, "org.openoffice.Setup" ); @@ -351,20 +347,6 @@ void ContentProvider::init() rtl::OUString::createFromAscii( " " ) + setupextension ); - xHierAccess = getHierAccess( sProvider, "org.openoffice.Webtop.Common" ); - rtl::OUString vendorname( - getKey( xHierAccess,"Product/ooName" ) ); - - setupversion = rtl::OUString( - getKey( xHierAccess,"Product/ooSetupVersion" ) ); - setupextension = rtl::OUString( - getKey( xHierAccess,"Product/ooSetupExtension") ); - rtl::OUString vendorversion( - setupversion + - rtl::OUString::createFromAscii( " " ) + - setupextension ); - rtl::OUString vendorshort = vendorname; - uno::Sequence< rtl::OUString > aImagesZipPaths( 2 ); xHierAccess = getHierAccess( sProvider, "org.openoffice.Office.Common" ); @@ -392,9 +374,6 @@ void ContentProvider::init() aImagesZipPaths, productname, productversion, - vendorname, - vendorversion, - vendorshort, stylesheet, xContext ); } @@ -405,17 +384,6 @@ ContentProvider::getConfiguration() const uno::Reference< lang::XMultiServiceFactory > sProvider; if( m_xSMgr.is() ) { - uno::Any aAny; - aAny <<= rtl::OUString::createFromAscii( "plugin" ); - beans::PropertyValue aProp( - rtl::OUString::createFromAscii( "servertype" ), - -1, - aAny, - beans::PropertyState_DIRECT_VALUE ); - - uno::Sequence< uno::Any > seq(1); - seq[0] <<= aProp; - try { rtl::OUString sProviderService = @@ -423,8 +391,7 @@ ContentProvider::getConfiguration() const "com.sun.star.configuration.ConfigurationProvider" ); sProvider = uno::Reference< lang::XMultiServiceFactory >( - m_xSMgr->createInstanceWithArguments( - sProviderService,seq ), + m_xSMgr->createInstance( sProviderService ), uno::UNO_QUERY ); } catch( const uno::Exception& ) diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx index 64d3051782d3..9268ec19cd7f 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx @@ -992,20 +992,11 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam, parString[last++] = "'css'"; parString[last++] = "vendorname"; - parString[last++] = rtl::OString('\'') + - rtl::OString( pDatabases->getVendorName().getStr(), - pDatabases->getVendorName().getLength(), - RTL_TEXTENCODING_UTF8 ) + rtl::OString('\''); + parString[last++] = rtl::OString("''"); parString[last++] = "vendorversion"; - parString[last++] = rtl::OString('\'') + - rtl::OString( pDatabases->getVendorVersion().getStr(), - pDatabases->getVendorVersion().getLength(), - RTL_TEXTENCODING_UTF8 ) + rtl::OString('\''); + parString[last++] = rtl::OString("''"); parString[last++] = "vendorshort"; - parString[last++] = rtl::OString('\'') + - rtl::OString( pDatabases->getVendorShort().getStr(), - pDatabases->getVendorShort().getLength(), - RTL_TEXTENCODING_UTF8 ) + rtl::OString('\''); + parString[last++] = rtl::OString("''"); } // Do we need to add extension path? diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index a0e7cf32ef7d..478562fca7b7 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -39,7 +39,6 @@ #include <osl/file.hxx> #include <com/sun/star/frame/XConfigManager.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/beans/PropertyState.hpp> #include <comphelper/processfactory.hxx> #include <com/sun/star/beans/XPropertySet.hpp> @@ -674,22 +673,6 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) // replace anything like $(instpath); subst( xSMgr,instPath ); - - /**********************************************************************/ - /* reading Webtop.Common */ - /**********************************************************************/ - - xHierAccess = getHierAccess( sProvider, - "org.openoffice.Webtop.Common" ); - rtl::OUString vendorName( getKey( xHierAccess,"Product/ooName" ) ); - - rtl::OUString setupversion( getKey( xHierAccess,"Product/ooSetupVersion" ) ); - rtl::OUString setupextension( getKey( xHierAccess,"Product/ooSetupExtension") ); - rtl::OUString vendorVersion( setupversion + - rtl::OUString::createFromAscii( " " ) + - setupextension ); - rtl::OUString vendorShort = vendorName; - /**********************************************************************/ /* reading setup */ /**********************************************************************/ @@ -698,8 +681,8 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) "org.openoffice.Setup" ); rtl::OUString productName( getKey( xHierAccess,"Product/ooName" ) ); - setupversion = getKey( xHierAccess,"Product/ooSetupVersion" ); - setupextension = rtl::OUString(); + rtl::OUString setupversion( getKey( xHierAccess,"Product/ooSetupVersion" ) ); + rtl::OUString setupextension; try { @@ -813,9 +796,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) configData.m_vAdd[4] = 12; configData.m_vReplacement[0] = productName; configData.m_vReplacement[1] = productVersion; - configData.m_vReplacement[2] = vendorName; - configData.m_vReplacement[3] = vendorVersion; - configData.m_vReplacement[4] = vendorShort; + // m_vReplacement[2...4] (vendorName/-Version/-Short) are empty strings configData.system = system; configData.locale = locale; @@ -843,23 +824,13 @@ TVChildTarget::getConfiguration(const Reference< XMultiServiceFactory >& m_xSMgr Reference< XMultiServiceFactory > sProvider; if( m_xSMgr.is() ) { - Any aAny; - aAny <<= rtl::OUString::createFromAscii( "plugin" ); - PropertyValue aProp( rtl::OUString::createFromAscii( "servertype" ), - -1, - aAny, - PropertyState_DIRECT_VALUE ); - - Sequence< Any > seq(1); - seq[0] <<= aProp; - try { rtl::OUString sProviderService = rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ); sProvider = Reference< XMultiServiceFactory >( - m_xSMgr->createInstanceWithArguments( sProviderService,seq ), + m_xSMgr->createInstance( sProviderService ), UNO_QUERY ); } catch( const com::sun::star::uno::Exception& ) |