diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/tppattern.cxx | 30 |
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, |