summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-03-29 17:29:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-03-29 17:41:56 +0200
commitd3084fb2442b9584b46fba743158c3fe46defa81 (patch)
treed0c11fb2496d7d878005c8a708fab257007ccf28 /desktop
parenta9a9f694089505c5fbbf5e099d5e185e1a46ab29 (diff)
Remove undocumented perftune.ini QuickstartPreloadConfiguration
...originally added to OOo in 2005 with 8a9d865b32b760804adf53b0d68fd74785890915 "INTEGRATION: CWS cov2src: #126234# Join MWS COV680 m4 into SRC680". Change-Id: I7167c99e28b56c9048de32576e793e2eaa1fc6a6
Diffstat (limited to 'desktop')
-rw-r--r--desktop/inc/app.hxx3
-rw-r--r--desktop/source/app/app.cxx243
2 files changed, 0 insertions, 246 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 89b8803f23b5..3bcc098a81c7 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -142,9 +142,6 @@ class Desktop : public Application
static OUString CreateErrorMsgString( utl::Bootstrap::FailureCode nFailureCode,
const OUString& aFileURL );
- static void PreloadModuleData( const CommandLineArgs& );
- static void PreloadConfigurationData();
-
css::uno::Reference<css::task::XStatusIndicator> m_rSplashScreen;
void OpenSplashScreen();
void CloseSplashScreen();
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index f99bfde97e77..99ddb0a477ac 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -59,7 +59,6 @@
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
#include <com/sun/star/configuration/MissingBootstrapFileException.hpp>
@@ -74,7 +73,6 @@
#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
-#include <com/sun/star/frame/XUIControllerRegistration.hpp>
#include <com/sun/star/frame/thePopupMenuControllerFactory.hpp>
#include <com/sun/star/office/Quickstart.hpp>
@@ -1968,211 +1966,6 @@ IMPL_STATIC_LINK_NOARG_TYPED(Desktop, EnableAcceptors_Impl, void*, void)
enableAcceptors();
}
-
-void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
-{
- Sequence < css::beans::PropertyValue > args(1);
- args[0].Name = "Hidden";
- args[0].Value <<= sal_True;
- Reference < XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
-
- if ( rArgs.IsWriter() )
- {
- try
- {
- Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( "private:factory/swriter",
- "_blank", 0, args ), UNO_QUERY_THROW );
- xDoc->close( sal_False );
- }
- catch ( const css::uno::Exception& )
- {
- }
- }
- if ( rArgs.IsCalc() )
- {
- try
- {
- Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( "private:factory/scalc",
- "_blank", 0, args ), UNO_QUERY_THROW );
- xDoc->close( sal_False );
- }
- catch ( const css::uno::Exception& )
- {
- }
- }
- if ( rArgs.IsDraw() )
- {
- try
- {
- Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( "private:factory/sdraw",
- "_blank", 0, args ), UNO_QUERY_THROW );
- xDoc->close( sal_False );
- }
- catch ( const css::uno::Exception& )
- {
- }
- }
- if ( rArgs.IsImpress() )
- {
- try
- {
- Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( "private:factory/simpress",
- "_blank", 0, args ), UNO_QUERY_THROW );
- xDoc->close( sal_False );
- }
- catch ( const css::uno::Exception& )
- {
- }
- }
-}
-
-void Desktop::PreloadConfigurationData()
-{
- Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- Reference< XNameAccess > xNameAccess = css::frame::theUICommandDescription::get(xContext);
-
- OUString aWriterDoc( "com.sun.star.text.TextDocument" );
- OUString aCalcDoc( "com.sun.star.sheet.SpreadsheetDocument" );
- OUString aDrawDoc( "com.sun.star.drawing.DrawingDocument" );
- OUString aImpressDoc( "com.sun.star.presentation.PresentationDocument" );
-
- // preload commands configuration
- Any a;
- Reference< XNameAccess > xCmdAccess;
-
- try
- {
- a = xNameAccess->getByName( aWriterDoc );
- a >>= xCmdAccess;
- if ( xCmdAccess.is() )
- {
- xCmdAccess->getByName(".uno:BasicShapes");
- xCmdAccess->getByName(".uno:EditGlossary");
- }
- }
- catch ( const css::uno::Exception& )
- {
- }
-
- try
- {
- a = xNameAccess->getByName( aCalcDoc );
- a >>= xCmdAccess;
- if ( xCmdAccess.is() )
- xCmdAccess->getByName(".uno:InsertObjectStarMath");
- }
- catch ( const css::uno::Exception& )
- {
- }
-
- try
- {
- // draw and impress share the same configuration file (DrawImpressCommands.xcu)
- a = xNameAccess->getByName( aDrawDoc );
- a >>= xCmdAccess;
- if ( xCmdAccess.is() )
- xCmdAccess->getByName(".uno:Polygon");
- }
- catch ( const css::uno::Exception& )
- {
- }
-
- // preload window state configuration
- xNameAccess = theWindowStateConfiguration::get( xContext );
- Reference< XNameAccess > xWindowAccess;
- try
- {
- a = xNameAccess->getByName( aWriterDoc );
- a >>= xWindowAccess;
- if ( xWindowAccess.is() )
- xWindowAccess->getByName("private:resource/toolbar/standardbar");
- }
- catch ( const css::uno::Exception& )
- {
- }
- try
- {
- a = xNameAccess->getByName( aCalcDoc );
- a >>= xWindowAccess;
- if ( xWindowAccess.is() )
- xWindowAccess->getByName("private:resource/toolbar/standardbar");
- }
- catch ( const css::uno::Exception& )
- {
- }
- try
- {
- a = xNameAccess->getByName( aDrawDoc );
- a >>= xWindowAccess;
- if ( xWindowAccess.is() )
- xWindowAccess->getByName("private:resource/toolbar/standardbar");
- }
- catch ( const css::uno::Exception& )
- {
- }
- try
- {
- a = xNameAccess->getByName( aImpressDoc );
- a >>= xWindowAccess;
- if ( xWindowAccess.is() )
- xWindowAccess->getByName("private:resource/toolbar/standardbar");
- }
- catch ( const css::uno::Exception& )
- {
- }
-
- // preload user interface element factories
- Reference< XUIElementFactoryManager > xUIElementFactory = theUIElementFactoryManager::get( xContext );
- try
- {
- xUIElementFactory->getRegisteredFactories();
- }
- catch ( const css::uno::Exception& )
- {
- }
-
- // preload popup menu controller factories. As all controllers are in the same
- // configuration file they also get preloaded!
-
- Reference< css::frame::XUIControllerRegistration > xPopupMenuControllerFactory =
- css::frame::thePopupMenuControllerFactory::get( xContext );
- try
- {
- (void)xPopupMenuControllerFactory->hasController( ".uno:CharFontName", OUString() );
- }
- catch ( const css::uno::Exception& )
- {
- }
-
- // preload filter configuration
- xNameAccess.set(xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", xContext),
- UNO_QUERY );
- if ( xNameAccess.is() )
- {
- try
- {
- xNameAccess->getElementNames();
- }
- catch ( const css::uno::Exception& )
- {
- }
- }
-
- // preload type detection configuration
- xNameAccess.set(xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", xContext),
- UNO_QUERY );
- if ( xNameAccess.is() )
- {
- try
- {
- xNameAccess->getElementNames();
- }
- catch ( const css::uno::Exception& )
- {
- }
- }
-}
-
void Desktop::OpenClients()
{
@@ -2222,42 +2015,6 @@ void Desktop::OpenClients()
return;
}
}
- else
- {
- OUString aIniName;
-
- osl_getExecutableFile( &aIniName.pData );
- sal_uInt32 lastIndex = aIniName.lastIndexOf('/');
- if ( lastIndex > 0 )
- {
- aIniName = aIniName.copy( 0, lastIndex+1 );
- aIniName += "perftune";
-#if defined(_WIN32)
- aIniName += ".ini";
-#else
- aIniName += "rc";
-#endif
- }
-
- rtl::Bootstrap aPerfTuneIniFile( aIniName );
-
- OUString aDefault( "0" );
- OUString aPreloadData;
-
- aPerfTuneIniFile.getFrom( "QuickstartPreloadConfiguration", aPreloadData, aDefault );
- if ( aPreloadData == "1" )
- {
- if ( rArgs.IsWriter() ||
- rArgs.IsCalc() ||
- rArgs.IsDraw() ||
- rArgs.IsImpress() )
- {
- PreloadModuleData( rArgs );
- }
-
- PreloadConfigurationData();
- }
- }
// Disable AutoSave feature in case "--norestore" or a similar command line switch is set on the command line.
// The reason behind: AutoSave/EmergencySave/AutoRecovery share the same data.