[Libreoffice-commits] core.git: sw/inc sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 18 07:02:58 UTC 2018


 sw/inc/strings.hrc              |    1 +
 sw/source/uibase/app/apphdl.cxx |   13 +++++++++++++
 2 files changed, 14 insertions(+)

New commits:
commit 6dc36d343aeacb3d1e14ec0c847937d63f4e68a7
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Dec 18 08:14:01 2018 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Dec 18 08:02:34 2018 +0100

    tdf#122164: inform user that Base is needed for MailMerge
    
    Change-Id: Id62a2e4cd2d8d8b6aa79e43448513a9791a55d91
    Reviewed-on: https://gerrit.libreoffice.org/65302
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index d224701501b0..d2a2ad8fed9a 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -1302,6 +1302,7 @@
 
 #define STR_QUERY_SPECIAL_FORCED                NC_("STR_QUERY_SPECIAL_FORCED", "Check special regions is deactivated. Check anyway?")
 #define STR_NO_MERGE_ENTRY                      NC_("STR_NO_MERGE_ENTRY", "Could not merge documents.")
+#define STR_NO_BASE_FOR_MERGE                   NC_("STR_NO_BASE_FOR_MERGE", "%PRODUCTNAME Base component is absent, and it is required to use Mail Merge.")
 #define STR_ERR_SRCSTREAM                       NC_("STR_ERR_SRCSTREAM", "The source cannot be loaded.")
 #define STR_ERR_NO_FAX                          NC_("STR_ERR_NO_FAX", "No fax printer has been set under Tools/Options/%1/Print.")
 #define STR_WEBOPTIONS                          NC_("STR_WEBOPTIONS", "HTML document")
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 5fea962e10b4..3c7616a3e4fa 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -60,10 +60,12 @@
 #include <uinums.hxx>
 #include <dbconfig.hxx>
 #include <mmconfigitem.hxx>
+#include <strings.hrc>
 #include <com/sun/star/container/XChild.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
 #include <com/sun/star/sdb/TextConnectionSettings.hpp>
 #include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/task/OfficeRestartManager.hpp>
 #include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp>
 #include <swabstdlg.hxx>
 #include <comphelper/dispatchcommand.hxx>
@@ -417,6 +419,17 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
             SAL_INFO(
                 "sw.core",
                 "trying to install LibreOffice Base, caught " << e);
+            auto xRestartManager
+                = css::task::OfficeRestartManager::get(comphelper::getProcessComponentContext());
+            if (!xRestartManager->isRestartRequested(false))
+            {
+                // Base is absent, and could not initiate its install - ask user to do that manually
+                // Only show the dialog if restart is not initiated yet
+                std::unique_ptr<weld::MessageDialog> xWarnBox(Application::CreateMessageDialog(
+                    nullptr, VclMessageType::Info, VclButtonsType::Ok,
+                    SwResId(STR_NO_BASE_FOR_MERGE)));
+                xWarnBox->run();
+            }
         }
         return;
     }


More information about the Libreoffice-commits mailing list