summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/strings.hrc1
-rw-r--r--sw/source/uibase/uiview/view2.cxx6
2 files changed, 7 insertions, 0 deletions
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() );