summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-17 14:09:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-17 14:27:27 +0000
commit4c89a3e8adfe33399f03eb3561dfa1b007336804 (patch)
tree7720afa2ded08146821c3cfb2a366cac84d74be6
parent4c612cd089580c3a50d3a383d3fd12fb68e7acfb (diff)
not worth converting RID_SVXCTRL_COLOR to .ui, too small and hard-coded
Change-Id: Iadc7b4d970e8c3b7f719ed6aab49986a1186cccb
-rw-r--r--include/svx/colrctrl.hxx12
-rw-r--r--include/svx/dialogs.hrc2
-rw-r--r--svx/source/tbxctrls/SvxColorChildWindow.cxx2
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx22
-rw-r--r--svx/source/tbxctrls/colrctrl.src24
5 files changed, 18 insertions, 44 deletions
diff --git a/include/svx/colrctrl.hxx b/include/svx/colrctrl.hxx
index e4d4975e6a59..7de406d33b4c 100644
--- a/include/svx/colrctrl.hxx
+++ b/include/svx/colrctrl.hxx
@@ -58,8 +58,7 @@ protected:
DECL_STATIC_LINK(SvxColorValueSet_docking, ExecDragHdl, void*);
public:
- SvxColorValueSet_docking( vcl::Window* pParent, WinBits nWinStyle = WB_ITEMBORDER );
- SvxColorValueSet_docking( vcl::Window* pParent, const ResId& rResId );
+ SvxColorValueSet_docking( vcl::Window* pParent, WinBits nWinStyle = WB_ITEMBORDER );
bool IsLeftButton() const { return mbLeftButton; }
};
@@ -100,11 +99,10 @@ protected:
virtual void Resizing( Size& rSize ) SAL_OVERRIDE;
public:
- SvxColorDockingWindow( SfxBindings* pBindings,
- SfxChildWindow *pCW,
- vcl::Window* pParent,
- const ResId& rResId );
- virtual ~SvxColorDockingWindow();
+ SvxColorDockingWindow(SfxBindings* pBindings,
+ SfxChildWindow *pCW,
+ vcl::Window* pParent);
+ virtual ~SvxColorDockingWindow();
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 519de01f651d..206443ea0bed 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -180,8 +180,6 @@
// FontWork dialog
#define RID_SVXDLG_FONTWORK (RID_SVX_START + 93)
-#define RID_SVXCTRL_COLOR (RID_SVX_START + 117)
-
// for Toolbox-Control style
#define RID_SVXTBX_STYLE (RID_SVX_START + 120)
#define RID_SVX_STYLE_MENU (RID_SVX_START + 121)
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" ;