diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-31 23:50:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-01 12:10:19 +0000 |
commit | b775e0612fe760441edc5c9cd61df8eb29a3ff39 (patch) | |
tree | 21d6eb3bab370590bea5e631a4342ac904366222 /cui/source | |
parent | fdo#61251 prefer exact matches before case guess matching (diff) | |
download | core-b775e0612fe760441edc5c9cd61df8eb29a3ff39.tar.gz core-b775e0612fe760441edc5c9cd61df8eb29a3ff39.zip |
convert sepia dialog to .ui
Change-Id: I6032ea0da029e5bff145e582892655143400f710
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/cuigrfflt.cxx | 19 | ||||
-rw-r--r-- | cui/source/dialogs/grfflt.hrc | 7 | ||||
-rw-r--r-- | cui/source/dialogs/grfflt.src | 68 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 30 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 7 | ||||
-rw-r--r-- | cui/source/inc/cuigrfflt.hxx | 20 |
6 files changed, 29 insertions, 122 deletions
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 9c0bd8a8807f..5551b2c3ca38 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -476,21 +476,14 @@ Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, // ---------------------- GraphicFilterSepia::GraphicFilterSepia( Window* pParent, const Graphic& rGraphic, - sal_uInt16 nSepiaPercent ) : - oldGraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_SEPIA ), rGraphic ), - maFtSepia ( this, CUI_RES( DLG_FILTERSEPIA_FT_SEPIA ) ), - maMtrSepia ( this, CUI_RES( DLG_FILTERSEPIA_MTR_SEPIA ) ) + sal_uInt16 nSepiaPercent ) + : GraphicFilterDialog(pParent, "AgingDialog", + "cui/ui/agingdialog.ui", rGraphic) { - FreeResource(); - - maMtrSepia.SetValue( nSepiaPercent ); - maMtrSepia.SetModifyHdl( GetModifyHdl() ); -} + get(mpMtrSepia, "value"); -// ----------------------------------------------------------------------------- - -GraphicFilterSepia::~GraphicFilterSepia() -{ + mpMtrSepia->SetValue( nSepiaPercent ); + mpMtrSepia->SetModifyHdl( GetModifyHdl() ); } // ----------------------------------------------------------------------------- diff --git a/cui/source/dialogs/grfflt.hrc b/cui/source/dialogs/grfflt.hrc index 5b820147987b..40841090ae17 100644 --- a/cui/source/dialogs/grfflt.hrc +++ b/cui/source/dialogs/grfflt.hrc @@ -40,13 +40,6 @@ #define DLG_FILTERMOSAIC_MTR_HEIGHT 4 #define DLG_FILTERMOSAIC_CBX_EDGES 5 -// ------------------- -// - DLG_FILTERSEPIA - -// ------------------- - -#define DLG_FILTERSEPIA_FT_SEPIA 1 -#define DLG_FILTERSEPIA_MTR_SEPIA 2 - // -------------------- // - DLG_FILTERPOSTER - // -------------------- diff --git a/cui/source/dialogs/grfflt.src b/cui/source/dialogs/grfflt.src index 4b34f9011c84..57181a6ceccc 100644 --- a/cui/source/dialogs/grfflt.src +++ b/cui/source/dialogs/grfflt.src @@ -130,74 +130,6 @@ ModalDialog RID_SVX_GRFFILTER_DLG_MOSAIC }; }; -ModalDialog RID_SVX_GRFFILTER_DLG_SEPIA -{ - HelpID = CMD_SID_GRFFILTER_SEPIA; - OutputSize = TRUE ; - Moveable = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 250, 100 ) ; - - Text [ en-US ] = "Aging" ; - - 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_Y8 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP - FixedText DLG_FILTERSEPIA_FT_SEPIA - { - Pos = MAP_APPFONT ( 12 , MA_Y8 ) ; - Size = MAP_APPFONT ( 77 , 10 ) ; - Text [ en-US ] = "Aging degree" ; - }; -#define MA_Y9 MA_Y8 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y - MetricField DLG_FILTERSEPIA_MTR_SEPIA - { - HelpID = "cui:MetricField:RID_SVX_GRFFILTER_DLG_SEPIA:DLG_FILTERSEPIA_MTR_SEPIA"; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , MA_Y9 ) ; - Size = MAP_APPFONT ( 35 , 12 ) ; - TabStop = TRUE ; - Right = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 100 ; - StrictFormat = TRUE ; - Unit = FUNIT_PERCENT ; - First = 1 ; - Last = 100 ; - 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_FILTERPOSTER - // -------------------- diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index ea0341ece8ab..bd2abaa3ba8d 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1512,28 +1512,20 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterEmb return new oldAbstractGraphicFilterDialog_Impl( pDlg ); } -AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPosterSepia (Window* pParent, +AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPoster(Window* pParent, const Graphic& rGraphic, - sal_uInt16 nCount, - sal_uInt32 nResId) + sal_uInt16 nCount) { - oldGraphicFilterDialog* pDlg=NULL; - switch ( nResId ) - { - case RID_SVX_GRFFILTER_DLG_POSTER : - pDlg = new GraphicFilterPoster( pParent, rGraphic, nCount ); - break; - case RID_SVX_GRFFILTER_DLG_SEPIA : - pDlg = new GraphicFilterSepia( pParent, rGraphic, nCount ); - break; - - default: - break; - } + oldGraphicFilterDialog* pDlg = new GraphicFilterPoster( pParent, rGraphic, nCount ); + return new oldAbstractGraphicFilterDialog_Impl( pDlg ); +} - if ( pDlg ) - return new oldAbstractGraphicFilterDialog_Impl( pDlg ); - return 0; +AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSepia (Window* pParent, + const Graphic& rGraphic, + sal_uInt16 nCount) +{ + GraphicFilterDialog* pDlg = new GraphicFilterSepia( pParent, rGraphic, nCount ); + return new AbstractGraphicFilterDialog_Impl( pDlg ); } AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSmooth(Window* pParent, diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 416a440710f2..a83aac2fb095 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -663,9 +663,10 @@ public: virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss (Window* pParent, const Graphic& rGraphic, RECT_POINT eLightSource, sal_uInt32 nResId); - virtual AbstractGraphicFilterDialog * CreateGraphicFilterPosterSepia (Window* pParent, - const Graphic& rGraphic, sal_uInt16 nCount, - sal_uInt32 nResId); + virtual AbstractGraphicFilterDialog * CreateGraphicFilterPoster(Window* pParent, + const Graphic& rGraphic, sal_uInt16 nCount); + virtual AbstractGraphicFilterDialog * CreateGraphicFilterSepia (Window* pParent, + const Graphic& rGraphic, sal_uInt16 nCount); virtual AbstractGraphicFilterDialog * CreateGraphicFilterSmooth (Window* pParent, const Graphic& rGraphic, double nRadius); virtual AbstractGraphicFilterDialog * CreateGraphicFilterSolarize (Window* pParent, diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index 79c836b78bf7..4fa7b3d57b8c 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -205,22 +205,18 @@ public: // - GraphicFilterSepia - // ---------------------- -class GraphicFilterSepia : public oldGraphicFilterDialog +class GraphicFilterSepia : public GraphicFilterDialog { private: - - FixedText maFtSepia; - MetricField maMtrSepia; - + MetricField* mpMtrSepia; public: - - GraphicFilterSepia( Window* pParent, const Graphic& rGraphic, - sal_uInt16 nSepiaPercent ); - ~GraphicFilterSepia(); - + GraphicFilterSepia( Window* pParent, const Graphic& rGraphic, + sal_uInt16 nSepiaPercent ); virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); - sal_uInt16 GetSepiaPercent() const - { return sal::static_int_cast< sal_uInt16 >(maMtrSepia.GetValue()); } + sal_uInt16 GetSepiaPercent() const + { + return sal::static_int_cast< sal_uInt16 >(mpMtrSepia->GetValue()); + } }; // ----------------------- |