[Libreoffice-commits] core.git: sd/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 11 21:55:16 UTC 2019


 sd/source/ui/controller/slidelayoutcontroller.cxx |    2 +-
 sd/source/ui/sidebar/LayoutMenu.cxx               |   10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 969cf08615a1b0b1d45a640362a7248039f4d4f1
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Nov 26 19:50:38 2018 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Oct 11 23:54:06 2019 +0200

    Propagate stock info through slide layouts.
    
    (cherry picked from commit f107161bbd0eb4ee5766f5f983d18b32b929b15c)
    
    Change-Id: If717db82fe6ab14bbf32225c1f1c95f44954f011
    Reviewed-on: https://gerrit.libreoffice.org/80667
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 21f1425a68ae..fc64f7439d78 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -125,7 +125,7 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info_layo
         OUString aText(SdResId(pInfo->mpStrResId));
         Image aImg(StockImage::Yes, OUString::createFromAscii(pInfo->msBmpResId));
         pValue->InsertItem(static_cast<sal_uInt16>(pInfo->maAutoLayout)+1, aImg, aText);
-        aLayoutItemSize.setWidth( std::max( aLayoutItemSize.Width(),  aImg.GetSizePixel().Width()  ) );
+        aLayoutItemSize.setWidth( std::max( aLayoutItemSize.Width(),   aImg.GetSizePixel().Width()  ) );
         aLayoutItemSize.setHeight( std::max( aLayoutItemSize.Height(), aImg.GetSizePixel().Height() ) );
     }
 
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 17f7c2655e60..ab58af558cf1 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -528,12 +528,16 @@ void LayoutMenu::Fill()
     {
         if ((WritingMode_TB_RL != pInfo->meWritingMode) || bVertical)
         {
-            BitmapEx aBmp(OUString::createFromAscii(pInfo->msBmpResId));
+            Image aImg("private:graphicrepository/" + OUString::createFromAscii(pInfo->msBmpResId));
 
             if (bRightToLeft && (WritingMode_TB_RL != pInfo->meWritingMode))
-                aBmp.Mirror (BmpMirrorFlags::Horizontal);
+            { // FIXME: avoid interpolating RTL layouts.
+                BitmapEx aRTL = aImg.GetBitmapEx();
+                aRTL.Mirror(BmpMirrorFlags::Horizontal);
+                aImg = Image(aRTL);
+            }
 
-            InsertItem(i, Image(aBmp), SdResId(pInfo->mpStrResId));
+            InsertItem(i, aImg, SdResId(pInfo->mpStrResId));
             SetItemData (i, new AutoLayout(pInfo->maAutoLayout));
         }
     }


More information about the Libreoffice-commits mailing list