diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2021-05-24 00:19:53 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-05-26 14:46:46 +0200 |
commit | f5f9efeaae89623c9a2b86ad4e77448d8be76576 (patch) | |
tree | f3a2a5336f1146592a3d144039547e4247585863 | |
parent | upgrade to Expat 2.4.1 (diff) | |
download | core-f5f9efeaae89623c9a2b86ad4e77448d8be76576.tar.gz core-f5f9efeaae89623c9a2b86ad4e77448d8be76576.zip |
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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116132
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | sw/inc/strings.hrc | 3 | ||||
-rw-r--r-- | sw/inc/view.hxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 37 |
3 files changed, 0 insertions, 43 deletions
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 4fabab278917..c2b15f563c68 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -1383,9 +1383,6 @@ #define STR_AUTOMARK_YES NC_("createautomarkdialog|yes", "Yes") #define STR_AUTOMARK_NO NC_("createautomarkdialog|no", "No") -#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 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index fc855b426d85..32cc9b545b6d 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -543,8 +543,6 @@ public: // form control has been activated DECL_LINK( FormControlActivated, LinkParamNone*, void ); - DECL_LINK( ExchangeDatabaseHandler, Button*, void); - // edit links void EditLinkDlg(); void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = nullptr); @@ -616,7 +614,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 23127155d4f6..e2fa03b5f2ce 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -232,11 +232,6 @@ IMPL_LINK_NOARG(SwView, FormControlActivated, LinkParamNone*, void) } } -IMPL_LINK_NOARG(SwView, ExchangeDatabaseHandler, Button*, void) -{ - GetDispatcher().Execute(FN_CHANGE_DBFIELD); -} - namespace { uno::Reference<frame::XLayoutManager> getLayoutManager(const SfxViewFrame& rViewFrame) @@ -1659,23 +1654,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 ) @@ -1939,21 +1917,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; - - VclPtrInstance<PushButton> xBtn(GetWindow()); - xBtn->SetText(SwResId(STR_EXCHANGE_DATABASE)); - xBtn->SetSizePixel(xBtn->GetOptimalSize()); - xBtn->SetClickHdl(LINK(this, SwView, ExchangeDatabaseHandler)); - pInfoBar->addButton(xBtn); -} - namespace sw { void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb) |