diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2018-11-26 19:50:38 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-09-23 16:42:27 +0100 |
commit | 4bc80d0ec8805a0947edb3fe84f2326ea1af66cc (patch) | |
tree | acfa8716e41b776bc293de53fea1c38682a3f1a4 | |
parent | a0edb01f1669dcb0f2b69fe20e1d909f489538d1 (diff) |
Propagate stock info through slide layouts.
(cherry picked from commit f107161bbd0eb4ee5766f5f983d18b32b929b15c)
Change-Id: If717db82fe6ab14bbf32225c1f1c95f44954f011
-rw-r--r-- | sd/source/ui/controller/slidelayoutcontroller.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.cxx | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 6f4ba93c1e92..6d4396be865b 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -134,7 +134,7 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info_layo OUString aText(SdResId(pInfo->mpStrResId)); Image aImg("private:graphicrepository/" + 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 e0da346e9d6a..c336dcd1cfaa 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -529,12 +529,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)); } } |