From 52a1cadbdf82ddc7a8ef550627e59d5f8f15c195 Mon Sep 17 00:00:00 2001 From: Aron Budea Date: Sun, 22 Dec 2019 08:10:25 +0100 Subject: tdf#128449 Set graphic when setting background in Impress Regression from 905e6bd3ae0ca5c5ac7083430d7aa126c6526fd7 Change-Id: If0510967a339b6b46da2b7f798f478a46bd10b48 Reviewed-on: https://gerrit.libreoffice.org/85688 Tested-by: Jenkins Reviewed-by: Ashod Nakashian (cherry picked from commit 8304c671b19365e61d88a9133631775846a172a5) Reviewed-on: https://gerrit.libreoffice.org/85705 Tested-by: Jenkins CollaboraOffice --- sd/source/ui/func/fupage.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 15a8c5156cee..88c4449a0fde 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -303,8 +303,6 @@ const SfxItemSet* FuPage::ExecuteDialog(vcl::Window* pParent, SfxRequest& rReq) } else if (nId == SID_SELECT_BACKGROUND) { - OUString aFileName; - OUString aFilterName; Graphic aGraphic; ErrCode nError = ERRCODE_GRFILTER_OPENERROR; @@ -313,7 +311,8 @@ const SfxItemSet* FuPage::ExecuteDialog(vcl::Window* pParent, SfxRequest& rReq) if (pArgs && pArgs->GetItemState(SID_SELECT_BACKGROUND, true, &pItem) == SfxItemState::SET) { - aFileName = static_cast(pItem)->GetValue(); + OUString aFileName(static_cast(pItem)->GetValue()); + OUString aFilterName; if (pArgs->GetItemState(FN_PARAM_FILTER, true, &pItem) == SfxItemState::SET) aFilterName = static_cast(pItem)->GetValue(); @@ -326,11 +325,9 @@ const SfxItemSet* FuPage::ExecuteDialog(vcl::Window* pParent, SfxRequest& rReq) SvxOpenGraphicDialog aDlg(SdResId(STR_SET_BACKGROUND_PICTURE), pParent); nError = aDlg.Execute(); - if (nError != ERRCODE_NONE) + if (nError == ERRCODE_NONE) { nError = aDlg.GetGraphic(aGraphic); - aFileName = aDlg.GetPath(); - aFilterName = aDlg.GetDetectedFilter(); } } -- cgit v1.2.3