diff options
author | Olivier Hallot <olivier.hallot@edx.srv.br> | 2013-07-26 16:06:53 -0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-29 09:29:15 +0000 |
commit | 876fdf014124543d242ea415698c5f0a5a002b98 (patch) | |
tree | d17dc49c5f46db3bd6c8e6cfc46fdaf217e1c3ac /svx | |
parent | a0709e3213a0494df56d56a77c67358fbe1ac5bd (diff) |
Convert bitmap tab page to widget UI
Change-Id: I5633a5e96582f94b9619152805cfa13daeb3fe53
Reviewed-on: https://gerrit.libreoffice.org/5162
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 1b0b1268995f..225909032442 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -766,6 +766,27 @@ SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId& rResId, sal_uInt16 nNumb memset(pPixel, 0, nSquares * sizeof(sal_uInt16)); } +SvxPixelCtl::SvxPixelCtl( Window* pParent, sal_uInt16 nNumber ) : +Control ( pParent, WB_BORDER ), +nLines ( nNumber ), +bPaintable ( sal_True ) +{ + //aRectSize = GetOutputSize(); + aRectSize = LogicToPixel(Size(72, 72), MAP_APPFONT); + + SetPixelColor( Color( COL_BLACK ) ); + SetBackgroundColor( Color( COL_WHITE ) ); + SetLineColor( Application::GetSettings().GetStyleSettings().GetShadowColor() ); + + nSquares = nLines * nLines; + pPixel = new sal_uInt16[ nSquares ]; + memset(pPixel, 0, nSquares * sizeof(sal_uInt16)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxPixelCtl(Window *pParent, sal_uInt16 nNumber) +{ + return new SvxPixelCtl(pParent, 8 ); //nNumber); +} // Destructor dealocating the dynamic array SvxPixelCtl::~SvxPixelCtl( ) |