include/svx/xtable.hxx | 4 +++- svx/source/xoutdev/xtabhtch.cxx | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-)
New commits: commit d92b41ce9c87547fde5c43b3bea05b3be79a63f6 Author: Rishabh Kumar <kris.kr...@gmail.com> Date: Mon Jul 4 14:52:00 2016 +0530 Make hatch UI bitmap resizable Change-Id: I34e1db1f462c87d7b3a2ff9531189bea189b2ce8 Reviewed-on: https://gerrit.libreoffice.org/26894 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in> diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx index d9a9070..586b2e5 100644 --- a/include/svx/xtable.hxx +++ b/include/svx/xtable.hxx @@ -331,9 +331,10 @@ public: class SVX_DLLPUBLIC XHatchList : public XPropertyList { +private: + Bitmap CreateBitmap(long nIndex, const Size& rSize) const; protected: virtual Bitmap CreateBitmapForUI(long nIndex) override; - public: XHatchList(const OUString& rPath, const OUString& rReferer); virtual ~XHatchList(); @@ -343,6 +344,7 @@ public: using XPropertyList::Remove; XHatchEntry* Remove(long nIndex); XHatchEntry* GetHatch(long nIndex) const; + Bitmap GetBitmapForPreview(long nIndex, const Size& rSize); virtual css::uno::Reference< css::container::XNameContainer > createInstance() override; virtual bool Create() override; diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx index bb66f70..78869c8 100644 --- a/svx/source/xoutdev/xtabhtch.cxx +++ b/svx/source/xoutdev/xtabhtch.cxx @@ -80,7 +80,7 @@ bool XHatchList::Create() return true; } -Bitmap XHatchList::CreateBitmapForUI( long nIndex ) +Bitmap XHatchList::CreateBitmap( long nIndex, const Size& rSize) const { Bitmap aRetval; OSL_ENSURE(nIndex < Count(), "OOps, access out of range (!)"); @@ -88,7 +88,6 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex ) if(nIndex < Count()) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize(); // prepare polygon geometry for rectangle const basegfx::B2DPolygon aRectangle( @@ -186,4 +185,17 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex ) return aRetval; } +Bitmap XHatchList::CreateBitmapForUI(long nIndex) +{ + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize(); + Bitmap aRetVal = CreateBitmap(nIndex, rSize); + return aRetVal; +} + +Bitmap XHatchList::GetBitmapForPreview(long nIndex, const Size& rSize) +{ + return CreateBitmap(nIndex, rSize); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits