Kaydet (Commit) ad0c6359 authored tarafından Olivier Hallot's avatar Olivier Hallot Kaydeden (comit) Caolán McNamara

Convert Area Tab Page to widget UI

Change-Id: I543e575bb2e081e4c0b60c2a094c379b01a1894e
Reviewed-on: https://gerrit.libreoffice.org/5005Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 40dd3d6e
......@@ -13,6 +13,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/aboutdialog \
cui/uiconfig/ui/acorexceptpage \
cui/uiconfig/ui/acorreplacepage \
cui/uiconfig/ui/areatabpage \
cui/uiconfig/ui/asiantypography \
cui/uiconfig/ui/autocorrectdialog \
cui/uiconfig/ui/backgroundpage \
......
......@@ -179,43 +179,48 @@ class SvxAreaTabPage : public SvxTabPage
using TabPage::DeactivatePage;
private:
FixedLine aFlProp;
ListBox aTypeLB;
ListBox* m_pTypeLB;
ColorLB aLbColor;
GradientLB aLbGradient;
HatchingLB aLbHatching;
BitmapLB aLbBitmap;
SvxXRectPreview aCtlBitmapPreview;
TriStateBox aTsbStepCount;
FixedLine aFlStepCount;
NumericField aNumFldStepCount;
CheckBox aCbxHatchBckgrd;
ColorLB aLbHatchBckgrdColor;
FixedLine aFlSize;
TriStateBox aTsbOriginal;
TriStateBox aTsbScale;
FixedText aFtXSize;
MetricField aMtrFldXSize;
FixedText aFtYSize;
MetricField aMtrFldYSize;
FixedLine aFlPosition;
SvxRectCtl aCtlPosition;
FixedText aFtXOffset;
MetricField aMtrFldXOffset;
FixedText aFtYOffset;
MetricField aMtrFldYOffset;
TriStateBox aTsbTile;
TriStateBox aTsbStretch;
FixedLine aFlOffset;
RadioButton aRbtRow;
RadioButton aRbtColumn;
MetricField aMtrFldOffset;
SvxXRectPreview aCtlXRectPreview;
VclBox* m_pFillLB;
ColorLB* m_pLbColor;
GradientLB* m_pLbGradient;
HatchingLB* m_pLbHatching;
BitmapLB* m_pLbBitmap;
SvxXRectPreview* m_pCtlBitmapPreview;
TriStateBox* m_pTsbStepCount;
VclFrame* m_pFlStepCount;
NumericField* m_pNumFldStepCount;
VclFrame* m_pFlHatchBckgrd;
CheckBox* m_pCbxHatchBckgrd;
ColorLB* m_pLbHatchBckgrdColor;
VclBox* m_pBxBitmap;
VclFrame* m_pFlSize;
TriStateBox* m_pTsbOriginal;
TriStateBox* m_pTsbScale;
VclGrid* m_pGridX_Y;
FixedText* m_pFtXSize;
MetricField* m_pMtrFldXSize;
FixedText* m_pFtYSize;
MetricField* m_pMtrFldYSize;
VclFrame* m_pFlPosition;
SvxRectCtl* m_pCtlPosition;
VclGrid* m_pGridOffset;
MetricField* m_pMtrFldXOffset;
MetricField* m_pMtrFldYOffset;
VclBox* m_pBxTile;
TriStateBox* m_pTsbTile;
TriStateBox* m_pTsbStretch;
VclFrame* m_pFlOffset;
RadioButton* m_pRbtRow;
RadioButton* m_pRbtColumn;
MetricField* m_pMtrFldOffset;
SvxXRectPreview* m_pCtlXRectPreview;
const SfxItemSet& rOutAttrs;
RECT_POINT eRP;
......
......@@ -246,7 +246,6 @@
#define HID_MEASURE_CTL_PREVIEW "CUI_HID_MEASURE_CTL_PREVIEW"
#define HID_SVXPAGE_SWPOSSIZE "CUI_HID_SVXPAGE_SWPOSSIZE"
#define HID_AREA_AREA "CUI_HID_AREA_AREA"
#define HID_AREA_SHADOW "CUI_HID_AREA_SHADOW"
#define HID_AREA_BITMAP "CUI_HID_AREA_BITMAP"
#define HID_TPSHADOW_CTRL "CUI_HID_TPSHADOW_CTRL"
......
......@@ -27,10 +27,6 @@
#define MTR_FLD_DISTANCE 1
#define TSB_INVISIBLE 1
#define TSB_SHOW_SHADOW 2
#define TSB_STEPCOUNT 3
#define TSB_TILE 4
#define TSB_STRETCH 5
#define TSB_ORIGINAL 6
#define LB_COLOR 1
#define LB_GRADIENT 2
......@@ -57,9 +53,6 @@
#define LB_SHADOW_COLOR 10
#define FL_PROP 2
#define FL_SIZE 3
#define FL_POSITION 4
#define FL_OFFSET 5
#define FL_STEPCOUNT 7
#define BTN_WORK_ON 2
#define CTL_COLORTABLE 3
......@@ -77,27 +70,10 @@
#define MTR_FLD_3 3
#define MTR_FLD_4 4
#define FT_TABLE_NAME 7
#define MTR_FLD_X_SIZE 4
#define MTR_FLD_Y_SIZE 5
#define TSB_SCALE 1
#define FT_X_OFFSET 1
#define FT_Y_OFFSET 2
#define MTR_FLD_X_OFFSET 1
#define MTR_FLD_Y_OFFSET 2
#define LB_AREA_TYPE 19
#define RBT_ROW 6
#define RBT_COLUMN 7
#define MTR_FLD_OFFSET 3
#define FT_TRANSPARENT 9
#define FT_X_SIZE 10
#define FT_Y_SIZE 11
#define FT_BITMAPS_HIDDEN 12
#define MTR_SHADOW_TRANSPARENT 11
// Hatch-Background on Area-TabPage
#define CB_HATCHBCKGRD 21
#define LB_HATCHBCKGRDCOLOR 22
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -28,327 +28,6 @@
#define TRANS_GRAD_OFFSET_X 6
#define TRANS_GRAD_OFFSET_Y 64
// ------------------------------------------------------
TabPage RID_SVXPAGE_AREA
{
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
HelpID = HID_AREA_AREA ;
Hide = TRUE ;
Text [ en-US ] = "Area" ;
FixedLine FL_PROP
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 120, 8 ) ;
Text [ en-US ] = "Fill";
};
ListBox LB_AREA_TYPE
{
HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_AREA_TYPE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 108 , 60 ) ;
DropDown = TRUE;
Border = TRUE;
StringList [ en-US ] =
{
< "None" ; Default ; > ;
< "Color" ; Default ; > ;
< "Gradient" ; Default ; > ;
< "Hatching" ; Default ; > ;
< "Bitmap" ; Default ; > ;
};
};
ListBox LB_COLOR
{
HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_COLOR";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 108 , 103 ) ;
TabStop = TRUE ;
};
ListBox LB_GRADIENT
{
HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_GRADIENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 108 , 103 ) ;
TabStop = TRUE ;
};
ListBox LB_HATCHING
{
HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_HATCHING";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 108 , 103 ) ;
TabStop = TRUE ;
};
ListBox LB_BITMAP
{
HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_BITMAP";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 108 , 103 ) ;
TabStop = TRUE ;
};
// ---------- preview ----------
Control CTL_COLOR_PREVIEW
{
Border = TRUE;
Pos = MAP_APPFONT ( 12 , 137 ) ;
Size = MAP_APPFONT ( 110 , 42 ) ;
};
Control CTL_BITMAP_PREVIEW
{
Border = TRUE;
Pos = MAP_APPFONT ( 12 , 137 ) ;
Size = MAP_APPFONT ( 110 , 42 ) ;
Hide = TRUE ;
};
// ---------- for gradients ----------
FixedLine FL_STEPCOUNT
{
Pos = MAP_APPFONT ( 132 , 3 ) ;
Size = MAP_APPFONT ( 122 , 8 ) ;
Text [ en-US ] = "Increments" ;
};
TriStateBox TSB_STEPCOUNT
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_STEPCOUNT";
Pos = MAP_APPFONT ( 138 , 15 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "A~utomatic" ;
};
NumericField NUM_FLD_STEPCOUNT
{
HelpID = "cui:NumericField:RID_SVXPAGE_AREA:NUM_FLD_STEPCOUNT";
Border = TRUE ;
Pos = MAP_APPFONT ( 208 , 14 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 3 ;
First = 3 ;
Maximum = 256 ;
Last = 256 ;
StrictFormat = TRUE ;
};
// ---------- for hatches ----------
CheckBox CB_HATCHBCKGRD
{
HelpID = "cui:CheckBox:RID_SVXPAGE_AREA:CB_HATCHBCKGRD";
Pos = MAP_APPFONT ( 132 , 3 ) ;
Size = MAP_APPFONT ( 122 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Background color" ;
};
ListBox LB_HATCHBCKGRDCOLOR
{
HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_HATCHBCKGRDCOLOR";
Border = TRUE ;
Pos = MAP_APPFONT ( 141 , 16 ) ;
Size = MAP_APPFONT ( 70 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
DDExtraWidth = TRUE ;
};
// ---------- for bitmaps ----------
FixedLine FL_SIZE
{
Pos = MAP_APPFONT ( 132 , 3 ) ;
Size = MAP_APPFONT ( 122 , 8 ) ;
Text [ en-US ] = "Size" ;
};
TriStateBox TSB_ORIGINAL
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_ORIGINAL";
Pos = MAP_APPFONT ( 138 , 15 ) ;
Size = MAP_APPFONT ( 48 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Original" ;
};
TriStateBox TSB_SCALE
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_SCALE";
Pos = MAP_APPFONT ( 138 , 30 ) ;
Size = MAP_APPFONT ( 48 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Re~lative" ;
};
FixedText FT_X_SIZE
{
Pos = MAP_APPFONT ( 187 , 15 ) ;
Size = MAP_APPFONT ( 24 , 8 ) ;
Text [ en-US ] = "Wi~dth" ;
};
MetricField MTR_FLD_X_SIZE
{
HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_X_SIZE";
Border = TRUE ;
Pos = MAP_APPFONT ( 212 , 14 ) ;
Size = MAP_APPFONT ( 36 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
StrictFormat = TRUE ;
DecimalDigits = 2 ;
Unit = FUNIT_MM ;
CustomUnitText = "%" ;
Minimum = 5 ;
Maximum = 100 ;
First = 5 ;
Last = 100 ;
SpinSize = 5 ;
};
FixedText FT_Y_SIZE
{
Pos = MAP_APPFONT ( 187 , 31 ) ;
Size = MAP_APPFONT ( 24 , 8 ) ;
Text [ en-US ] = "H~eight" ;
};
MetricField MTR_FLD_Y_SIZE
{
HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_Y_SIZE";
Border = TRUE ;
Pos = MAP_APPFONT ( 212 , 29 ) ;
Size = MAP_APPFONT ( 36 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
StrictFormat = TRUE ;
DecimalDigits = 2 ;
Unit = FUNIT_MM ;
CustomUnitText = "%" ;
Minimum = 5 ;
Maximum = 100 ;
First = 5 ;
Last = 100 ;
SpinSize = 5 ;
SpinSize = 5 ;
};
FixedLine FL_POSITION
{
Pos = MAP_APPFONT ( 132 , 47 ) ;
Size = MAP_APPFONT ( 122 , 8 ) ;
Text [ en-US ] = "Position" ;
};
Control CTL_POSITION
{
Border = TRUE ;
Pos = MAP_APPFONT ( 138 , 57 ) ;
Size = MAP_APPFONT ( 40 , 27 ) ;
TabStop = TRUE ;
};
FixedText FT_X_OFFSET
{
Pos = MAP_APPFONT ( 138 , 89 ) ;
Size = MAP_APPFONT ( 39 , 8 ) ;
Text [ en-US ] = "~X Offset" ;
};
FixedText FT_Y_OFFSET
{
Pos = MAP_APPFONT ( 139 , 104 ) ;
Size = MAP_APPFONT ( 78 , 8 ) ;
Text [ en-US ] = "~Y Offset" ;
};
MetricField MTR_FLD_X_OFFSET
{
HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_X_OFFSET";
Border = TRUE ;
Pos = MAP_APPFONT ( 219 , 87 ) ;
Size = MAP_APPFONT ( 29 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Maximum = 100 ;
Last = 100 ;
SpinSize = 5 ;
};
MetricField MTR_FLD_Y_OFFSET
{
HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_Y_OFFSET";
Border = TRUE ;
Pos = MAP_APPFONT ( 219 , 102 ) ;
Size = MAP_APPFONT ( 29 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
TriStateBox TSB_TILE
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_TILE";
Pos = MAP_APPFONT ( 138 , 117 ) ;
Size = MAP_APPFONT ( 54 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Tile" ;
};
TriStateBox TSB_STRETCH
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_STRETCH";
Pos = MAP_APPFONT ( 194 , 117 ) ;
Size = MAP_APPFONT ( 54 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Auto~Fit" ;
};
FixedLine FL_OFFSET
{
Pos = MAP_APPFONT ( 132 , 133 ) ;
Size = MAP_APPFONT ( 122 , 8 ) ;
Text [ en-US ] = "Offset" ;
};
RadioButton RBT_ROW
{
HelpID = "cui:RadioButton:RID_SVXPAGE_AREA:RBT_ROW";
Pos = MAP_APPFONT ( 138 , 144 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
Text [ en-US ] = "Ro~w" ;
};
RadioButton RBT_COLUMN
{
HelpID = "cui:RadioButton:RID_SVXPAGE_AREA:RBT_COLUMN";
Pos = MAP_APPFONT ( 138 , 158 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
Text [ en-US ] = "Colu~mn" ;
};
MetricField MTR_FLD_OFFSET
{
HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_OFFSET";
Border = TRUE ;
Pos = MAP_APPFONT ( 219 , 157 ) ;
Size = MAP_APPFONT ( 29 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
};
// ------------------------------------------------------
TabPage RID_SVXPAGE_SHADOW
{
......
This diff is collapsed.
This diff is collapsed.
......@@ -71,7 +71,11 @@
generic-name="Color ListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
<properties>
<property id="dropdown" default="True" common="True"/>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
......@@ -79,15 +83,55 @@
generic-name="Other Color ListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
<properties>
<property id="dropdown" default="True" common="True"/>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class title="Gradient ListBox" name="svxlo-GradientLB"
generic-name="GradientListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
<properties>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class title="Hatching ListBox" name="svxlo-HatchingLB"
generic-name="HatchingListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
<properties>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class title="Bitmap ListBox" name="svxlo-BitmapLB"
generic-name="BitmapListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
<properties>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class title="Font Name ListBox" name="svtlo-FontNameBox"
generic-name="Font name ListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
<properties>
<property id="dropdown" default="True" common="True"/>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
......@@ -99,7 +143,11 @@
generic-name="Font Size ListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
<properties>
<property id="dropdown" default="True" common="True"/>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
......@@ -107,7 +155,11 @@
generic-name="Line ListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
<properties>
<property id="dropdown" default="True" common="True"/>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
......@@ -119,7 +171,11 @@
generic-name="FontStyleBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox">
<properties>
<property id="dropdown" default="True" common="True"/>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
......@@ -228,12 +284,6 @@
<glade-widget-class title="Numbering Type ListBox" name="swlo-SwNumberingTypeListBox"
generic-name="NumberingTypeListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
<glade-widget-class title="Gradiant ListBox" name="svxlo-GradientLB"
generic-name="GradiantListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
<glade-widget-class title="Hatching ListBox" name="svxlo-HatchingLB"
generic-name="HatchingListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
<glade-widget-class title="Category ComboBox" name="swuilo-CategoryBox"
generic-name="CategoryComboBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
......@@ -281,7 +331,7 @@
icon-name="widget-gtk-spinbutton"/>
<glade-widget-class title="Relative Numeric Field" name="svxlo-SvxRelativeField"
generic-name="Relative Numeric Field" parent="GtkSpinButton"
icon-name="widget-gtk-spinbutton"/>
icon-name="widget-gtk-spinbutton"/>
<glade-widget-class title="SvtURLBox" name="svtlo-SvtURLBox"
generic-name="URLBox" parent="VclComboBoxText"
......
......@@ -252,6 +252,7 @@ class SVX_DLLPUBLIC BitmapLB : public ListBox
{
public:
explicit BitmapLB(Window* pParent, ResId Id);
explicit BitmapLB(Window* pParent, WinBits aWB);
virtual void Fill(const XBitmapListRef &pList);
......
......@@ -1228,6 +1228,24 @@ BitmapLB::BitmapLB(Window* pParent, ResId Id)
{
SetEdgeBlending(true);
}
BitmapLB::BitmapLB( Window* pParent, WinBits aWB)
: ListBox( pParent, aWB ),
maBitmapEx(),
mpList(NULL)
{
SetEdgeBlending(true);
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeBitmapLB(Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
BitmapLB *pListBox = new BitmapLB(pParent, nWinStyle);
pListBox->EnableAutoSize(true);
return pListBox;
}
/************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment