Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
0ef2fa80
Kaydet (Commit)
0ef2fa80
authored
Ara 17, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert RID_SVXDLG_BMPMASK dockingwindow to .ui
Change-Id: I1a160bd08d3be0356076789539d551f4dc6edfd4
üst
eabf036c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
703 additions
and
689 deletions
+703
-689
bmpmask.hxx
include/svx/bmpmask.hxx
+27
-39
UIConfig_svx.mk
svx/UIConfig_svx.mk
+1
-0
_bmpmask.cxx
svx/source/dialog/_bmpmask.cxx
+273
-348
bmpmask.hrc
svx/source/dialog/bmpmask.hrc
+0
-28
bmpmask.src
svx/source/dialog/bmpmask.src
+2
-274
dockingcolorreplace.ui
svx/uiconfig/ui/dockingcolorreplace.ui
+400
-0
No files found.
include/svx/bmpmask.hxx
Dosyayı görüntüle @
0ef2fa80
...
@@ -81,44 +81,38 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
...
@@ -81,44 +81,38 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
friend
class
MaskData
;
friend
class
MaskData
;
friend
class
MaskSet
;
friend
class
MaskSet
;
ToolBox
aTbxPipette
;
ToolBox
*
m_pTbxPipette
;
ColorWindow
*
pCtlPipette
;
ColorWindow
*
m_pCtlPipette
;
PushButton
aBtnExec
;
PushButton
*
m_pBtnExec
;
FixedLine
aGrpQ
;
CheckBox
*
m_pCbx1
;
FixedText
aFt1
;
MaskSet
*
m_pQSet1
;
FixedText
aFt2
;
MetricField
*
m_pSp1
;
FixedText
aFt3
;
ColorLB
*
m_pLbColor1
;
CheckBox
aCbx1
;
MaskSet
*
pQSet1
;
CheckBox
*
m_pCbx2
;
MetricField
aSp1
;
MaskSet
*
m_pQSet2
;
ColorLB
aLbColor1
;
MetricField
*
m_pSp2
;
ColorLB
*
m_pLbColor2
;
CheckBox
aCbx2
;
MaskSet
*
pQSet2
;
CheckBox
*
m_pCbx3
;
MetricField
aSp2
;
MaskSet
*
m_pQSet3
;
ColorLB
aLbColor2
;
MetricField
*
m_pSp3
;
ColorLB
*
m_pLbColor3
;
CheckBox
aCbx3
;
MaskSet
*
pQSet3
;
CheckBox
*
m_pCbx4
;
MetricField
aSp3
;
MaskSet
*
m_pQSet4
;
ColorLB
aLbColor3
;
MetricField
*
m_pSp4
;
ColorLB
*
m_pLbColor4
;
CheckBox
aCbx4
;
MaskSet
*
pQSet4
;
MetricField
aSp4
;
ColorLB
aLbColor4
;
MaskData
*
pData
;
MaskData
*
pData
;
CheckBox
a
CbxTrans
;
CheckBox
*
m_p
CbxTrans
;
ColorLB
a
LbColorTrans
;
ColorLB
*
m_p
LbColorTrans
;
XColorListRef
pColLst
;
XColorListRef
pColLst
;
Color
aPipetteColor
;
Color
aPipetteColor
;
SvxBmpMaskSelectItem
aSelItem
;
SvxBmpMaskSelectItem
aSelItem
;
Image
maImgPipette
;
virtual
bool
Close
()
SAL_OVERRIDE
;
virtual
bool
Close
()
SAL_OVERRIDE
;
#ifdef BMPMASK_PRIVATE
#ifdef BMPMASK_PRIVATE
...
@@ -143,11 +137,8 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
...
@@ -143,11 +137,8 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
public
:
public
:
SvxBmpMask
(
SfxBindings
*
pBindinx
,
SvxBmpMask
(
SfxBindings
*
pBindinx
,
SfxChildWindow
*
pCW
,
vcl
::
Window
*
pParent
);
SfxChildWindow
*
pCW
,
virtual
~
SvxBmpMask
();
vcl
::
Window
*
pParent
,
const
ResId
&
rResId
);
virtual
~
SvxBmpMask
();
void
SetColor
(
const
Color
&
rColor
);
void
SetColor
(
const
Color
&
rColor
);
void
PipetteClicked
();
void
PipetteClicked
();
...
@@ -163,9 +154,6 @@ public:
...
@@ -163,9 +154,6 @@ public:
void
onSelect
(
MaskSet
*
pSet
);
void
onSelect
(
MaskSet
*
pSet
);
virtual
void
DataChanged
(
const
DataChangedEvent
&
rDCEvt
)
SAL_OVERRIDE
;
void
ApplyStyle
();
private
:
private
:
/** Set names for accessible objects. This is necessary for objects
/** Set names for accessible objects. This is necessary for objects
...
...
svx/UIConfig_svx.mk
Dosyayı görüntüle @
0ef2fa80
...
@@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
...
@@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/datanavigator \
svx/uiconfig/ui/datanavigator \
svx/uiconfig/ui/deleteheaderdialog \
svx/uiconfig/ui/deleteheaderdialog \
svx/uiconfig/ui/deletefooterdialog \
svx/uiconfig/ui/deletefooterdialog \
svx/uiconfig/ui/dockingcolorreplace \
svx/uiconfig/ui/docrecoverybrokendialog \
svx/uiconfig/ui/docrecoverybrokendialog \
svx/uiconfig/ui/docrecoveryprogressdialog \
svx/uiconfig/ui/docrecoveryprogressdialog \
svx/uiconfig/ui/docrecoveryrecoverdialog \
svx/uiconfig/ui/docrecoveryrecoverdialog \
...
...
svx/source/dialog/_bmpmask.cxx
Dosyayı görüntüle @
0ef2fa80
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include <svx/svxids.hrc>
#include <svx/svxids.hrc>
#include <boost/scoped_array.hpp>
#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#include "helpid.hrc"
#define BMP_RESID(nId) ResId(nId, DIALOG_MGR())
#define BMP_RESID(nId) ResId(nId, DIALOG_MGR())
#define TRANSP_COL (Color( 252, 252, 252 ))
#define TRANSP_COL (Color( 252, 252, 252 ))
...
@@ -56,32 +56,33 @@
...
@@ -56,32 +56,33 @@
} \
} \
}
}
SFX_IMPL_DOCKINGWINDOW_WITHID
(
SvxBmpMaskChildWindow
,
SID_BMPMASK
)
SFX_IMPL_DOCKINGWINDOW_WITHID
(
SvxBmpMaskChildWindow
,
SID_BMPMASK
)
class
ColorWindow
:
public
Control
class
ColorWindow
:
public
Control
{
{
Color
aColor
;
Color
aColor
;
public
:
public
:
ColorWindow
(
vcl
::
Window
*
pParent
,
const
ResId
&
rId
)
:
ColorWindow
(
vcl
::
Window
*
pParent
)
Control
(
pParent
,
rId
),
:
Control
(
pParent
,
WB_BORDER
)
aColor
(
COL_WHITE
)
{};
,
aColor
(
COL_WHITE
)
{
}
void
SetColor
(
const
Color
&
rColor
)
void
SetColor
(
const
Color
&
rColor
)
{
{
aColor
=
rColor
;
aColor
=
rColor
;
Invalidate
();
Invalidate
();
}
}
virtual
void
Paint
(
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
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
class
MaskSet
:
public
ValueSet
{
{
...
@@ -89,25 +90,26 @@ class MaskSet : public ValueSet
...
@@ -89,25 +90,26 @@ class MaskSet : public ValueSet
public
:
public
:
MaskSet
(
SvxBmpMask
*
pParent
,
const
ResId
&
rId
);
MaskSet
(
SvxBmpMask
*
pMask
,
vcl
::
Window
*
pParent
);
virtual
void
Select
()
SAL_OVERRIDE
;
virtual
void
Select
()
SAL_OVERRIDE
;
virtual
void
KeyInput
(
const
KeyEvent
&
rKEvt
)
SAL_OVERRIDE
;
virtual
void
KeyInput
(
const
KeyEvent
&
rKEvt
)
SAL_OVERRIDE
;
virtual
void
GetFocus
()
SAL_OVERRIDE
;
virtual
void
GetFocus
()
SAL_OVERRIDE
;
virtual
Size
GetOptimalSize
()
const
SAL_OVERRIDE
{
return
LogicToPixel
(
Size
(
24
,
12
),
MAP_APPFONT
);
}
void
onEditColor
();
void
onEditColor
();
};
};
MaskSet
::
MaskSet
(
SvxBmpMask
*
pMask
,
vcl
::
Window
*
pParent
)
:
ValueSet
(
pParent
,
WB_TABSTOP
)
MaskSet
::
MaskSet
(
SvxBmpMask
*
pParent
,
const
ResId
&
rId
)
:
,
pSvxBmpMask
(
pMask
)
ValueSet
(
pParent
,
rId
),
pSvxBmpMask
(
pParent
)
{
{
SetHelpId
(
HID_BMPMASK_CTL_QCOL_1
);
}
}
void
MaskSet
::
Select
()
void
MaskSet
::
Select
()
{
{
ValueSet
::
Select
();
ValueSet
::
Select
();
...
@@ -191,49 +193,45 @@ MaskData::MaskData( SvxBmpMask* pBmpMask, SfxBindings& rBind ) :
...
@@ -191,49 +193,45 @@ MaskData::MaskData( SvxBmpMask* pBmpMask, SfxBindings& rBind ) :
{
{
}
}
IMPL_LINK
(
MaskData
,
PipetteHdl
,
ToolBox
*
,
pTbx
)
IMPL_LINK
(
MaskData
,
PipetteHdl
,
ToolBox
*
,
pTbx
)
{
{
SfxBoolItem
aBItem
(
SID_BMPMASK_PIPETTE
,
SfxBoolItem
aBItem
(
SID_BMPMASK_PIPETTE
,
pTbx
->
IsItemChecked
(
TBI_PIPETTE
)
);
pTbx
->
IsItemChecked
(
pTbx
->
GetItemId
(
0
)
)
);
rBindings
.
GetDispatcher
()
->
Execute
(
SID_BMPMASK_PIPETTE
,
OWN_CALLMODE
,
&
aBItem
,
0L
);
rBindings
.
GetDispatcher
()
->
Execute
(
SID_BMPMASK_PIPETTE
,
OWN_CALLMODE
,
&
aBItem
,
0L
);
return
0
;
return
0
;
}
}
IMPL_LINK
(
MaskData
,
CbxHdl
,
CheckBox
*
,
pCbx
)
IMPL_LINK
(
MaskData
,
CbxHdl
,
CheckBox
*
,
pCbx
)
{
{
bIsReady
=
pMask
->
aCbx1
.
IsChecked
()
||
pMask
->
aCbx2
.
IsChecked
()
||
bIsReady
=
pMask
->
m_pCbx1
->
IsChecked
()
||
pMask
->
m_pCbx2
->
IsChecked
()
||
pMask
->
aCbx3
.
IsChecked
()
||
pMask
->
aCbx4
.
IsChecked
();
pMask
->
m_pCbx3
->
IsChecked
()
||
pMask
->
m_pCbx4
->
IsChecked
();
if
(
bIsReady
&&
IsExecReady
()
)
if
(
bIsReady
&&
IsExecReady
()
)
pMask
->
aBtnExec
.
Enable
();
pMask
->
m_pBtnExec
->
Enable
();
else
else
pMask
->
aBtnExec
.
Disable
();
pMask
->
m_pBtnExec
->
Disable
();
// When a checkbox is checked, the pipette is enabled
// When a checkbox is checked, the pipette is enabled
if
(
pCbx
->
IsChecked
()
)
if
(
pCbx
->
IsChecked
()
)
{
{
MaskSet
*
pSet
=
NULL
;
MaskSet
*
pSet
=
NULL
;
if
(
pCbx
==
&
(
pMask
->
aCbx1
)
)
if
(
pCbx
==
pMask
->
m_pCbx1
)
pSet
=
pMask
->
pQSet1
;
pSet
=
pMask
->
m_
pQSet1
;
else
if
(
pCbx
==
&
(
pMask
->
aCbx2
)
)
else
if
(
pCbx
==
pMask
->
m_pCbx2
)
pSet
=
pMask
->
pQSet2
;
pSet
=
pMask
->
m_
pQSet2
;
else
if
(
pCbx
==
&
(
pMask
->
aCbx3
)
)
else
if
(
pCbx
==
pMask
->
m_pCbx3
)
pSet
=
pMask
->
pQSet3
;
pSet
=
pMask
->
m_
pQSet3
;
else
// if ( pCbx ==
&( pMask->aCbx4 )
)
else
// if ( pCbx ==
pMask->m_pCbx4
)
pSet
=
pMask
->
pQSet4
;
pSet
=
pMask
->
m_
pQSet4
;
pSet
->
SelectItem
(
1
);
pSet
->
SelectItem
(
1
);
pSet
->
Select
();
pSet
->
Select
();
pMask
->
aTbxPipette
.
CheckItem
(
TBI_PIPETTE
,
true
);
pMask
->
m_pTbxPipette
->
CheckItem
(
pMask
->
m_pTbxPipette
->
GetItemId
(
0
)
,
true
);
PipetteHdl
(
&
(
pMask
->
aTbxPipette
)
);
PipetteHdl
(
pMask
->
m_pTbxPipette
);
}
}
return
0
;
return
0
;
...
@@ -246,58 +244,58 @@ IMPL_LINK( MaskData, CbxTransHdl, CheckBox*, pCbx )
...
@@ -246,58 +244,58 @@ IMPL_LINK( MaskData, CbxTransHdl, CheckBox*, pCbx )
bIsReady
=
pCbx
->
IsChecked
();
bIsReady
=
pCbx
->
IsChecked
();
if
(
bIsReady
)
if
(
bIsReady
)
{
{
pMask
->
pQSet1
->
Disable
();
pMask
->
m_
pQSet1
->
Disable
();
pMask
->
pQSet2
->
Disable
();
pMask
->
m_
pQSet2
->
Disable
();
pMask
->
pQSet3
->
Disable
();
pMask
->
m_
pQSet3
->
Disable
();
pMask
->
pQSet4
->
Disable
();
pMask
->
m_
pQSet4
->
Disable
();
pMask
->
pCtlPipette
->
Disable
();
pMask
->
m_
pCtlPipette
->
Disable
();
pMask
->
aCbx1
.
Disable
();
pMask
->
m_pCbx1
->
Disable
();
pMask
->
aSp1
.
Disable
();
pMask
->
m_pSp1
->
Disable
();
pMask
->
aCbx2
.
Disable
();
pMask
->
m_pCbx2
->
Disable
();
pMask
->
aSp2
.
Disable
();
pMask
->
m_pSp2
->
Disable
();
pMask
->
aCbx3
.
Disable
();
pMask
->
m_pCbx3
->
Disable
();
pMask
->
aSp3
.
Disable
();
pMask
->
m_pSp3
->
Disable
();
pMask
->
aCbx4
.
Disable
();
pMask
->
m_pCbx4
->
Disable
();
pMask
->
aSp4
.
Disable
();
pMask
->
m_pSp4
->
Disable
();
pMask
->
aTbxPipette
.
Disable
();
pMask
->
m_pTbxPipette
->
Disable
();
pMask
->
aLbColor1
.
Disable
();
pMask
->
m_pLbColor1
->
Disable
();
pMask
->
aLbColor2
.
Disable
();
pMask
->
m_pLbColor2
->
Disable
();
pMask
->
aLbColor3
.
Disable
();
pMask
->
m_pLbColor3
->
Disable
();
pMask
->
aLbColor4
.
Disable
();
pMask
->
m_pLbColor4
->
Disable
();
pMask
->
aLbColorTrans
.
Enable
();
pMask
->
m_pLbColorTrans
->
Enable
();
}
}
else
else
{
{
pMask
->
pQSet1
->
Enable
();
pMask
->
m_
pQSet1
->
Enable
();
pMask
->
pQSet2
->
Enable
();
pMask
->
m_
pQSet2
->
Enable
();
pMask
->
pQSet3
->
Enable
();
pMask
->
m_
pQSet3
->
Enable
();
pMask
->
pQSet4
->
Enable
();
pMask
->
m_
pQSet4
->
Enable
();
pMask
->
pCtlPipette
->
Enable
();
pMask
->
m_
pCtlPipette
->
Enable
();
pMask
->
aCbx1
.
Enable
();
pMask
->
m_pCbx1
->
Enable
();
pMask
->
aSp1
.
Enable
();
pMask
->
m_pSp1
->
Enable
();
pMask
->
aCbx2
.
Enable
();
pMask
->
m_pCbx2
->
Enable
();
pMask
->
aSp2
.
Enable
();
pMask
->
m_pSp2
->
Enable
();
pMask
->
aCbx3
.
Enable
();
pMask
->
m_pCbx3
->
Enable
();
pMask
->
aSp3
.
Enable
();
pMask
->
m_pSp3
->
Enable
();
pMask
->
aCbx4
.
Enable
();
pMask
->
m_pCbx4
->
Enable
();
pMask
->
aSp4
.
Enable
();
pMask
->
m_pSp4
->
Enable
();
pMask
->
aTbxPipette
.
Enable
();
pMask
->
m_pTbxPipette
->
Enable
();
pMask
->
aLbColor1
.
Enable
();
pMask
->
m_pLbColor1
->
Enable
();
pMask
->
aLbColor2
.
Enable
();
pMask
->
m_pLbColor2
->
Enable
();
pMask
->
aLbColor3
.
Enable
();
pMask
->
m_pLbColor3
->
Enable
();
pMask
->
aLbColor4
.
Enable
();
pMask
->
m_pLbColor4
->
Enable
();
pMask
->
aLbColorTrans
.
Disable
();
pMask
->
m_pLbColorTrans
->
Disable
();
bIsReady
=
pMask
->
aCbx1
.
IsChecked
()
||
pMask
->
aCbx2
.
IsChecked
()
||
bIsReady
=
pMask
->
m_pCbx1
->
IsChecked
()
||
pMask
->
m_pCbx2
->
IsChecked
()
||
pMask
->
aCbx3
.
IsChecked
()
||
pMask
->
aCbx4
.
IsChecked
();
pMask
->
m_pCbx3
->
IsChecked
()
||
pMask
->
m_pCbx4
->
IsChecked
();
}
}
if
(
bIsReady
&&
IsExecReady
()
)
if
(
bIsReady
&&
IsExecReady
()
)
pMask
->
aBtnExec
.
Enable
();
pMask
->
m_pBtnExec
->
Enable
();
else
else
pMask
->
aBtnExec
.
Disable
();
pMask
->
m_pBtnExec
->
Disable
();
return
0L
;
return
0L
;
}
}
...
@@ -307,10 +305,10 @@ IMPL_LINK( MaskData, CbxTransHdl, CheckBox*, pCbx )
...
@@ -307,10 +305,10 @@ IMPL_LINK( MaskData, CbxTransHdl, CheckBox*, pCbx )
IMPL_LINK
(
MaskData
,
FocusLbHdl
,
ColorLB
*
,
pLb
)
IMPL_LINK
(
MaskData
,
FocusLbHdl
,
ColorLB
*
,
pLb
)
{
{
// MT: bFireFox as API parameter is ugly, find better solution????
// MT: bFireFox as API parameter is ugly, find better solution????
pMask
->
pQSet1
->
SelectItem
(
pLb
==
&
(
pMask
->
aLbColor1
)
?
1
:
0
/* , false */
);
pMask
->
m_pQSet1
->
SelectItem
(
pLb
==
pMask
->
m_pLbColor1
?
1
:
0
/* , false */
);
pMask
->
pQSet2
->
SelectItem
(
pLb
==
&
(
pMask
->
aLbColor2
)
?
1
:
0
/* , false */
);
pMask
->
m_pQSet2
->
SelectItem
(
pLb
==
pMask
->
m_pLbColor2
?
1
:
0
/* , false */
);
pMask
->
pQSet3
->
SelectItem
(
pLb
==
&
(
pMask
->
aLbColor3
)
?
1
:
0
/* , false */
);
pMask
->
m_pQSet3
->
SelectItem
(
pLb
==
pMask
->
m_pLbColor3
?
1
:
0
/* , false */
);
pMask
->
pQSet4
->
SelectItem
(
pLb
==
&
(
pMask
->
aLbColor4
)
?
1
:
0
/* , false */
);
pMask
->
m_pQSet4
->
SelectItem
(
pLb
==
pMask
->
m_pLbColor4
?
1
:
0
/* , false */
);
return
0
;
return
0
;
}
}
...
@@ -325,8 +323,6 @@ IMPL_LINK_NOARG(MaskData, ExecHdl)
...
@@ -325,8 +323,6 @@ IMPL_LINK_NOARG(MaskData, ExecHdl)
return
0L
;
return
0L
;
}
}
void
ColorWindow
::
Paint
(
const
Rectangle
&
/*Rect*/
)
void
ColorWindow
::
Paint
(
const
Rectangle
&
/*Rect*/
)
{
{
const
Color
&
rOldLineColor
=
GetLineColor
();
const
Color
&
rOldLineColor
=
GetLineColor
();
...
@@ -341,8 +337,6 @@ void ColorWindow::Paint( const Rectangle &/*Rect*/ )
...
@@ -341,8 +337,6 @@ void ColorWindow::Paint( const Rectangle &/*Rect*/ )
SetFillColor
(
rOldFillColor
);
SetFillColor
(
rOldFillColor
);
}
}
SvxBmpMaskSelectItem
::
SvxBmpMaskSelectItem
(
sal_uInt16
nId_
,
SvxBmpMask
&
rMask
,
SvxBmpMaskSelectItem
::
SvxBmpMaskSelectItem
(
sal_uInt16
nId_
,
SvxBmpMask
&
rMask
,
SfxBindings
&
rBindings
)
:
SfxBindings
&
rBindings
)
:
SfxControllerItem
(
nId_
,
rBindings
),
SfxControllerItem
(
nId_
,
rBindings
),
...
@@ -364,201 +358,158 @@ void SvxBmpMaskSelectItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*
...
@@ -364,201 +358,158 @@ void SvxBmpMaskSelectItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*
}
}
}
}
SvxBmpMaskChildWindow
::
SvxBmpMaskChildWindow
(
vcl
::
Window
*
pParent_
,
sal_uInt16
nId
,
SfxBindings
*
pBindings
,
SvxBmpMaskChildWindow
::
SvxBmpMaskChildWindow
(
vcl
::
Window
*
pParent_
,
sal_uInt16
nId
,
SfxChildWinInfo
*
pInfo
)
SfxBindings
*
pBindings
,
:
SfxChildWindow
(
pParent_
,
nId
)
SfxChildWinInfo
*
pInfo
)
:
SfxChildWindow
(
pParent_
,
nId
)
{
{
pWindow
=
new
SvxBmpMask
(
pBindings
,
this
,
pParent_
,
SvxBmpMask
*
pDlg
=
new
SvxBmpMask
(
pBindings
,
this
,
pParent_
);
BMP_RESID
(
RID_SVXDLG_BMPMASK
)
);
SvxBmpMask
*
pDlg
=
static_cast
<
SvxBmpMask
*>
(
pWindow
)
;
pWindow
=
pDlg
;
eChildAlignment
=
SFX_ALIGN_NOALIGNMENT
;
eChildAlignment
=
SFX_ALIGN_NOALIGNMENT
;
pDlg
->
Initialize
(
pInfo
);
pDlg
->
Initialize
(
pInfo
);
}
}
SvxBmpMask
::
SvxBmpMask
(
SfxBindings
*
pBindinx
,
SfxChildWindow
*
pCW
,
vcl
::
Window
*
pParent
)
:
SfxDockingWindow
(
pBindinx
,
pCW
,
pParent
,
"DockingColorReplace"
,
SvxBmpMask
::
SvxBmpMask
(
SfxBindings
*
pBindinx
,
"svx/ui/dockingcolorreplace.ui"
)
SfxChildWindow
*
pCW
,
,
pData
(
new
MaskData
(
this
,
*
pBindinx
))
vcl
::
Window
*
pParent
,
,
aPipetteColor
(
COL_WHITE
)
const
ResId
&
rResId
)
:
,
aSelItem
(
SID_BMPMASK_EXEC
,
*
this
,
*
pBindinx
)
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
)
)
{
{
FreeResource
();
get
(
m_pTbxPipette
,
"toolbar"
);
m_pTbxPipette
->
SetItemBits
(
m_pTbxPipette
->
GetItemId
(
0
),
ApplyStyle
();
ToolBoxItemBits
::
AUTOCHECK
);
get
(
m_pBtnExec
,
"replace"
);
aTbxPipette
.
SetSizePixel
(
aTbxPipette
.
CalcWindowSizePixel
()
);
m_pCtlPipette
=
new
ColorWindow
(
get
<
Window
>
(
"toolgrid"
));
aTbxPipette
.
SetSelectHdl
(
LINK
(
pData
,
MaskData
,
PipetteHdl
)
);
m_pCtlPipette
->
Show
();
aBtnExec
.
SetClickHdl
(
LINK
(
pData
,
MaskData
,
ExecHdl
)
);
m_pCtlPipette
->
set_grid_left_attach
(
1
);
m_pCtlPipette
->
set_grid_top_attach
(
0
);
aCbx1
.
SetClickHdl
(
LINK
(
pData
,
MaskData
,
CbxHdl
)
);
m_pCtlPipette
->
set_hexpand
(
true
);
aCbx2
.
SetClickHdl
(
LINK
(
pData
,
MaskData
,
CbxHdl
)
);
get
(
m_pCbx1
,
"cbx1"
);
aCbx3
.
SetClickHdl
(
LINK
(
pData
,
MaskData
,
CbxHdl
)
);
Window
*
pGrid
=
get
<
Window
>
(
"colorgrid"
);
aCbx4
.
SetClickHdl
(
LINK
(
pData
,
MaskData
,
CbxHdl
)
);
m_pQSet1
=
new
MaskSet
(
this
,
pGrid
);
aCbxTrans
.
SetClickHdl
(
LINK
(
pData
,
MaskData
,
CbxTransHdl
)
);
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
();
SetAccessibleNames
();
aLbColor1
.
SetGetFocusHdl
(
LINK
(
pData
,
MaskData
,
FocusLbHdl
)
);
m_pLbColor1
->
SetGetFocusHdl
(
LINK
(
pData
,
MaskData
,
FocusLbHdl
)
);
aLbColor2
.
SetGetFocusHdl
(
LINK
(
pData
,
MaskData
,
FocusLbHdl
)
);
m_pLbColor2
->
SetGetFocusHdl
(
LINK
(
pData
,
MaskData
,
FocusLbHdl
)
);
aLbColor3
.
SetGetFocusHdl
(
LINK
(
pData
,
MaskData
,
FocusLbHdl
)
);
m_pLbColor3
->
SetGetFocusHdl
(
LINK
(
pData
,
MaskData
,
FocusLbHdl
)
);
aLbColor4
.
SetGetFocusHdl
(
LINK
(
pData
,
MaskData
,
FocusLbHdl
)
);
m_pLbColor4
->
SetGetFocusHdl
(
LINK
(
pData
,
MaskData
,
FocusLbHdl
)
);
aLbColorTrans
.
Disable
();
m_pLbColorTrans
->
Disable
();
aSp1
.
SetValue
(
10
);
m_pQSet1
->
SetStyle
(
m_pQSet1
->
GetStyle
()
|
WB_DOUBLEBORDER
|
WB_ITEMBORDER
);
aSp2
.
SetValue
(
10
);
m_pQSet1
->
SetColCount
(
1
);
aSp3
.
SetValue
(
10
);
m_pQSet1
->
SetLineCount
(
1
);
aSp4
.
SetValue
(
10
);
pQSet1
->
SetStyle
(
pQSet1
->
GetStyle
()
|
WB_DOUBLEBORDER
|
WB_ITEMBORDER
);
pQSet1
->
SetColCount
(
1
);
pQSet1
->
SetLineCount
(
1
);
OUString
sColorPalette
(
BMP_RESID
(
RID_SVXDLG_BMPMASK_STR_PALETTE
));
OUString
sColorPalette
(
BMP_RESID
(
RID_SVXDLG_BMPMASK_STR_PALETTE
));
OUString
sColorPaletteN
;
OUString
sColorPaletteN
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
+=
" 1"
;
sColorPaletteN
+=
" 1"
;
pQSet1
->
InsertItem
(
1
,
aPipetteColor
,
sColorPaletteN
);
m_
pQSet1
->
InsertItem
(
1
,
aPipetteColor
,
sColorPaletteN
);
pQSet1
->
SelectItem
(
1
);
m_
pQSet1
->
SelectItem
(
1
);
pQSet2
->
SetStyle
(
pQSet2
->
GetStyle
()
|
WB_DOUBLEBORDER
|
WB_ITEMBORDER
);
m_pQSet2
->
SetStyle
(
m_
pQSet2
->
GetStyle
()
|
WB_DOUBLEBORDER
|
WB_ITEMBORDER
);
pQSet2
->
SetColCount
(
1
);
m_
pQSet2
->
SetColCount
(
1
);
pQSet2
->
SetLineCount
(
1
);
m_
pQSet2
->
SetLineCount
(
1
);
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
+=
" 2"
;
sColorPaletteN
+=
" 2"
;
pQSet2
->
InsertItem
(
1
,
aPipetteColor
,
sColorPaletteN
);
m_
pQSet2
->
InsertItem
(
1
,
aPipetteColor
,
sColorPaletteN
);
pQSet2
->
SelectItem
(
0
);
m_
pQSet2
->
SelectItem
(
0
);
pQSet3
->
SetStyle
(
pQSet3
->
GetStyle
()
|
WB_DOUBLEBORDER
|
WB_ITEMBORDER
);
m_pQSet3
->
SetStyle
(
m_
pQSet3
->
GetStyle
()
|
WB_DOUBLEBORDER
|
WB_ITEMBORDER
);
pQSet3
->
SetColCount
(
1
);
m_
pQSet3
->
SetColCount
(
1
);
pQSet3
->
SetLineCount
(
1
);
m_
pQSet3
->
SetLineCount
(
1
);
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
+=
" 3"
;
sColorPaletteN
+=
" 3"
;
pQSet3
->
InsertItem
(
1
,
aPipetteColor
,
sColorPaletteN
);
m_
pQSet3
->
InsertItem
(
1
,
aPipetteColor
,
sColorPaletteN
);
pQSet3
->
SelectItem
(
0
);
m_
pQSet3
->
SelectItem
(
0
);
pQSet4
->
SetStyle
(
pQSet4
->
GetStyle
()
|
WB_DOUBLEBORDER
|
WB_ITEMBORDER
);
m_pQSet4
->
SetStyle
(
m_
pQSet4
->
GetStyle
()
|
WB_DOUBLEBORDER
|
WB_ITEMBORDER
);
pQSet4
->
SetColCount
(
1
);
m_
pQSet4
->
SetColCount
(
1
);
pQSet4
->
SetLineCount
(
1
);
m_
pQSet4
->
SetLineCount
(
1
);
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
+=
" 4"
;
sColorPaletteN
+=
" 4"
;
pQSet4
->
InsertItem
(
1
,
aPipetteColor
,
sColorPaletteN
);
m_pQSet4
->
InsertItem
(
1
,
aPipetteColor
,
sColorPaletteN
);
pQSet4
->
SelectItem
(
0
);
m_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_pQSet1
->
Show
();
m_pQSet2
->
Show
();
m_pQSet3
->
Show
();
m_pQSet4
->
Show
();
}
SvxBmpMask
::~
SvxBmpMask
()
SvxBmpMask
::~
SvxBmpMask
()
{
{
delete
pQSet1
;
delete
m_
pQSet1
;
delete
pQSet2
;
delete
m_
pQSet2
;
delete
pQSet3
;
delete
m_
pQSet3
;
delete
pQSet4
;
delete
m_
pQSet4
;
delete
pCtlPipette
;
delete
m_
pCtlPipette
;
delete
pData
;
delete
pData
;
}
}
/** is called by a MaskSet when it is selected */
/** is called by a MaskSet when it is selected */
void
SvxBmpMask
::
onSelect
(
MaskSet
*
pSet
)
void
SvxBmpMask
::
onSelect
(
MaskSet
*
pSet
)
{
{
// now deselect all other value sets
// now deselect all other value sets
if
(
pSet
!=
pQSet1
)
if
(
pSet
!=
m_
pQSet1
)
pQSet1
->
SelectItem
(
0
);
m_
pQSet1
->
SelectItem
(
0
);
if
(
pSet
!=
pQSet2
)
if
(
pSet
!=
m_
pQSet2
)
pQSet2
->
SelectItem
(
0
);
m_
pQSet2
->
SelectItem
(
0
);
if
(
pSet
!=
pQSet3
)
if
(
pSet
!=
m_
pQSet3
)
pQSet3
->
SelectItem
(
0
);
m_
pQSet3
->
SelectItem
(
0
);
if
(
pSet
!=
pQSet4
)
if
(
pSet
!=
m_
pQSet4
)
pQSet4
->
SelectItem
(
0
);
m_
pQSet4
->
SelectItem
(
0
);
}
}
bool
SvxBmpMask
::
Close
()
bool
SvxBmpMask
::
Close
()
{
{
SfxBoolItem
aItem2
(
SID_BMPMASK_PIPETTE
,
false
);
SfxBoolItem
aItem2
(
SID_BMPMASK_PIPETTE
,
false
);
...
@@ -567,15 +518,11 @@ bool SvxBmpMask::Close()
...
@@ -567,15 +518,11 @@ bool SvxBmpMask::Close()
return
SfxDockingWindow
::
Close
();
return
SfxDockingWindow
::
Close
();
}
}
bool
SvxBmpMask
::
NeedsColorList
()
const
bool
SvxBmpMask
::
NeedsColorList
()
const
{
{
return
(
aLbColor1
.
GetEntryCount
()
==
0
);
return
(
m_pLbColor1
->
GetEntryCount
()
==
0
);
}
}
void
SvxBmpMask
::
SetColorList
(
const
XColorListRef
&
pList
)
void
SvxBmpMask
::
SetColorList
(
const
XColorListRef
&
pList
)
{
{
if
(
pList
.
is
()
&&
(
pList
!=
pColLst
)
)
if
(
pList
.
is
()
&&
(
pList
!=
pColLst
)
)
...
@@ -584,78 +531,72 @@ void SvxBmpMask::SetColorList( const XColorListRef &pList )
...
@@ -584,78 +531,72 @@ void SvxBmpMask::SetColorList( const XColorListRef &pList )
pColLst
=
pList
;
pColLst
=
pList
;
aLbColorTrans
.
Fill
(
pColLst
);
m_pLbColorTrans
->
Fill
(
pColLst
);
aLbColorTrans
.
SelectEntryPos
(
0
);
m_pLbColorTrans
->
SelectEntryPos
(
0
);
aLbColor1
.
Fill
(
pColLst
);
m_pLbColor1
->
Fill
(
pColLst
);
aLbColor1
.
InsertEntry
(
TRANSP_COL
,
aTransp
,
0
);
m_pLbColor1
->
InsertEntry
(
TRANSP_COL
,
aTransp
,
0
);
aLbColor1
.
SelectEntryPos
(
0
);
m_pLbColor1
->
SelectEntryPos
(
0
);
aLbColor2
.
Fill
(
pColLst
);
m_pLbColor2
->
Fill
(
pColLst
);
aLbColor2
.
InsertEntry
(
TRANSP_COL
,
aTransp
,
0
);
m_pLbColor2
->
InsertEntry
(
TRANSP_COL
,
aTransp
,
0
);
aLbColor2
.
SelectEntryPos
(
0
);
m_pLbColor2
->
SelectEntryPos
(
0
);
aLbColor3
.
Fill
(
pColLst
);
m_pLbColor3
->
Fill
(
pColLst
);
aLbColor3
.
InsertEntry
(
TRANSP_COL
,
aTransp
,
0
);
m_pLbColor3
->
InsertEntry
(
TRANSP_COL
,
aTransp
,
0
);
aLbColor3
.
SelectEntryPos
(
0
);
m_pLbColor3
->
SelectEntryPos
(
0
);
aLbColor4
.
Fill
(
pColLst
);
m_pLbColor4
->
Fill
(
pColLst
);
aLbColor4
.
InsertEntry
(
TRANSP_COL
,
aTransp
,
0
);
m_pLbColor4
->
InsertEntry
(
TRANSP_COL
,
aTransp
,
0
);
aLbColor4
.
SelectEntryPos
(
0
);
m_pLbColor4
->
SelectEntryPos
(
0
);
}
}
}
}
void
SvxBmpMask
::
SetColor
(
const
Color
&
rColor
)
void
SvxBmpMask
::
SetColor
(
const
Color
&
rColor
)
{
{
aPipetteColor
=
rColor
;
aPipetteColor
=
rColor
;
pCtlPipette
->
SetColor
(
aPipetteColor
);
m_
pCtlPipette
->
SetColor
(
aPipetteColor
);
}
}
void
SvxBmpMask
::
PipetteClicked
()
void
SvxBmpMask
::
PipetteClicked
()
{
{
if
(
pQSet1
->
GetSelectItemId
()
==
1
)
if
(
m_
pQSet1
->
GetSelectItemId
()
==
1
)
{
{
aCbx1
.
Check
(
true
);
m_pCbx1
->
Check
(
true
);
pData
->
CbxHdl
(
&
aCbx1
);
pData
->
CbxHdl
(
m_pCbx1
);
pQSet1
->
SetItemColor
(
1
,
aPipetteColor
);
m_
pQSet1
->
SetItemColor
(
1
,
aPipetteColor
);
}
}
else
if
(
pQSet2
->
GetSelectItemId
()
==
1
)
else
if
(
m_
pQSet2
->
GetSelectItemId
()
==
1
)
{
{
aCbx2
.
Check
(
true
);
m_pCbx2
->
Check
(
true
);
pData
->
CbxHdl
(
&
aCbx2
);
pData
->
CbxHdl
(
m_pCbx2
);
pQSet2
->
SetItemColor
(
1
,
aPipetteColor
);
m_
pQSet2
->
SetItemColor
(
1
,
aPipetteColor
);
}
}
else
if
(
pQSet3
->
GetSelectItemId
()
==
1
)
else
if
(
m_
pQSet3
->
GetSelectItemId
()
==
1
)
{
{
aCbx3
.
Check
(
true
);
m_pCbx3
->
Check
(
true
);
pData
->
CbxHdl
(
&
aCbx3
);
pData
->
CbxHdl
(
m_pCbx3
);
pQSet3
->
SetItemColor
(
1
,
aPipetteColor
);
m_
pQSet3
->
SetItemColor
(
1
,
aPipetteColor
);
}
}
else
if
(
pQSet4
->
GetSelectItemId
()
==
1
)
else
if
(
m_
pQSet4
->
GetSelectItemId
()
==
1
)
{
{
aCbx4
.
Check
(
true
);
m_pCbx4
->
Check
(
true
);
pData
->
CbxHdl
(
&
aCbx4
);
pData
->
CbxHdl
(
m_pCbx4
);
pQSet4
->
SetItemColor
(
1
,
aPipetteColor
);
m_
pQSet4
->
SetItemColor
(
1
,
aPipetteColor
);
}
}
aTbxPipette
.
CheckItem
(
TBI_PIPETTE
,
false
);
m_pTbxPipette
->
CheckItem
(
m_pTbxPipette
->
GetItemId
(
0
)
,
false
);
pData
->
PipetteHdl
(
&
aTbxPipette
);
pData
->
PipetteHdl
(
m_pTbxPipette
);
}
}
void
SvxBmpMask
::
SetExecState
(
bool
bEnable
)
void
SvxBmpMask
::
SetExecState
(
bool
bEnable
)
{
{
pData
->
SetExecState
(
bEnable
);
pData
->
SetExecState
(
bEnable
);
if
(
pData
->
IsExecReady
()
&&
pData
->
IsCbxReady
()
)
if
(
pData
->
IsExecReady
()
&&
pData
->
IsCbxReady
()
)
aBtnExec
.
Enable
();
m_pBtnExec
->
Enable
();
else
else
aBtnExec
.
Disable
();
m_pBtnExec
->
Disable
();
}
}
...
@@ -664,32 +605,32 @@ sal_uInt16 SvxBmpMask::InitColorArrays( Color* pSrcCols, Color* pDstCols, sal_uI
...
@@ -664,32 +605,32 @@ sal_uInt16 SvxBmpMask::InitColorArrays( Color* pSrcCols, Color* pDstCols, sal_uI
{
{
sal_uInt16
nCount
=
0
;
sal_uInt16
nCount
=
0
;
if
(
aCbx1
.
IsChecked
()
)
if
(
m_pCbx1
->
IsChecked
()
)
{
{
pSrcCols
[
nCount
]
=
pQSet1
->
GetItemColor
(
1
);
pSrcCols
[
nCount
]
=
m_
pQSet1
->
GetItemColor
(
1
);
pDstCols
[
nCount
]
=
aLbColor1
.
GetSelectEntryColor
();
pDstCols
[
nCount
]
=
m_pLbColor1
->
GetSelectEntryColor
();
pTols
[
nCount
++
]
=
static_cast
<
sal_uIntPtr
>
(
aSp1
.
GetValue
());
pTols
[
nCount
++
]
=
static_cast
<
sal_uIntPtr
>
(
m_pSp1
->
GetValue
());
}
}
if
(
aCbx2
.
IsChecked
()
)
if
(
m_pCbx2
->
IsChecked
()
)
{
{
pSrcCols
[
nCount
]
=
pQSet2
->
GetItemColor
(
1
);
pSrcCols
[
nCount
]
=
m_
pQSet2
->
GetItemColor
(
1
);
pDstCols
[
nCount
]
=
aLbColor2
.
GetSelectEntryColor
();
pDstCols
[
nCount
]
=
m_pLbColor2
->
GetSelectEntryColor
();
pTols
[
nCount
++
]
=
static_cast
<
sal_uIntPtr
>
(
aSp2
.
GetValue
());
pTols
[
nCount
++
]
=
static_cast
<
sal_uIntPtr
>
(
m_pSp2
->
GetValue
());
}
}
if
(
aCbx3
.
IsChecked
()
)
if
(
m_pCbx3
->
IsChecked
()
)
{
{
pSrcCols
[
nCount
]
=
pQSet3
->
GetItemColor
(
1
);
pSrcCols
[
nCount
]
=
m_
pQSet3
->
GetItemColor
(
1
);
pDstCols
[
nCount
]
=
aLbColor3
.
GetSelectEntryColor
();
pDstCols
[
nCount
]
=
m_pLbColor3
->
GetSelectEntryColor
();
pTols
[
nCount
++
]
=
static_cast
<
sal_uIntPtr
>
(
aSp3
.
GetValue
());
pTols
[
nCount
++
]
=
static_cast
<
sal_uIntPtr
>
(
m_pSp3
->
GetValue
());
}
}
if
(
aCbx4
.
IsChecked
()
)
if
(
m_pCbx4
->
IsChecked
()
)
{
{
pSrcCols
[
nCount
]
=
pQSet4
->
GetItemColor
(
1
);
pSrcCols
[
nCount
]
=
m_
pQSet4
->
GetItemColor
(
1
);
pDstCols
[
nCount
]
=
aLbColor4
.
GetSelectEntryColor
();
pDstCols
[
nCount
]
=
m_pLbColor4
->
GetSelectEntryColor
();
pTols
[
nCount
++
]
=
static_cast
<
sal_uIntPtr
>
(
aSp4
.
GetValue
());
pTols
[
nCount
++
]
=
static_cast
<
sal_uIntPtr
>
(
m_pSp4
->
GetValue
());
}
}
return
nCount
;
return
nCount
;
...
@@ -1081,7 +1022,7 @@ GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const C
...
@@ -1081,7 +1022,7 @@ GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const C
Graphic
SvxBmpMask
::
Mask
(
const
Graphic
&
rGraphic
)
Graphic
SvxBmpMask
::
Mask
(
const
Graphic
&
rGraphic
)
{
{
Graphic
aGraphic
(
rGraphic
);
Graphic
aGraphic
(
rGraphic
);
const
Color
aReplColor
(
aLbColorTrans
.
GetSelectEntryColor
()
);
const
Color
aReplColor
(
m_pLbColorTrans
->
GetSelectEntryColor
()
);
switch
(
rGraphic
.
GetType
()
)
switch
(
rGraphic
.
GetType
()
)
{
{
...
@@ -1090,7 +1031,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
...
@@ -1090,7 +1031,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
if
(
rGraphic
.
IsAnimated
()
)
if
(
rGraphic
.
IsAnimated
()
)
{
{
// Replace transparency?
// Replace transparency?
if
(
aCbxTrans
.
IsChecked
()
)
if
(
m_pCbxTrans
->
IsChecked
()
)
aGraphic
=
ImpReplaceTransparency
(
rGraphic
.
GetAnimation
(),
aReplColor
);
aGraphic
=
ImpReplaceTransparency
(
rGraphic
.
GetAnimation
(),
aReplColor
);
else
else
aGraphic
=
ImpMask
(
rGraphic
.
GetAnimation
()
);
aGraphic
=
ImpMask
(
rGraphic
.
GetAnimation
()
);
...
@@ -1098,7 +1039,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
...
@@ -1098,7 +1039,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
else
else
{
{
// Replace transparency?
// Replace transparency?
if
(
aCbxTrans
.
IsChecked
()
)
if
(
m_pCbxTrans
->
IsChecked
()
)
{
{
if
(
aGraphic
.
IsTransparent
()
)
if
(
aGraphic
.
IsTransparent
()
)
{
{
...
@@ -1155,7 +1096,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
...
@@ -1155,7 +1096,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
GDIMetaFile
aMtf
(
aGraphic
.
GetGDIMetaFile
()
);
GDIMetaFile
aMtf
(
aGraphic
.
GetGDIMetaFile
()
);
// Replace transparency?
// Replace transparency?
if
(
aCbxTrans
.
IsChecked
()
)
if
(
m_pCbxTrans
->
IsChecked
()
)
aMtf
=
ImpReplaceTransparency
(
aMtf
,
aReplColor
);
aMtf
=
ImpReplaceTransparency
(
aMtf
,
aReplColor
);
else
else
aMtf
=
ImpMask
(
aMtf
);
aMtf
=
ImpMask
(
aMtf
);
...
@@ -1182,27 +1123,11 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
...
@@ -1182,27 +1123,11 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
return
aGraphic
;
return
aGraphic
;
}
}
bool
SvxBmpMask
::
IsEyedropping
()
const
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
/** Set an accessible name for the source color check boxes. Without this
the lengthy description is read.
the lengthy description is read.
*/
*/
...
@@ -1213,64 +1138,64 @@ void SvxBmpMask::SetAccessibleNames (void)
...
@@ -1213,64 +1138,64 @@ void SvxBmpMask::SetAccessibleNames (void)
sSourceColorN
=
sSourceColor
;
sSourceColorN
=
sSourceColor
;
sSourceColorN
+=
" 1"
;
sSourceColorN
+=
" 1"
;
aCbx1
.
SetAccessibleName
(
sSourceColorN
);
m_pCbx1
->
SetAccessibleName
(
sSourceColorN
);
sSourceColorN
=
sSourceColor
;
sSourceColorN
=
sSourceColor
;
sSourceColorN
+=
" 2"
;
sSourceColorN
+=
" 2"
;
aCbx2
.
SetAccessibleName
(
sSourceColorN
);
m_pCbx2
->
SetAccessibleName
(
sSourceColorN
);
sSourceColorN
=
sSourceColor
;
sSourceColorN
=
sSourceColor
;
sSourceColorN
+=
" 3"
;
sSourceColorN
+=
" 3"
;
aCbx3
.
SetAccessibleName
(
sSourceColorN
);
m_pCbx3
->
SetAccessibleName
(
sSourceColorN
);
sSourceColorN
=
sSourceColor
;
sSourceColorN
=
sSourceColor
;
sSourceColorN
+=
" 4"
;
sSourceColorN
+=
" 4"
;
aCbx4
.
SetAccessibleName
(
sSourceColorN
);
m_pCbx4
->
SetAccessibleName
(
sSourceColorN
);
// set the accessible name for valueset
// set the accessible name for valueset
OUString
sColorPalette
(
BMP_RESID
(
RID_SVXDLG_BMPMASK_STR_PALETTE
));
OUString
sColorPalette
(
BMP_RESID
(
RID_SVXDLG_BMPMASK_STR_PALETTE
));
OUString
sColorPaletteN
;
OUString
sColorPaletteN
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
+=
" 1"
;
sColorPaletteN
+=
" 1"
;
pQSet1
->
SetText
(
sColorPaletteN
);
m_
pQSet1
->
SetText
(
sColorPaletteN
);
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
+=
" 2"
;
sColorPaletteN
+=
" 2"
;
pQSet2
->
SetText
(
sColorPaletteN
);
m_
pQSet2
->
SetText
(
sColorPaletteN
);
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
+=
" 3"
;
sColorPaletteN
+=
" 3"
;
pQSet3
->
SetText
(
sColorPaletteN
);
m_
pQSet3
->
SetText
(
sColorPaletteN
);
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
=
sColorPalette
;
sColorPaletteN
+=
" 4"
;
sColorPaletteN
+=
" 4"
;
pQSet4
->
SetText
(
sColorPaletteN
);
m_
pQSet4
->
SetText
(
sColorPaletteN
);
// set the accessible for replace with spin boxes.
// set the accessible for replace with spin boxes.
OUString
sTolerance
(
BMP_RESID
(
RID_SVXDLG_BMPMASK_STR_TOLERANCE
));
OUString
sTolerance
(
BMP_RESID
(
RID_SVXDLG_BMPMASK_STR_TOLERANCE
));
OUString
sToleranceN
;
OUString
sToleranceN
;
sToleranceN
=
sTolerance
;
sToleranceN
=
sTolerance
;
sToleranceN
+=
" 1"
;
sToleranceN
+=
" 1"
;
aSp1
.
SetAccessibleName
(
sToleranceN
);
m_pSp1
->
SetAccessibleName
(
sToleranceN
);
sToleranceN
=
sTolerance
;
sToleranceN
=
sTolerance
;
sToleranceN
+=
" 2"
;
sToleranceN
+=
" 2"
;
aSp2
.
SetAccessibleName
(
sToleranceN
);
m_pSp2
->
SetAccessibleName
(
sToleranceN
);
sToleranceN
=
sTolerance
;
sToleranceN
=
sTolerance
;
sToleranceN
+=
" 3"
;
sToleranceN
+=
" 3"
;
aSp3
.
SetAccessibleName
(
sToleranceN
);
m_pSp3
->
SetAccessibleName
(
sToleranceN
);
sToleranceN
=
sTolerance
;
sToleranceN
=
sTolerance
;
sToleranceN
+=
" 4"
;
sToleranceN
+=
" 4"
;
aSp4
.
SetAccessibleName
(
sToleranceN
);
m_pSp4
->
SetAccessibleName
(
sToleranceN
);
// set the accessible for replace with combo boxes.
// set the accessible for replace with combo boxes.
OUString
sReplaceWith
(
BMP_RESID
(
RID_SVXDLG_BMPMASK_STR_REPLACEWITH
));
OUString
sReplaceWith
(
BMP_RESID
(
RID_SVXDLG_BMPMASK_STR_REPLACEWITH
));
OUString
sReplaceWithN
;
OUString
sReplaceWithN
;
sReplaceWithN
=
sReplaceWith
;
sReplaceWithN
=
sReplaceWith
;
sReplaceWithN
+=
" 1"
;
sReplaceWithN
+=
" 1"
;
aLbColor1
.
SetAccessibleName
(
sReplaceWithN
);
m_pLbColor1
->
SetAccessibleName
(
sReplaceWithN
);
sReplaceWithN
=
sReplaceWith
;
sReplaceWithN
=
sReplaceWith
;
sReplaceWithN
+=
" 2"
;
sReplaceWithN
+=
" 2"
;
aLbColor2
.
SetAccessibleName
(
sReplaceWithN
);
m_pLbColor2
->
SetAccessibleName
(
sReplaceWithN
);
sReplaceWithN
=
sReplaceWith
;
sReplaceWithN
=
sReplaceWith
;
sReplaceWithN
+=
" 3"
;
sReplaceWithN
+=
" 3"
;
aLbColor3
.
SetAccessibleName
(
sReplaceWithN
);
m_pLbColor3
->
SetAccessibleName
(
sReplaceWithN
);
sReplaceWithN
=
sReplaceWith
;
sReplaceWithN
=
sReplaceWith
;
sReplaceWithN
+=
" 4"
;
sReplaceWithN
+=
" 4"
;
aLbColor4
.
SetAccessibleName
(
sReplaceWithN
);
m_pLbColor4
->
SetAccessibleName
(
sReplaceWithN
);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/dialog/bmpmask.hrc
Dosyayı görüntüle @
0ef2fa80
...
@@ -16,38 +16,10 @@
...
@@ -16,38 +16,10 @@
* except in compliance with the License. You may obtain a copy of
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* 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_TRANSP (RID_SVX_BMPMASK_START + 1)
#define RID_SVXDLG_BMPMASK_STR_SOURCECOLOR (RID_SVX_BMPMASK_START + 2)
#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_PALETTE (RID_SVX_BMPMASK_START + 3)
#define RID_SVXDLG_BMPMASK_STR_TOLERANCE (RID_SVX_BMPMASK_START + 4)
#define RID_SVXDLG_BMPMASK_STR_TOLERANCE (RID_SVX_BMPMASK_START + 4)
#define RID_SVXDLG_BMPMASK_STR_REPLACEWITH (RID_SVX_BMPMASK_START + 5)
#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: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/dialog/bmpmask.src
Dosyayı görüntüle @
0ef2fa80
...
@@ -22,280 +22,6 @@
...
@@ -22,280 +22,6 @@
#include "bmpmask.hrc"
#include "bmpmask.hrc"
#include "helpid.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
String RID_SVXDLG_BMPMASK_STR_TRANSP
{
{
Text [ en-US ] = "Transparent";
Text [ en-US ] = "Transparent";
...
@@ -312,10 +38,12 @@ String RID_SVXDLG_BMPMASK_STR_PALETTE
...
@@ -312,10 +38,12 @@ String RID_SVXDLG_BMPMASK_STR_PALETTE
{
{
Text [ en-US ] = "Color Palette";
Text [ en-US ] = "Color Palette";
};
};
String RID_SVXDLG_BMPMASK_STR_TOLERANCE
String RID_SVXDLG_BMPMASK_STR_TOLERANCE
{
{
Text [ en-US ] = "Tolerance";
Text [ en-US ] = "Tolerance";
};
};
String RID_SVXDLG_BMPMASK_STR_REPLACEWITH
String RID_SVXDLG_BMPMASK_STR_REPLACEWITH
{
{
Text [ en-US ] = "Replace with";
Text [ en-US ] = "Replace with";
...
...
svx/uiconfig/ui/dockingcolorreplace.ui
0 → 100644
Dosyayı görüntüle @
0ef2fa80
<?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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment