Kaydet (Commit) 4c89a3e8 authored tarafından Caolán McNamara's avatar Caolán McNamara

not worth converting RID_SVXCTRL_COLOR to .ui, too small and hard-coded

Change-Id: Iadc7b4d970e8c3b7f719ed6aab49986a1186cccb
üst 4c612cd0
...@@ -59,7 +59,6 @@ protected: ...@@ -59,7 +59,6 @@ protected:
public: public:
SvxColorValueSet_docking( vcl::Window* pParent, WinBits nWinStyle = WB_ITEMBORDER ); SvxColorValueSet_docking( vcl::Window* pParent, WinBits nWinStyle = WB_ITEMBORDER );
SvxColorValueSet_docking( vcl::Window* pParent, const ResId& rResId );
bool IsLeftButton() const { return mbLeftButton; } bool IsLeftButton() const { return mbLeftButton; }
}; };
...@@ -100,10 +99,9 @@ protected: ...@@ -100,10 +99,9 @@ protected:
virtual void Resizing( Size& rSize ) SAL_OVERRIDE; virtual void Resizing( Size& rSize ) SAL_OVERRIDE;
public: public:
SvxColorDockingWindow( SfxBindings* pBindings, SvxColorDockingWindow(SfxBindings* pBindings,
SfxChildWindow *pCW, SfxChildWindow *pCW,
vcl::Window* pParent, vcl::Window* pParent);
const ResId& rResId );
virtual ~SvxColorDockingWindow(); virtual ~SvxColorDockingWindow();
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
......
...@@ -180,8 +180,6 @@ ...@@ -180,8 +180,6 @@
// FontWork dialog // FontWork dialog
#define RID_SVXDLG_FONTWORK (RID_SVX_START + 93) #define RID_SVXDLG_FONTWORK (RID_SVX_START + 93)
#define RID_SVXCTRL_COLOR (RID_SVX_START + 117)
// for Toolbox-Control style // for Toolbox-Control style
#define RID_SVXTBX_STYLE (RID_SVX_START + 120) #define RID_SVXTBX_STYLE (RID_SVX_START + 120)
#define RID_SVX_STYLE_MENU (RID_SVX_START + 121) #define RID_SVX_STYLE_MENU (RID_SVX_START + 121)
......
...@@ -34,7 +34,7 @@ SvxColorChildWindow::SvxColorChildWindow( vcl::Window* _pParent, ...@@ -34,7 +34,7 @@ SvxColorChildWindow::SvxColorChildWindow( vcl::Window* _pParent,
SfxChildWindow( _pParent, nId ) SfxChildWindow( _pParent, nId )
{ {
SvxColorDockingWindow* pWin = new SvxColorDockingWindow( pBindings, this, SvxColorDockingWindow* pWin = new SvxColorDockingWindow( pBindings, this,
_pParent, SVX_RES( RID_SVXCTRL_COLOR ) ); _pParent );
pWindow = pWin; pWindow = pWin;
eChildAlignment = SFX_ALIGN_BOTTOM; eChildAlignment = SFX_ALIGN_BOTTOM;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <svx/xtable.hxx> #include <svx/xtable.hxx>
#include <svx/dialmgr.hxx> #include <svx/dialmgr.hxx>
#include "svx/xexch.hxx" #include "svx/xexch.hxx"
#include "helpid.hrc"
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
using namespace com::sun::star; using namespace com::sun::star;
...@@ -81,16 +82,14 @@ bool SvxColorValueSetData::GetData( const css::datatransfer::DataFlavor& rFlavor ...@@ -81,16 +82,14 @@ bool SvxColorValueSetData::GetData( const css::datatransfer::DataFlavor& rFlavor
return bRet; return bRet;
} }
bool SvxColorValueSetData::WriteObject( SotStorageStreamRef& rxOStm, void*, sal_uInt32 , const ::com::sun::star::datatransfer::DataFlavor& ) bool SvxColorValueSetData::WriteObject( SotStorageStreamRef& rxOStm, void*, sal_uInt32 , const ::com::sun::star::datatransfer::DataFlavor& )
{ {
WriteXFillExchangeData( *rxOStm, maData ); WriteXFillExchangeData( *rxOStm, maData );
return( rxOStm->GetError() == ERRCODE_NONE ); return( rxOStm->GetError() == ERRCODE_NONE );
} }
SvxColorValueSet_docking::SvxColorValueSet_docking( vcl::Window* _pParent, const ResId& rResId ) : SvxColorValueSet_docking::SvxColorValueSet_docking( vcl::Window* _pParent, WinBits nWinStyle ) :
SvxColorValueSet( _pParent, rResId ), SvxColorValueSet( _pParent, nWinStyle ),
DragSourceHelper( this ), DragSourceHelper( this ),
mbLeftButton(true) mbLeftButton(true)
{ {
...@@ -182,23 +181,26 @@ SvxColorDockingWindow::SvxColorDockingWindow ...@@ -182,23 +181,26 @@ SvxColorDockingWindow::SvxColorDockingWindow
( (
SfxBindings* _pBindings, SfxBindings* _pBindings,
SfxChildWindow* pCW, SfxChildWindow* pCW,
vcl::Window* _pParent, vcl::Window* _pParent
const ResId& rResId
) : ) :
SfxDockingWindow( _pBindings, pCW, _pParent, rResId ), SfxDockingWindow( _pBindings, pCW, _pParent, WB_MOVEABLE|WB_CLOSEABLE|WB_SIZEABLE|WB_DOCKABLE ),
pColorList (), pColorList (),
aColorSet ( this, ResId( 1, *rResId.GetResMgr() ) ), aColorSet ( this ),
nLeftSlot ( SID_ATTR_FILL_COLOR ), nLeftSlot ( SID_ATTR_FILL_COLOR ),
nRightSlot ( SID_ATTR_LINE_COLOR ), nRightSlot ( SID_ATTR_LINE_COLOR ),
nCols ( 20 ), nCols ( 20 ),
nLines ( 1 ), nLines ( 1 ),
nCount ( 0 ) 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.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() // Get the model from the view shell. Using SfxObjectShell::Current()
// is unreliable when called at the wrong times. // is unreliable when called at the wrong times.
......
...@@ -20,30 +20,6 @@ ...@@ -20,30 +20,6 @@
#include <svx/dialogs.hrc> #include <svx/dialogs.hrc>
#include "helpid.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 String STR_COLORTABLE
{ {
Text [ en-US ] = "Color Palette" ; Text [ en-US ] = "Color Palette" ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment