Kaydet (Commit) 6dc36d34 authored tarafından Mike Kaganski's avatar Mike Kaganski

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: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst cd41b2b7
...@@ -1302,6 +1302,7 @@ ...@@ -1302,6 +1302,7 @@
#define STR_QUERY_SPECIAL_FORCED NC_("STR_QUERY_SPECIAL_FORCED", "Check special regions is deactivated. Check anyway?") #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_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_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_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") #define STR_WEBOPTIONS NC_("STR_WEBOPTIONS", "HTML document")
......
...@@ -60,10 +60,12 @@ ...@@ -60,10 +60,12 @@
#include <uinums.hxx> #include <uinums.hxx>
#include <dbconfig.hxx> #include <dbconfig.hxx>
#include <mmconfigitem.hxx> #include <mmconfigitem.hxx>
#include <strings.hrc>
#include <com/sun/star/container/XChild.hpp> #include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/sdbc/XConnection.hpp> #include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdb/TextConnectionSettings.hpp> #include <com/sun/star/sdb/TextConnectionSettings.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp> #include <com/sun/star/sdbc/XDataSource.hpp>
#include <com/sun/star/task/OfficeRestartManager.hpp>
#include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp> #include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp>
#include <swabstdlg.hxx> #include <swabstdlg.hxx>
#include <comphelper/dispatchcommand.hxx> #include <comphelper/dispatchcommand.hxx>
...@@ -417,6 +419,17 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs ...@@ -417,6 +419,17 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
SAL_INFO( SAL_INFO(
"sw.core", "sw.core",
"trying to install LibreOffice Base, caught " << e); "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; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment