diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2007-07-26 07:55:07 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2007-07-26 07:55:07 +0000 |
commit | c3aefcd0e395f9e43f1952b2bb76221feb6ad719 (patch) | |
tree | ab54763fa91d990eed5f49bde670e9337b1c03ba /desktop/source/pkgchk/unopkg/unopkg_misc.cxx | |
parent | 59dfba95796eb79c404e5aa7dce1f851628e146d (diff) |
INTEGRATION: CWS jl67 (1.6.32); FILE MERGED
2007/07/10 11:19:26 jl 1.6.32.2: #i77886#
2007/07/09 14:44:16 jl 1.6.32.1: #i77886# When unopkg is run without gui option then it must not call InitVCL
Diffstat (limited to 'desktop/source/pkgchk/unopkg/unopkg_misc.cxx')
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index 80b5b616418d..5c71a28cbb40 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -4,9 +4,9 @@ * * $RCSfile: unopkg_misc.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: ihi $ $Date: 2007-06-05 15:08:06 $ + * last change: $Author: rt $ $Date: 2007-07-26 08:55:07 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -443,33 +443,31 @@ Reference<XComponentContext> getUNO( { if (! s_lockfile.check( 0 )) { - //We show a message box or print to the console that there - //is another instance already running - if ( ! InitVCL( Reference<lang::XMultiServiceFactory>( - xComponentContext->getServiceManager(), - UNO_QUERY_THROW ) )) - throw RuntimeException( OUSTR("Cannot initialize VCL!"), - NULL ); - + if (bGui) { - ResId warnId(WARNINGBOX_CONCURRENTINSTANCE,*DeploymentGuiResMgr::get() ); - WarningBox warn(NULL, warnId); - warn.SetText(::utl::ConfigManager::GetDirectConfigProperty( - ::utl::ConfigManager::PRODUCTNAME).get<OUString>()); - - warn.SetIcon(0); - if (bGui) + //We show a message box or print to the console that there + //is another instance already running + if ( ! InitVCL( Reference<lang::XMultiServiceFactory>( + xComponentContext->getServiceManager(), + UNO_QUERY_THROW ) )) + throw RuntimeException( OUSTR("Cannot initialize VCL!"), + NULL ); { + ResId warnId(WARNINGBOX_CONCURRENTINSTANCE,*DeploymentGuiResMgr::get() ); + WarningBox warn(NULL, warnId); + warn.SetText(::utl::ConfigManager::GetDirectConfigProperty( + ::utl::ConfigManager::PRODUCTNAME).get<OUString>()); + warn.SetIcon(0); warn.Execute(); } - else - { - ::rtl::OString osWarn = ::rtl::OUStringToOString( - warn.GetMessText(), osl_getThreadTextEncoding()); - fprintf(stdout,"\n%s\n\n", osWarn.getStr()); - } + DeInitVCL(); + } + else + { + //ToDo issue i79333 + fprintf(stdout,"You need to close the already opened Extension Manager to continue.\n"); + } - DeInitVCL(); throw RuntimeException( OUSTR("Lock file indicates that a concurrent Office process " "is running!"), Reference<XInterface>() ); |