summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-17 21:12:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-18 09:00:06 +0100
commit1bc9a5a909be343520ce31b7c9a79998fabf65a2 (patch)
tree06f77f8822344d4686702a27176dbffea7577484 /cui
parentc3addf79d4c67d4f8f3bb2cdba0ecb6b10062636 (diff)
odd SvxBitmapCtl is used in only one place
Change-Id: I82a4c8f2e36153b0bc59571ce39956637e278fcb
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/cuitabarea.hxx1
-rw-r--r--cui/source/tabpages/tppattern.cxx30
2 files changed, 31 insertions, 0 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index aa82276fd7ab..5d6083dbe01f 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -34,6 +34,7 @@
class SdrModel;
class SdrView;
+class SvxBitmapCtl;
/************************************************************************/
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index 7cc8aabf9e95..b967c752915a 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -49,6 +49,36 @@
using namespace com::sun::star;
+/*************************************************************************
+|* Preview control for the display of bitmaps
+\************************************************************************/
+
+class SvxBitmapCtl
+{
+private:
+ Color aPixelColor, aBackgroundColor;
+ const sal_uInt16* pBmpArray;
+
+public:
+ // Constructor: BitmapCtl for SvxPixelCtl
+ SvxBitmapCtl()
+ : pBmpArray(nullptr)
+ {
+ }
+
+ // BitmapCtl: Returns the Bitmap
+ BitmapEx GetBitmapEx()
+ {
+ const Bitmap aRetval(createHistorical8x8FromArray(pBmpArray, aPixelColor, aBackgroundColor));
+
+ return BitmapEx(aRetval);
+ }
+
+ void SetBmpArray( const sal_uInt16* pPixel ) { pBmpArray = pPixel; }
+ void SetPixelColor( Color aColor ) { aPixelColor = aColor; }
+ void SetBackgroundColor( Color aColor ) { aBackgroundColor = aColor; }
+};
+
SvxPatternTabPage::SvxPatternTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs) :
SvxTabPage ( pParent,