convert posterize dialog to .ui
Change-Id: If21e85cd0802c9f1b2bd244e6fb3715bef395e0a
This commit is contained in:
@@ -123,6 +123,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
|
|||||||
cui/uiconfig/ui/positionpage \
|
cui/uiconfig/ui/positionpage \
|
||||||
cui/uiconfig/ui/positionsizedialog \
|
cui/uiconfig/ui/positionsizedialog \
|
||||||
cui/uiconfig/ui/possizetabpage \
|
cui/uiconfig/ui/possizetabpage \
|
||||||
|
cui/uiconfig/ui/posterdialog \
|
||||||
cui/uiconfig/ui/querychangelineenddialog \
|
cui/uiconfig/ui/querychangelineenddialog \
|
||||||
cui/uiconfig/ui/querydeletebitmapdialog \
|
cui/uiconfig/ui/querydeletebitmapdialog \
|
||||||
cui/uiconfig/ui/querydeletechartcolordialog \
|
cui/uiconfig/ui/querydeletechartcolordialog \
|
||||||
|
@@ -516,24 +516,17 @@ Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic,
|
|||||||
// - GraphicFilterPoster -
|
// - GraphicFilterPoster -
|
||||||
// -----------------------
|
// -----------------------
|
||||||
|
|
||||||
GraphicFilterPoster::GraphicFilterPoster( Window* pParent, const Graphic& rGraphic,
|
GraphicFilterPoster::GraphicFilterPoster(Window* pParent, const Graphic& rGraphic,
|
||||||
sal_uInt16 nPosterCount ) :
|
sal_uInt16 nPosterCount)
|
||||||
oldGraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_POSTER ), rGraphic ),
|
: GraphicFilterDialog(pParent, "PosterDialog",
|
||||||
maFtPoster ( this, CUI_RES( DLG_FILTERPOSTER_FT_POSTER ) ),
|
"cui/ui/posterdialog.ui", rGraphic)
|
||||||
maNumPoster ( this, CUI_RES( DLG_FILTERPOSTER_NUM_POSTER ) )
|
|
||||||
{
|
{
|
||||||
FreeResource();
|
get(mpNumPoster, "value");
|
||||||
|
|
||||||
maNumPoster.SetFirst( 2 );
|
mpNumPoster->SetFirst( 2 );
|
||||||
maNumPoster.SetLast( rGraphic.GetBitmapEx().GetBitCount() );
|
mpNumPoster->SetLast( rGraphic.GetBitmapEx().GetBitCount() );
|
||||||
maNumPoster.SetValue( nPosterCount );
|
mpNumPoster->SetValue( nPosterCount );
|
||||||
maNumPoster.SetModifyHdl( GetModifyHdl() );
|
mpNumPoster->SetModifyHdl( GetModifyHdl() );
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
GraphicFilterPoster::~GraphicFilterPoster()
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@@ -40,13 +40,6 @@
|
|||||||
#define DLG_FILTERMOSAIC_MTR_HEIGHT 4
|
#define DLG_FILTERMOSAIC_MTR_HEIGHT 4
|
||||||
#define DLG_FILTERMOSAIC_CBX_EDGES 5
|
#define DLG_FILTERMOSAIC_CBX_EDGES 5
|
||||||
|
|
||||||
// --------------------
|
|
||||||
// - DLG_FILTERPOSTER -
|
|
||||||
// --------------------
|
|
||||||
|
|
||||||
#define DLG_FILTERPOSTER_FT_POSTER 1
|
|
||||||
#define DLG_FILTERPOSTER_NUM_POSTER 2
|
|
||||||
|
|
||||||
// --------------------
|
// --------------------
|
||||||
// - DLG_FILTEREMBOSS -
|
// - DLG_FILTEREMBOSS -
|
||||||
// --------------------
|
// --------------------
|
||||||
|
@@ -130,76 +130,6 @@ ModalDialog RID_SVX_GRFFILTER_DLG_MOSAIC
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// --------------------
|
|
||||||
// - DLG_FILTERPOSTER -
|
|
||||||
// --------------------
|
|
||||||
|
|
||||||
ModalDialog RID_SVX_GRFFILTER_DLG_POSTER
|
|
||||||
{
|
|
||||||
HelpID = CMD_SID_GRFFILTER_POSTER;
|
|
||||||
OutputSize = TRUE ;
|
|
||||||
Moveable = TRUE ;
|
|
||||||
SVLook = TRUE ;
|
|
||||||
Size = MAP_APPFONT ( 250, 100 ) ;
|
|
||||||
|
|
||||||
Text [ en-US ] = "Posterize" ;
|
|
||||||
|
|
||||||
FixedLine FL_PARAMETER
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 6 , 3 ) ;
|
|
||||||
Size = MAP_APPFONT ( 182, RSC_CD_FIXEDLINE_HEIGHT ) ;
|
|
||||||
Text [ en-US ] = "Parameters";
|
|
||||||
};
|
|
||||||
Control CTL_PREVIEW
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 104 , 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP ) ;
|
|
||||||
Size = MAP_APPFONT ( 81, 73 ) ;
|
|
||||||
};
|
|
||||||
#define MA_Y10 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP
|
|
||||||
FixedText DLG_FILTERPOSTER_FT_POSTER
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 12 , MA_Y10 ) ;
|
|
||||||
Size = MAP_APPFONT ( 77 , 10 ) ;
|
|
||||||
Text [ en-US ] = "Poster colors" ;
|
|
||||||
};
|
|
||||||
#define MA_Y11 MA_Y10 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y
|
|
||||||
NumericField DLG_FILTERPOSTER_NUM_POSTER
|
|
||||||
{
|
|
||||||
HelpID = "cui:NumericField:RID_SVX_GRFFILTER_DLG_POSTER:DLG_FILTERPOSTER_NUM_POSTER";
|
|
||||||
Border = TRUE ;
|
|
||||||
Pos = MAP_APPFONT ( 12 , MA_Y11 ) ;
|
|
||||||
Size = MAP_APPFONT ( 35 , 12 ) ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
Repeat = TRUE ;
|
|
||||||
Spin = TRUE ;
|
|
||||||
Minimum = 2 ;
|
|
||||||
Maximum = 64 ;
|
|
||||||
StrictFormat = TRUE ;
|
|
||||||
First = 2 ;
|
|
||||||
Last = 64 ;
|
|
||||||
SpinSize = 1 ;
|
|
||||||
};
|
|
||||||
OKButton BTN_OK
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 194, 6 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50, 14 ) ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
DefButton = TRUE ;
|
|
||||||
};
|
|
||||||
CancelButton BTN_CANCEL
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 194, 23 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50, 14 ) ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
};
|
|
||||||
HelpButton BTN_HELP
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 194, 43 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50, 14 ) ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// --------------------
|
// --------------------
|
||||||
// - DLG_FILTEREMBOSS -
|
// - DLG_FILTEREMBOSS -
|
||||||
// --------------------
|
// --------------------
|
||||||
|
@@ -1516,8 +1516,8 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPos
|
|||||||
const Graphic& rGraphic,
|
const Graphic& rGraphic,
|
||||||
sal_uInt16 nCount)
|
sal_uInt16 nCount)
|
||||||
{
|
{
|
||||||
oldGraphicFilterDialog* pDlg = new GraphicFilterPoster( pParent, rGraphic, nCount );
|
GraphicFilterDialog* pDlg = new GraphicFilterPoster( pParent, rGraphic, nCount );
|
||||||
return new oldAbstractGraphicFilterDialog_Impl( pDlg );
|
return new AbstractGraphicFilterDialog_Impl( pDlg );
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSepia (Window* pParent,
|
AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSepia (Window* pParent,
|
||||||
|
@@ -223,21 +223,16 @@ public:
|
|||||||
// - GraphicFilterPoster -
|
// - GraphicFilterPoster -
|
||||||
// -----------------------
|
// -----------------------
|
||||||
|
|
||||||
class GraphicFilterPoster : public oldGraphicFilterDialog
|
class GraphicFilterPoster : public GraphicFilterDialog
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
NumericField* mpNumPoster;
|
||||||
FixedText maFtPoster;
|
|
||||||
NumericField maNumPoster;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
GraphicFilterPoster( Window* pParent, const Graphic& rGraphic,
|
||||||
GraphicFilterPoster( Window* pParent, const Graphic& rGraphic,
|
sal_uInt16 nPosterColorCount );
|
||||||
sal_uInt16 nPosterColorCount );
|
|
||||||
~GraphicFilterPoster();
|
|
||||||
|
|
||||||
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY );
|
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY );
|
||||||
sal_uInt16 GetPosterColorCount() const { return( (sal_uInt16) maNumPoster.GetValue() ); }
|
sal_uInt16 GetPosterColorCount() const { return( (sal_uInt16) mpNumPoster->GetValue() ); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// -----------------------
|
// -----------------------
|
||||||
|
187
cui/uiconfig/ui/posterdialog.ui
Normal file
187
cui/uiconfig/ui/posterdialog.ui
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
<?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="lower">2</property>
|
||||||
|
<property name="upper">64</property>
|
||||||
|
<property name="value">2</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkDialog" id="PosterDialog">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="border_width">6</property>
|
||||||
|
<property name="title" translatable="yes">Posterize</property>
|
||||||
|
<property name="type_hint">dialog</property>
|
||||||
|
<child internal-child="vbox">
|
||||||
|
<object class="GtkBox" id="dialog-vbox1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child internal-child="action_area">
|
||||||
|
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="layout_style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="ok">
|
||||||
|
<property name="label">gtk-ok</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="has_default">True</property>
|
||||||
|
<property name="receives_default">True</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="cancel">
|
||||||
|
<property name="label">gtk-cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">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="help">
|
||||||
|
<property name="label">gtk-help</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="pack_type">end</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<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="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="column_spacing">24</property>
|
||||||
|
<child>
|
||||||
|
<object class="cuilo-GraphicPreviewWindow" id="preview">
|
||||||
|
<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">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="grid2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="row_spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="value">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">adjustment1</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="GtkLabel" id="label2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">Poster colors</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">value</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>
|
||||||
|
</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>
|
||||||
|
</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">Parameters</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">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<action-widgets>
|
||||||
|
<action-widget response="0">ok</action-widget>
|
||||||
|
<action-widget response="0">cancel</action-widget>
|
||||||
|
<action-widget response="0">help</action-widget>
|
||||||
|
</action-widgets>
|
||||||
|
</object>
|
||||||
|
</interface>
|
@@ -98,7 +98,6 @@
|
|||||||
#define RID_SVXPAGE_GRID (RID_SVX_START + 152)
|
#define RID_SVXPAGE_GRID (RID_SVX_START + 152)
|
||||||
|
|
||||||
// factory IDs of dialogs implemented in CUI
|
// factory IDs of dialogs implemented in CUI
|
||||||
#define RID_SVX_GRFFILTER_DLG_POSTER (RID_SVX_START + 335)
|
|
||||||
#define RID_SVX_GRFFILTER_DLG_MOSAIC (RID_SVX_START + 332)
|
#define RID_SVX_GRFFILTER_DLG_MOSAIC (RID_SVX_START + 332)
|
||||||
#define RID_SVX_GRFFILTER_DLG_EMBOSS (RID_SVX_START + 336)
|
#define RID_SVX_GRFFILTER_DLG_EMBOSS (RID_SVX_START + 336)
|
||||||
#define RID_SVXDLG_CHARMAP ( RID_SVX_START + 10 )
|
#define RID_SVXDLG_CHARMAP ( RID_SVX_START + 10 )
|
||||||
|
Reference in New Issue
Block a user