[Libreoffice-commits] core.git: include/svx svx/source svx/uiconfig svx/UIConfig_svx.mk
Caolán McNamara
caolanm at redhat.com
Thu Dec 18 05:13:53 PST 2014
include/svx/bmpmask.hxx | 66 +--
svx/UIConfig_svx.mk | 1
svx/source/dialog/_bmpmask.cxx | 621 ++++++++++++++-------------------
svx/source/dialog/bmpmask.hrc | 28 -
svx/source/dialog/bmpmask.src | 276 --------------
svx/uiconfig/ui/dockingcolorreplace.ui | 400 +++++++++++++++++++++
6 files changed, 703 insertions(+), 689 deletions(-)
New commits:
commit 0ef2fa807d6b984455ed531a2c4f19a644d8b2cf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 17 15:22:00 2014 +0000
convert RID_SVXDLG_BMPMASK dockingwindow to .ui
Change-Id: I1a160bd08d3be0356076789539d551f4dc6edfd4
diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx
index 395f495..8ee7e7c 100644
--- a/include/svx/bmpmask.hxx
+++ b/include/svx/bmpmask.hxx
@@ -81,44 +81,38 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
friend class MaskData;
friend class MaskSet;
- ToolBox aTbxPipette;
- ColorWindow* pCtlPipette;
- PushButton aBtnExec;
- FixedLine aGrpQ;
-
- FixedText aFt1;
- FixedText aFt2;
- FixedText aFt3;
- CheckBox aCbx1;
- MaskSet* pQSet1;
- MetricField aSp1;
- ColorLB aLbColor1;
-
- CheckBox aCbx2;
- MaskSet* pQSet2;
- MetricField aSp2;
- ColorLB aLbColor2;
-
- CheckBox aCbx3;
- MaskSet* pQSet3;
- MetricField aSp3;
- ColorLB aLbColor3;
-
- CheckBox aCbx4;
- MaskSet* pQSet4;
- MetricField aSp4;
- ColorLB aLbColor4;
+ ToolBox* m_pTbxPipette;
+ ColorWindow* m_pCtlPipette;
+ PushButton* m_pBtnExec;
+
+ CheckBox* m_pCbx1;
+ MaskSet* m_pQSet1;
+ MetricField* m_pSp1;
+ ColorLB* m_pLbColor1;
+
+ CheckBox* m_pCbx2;
+ MaskSet* m_pQSet2;
+ MetricField* m_pSp2;
+ ColorLB* m_pLbColor2;
+
+ CheckBox* m_pCbx3;
+ MaskSet* m_pQSet3;
+ MetricField* m_pSp3;
+ ColorLB* m_pLbColor3;
+
+ CheckBox* m_pCbx4;
+ MaskSet* m_pQSet4;
+ MetricField* m_pSp4;
+ ColorLB* m_pLbColor4;
MaskData* pData;
- CheckBox aCbxTrans;
- ColorLB aLbColorTrans;
+ CheckBox* m_pCbxTrans;
+ ColorLB* m_pLbColorTrans;
XColorListRef pColLst;
Color aPipetteColor;
SvxBmpMaskSelectItem aSelItem;
- Image maImgPipette;
-
virtual bool Close() SAL_OVERRIDE;
#ifdef BMPMASK_PRIVATE
@@ -143,11 +137,8 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
public:
- SvxBmpMask( SfxBindings *pBindinx,
- SfxChildWindow *pCW,
- vcl::Window* pParent,
- const ResId& rResId );
- virtual ~SvxBmpMask();
+ SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* pParent);
+ virtual ~SvxBmpMask();
void SetColor( const Color& rColor );
void PipetteClicked();
@@ -163,9 +154,6 @@ public:
void onSelect( MaskSet* pSet );
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
- void ApplyStyle();
-
private:
/** Set names for accessible objects. This is necessary for objects
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index ea01872..da79eb8 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/datanavigator \
svx/uiconfig/ui/deleteheaderdialog \
svx/uiconfig/ui/deletefooterdialog \
+ svx/uiconfig/ui/dockingcolorreplace \
svx/uiconfig/ui/docrecoverybrokendialog \
svx/uiconfig/ui/docrecoveryprogressdialog \
svx/uiconfig/ui/docrecoveryrecoverdialog \
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 5570bc8..75668ce 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -34,7 +34,7 @@
#include <svx/svxids.hrc>
#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
-
+#include "helpid.hrc"
#define BMP_RESID(nId) ResId(nId, DIALOG_MGR())
#define TRANSP_COL (Color( 252, 252, 252 ))
@@ -56,32 +56,33 @@
} \
}
-
-
SFX_IMPL_DOCKINGWINDOW_WITHID( SvxBmpMaskChildWindow, SID_BMPMASK )
-
-
class ColorWindow : public Control
{
Color aColor;
public:
- ColorWindow( vcl::Window* pParent, const ResId& rId ) :
- Control( pParent, rId ),
- aColor( COL_WHITE ) {};
+ ColorWindow(vcl::Window* pParent)
+ : Control(pParent, WB_BORDER)
+ , aColor( COL_WHITE )
+ {
+ }
- void SetColor( const Color& rColor )
- {
- aColor = rColor;
- Invalidate();
- }
+ void SetColor( const Color& rColor )
+ {
+ aColor = rColor;
+ Invalidate();
+ }
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
-};
-
+ virtual Size GetOptimalSize() const SAL_OVERRIDE
+ {
+ return LogicToPixel(Size(43, 14), MAP_APPFONT);
+ }
+};
class MaskSet : public ValueSet
{
@@ -89,25 +90,26 @@ class MaskSet : public ValueSet
public:
- MaskSet( SvxBmpMask* pParent, const ResId& rId );
+ MaskSet(SvxBmpMask* pMask, vcl::Window* pParent);
virtual void Select() SAL_OVERRIDE;
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
+ virtual Size GetOptimalSize() const SAL_OVERRIDE
+ {
+ return LogicToPixel(Size(24, 12), MAP_APPFONT);
+ }
void onEditColor();
};
-
-
-MaskSet::MaskSet( SvxBmpMask* pParent, const ResId& rId ) :
- ValueSet ( pParent, rId ),
- pSvxBmpMask ( pParent )
+MaskSet::MaskSet(SvxBmpMask* pMask, vcl::Window* pParent)
+ : ValueSet(pParent, WB_TABSTOP)
+ , pSvxBmpMask(pMask)
{
+ SetHelpId(HID_BMPMASK_CTL_QCOL_1);
}
-
-
void MaskSet::Select()
{
ValueSet::Select();
@@ -191,49 +193,45 @@ MaskData::MaskData( SvxBmpMask* pBmpMask, SfxBindings& rBind ) :
{
}
-
-
IMPL_LINK( MaskData, PipetteHdl, ToolBox*, pTbx )
{
SfxBoolItem aBItem( SID_BMPMASK_PIPETTE,
- pTbx->IsItemChecked( TBI_PIPETTE ) );
+ pTbx->IsItemChecked( pTbx->GetItemId(0) ) );
rBindings.GetDispatcher()->Execute( SID_BMPMASK_PIPETTE, OWN_CALLMODE, &aBItem, 0L );
return 0;
}
-
-
IMPL_LINK( MaskData, CbxHdl, CheckBox*, pCbx )
{
- bIsReady = pMask->aCbx1.IsChecked() || pMask->aCbx2.IsChecked() ||
- pMask->aCbx3.IsChecked() || pMask->aCbx4.IsChecked();
+ bIsReady = pMask->m_pCbx1->IsChecked() || pMask->m_pCbx2->IsChecked() ||
+ pMask->m_pCbx3->IsChecked() || pMask->m_pCbx4->IsChecked();
if ( bIsReady && IsExecReady() )
- pMask->aBtnExec.Enable();
+ pMask->m_pBtnExec->Enable();
else
- pMask->aBtnExec.Disable();
+ pMask->m_pBtnExec->Disable();
// When a checkbox is checked, the pipette is enabled
if ( pCbx->IsChecked() )
{
MaskSet* pSet = NULL;
- if ( pCbx == &( pMask->aCbx1 ) )
- pSet = pMask->pQSet1;
- else if ( pCbx == &( pMask->aCbx2 ) )
- pSet = pMask->pQSet2;
- else if ( pCbx == &( pMask->aCbx3 ) )
- pSet = pMask->pQSet3;
- else // if ( pCbx == &( pMask->aCbx4 ) )
- pSet = pMask->pQSet4;
+ if (pCbx == pMask->m_pCbx1)
+ pSet = pMask->m_pQSet1;
+ else if (pCbx == pMask->m_pCbx2)
+ pSet = pMask->m_pQSet2;
+ else if (pCbx == pMask->m_pCbx3)
+ pSet = pMask->m_pQSet3;
+ else // if ( pCbx == pMask->m_pCbx4 )
+ pSet = pMask->m_pQSet4;
pSet->SelectItem( 1 );
pSet->Select();
- pMask->aTbxPipette.CheckItem( TBI_PIPETTE, true );
- PipetteHdl( &( pMask->aTbxPipette ) );
+ pMask->m_pTbxPipette->CheckItem( pMask->m_pTbxPipette->GetItemId(0), true );
+ PipetteHdl(pMask->m_pTbxPipette);
}
return 0;
@@ -246,58 +244,58 @@ IMPL_LINK( MaskData, CbxTransHdl, CheckBox*, pCbx )
bIsReady = pCbx->IsChecked();
if ( bIsReady )
{
- pMask->pQSet1->Disable();
- pMask->pQSet2->Disable();
- pMask->pQSet3->Disable();
- pMask->pQSet4->Disable();
- pMask->pCtlPipette->Disable();
- pMask->aCbx1.Disable();
- pMask->aSp1.Disable();
- pMask->aCbx2.Disable();
- pMask->aSp2.Disable();
- pMask->aCbx3.Disable();
- pMask->aSp3.Disable();
- pMask->aCbx4.Disable();
- pMask->aSp4.Disable();
- pMask->aTbxPipette.Disable();
-
- pMask->aLbColor1.Disable();
- pMask->aLbColor2.Disable();
- pMask->aLbColor3.Disable();
- pMask->aLbColor4.Disable();
- pMask->aLbColorTrans.Enable();
+ pMask->m_pQSet1->Disable();
+ pMask->m_pQSet2->Disable();
+ pMask->m_pQSet3->Disable();
+ pMask->m_pQSet4->Disable();
+ pMask->m_pCtlPipette->Disable();
+ pMask->m_pCbx1->Disable();
+ pMask->m_pSp1->Disable();
+ pMask->m_pCbx2->Disable();
+ pMask->m_pSp2->Disable();
+ pMask->m_pCbx3->Disable();
+ pMask->m_pSp3->Disable();
+ pMask->m_pCbx4->Disable();
+ pMask->m_pSp4->Disable();
+ pMask->m_pTbxPipette->Disable();
+
+ pMask->m_pLbColor1->Disable();
+ pMask->m_pLbColor2->Disable();
+ pMask->m_pLbColor3->Disable();
+ pMask->m_pLbColor4->Disable();
+ pMask->m_pLbColorTrans->Enable();
}
else
{
- pMask->pQSet1->Enable();
- pMask->pQSet2->Enable();
- pMask->pQSet3->Enable();
- pMask->pQSet4->Enable();
- pMask->pCtlPipette->Enable();
- pMask->aCbx1.Enable();
- pMask->aSp1.Enable();
- pMask->aCbx2.Enable();
- pMask->aSp2.Enable();
- pMask->aCbx3.Enable();
- pMask->aSp3.Enable();
- pMask->aCbx4.Enable();
- pMask->aSp4.Enable();
- pMask->aTbxPipette.Enable();
-
- pMask->aLbColor1.Enable();
- pMask->aLbColor2.Enable();
- pMask->aLbColor3.Enable();
- pMask->aLbColor4.Enable();
- pMask->aLbColorTrans.Disable();
-
- bIsReady = pMask->aCbx1.IsChecked() || pMask->aCbx2.IsChecked() ||
- pMask->aCbx3.IsChecked() || pMask->aCbx4.IsChecked();
+ pMask->m_pQSet1->Enable();
+ pMask->m_pQSet2->Enable();
+ pMask->m_pQSet3->Enable();
+ pMask->m_pQSet4->Enable();
+ pMask->m_pCtlPipette->Enable();
+ pMask->m_pCbx1->Enable();
+ pMask->m_pSp1->Enable();
+ pMask->m_pCbx2->Enable();
+ pMask->m_pSp2->Enable();
+ pMask->m_pCbx3->Enable();
+ pMask->m_pSp3->Enable();
+ pMask->m_pCbx4->Enable();
+ pMask->m_pSp4->Enable();
+ pMask->m_pTbxPipette->Enable();
+
+ pMask->m_pLbColor1->Enable();
+ pMask->m_pLbColor2->Enable();
+ pMask->m_pLbColor3->Enable();
+ pMask->m_pLbColor4->Enable();
+ pMask->m_pLbColorTrans->Disable();
+
+ bIsReady = pMask->m_pCbx1->IsChecked() || pMask->m_pCbx2->IsChecked() ||
+ pMask->m_pCbx3->IsChecked() || pMask->m_pCbx4->IsChecked();
}
if ( bIsReady && IsExecReady() )
- pMask->aBtnExec.Enable();
+ pMask->m_pBtnExec->Enable();
else
- pMask->aBtnExec.Disable();
+ pMask->m_pBtnExec->Disable();
return 0L;
}
@@ -307,10 +305,10 @@ IMPL_LINK( MaskData, CbxTransHdl, CheckBox*, pCbx )
IMPL_LINK( MaskData, FocusLbHdl, ColorLB*, pLb )
{
// MT: bFireFox as API parameter is ugly, find better solution????
- pMask->pQSet1->SelectItem( pLb == &( pMask->aLbColor1 ) ? 1 : 0 /* , false */ );
- pMask->pQSet2->SelectItem( pLb == &( pMask->aLbColor2 ) ? 1 : 0 /* , false */ );
- pMask->pQSet3->SelectItem( pLb == &( pMask->aLbColor3 ) ? 1 : 0 /* , false */ );
- pMask->pQSet4->SelectItem( pLb == &( pMask->aLbColor4 ) ? 1 : 0 /* , false */ );
+ pMask->m_pQSet1->SelectItem( pLb == pMask->m_pLbColor1 ? 1 : 0 /* , false */ );
+ pMask->m_pQSet2->SelectItem( pLb == pMask->m_pLbColor2 ? 1 : 0 /* , false */ );
+ pMask->m_pQSet3->SelectItem( pLb == pMask->m_pLbColor3 ? 1 : 0 /* , false */ );
+ pMask->m_pQSet4->SelectItem( pLb == pMask->m_pLbColor4 ? 1 : 0 /* , false */ );
return 0;
}
@@ -325,8 +323,6 @@ IMPL_LINK_NOARG(MaskData, ExecHdl)
return 0L;
}
-
-
void ColorWindow::Paint( const Rectangle &/*Rect*/ )
{
const Color& rOldLineColor = GetLineColor();
@@ -341,8 +337,6 @@ void ColorWindow::Paint( const Rectangle &/*Rect*/ )
SetFillColor( rOldFillColor );
}
-
-
SvxBmpMaskSelectItem::SvxBmpMaskSelectItem( sal_uInt16 nId_, SvxBmpMask& rMask,
SfxBindings& rBindings ) :
SfxControllerItem ( nId_, rBindings ),
@@ -364,201 +358,158 @@ void SvxBmpMaskSelectItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*
}
}
-
-
-SvxBmpMaskChildWindow::SvxBmpMaskChildWindow( vcl::Window* pParent_, sal_uInt16 nId,
- SfxBindings* pBindings,
- SfxChildWinInfo* pInfo ) :
- SfxChildWindow( pParent_, nId )
+SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo)
+ : SfxChildWindow(pParent_, nId)
{
- pWindow = new SvxBmpMask( pBindings, this, pParent_,
- BMP_RESID( RID_SVXDLG_BMPMASK ) );
- SvxBmpMask* pDlg = static_cast<SvxBmpMask*>(pWindow);
+ SvxBmpMask* pDlg = new SvxBmpMask(pBindings, this, pParent_);
+
+ pWindow = pDlg;
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
pDlg->Initialize( pInfo );
}
-
-
-SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx,
- SfxChildWindow *pCW,
- vcl::Window* pParent,
- const ResId& rResId ) :
- SfxDockingWindow ( pBindinx, pCW, pParent, rResId ),
- aTbxPipette ( this, BMP_RESID( TBX_PIPETTE ) ),
- pCtlPipette ( new ColorWindow( this, BMP_RESID( WND_PIPETTE ) ) ),
- aBtnExec ( this, BMP_RESID( BTN_EXEC ) ),
- aGrpQ ( this, BMP_RESID( GRP_Q ) ),
-
- aFt1 ( this, BMP_RESID ( FT_1 ) ),
- aFt2 ( this, BMP_RESID ( FT_2 ) ),
- aFt3 ( this, BMP_RESID ( FT_3 ) ),
-
- aCbx1 ( this, BMP_RESID( CBX_1 ) ),
- pQSet1 ( new MaskSet( this, BMP_RESID( QCOL_1 ) ) ),
- aSp1 ( this, BMP_RESID( SP_1 ) ),
- aLbColor1 ( this, BMP_RESID ( LB_1 ) ),
-
- aCbx2 ( this, BMP_RESID( CBX_2 ) ),
- pQSet2 ( new MaskSet( this, BMP_RESID( QCOL_2 ) ) ),
- aSp2 ( this, BMP_RESID( SP_2 ) ),
- aLbColor2 ( this, BMP_RESID ( LB_2 ) ),
-
- aCbx3 ( this, BMP_RESID( CBX_3 ) ),
- pQSet3 ( new MaskSet( this, BMP_RESID( QCOL_3 ) ) ),
- aSp3 ( this, BMP_RESID( SP_3 ) ),
- aLbColor3 ( this, BMP_RESID ( LB_3 ) ),
-
- aCbx4 ( this, BMP_RESID( CBX_4 ) ),
- pQSet4 ( new MaskSet( this, BMP_RESID( QCOL_4 ) ) ),
- aSp4 ( this, BMP_RESID( SP_4 ) ),
- aLbColor4 ( this, BMP_RESID ( LB_4 ) ),
-
- pData ( new MaskData( this, *pBindinx ) ),
- aCbxTrans ( this, BMP_RESID( CBX_TRANS ) ),
- aLbColorTrans ( this, BMP_RESID ( LB_TRANS ) ),
- aPipetteColor ( COL_WHITE ),
- aSelItem ( SID_BMPMASK_EXEC, *this, *pBindinx ),
- maImgPipette ( BMP_RESID ( IMG_PIPETTE ) )
+SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* pParent)
+ : SfxDockingWindow(pBindinx, pCW, pParent, "DockingColorReplace",
+ "svx/ui/dockingcolorreplace.ui" )
+ , pData(new MaskData(this, *pBindinx))
+ , aPipetteColor(COL_WHITE)
+ , aSelItem(SID_BMPMASK_EXEC, *this, *pBindinx)
{
- FreeResource();
-
- ApplyStyle();
-
- aTbxPipette.SetSizePixel( aTbxPipette.CalcWindowSizePixel() );
- aTbxPipette.SetSelectHdl( LINK( pData, MaskData, PipetteHdl ) );
- aBtnExec.SetClickHdl( LINK( pData, MaskData, ExecHdl ) );
-
- aCbx1.SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
- aCbx2.SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
- aCbx3.SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
- aCbx4.SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
- aCbxTrans.SetClickHdl( LINK( pData, MaskData, CbxTransHdl ) );
+ get(m_pTbxPipette, "toolbar");
+ m_pTbxPipette->SetItemBits(m_pTbxPipette->GetItemId(0),
+ ToolBoxItemBits::AUTOCHECK);
+ get(m_pBtnExec, "replace");
+ m_pCtlPipette = new ColorWindow(get<Window>("toolgrid"));
+ m_pCtlPipette->Show();
+ m_pCtlPipette->set_grid_left_attach(1);
+ m_pCtlPipette->set_grid_top_attach(0);
+ m_pCtlPipette->set_hexpand(true);
+ get(m_pCbx1, "cbx1");
+ Window *pGrid = get<Window>("colorgrid");
+ m_pQSet1 = new MaskSet(this, pGrid);
+ m_pQSet1->set_grid_left_attach(1);
+ m_pQSet1->set_grid_top_attach(1);
+ m_pQSet1->Show();
+ get(m_pSp1, "tol1");
+ get(m_pLbColor1, "color1");
+ get(m_pCbx2, "cbx2");
+ m_pQSet2 = new MaskSet(this, pGrid);
+ m_pQSet2->set_grid_left_attach(1);
+ m_pQSet2->set_grid_top_attach(2);
+ m_pQSet2->Show();
+ get(m_pSp2, "tol2");
+ get(m_pLbColor2, "color2");
+ get(m_pCbx3, "cbx3");
+ m_pQSet3 = new MaskSet(this, pGrid);
+ m_pQSet3->set_grid_left_attach(1);
+ m_pQSet3->set_grid_top_attach(3);
+ m_pQSet3->Show();
+ get(m_pSp3, "tol3");
+ get(m_pLbColor3, "color3");
+ get(m_pCbx4, "cbx4");
+ m_pQSet4 = new MaskSet(this, pGrid);
+ m_pQSet4->set_grid_left_attach(1);
+ m_pQSet4->set_grid_top_attach(4);
+ m_pQSet4->Show();
+ get(m_pSp4, "tol4");
+ get(m_pLbColor4, "color4");
+ get(m_pCbxTrans, "cbx5");
+ get(m_pLbColorTrans, "color5");
+
+ //temp fill it to get optimal size
+ m_pLbColor1->Fill(XColorList::GetStdColorList());
+ m_pLbColor1->set_width_request(m_pLbColor1->get_preferred_size().Width());
+ m_pLbColor1->Clear();
+ //clear again
+
+ m_pTbxPipette->SetSelectHdl( LINK( pData, MaskData, PipetteHdl ) );
+ m_pBtnExec->SetClickHdl( LINK( pData, MaskData, ExecHdl ) );
+
+ m_pCbx1->SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
+ m_pCbx2->SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
+ m_pCbx3->SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
+ m_pCbx4->SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
+ m_pCbxTrans->SetClickHdl( LINK( pData, MaskData, CbxTransHdl ) );
SetAccessibleNames ();
- aLbColor1.SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
- aLbColor2.SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
- aLbColor3.SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
- aLbColor4.SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
- aLbColorTrans.Disable();
+ m_pLbColor1->SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
+ m_pLbColor2->SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
+ m_pLbColor3->SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
+ m_pLbColor4->SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
+ m_pLbColorTrans->Disable();
- aSp1.SetValue( 10 );
- aSp2.SetValue( 10 );
- aSp3.SetValue( 10 );
- aSp4.SetValue( 10 );
-
- pQSet1->SetStyle( pQSet1->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
- pQSet1->SetColCount( 1 );
- pQSet1->SetLineCount( 1 );
+ m_pQSet1->SetStyle( m_pQSet1->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
+ m_pQSet1->SetColCount( 1 );
+ m_pQSet1->SetLineCount( 1 );
OUString sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
OUString sColorPaletteN;
sColorPaletteN = sColorPalette;
sColorPaletteN += " 1";
- pQSet1->InsertItem( 1, aPipetteColor, sColorPaletteN);
- pQSet1->SelectItem( 1 );
+ m_pQSet1->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ m_pQSet1->SelectItem( 1 );
- pQSet2->SetStyle( pQSet2->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
- pQSet2->SetColCount( 1 );
- pQSet2->SetLineCount( 1 );
+ m_pQSet2->SetStyle( m_pQSet2->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
+ m_pQSet2->SetColCount( 1 );
+ m_pQSet2->SetLineCount( 1 );
sColorPaletteN = sColorPalette;
sColorPaletteN += " 2";
- pQSet2->InsertItem( 1, aPipetteColor, sColorPaletteN);
- pQSet2->SelectItem( 0 );
+ m_pQSet2->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ m_pQSet2->SelectItem( 0 );
- pQSet3->SetStyle( pQSet3->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
- pQSet3->SetColCount( 1 );
- pQSet3->SetLineCount( 1 );
+ m_pQSet3->SetStyle( m_pQSet3->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
+ m_pQSet3->SetColCount( 1 );
+ m_pQSet3->SetLineCount( 1 );
sColorPaletteN = sColorPalette;
sColorPaletteN += " 3";
- pQSet3->InsertItem( 1, aPipetteColor, sColorPaletteN);
- pQSet3->SelectItem( 0 );
+ m_pQSet3->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ m_pQSet3->SelectItem( 0 );
- pQSet4->SetStyle( pQSet4->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
- pQSet4->SetColCount( 1 );
- pQSet4->SetLineCount( 1 );
+ m_pQSet4->SetStyle( m_pQSet4->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
+ m_pQSet4->SetColCount( 1 );
+ m_pQSet4->SetLineCount( 1 );
sColorPaletteN = sColorPalette;
sColorPaletteN += " 4";
- pQSet4->InsertItem( 1, aPipetteColor, sColorPaletteN);
- pQSet4->SelectItem( 0 );
-
- pQSet1->Show();
- pQSet2->Show();
- pQSet3->Show();
- pQSet4->Show();
-
- aCbx1.SetAccessibleRelationMemberOf( &aGrpQ );
- pQSet1->SetAccessibleRelationMemberOf( &aGrpQ );
- aSp1.SetAccessibleRelationMemberOf( &aGrpQ );
- aLbColor1.SetAccessibleRelationMemberOf( &aGrpQ );
- aCbx1.SetAccessibleRelationLabeledBy( &aFt1 );
- pQSet1->SetAccessibleRelationLabeledBy( &aFt1 );
- aSp1.SetAccessibleRelationLabeledBy( &aFt2 );
- aLbColor1.SetAccessibleRelationLabeledBy( &aFt3 );
- aCbx2.SetAccessibleRelationMemberOf( &aGrpQ );
- pQSet2->SetAccessibleRelationMemberOf( &aGrpQ );
- aSp2.SetAccessibleRelationMemberOf( &aGrpQ );
- aLbColor2.SetAccessibleRelationMemberOf( &aGrpQ );
- aCbx2.SetAccessibleRelationLabeledBy( &aFt1 );
- pQSet2->SetAccessibleRelationLabeledBy( &aFt1 );
- aSp2.SetAccessibleRelationLabeledBy( &aFt2 );
- aLbColor2.SetAccessibleRelationLabeledBy( &aFt3 );
- aCbx3.SetAccessibleRelationMemberOf( &aGrpQ );
- pQSet3->SetAccessibleRelationMemberOf( &aGrpQ );
- aSp3.SetAccessibleRelationMemberOf( &aGrpQ );
- aLbColor3.SetAccessibleRelationMemberOf( &aGrpQ );
- aCbx3.SetAccessibleRelationLabeledBy( &aFt1 );
- pQSet3->SetAccessibleRelationLabeledBy( &aFt1 );
- aSp3.SetAccessibleRelationLabeledBy( &aFt2 );
- aLbColor3.SetAccessibleRelationLabeledBy( &aFt3 );
- aCbx4.SetAccessibleRelationMemberOf( &aGrpQ );
- pQSet4->SetAccessibleRelationMemberOf( &aGrpQ );
- aSp4.SetAccessibleRelationMemberOf( &aGrpQ );
- aLbColor4.SetAccessibleRelationMemberOf( &aGrpQ );
- aCbx4.SetAccessibleRelationLabeledBy( &aFt1 );
- pQSet4->SetAccessibleRelationLabeledBy( &aFt1 );
- aSp4.SetAccessibleRelationLabeledBy( &aFt2 );
- aLbColor4.SetAccessibleRelationLabeledBy( &aFt3 );
- aLbColorTrans.SetAccessibleRelationLabeledBy( &aCbxTrans );
- aLbColorTrans.SetAccessibleRelationMemberOf( &aGrpQ );
- aCbxTrans.SetAccessibleRelationMemberOf( &aGrpQ );
-}
-
+ m_pQSet4->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ m_pQSet4->SelectItem( 0 );
+ m_pQSet1->Show();
+ m_pQSet2->Show();
+ m_pQSet3->Show();
+ m_pQSet4->Show();
+}
SvxBmpMask::~SvxBmpMask()
{
- delete pQSet1;
- delete pQSet2;
- delete pQSet3;
- delete pQSet4;
- delete pCtlPipette;
+ delete m_pQSet1;
+ delete m_pQSet2;
+ delete m_pQSet3;
+ delete m_pQSet4;
+ delete m_pCtlPipette;
delete pData;
}
-
-
/** is called by a MaskSet when it is selected */
void SvxBmpMask::onSelect( MaskSet* pSet )
{
// now deselect all other value sets
- if( pSet != pQSet1 )
- pQSet1->SelectItem( 0 );
+ if( pSet != m_pQSet1 )
+ m_pQSet1->SelectItem( 0 );
- if( pSet != pQSet2 )
- pQSet2->SelectItem( 0 );
+ if( pSet != m_pQSet2 )
+ m_pQSet2->SelectItem( 0 );
- if( pSet != pQSet3 )
- pQSet3->SelectItem( 0 );
+ if( pSet != m_pQSet3 )
+ m_pQSet3->SelectItem( 0 );
- if( pSet != pQSet4 )
- pQSet4->SelectItem( 0 );
+ if( pSet != m_pQSet4 )
+ m_pQSet4->SelectItem( 0 );
}
-
-
bool SvxBmpMask::Close()
{
SfxBoolItem aItem2( SID_BMPMASK_PIPETTE, false );
@@ -567,15 +518,11 @@ bool SvxBmpMask::Close()
return SfxDockingWindow::Close();
}
-
-
bool SvxBmpMask::NeedsColorList() const
{
- return ( aLbColor1.GetEntryCount() == 0 );
+ return ( m_pLbColor1->GetEntryCount() == 0 );
}
-
-
void SvxBmpMask::SetColorList( const XColorListRef &pList )
{
if ( pList.is() && ( pList != pColLst ) )
@@ -584,78 +531,72 @@ void SvxBmpMask::SetColorList( const XColorListRef &pList )
pColLst = pList;
- aLbColorTrans.Fill( pColLst );
- aLbColorTrans.SelectEntryPos( 0 );
+ m_pLbColorTrans->Fill( pColLst );
+ m_pLbColorTrans->SelectEntryPos( 0 );
- aLbColor1.Fill( pColLst );
- aLbColor1.InsertEntry( TRANSP_COL, aTransp, 0 );
- aLbColor1.SelectEntryPos( 0 );
+ m_pLbColor1->Fill( pColLst );
+ m_pLbColor1->InsertEntry( TRANSP_COL, aTransp, 0 );
+ m_pLbColor1->SelectEntryPos( 0 );
- aLbColor2.Fill( pColLst );
- aLbColor2.InsertEntry( TRANSP_COL, aTransp, 0 );
- aLbColor2.SelectEntryPos( 0 );
+ m_pLbColor2->Fill( pColLst );
+ m_pLbColor2->InsertEntry( TRANSP_COL, aTransp, 0 );
+ m_pLbColor2->SelectEntryPos( 0 );
- aLbColor3.Fill( pColLst );
- aLbColor3.InsertEntry( TRANSP_COL, aTransp, 0 );
- aLbColor3.SelectEntryPos( 0 );
+ m_pLbColor3->Fill( pColLst );
+ m_pLbColor3->InsertEntry( TRANSP_COL, aTransp, 0 );
+ m_pLbColor3->SelectEntryPos( 0 );
- aLbColor4.Fill( pColLst );
- aLbColor4.InsertEntry( TRANSP_COL, aTransp, 0 );
- aLbColor4.SelectEntryPos( 0 );
+ m_pLbColor4->Fill( pColLst );
+ m_pLbColor4->InsertEntry( TRANSP_COL, aTransp, 0 );
+ m_pLbColor4->SelectEntryPos( 0 );
}
}
-
-
void SvxBmpMask::SetColor( const Color& rColor )
{
aPipetteColor = rColor;
- pCtlPipette->SetColor( aPipetteColor );
+ m_pCtlPipette->SetColor( aPipetteColor );
}
-
-
void SvxBmpMask::PipetteClicked()
{
- if( pQSet1->GetSelectItemId() == 1 )
+ if( m_pQSet1->GetSelectItemId() == 1 )
{
- aCbx1.Check( true );
- pData->CbxHdl( &aCbx1 );
- pQSet1->SetItemColor( 1, aPipetteColor );
+ m_pCbx1->Check( true );
+ pData->CbxHdl(m_pCbx1);
+ m_pQSet1->SetItemColor( 1, aPipetteColor );
}
- else if( pQSet2->GetSelectItemId() == 1 )
+ else if( m_pQSet2->GetSelectItemId() == 1 )
{
- aCbx2.Check( true );
- pData->CbxHdl( &aCbx2 );
- pQSet2->SetItemColor( 1, aPipetteColor );
+ m_pCbx2->Check( true );
+ pData->CbxHdl(m_pCbx2);
+ m_pQSet2->SetItemColor( 1, aPipetteColor );
}
- else if( pQSet3->GetSelectItemId() == 1 )
+ else if( m_pQSet3->GetSelectItemId() == 1 )
{
- aCbx3.Check( true );
- pData->CbxHdl( &aCbx3 );
- pQSet3->SetItemColor( 1, aPipetteColor );
+ m_pCbx3->Check( true );
+ pData->CbxHdl(m_pCbx3);
+ m_pQSet3->SetItemColor( 1, aPipetteColor );
}
- else if( pQSet4->GetSelectItemId() == 1 )
+ else if( m_pQSet4->GetSelectItemId() == 1 )
{
- aCbx4.Check( true );
- pData->CbxHdl( &aCbx4 );
- pQSet4->SetItemColor( 1, aPipetteColor );
+ m_pCbx4->Check( true );
+ pData->CbxHdl(m_pCbx4);
+ m_pQSet4->SetItemColor( 1, aPipetteColor );
}
- aTbxPipette.CheckItem( TBI_PIPETTE, false );
- pData->PipetteHdl( &aTbxPipette );
+ m_pTbxPipette->CheckItem( m_pTbxPipette->GetItemId(0), false );
+ pData->PipetteHdl(m_pTbxPipette);
}
-
-
void SvxBmpMask::SetExecState( bool bEnable )
{
pData->SetExecState( bEnable );
if ( pData->IsExecReady() && pData->IsCbxReady() )
- aBtnExec.Enable();
+ m_pBtnExec->Enable();
else
- aBtnExec.Disable();
+ m_pBtnExec->Disable();
}
@@ -664,32 +605,32 @@ sal_uInt16 SvxBmpMask::InitColorArrays( Color* pSrcCols, Color* pDstCols, sal_uI
{
sal_uInt16 nCount = 0;
- if ( aCbx1.IsChecked() )
+ if ( m_pCbx1->IsChecked() )
{
- pSrcCols[nCount] = pQSet1->GetItemColor( 1 );
- pDstCols[nCount] = aLbColor1.GetSelectEntryColor();
- pTols[nCount++] = static_cast<sal_uIntPtr>(aSp1.GetValue());
+ pSrcCols[nCount] = m_pQSet1->GetItemColor( 1 );
+ pDstCols[nCount] = m_pLbColor1->GetSelectEntryColor();
+ pTols[nCount++] = static_cast<sal_uIntPtr>(m_pSp1->GetValue());
}
- if ( aCbx2.IsChecked() )
+ if ( m_pCbx2->IsChecked() )
{
- pSrcCols[nCount] = pQSet2->GetItemColor( 1 );
- pDstCols[nCount] = aLbColor2.GetSelectEntryColor();
- pTols[nCount++] = static_cast<sal_uIntPtr>(aSp2.GetValue());
+ pSrcCols[nCount] = m_pQSet2->GetItemColor( 1 );
+ pDstCols[nCount] = m_pLbColor2->GetSelectEntryColor();
+ pTols[nCount++] = static_cast<sal_uIntPtr>(m_pSp2->GetValue());
}
- if ( aCbx3.IsChecked() )
+ if ( m_pCbx3->IsChecked() )
{
- pSrcCols[nCount] = pQSet3->GetItemColor( 1 );
- pDstCols[nCount] = aLbColor3.GetSelectEntryColor();
- pTols[nCount++] = static_cast<sal_uIntPtr>(aSp3.GetValue());
+ pSrcCols[nCount] = m_pQSet3->GetItemColor( 1 );
+ pDstCols[nCount] = m_pLbColor3->GetSelectEntryColor();
+ pTols[nCount++] = static_cast<sal_uIntPtr>(m_pSp3->GetValue());
}
- if ( aCbx4.IsChecked() )
+ if ( m_pCbx4->IsChecked() )
{
- pSrcCols[nCount] = pQSet4->GetItemColor( 1 );
- pDstCols[nCount] = aLbColor4.GetSelectEntryColor();
- pTols[nCount++] = static_cast<sal_uIntPtr>(aSp4.GetValue());
+ pSrcCols[nCount] = m_pQSet4->GetItemColor( 1 );
+ pDstCols[nCount] = m_pLbColor4->GetSelectEntryColor();
+ pTols[nCount++] = static_cast<sal_uIntPtr>(m_pSp4->GetValue());
}
return nCount;
@@ -1081,7 +1022,7 @@ GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const C
Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
{
Graphic aGraphic( rGraphic );
- const Color aReplColor( aLbColorTrans.GetSelectEntryColor() );
+ const Color aReplColor( m_pLbColorTrans->GetSelectEntryColor() );
switch( rGraphic.GetType() )
{
@@ -1090,7 +1031,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
if( rGraphic.IsAnimated() )
{
// Replace transparency?
- if ( aCbxTrans.IsChecked() )
+ if ( m_pCbxTrans->IsChecked() )
aGraphic = ImpReplaceTransparency( rGraphic.GetAnimation(), aReplColor );
else
aGraphic = ImpMask( rGraphic.GetAnimation() );
@@ -1098,7 +1039,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
else
{
// Replace transparency?
- if( aCbxTrans.IsChecked() )
+ if( m_pCbxTrans->IsChecked() )
{
if( aGraphic.IsTransparent() )
{
@@ -1155,7 +1096,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
GDIMetaFile aMtf( aGraphic.GetGDIMetaFile() );
// Replace transparency?
- if( aCbxTrans.IsChecked() )
+ if( m_pCbxTrans->IsChecked() )
aMtf = ImpReplaceTransparency( aMtf, aReplColor );
else
aMtf = ImpMask( aMtf );
@@ -1182,27 +1123,11 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
return aGraphic;
}
-
-
bool SvxBmpMask::IsEyedropping() const
{
- return aTbxPipette.IsItemChecked( TBI_PIPETTE );
+ return m_pTbxPipette->IsItemChecked( m_pTbxPipette->GetItemId(0) );
}
-void SvxBmpMask::DataChanged( const DataChangedEvent& rDCEvt )
-{
- SfxDockingWindow::DataChanged( rDCEvt );
-
- if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
- ApplyStyle();
-}
-
-void SvxBmpMask::ApplyStyle()
-{
- aTbxPipette.SetItemImage( TBI_PIPETTE, maImgPipette );
-}
-
-
/** Set an accessible name for the source color check boxes. Without this
the lengthy description is read.
*/
@@ -1213,64 +1138,64 @@ void SvxBmpMask::SetAccessibleNames (void)
sSourceColorN = sSourceColor;
sSourceColorN += " 1";
- aCbx1.SetAccessibleName (sSourceColorN);
+ m_pCbx1->SetAccessibleName (sSourceColorN);
sSourceColorN = sSourceColor;
sSourceColorN += " 2";
- aCbx2.SetAccessibleName (sSourceColorN);
+ m_pCbx2->SetAccessibleName (sSourceColorN);
sSourceColorN = sSourceColor;
sSourceColorN += " 3";
- aCbx3.SetAccessibleName (sSourceColorN);
+ m_pCbx3->SetAccessibleName (sSourceColorN);
sSourceColorN = sSourceColor;
sSourceColorN += " 4";
- aCbx4.SetAccessibleName (sSourceColorN);
+ m_pCbx4->SetAccessibleName (sSourceColorN);
// set the accessible name for valueset
OUString sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
OUString sColorPaletteN;
sColorPaletteN = sColorPalette;
sColorPaletteN += " 1";
- pQSet1->SetText (sColorPaletteN);
+ m_pQSet1->SetText (sColorPaletteN);
sColorPaletteN = sColorPalette;
sColorPaletteN += " 2";
- pQSet2->SetText (sColorPaletteN);
+ m_pQSet2->SetText (sColorPaletteN);
sColorPaletteN = sColorPalette;
sColorPaletteN += " 3";
- pQSet3->SetText (sColorPaletteN);
+ m_pQSet3->SetText (sColorPaletteN);
sColorPaletteN = sColorPalette;
sColorPaletteN += " 4";
- pQSet4->SetText (sColorPaletteN);
+ m_pQSet4->SetText (sColorPaletteN);
// set the accessible for replace with spin boxes.
OUString sTolerance(BMP_RESID( RID_SVXDLG_BMPMASK_STR_TOLERANCE));
OUString sToleranceN;
sToleranceN = sTolerance;
sToleranceN += " 1";
- aSp1.SetAccessibleName (sToleranceN);
+ m_pSp1->SetAccessibleName (sToleranceN);
sToleranceN = sTolerance;
sToleranceN += " 2";
- aSp2.SetAccessibleName (sToleranceN);
+ m_pSp2->SetAccessibleName (sToleranceN);
sToleranceN = sTolerance;
sToleranceN += " 3";
- aSp3.SetAccessibleName (sToleranceN);
+ m_pSp3->SetAccessibleName (sToleranceN);
sToleranceN = sTolerance;
sToleranceN += " 4";
- aSp4.SetAccessibleName (sToleranceN);
+ m_pSp4->SetAccessibleName (sToleranceN);
// set the accessible for replace with combo boxes.
OUString sReplaceWith(BMP_RESID( RID_SVXDLG_BMPMASK_STR_REPLACEWITH));
OUString sReplaceWithN;
sReplaceWithN = sReplaceWith;
sReplaceWithN += " 1";
- aLbColor1.SetAccessibleName (sReplaceWithN);
+ m_pLbColor1->SetAccessibleName (sReplaceWithN);
sReplaceWithN = sReplaceWith;
sReplaceWithN += " 2";
- aLbColor2.SetAccessibleName (sReplaceWithN);
+ m_pLbColor2->SetAccessibleName (sReplaceWithN);
sReplaceWithN = sReplaceWith;
sReplaceWithN += " 3";
- aLbColor3.SetAccessibleName (sReplaceWithN);
+ m_pLbColor3->SetAccessibleName (sReplaceWithN);
sReplaceWithN = sReplaceWith;
sReplaceWithN += " 4";
- aLbColor4.SetAccessibleName (sReplaceWithN);
+ m_pLbColor4->SetAccessibleName (sReplaceWithN);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/bmpmask.hrc b/svx/source/dialog/bmpmask.hrc
index e6be229..3fa3f83 100644
--- a/svx/source/dialog/bmpmask.hrc
+++ b/svx/source/dialog/bmpmask.hrc
@@ -16,38 +16,10 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#define RID_SVXDLG_BMPMASK (RID_SVX_BMPMASK_START)
#define RID_SVXDLG_BMPMASK_STR_TRANSP (RID_SVX_BMPMASK_START + 1)
#define RID_SVXDLG_BMPMASK_STR_SOURCECOLOR (RID_SVX_BMPMASK_START + 2)
#define RID_SVXDLG_BMPMASK_STR_PALETTE (RID_SVX_BMPMASK_START + 3)
#define RID_SVXDLG_BMPMASK_STR_TOLERANCE (RID_SVX_BMPMASK_START + 4)
#define RID_SVXDLG_BMPMASK_STR_REPLACEWITH (RID_SVX_BMPMASK_START + 5)
-#define GRP_Q 1
-#define CBX_1 1
-#define CBX_2 4
-#define CBX_3 3
-#define CBX_4 2
-#define CBX_TRANS 5
-#define QCOL_1 2
-#define QCOL_2 5
-#define QCOL_3 4
-#define QCOL_4 3
-#define SP_1 2
-#define SP_2 4
-#define SP_3 1
-#define SP_4 3
-#define TBX_PIPETTE 1
-#define TBI_PIPETTE 1
-#define WND_PIPETTE 10
-#define BTN_EXEC 1
-#define LB_1 1
-#define LB_2 2
-#define LB_3 3
-#define LB_4 4
-#define LB_TRANS 5
-#define FT_1 1
-#define FT_2 2
-#define FT_3 3
-#define IMG_PIPETTE 11
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/bmpmask.src b/svx/source/dialog/bmpmask.src
index 53f59d4..a6c6a40 100644
--- a/svx/source/dialog/bmpmask.src
+++ b/svx/source/dialog/bmpmask.src
@@ -22,280 +22,6 @@
#include "bmpmask.hrc"
#include "helpid.hrc"
-#define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
-
- // RID_SVXDLG_BMPMASK ----------------------------------------------------
-DockingWindow RID_SVXDLG_BMPMASK
-{
- HelpId = CMD_SID_BMPMASK ;
- OutputSize = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( 163 , 126 ) ;
- Sizeable = FALSE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Dockable = TRUE ;
- EnableResizing = TRUE ;
- FixedLine GRP_Q
- {
- Pos = MAP_APPFONT ( 6 , 26 ) ;
- Size = MAP_APPFONT ( 151 , 8 ) ;
- Text [ en-US ] = "Colors" ;
- };
- FixedText FT_1
- {
- Pos = MAP_APPFONT ( 12 , 37 ) ;
- Size = MAP_APPFONT ( 44 , 8 ) ;
- Text [ en-US ] = "Source color" ;
- };
- FixedText FT_2
- {
- Pos = MAP_APPFONT ( 58 , 37 ) ;
- Size = MAP_APPFONT ( 34 , 8 ) ;
- Text [ en-US ] = "Tolerance" ;
- };
- FixedText FT_3
- {
- Pos = MAP_APPFONT ( 93 , 37 ) ;
- Size = MAP_APPFONT ( 64 , 8 ) ;
- Text [ en-US ] = "Replace with..." ;
- };
-
- // line 1
-
- CheckBox CBX_1
- {
- HelpID = "svx:CheckBox:RID_SVXDLG_BMPMASK:CBX_1";
- Pos = MAP_APPFONT ( 12 , 50 ) ;
- Size = MAP_APPFONT ( 10 , 10 ) ;
- TabStop = TRUE ;
- };
- Control QCOL_1
- {
- HelpId = HID_BMPMASK_CTL_QCOL_1 ;
- Pos = MAP_APPFONT ( 24 , 48 ) ;
- Size = MAP_APPFONT ( 24 , 12 ) ;
- Border = TRUE ;
- TabStop = TRUE ;
- };
- MetricField SP_1
- {
- HelpID = "svx:MetricField:RID_SVXDLG_BMPMASK:SP_1";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 58 , 48 ) ;
- Size = MAP_APPFONT ( 29 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 99 ;
- Last = 99 ;
- SpinSize = 1 ;
- Unit = FUNIT_PERCENT ;
- };
- ListBox LB_1
- {
- HelpID = "svx:ListBox:RID_SVXDLG_BMPMASK:LB_1";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 93 , 48 ) ;
- Size = MAP_APPFONT ( 64 , 75 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- DDExtraWidth = TRUE ;
- };
-
- // line 2
-
- CheckBox CBX_2
- {
- HelpID = "svx:CheckBox:RID_SVXDLG_BMPMASK:CBX_2";
- Pos = MAP_APPFONT ( 12 , 65 ) ;
- Size = MAP_APPFONT ( 10 , 10 ) ;
- TabStop = TRUE ;
- };
- Control QCOL_2
- {
- HelpId = HID_BMPMASK_CTL_QCOL_1 ;
- Pos = MAP_APPFONT ( 24 , 63 ) ;
- Size = MAP_APPFONT ( 24 , 12 ) ;
- Border = TRUE ;
- TabStop = TRUE ;
- };
- MetricField SP_2
- {
- HelpID = "svx:MetricField:RID_SVXDLG_BMPMASK:SP_2";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 58 , 63 ) ;
- Size = MAP_APPFONT ( 29 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 99 ;
- Last = 99 ;
- SpinSize = 1 ;
- Unit = FUNIT_PERCENT ;
- };
- ListBox LB_2
- {
- HelpID = "svx:ListBox:RID_SVXDLG_BMPMASK:LB_2";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 93 , 63 ) ;
- Size = MAP_APPFONT ( 64 , 75 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- DDExtraWidth = TRUE ;
- };
-
- // line 3
-
- CheckBox CBX_3
- {
- HelpID = "svx:CheckBox:RID_SVXDLG_BMPMASK:CBX_3";
- Pos = MAP_APPFONT ( 12 , 80 ) ;
- Size = MAP_APPFONT ( 10 , 10 ) ;
- TabStop = TRUE ;
- };
- Control QCOL_3
- {
- HelpId = HID_BMPMASK_CTL_QCOL_1 ;
- Pos = MAP_APPFONT ( 24 , 78 ) ;
- Size = MAP_APPFONT ( 24 , 12 ) ;
- Border = TRUE ;
- TabStop = TRUE ;
- };
- MetricField SP_3
- {
- HelpID = "svx:MetricField:RID_SVXDLG_BMPMASK:SP_3";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 58, 78 ) ;
- Size = MAP_APPFONT ( 29 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 99 ;
- Last = 99 ;
- SpinSize = 1 ;
- Unit = FUNIT_PERCENT ;
- };
- ListBox LB_3
- {
- HelpID = "svx:ListBox:RID_SVXDLG_BMPMASK:LB_3";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 93 , 78 ) ;
- Size = MAP_APPFONT ( 64 , 75 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- DDExtraWidth = TRUE ;
- };
-
- // Line 4
-
- CheckBox CBX_4
- {
- HelpID = "svx:CheckBox:RID_SVXDLG_BMPMASK:CBX_4";
- Pos = MAP_APPFONT ( 12 , 95 ) ;
- Size = MAP_APPFONT ( 10 , 10 ) ;
- TabStop = TRUE ;
- };
- Control QCOL_4
- {
- HelpId = HID_BMPMASK_CTL_QCOL_1 ;
- Pos = MAP_APPFONT ( 24 , 93 ) ;
- Size = MAP_APPFONT ( 24 , 12 ) ;
- Border = TRUE ;
- TabStop = TRUE ;
- };
- MetricField SP_4
- {
- HelpID = "svx:MetricField:RID_SVXDLG_BMPMASK:SP_4";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 58 , 93 ) ;
- Size = MAP_APPFONT ( 29 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 99 ;
- Last = 99 ;
- SpinSize = 1 ;
- Unit = FUNIT_PERCENT ;
- };
- ListBox LB_4
- {
- HelpID = "svx:ListBox:RID_SVXDLG_BMPMASK:LB_4";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 93 , 93 ) ;
- Size = MAP_APPFONT ( 64 , 75 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- DDExtraWidth = TRUE ;
- };
-
- CheckBox CBX_TRANS
- {
- HelpID = "svx:CheckBox:RID_SVXDLG_BMPMASK:CBX_TRANS";
- Pos = MAP_APPFONT ( 12 , 110 ) ;
- Size = MAP_APPFONT ( 71 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Tr~ansparency" ;
- };
-
- PushButton BTN_EXEC
- {
- HelpID = "svx:PushButton:RID_SVXDLG_BMPMASK:BTN_EXEC";
- Pos = MAP_APPFONT ( 93 , 6 ) ;
- Size = MAP_APPFONT ( 64 , 14 ) ;
- Text [ en-US ] = "~Replace" ;
- };
-
- ListBox LB_TRANS
- {
- HelpID = "svx:ListBox:RID_SVXDLG_BMPMASK:LB_TRANS";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 93 , 108 ) ;
- Size = MAP_APPFONT ( 64 , 75 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- DDExtraWidth = TRUE ;
- };
- ToolBox TBX_PIPETTE
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 6 , 7 ) ;
- ItemList =
- {
- ToolBoxItem
- {
- AutoCheck = TRUE ;
- Identifier = TBI_PIPETTE ;
- HelpId = HID_BMPMASK_TBI_PIPETTE ;
- ItemImage = Image
- {
- ImageBitmap = Bitmap { File = "sc10350.bmp" ; };
- MASKCOLOR
- };
- Text [ en-US ] = "Pipette" ;
- };
- };
- };
- Control WND_PIPETTE
- {
- HelpId = HID_BMPMASK_CTL_PIPETTE ;
- Border = TRUE ;
- Pos = MAP_APPFONT ( 22 , 6 ) ;
- Size = MAP_APPFONT ( 43 , 14 ) ;
- };
- Text [ en-US ] = "Color Replacer" ;
-
- Image IMG_PIPETTE
- {
- ImageBitmap = Bitmap { File = "sc10350.bmp" ; };
- MASKCOLOR
- };
-
-};
-
String RID_SVXDLG_BMPMASK_STR_TRANSP
{
Text [ en-US ] = "Transparent";
@@ -312,10 +38,12 @@ String RID_SVXDLG_BMPMASK_STR_PALETTE
{
Text [ en-US ] = "Color Palette";
};
+
String RID_SVXDLG_BMPMASK_STR_TOLERANCE
{
Text [ en-US ] = "Tolerance";
};
+
String RID_SVXDLG_BMPMASK_STR_REPLACEWITH
{
Text [ en-US ] = "Replace with";
diff --git a/svx/uiconfig/ui/dockingcolorreplace.ui b/svx/uiconfig/ui/dockingcolorreplace.ui
new file mode 100644
index 0000000..e88b6aa
--- /dev/null
+++ b/svx/uiconfig/ui/dockingcolorreplace.ui
@@ -0,0 +1,400 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">99</property>
+ <property name="value">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkWindow" id="DockingColorReplace">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Color Replacer</property>
+ <property name="type_hint">dock</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">24</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="colorgrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Source color</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Tolerance</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Replace with...</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="cbx2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="cbx3">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="cbx4">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="cbx1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="cbx5">
+ <property name="label" translatable="yes">Tr_ansparency</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">3</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="tol1:0%">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="tol2:0%">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">10</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="value">10</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="tol3:0%">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">10</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="value">10</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="tol4:0%">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">10</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="value">10</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxlo-ColorLB" id="color1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxlo-ColorLB" id="color2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxlo-ColorLB" id="color3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxlo-ColorLB" id="color4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxlo-ColorLB" id="color5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Colors</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="column_spacing">24</property>
+ <child>
+ <object class="GtkButton" id="replace">
+ <property name="label" translatable="yes">_Replace</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="toolgrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkToolbar" id="toolbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_arrow">False</property>
+ <child>
+ <object class="GtkToolButton" id="pipette">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Pipette</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">res/sc10350.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list