summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2016-02-16 19:05:47 -0400
committerHenry Castro <hcastro@collabora.com>2016-02-17 20:10:40 -0400
commit6eec9807349494c54decfdd22bc2d36e70dfea2f (patch)
treede290f88bf09d106e581f732a82d7b177cc751c6 /sd
parent8e19dadb7734fc54c41c688854aa2649ec9acf18 (diff)
tdf#97719: Canceling insert image dialog gives error dialog
Change-Id: I3ac9b0fe4d5a91d16af559ee8e38bc7be97cc694 Reviewed-on: https://gerrit.libreoffice.org/22408 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fuinsert.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 81a0874921e9..e1c697c21541 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -142,13 +142,13 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
{
SvxOpenGraphicDialog aDlg(SdResId(STR_INSERTGRAPHIC));
- if( aDlg.Execute() == GRFILTER_OK )
- {
- nError = aDlg.GetGraphic(aGraphic);
- bAsLink = aDlg.IsAsLink();
- aFileName = aDlg.GetPath();
- aFilterName = aDlg.GetCurrentFilter();
- }
+ if( aDlg.Execute() != GRFILTER_OK )
+ return; // cancel dialog
+
+ nError = aDlg.GetGraphic(aGraphic);
+ bAsLink = aDlg.IsAsLink();
+ aFileName = aDlg.GetPath();
+ aFilterName = aDlg.GetCurrentFilter();
}
if( nError == GRFILTER_OK )