diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-03-07 11:28:04 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-03-07 11:28:04 +0000 |
commit | 7aaaf5ab2b8d8745011cd3982d8d82116b23951e (patch) | |
tree | d811f065f6dc2be381648d491af75b2ee1700234 | |
parent | 52de18a9add96e35461563137a6f8b4a9d08e290 (diff) |
fix more merge issues for desktop/ to build
-rw-r--r-- | desktop/source/app/app.cxx | 13 | ||||
-rw-r--r-- | desktop/source/app/cmdlineargs.cxx | 191 | ||||
-rw-r--r-- | desktop/source/app/cmdlineargs.hxx | 3 | ||||
-rw-r--r-- | desktop/source/app/langselect.cxx | 41 | ||||
-rwxr-xr-x | desktop/source/deployment/gui/dp_gui.hrc | 2 | ||||
-rwxr-xr-x | desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 17 | ||||
-rw-r--r-- | desktop/source/deployment/registry/configuration/dp_configuration.cxx | 3 |
7 files changed, 107 insertions, 163 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index d6bc0db08b..934d07e8a6 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -800,7 +800,7 @@ void Desktop::DeInit() try { // instead of removing of the configManager just let it commit all the changes RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" ); - utl::ConfigManager::GetConfigManager()->StoreConfigItems(); + utl::ConfigManager::GetConfigManager().StoreConfigItems(); FlushConfiguration(); RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" ); @@ -1556,7 +1556,7 @@ struct ExecuteGlobals static ExecuteGlobals* pExecGlobals = NULL; -void Desktop::Main() +int Desktop::Main() { pExecGlobals = new ExecuteGlobals(); @@ -1975,7 +1975,7 @@ void Desktop::doShutdown() FlushConfiguration(); // The acceptors in the AcceptorMap must be released (in DeregisterServices) // with the solar mutex unlocked, to avoid deadlock: - nAcquireCount = Application::ReleaseSolarMutex(); + ULONG nAcquireCount = Application::ReleaseSolarMutex(); DeregisterServices(); Application::AcquireSolarMutex(nAcquireCount); tools::DeInitTestToolLib(); @@ -2000,7 +2000,8 @@ void Desktop::doShutdown() if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); - return ExitHelper::E_NORMAL_RESTART; + // wouldn't the solution be more clean if SalMain returns the exit code to the system? + _exit( ExitHelper::E_NORMAL_RESTART ); } } @@ -2077,7 +2078,7 @@ sal_Bool Desktop::InitializeConfiguration() void Desktop::FlushConfiguration() { - Reference < XFlushable > xCFGFlush( ::utl::ConfigManager::GetConfigManager()->GetConfigurationProvider(), UNO_QUERY ); + Reference < XFlushable > xCFGFlush( ::utl::ConfigManager::GetConfigManager().GetConfigurationProvider(), UNO_QUERY ); if (xCFGFlush.is()) { xCFGFlush->flush(); @@ -2085,7 +2086,7 @@ void Desktop::FlushConfiguration() else { // because there is no method to flush the condiguration data, we must dispose the ConfigManager - Reference < XComponent > xCFGDispose( ::utl::ConfigManager::GetConfigManager()->GetConfigurationProvider(), UNO_QUERY ); + Reference < XComponent > xCFGDispose( ::utl::ConfigManager::GetConfigManager().GetConfigurationProvider(), UNO_QUERY ); if (xCFGDispose.is()) xCFGDispose->dispose(); } diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index f5bee66ff1..2c34a6b59a 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -142,20 +142,21 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) UNO_QUERY); // parse command line arguments - sal_Bool bPrintEvent = sal_False; - sal_Bool bOpenEvent = sal_True; - sal_Bool bViewEvent = sal_False; - sal_Bool bStartEvent = sal_False; - sal_Bool bPrintToEvent = sal_False; - sal_Bool bPrinterName = sal_False; - sal_Bool bForceOpenEvent = sal_False; - sal_Bool bForceNewEvent = sal_False; - sal_Bool bDisplaySpec = sal_False; - sal_Bool bConversionEvent= sal_False; - sal_Bool bConversionParamsEvent= sal_False; - sal_Bool bBatchPrintEvent= sal_False; - sal_Bool bBatchPrinterNameEvent= sal_False; - sal_Bool bConversionOutEvent = sal_False; + bool bOpenEvent(true); + bool bPrintEvent(false); + bool bViewEvent(false); + bool bStartEvent(false); + bool bPrintToEvent(false); + bool bPrinterName(false); + bool bForceOpenEvent(false); + bool bForceNewEvent(false); + bool bDisplaySpec(false); + bool bOpenDoc(false); + bool bConversionEvent(false); + bool bConversionParamsEvent(false); + bool bBatchPrintEvent(false); + bool bBatchPrinterNameEvent(false); + bool bConversionOutEvent(false); m_eArgumentCount = NONE; @@ -188,119 +189,119 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("-n"))) { // force new documents based on the following documents - bForceNewEvent = sal_True; - bOpenEvent = sal_False; - bForceOpenEvent = sal_False; - bPrintToEvent = sal_False; - bPrintEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; - } + bForceNewEvent = true; + bOpenEvent = false; + bForceOpenEvent = false; + bPrintToEvent = false; + bPrintEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; + } else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("-o"))) { // force open documents regards if they are templates or not - bForceOpenEvent = sal_True; - bOpenEvent = sal_False; - bForceNewEvent = sal_False; - bPrintToEvent = sal_False; - bPrintEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; + bForceOpenEvent = true; + bOpenEvent = false; + bForceNewEvent = false; + bPrintToEvent = false; + bPrintEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; } else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("pt"))) { // Print to special printer - bPrintToEvent = sal_True; - bPrinterName = sal_True; - bPrintEvent = sal_False; - bOpenEvent = sal_False; - bForceNewEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; - bForceOpenEvent = sal_False; + bPrintToEvent = true; + bPrinterName = true; + bPrintEvent = false; + bOpenEvent = false; + bForceNewEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; + bForceOpenEvent = false; } else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("-p"))) { // Print to default printer - bPrintEvent = sal_True; - bPrintToEvent = sal_False; - bOpenEvent = sal_False; - bForceNewEvent = sal_False; - bForceOpenEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; + bPrintEvent = true; + bPrintToEvent = false; + bOpenEvent = false; + bForceNewEvent = false; + bForceOpenEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; } else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("view"))) { // open in viewmode - bOpenEvent = sal_False; - bPrintEvent = sal_False; - bPrintToEvent = sal_False; - bForceNewEvent = sal_False; - bForceOpenEvent = sal_False; - bViewEvent = sal_True; - bStartEvent = sal_False; - bDisplaySpec = sal_False; + bOpenEvent = false; + bPrintEvent = false; + bPrintToEvent = false; + bForceNewEvent = false; + bForceOpenEvent = false; + bViewEvent = true; + bStartEvent = false; + bDisplaySpec = false; } else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("show"))) { // open in viewmode - bOpenEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_True; - bPrintEvent = sal_False; - bPrintToEvent = sal_False; - bForceNewEvent = sal_False; - bForceOpenEvent = sal_False; - bDisplaySpec = sal_False; + bOpenEvent = false; + bViewEvent = false; + bStartEvent = true; + bPrintEvent = false; + bPrintToEvent = false; + bForceNewEvent = false; + bForceOpenEvent = false; + bDisplaySpec = false; } else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("display"))) { // set display - bOpenEvent = sal_False; - bPrintEvent = sal_False; - bForceOpenEvent = sal_False; - bPrintToEvent = sal_False; - bForceNewEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_True; + bOpenEvent = false; + bPrintEvent = false; + bForceOpenEvent = false; + bPrintToEvent = false; + bForceNewEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = true; } else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("language"))) { - bOpenEvent = sal_False; - bPrintEvent = sal_False; - bForceOpenEvent = sal_False; - bPrintToEvent = sal_False; - bForceNewEvent = sal_False; - bViewEvent = sal_False; - bStartEvent = sal_False; - bDisplaySpec = sal_False; + bOpenEvent = false; + bPrintEvent = false; + bForceOpenEvent = false; + bPrintToEvent = false; + bForceNewEvent = false; + bViewEvent = false; + bStartEvent = false; + bDisplaySpec = false; } else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("convert-to"))) { - bOpenEvent = sal_False; - bConversionEvent = sal_True; - bConversionParamsEvent = sal_True; + bOpenEvent = false; + bConversionEvent = true; + bConversionParamsEvent = true; } else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("print-to-file"))) { - bOpenEvent = sal_False; - bBatchPrintEvent = sal_True; + bOpenEvent = false; + bBatchPrintEvent = true; } else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("printer-name")) && bBatchPrintEvent ) { - bBatchPrinterNameEvent = sal_True; + bBatchPrinterNameEvent = true; } else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("outdir")) && (bConversionEvent || bBatchPrintEvent) ) { - bConversionOutEvent = sal_True; + bConversionOutEvent = true; } } else @@ -309,24 +310,24 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) { // first argument after "-pt" this must be the printer name AddStringListParam_Impl( CMD_STRINGPARAM_PRINTERNAME, aArg ); - bPrinterName = sal_False; + bPrinterName = false; } else if ( bConversionParamsEvent && bConversionEvent ) { // first argument must be the the params AddStringListParam_Impl( CMD_STRINGPARAM_CONVERSIONPARAMS, aArg ); - bConversionParamsEvent = sal_False; + bConversionParamsEvent = false; } else if ( bBatchPrinterNameEvent && bBatchPrintEvent ) { // first argument is the printer name AddStringListParam_Impl( CMD_STRINGPARAM_PRINTERNAME, aArg ); - bBatchPrinterNameEvent = sal_False; + bBatchPrinterNameEvent = false; } else if ( (bConversionEvent || bBatchPrintEvent) && bConversionOutEvent ) { AddStringListParam_Impl( CMD_STRINGPARAM_CONVERSIONOUT, aArg ); - bConversionOutEvent = sal_False; + bConversionOutEvent = false; } else { @@ -340,6 +341,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) } } // handle this argument as a filename + bOpenDoc = true; if ( bOpenEvent ) AddStringListParam_Impl( CMD_STRINGPARAM_OPENLIST, aArg ); else if ( bViewEvent ) @@ -356,11 +358,14 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) AddStringListParam_Impl( CMD_STRINGPARAM_FORCEOPENLIST, aArg ); else if ( bDisplaySpec ){ AddStringListParam_Impl( CMD_STRINGPARAM_DISPLAY, aArg ); - bDisplaySpec = sal_False; // only one display, not a list - bOpenEvent = sal_True; // set back to standard + bDisplaySpec = false; // only one display, not a list + bOpenEvent = false; // set back to standard + bOpenDoc = false; } else if ( bConversionEvent || bBatchPrintEvent ) AddStringListParam_Impl( CMD_STRINGPARAM_CONVERSIONLIST, aArg ); + else + bOpenDoc = false; } } } diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx index 1d09c0f7c2..8c4020b2a0 100644 --- a/desktop/source/app/cmdlineargs.hxx +++ b/desktop/source/app/cmdlineargs.hxx @@ -134,8 +134,6 @@ class CommandLineArgs const rtl::OUString& GetStringParam( StringParam eParam ) const; - const rtl::OUString& GetStringParam( StringParam eParam ) const; - // Access to bool parameters sal_Bool IsMinimized() const; sal_Bool IsInvisible() const; @@ -167,6 +165,7 @@ class CommandLineArgs sal_Bool IsWeb() const; sal_Bool IsVersion() const; sal_Bool HasModuleParam() const; + sal_Bool WantsToLoadDocument() const; // Access to string parameters sal_Bool GetPortalConnectString( ::rtl::OUString& rPara) const; diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx index d4077b1b67..f505fe3c2d 100644 --- a/desktop/source/app/langselect.cxx +++ b/desktop/source/app/langselect.cxx @@ -113,47 +113,6 @@ static OUString locateSofficeIniFile() return aSofficeIniFileURL; } -static sal_Bool existsURL( OUString const& sURL ) -{ - using namespace osl; - DirectoryItem aDirItem; - - if (sURL.getLength() != 0) - return ( DirectoryItem::get( sURL, aDirItem ) == DirectoryItem::E_None ); - - return sal_False; -} - -// locate soffice.ini/.rc file -static OUString locateSofficeIniFile() -{ - OUString aUserDataPath; - OUString aSofficeIniFileURL; - - // Retrieve the default file URL for the soffice.ini/rc - rtl::Bootstrap().getIniName( aSofficeIniFileURL ); - - if ( utl::Bootstrap::locateUserData( aUserDataPath ) == utl::Bootstrap::PATH_EXISTS ) - { - const char CONFIG_DIR[] = "/config"; - - sal_Int32 nIndex = aSofficeIniFileURL.lastIndexOf( '/'); - if ( nIndex > 0 ) - { - OUString aUserSofficeIniFileURL; - OUStringBuffer aBuffer( aUserDataPath ); - aBuffer.appendAscii( CONFIG_DIR ); - aBuffer.append( aSofficeIniFileURL.copy( nIndex )); - aUserSofficeIniFileURL = aBuffer.makeStringAndClear(); - - if ( existsURL( aUserSofficeIniFileURL )) - return aUserSofficeIniFileURL; - } - } - // Fallback try to use the soffice.ini/rc from program folder - return aSofficeIniFileURL; -} - Locale LanguageSelection::IsoStringToLocale(const OUString& str) { Locale l; diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc index 62e6ec52f6..4a0276ad79 100755 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -105,7 +105,7 @@ #define RID_DLG_UPDATE_LINE 8 #define RID_DLG_UPDATE_HELP 9 #define RID_DLG_UPDATE_OK 10 -#define RID_DLG_UPDATE_CANCEL 11 +#define RID_DLG_UPDATE_CLOSE 11 #define RID_DLG_UPDATE_NORMALALERT 12 #define RID_DLG_UPDATE_ERROR 14 #define RID_DLG_UPDATE_NONE 15 diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index d2b8b0763e..867023bac0 100755 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -678,23 +678,6 @@ void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment: } //------------------------------------------------------------------------------ -void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment::XPackage > &rPackage ) -{ - if ( rPackage.is() ) - { - TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::ACCEPT_LICENSE, rPackage ) ); - -//------------------------------------------------------------------------------ -void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment::XPackage > &rPackage ) -{ - if ( rPackage.is() ) - { - TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::ACCEPT_LICENSE, rPackage ) ); - _insert( pEntry ); - } -} - -//------------------------------------------------------------------------------ void ExtensionCmdQueue::Thread::enableExtension( const uno::Reference< deployment::XPackage > &rPackage, const bool bEnable ) { diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 22b26c176b..81e01aad96 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -737,9 +737,6 @@ void BackendImpl::PackageImpl::processPackage_( data.iniEntry = dp_misc::makeRcTerm(url); that->addDataToDb(getURL(), data); } - that->addToConfigmgrIni( m_isSchema, url, xCmdEnv ); - data.iniEntry = dp_misc::makeRcTerm(url); - that->addDataToDb(getURL(), data); } else // revoke { |