[Libreoffice-commits] core.git: 4 commits - cui/source cui/uiconfig cui/UIConfig_cui.mk include/svx svx/source sw/source

Caolán McNamara caolanm at redhat.com
Sat Feb 1 04:10:49 PST 2014


 cui/UIConfig_cui.mk              |    3 
 cui/source/dialogs/cuigrfflt.cxx |   88 ++++---------
 cui/source/dialogs/grfflt.hrc    |   24 ---
 cui/source/dialogs/grfflt.src    |  245 ------------------------------------
 cui/source/factory/dlgfact.cxx   |   47 ++----
 cui/source/factory/dlgfact.hxx   |    9 -
 cui/source/inc/cuigrfflt.hxx     |   57 +++-----
 cui/uiconfig/ui/agingdialog.ui   |  187 +++++++++++++++++++++++++++
 cui/uiconfig/ui/mosaicdialog.ui  |  263 +++++++++++++++++++++++++++++++++++++++
 cui/uiconfig/ui/posterdialog.ui  |  187 +++++++++++++++++++++++++++
 include/svx/dialogs.hrc          |    3 
 include/svx/svxdlg.hxx           |   10 -
 svx/source/dialog/grfflt.cxx     |    6 
 sw/source/ui/docvw/edtwin.cxx    |   38 ++++-
 14 files changed, 752 insertions(+), 415 deletions(-)

New commits:
commit 59e7894fb2eed689504a340bbbe8d7537d9e70f6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Feb 1 10:42:51 2014 +0000

    convert mosaic dialog to .ui
    
    Change-Id: Ibc723ca79fba89f24e04440fdbf4140a4e0655ad

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 6b068ab..3796244 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -73,6 +73,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/macroassignpage \
 	cui/uiconfig/ui/macroselectordialog \
 	cui/uiconfig/ui/messbox \
+	cui/uiconfig/ui/mosaicdialog \
 	cui/uiconfig/ui/movemenu \
 	cui/uiconfig/ui/namedialog \
 	cui/uiconfig/ui/newlibdialog \
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 304db3a..d342013 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 8e6e171..df4a929 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 276f7e0..275f5b6 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 -
 // --------------------
 
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 0dd0932..11fc55c 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1544,21 +1544,10 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSol
 
 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterMosaic (Window* pParent,
                                             const Graphic& rGraphic, sal_uInt16 nTileWidth, sal_uInt16 nTileHeight,
-                                            sal_Bool bEnhanceEdges, sal_uInt32 nResId)
+                                            sal_Bool bEnhanceEdges)
 {
-    oldGraphicFilterDialog* pDlg=NULL;
-    switch ( nResId )
-    {
-        case RID_SVX_GRFFILTER_DLG_MOSAIC :
-            pDlg = new GraphicFilterMosaic( pParent, rGraphic, nTileWidth, nTileHeight, bEnhanceEdges );
-            break;
-        default:
-            break;
-    }
-
-    if ( pDlg )
-        return new oldAbstractGraphicFilterDialog_Impl( pDlg );
-    return 0;
+    GraphicFilterDialog* pDlg = new GraphicFilterMosaic(pParent, rGraphic, nTileWidth, nTileHeight, bEnhanceEdges);
+    return new AbstractGraphicFilterDialog_Impl( pDlg );
 }
 
 AbstractSvxAreaTabDialog* AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index a83aac2..58e921a 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -674,7 +674,7 @@ public:
                                                 sal_Bool bInvert);
     virtual AbstractGraphicFilterDialog *   CreateGraphicFilterMosaic (Window* pParent,
                                                 const Graphic& rGraphic, sal_uInt16 nTileWidth, sal_uInt16 nTileHeight,
-                                                sal_Bool bEnhanceEdges, sal_uInt32 nResId);
+                                                sal_Bool bEnhanceEdges);
     virtual AbstractSvxAreaTabDialog*       CreateSvxAreaTabDialog( Window* pParent,
                                                             const SfxItemSet* pAttr,
                                                             SdrModel* pModel,
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
index adbecbb..60304b7 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -159,26 +159,22 @@ public:
 // - GraphicFilterMosaic -
 // -----------------------
 
-class GraphicFilterMosaic : public oldGraphicFilterDialog
+class GraphicFilterMosaic : public GraphicFilterDialog
 {
 private:
-
-    FixedText       maFtWidth;
-    MetricField     maMtrWidth;
-    FixedText       maFtHeight;
-    MetricField     maMtrHeight;
-    CheckBox        maCbxEdges;
+    MetricField*    mpMtrWidth;
+    MetricField*    mpMtrHeight;
+    CheckBox*       mpCbxEdges;
 
 public:
 
-                    GraphicFilterMosaic( Window* pParent, const Graphic& rGraphic,
-                                         sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges );
-                    ~GraphicFilterMosaic();
+    GraphicFilterMosaic(Window* pParent, const Graphic& rGraphic,
+        sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges);
 
     virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY );
-    long            GetTileWidth() const { return static_cast<long>(maMtrWidth.GetValue()); }
-    long            GetTileHeight() const { return static_cast<long>(maMtrHeight.GetValue()); }
-    sal_Bool            IsEnhanceEdges() const { return maCbxEdges.IsChecked(); }
+    long            GetTileWidth() const { return static_cast<long>(mpMtrWidth->GetValue()); }
+    long            GetTileHeight() const { return static_cast<long>(mpMtrHeight->GetValue()); }
+    sal_Bool        IsEnhanceEdges() const { return mpCbxEdges->IsChecked(); }
 };
 
 // -------------------------
diff --git a/cui/uiconfig/ui/mosaicdialog.ui b/cui/uiconfig/ui/mosaicdialog.ui
new file mode 100644
index 0000000..e00626d
--- /dev/null
+++ b/cui/uiconfig/ui/mosaicdialog.ui
@@ -0,0 +1,263 @@
+<?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">1</property>
+    <property name="upper">999</property>
+    <property name="value">2</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkDialog" id="MosaicDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Mosaic</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">12</property>
+                        <child>
+                          <object class="GtkGrid" id="grid3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkSpinButton" id="width:px">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="text" translatable="yes">2</property>
+                                <property name="adjustment">adjustment1</property>
+                                <property name="value">2</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">_Width</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">width:px</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>
+                        <child>
+                          <object class="GtkGrid" id="grid4">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkSpinButton" id="height:px">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="text" translatable="yes">2</property>
+                                <property name="adjustment">adjustment1</property>
+                                <property name="value">2</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="label3">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Height</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">height:px</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">1</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="edges">
+                            <property name="label" translatable="yes">E_nhance edges</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="draw_indicator">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>
+                      </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>
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index cf133f2..925fc0f 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -98,7 +98,6 @@
 #define RID_SVXPAGE_GRID                    (RID_SVX_START + 152)
 
 // factory IDs of dialogs implemented in CUI
-#define RID_SVX_GRFFILTER_DLG_MOSAIC        (RID_SVX_START + 332)
 #define RID_SVX_GRFFILTER_DLG_EMBOSS        (RID_SVX_START + 336)
 #define RID_SVXDLG_CHARMAP                  ( RID_SVX_START +  10 )
 
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 8534028..d1b7123 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -429,7 +429,7 @@ public:
                                                 sal_uInt8 nGreyThreshold, sal_Bool bInvert)=0;
     virtual AbstractGraphicFilterDialog *   CreateGraphicFilterMosaic (Window* pParent,
                                                 const Graphic& rGraphic,
-                                                sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges, sal_uInt32 nResId)=0;
+                                                sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges)=0;
     virtual AbstractSvxAreaTabDialog*       CreateSvxAreaTabDialog( Window* pParent,
                                                             const SfxItemSet* pAttr,
                                                             SdrModel* pModel,
diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx
index 1738fe1..4f44a96 100644
--- a/svx/source/dialog/grfflt.cxx
+++ b/svx/source/dialog/grfflt.cxx
@@ -166,7 +166,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
                 if(pFact)
                 {
-                    AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterMosaic( pWindow, rGraphic, 4, 4, sal_False, RID_SVX_GRFFILTER_DLG_MOSAIC);
+                    AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterMosaic(pWindow, rGraphic, 4, 4, sal_False);
                     DBG_ASSERT(aDlg, "Dialogdiet fail!");
                     if( aDlg->Execute() == RET_OK )
                         aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
commit 7911b70e095c158350b58d142a5584bcd02fe284
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Feb 1 10:19:18 2014 +0000

    convert posterize dialog to .ui
    
    Change-Id: If21e85cd0802c9f1b2bd244e6fb3715bef395e0a

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 7e184a6..6b068ab 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -123,6 +123,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/positionpage \
 	cui/uiconfig/ui/positionsizedialog \
 	cui/uiconfig/ui/possizetabpage \
+	cui/uiconfig/ui/posterdialog \
 	cui/uiconfig/ui/querychangelineenddialog \
 	cui/uiconfig/ui/querydeletebitmapdialog \
 	cui/uiconfig/ui/querydeletechartcolordialog \
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 5551b2c..304db3a 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -516,24 +516,17 @@ Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic,
 // - GraphicFilterPoster -
 // -----------------------
 
-GraphicFilterPoster::GraphicFilterPoster( Window* pParent, const Graphic& rGraphic,
-                                          sal_uInt16 nPosterCount ) :
-    oldGraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_POSTER ), rGraphic ),
-    maFtPoster      ( this, CUI_RES( DLG_FILTERPOSTER_FT_POSTER ) ),
-    maNumPoster     ( this, CUI_RES( DLG_FILTERPOSTER_NUM_POSTER ) )
+GraphicFilterPoster::GraphicFilterPoster(Window* pParent, const Graphic& rGraphic,
+                                          sal_uInt16 nPosterCount)
+    : GraphicFilterDialog(pParent, "PosterDialog",
+        "cui/ui/posterdialog.ui", rGraphic)
 {
-    FreeResource();
-
-    maNumPoster.SetFirst( 2 );
-    maNumPoster.SetLast( rGraphic.GetBitmapEx().GetBitCount() );
-    maNumPoster.SetValue( nPosterCount );
-    maNumPoster.SetModifyHdl( GetModifyHdl() );
-}
+    get(mpNumPoster, "value");
 
-// -----------------------------------------------------------------------------
-
-GraphicFilterPoster::~GraphicFilterPoster()
-{
+    mpNumPoster->SetFirst( 2 );
+    mpNumPoster->SetLast( rGraphic.GetBitmapEx().GetBitCount() );
+    mpNumPoster->SetValue( nPosterCount );
+    mpNumPoster->SetModifyHdl( GetModifyHdl() );
 }
 
 // -----------------------------------------------------------------------------
diff --git a/cui/source/dialogs/grfflt.hrc b/cui/source/dialogs/grfflt.hrc
index 4084109..8e6e171 100644
--- a/cui/source/dialogs/grfflt.hrc
+++ b/cui/source/dialogs/grfflt.hrc
@@ -41,13 +41,6 @@
 #define DLG_FILTERMOSAIC_CBX_EDGES          5
 
 // --------------------
-// - DLG_FILTERPOSTER -
-// --------------------
-
-#define DLG_FILTERPOSTER_FT_POSTER          1
-#define DLG_FILTERPOSTER_NUM_POSTER         2
-
-// --------------------
 // - DLG_FILTEREMBOSS -
 // --------------------
 
diff --git a/cui/source/dialogs/grfflt.src b/cui/source/dialogs/grfflt.src
index 57181a6..276f7e0 100644
--- a/cui/source/dialogs/grfflt.src
+++ b/cui/source/dialogs/grfflt.src
@@ -131,76 +131,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 -
 // --------------------
 
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index bd2abaa..0dd0932 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1516,8 +1516,8 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPos
                                             const Graphic& rGraphic,
                                             sal_uInt16 nCount)
 {
-    oldGraphicFilterDialog* pDlg = new GraphicFilterPoster( pParent, rGraphic, nCount );
-    return new oldAbstractGraphicFilterDialog_Impl( pDlg );
+    GraphicFilterDialog* pDlg = new GraphicFilterPoster( pParent, rGraphic, nCount );
+    return new AbstractGraphicFilterDialog_Impl( pDlg );
 }
 
 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSepia (Window* pParent,
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
index 4fa7b3d..adbecbb 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -223,21 +223,16 @@ public:
 // - GraphicFilterPoster -
 // -----------------------
 
-class GraphicFilterPoster : public oldGraphicFilterDialog
+class GraphicFilterPoster : public GraphicFilterDialog
 {
 private:
-
-    FixedText       maFtPoster;
-    NumericField    maNumPoster;
-
+    NumericField*   mpNumPoster;
 public:
-
-                    GraphicFilterPoster( Window* pParent, const Graphic& rGraphic,
-                                         sal_uInt16 nPosterColorCount );
-                    ~GraphicFilterPoster();
+    GraphicFilterPoster( Window* pParent, const Graphic& rGraphic,
+                         sal_uInt16 nPosterColorCount );
 
     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() ); }
 };
 
 // -----------------------
diff --git a/cui/uiconfig/ui/posterdialog.ui b/cui/uiconfig/ui/posterdialog.ui
new file mode 100644
index 0000000..a4c207f
--- /dev/null
+++ b/cui/uiconfig/ui/posterdialog.ui
@@ -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>
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 4a9baab..cf133f2 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -98,7 +98,6 @@
 #define RID_SVXPAGE_GRID                    (RID_SVX_START + 152)
 
 // 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_EMBOSS        (RID_SVX_START + 336)
 #define RID_SVXDLG_CHARMAP                  ( RID_SVX_START +  10 )
commit b775e0612fe760441edc5c9cd61df8eb29a3ff39
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 31 23:50:21 2014 +0000

    convert sepia dialog to .ui
    
    Change-Id: I6032ea0da029e5bff145e582892655143400f710

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index d7b2fc6..7e184a6 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/aboutdialog \
 	cui/uiconfig/ui/aboutconfigdialog\
 	cui/uiconfig/ui/aboutconfigvaluedialog \
+	cui/uiconfig/ui/agingdialog \
 	cui/uiconfig/ui/acorexceptpage \
 	cui/uiconfig/ui/acoroptionspage \
 	cui/uiconfig/ui/acorreplacepage \
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 9c0bd8a..5551b2c 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 5b82014..4084109 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 4b34f90..57181a6 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 ea0341e..bd2abaa 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 416a440..a83aac2 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 79c836b..4fa7b3d 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());
+    }
 };
 
 // -----------------------
diff --git a/cui/uiconfig/ui/agingdialog.ui b/cui/uiconfig/ui/agingdialog.ui
new file mode 100644
index 0000000..2cb9e16
--- /dev/null
+++ b/cui/uiconfig/ui/agingdialog.ui
@@ -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">1</property>
+    <property name="upper">100</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkDialog" id="AgingDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Aging</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">Aging degree</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>
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index de78b8d..4a9baab 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -98,7 +98,6 @@
 #define RID_SVXPAGE_GRID                    (RID_SVX_START + 152)
 
 // factory IDs of dialogs implemented in CUI
-#define RID_SVX_GRFFILTER_DLG_SEPIA         (RID_SVX_START + 334)
 #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_EMBOSS        (RID_SVX_START + 336)
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index f07f935..8534028 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -415,10 +415,12 @@ public:
     virtual AbstractGraphicFilterDialog *   CreateGraphicFilterEmboss (Window* pParent,
                                                 const Graphic& rGraphic,
                                                 RECT_POINT eLightSource, sal_uInt32 nResId )=0;
-    virtual AbstractGraphicFilterDialog *   CreateGraphicFilterPosterSepia (Window* pParent,
+    virtual AbstractGraphicFilterDialog *   CreateGraphicFilterPoster(Window* pParent,
                                                 const Graphic& rGraphic,
-                                                sal_uInt16 nCount,
-                                                sal_uInt32 nResId)=0;
+                                                sal_uInt16 nCount)=0;
+    virtual AbstractGraphicFilterDialog *   CreateGraphicFilterSepia (Window* pParent,
+                                                const Graphic& rGraphic,
+                                                sal_uInt16 nCount)=0;
     virtual AbstractGraphicFilterDialog *   CreateGraphicFilterSmooth (Window* pParent,
                                                 const Graphic& rGraphic,
                                                 double nRadius)=0;
diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx
index a7e974c..1738fe1 100644
--- a/svx/source/dialog/grfflt.cxx
+++ b/svx/source/dialog/grfflt.cxx
@@ -194,7 +194,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
                 if(pFact)
                 {
-                    AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterPosterSepia( pWindow, rGraphic, 16, RID_SVX_GRFFILTER_DLG_POSTER );
+                    AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterPoster(pWindow, rGraphic, 16);
                     DBG_ASSERT(aDlg, "Dialogdiet fail!");
                     if( aDlg->Execute() == RET_OK )
                         aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
@@ -233,7 +233,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
                 if(pFact)
                 {
-                    AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterPosterSepia( pWindow, rGraphic, 10, RID_SVX_GRFFILTER_DLG_SEPIA );
+                    AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterSepia(pWindow, rGraphic, 10);
                     DBG_ASSERT(aDlg, "Dialogdiet fail!");
                     if( aDlg->Execute() == RET_OK )
                         aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
commit 8df7e6ced2c728932a07539c8607263d7298ab7b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 31 23:36:02 2014 +0000

    fdo#61251 prefer exact matches before case guess matching
    
    Change-Id: I3a7badf063110e78d53859381efba32837aa71bb

diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 039d7f8..4ab9555 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -282,7 +282,7 @@ struct QuickHelpData
 
     // Fills internal structures with hopefully helpful information.
     void FillStrArr( SwWrtShell& rSh, const OUString& rWord );
-    void SortAndFilter();
+    void SortAndFilter(const OUString &rOrigWord);
 };
 
 /**
@@ -5848,6 +5848,11 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const OUString& rWord )
             if( rStr.getLength() > rWord.getLength() &&
                 rCC.lowercase( rStr, 0, rWord.getLength() ) == sWordLower )
             {
+                //fdo#61251 if it's an exact match, ensure unchanged replacement
+                //exists as a candidate
+                if (rStr.startsWith(rWord))
+                    m_aHelpStrings.push_back(rStr);
+
                 if ( aWordCase == CASE_LOWER )
                     m_aHelpStrings.push_back( rCC.lowercase( rStr ) );
                 else if ( aWordCase == CASE_SENTENCE )
@@ -5876,6 +5881,10 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const OUString& rWord )
         for (unsigned int i= 0; i<strings.size(); i++)
         {
             OUString aCompletedString = strings[i];
+            //fdo#61251 if it's an exact match, ensure unchanged replacement
+            //exists as a candidate
+            if (aCompletedString.startsWith(rWord))
+                m_aHelpStrings.push_back(aCompletedString);
             if ( aWordCase == CASE_LOWER )
                 m_aHelpStrings.push_back( rCC.lowercase( aCompletedString ) );
             else if ( aWordCase == CASE_SENTENCE )
@@ -5895,11 +5904,28 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const OUString& rWord )
 
 namespace {
 
-struct CompareIgnoreCaseAscii
+class CompareIgnoreCaseAsciiFavorExact
+    : public std::binary_function<const OUString&, const OUString&, bool>
 {
+    const OUString &m_rOrigWord;
+public:
+    CompareIgnoreCaseAsciiFavorExact(const OUString& rOrigWord)
+        : m_rOrigWord(rOrigWord)
+    {
+    }
+
     bool operator()(const OUString& s1, const OUString& s2) const
     {
-        return s1.compareToIgnoreAsciiCase(s2) < 0;
+        int nRet = s1.compareToIgnoreAsciiCase(s2);
+        if (nRet == 0)
+        {
+            //fdo#61251 sort stuff that starts with the exact rOrigWord before
+            //another ignore-case candidate
+            int n1StartsWithOrig = s1.startsWith(m_rOrigWord) ? 0 : 1;
+            int n2StartsWithOrig = s2.startsWith(m_rOrigWord) ? 0 : 1;
+            return n1StartsWithOrig < n2StartsWithOrig;
+        }
+        return nRet < 0;
     }
 };
 
@@ -5914,11 +5940,11 @@ struct EqualIgnoreCaseAscii
 } // anonymous namespace
 
 // TODO Implement an i18n aware sort
-void QuickHelpData::SortAndFilter()
+void QuickHelpData::SortAndFilter(const OUString &rOrigWord)
 {
     std::sort( m_aHelpStrings.begin(),
                m_aHelpStrings.end(),
-               CompareIgnoreCaseAscii() );
+               CompareIgnoreCaseAsciiFavorExact(rOrigWord) );
 
     std::vector<OUString>::iterator it = std::unique( m_aHelpStrings.begin(),
                                                     m_aHelpStrings.end(),
@@ -5955,7 +5981,7 @@ void SwEditWin::ShowAutoTextCorrectQuickHelp(
 
     if( !m_pQuickHlpData->m_aHelpStrings.empty() )
     {
-        m_pQuickHlpData->SortAndFilter();
+        m_pQuickHlpData->SortAndFilter(rWord);
         m_pQuickHlpData->Start( rSh, rWord.getLength() );
     }
 }


More information about the Libreoffice-commits mailing list