summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2021-05-24 00:19:53 +0300
committerAndras Timar <andras.timar@collabora.com>2021-06-14 08:11:04 +0200
commit2a32e47d31c3f8f477c5763351b3838b39a5410b (patch)
treedb5d7c6d626bfc3ecfe5830fdd1c3ddd6de48baf
parent278d04f4bde2a8974f795e4b89951ae98abc80bd (diff)
Mail Merge: Remove the missing data source warning on load.
User can easily forget that they (or somebody else ) added a data source to document. This warning is only useful for the user that plans to use mail merge wizard. When they don't plan to use mail merge wizard and see that warning on infobar they can confuse. We already have the same warning on mail merge dialog itself. We don't need on load warning anymore. Change-Id: I8d80148a9637ee66cc35e2ef583fff51a04386eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116029 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
-rw-r--r--sw/inc/strings.hrc3
-rw-r--r--sw/inc/view.hxx3
-rw-r--r--sw/source/uibase/uiview/view.cxx35
3 files changed, 0 insertions, 41 deletions
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 9a924698a82e..e5f20d867d2d 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -1384,9 +1384,6 @@
#define STR_AUTOMARK_NO NC_("createautomarkdialog|no", "No")
#define STR_WRAP_PANEL_CUSTOM_STR NC_("sidebarwrap|customlabel", "Custom")
-#define STR_DATASOURCE_NOT_AVAILABLE NC_("STR_DATASOURCE_NOT_AVAILABLE", "Data source is not available. Mail merge wizard will not work properly.")
-#define STR_EXCHANGE_DATABASE NC_("STR_EXCHANGE_DATABASE", "Exchange Database")
-
#endif
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index 57c41b4a7971..fbad7499d28f 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -542,8 +542,6 @@ public:
// form control has been activated
DECL_LINK( FormControlActivated, LinkParamNone*, void );
- DECL_LINK( ExchangeDatabaseHandler, weld::Button&, void);
-
// edit links
void EditLinkDlg();
void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = nullptr);
@@ -615,7 +613,6 @@ public:
OUString GetDataSourceName() const;
static bool IsDataSourceAvailable(const OUString sDataSourceName);
- void AppendDataSourceInfobar();
void ExecFormatPaintbrush(SfxRequest const &);
void StateFormatPaintbrush(SfxItemSet &);
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 8217a192d2cf..44a4b2414981 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -212,11 +212,6 @@ IMPL_LINK_NOARG(SwView, FormControlActivated, LinkParamNone*, void)
}
}
-IMPL_LINK_NOARG(SwView, ExchangeDatabaseHandler, weld::Button&, void)
-{
- GetDispatcher().Execute(FN_CHANGE_DBFIELD);
-}
-
namespace
{
uno::Reference<frame::XLayoutManager> getLayoutManager(const SfxViewFrame& rViewFrame)
@@ -1641,23 +1636,6 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else
{
- if (auto pSfxEventHint = dynamic_cast<const SfxEventHint*>(&rHint))
- {
- switch( pSfxEventHint->GetEventId() )
- {
- case SfxEventHintId::CreateDoc:
- case SfxEventHintId::OpenDoc:
- {
- OUString sDataSourceName = GetDataSourceName();
- if ( !sDataSourceName.isEmpty() && !IsDataSourceAvailable(sDataSourceName))
- AppendDataSourceInfobar();
- }
- break;
- default:
- break;
- }
- }
-
SfxHintId nId = rHint.GetId();
switch ( nId )
@@ -1921,19 +1899,6 @@ bool SwView::IsDataSourceAvailable(const OUString sDataSourceName)
return xDatabaseContext->hasByName(sDataSourceName);
}
-void SwView::AppendDataSourceInfobar()
-{
- auto pInfoBar = GetViewFrame()->AppendInfoBar("datasource", "",
- SwResId(STR_DATASOURCE_NOT_AVAILABLE),
- InfobarType::WARNING);
- if (!pInfoBar)
- return;
-
- weld::Button& rBtn = pInfoBar->addButton();
- rBtn.set_label(SwResId(STR_EXCHANGE_DATABASE));
- rBtn.connect_clicked(LINK(this, SwView, ExchangeDatabaseHandler));
-}
-
namespace sw {
void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb)