summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorRishabh Kumar <kris.kr296@gmail.com>2016-07-05 18:01:00 +0530
committerKatarina Behrens <Katarina.Behrens@cib.de>2016-07-06 10:09:49 +0000
commit21f36336c96743503e2732ff2fc1d3542e1a0088 (patch)
tree065a0ad2f4aa89359a2579c23a15dc79594a489b /svx
parent246eca3e5a698671e4ce7e078d994ffd317c2a68 (diff)
Make gradient UI bitmap resizable
Change-Id: Icaa06911a620697d86a8854ba6bc46874c195b97 Reviewed-on: https://gerrit.libreoffice.org/26949 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index 4d9a8b614626..b8c25e2e9a7a 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -87,7 +87,7 @@ bool XGradientList::Create()
return true;
}
-Bitmap XGradientList::CreateBitmapForUI( long nIndex )
+Bitmap XGradientList::CreateBitmap( long nIndex, const Size& rSize ) const
{
Bitmap aRetval;
@@ -96,8 +96,6 @@ Bitmap XGradientList::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(
basegfx::tools::createPolygonFromRect(
@@ -212,4 +210,16 @@ Bitmap XGradientList::CreateBitmapForUI( long nIndex )
return aRetval;
}
+Bitmap XGradientList::CreateBitmapForUI(long nIndex)
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
+ return CreateBitmap(nIndex, rSize);
+}
+
+Bitmap XGradientList::GetBitmapForPreview(long nIndex, const Size& rSize)
+{
+ return CreateBitmap(nIndex, rSize);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */