[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source

Aron Budea (via logerrit) logerrit at kemper.freedesktop.org
Sun Dec 22 21:11:09 UTC 2019


 sd/source/ui/func/fupage.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 44b4a697826814bf5223a407a5373809a18436f8
Author:     Aron Budea <aron.budea at collabora.com>
AuthorDate: Sun Dec 22 08:10:25 2019 +0100
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sun Dec 22 22:10:24 2019 +0100

    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 <ashnakash at gmail.com>
    (cherry picked from commit 8304c671b19365e61d88a9133631775846a172a5)
    Reviewed-on: https://gerrit.libreoffice.org/85704
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index a8f31373d8fb..b73f91e5ccde 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -304,8 +304,6 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, SfxRequest& rReq)
     }
     else if (nId == SID_SELECT_BACKGROUND)
     {
-        OUString aFileName;
-        OUString aFilterName;
         Graphic aGraphic;
         ErrCode nError = ERRCODE_GRFILTER_OPENERROR;
 
@@ -314,7 +312,8 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, SfxRequest& rReq)
 
         if (pArgs && pArgs->GetItemState(SID_SELECT_BACKGROUND, true, &pItem) == SfxItemState::SET)
         {
-            aFileName = static_cast<const SfxStringItem*>(pItem)->GetValue();
+            OUString aFileName(static_cast<const SfxStringItem*>(pItem)->GetValue());
+            OUString aFilterName;
 
             if (pArgs->GetItemState(FN_PARAM_FILTER, true, &pItem) == SfxItemState::SET)
                 aFilterName = static_cast<const SfxStringItem*>(pItem)->GetValue();
@@ -327,11 +326,9 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::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();
             }
         }
 


More information about the Libreoffice-commits mailing list