diff options
author | Matt K <mattkse@gmail.com> | 2023-07-25 19:32:11 -0500 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-08-02 08:25:37 +0200 |
commit | efae7b4a1f7248b01e8cd95577c09d772cfe5709 (patch) | |
tree | ac402f120dbb5283817c5eb36ae44366ab2afc8e /desktop/source | |
parent | b6b26421a1029b18b48b69dbdac4bb70fb622604 (diff) |
tdf#129713 Output message when using "--cat" with other LO instances running
This change modifies the code that determines whether a 2nd LibreOffice
instance is running during the startup of the new soffice.bin process.
In that section of code, we simply write a new error message to console
and pop-up a message box via FatalError. The message tells the user
that they should close other LibreOffice processes if they want to use
the "--cat" or "--script-cat" command line options.
Change-Id: I2c2a00c07d733e2f0ed6c0632f0f0d115188b116
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154909
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/app/app.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index e4058bfe8932..cb3beaf0ae26 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -523,6 +523,10 @@ void Desktop::Init() else if ( aStatus == RequestHandler::IPC_STATUS_2ND_OFFICE ) { // 2nd office startup should terminate after sending cmdlineargs through pipe + if (rCmdLineArgs.IsTextCat() || rCmdLineArgs.IsScriptCat()) + { + HandleBootstrapErrors( BE_2NDOFFICE_WITHCAT, OUString() ); + } SetBootstrapStatus(BS_TERMINATE); } else if ( !rCmdLineArgs.GetUnknown().isEmpty() @@ -880,6 +884,11 @@ void Desktop::HandleBootstrapErrors( FatalError(MakeStartupErrorMessage(aDiagnosticMessage)); } + else if ( aBootstrapError == BE_2NDOFFICE_WITHCAT ) + { + OUString aDiagnosticMessage = DpResId(STR_BOOTSTRAP_ERR_2NDOFFICE_WITHCAT); + FatalError(MakeStartupErrorMessage(aDiagnosticMessage)); + } } |