summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-01 10:42:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-01 12:10:20 +0000
commit59e7894fb2eed689504a340bbbe8d7537d9e70f6 (patch)
tree1dbaeacf371bb38f76e234c8cb20f946f60f8d34 /cui/source/dialogs
parent7911b70e095c158350b58d142a5584bcd02fe284 (diff)
convert mosaic dialog to .ui
Change-Id: Ibc723ca79fba89f24e04440fdbf4140a4e0655ad
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx44
-rw-r--r--cui/source/dialogs/grfflt.hrc10
-rw-r--r--cui/source/dialogs/grfflt.src107
3 files changed, 15 insertions, 146 deletions
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 304db3a45c3c..d3420139a728 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -298,40 +298,26 @@ IMPL_LINK_NOARG(GraphicFilterDialog, ImplModifyHdl)
// ----------------
GraphicFilterMosaic::GraphicFilterMosaic( Window* pParent, const Graphic& rGraphic,
- sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges ) :
- oldGraphicFilterDialog( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_MOSAIC ), rGraphic ),
- maFtWidth ( this, CUI_RES( DLG_FILTERMOSAIC_FT_WIDTH ) ),
- maMtrWidth ( this, CUI_RES( DLG_FILTERMOSAIC_MTR_WIDTH ) ),
- maFtHeight ( this, CUI_RES( DLG_FILTERMOSAIC_FT_HEIGHT ) ),
- maMtrHeight ( this, CUI_RES( DLG_FILTERMOSAIC_MTR_HEIGHT ) ),
- maCbxEdges ( this, CUI_RES( DLG_FILTERMOSAIC_CBX_EDGES ) )
+ sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges )
+ : GraphicFilterDialog(pParent, "MosaicDialog",
+ "cui/ui/mosaicdialog.ui", rGraphic)
{
- FreeResource();
-
- maMtrWidth.SetValue( nTileWidth );
- maMtrWidth.SetLast( GetGraphicSizePixel().Width() );
- maMtrWidth.SetModifyHdl( GetModifyHdl() );
+ get(mpMtrWidth, "width");
+ get(mpMtrHeight, "height");
+ get(mpCbxEdges, "edges");
- maMtrHeight.SetValue( nTileHeight );
- maMtrHeight.SetLast( GetGraphicSizePixel().Height() );
- maMtrHeight.SetModifyHdl( GetModifyHdl() );
+ mpMtrWidth->SetValue( nTileWidth );
+ mpMtrWidth->SetLast( GetGraphicSizePixel().Width() );
+ mpMtrWidth->SetModifyHdl( GetModifyHdl() );
- maCbxEdges.Check( bEnhanceEdges );
- maCbxEdges.SetToggleHdl( GetModifyHdl() );
+ mpMtrHeight->SetValue( nTileHeight );
+ mpMtrHeight->SetLast( GetGraphicSizePixel().Height() );
+ mpMtrHeight->SetModifyHdl( GetModifyHdl() );
- maMtrWidth.GrabFocus();
-
- maFtWidth.SetAccessibleRelationMemberOf(&maFlParameter);
- maMtrWidth.SetAccessibleRelationMemberOf(&maFlParameter);
- maFtHeight.SetAccessibleRelationMemberOf(&maFlParameter);
- maMtrHeight.SetAccessibleRelationMemberOf(&maFlParameter);
- maCbxEdges.SetAccessibleRelationMemberOf(&maFlParameter);
-}
+ mpCbxEdges->Check( bEnhanceEdges );
+ mpCbxEdges->SetToggleHdl( GetModifyHdl() );
-// -----------------------------------------------------------------------------
-
-GraphicFilterMosaic::~GraphicFilterMosaic()
-{
+ mpMtrWidth->GrabFocus();
}
// -----------------------------------------------------------------------------
diff --git a/cui/source/dialogs/grfflt.hrc b/cui/source/dialogs/grfflt.hrc
index 8e6e17127039..df4a92983076 100644
--- a/cui/source/dialogs/grfflt.hrc
+++ b/cui/source/dialogs/grfflt.hrc
@@ -31,16 +31,6 @@
#define FL_PARAMETER 106
// --------------------
-// - DLG_FILTERMOSAIC -
-// --------------------
-
-#define DLG_FILTERMOSAIC_FT_WIDTH 1
-#define DLG_FILTERMOSAIC_MTR_WIDTH 2
-#define DLG_FILTERMOSAIC_FT_HEIGHT 3
-#define DLG_FILTERMOSAIC_MTR_HEIGHT 4
-#define DLG_FILTERMOSAIC_CBX_EDGES 5
-
-// --------------------
// - DLG_FILTEREMBOSS -
// --------------------
diff --git a/cui/source/dialogs/grfflt.src b/cui/source/dialogs/grfflt.src
index 276f7e012793..275f5b6863a0 100644
--- a/cui/source/dialogs/grfflt.src
+++ b/cui/source/dialogs/grfflt.src
@@ -24,113 +24,6 @@
#include <svx/dialogs.hrc>
// --------------------
-// - DLG_FILTERMOSAIC -
-// --------------------
-
-ModalDialog RID_SVX_GRFFILTER_DLG_MOSAIC
-{
- HelpID = CMD_SID_GRFFILTER_MOSAIC;
- OutputSize = TRUE ;
- Moveable = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 250, 100 ) ;
-
- Text [ en-US ] = "Mosaic" ;
-
- 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_Y0 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP
- FixedText DLG_FILTERMOSAIC_FT_WIDTH
- {
- Pos = MAP_APPFONT ( 12, MA_Y0 ) ;
- Size = MAP_APPFONT ( 77, 10 ) ;
- Text [ en-US ] = "~Width" ;
- };
-#define MA_Y1 MA_Y0 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y
- MetricField DLG_FILTERMOSAIC_MTR_WIDTH
- {
- HelpID = "cui:MetricField:RID_SVX_GRFFILTER_DLG_MOSAIC:DLG_FILTERMOSAIC_MTR_WIDTH";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , MA_Y1 ) ;
- Size = MAP_APPFONT ( 35 , 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 1 ;
- Maximum = 999 ;
- StrictFormat = TRUE ;
- Unit = FUNIT_CUSTOM ;
- CustomUnitText [ en-US ] = " Pixel" ;
- First = 1 ;
- Last = 999 ;
- SpinSize = 1 ;
- };
-#define MA_Y2 MA_Y1 + RSC_CD_TEXTBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y
- FixedText DLG_FILTERMOSAIC_FT_HEIGHT
- {
- Pos = MAP_APPFONT ( 12, MA_Y2 ) ;
- Size = MAP_APPFONT ( 77, 10 ) ;
- Text [ en-US ] = "H~eight" ;
- };
-#define MA_Y3 MA_Y2 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y
- MetricField DLG_FILTERMOSAIC_MTR_HEIGHT
- {
- HelpID = "cui:MetricField:RID_SVX_GRFFILTER_DLG_MOSAIC:DLG_FILTERMOSAIC_MTR_HEIGHT";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12, MA_Y3 ) ;
- Size = MAP_APPFONT ( 35, 12 ) ;
- TabStop = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 1 ;
- Maximum = 999 ;
- StrictFormat = TRUE ;
- Unit = FUNIT_CUSTOM ;
- CustomUnitText [ en-US ] = " Pixel" ;
- First = 1 ;
- Last = 999 ;
- SpinSize = 1 ;
- };
-#define MA_Y4 MA_Y3 + RSC_CD_TEXTBOX_HEIGHT + RSC_SP_CTRL_Y
- CheckBox DLG_FILTERMOSAIC_CBX_EDGES
- {
- HelpID = "cui:CheckBox:RID_SVX_GRFFILTER_DLG_MOSAIC:DLG_FILTERMOSAIC_CBX_EDGES";
- Pos = MAP_APPFONT ( 12, MA_Y4 ) ;
- Size = MAP_APPFONT ( 91, 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "E~nhance edges" ;
- };
- 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 -
// --------------------