diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-17 14:09:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-17 14:27:27 +0000 |
commit | 4c89a3e8adfe33399f03eb3561dfa1b007336804 (patch) | |
tree | 7720afa2ded08146821c3cfb2a366cac84d74be6 /svx | |
parent | 4c612cd089580c3a50d3a383d3fd12fb68e7acfb (diff) |
not worth converting RID_SVXCTRL_COLOR to .ui, too small and hard-coded
Change-Id: Iadc7b4d970e8c3b7f719ed6aab49986a1186cccb
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/SvxColorChildWindow.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/colrctrl.cxx | 22 | ||||
-rw-r--r-- | svx/source/tbxctrls/colrctrl.src | 24 |
3 files changed, 13 insertions, 35 deletions
diff --git a/svx/source/tbxctrls/SvxColorChildWindow.cxx b/svx/source/tbxctrls/SvxColorChildWindow.cxx index c390fb0d0ee4..0e93a1f6ea1f 100644 --- a/svx/source/tbxctrls/SvxColorChildWindow.cxx +++ b/svx/source/tbxctrls/SvxColorChildWindow.cxx @@ -34,7 +34,7 @@ SvxColorChildWindow::SvxColorChildWindow( vcl::Window* _pParent, SfxChildWindow( _pParent, nId ) { SvxColorDockingWindow* pWin = new SvxColorDockingWindow( pBindings, this, - _pParent, SVX_RES( RID_SVXCTRL_COLOR ) ); + _pParent ); pWindow = pWin; eChildAlignment = SFX_ALIGN_BOTTOM; diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 2713c13c0e66..2b26ac79e56b 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -34,6 +34,7 @@ #include <svx/xtable.hxx> #include <svx/dialmgr.hxx> #include "svx/xexch.hxx" +#include "helpid.hrc" #include <vcl/svapp.hxx> using namespace com::sun::star; @@ -81,16 +82,14 @@ bool SvxColorValueSetData::GetData( const css::datatransfer::DataFlavor& rFlavor return bRet; } - - bool SvxColorValueSetData::WriteObject( SotStorageStreamRef& rxOStm, void*, sal_uInt32 , const ::com::sun::star::datatransfer::DataFlavor& ) { WriteXFillExchangeData( *rxOStm, maData ); return( rxOStm->GetError() == ERRCODE_NONE ); } -SvxColorValueSet_docking::SvxColorValueSet_docking( vcl::Window* _pParent, const ResId& rResId ) : - SvxColorValueSet( _pParent, rResId ), +SvxColorValueSet_docking::SvxColorValueSet_docking( vcl::Window* _pParent, WinBits nWinStyle ) : + SvxColorValueSet( _pParent, nWinStyle ), DragSourceHelper( this ), mbLeftButton(true) { @@ -182,23 +181,26 @@ SvxColorDockingWindow::SvxColorDockingWindow ( SfxBindings* _pBindings, SfxChildWindow* pCW, - vcl::Window* _pParent, - const ResId& rResId + vcl::Window* _pParent ) : - SfxDockingWindow( _pBindings, pCW, _pParent, rResId ), + SfxDockingWindow( _pBindings, pCW, _pParent, WB_MOVEABLE|WB_CLOSEABLE|WB_SIZEABLE|WB_DOCKABLE ), pColorList (), - aColorSet ( this, ResId( 1, *rResId.GetResMgr() ) ), + aColorSet ( this ), nLeftSlot ( SID_ATTR_FILL_COLOR ), nRightSlot ( SID_ATTR_LINE_COLOR ), nCols ( 20 ), nLines ( 1 ), nCount ( 0 ) { - FreeResource(); + SetText(SVX_RESSTR(STR_COLORTABLE)); + SetSizePixel(LogicToPixel(Size(150, 22), MapMode(MAP_APPFONT))); + SetHelpId(HID_CTRL_COLOR); - aColorSet.SetStyle( aColorSet.GetStyle() | WB_ITEMBORDER ); aColorSet.SetSelectHdl( LINK( this, SvxColorDockingWindow, SelectHdl ) ); + aColorSet.SetHelpId(HID_COLOR_CTL_COLORS); + aColorSet.SetPosSizePixel(LogicToPixel(Point(2, 2), MapMode(MAP_APPFONT)), + LogicToPixel(Size(146, 18), MapMode(MAP_APPFONT))); // Get the model from the view shell. Using SfxObjectShell::Current() // is unreliable when called at the wrong times. diff --git a/svx/source/tbxctrls/colrctrl.src b/svx/source/tbxctrls/colrctrl.src index cbbcfb299866..3b22a7580bde 100644 --- a/svx/source/tbxctrls/colrctrl.src +++ b/svx/source/tbxctrls/colrctrl.src @@ -20,30 +20,6 @@ #include <svx/dialogs.hrc> #include "helpid.hrc" - // RID_SVXCTRL_COLOR ----------------------------------------------------- -DockingWindow RID_SVXCTRL_COLOR -{ - HelpID = HID_CTRL_COLOR ; - Border = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - Sizeable = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - Dockable = TRUE ; - EnableResizing = TRUE ; - Size = MAP_APPFONT ( 150 , 22 ) ; - Text [ en-US ] = "Colors" ; - Control 1 - { - HelpId = HID_COLOR_CTL_COLORS ; - Pos = MAP_APPFONT ( 2 , 2 ) ; - Size = MAP_APPFONT ( 146 , 18 ) ; - Border = FALSE ; - }; -}; - String STR_COLORTABLE { Text [ en-US ] = "Color Palette" ; |