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
e97e62a4
Kaydet (Commit)
e97e62a4
authored
Şub 07, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert drawinglayer gradient dialog to new .ui
Change-Id: Iaa91d3b1ab47e02edc69c2b9abdb33ae097571cb
üst
0d47e4c4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
769 additions
and
508 deletions
+769
-508
UI_cui.mk
cui/UI_cui.mk
+1
-0
cuitabarea.hxx
cui/source/inc/cuitabarea.hxx
+20
-24
tabarea.hrc
cui/source/tabpages/tabarea.hrc
+0
-16
tabarea.src
cui/source/tabpages/tabarea.src
+0
-265
tpgradnt.cxx
cui/source/tabpages/tpgradnt.cxx
+200
-203
gradientpage.ui
cui/uiconfig/ui/gradientpage.ui
+532
-0
dlgctrl.hxx
svx/inc/svx/dlgctrl.hxx
+1
-0
dlgctrl.cxx
svx/source/dialog/dlgctrl.cxx
+15
-0
No files found.
cui/UI_cui.mk
Dosyayı görüntüle @
e97e62a4
...
...
@@ -14,6 +14,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/borderpage \
cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/colorpage \
cui/uiconfig/ui/gradientpage \
cui/uiconfig/ui/colorconfigwin \
cui/uiconfig/ui/effectspage \
cui/uiconfig/ui/hyphenate \
...
...
cui/source/inc/cuitabarea.hxx
Dosyayı görüntüle @
e97e62a4
...
...
@@ -370,30 +370,26 @@ class SvxGradientTabPage : public SfxTabPage
using
TabPage
::
DeactivatePage
;
private
:
FixedLine
aFlProp
;
FixedText
aFtType
;
ListBox
aLbGradientType
;
FixedText
aFtCenterX
;
MetricField
aMtrCenterX
;
FixedText
aFtCenterY
;
MetricField
aMtrCenterY
;
FixedText
aFtAngle
;
MetricField
aMtrAngle
;
FixedText
aFtBorder
;
MetricField
aMtrBorder
;
FixedText
aFtColorFrom
;
ColorLB
aLbColorFrom
;
MetricField
aMtrColorFrom
;
FixedText
aFtColorTo
;
ColorLB
aLbColorTo
;
MetricField
aMtrColorTo
;
GradientLB
aLbGradients
;
SvxXRectPreview
aCtlPreview
;
PushButton
aBtnAdd
;
PushButton
aBtnModify
;
PushButton
aBtnDelete
;
ImageButton
aBtnLoad
;
ImageButton
aBtnSave
;
ListBox
*
m_pLbGradientType
;
FixedText
*
m_pFtCenterX
;
MetricField
*
m_pMtrCenterX
;
FixedText
*
m_pFtCenterY
;
MetricField
*
m_pMtrCenterY
;
FixedText
*
m_pFtAngle
;
MetricField
*
m_pMtrAngle
;
FixedText
*
m_pFtAngleDegrees
;
MetricField
*
m_pMtrBorder
;
ColorLB
*
m_pLbColorFrom
;
MetricField
*
m_pMtrColorFrom
;
ColorLB
*
m_pLbColorTo
;
MetricField
*
m_pMtrColorTo
;
GradientLB
*
m_pLbGradients
;
SvxXRectPreview
*
m_pCtlPreview
;
PushButton
*
m_pBtnAdd
;
PushButton
*
m_pBtnModify
;
PushButton
*
m_pBtnDelete
;
PushButton
*
m_pBtnLoad
;
PushButton
*
m_pBtnSave
;
const
SfxItemSet
&
rOutAttrs
;
...
...
cui/source/tabpages/tabarea.hrc
Dosyayı görüntüle @
e97e62a4
...
...
@@ -55,22 +55,6 @@
#define LB_HATCHINGS 4
#define LB_LINE_TYPE 1
#define LB_LINE_COLOR 3
#define LB_GRADIENTS 3
#define LB_GRADIENT_TYPES 4
#define LB_COLOR_FROM 1
#define LB_COLOR_TO 2
#define FT_COLOR_FROM 1
#define FT_COLOR_TO 2
#define FT_CENTER_X 3
#define FT_CENTER_Y 5
#define FT_ANGLE 4
#define FT_BORDER 6
#define MTR_COLOR_FROM 4
#define MTR_COLOR_TO 5
#define MTR_CENTER_X 2
#define MTR_CENTER_Y 3
#define MTR_BORDER 6
#define MTR_ANGLE 1
#define NUM_FLD_STEPCOUNT 1
#define FT_PIXEL_EDIT 4
#define CTL_PIXEL 2
...
...
cui/source/tabpages/tabarea.src
Dosyayı görüntüle @
e97e62a4
...
...
@@ -1001,271 +1001,6 @@ TabPage RID_SVXPAGE_BITMAP
};
};
// ------------------------------------------------------
TabPage RID_SVXPAGE_GRADIENT
{
HelpID = HID_AREA_GRADIENT ;
Hide = TRUE ;
Text [ en-US ] = "Gradients" ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
FixedLine FL_PROP
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248, 8 ) ;
Text [ en-US ] = "Properties";
};
FixedText FT_TYPE
{
Pos = MAP_APPFONT ( 12 , 16 ) ;
Size = MAP_APPFONT ( 26 , 8 ) ;
Text [ en-US ] = "Ty~pe" ;
};
ListBox LB_GRADIENT_TYPES
{
HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_GRADIENT_TYPES";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 14 ) ;
Size = MAP_APPFONT ( 48, 63 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "Linear" ; Default ; > ;
< "Axial" ; Default ; > ;
< "Radial" ; Default ; > ;
< "Ellipsoid" ; Default ; > ;
< "Square" ; Default ; > ;
< "Rectangular" ; Default ; > ;
};
};
FixedText FT_CENTER_X
{
Pos = MAP_APPFONT ( 12 , 32 ) ;
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Center ~X" ;
};
MetricField MTR_CENTER_X
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_CENTER_X";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 30 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
FixedText FT_CENTER_Y
{
Pos = MAP_APPFONT ( 12 , 48 ) ;
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Center ~Y" ;
};
MetricField MTR_CENTER_Y
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_CENTER_Y";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 46 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
FixedText FT_ANGLE
{
Pos = MAP_APPFONT ( 12 , 64 ) ;
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "A~ngle" ;
};
MetricField MTR_ANGLE
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_ANGLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 62 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 359 ;
Unit = FUNIT_CUSTOM ;
CustomUnitText [ en-US ] = " degrees" ;
Last = 359 ;
SpinSize = 15 ;
};
FixedText FT_BORDER
{
Pos = MAP_APPFONT ( 12 , 80 ) ;
Size = MAP_APPFONT ( 32 , 8 ) ;
Text [ en-US ] = "~Border" ;
};
MetricField MTR_BORDER
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_BORDER";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 78 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
FixedText FT_COLOR_FROM
{
Pos = MAP_APPFONT ( 12 , 99 ) ;
Size = MAP_APPFONT ( 32 , 8 ) ;
Text [ en-US ] = "~From" ;
};
ListBox LB_COLOR_FROM
{
HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_COLOR_FROM";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 97 ) ;
Size = MAP_APPFONT ( 48, 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
DDExtraWidth = TRUE ;
};
MetricField MTR_COLOR_FROM
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_COLOR_FROM";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 113 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
FixedText FT_COLOR_TO
{
Pos = MAP_APPFONT ( 12 , 133 ) ;
Size = MAP_APPFONT ( 32 , 8 ) ;
Text [ en-US ] = "~To" ;
};
ListBox LB_COLOR_TO
{
HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_COLOR_TO";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 131 ) ;
Size = MAP_APPFONT ( 48, 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
DDExtraWidth = TRUE ;
};
MetricField MTR_COLOR_TO
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_COLOR_TO";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 147 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
ListBox LB_GRADIENTS
{
HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_GRADIENTS";
Border = TRUE ;
Pos = MAP_APPFONT ( 103 , 14 ) ;
Size = MAP_APPFONT ( 88 , 110 ) ;
TabStop = TRUE ;
};
Control CTL_PREVIEW
{
Border = TRUE;
Pos = MAP_APPFONT ( 103 , 131 ) ;
Size = MAP_APPFONT ( 88 , 42 ) ;
};
PushButton BTN_ADD
{
HelpID = "cui:PushButton:RID_SVXPAGE_GRADIENT:BTN_ADD";
Pos = MAP_APPFONT ( 197 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add..." ;
TabStop = TRUE ;
};
PushButton BTN_MODIFY
{
HelpID = "cui:PushButton:RID_SVXPAGE_GRADIENT:BTN_MODIFY";
Pos = MAP_APPFONT ( 197 , 32 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Modify..." ;
TabStop = TRUE ;
};
PushButton BTN_DELETE
{
HelpID = "cui:PushButton:RID_SVXPAGE_GRADIENT:BTN_DELETE";
Pos = MAP_APPFONT ( 197 , 68 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete..." ;
TabStop = TRUE ;
};
ImageButton BTN_LOAD
{
HelpID = "cui:ImageButton:RID_SVXPAGE_GRADIENT:BTN_LOAD";
Pos = MAP_APPFONT ( 197 , 104 ) ;
Size = MAP_APPFONT ( 16 , 16 ) ;
TabStop = TRUE ;
QuickHelpText [ en-US ] = "Load Gradients List";
ButtonImage = Image
{
ImageBitmap = Bitmap
{
File = "sc05501.bmp" ;
};
};
};
ImageButton BTN_SAVE
{
HelpID = "cui:ImageButton:RID_SVXPAGE_GRADIENT:BTN_SAVE";
Pos = MAP_APPFONT ( 217 , 104 ) ;
Size = MAP_APPFONT ( 16 , 16 ) ;
TabStop = TRUE ;
QuickHelpText [ en-US ] = "Save Gradients List";
ButtonImage = Image
{
ImageBitmap = Bitmap
{
File = "sc05502.bmp" ;
};
};
};
CheckBox BTN_EMBED
{
HelpID = "cui:ImageButton:RID_SVXPAGE_GRADIENT:BTN_EMBED";
Pos = MAP_APPFONT ( 197 , 124 ) ;
Size = MAP_APPFONT ( 122 , 10 ) ;
Text [ en-US ] = "Embed";
};
};
// ------------------------------------------------------
TabDialog RID_SVXDLG_AREA
{
...
...
cui/source/tabpages/tpgradnt.cxx
Dosyayı görüntüle @
e97e62a4
...
...
@@ -49,32 +49,7 @@ SvxGradientTabPage::SvxGradientTabPage
Window
*
pParent
,
const
SfxItemSet
&
rInAttrs
)
:
SfxTabPage
(
pParent
,
CUI_RES
(
RID_SVXPAGE_GRADIENT
),
rInAttrs
),
aFlProp
(
this
,
CUI_RES
(
FL_PROP
)
),
aFtType
(
this
,
CUI_RES
(
FT_TYPE
)
),
aLbGradientType
(
this
,
CUI_RES
(
LB_GRADIENT_TYPES
)
),
aFtCenterX
(
this
,
CUI_RES
(
FT_CENTER_X
)
),
aMtrCenterX
(
this
,
CUI_RES
(
MTR_CENTER_X
)
),
aFtCenterY
(
this
,
CUI_RES
(
FT_CENTER_Y
)
),
aMtrCenterY
(
this
,
CUI_RES
(
MTR_CENTER_Y
)
),
aFtAngle
(
this
,
CUI_RES
(
FT_ANGLE
)
),
aMtrAngle
(
this
,
CUI_RES
(
MTR_ANGLE
)
),
aFtBorder
(
this
,
CUI_RES
(
FT_BORDER
)
),
aMtrBorder
(
this
,
CUI_RES
(
MTR_BORDER
)
),
aFtColorFrom
(
this
,
CUI_RES
(
FT_COLOR_FROM
)
),
aLbColorFrom
(
this
,
CUI_RES
(
LB_COLOR_FROM
)
),
aMtrColorFrom
(
this
,
CUI_RES
(
MTR_COLOR_FROM
)
),
aFtColorTo
(
this
,
CUI_RES
(
FT_COLOR_TO
)
),
aLbColorTo
(
this
,
CUI_RES
(
LB_COLOR_TO
)
),
aMtrColorTo
(
this
,
CUI_RES
(
MTR_COLOR_TO
)
),
aLbGradients
(
this
,
CUI_RES
(
LB_GRADIENTS
)
),
aCtlPreview
(
this
,
CUI_RES
(
CTL_PREVIEW
)
),
aBtnAdd
(
this
,
CUI_RES
(
BTN_ADD
)
),
aBtnModify
(
this
,
CUI_RES
(
BTN_MODIFY
)
),
aBtnDelete
(
this
,
CUI_RES
(
BTN_DELETE
)
),
aBtnLoad
(
this
,
CUI_RES
(
BTN_LOAD
)
),
aBtnSave
(
this
,
CUI_RES
(
BTN_SAVE
)
),
SfxTabPage
(
pParent
,
"GradientPage"
,
"cui/ui/gradientpage.ui"
,
rInAttrs
),
rOutAttrs
(
rInAttrs
),
...
...
@@ -91,10 +66,37 @@ SvxGradientTabPage::SvxGradientTabPage
aXFillAttr
(
pXPool
),
rXFSet
(
aXFillAttr
.
GetItemSet
()
)
{
FreeResource
();
aCtlPreview
.
SetAccessibleName
(
String
(
CUI_RES
(
STR_EXAMPLE
)));
aLbGradients
.
SetAccessibleName
(
GetText
());
get
(
m_pLbGradientType
,
"gradienttypelb"
);
get
(
m_pFtCenterX
,
"centerxft"
);
get
(
m_pMtrCenterX
,
"centerxmtr"
);
get
(
m_pFtCenterY
,
"centeryft"
);
get
(
m_pMtrCenterY
,
"centerymtr"
);
get
(
m_pFtAngle
,
"angleft"
);
get
(
m_pMtrAngle
,
"anglemtr"
);
m_pMtrAngle
->
SetUnit
(
FUNIT_CUSTOM
);
get
(
m_pFtAngleDegrees
,
"anglemtrdegrees"
);
m_pMtrAngle
->
SetCustomUnitText
(
m_pFtAngleDegrees
->
GetText
());
get
(
m_pMtrBorder
,
"bordermtr"
);
get
(
m_pLbColorFrom
,
"colorfromlb"
);
get
(
m_pMtrColorFrom
,
"colorfrommtr"
);
get
(
m_pLbColorTo
,
"colortolb"
);
get
(
m_pMtrColorTo
,
"colortomtr"
);
get
(
m_pLbGradients
,
"gradientslb"
);
Size
aSize
=
LogicToPixel
(
Size
(
88
,
110
),
MAP_APPFONT
);
m_pLbGradients
->
set_width_request
(
aSize
.
Width
());
m_pLbGradients
->
set_height_request
(
aSize
.
Height
());
get
(
m_pCtlPreview
,
"previewctl"
);
aSize
=
LogicToPixel
(
Size
(
88
,
42
),
MAP_APPFONT
);
m_pCtlPreview
->
set_width_request
(
aSize
.
Width
());
m_pCtlPreview
->
set_height_request
(
aSize
.
Height
());
get
(
m_pBtnAdd
,
"add"
);
get
(
m_pBtnModify
,
"modify"
);
get
(
m_pBtnDelete
,
"delete"
);
get
(
m_pBtnLoad
,
"load"
);
get
(
m_pBtnSave
,
"save"
);
m_pCtlPreview
->
SetAccessibleName
(
String
(
CUI_RES
(
STR_EXAMPLE
)));
m_pLbGradients
->
SetAccessibleName
(
GetText
());
// this page needs ExchangeSupport
...
...
@@ -102,56 +104,51 @@ SvxGradientTabPage::SvxGradientTabPage
// as long as NOT supported by the item
aMtrColorTo
.
SetValue
(
100
);
aMtrColorFrom
.
SetValue
(
100
);
m_pMtrColorTo
->
SetValue
(
100
);
m_pMtrColorFrom
->
SetValue
(
100
);
// setting the output device
rXFSet
.
Put
(
aXFStyleItem
);
rXFSet
.
Put
(
aXGradientItem
);
aCtlPreview
.
SetAttributes
(
aXFillAttr
.
GetItemSet
()
);
m_pCtlPreview
->
SetAttributes
(
aXFillAttr
.
GetItemSet
()
);
// overload the handler
aLbGradients
.
SetSelectHdl
(
m_pLbGradients
->
SetSelectHdl
(
LINK
(
this
,
SvxGradientTabPage
,
ChangeGradientHdl_Impl
)
);
aBtnAdd
.
SetClickHdl
(
LINK
(
this
,
SvxGradientTabPage
,
ClickAddHdl_Impl
)
);
aBtnModify
.
SetClickHdl
(
m_pBtnAdd
->
SetClickHdl
(
LINK
(
this
,
SvxGradientTabPage
,
ClickAddHdl_Impl
)
);
m_pBtnModify
->
SetClickHdl
(
LINK
(
this
,
SvxGradientTabPage
,
ClickModifyHdl_Impl
)
);
aBtnDelete
.
SetClickHdl
(
m_pBtnDelete
->
SetClickHdl
(
LINK
(
this
,
SvxGradientTabPage
,
ClickDeleteHdl_Impl
)
);
Link
aLink
=
LINK
(
this
,
SvxGradientTabPage
,
ModifiedHdl_Impl
);
aLbGradientType
.
SetSelectHdl
(
aLink
);
aMtrCenterX
.
SetModifyHdl
(
aLink
);
aMtrCenterY
.
SetModifyHdl
(
aLink
);
aMtrAngle
.
SetModifyHdl
(
aLink
);
aMtrBorder
.
SetModifyHdl
(
aLink
);
aMtrColorFrom
.
SetModifyHdl
(
aLink
);
aLbColorFrom
.
SetSelectHdl
(
aLink
);
aMtrColorTo
.
SetModifyHdl
(
aLink
);
aLbColorTo
.
SetSelectHdl
(
aLink
);
aBtnLoad
.
SetClickHdl
(
m_pLbGradientType
->
SetSelectHdl
(
aLink
);
m_pMtrCenterX
->
SetModifyHdl
(
aLink
);
m_pMtrCenterY
->
SetModifyHdl
(
aLink
);
m_pMtrAngle
->
SetModifyHdl
(
aLink
);
m_pMtrBorder
->
SetModifyHdl
(
aLink
);
m_pMtrColorFrom
->
SetModifyHdl
(
aLink
);
m_pLbColorFrom
->
SetSelectHdl
(
aLink
);
m_pMtrColorTo
->
SetModifyHdl
(
aLink
);
m_pLbColorTo
->
SetSelectHdl
(
aLink
);
m_pBtnLoad
->
SetClickHdl
(
LINK
(
this
,
SvxGradientTabPage
,
ClickLoadHdl_Impl
)
);
aBtnSave
.
SetClickHdl
(
m_pBtnSave
->
SetClickHdl
(
LINK
(
this
,
SvxGradientTabPage
,
ClickSaveHdl_Impl
)
);
aBtnAdd
.
SetAccessibleRelationMemberOf
(
&
aFlProp
);
aBtnModify
.
SetAccessibleRelationMemberOf
(
&
aFlProp
);
aBtnDelete
.
SetAccessibleRelationMemberOf
(
&
aFlProp
);
aLbGradients
.
SetAccessibleRelationLabeledBy
(
&
aLbGradients
);
// #i76307# always paint the preview in LTR, because this is what the document does
aCtlPreview
.
EnableRTL
(
sal_False
);
m_pCtlPreview
->
EnableRTL
(
sal_False
);
}
// -----------------------------------------------------------------------
void
SvxGradientTabPage
::
Construct
()
{
aLbColorFrom
.
Fill
(
pColorList
);
aLbColorTo
.
CopyEntries
(
a
LbColorFrom
);
m_pLbColorFrom
->
Fill
(
pColorList
);
m_pLbColorTo
->
CopyEntries
(
*
m_p
LbColorFrom
);
aLbGradients
.
Fill
(
pGradientList
);
m_pLbGradients
->
Fill
(
pGradientList
);
}
// -----------------------------------------------------------------------
...
...
@@ -175,28 +172,28 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& )
pColorList
=
(
(
SvxAreaTabDialog
*
)
GetParentDialog
()
)
->
GetNewColorList
();
// LbColorFrom
nPos
=
aLbColorFrom
.
GetSelectEntryPos
();
aLbColorFrom
.
Clear
();
aLbColorFrom
.
Fill
(
pColorList
);
nCount
=
aLbColorFrom
.
GetEntryCount
();
nPos
=
m_pLbColorFrom
->
GetSelectEntryPos
();
m_pLbColorFrom
->
Clear
();
m_pLbColorFrom
->
Fill
(
pColorList
);
nCount
=
m_pLbColorFrom
->
GetEntryCount
();
if
(
nCount
==
0
)
;
// this case should not occur
else
if
(
nCount
<=
nPos
)
aLbColorFrom
.
SelectEntryPos
(
0
);
m_pLbColorFrom
->
SelectEntryPos
(
0
);
else
aLbColorFrom
.
SelectEntryPos
(
nPos
);
m_pLbColorFrom
->
SelectEntryPos
(
nPos
);
// LbColorTo
nPos
=
aLbColorTo
.
GetSelectEntryPos
();
aLbColorTo
.
Clear
();
aLbColorTo
.
CopyEntries
(
a
LbColorFrom
);
nCount
=
aLbColorTo
.
GetEntryCount
();
nPos
=
m_pLbColorTo
->
GetSelectEntryPos
();
m_pLbColorTo
->
Clear
();
m_pLbColorTo
->
CopyEntries
(
m_p
LbColorFrom
);
nCount
=
m_pLbColorTo
->
GetEntryCount
();
if
(
nCount
==
0
)
;
// this case should not occur
else
if
(
nCount
<=
nPos
)
aLbColorTo
.
SelectEntryPos
(
0
);
m_pLbColorTo
->
SelectEntryPos
(
0
);
else
aLbColorTo
.
SelectEntryPos
(
nPos
);
m_pLbColorTo
->
SelectEntryPos
(
nPos
);
ModifiedHdl_Impl
(
this
);
}
...
...
@@ -219,7 +216,7 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& )
if
(
*
pPageType
==
PT_GRADIENT
&&
*
pPos
!=
LISTBOX_ENTRY_NOTFOUND
)
{
aLbGradients
.
SelectEntryPos
(
*
pPos
);
m_pLbGradients
->
SelectEntryPos
(
*
pPos
);
}
// colors could have been deleted
ChangeGradientHdl_Impl
(
this
);
...
...
@@ -248,21 +245,21 @@ int SvxGradientTabPage::DeactivatePage( SfxItemSet* _pSet )
long
SvxGradientTabPage
::
CheckChanges_Impl
()
{
// is used here in order to NOT lose changes
XGradient
aTmpGradient
(
aLbColorFrom
.
GetSelectEntryColor
(),
aLbColorTo
.
GetSelectEntryColor
(),
(
XGradientStyle
)
aLbGradientType
.
GetSelectEntryPos
(),
static_cast
<
long
>
(
aMtrAngle
.
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
aMtrCenterX
.
GetValue
(),
(
sal_uInt16
)
aMtrCenterY
.
GetValue
(),
(
sal_uInt16
)
aMtrBorder
.
GetValue
(),
(
sal_uInt16
)
aMtrColorFrom
.
GetValue
(),
(
sal_uInt16
)
aMtrColorTo
.
GetValue
()
);
sal_uInt16
nPos
=
aLbGradients
.
GetSelectEntryPos
();
XGradient
aTmpGradient
(
m_pLbColorFrom
->
GetSelectEntryColor
(),
m_pLbColorTo
->
GetSelectEntryColor
(),
(
XGradientStyle
)
m_pLbGradientType
->
GetSelectEntryPos
(),
static_cast
<
long
>
(
m_pMtrAngle
->
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
m_pMtrCenterX
->
GetValue
(),
(
sal_uInt16
)
m_pMtrCenterY
->
GetValue
(),
(
sal_uInt16
)
m_pMtrBorder
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorFrom
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorTo
->
GetValue
()
);
sal_uInt16
nPos
=
m_pLbGradients
->
GetSelectEntryPos
();
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
{
XGradient
aGradient
=
pGradientList
->
GetGradient
(
nPos
)
->
GetGradient
();
String
aString
=
aLbGradients
.
GetSelectEntry
();
String
aString
=
m_pLbGradients
->
GetSelectEntry
();
if
(
!
(
aTmpGradient
==
aGradient
)
)
{
...
...
@@ -292,7 +289,7 @@ long SvxGradientTabPage::CheckChanges_Impl()
case
RET_BTN_2
:
{
ClickAddHdl_Impl
(
this
);
nPos
=
aLbGradients
.
GetSelectEntryPos
();
nPos
=
m_pLbGradients
->
GetSelectEntryPos
();
aGradient
=
pGradientList
->
GetGradient
(
nPos
)
->
GetGradient
();
}
break
;
...
...
@@ -303,7 +300,7 @@ long SvxGradientTabPage::CheckChanges_Impl()
delete
aMessDlg
;
}
}
nPos
=
aLbGradients
.
GetSelectEntryPos
();
nPos
=
m_pLbGradients
->
GetSelectEntryPos
();
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
{
*
pPos
=
nPos
;
...
...
@@ -321,25 +318,25 @@ sal_Bool SvxGradientTabPage::FillItemSet( SfxItemSet& rSet )
XGradient
*
pXGradient
=
NULL
;
String
aString
;
sal_uInt16
nPos
=
aLbGradients
.
GetSelectEntryPos
();
sal_uInt16
nPos
=
m_pLbGradients
->
GetSelectEntryPos
();
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
{
pXGradient
=
new
XGradient
(
pGradientList
->
GetGradient
(
nPos
)
->
GetGradient
()
);
aString
=
aLbGradients
.
GetSelectEntry
();
aString
=
m_pLbGradients
->
GetSelectEntry
();
}
else
// gradient was passed (unidentified)
{
pXGradient
=
new
XGradient
(
aLbColorFrom
.
GetSelectEntryColor
(),
aLbColorTo
.
GetSelectEntryColor
(),
(
XGradientStyle
)
aLbGradientType
.
GetSelectEntryPos
(),
static_cast
<
long
>
(
aMtrAngle
.
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
aMtrCenterX
.
GetValue
(),
(
sal_uInt16
)
aMtrCenterY
.
GetValue
(),
(
sal_uInt16
)
aMtrBorder
.
GetValue
(),
(
sal_uInt16
)
aMtrColorFrom
.
GetValue
(),
(
sal_uInt16
)
aMtrColorTo
.
GetValue
()
);
pXGradient
=
new
XGradient
(
m_pLbColorFrom
->
GetSelectEntryColor
(),
m_pLbColorTo
->
GetSelectEntryColor
(),
(
XGradientStyle
)
m_pLbGradientType
->
GetSelectEntryPos
(),
static_cast
<
long
>
(
m_pMtrAngle
->
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
m_pMtrCenterX
->
GetValue
(),
(
sal_uInt16
)
m_pMtrCenterY
->
GetValue
(),
(
sal_uInt16
)
m_pMtrBorder
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorFrom
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorTo
->
GetValue
()
);
}
DBG_ASSERT
(
pXGradient
,
"XGradient konnte nicht erzeugt werden"
);
rSet
.
Put
(
XFillStyleItem
(
XFILL_GRADIENT
)
);
...
...
@@ -354,21 +351,21 @@ sal_Bool SvxGradientTabPage::FillItemSet( SfxItemSet& rSet )
void
SvxGradientTabPage
::
Reset
(
const
SfxItemSet
&
)
{
//
aLbGradients.
SelectEntryPos( 0 );
//
m_pLbGradients->
SelectEntryPos( 0 );
ChangeGradientHdl_Impl
(
this
);
// determine state of the buttons
if
(
pGradientList
->
Count
()
)
{
aBtnModify
.
Enable
();
aBtnDelete
.
Enable
();
aBtnSave
.
Enable
();
m_pBtnModify
->
Enable
();
m_pBtnDelete
->
Enable
();
m_pBtnSave
->
Enable
();
}
else
{
aBtnModify
.
Disable
();
aBtnDelete
.
Disable
();
aBtnSave
.
Disable
();
m_pBtnModify
->
Disable
();
m_pBtnDelete
->
Disable
();
m_pBtnSave
->
Disable
();
}
}
...
...
@@ -384,27 +381,27 @@ SfxTabPage* SvxGradientTabPage::Create( Window* pWindow,
IMPL_LINK
(
SvxGradientTabPage
,
ModifiedHdl_Impl
,
void
*
,
pControl
)
{
XGradientStyle
eXGS
=
(
XGradientStyle
)
aLbGradientType
.
GetSelectEntryPos
();
XGradientStyle
eXGS
=
(
XGradientStyle
)
m_pLbGradientType
->
GetSelectEntryPos
();
XGradient
aXGradient
(
aLbColorFrom
.
GetSelectEntryColor
(),
aLbColorTo
.
GetSelectEntryColor
(),
XGradient
aXGradient
(
m_pLbColorFrom
->
GetSelectEntryColor
(),
m_pLbColorTo
->
GetSelectEntryColor
(),
eXGS
,
static_cast
<
long
>
(
aMtrAngle
.
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
aMtrCenterX
.
GetValue
(),
(
sal_uInt16
)
aMtrCenterY
.
GetValue
(),
(
sal_uInt16
)
aMtrBorder
.
GetValue
(),
(
sal_uInt16
)
aMtrColorFrom
.
GetValue
(),
(
sal_uInt16
)
aMtrColorTo
.
GetValue
()
);
static_cast
<
long
>
(
m_pMtrAngle
->
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
m_pMtrCenterX
->
GetValue
(),
(
sal_uInt16
)
m_pMtrCenterY
->
GetValue
(),
(
sal_uInt16
)
m_pMtrBorder
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorFrom
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorTo
->
GetValue
()
);
// enable/disable controls
if
(
pControl
==
&
a
LbGradientType
||
pControl
==
this
)
if
(
pControl
==
m_p
LbGradientType
||
pControl
==
this
)
SetControlState_Impl
(
eXGS
);
// displaying in XOutDev
rXFSet
.
Put
(
XFillGradientItem
(
String
(),
aXGradient
)
);
aCtlPreview
.
SetAttributes
(
aXFillAttr
.
GetItemSet
()
);
m_pCtlPreview
->
SetAttributes
(
aXFillAttr
.
GetItemSet
()
);
aCtlPreview
.
Invalidate
();
m_pCtlPreview
->
Invalidate
();
return
0L
;
}
...
...
@@ -473,26 +470,26 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl)
if
(
!
nError
)
{
XGradient
aXGradient
(
aLbColorFrom
.
GetSelectEntryColor
(),
aLbColorTo
.
GetSelectEntryColor
(),
(
XGradientStyle
)
aLbGradientType
.
GetSelectEntryPos
(),
static_cast
<
long
>
(
aMtrAngle
.
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
aMtrCenterX
.
GetValue
(),
(
sal_uInt16
)
aMtrCenterY
.
GetValue
(),
(
sal_uInt16
)
aMtrBorder
.
GetValue
(),
(
sal_uInt16
)
aMtrColorFrom
.
GetValue
(),
(
sal_uInt16
)
aMtrColorTo
.
GetValue
()
);
XGradient
aXGradient
(
m_pLbColorFrom
->
GetSelectEntryColor
(),
m_pLbColorTo
->
GetSelectEntryColor
(),
(
XGradientStyle
)
m_pLbGradientType
->
GetSelectEntryPos
(),
static_cast
<
long
>
(
m_pMtrAngle
->
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
m_pMtrCenterX
->
GetValue
(),
(
sal_uInt16
)
m_pMtrCenterY
->
GetValue
(),
(
sal_uInt16
)
m_pMtrBorder
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorFrom
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorTo
->
GetValue
()
);
XGradientEntry
*
pEntry
=
new
XGradientEntry
(
aXGradient
,
aName
);
pGradientList
->
Insert
(
pEntry
,
nCount
);
aLbGradients
.
Append
(
pEntry
);
m_pLbGradients
->
Append
(
pEntry
);
aLbGradients
.
SelectEntryPos
(
aLbGradients
.
GetEntryCount
()
-
1
);
m_pLbGradients
->
SelectEntryPos
(
m_pLbGradients
->
GetEntryCount
()
-
1
);
#ifdef WNT
// hack: #31355# W.P.
Rectangle
aRect
(
aLbGradients
.
GetPosPixel
(),
aLbGradients
.
GetSizePixel
()
);
Rectangle
aRect
(
m_pLbGradients
->
GetPosPixel
(),
m_pLbGradients
->
GetSizePixel
()
);
if
(
sal_True
)
{
// ??? overlapped with pDlg
// and srolling
Invalidate
(
aRect
);
...
...
@@ -507,9 +504,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl)
// determine button state
if
(
pGradientList
->
Count
()
)
{
aBtnModify
.
Enable
();
aBtnDelete
.
Enable
();
aBtnSave
.
Enable
();
m_pBtnModify
->
Enable
();
m_pBtnDelete
->
Enable
();
m_pBtnSave
->
Enable
();
}
return
0L
;
}
...
...
@@ -518,7 +515,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl)
IMPL_LINK_NOARG
(
SvxGradientTabPage
,
ClickModifyHdl_Impl
)
{
sal_uInt16
nPos
=
aLbGradients
.
GetSelectEntryPos
();
sal_uInt16
nPos
=
m_pLbGradients
->
GetSelectEntryPos
();
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
{
...
...
@@ -552,23 +549,23 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl)
if
(
bDifferent
)
{
bLoop
=
sal_False
;
XGradient
aXGradient
(
aLbColorFrom
.
GetSelectEntryColor
(),
aLbColorTo
.
GetSelectEntryColor
(),
(
XGradientStyle
)
aLbGradientType
.
GetSelectEntryPos
(),
static_cast
<
long
>
(
aMtrAngle
.
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
aMtrCenterX
.
GetValue
(),
(
sal_uInt16
)
aMtrCenterY
.
GetValue
(),
(
sal_uInt16
)
aMtrBorder
.
GetValue
(),
(
sal_uInt16
)
aMtrColorFrom
.
GetValue
(),
(
sal_uInt16
)
aMtrColorTo
.
GetValue
()
);
XGradient
aXGradient
(
m_pLbColorFrom
->
GetSelectEntryColor
(),
m_pLbColorTo
->
GetSelectEntryColor
(),
(
XGradientStyle
)
m_pLbGradientType
->
GetSelectEntryPos
(),
static_cast
<
long
>
(
m_pMtrAngle
->
GetValue
()
*
10
),
// should be changed in resource
(
sal_uInt16
)
m_pMtrCenterX
->
GetValue
(),
(
sal_uInt16
)
m_pMtrCenterY
->
GetValue
(),
(
sal_uInt16
)
m_pMtrBorder
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorFrom
->
GetValue
(),
(
sal_uInt16
)
m_pMtrColorTo
->
GetValue
()
);
XGradientEntry
*
pEntry
=
new
XGradientEntry
(
aXGradient
,
aName
);
delete
pGradientList
->
Replace
(
pEntry
,
nPos
);
aLbGradients
.
Modify
(
pEntry
,
nPos
);
m_pLbGradients
->
Modify
(
pEntry
,
nPos
);
aLbGradients
.
SelectEntryPos
(
nPos
);
m_pLbGradients
->
SelectEntryPos
(
nPos
);
*
pnGradientListState
|=
CT_MODIFIED
;
}
...
...
@@ -589,7 +586,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl)
IMPL_LINK_NOARG
(
SvxGradientTabPage
,
ClickDeleteHdl_Impl
)
{
sal_uInt16
nPos
=
aLbGradients
.
GetSelectEntryPos
();
sal_uInt16
nPos
=
m_pLbGradients
->
GetSelectEntryPos
();
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
{
...
...
@@ -599,10 +596,10 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl)
if
(
aQueryBox
.
Execute
()
==
RET_YES
)
{
delete
pGradientList
->
Remove
(
nPos
);
aLbGradients
.
RemoveEntry
(
nPos
);
aLbGradients
.
SelectEntryPos
(
0
);
m_pLbGradients
->
RemoveEntry
(
nPos
);
m_pLbGradients
->
SelectEntryPos
(
0
);
aCtlPreview
.
Invalidate
();
m_pCtlPreview
->
Invalidate
();
ChangeGradientHdl_Impl
(
this
);
...
...
@@ -612,9 +609,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl)
// determine button state
if
(
!
pGradientList
->
Count
()
)
{
aBtnModify
.
Disable
();
aBtnDelete
.
Disable
();
aBtnSave
.
Disable
();
m_pBtnModify
->
Disable
();
m_pBtnDelete
->
Disable
();
m_pBtnSave
->
Disable
();
}
return
0L
;
}
...
...
@@ -666,8 +663,8 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl)
(
(
SvxAreaTabDialog
*
)
GetParentDialog
()
)
->
SetNewGradientList
(
pGradientList
);
aLbGradients
.
Clear
();
aLbGradients
.
Fill
(
pGradientList
);
m_pLbGradients
->
Clear
();
m_pLbGradients
->
Fill
(
pGradientList
);
Reset
(
rOutAttrs
);
pGradientList
->
SetName
(
aURL
.
getName
()
);
...
...
@@ -701,15 +698,15 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl)
// determine button state
if
(
pGradientList
->
Count
()
)
{
aBtnModify
.
Enable
();
aBtnDelete
.
Enable
();
aBtnSave
.
Enable
();
m_pBtnModify
->
Enable
();
m_pBtnDelete
->
Enable
();
m_pBtnSave
->
Enable
();
}
else
{
aBtnModify
.
Disable
();
aBtnDelete
.
Disable
();
aBtnSave
.
Disable
();
m_pBtnModify
->
Disable
();
m_pBtnDelete
->
Disable
();
m_pBtnSave
->
Disable
();
}
return
0L
;
}
...
...
@@ -779,7 +776,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickSaveHdl_Impl)
IMPL_LINK_NOARG
(
SvxGradientTabPage
,
ChangeGradientHdl_Impl
)
{
XGradient
*
pGradient
=
NULL
;
int
nPos
=
aLbGradients
.
GetSelectEntryPos
();
int
nPos
=
m_pLbGradients
->
GetSelectEntryPos
();
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
pGradient
=
new
XGradient
(
(
(
XGradientEntry
*
)
pGradientList
->
GetGradient
(
nPos
)
)
->
GetGradient
()
);
...
...
@@ -796,8 +793,8 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ChangeGradientHdl_Impl)
}
if
(
!
pGradient
)
{
aLbGradients
.
SelectEntryPos
(
0
);
nPos
=
aLbGradients
.
GetSelectEntryPos
();
m_pLbGradients
->
SelectEntryPos
(
0
);
nPos
=
m_pLbGradients
->
GetSelectEntryPos
();
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
pGradient
=
new
XGradient
(
(
(
XGradientEntry
*
)
pGradientList
->
GetGradient
(
nPos
)
)
->
GetGradient
()
);
}
...
...
@@ -807,43 +804,43 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ChangeGradientHdl_Impl)
{
XGradientStyle
eXGS
=
pGradient
->
GetGradientStyle
();
aLbGradientType
.
SelectEntryPos
(
m_pLbGradientType
->
SelectEntryPos
(
sal
::
static_int_cast
<
sal_uInt16
>
(
eXGS
)
);
// if the entry is not in the listbox ist,
// colors are added temporarily
aLbColorFrom
.
SetNoSelection
();
aLbColorFrom
.
SelectEntry
(
pGradient
->
GetStartColor
()
);
m_pLbColorFrom
->
SetNoSelection
();
m_pLbColorFrom
->
SelectEntry
(
pGradient
->
GetStartColor
()
);
if
(
aLbColorFrom
.
GetSelectEntryCount
()
==
0
)
if
(
m_pLbColorFrom
->
GetSelectEntryCount
()
==
0
)
{
aLbColorFrom
.
InsertEntry
(
pGradient
->
GetStartColor
(),
m_pLbColorFrom
->
InsertEntry
(
pGradient
->
GetStartColor
(),
String
()
);
aLbColorFrom
.
SelectEntry
(
pGradient
->
GetStartColor
()
);
m_pLbColorFrom
->
SelectEntry
(
pGradient
->
GetStartColor
()
);
}
aLbColorTo
.
SetNoSelection
();
aLbColorTo
.
SelectEntry
(
pGradient
->
GetEndColor
()
);
m_pLbColorTo
->
SetNoSelection
();
m_pLbColorTo
->
SelectEntry
(
pGradient
->
GetEndColor
()
);
if
(
aLbColorTo
.
GetSelectEntryCount
()
==
0
)
if
(
m_pLbColorTo
->
GetSelectEntryCount
()
==
0
)
{
aLbColorTo
.
InsertEntry
(
pGradient
->
GetEndColor
(),
String
()
);
aLbColorTo
.
SelectEntry
(
pGradient
->
GetEndColor
()
);
m_pLbColorTo
->
InsertEntry
(
pGradient
->
GetEndColor
(),
String
()
);
m_pLbColorTo
->
SelectEntry
(
pGradient
->
GetEndColor
()
);
}
aMtrAngle
.
SetValue
(
pGradient
->
GetAngle
()
/
10
);
// should be changed in resource
aMtrBorder
.
SetValue
(
pGradient
->
GetBorder
()
);
aMtrCenterX
.
SetValue
(
pGradient
->
GetXOffset
()
);
aMtrCenterY
.
SetValue
(
pGradient
->
GetYOffset
()
);
aMtrColorFrom
.
SetValue
(
pGradient
->
GetStartIntens
()
);
aMtrColorTo
.
SetValue
(
pGradient
->
GetEndIntens
()
);
m_pMtrAngle
->
SetValue
(
pGradient
->
GetAngle
()
/
10
);
// should be changed in resource
m_pMtrBorder
->
SetValue
(
pGradient
->
GetBorder
()
);
m_pMtrCenterX
->
SetValue
(
pGradient
->
GetXOffset
()
);
m_pMtrCenterY
->
SetValue
(
pGradient
->
GetYOffset
()
);
m_pMtrColorFrom
->
SetValue
(
pGradient
->
GetStartIntens
()
);
m_pMtrColorTo
->
SetValue
(
pGradient
->
GetEndIntens
()
);
// disable/enable controls
SetControlState_Impl
(
eXGS
);
// fill ItemSet and pass it on to aCtlPreview
rXFSet
.
Put
(
XFillGradientItem
(
String
(),
*
pGradient
)
);
aCtlPreview
.
SetAttributes
(
aXFillAttr
.
GetItemSet
()
);
m_pCtlPreview
->
SetAttributes
(
aXFillAttr
.
GetItemSet
()
);
aCtlPreview
.
Invalidate
();
m_pCtlPreview
->
Invalidate
();
delete
pGradient
;
}
return
0L
;
...
...
@@ -857,40 +854,40 @@ void SvxGradientTabPage::SetControlState_Impl( XGradientStyle eXGS )
{
case
XGRAD_LINEAR
:
case
XGRAD_AXIAL
:
aFtCenterX
.
Disable
();
aMtrCenterX
.
Disable
();
aFtCenterY
.
Disable
();
aMtrCenterY
.
Disable
();
aFtAngle
.
Enable
();
aMtrAngle
.
Enable
();
m_pFtCenterX
->
Disable
();
m_pMtrCenterX
->
Disable
();
m_pFtCenterY
->
Disable
();
m_pMtrCenterY
->
Disable
();
m_pFtAngle
->
Enable
();
m_pMtrAngle
->
Enable
();
break
;
case
XGRAD_RADIAL
:
aFtCenterX
.
Enable
();
aMtrCenterX
.
Enable
();
aFtCenterY
.
Enable
();
aMtrCenterY
.
Enable
();
aFtAngle
.
Disable
();
aMtrAngle
.
Disable
();
m_pFtCenterX
->
Enable
();
m_pMtrCenterX
->
Enable
();
m_pFtCenterY
->
Enable
();
m_pMtrCenterY
->
Enable
();
m_pFtAngle
->
Disable
();
m_pMtrAngle
->
Disable
();
break
;
case
XGRAD_ELLIPTICAL
:
aFtCenterX
.
Enable
();
aMtrCenterX
.
Enable
();
aFtCenterY
.
Enable
();
aMtrCenterY
.
Enable
();
aFtAngle
.
Enable
();
aMtrAngle
.
Enable
();
m_pFtCenterX
->
Enable
();
m_pMtrCenterX
->
Enable
();
m_pFtCenterY
->
Enable
();
m_pMtrCenterY
->
Enable
();
m_pFtAngle
->
Enable
();
m_pMtrAngle
->
Enable
();
break
;
case
XGRAD_SQUARE
:
case
XGRAD_RECT
:
aFtCenterX
.
Enable
();
aMtrCenterX
.
Enable
();
aFtCenterY
.
Enable
();
aMtrCenterY
.
Enable
();
aFtAngle
.
Enable
();
aMtrAngle
.
Enable
();
m_pFtCenterX
->
Enable
();
m_pMtrCenterX
->
Enable
();
m_pFtCenterY
->
Enable
();
m_pMtrCenterY
->
Enable
();
m_pFtAngle
->
Enable
();
m_pMtrAngle
->
Enable
();
break
;
}
}
...
...
cui/uiconfig/ui/gradientpage.ui
0 → 100644
Dosyayı görüntüle @
e97e62a4
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object
class=
"GtkAdjustment"
id=
"angleadjustment"
>
<property
name=
"upper"
>
359
</property>
<property
name=
"step_increment"
>
15
</property>
</object>
<object
class=
"GtkBox"
id=
"GradientPage"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
<property
name=
"orientation"
>
vertical
</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=
"vexpand"
>
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=
"vexpand"
>
True
</property>
<property
name=
"top_padding"
>
6
</property>
<property
name=
"left_padding"
>
12
</property>
<child>
<object
class=
"GtkBox"
id=
"box2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
<property
name=
"spacing"
>
12
</property>
<child>
<object
class=
"GtkGrid"
id=
"grid2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"vexpand"
>
True
</property>
<property
name=
"row_spacing"
>
6
</property>
<property
name=
"column_spacing"
>
6
</property>
<child>
<object
class=
"GtkLabel"
id=
"typeft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
_Type
</property>
<property
name=
"use_underline"
>
True
</property>
</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>
<child>
<object
class=
"GtkComboBoxText"
id=
"gradienttypelb"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"entry_text_column"
>
0
</property>
<property
name=
"id_column"
>
1
</property>
<items>
<item
translatable=
"yes"
>
Linear
</item>
<item
translatable=
"yes"
>
Axial
</item>
<item
translatable=
"yes"
>
Radial
</item>
<item
translatable=
"yes"
>
Ellipsoid
</item>
<item
translatable=
"yes"
>
Quadratic
</item>
<item
translatable=
"yes"
>
Square
</item>
</items>
</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=
"GtkLabel"
id=
"centerxft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Center _X
</property>
<property
name=
"use_underline"
>
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=
"GtkSpinButton"
id=
"centerxmtr:%"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"adjustment"
>
percentadjustment
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"centeryft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"yalign"
>
0.43999999761581421
</property>
<property
name=
"label"
translatable=
"yes"
>
Center _Y
</property>
<property
name=
"use_underline"
>
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=
"GtkSpinButton"
id=
"centerymtr:%"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"adjustment"
>
percentadjustment
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"angleft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"yalign"
>
0.43999999761581421
</property>
<property
name=
"label"
translatable=
"yes"
>
A_ngle
</property>
<property
name=
"use_underline"
>
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=
"GtkSpinButton"
id=
"anglemtr: degrees"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"adjustment"
>
angleadjustment
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
3
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"borderft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"yalign"
>
0.43999999761581421
</property>
<property
name=
"label"
translatable=
"yes"
>
_Border
</property>
<property
name=
"use_underline"
>
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=
"GtkSpinButton"
id=
"bordermtr:%"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"adjustment"
>
percentadjustment
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
4
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"colorfromft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
_From
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
5
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"svxlo:ColorLB"
id=
"colorfromlb"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"entry_text_column"
>
0
</property>
<property
name=
"id_column"
>
1
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
5
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkSpinButton"
id=
"colorfrommtr:%"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"adjustment"
>
percentadjustment
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
6
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"colortoft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
_To
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
7
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"svxlo:ColorLB"
id=
"colortolb"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"entry_text_column"
>
0
</property>
<property
name=
"id_column"
>
1
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
7
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkSpinButton"
id=
"colortomtr:%"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"adjustment"
>
percentadjustment
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
8
</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>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object
class=
"GtkLabel"
id=
"anglemtrdegrees"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
degrees
</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>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkGrid"
id=
"grid1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"halign"
>
center
</property>
<property
name=
"valign"
>
start
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"row_spacing"
>
6
</property>
<property
name=
"column_spacing"
>
6
</property>
<child>
<object
class=
"svxlo:GradientLB"
id=
"gradientslb"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"entry_text_column"
>
0
</property>
<property
name=
"id_column"
>
1
</property>
</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>
<child>
<object
class=
"svxlo:SvxXRectPreview"
id=
"previewctl"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
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>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkButtonBox"
id=
"buttonbox1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
6
</property>
<property
name=
"layout_style"
>
start
</property>
<child>
<object
class=
"GtkButton"
id=
"add"
>
<property
name=
"label"
>
gtk-add
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"modify"
>
<property
name=
"label"
translatable=
"yes"
>
_Modify
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"delete"
>
<property
name=
"label"
>
gtk-delete
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
3
</property>
</packing>
</child>
<child>
<object
class=
"GtkGrid"
id=
"grid4"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"row_spacing"
>
6
</property>
<property
name=
"column_spacing"
>
6
</property>
<child>
<object
class=
"GtkButton"
id=
"load"
>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"has_tooltip"
>
True
</property>
<property
name=
"tooltip_markup"
translatable=
"yes"
>
Load Gradient List
</property>
<property
name=
"tooltip_text"
translatable=
"yes"
>
Load Gradient List
</property>
<property
name=
"halign"
>
center
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"image"
>
image1
</property>
</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>
<child>
<object
class=
"GtkButton"
id=
"save"
>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"has_tooltip"
>
True
</property>
<property
name=
"tooltip_markup"
translatable=
"yes"
>
Save Gradient List
</property>
<property
name=
"tooltip_text"
translatable=
"yes"
>
Save Gradient List
</property>
<property
name=
"halign"
>
center
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"image"
>
image2
</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>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
5
</property>
<property
name=
"secondary"
>
True
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child
type=
"label"
>
<object
class=
"GtkLabel"
id=
"propfl"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Properties
</property>
<attributes>
<attribute
name=
"weight"
value=
"bold"
/>
</attributes>
</object>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
</object>
<object
class=
"GtkImage"
id=
"image1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"pixbuf"
>
res/sc05501.png
</property>
</object>
<object
class=
"GtkImage"
id=
"image2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"pixbuf"
>
res/sc05502.png
</property>
</object>
<object
class=
"GtkAdjustment"
id=
"percentadjustment"
>
<property
name=
"upper"
>
100
</property>
<property
name=
"step_increment"
>
5
</property>
</object>
</interface>
svx/inc/svx/dlgctrl.hxx
Dosyayı görüntüle @
e97e62a4
...
...
@@ -237,6 +237,7 @@ class SVX_DLLPUBLIC GradientLB : public ListBox
sal_Bool
mbUserDraw
;
public
:
GradientLB
(
Window
*
pParent
,
ResId
Id
,
sal_Bool
bUserDraw
=
sal_True
);
GradientLB
(
Window
*
pParent
,
WinBits
aWB
,
sal_Bool
bUserDraw
=
sal_True
);
virtual
void
Fill
(
const
XGradientListRef
&
pList
);
virtual
void
UserDraw
(
const
UserDrawEvent
&
rUDEvt
);
...
...
svx/source/dialog/dlgctrl.cxx
Dosyayı görüntüle @
e97e62a4
...
...
@@ -1073,6 +1073,21 @@ GradientLB::GradientLB( Window* pParent, ResId Id, sal_Bool bUserDraw /*= sal_Tr
EnableUserDraw
(
mbUserDraw
);
}
GradientLB
::
GradientLB
(
Window
*
pParent
,
WinBits
nWinStyle
,
sal_Bool
bUserDraw
/*= sal_True*/
)
:
ListBox
(
pParent
,
nWinStyle
),
mpList
(
NULL
),
mbUserDraw
(
bUserDraw
)
{
EnableUserDraw
(
mbUserDraw
);
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
Window
*
SAL_CALL
makeGradientLB
(
Window
*
pParent
,
VclBuilder
::
stringmap
&
)
{
GradientLB
*
pListBox
=
new
GradientLB
(
pParent
,
WB_LEFT
|
WB_VCENTER
|
WB_3DLOOK
|
WB_SIMPLEMODE
);
pListBox
->
EnableAutoSize
(
true
);
return
pListBox
;
}
void
GradientLB
::
Fill
(
const
XGradientListRef
&
pList
)
{
mpList
=
pList
;
...
...
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