summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-08-01 15:43:47 +0200
committerJulien Nabet <serval2412@yahoo.fr>2020-08-08 09:34:15 +0200
commitba20c2b1874cac08e93c3a122c8723868a29e456 (patch)
tree31498b287cc2ec0ef1792cb2bbb7095e3423dc9f /sw
parent7f8c2d8f965ca2cb570bb40a5f8fa06902ea580e (diff)
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@documentfoundation.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/uiview/view2.cxx6
1 files changed, 6 insertions, 0 deletions
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() );