sw/inc/strings.hrc | 3 --- sw/inc/view.hxx | 3 --- sw/source/uibase/uiview/view.cxx | 35 ----------------------------------- 3 files changed, 41 deletions(-)
New commits: commit 5ef0461b647dbb01a037459b39b47240abb85fca Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Mon May 24 00:19:53 2021 +0300 Commit: Gülşah Köse <gulsah.k...@collabora.com> CommitDate: Mon May 24 10:02:00 2021 +0200 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.k...@collabora.com> diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index b4cd30c0fc47..9bcd76aad2b8 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -1415,9 +1415,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 73dfc1c7a54f..7b3f6d490066 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -555,8 +555,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); @@ -628,7 +626,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 2590b3afe94d..5612191cc77a 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) @@ -1643,23 +1638,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 ) @@ -1923,19 +1901,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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits