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
......@@ -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;
......
......@@ -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)
......
......@@ -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;
......
......@@ -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.
......
......@@ -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" ;
......
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