[Libreoffice-commits] core.git: include/sfx2 sw/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Sat Aug 8 07:34:48 UTC 2020
include/sfx2/strings.hrc | 1 +
sw/source/uibase/uiview/view2.cxx | 6 ++++++
2 files changed, 7 insertions(+)
New commits:
commit ba20c2b1874cac08e93c3a122c8723868a29e456
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Aug 1 15:43:47 2020 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Aug 8 09:34:15 2020 +0200
tdf#58518: add message in case of not text file with "Insert->File" in Writer
Change-Id: I5d3d6153cdb58485043e80331e0b4f1e55a03412
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99941
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index f27cd4dae1d0..796418e4cefb 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -165,6 +165,7 @@
#define RID_SVXSTR_GRFILTER_FORMATERROR NC_("RID_SVXSTR_GRFILTER_FORMATERROR", "Unknown image format")
#define RID_SVXSTR_GRFILTER_VERSIONERROR NC_("RID_SVXSTR_GRFILTER_VERSIONERROR", "This version of the image file is not supported")
#define RID_SVXSTR_GRFILTER_FILTERERROR NC_("RID_SVXSTR_GRFILTER_FILTERERROR", "Image filter not found")
+#define RID_SVXSTR_TXTFILTER_FILTERERROR NC_("RID_SVXSTR_TXTFILTER_FILTERERROR", "This is not a text document")
#define RID_SVXSTR_END_REDLINING_WARNING NC_("RID_SVXSTR_END_REDLINING_WARNING", "This action will exit the change recording mode.\nNo information about changes will be recorded from now on.\n\nExit change recording mode?\n\n")
#define RID_SVXSTR_INCORRECT_PASSWORD NC_("RID_SVXSTR_INCORRECT_PASSWORD", "Incorrect password")
#define RID_SVXSTR_GPG_ENCRYPT_FAILURE NC_("RID_SVXSTR_GPG_ENCRYPT_FAILURE", "OpenPGP key not trusted, damaged, or encryption failure. Please try again.")
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 87d0a64f33bc..780bfba16c33 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2537,7 +2537,13 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void )
std::unique_ptr<SfxMedium> pMed = m_pViewImpl->CreateMedium();
if ( !pMed )
+ {
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetEditWin().GetFrameWeld(),
+ VclMessageType::Info, VclButtonsType::Ok,
+ SwResId(RID_SVXSTR_TXTFILTER_FILTERERROR)));
+ xInfoBox->run();
return;
+ }
const sal_uInt16 nSlot = m_pViewImpl->GetRequest()->GetSlot();
long nFound = InsertMedium( nSlot, std::move(pMed), m_pViewImpl->GetParam() );
More information about the Libreoffice-commits
mailing list