[Libreoffice-commits] core.git: cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk extras/source

Caolán McNamara caolanm at redhat.com
Fri Nov 22 09:00:47 PST 2013


 cui/AllLangResTarget_cui.mk                    |    1 
 cui/UIConfig_cui.mk                            |    1 
 cui/source/dialogs/cuires.src                  |    6 
 cui/source/inc/cuires.hrc                      |    2 
 cui/source/inc/grfpage.hxx                     |   90 +--
 cui/source/inc/helpid.hrc                      |    1 
 cui/source/tabpages/grfpage.cxx                |  437 +++++++++----------
 cui/source/tabpages/grfpage.hrc                |   46 --
 cui/source/tabpages/grfpage.src                |  305 -------------
 cui/uiconfig/ui/croppage.ui                    |  568 +++++++++++++++++++++++++
 extras/source/glade/libreoffice-catalog.xml.in |    4 
 11 files changed, 836 insertions(+), 625 deletions(-)

New commits:
commit e001743ad0f5a166a7e605acd76031100e6e0a40
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 22 16:26:19 2013 +0000

    convert crop page to .ui
    
    Change-Id: I01946f979fc043c5b1ca2777f0af1769e2c8a362

diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 147979a..6da235f 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -65,7 +65,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
     cui/source/tabpages/border.src \
     cui/source/tabpages/dstribut.src \
     cui/source/tabpages/frmdirlbox.src \
-    cui/source/tabpages/grfpage.src \
     cui/source/tabpages/labdlg.src \
     cui/source/tabpages/macroass.src \
     cui/source/tabpages/page.src \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index d985912..78eaa8c 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/colorpage \
 	cui/uiconfig/ui/comment \
 	cui/uiconfig/ui/connectortabpage \
+	cui/uiconfig/ui/croppage \
 	cui/uiconfig/ui/cuiimapdlg \
 	cui/uiconfig/ui/dimensionlinestabpage \
 	cui/uiconfig/ui/editdictionarydialog \
diff --git a/cui/source/dialogs/cuires.src b/cui/source/dialogs/cuires.src
index 4534764..9c15669 100644
--- a/cui/source/dialogs/cuires.src
+++ b/cui/source/dialogs/cuires.src
@@ -44,6 +44,12 @@ String RID_SVXSTR_ROW
     Text [ en-US ] = "Insert Rows" ;
 };
 
+String RID_SVXSTR_PPI
+{
+    Text [ x-comment ] = "PPI is pixel per inch, %1 is a number" ;
+    Text [ en-US ] = "(%1 PPI)" ;
+};
+
 String RID_SVXSTR_COL
 {
     Text [ en-US ] = "Insert Columns" ;
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index f856a25..f91d653 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -452,6 +452,8 @@
 
 #define RID_SVXSTR_CHG_SMARTART                             (RID_SVX_START + 1251)
 
+#define RID_SVXSTR_PPI                                      (RID_SVX_START + 1252)
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index 26ca3e0..474565d 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -26,6 +26,28 @@
 #include <vcl/graph.hxx>
 #include <sfx2/tabdlg.hxx>
 
+class SvxCropExample : public Window
+{
+    Size        aFrameSize;
+    Point       aTopLeft, aBottomRight;
+    Graphic     aGrf;
+
+public:
+    SvxCropExample( Window* pPar, WinBits nStyle );
+
+    virtual void Paint( const Rectangle& rRect );
+    virtual Size GetOptimalSize() const;
+
+    void SetTopLeft( const Point& rNew )    { aTopLeft = rNew; }
+    void SetTop( long nVal )                { aTopLeft.X() = nVal; }
+    void SetBottom( long nVal )             { aBottomRight.X() = nVal; }
+    void SetLeft( long nVal )               { aTopLeft.Y() = nVal; }
+    void SetRight( long nVal)               { aBottomRight.Y() = nVal; }
+    void SetBottomRight(const Point& rNew ) { aBottomRight = rNew; }
+    void SetFrameSize( const Size& rSz );
+    void SetGraphic( const Graphic& rGrf )  { aGrf = rGrf; }
+    const Graphic& GetGraphic() const       { return aGrf; }
+};
 
 class SvxGrfCropPage : public SfxTabPage
 {
@@ -33,56 +55,28 @@ class SvxGrfCropPage : public SfxTabPage
     using TabPage::ActivatePage;
     using TabPage::DeactivatePage;
 
-    class SvxCropExample : public Window
-    {
-        Size        aFrameSize;
-        Point       aTopLeft, aBottomRight;
-        Graphic     aGrf;
-
-    public:
-        SvxCropExample( Window* pPar, const ResId& rResId );
-
-        virtual void Paint( const Rectangle& rRect );
-
-        void SetTopLeft( const Point& rNew )    { aTopLeft = rNew; }
-        void SetTop( long nVal )                { aTopLeft.X() = nVal; }
-        void SetBottom( long nVal )             { aBottomRight.X() = nVal; }
-        void SetLeft( long nVal )               { aTopLeft.Y() = nVal; }
-        void SetRight( long nVal)               { aBottomRight.Y() = nVal; }
-        void SetBottomRight(const Point& rNew ) { aBottomRight = rNew; }
-        void SetFrameSize( const Size& rSz );
-        void SetGraphic( const Graphic& rGrf )  { aGrf = rGrf; }
-        const Graphic& GetGraphic() const       { return aGrf; }
-    };
-
-    FixedLine       aCropFL;
-    RadioButton     aZoomConstRB;
-    RadioButton     aSizeConstRB;
-    FixedText       aLeftFT;
-    MetricField     aLeftMF;
-    FixedText       aRightFT;
-    MetricField     aRightMF;
-    FixedText       aTopFT;
-    MetricField     aTopMF;
-    FixedText       aBottomFT;
-    MetricField     aBottomMF;
-
-    FixedLine       aZoomFL;
-    FixedText       aWidthZoomFT;
-    MetricField     aWidthZoomMF;
-    FixedText       aHeightZoomFT;
-    MetricField     aHeightZoomMF;
-
-    FixedLine       aSizeFL;
-    FixedText       aWidthFT;
-    MetricField     aWidthMF;
-    FixedText       aHeightFT;
-    MetricField     aHeightMF;
-    FixedText       aOrigSizeFT;
-    PushButton      aOrigSizePB;
+    VclContainer*   m_pCropFrame;
+    RadioButton*    m_pZoomConstRB;
+    RadioButton*    m_pSizeConstRB;
+    MetricField*    m_pLeftMF;
+    MetricField*    m_pRightMF;
+    MetricField*    m_pTopMF;
+    MetricField*    m_pBottomMF;
+
+    VclContainer*   m_pScaleFrame;
+    MetricField*    m_pWidthZoomMF;
+    MetricField*    m_pHeightZoomMF;
+
+    VclContainer*   m_pSizeFrame;
+    MetricField*    m_pWidthMF;
+    MetricField*    m_pHeightMF;
+
+    VclContainer*   m_pOrigSizeGrid;
+    FixedText*      m_pOrigSizeFT;
+    PushButton*     m_pOrigSizePB;
 
     // Example
-    SvxCropExample  aExampleWN;
+    SvxCropExample* m_pExampleWN;
 
 
     Timer           aTimer;
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index d7b1c06..8653722 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -211,7 +211,6 @@
 #define HID_OFAPAGE_AUTOCOMPLETE_OPTIONS "CUI_HID_OFAPAGE_AUTOCOMPLETE_OPTIONS"
 
 #define HID_PAGE_DISTRIBUTE "CUI_HID_PAGE_DISTRIBUTE"
-#define HID_SVXPAGE_GRFCROP "CUI_HID_SVXPAGE_GRFCROP"
 #define HID_CAPTION "CUI_HID_CAPTION"
 #define HID_CAPTION_CTL_TYPE "CUI_HID_CAPTION_CTL_TYPE"
 
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 1365ce5..1a2592f 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -29,10 +29,10 @@
 #include <editeng/brushitem.hxx>
 #include <grfpage.hxx>
 #include <svx/grfcrop.hxx>
-#include <grfpage.hrc>
 #include <rtl/ustring.hxx>
 #include <cuires.hrc>
 #include <svx/dialogs.hrc>
+#include <vcl/builder.hxx>
 
 #define CM_1_TO_TWIP        567
 #define TWIP_TO_INCH        1440
@@ -48,86 +48,76 @@ static inline long lcl_GetValue( MetricField& rMetric, FieldUnit eUnit )
  --------------------------------------------------------------------*/
 
 SvxGrfCropPage::SvxGrfCropPage ( Window *pParent, const SfxItemSet &rSet )
-    : SfxTabPage( pParent,  CUI_RES( RID_SVXPAGE_GRFCROP ), rSet ),
-    aCropFL(        this, CUI_RES( FL_CROP    )),
-    aZoomConstRB(   this, CUI_RES( RB_ZOOMCONST)),
-    aSizeConstRB(   this, CUI_RES( RB_SIZECONST)),
-    aLeftFT(        this, CUI_RES( FT_LEFT    )),
-    aLeftMF(        this, CUI_RES( MF_LEFT    )),
-    aRightFT(       this, CUI_RES( FT_RIGHT   )),
-    aRightMF(       this, CUI_RES( MF_RIGHT   )),
-    aTopFT(         this, CUI_RES( FT_TOP     )),
-    aTopMF(         this, CUI_RES( MF_TOP     )),
-    aBottomFT(      this, CUI_RES( FT_BOTTOM  )),
-    aBottomMF(      this, CUI_RES( MF_BOTTOM  )),
-    aZoomFL(        this, CUI_RES( FL_ZOOM    )),
-    aWidthZoomFT(   this, CUI_RES( FT_WIDTHZOOM )),
-    aWidthZoomMF(   this, CUI_RES( MF_WIDTHZOOM )),
-    aHeightZoomFT(  this, CUI_RES( FT_HEIGHTZOOM)),
-    aHeightZoomMF(  this, CUI_RES( MF_HEIGHTZOOM)),
-    aSizeFL(        this, CUI_RES( FL_SIZE    )),
-    aWidthFT(       this, CUI_RES( FT_WIDTH   )),
-    aWidthMF(       this, CUI_RES( MF_WIDTH   )),
-    aHeightFT(      this, CUI_RES( FT_HEIGHT  )),
-    aHeightMF(      this, CUI_RES( MF_HEIGHT  )),
-    aOrigSizeFT(    this, CUI_RES(FT_ORIG_SIZE)),
-    aOrigSizePB(    this, CUI_RES( PB_ORGSIZE )),
-    aExampleWN(     this, CUI_RES( WN_BSP     )),
-    pLastCropField(0),
-    bInitialized(sal_False),
-    bSetOrigSize(sal_False)
+    : SfxTabPage(pParent, "CropPage", "cui/ui/croppage.ui", rSet)
+    , pLastCropField(0)
+    , bInitialized(false)
+    , bSetOrigSize(false)
 {
-    FreeResource();
+    get(m_pCropFrame, "cropframe");
+    get(m_pScaleFrame, "scaleframe");
+    get(m_pSizeFrame, "sizeframe");
+    get(m_pOrigSizeGrid, "origsizegrid");
+    get(m_pZoomConstRB, "keepscale");
+    get(m_pSizeConstRB, "keepsize");
+    get(m_pOrigSizeFT, "origsizeft");
+    get(m_pOrigSizePB, "origsize");
+    get(m_pLeftMF, "left");
+    get(m_pRightMF, "right");
+    get(m_pTopMF, "top");
+    get(m_pBottomMF, "bottom");
+    get(m_pWidthZoomMF, "widthzoom");
+    get(m_pHeightZoomMF, "heightzoom");
+    get(m_pWidthMF, "width");
+    get(m_pHeightMF, "height");
+    get(m_pExampleWN, "preview");
 
     SetExchangeSupport();
 
     // set the correct metric
     const FieldUnit eMetric = GetModuleFieldUnit( rSet );
 
-    SetFieldUnit( aWidthMF, eMetric );
-    SetFieldUnit( aHeightMF, eMetric );
-    SetFieldUnit( aLeftMF, eMetric );
-    SetFieldUnit( aRightMF, eMetric );
-    SetFieldUnit( aTopMF , eMetric );
-    SetFieldUnit( aBottomMF, eMetric );
+    SetFieldUnit( *m_pWidthMF, eMetric );
+    SetFieldUnit( *m_pHeightMF, eMetric );
+    SetFieldUnit( *m_pLeftMF, eMetric );
+    SetFieldUnit( *m_pRightMF, eMetric );
+    SetFieldUnit( *m_pTopMF , eMetric );
+    SetFieldUnit( *m_pBottomMF, eMetric );
 
     Link aLk = LINK(this, SvxGrfCropPage, SizeHdl);
-    aWidthMF.SetModifyHdl( aLk );
-    aHeightMF.SetModifyHdl( aLk );
+    m_pWidthMF->SetModifyHdl( aLk );
+    m_pHeightMF->SetModifyHdl( aLk );
 
     aLk = LINK(this, SvxGrfCropPage, ZoomHdl);
-    aWidthZoomMF.SetModifyHdl( aLk );
-    aHeightZoomMF.SetModifyHdl( aLk );
+    m_pWidthZoomMF->SetModifyHdl( aLk );
+    m_pHeightZoomMF->SetModifyHdl( aLk );
 
     aLk = LINK(this, SvxGrfCropPage, CropHdl);
-    aLeftMF.SetDownHdl( aLk );
-    aRightMF.SetDownHdl( aLk );
-    aTopMF.SetDownHdl( aLk );
-    aBottomMF.SetDownHdl( aLk );
-    aLeftMF.SetUpHdl( aLk );
-    aRightMF.SetUpHdl( aLk );
-    aTopMF.SetUpHdl( aLk );
-    aBottomMF.SetUpHdl( aLk );
+    m_pLeftMF->SetDownHdl( aLk );
+    m_pRightMF->SetDownHdl( aLk );
+    m_pTopMF->SetDownHdl( aLk );
+    m_pBottomMF->SetDownHdl( aLk );
+    m_pLeftMF->SetUpHdl( aLk );
+    m_pRightMF->SetUpHdl( aLk );
+    m_pTopMF->SetUpHdl( aLk );
+    m_pBottomMF->SetUpHdl( aLk );
 
     aLk = LINK(this, SvxGrfCropPage, CropModifyHdl);
-    aLeftMF.SetModifyHdl( aLk );
-    aRightMF.SetModifyHdl( aLk );
-    aTopMF.SetModifyHdl( aLk );
-    aBottomMF.SetModifyHdl( aLk );
+    m_pLeftMF->SetModifyHdl( aLk );
+    m_pRightMF->SetModifyHdl( aLk );
+    m_pTopMF->SetModifyHdl( aLk );
+    m_pBottomMF->SetModifyHdl( aLk );
 
     aLk = LINK(this, SvxGrfCropPage, CropLoseFocusHdl);
-    aLeftMF.SetLoseFocusHdl( aLk );
-    aRightMF.SetLoseFocusHdl( aLk );
-    aTopMF.SetLoseFocusHdl( aLk );
-    aBottomMF.SetLoseFocusHdl( aLk );
+    m_pLeftMF->SetLoseFocusHdl( aLk );
+    m_pRightMF->SetLoseFocusHdl( aLk );
+    m_pTopMF->SetLoseFocusHdl( aLk );
+    m_pBottomMF->SetLoseFocusHdl( aLk );
 
     aLk = LINK(this, SvxGrfCropPage, OrigSizeHdl);
-    aOrigSizePB.SetClickHdl( aLk );
+    m_pOrigSizePB->SetClickHdl( aLk );
 
     aTimer.SetTimeoutHdl(LINK(this, SvxGrfCropPage, Timeout));
     aTimer.SetTimeout( 1500 );
-
-    aOrigSizePB.SetAccessibleRelationLabeledBy( &aOrigSizeFT );
 }
 
 SvxGrfCropPage::~SvxGrfCropPage()
@@ -149,10 +139,10 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet )
                                     SID_ATTR_GRAF_KEEP_ZOOM ), sal_True, &pItem ))
     {
         if( ((const SfxBoolItem*)pItem)->GetValue() )
-            aZoomConstRB.Check();
+            m_pZoomConstRB->Check();
         else
-            aSizeConstRB.Check();
-        aZoomConstRB.SaveValue();
+            m_pSizeConstRB->Check();
+        m_pZoomConstRB->SaveValue();
     }
 
     sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_CROP );
@@ -162,22 +152,22 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet )
 
         SvxGrfCrop* pCrop =  (SvxGrfCrop*)pItem;
 
-        aExampleWN.SetLeft(     pCrop->GetLeft());
-        aExampleWN.SetRight(    pCrop->GetRight());
-        aExampleWN.SetTop(      pCrop->GetTop());
-        aExampleWN.SetBottom(   pCrop->GetBottom());
+        m_pExampleWN->SetLeft(     pCrop->GetLeft());
+        m_pExampleWN->SetRight(    pCrop->GetRight());
+        m_pExampleWN->SetTop(      pCrop->GetTop());
+        m_pExampleWN->SetBottom(   pCrop->GetBottom());
 
-        aLeftMF.SetValue( aLeftMF.Normalize( pCrop->GetLeft()), eUnit );
-        aRightMF.SetValue( aRightMF.Normalize( pCrop->GetRight()), eUnit );
-        aTopMF.SetValue( aTopMF.Normalize( pCrop->GetTop()), eUnit );
-        aBottomMF.SetValue( aBottomMF.Normalize( pCrop->GetBottom()), eUnit );
+        m_pLeftMF->SetValue( m_pLeftMF->Normalize( pCrop->GetLeft()), eUnit );
+        m_pRightMF->SetValue( m_pRightMF->Normalize( pCrop->GetRight()), eUnit );
+        m_pTopMF->SetValue( m_pTopMF->Normalize( pCrop->GetTop()), eUnit );
+        m_pBottomMF->SetValue( m_pBottomMF->Normalize( pCrop->GetBottom()), eUnit );
     }
     else
     {
-        aLeftMF.SetValue( 0 );
-        aRightMF.SetValue( 0 );
-        aTopMF.SetValue( 0 );
-        aBottomMF.SetValue( 0 );
+        m_pLeftMF->SetValue( 0 );
+        m_pRightMF->SetValue( 0 );
+        m_pTopMF->SetValue( 0 );
+        m_pBottomMF->SetValue( 0 );
     }
 
     nW = rPool.GetWhich( SID_ATTR_PAGE_SIZE );
@@ -188,13 +178,13 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet )
 
         aPageSize = ((const SvxSizeItem*)pItem)->GetSize();
 
-        sal_Int64 nTmp = aHeightMF.Normalize(aPageSize.Height());
-        aHeightMF.SetMax( nTmp, eUnit );
-        nTmp = aWidthMF.Normalize(aPageSize.Width());
-        aWidthMF.SetMax( nTmp, eUnit );
-        nTmp = aWidthMF.Normalize( 23 );
-        aHeightMF.SetMin( nTmp, eUnit );
-        aWidthMF.SetMin( nTmp, eUnit );
+        sal_Int64 nTmp = m_pHeightMF->Normalize(aPageSize.Height());
+        m_pHeightMF->SetMax( nTmp, eUnit );
+        nTmp = m_pWidthMF->Normalize(aPageSize.Width());
+        m_pWidthMF->SetMax( nTmp, eUnit );
+        nTmp = m_pWidthMF->Normalize( 23 );
+        m_pHeightMF->SetMin( nTmp, eUnit );
+        m_pWidthMF->SetMin( nTmp, eUnit );
     }
     else
     {
@@ -225,8 +215,8 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet )
         if( aOrigSize.Width() && aOrigSize.Height() )
         {
             CalcMinMaxBorder();
-            aExampleWN.SetGraphic( *pGrf );
-            aExampleWN.SetFrameSize( aOrigSize );
+            m_pExampleWN->SetGraphic( *pGrf );
+            m_pExampleWN->SetFrameSize( aOrigSize );
 
             bFound = sal_True;
             if( !((SvxBrushItem*)pItem)->GetGraphicLink().isEmpty() )
@@ -244,8 +234,8 @@ sal_Bool SvxGrfCropPage::FillItemSet(SfxItemSet &rSet)
 {
     const SfxItemPool& rPool = *rSet.GetPool();
     sal_Bool bModified = sal_False;
-    if( aWidthMF.GetSavedValue() != aWidthMF.GetText() ||
-        aHeightMF.GetSavedValue() != aHeightMF.GetText() )
+    if( m_pWidthMF->GetSavedValue() != m_pWidthMF->GetText() ||
+        m_pHeightMF->GetSavedValue() != m_pHeightMF->GetText() )
     {
         sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_FRMSIZE );
         FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW ));
@@ -263,13 +253,13 @@ sal_Bool SvxGrfCropPage::FillItemSet(SfxItemSet &rSet)
             aSz = (const SvxSizeItem&)GetItemSet().Get( nW );
 
         Size aTmpSz( aSz.GetSize() );
-        if( aWidthMF.GetText() != aWidthMF.GetSavedValue() )
-            aTmpSz.Width() = lcl_GetValue( aWidthMF, eUnit );
-        if( aHeightMF.GetText() != aHeightMF.GetSavedValue() )
-            aTmpSz.Height() = lcl_GetValue( aHeightMF, eUnit );
+        if( m_pWidthMF->GetText() != m_pWidthMF->GetSavedValue() )
+            aTmpSz.Width() = lcl_GetValue( *m_pWidthMF, eUnit );
+        if( m_pHeightMF->GetText() != m_pHeightMF->GetSavedValue() )
+            aTmpSz.Height() = lcl_GetValue( *m_pHeightMF, eUnit );
         aSz.SetSize( aTmpSz );
-        aWidthMF.SaveValue();
-        aHeightMF.SaveValue();
+        m_pWidthMF->SaveValue();
+        m_pHeightMF->SaveValue();
 
         bModified |= 0 != rSet.Put( aSz );
 
@@ -279,25 +269,25 @@ sal_Bool SvxGrfCropPage::FillItemSet(SfxItemSet &rSet)
                         SID_ATTR_GRAF_FRMSIZE_PERCENT ), Size( 0, 0 )) );
         }
     }
-    if( aLeftMF.IsModified() || aRightMF.IsModified() ||
-        aTopMF.IsModified()  || aBottomMF.IsModified() )
+    if( m_pLeftMF->IsModified() || m_pRightMF->IsModified() ||
+        m_pTopMF->IsModified()  || m_pBottomMF->IsModified() )
     {
         sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_CROP );
         FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW ));
         SvxGrfCrop* pNew = (SvxGrfCrop*)rSet.Get( nW ).Clone();
 
-        pNew->SetLeft( lcl_GetValue( aLeftMF, eUnit ) );
-        pNew->SetRight( lcl_GetValue( aRightMF, eUnit ) );
-        pNew->SetTop( lcl_GetValue( aTopMF, eUnit ) );
-        pNew->SetBottom( lcl_GetValue( aBottomMF, eUnit ) );
+        pNew->SetLeft( lcl_GetValue( *m_pLeftMF, eUnit ) );
+        pNew->SetRight( lcl_GetValue( *m_pRightMF, eUnit ) );
+        pNew->SetTop( lcl_GetValue( *m_pTopMF, eUnit ) );
+        pNew->SetBottom( lcl_GetValue( *m_pBottomMF, eUnit ) );
         bModified |= 0 != rSet.Put( *pNew );
         delete pNew;
     }
 
-    if( aZoomConstRB.GetSavedValue() != aZoomConstRB.IsChecked() )
+    if( m_pZoomConstRB->GetSavedValue() != m_pZoomConstRB->IsChecked() )
     {
         bModified |= 0 != rSet.Put( SfxBoolItem( rPool.GetWhich(
-                    SID_ATTR_GRAF_KEEP_ZOOM), aZoomConstRB.IsChecked() ) );
+                    SID_ATTR_GRAF_KEEP_ZOOM), m_pZoomConstRB->IsChecked() ) );
     }
 
     bInitialized = sal_False;
@@ -323,34 +313,34 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
     nOldWidth = aSize.Width();
     nOldHeight = aSize.Height();
 
-    sal_Int64 nWidth = aWidthMF.Normalize(nOldWidth);
-    sal_Int64 nHeight = aHeightMF.Normalize(nOldHeight);
+    sal_Int64 nWidth = m_pWidthMF->Normalize(nOldWidth);
+    sal_Int64 nHeight = m_pHeightMF->Normalize(nOldHeight);
 
-    if (nWidth != aWidthMF.GetValue(FUNIT_TWIP))
+    if (nWidth != m_pWidthMF->GetValue(FUNIT_TWIP))
     {
         if(!bReset)
         {
             // value was changed by wrap-tabpage and has to
             // be set with modify-flag
-            aWidthMF.SetUserValue(nWidth, FUNIT_TWIP);
+            m_pWidthMF->SetUserValue(nWidth, FUNIT_TWIP);
         }
         else
-            aWidthMF.SetValue(nWidth, FUNIT_TWIP);
+            m_pWidthMF->SetValue(nWidth, FUNIT_TWIP);
     }
-    aWidthMF.SaveValue();
+    m_pWidthMF->SaveValue();
 
-    if (nHeight != aHeightMF.GetValue(FUNIT_TWIP))
+    if (nHeight != m_pHeightMF->GetValue(FUNIT_TWIP))
     {
         if (!bReset)
         {
             // value was changed by wrap-tabpage and has to
             // be set with modify-flag
-            aHeightMF.SetUserValue(nHeight, FUNIT_TWIP);
+            m_pHeightMF->SetUserValue(nHeight, FUNIT_TWIP);
         }
         else
-            aHeightMF.SetValue(nHeight, FUNIT_TWIP);
+            m_pHeightMF->SetValue(nHeight, FUNIT_TWIP);
     }
-    aHeightMF.SaveValue();
+    m_pHeightMF->SaveValue();
     bInitialized = sal_True;
 
     if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) )
@@ -369,13 +359,13 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
         const Graphic* pGrf = rBrush.GetGraphic(referer);
         if( pGrf )
         {
-            aExampleWN.SetGraphic( *pGrf );
+            m_pExampleWN->SetGraphic( *pGrf );
             aOrigSize = GetGrfOrigSize( *pGrf );
             if (pGrf->GetType() == GRAPHIC_BITMAP && aOrigSize.Width() > 1 && aOrigSize.Height() > 1) {
                 Bitmap aBitmap = pGrf->GetBitmap();
                 aOrigPixelSize = aBitmap.GetSizePixel();
             }
-            aExampleWN.SetFrameSize(aOrigSize);
+            m_pExampleWN->SetFrameSize(aOrigSize);
             GraphicHasChanged( aOrigSize.Width() && aOrigSize.Height() );
             CalcMinMaxBorder();
         }
@@ -404,19 +394,19 @@ IMPL_LINK( SvxGrfCropPage, ZoomHdl, MetricField *, pField )
     FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
                                                     SID_ATTR_GRAF_CROP ) ) );
 
-    if( pField == &aWidthZoomMF )
+    if( pField == m_pWidthZoomMF )
     {
-        long nLRBorders = lcl_GetValue(aLeftMF, eUnit)
-                         +lcl_GetValue(aRightMF, eUnit);
-        aWidthMF.SetValue( aWidthMF.Normalize(
+        long nLRBorders = lcl_GetValue(*m_pLeftMF, eUnit)
+                         +lcl_GetValue(*m_pRightMF, eUnit);
+        m_pWidthMF->SetValue( m_pWidthMF->Normalize(
             ((aOrigSize.Width() - nLRBorders) * pField->GetValue())/100L),
             eUnit);
     }
     else
     {
-        long nULBorders = lcl_GetValue(aTopMF, eUnit)
-                         +lcl_GetValue(aBottomMF, eUnit);
-        aHeightMF.SetValue( aHeightMF.Normalize(
+        long nULBorders = lcl_GetValue(*m_pTopMF, eUnit)
+                         +lcl_GetValue(*m_pBottomMF, eUnit);
+        m_pHeightMF->SetValue( m_pHeightMF->Normalize(
             ((aOrigSize.Height() - nULBorders ) * pField->GetValue())/100L) ,
             eUnit );
     }
@@ -435,28 +425,28 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, MetricField *, pField )
     FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
                                                     SID_ATTR_GRAF_CROP ) ) );
 
-    Size aSize( lcl_GetValue(aWidthMF, eUnit),
-                lcl_GetValue(aHeightMF, eUnit) );
+    Size aSize( lcl_GetValue(*m_pWidthMF, eUnit),
+                lcl_GetValue(*m_pHeightMF, eUnit) );
 
-    if(pField == &aWidthMF)
+    if(pField == m_pWidthMF)
     {
         long nWidth = aOrigSize.Width() -
-                ( lcl_GetValue(aLeftMF, eUnit) +
-                  lcl_GetValue(aRightMF, eUnit) );
+                ( lcl_GetValue(*m_pLeftMF, eUnit) +
+                  lcl_GetValue(*m_pRightMF, eUnit) );
         if(!nWidth)
             nWidth++;
         sal_uInt16 nZoom = (sal_uInt16)( aSize.Width() * 100L / nWidth);
-        aWidthZoomMF.SetValue(nZoom);
+        m_pWidthZoomMF->SetValue(nZoom);
     }
     else
     {
         long nHeight = aOrigSize.Height() -
-                ( lcl_GetValue(aTopMF, eUnit) +
-                  lcl_GetValue(aBottomMF, eUnit));
+                ( lcl_GetValue(*m_pTopMF, eUnit) +
+                  lcl_GetValue(*m_pBottomMF, eUnit));
         if(!nHeight)
             nHeight++;
         sal_uInt16 nZoom = (sal_uInt16)( aSize.Height() * 100L/ nHeight);
-        aHeightZoomMF.SetValue(nZoom);
+        m_pHeightZoomMF->SetValue(nZoom);
     }
 
     return 0;
@@ -473,66 +463,66 @@ IMPL_LINK( SvxGrfCropPage, CropHdl, const MetricField *, pField )
     FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
                                                     SID_ATTR_GRAF_CROP ) ) );
 
-    sal_Bool bZoom = aZoomConstRB.IsChecked();
-    if( pField == &aLeftMF || pField == &aRightMF )
+    sal_Bool bZoom = m_pZoomConstRB->IsChecked();
+    if( pField == m_pLeftMF || pField == m_pRightMF )
     {
-        long nLeft = lcl_GetValue( aLeftMF, eUnit );
-        long nRight = lcl_GetValue( aRightMF, eUnit );
-        long nWidthZoom = static_cast<long>(aWidthZoomMF.GetValue());
+        long nLeft = lcl_GetValue( *m_pLeftMF, eUnit );
+        long nRight = lcl_GetValue( *m_pRightMF, eUnit );
+        long nWidthZoom = static_cast<long>(m_pWidthZoomMF->GetValue());
         if(bZoom && ( ( ( aOrigSize.Width() - (nLeft + nRight )) * nWidthZoom )
                             / 100 >= aPageSize.Width() ) )
         {
-            if(pField == &aLeftMF)
+            if(pField == m_pLeftMF)
             {
                 nLeft = aOrigSize.Width() -
                             ( aPageSize.Width() * 100 / nWidthZoom + nRight );
-                aLeftMF.SetValue( aLeftMF.Normalize( nLeft ), eUnit );
+                m_pLeftMF->SetValue( m_pLeftMF->Normalize( nLeft ), eUnit );
             }
             else
             {
                 nRight = aOrigSize.Width() -
                             ( aPageSize.Width() * 100 / nWidthZoom + nLeft );
-                aRightMF.SetValue( aRightMF.Normalize( nRight ), eUnit );
+                m_pRightMF->SetValue( m_pRightMF->Normalize( nRight ), eUnit );
             }
         }
-        aExampleWN.SetLeft(nLeft);
-        aExampleWN.SetRight(nRight);
+        m_pExampleWN->SetLeft(nLeft);
+        m_pExampleWN->SetRight(nRight);
         if(bZoom)
         {
             // scale stays, recompute width
-            ZoomHdl(&aWidthZoomMF);
+            ZoomHdl(m_pWidthZoomMF);
         }
     }
     else
     {
-        long nTop = lcl_GetValue( aTopMF, eUnit );
-        long nBottom = lcl_GetValue( aBottomMF, eUnit );
-        long nHeightZoom = static_cast<long>(aHeightZoomMF.GetValue());
+        long nTop = lcl_GetValue( *m_pTopMF, eUnit );
+        long nBottom = lcl_GetValue( *m_pBottomMF, eUnit );
+        long nHeightZoom = static_cast<long>(m_pHeightZoomMF->GetValue());
         if(bZoom && ( ( ( aOrigSize.Height() - (nTop + nBottom )) * nHeightZoom)
                                             / 100 >= aPageSize.Height()))
         {
-            if(pField == &aTopMF)
+            if(pField == m_pTopMF)
             {
                 nTop = aOrigSize.Height() -
                             ( aPageSize.Height() * 100 / nHeightZoom + nBottom);
-                aTopMF.SetValue( aWidthMF.Normalize( nTop ), eUnit );
+                m_pTopMF->SetValue( m_pWidthMF->Normalize( nTop ), eUnit );
             }
             else
             {
                 nBottom = aOrigSize.Height() -
                             ( aPageSize.Height() * 100 / nHeightZoom + nTop);
-                aBottomMF.SetValue( aWidthMF.Normalize( nBottom ), eUnit );
+                m_pBottomMF->SetValue( m_pWidthMF->Normalize( nBottom ), eUnit );
             }
         }
-        aExampleWN.SetTop( nTop );
-        aExampleWN.SetBottom( nBottom );
+        m_pExampleWN->SetTop( nTop );
+        m_pExampleWN->SetBottom( nBottom );
         if(bZoom)
         {
             // scale stays, recompute height
-            ZoomHdl(&aHeightZoomMF);
+            ZoomHdl(m_pHeightZoomMF);
         }
     }
-    aExampleWN.Invalidate();
+    m_pExampleWN->Invalidate();
     // size and border changed -> recompute scale
     if(!bZoom)
         CalcZoom();
@@ -551,15 +541,15 @@ IMPL_LINK_NOARG(SvxGrfCropPage, OrigSizeHdl)
                                                     SID_ATTR_GRAF_CROP ) ) );
 
     long nWidth = aOrigSize.Width() -
-        lcl_GetValue( aLeftMF, eUnit ) -
-        lcl_GetValue( aRightMF, eUnit );
-    aWidthMF.SetValue( aWidthMF.Normalize( nWidth ), eUnit );
+        lcl_GetValue( *m_pLeftMF, eUnit ) -
+        lcl_GetValue( *m_pRightMF, eUnit );
+    m_pWidthMF->SetValue( m_pWidthMF->Normalize( nWidth ), eUnit );
     long nHeight = aOrigSize.Height() -
-        lcl_GetValue( aTopMF, eUnit ) -
-        lcl_GetValue( aBottomMF, eUnit );
-    aHeightMF.SetValue( aHeightMF.Normalize( nHeight ), eUnit );
-    aWidthZoomMF.SetValue(100);
-    aHeightZoomMF.SetValue(100);
+        lcl_GetValue( *m_pTopMF, eUnit ) -
+        lcl_GetValue( *m_pBottomMF, eUnit );
+    m_pHeightMF->SetValue( m_pHeightMF->Normalize( nHeight ), eUnit );
+    m_pWidthZoomMF->SetValue(100);
+    m_pHeightZoomMF->SetValue(100);
     bSetOrigSize = sal_True;
     return 0;
 }
@@ -574,22 +564,22 @@ void SvxGrfCropPage::CalcZoom()
     FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
                                                     SID_ATTR_GRAF_CROP ) ) );
 
-    long nWidth = lcl_GetValue( aWidthMF, eUnit );
-    long nHeight = lcl_GetValue( aHeightMF, eUnit );
-    long nLRBorders = lcl_GetValue( aLeftMF, eUnit ) +
-                      lcl_GetValue( aRightMF, eUnit );
-    long nULBorders = lcl_GetValue( aTopMF, eUnit ) +
-                      lcl_GetValue( aBottomMF, eUnit );
+    long nWidth = lcl_GetValue( *m_pWidthMF, eUnit );
+    long nHeight = lcl_GetValue( *m_pHeightMF, eUnit );
+    long nLRBorders = lcl_GetValue( *m_pLeftMF, eUnit ) +
+                      lcl_GetValue( *m_pRightMF, eUnit );
+    long nULBorders = lcl_GetValue( *m_pTopMF, eUnit ) +
+                      lcl_GetValue( *m_pBottomMF, eUnit );
     sal_uInt16 nZoom = 0;
     long nDen;
     if( (nDen = aOrigSize.Width() - nLRBorders) > 0)
         nZoom = (sal_uInt16)((( nWidth  * 1000L / nDen )+5)/10);
-    aWidthZoomMF.SetValue(nZoom);
+    m_pWidthZoomMF->SetValue(nZoom);
     if( (nDen = aOrigSize.Height() - nULBorders) > 0)
         nZoom = (sal_uInt16)((( nHeight * 1000L / nDen )+5)/10);
     else
         nZoom = 0;
-    aHeightZoomMF.SetValue(nZoom);
+    m_pHeightZoomMF->SetValue(nZoom);
 }
 
 /*--------------------------------------------------------------------
@@ -602,23 +592,23 @@ void SvxGrfCropPage::CalcMinMaxBorder()
     DBG_ASSERT( pPool, "Wo ist der Pool" );
     FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
                                                     SID_ATTR_GRAF_CROP ) ) );
-    long nR = lcl_GetValue(aRightMF, eUnit );
+    long nR = lcl_GetValue(*m_pRightMF, eUnit );
     long nMinWidth = (aOrigSize.Width() * 10) /11;
     long nMin = nMinWidth - (nR >= 0 ? nR : 0);
-    aLeftMF.SetMax( aLeftMF.Normalize(nMin), eUnit );
+    m_pLeftMF->SetMax( m_pLeftMF->Normalize(nMin), eUnit );
 
-    long nL = lcl_GetValue(aLeftMF, eUnit );
+    long nL = lcl_GetValue(*m_pLeftMF, eUnit );
     nMin = nMinWidth - (nL >= 0 ? nL : 0);
-    aRightMF.SetMax( aRightMF.Normalize(nMin), eUnit );
+    m_pRightMF->SetMax( m_pRightMF->Normalize(nMin), eUnit );
 
-    long nUp  = lcl_GetValue( aTopMF, eUnit );
+    long nUp  = lcl_GetValue( *m_pTopMF, eUnit );
     long nMinHeight = (aOrigSize.Height() * 10) /11;
     nMin = nMinHeight - (nUp >= 0 ? nUp : 0);
-    aBottomMF.SetMax( aBottomMF.Normalize(nMin), eUnit );
+    m_pBottomMF->SetMax( m_pBottomMF->Normalize(nMin), eUnit );
 
-    long nLow = lcl_GetValue(aBottomMF, eUnit );
+    long nLow = lcl_GetValue(*m_pBottomMF, eUnit );
     nMin = nMinHeight - (nLow >= 0 ? nLow : 0);
-    aTopMF.SetMax( aTopMF.Normalize(nMin), eUnit );
+    m_pTopMF->SetMax( m_pTopMF->Normalize(nMin), eUnit );
 }
 /*--------------------------------------------------------------------
     description:   set spinsize to 1/20 of the original size,
@@ -634,46 +624,46 @@ void SvxGrfCropPage::GraphicHasChanged( sal_Bool bFound )
         FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
                                                     SID_ATTR_GRAF_CROP ) ));
 
-        sal_Int64 nSpin = aLeftMF.Normalize(aOrigSize.Width()) / 20;
+        sal_Int64 nSpin = m_pLeftMF->Normalize(aOrigSize.Width()) / 20;
         nSpin = MetricField::ConvertValue( nSpin, aOrigSize.Width(), 0,
-                                               eUnit, aLeftMF.GetUnit());
+                                               eUnit, m_pLeftMF->GetUnit());
 
         // if the margin is too big, it is set to 1/3 on both pages
-        long nR = lcl_GetValue( aRightMF, eUnit );
-        long nL = lcl_GetValue( aLeftMF, eUnit );
+        long nR = lcl_GetValue( *m_pRightMF, eUnit );
+        long nL = lcl_GetValue( *m_pLeftMF, eUnit );
         if((nL + nR) < - aOrigSize.Width())
         {
             long nVal = aOrigSize.Width() / -3;
-            aRightMF.SetValue( aRightMF.Normalize( nVal ), eUnit );
-            aLeftMF.SetValue( aLeftMF.Normalize( nVal ), eUnit );
-            aExampleWN.SetLeft(nVal);
-            aExampleWN.SetRight(nVal);
+            m_pRightMF->SetValue( m_pRightMF->Normalize( nVal ), eUnit );
+            m_pLeftMF->SetValue( m_pLeftMF->Normalize( nVal ), eUnit );
+            m_pExampleWN->SetLeft(nVal);
+            m_pExampleWN->SetRight(nVal);
         }
-        long nUp  = lcl_GetValue(aTopMF, eUnit );
-        long nLow = lcl_GetValue(aBottomMF, eUnit );
+        long nUp  = lcl_GetValue(*m_pTopMF, eUnit );
+        long nLow = lcl_GetValue(*m_pBottomMF, eUnit );
         if((nUp + nLow) < - aOrigSize.Height())
         {
             long nVal = aOrigSize.Height() / -3;
-            aTopMF.SetValue( aTopMF.Normalize( nVal ), eUnit );
-            aBottomMF.SetValue( aBottomMF.Normalize( nVal ), eUnit );
-            aExampleWN.SetTop(nVal);
-            aExampleWN.SetBottom(nVal);
+            m_pTopMF->SetValue( m_pTopMF->Normalize( nVal ), eUnit );
+            m_pBottomMF->SetValue( m_pBottomMF->Normalize( nVal ), eUnit );
+            m_pExampleWN->SetTop(nVal);
+            m_pExampleWN->SetBottom(nVal);
         }
 
-        aLeftMF.SetSpinSize(nSpin);
-        aRightMF.SetSpinSize(nSpin);
-        nSpin = aTopMF.Normalize(aOrigSize.Height()) / 20;
+        m_pLeftMF->SetSpinSize(nSpin);
+        m_pRightMF->SetSpinSize(nSpin);
+        nSpin = m_pTopMF->Normalize(aOrigSize.Height()) / 20;
         nSpin = MetricField::ConvertValue( nSpin, aOrigSize.Width(), 0,
-                                               eUnit, aLeftMF.GetUnit() );
-        aTopMF.SetSpinSize(nSpin);
-        aBottomMF.SetSpinSize(nSpin);
+                                               eUnit, m_pLeftMF->GetUnit() );
+        m_pTopMF->SetSpinSize(nSpin);
+        m_pBottomMF->SetSpinSize(nSpin);
 
         // display original size
         const FieldUnit eMetric = GetModuleFieldUnit( GetItemSet() );
 
         MetricField aFld(this, WB_HIDE);
         SetFieldUnit( aFld, eMetric );
-        aFld.SetDecimalDigits( aWidthMF.GetDecimalDigits() );
+        aFld.SetDecimalDigits( m_pWidthMF->GetDecimalDigits() );
         aFld.SetMax( LONG_MAX - 1 );
 
         aFld.SetValue( aFld.Normalize( aOrigSize.Width() ), eUnit );
@@ -689,7 +679,7 @@ void SvxGrfCropPage::GraphicHasChanged( sal_Bool bFound )
              sal_Int32 ay = sal_Int32(floor((float)aOrigPixelSize.Height() /
                         ((float)aOrigSize.Height()/TWIP_TO_INCH)+0.5));
              sTemp += " ";
-             sTemp += CUI_RESSTR( STR_PPI );
+             sTemp += CUI_RESSTR( RID_SVXSTR_PPI );
              OUString sPPI = OUString::number(ax);
              if (abs(ax - ay) > 1) {
                 sPPI += OUString( sal_Unicode (0x00D7) );
@@ -697,29 +687,14 @@ void SvxGrfCropPage::GraphicHasChanged( sal_Bool bFound )
              }
              sTemp = sTemp.replaceAll("%1", sPPI);
         }
-        aOrigSizeFT.SetText( sTemp );
+        m_pOrigSizeFT->SetText( sTemp );
     }
-    aLeftFT         .Enable(bFound);
-    aLeftMF         .Enable(bFound);
-    aRightFT        .Enable(bFound);
-    aRightMF        .Enable(bFound);
-    aTopFT          .Enable(bFound);
-    aTopMF          .Enable(bFound);
-    aBottomFT       .Enable(bFound);
-    aBottomMF       .Enable(bFound);
-    aSizeConstRB    .Enable(bFound);
-    aZoomConstRB    .Enable(bFound);
-    aWidthFT        .Enable(bFound);
-    aWidthMF        .Enable(bFound);
-    aHeightFT       .Enable(bFound);
-    aHeightMF       .Enable(bFound);
-    aWidthZoomFT    .Enable(bFound);
-    aWidthZoomMF    .Enable(bFound);
-    aHeightZoomFT   .Enable(bFound);
-    aHeightZoomMF   .Enable(bFound);
-    aExampleWN      .Enable(bFound);
-    aOrigSizePB     .Enable(bFound);
-    aOrigSizeFT     .Enable(bFound);
+
+    m_pCropFrame->Enable(bFound);
+    m_pScaleFrame->Enable(bFound);
+    m_pSizeFrame->Enable(bFound);
+    m_pOrigSizeGrid->Enable(bFound);
+    m_pZoomConstRB->Enable(bFound);
 }
 
 IMPL_LINK_NOARG(SvxGrfCropPage, Timeout)
@@ -761,18 +736,32 @@ Size SvxGrfCropPage::GetGrfOrigSize( const Graphic& rGrf ) const
 
 /*****************************************************************/
 
-SvxGrfCropPage::SvxCropExample::SvxCropExample( Window* pPar,
-                                                const ResId& rResId )
-    : Window( pPar, rResId ),
-    aFrameSize( OutputDevice::LogicToLogic(
+SvxCropExample::SvxCropExample( Window* pPar, WinBits nStyle )
+    : Window( pPar, nStyle)
+    , aFrameSize( OutputDevice::LogicToLogic(
                             Size( CM_1_TO_TWIP / 2, CM_1_TO_TWIP / 2 ),
-                            MapMode( MAP_TWIP ), GetMapMode() )),
-    aTopLeft(0,0), aBottomRight(0,0)
+                            MapMode( MAP_TWIP ), GetMapMode() ))
+    , aTopLeft(0,0)
+    , aBottomRight(0,0)
 {
     SetBorderStyle( WINDOW_BORDER_MONO );
 }
 
-void SvxGrfCropPage::SvxCropExample::Paint( const Rectangle& )
+Size SvxCropExample::GetOptimalSize() const
+{
+    return LogicToPixel(Size(78, 78), MAP_APPFONT);
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxCropExample(Window *pParent, VclBuilder::stringmap &rMap)
+{
+    WinBits nWinStyle = 0;
+    OString sBorder = VclBuilder::extractCustomProperty(rMap);
+    if (!sBorder.isEmpty())
+        nWinStyle |= WB_BORDER;
+    return new SvxCropExample(pParent, nWinStyle);
+}
+
+void SvxCropExample::Paint( const Rectangle& )
 {
     Size aWinSize( PixelToLogic(GetOutputSizePixel() ));
     SetLineColor();
@@ -797,7 +786,7 @@ void SvxGrfCropPage::SvxCropExample::Paint( const Rectangle& )
     DrawRect( aRect );
 }
 
-void SvxGrfCropPage::SvxCropExample::SetFrameSize( const Size& rSz )
+void SvxCropExample::SetFrameSize( const Size& rSz )
 {
     aFrameSize = rSz;
     if(!aFrameSize.Width())
diff --git a/cui/source/tabpages/grfpage.hrc b/cui/source/tabpages/grfpage.hrc
deleted file mode 100644
index 52476f1..0000000
--- a/cui/source/tabpages/grfpage.hrc
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#define FT_BOTTOM           1
-#define FT_HEIGHT           2
-#define FT_HEIGHTZOOM       3
-#define FT_LEFT             4
-#define FT_ORIG_SIZE        5
-#define FT_RIGHT            6
-#define FT_TOP              7
-#define FT_WIDTH            8
-#define FT_WIDTHZOOM        9
-#define FL_CROP             10
-#define FL_SIZE             12
-#define FL_ZOOM             13
-#define MF_BOTTOM           14
-#define MF_HEIGHT           15
-#define MF_HEIGHTZOOM       16
-#define MF_LEFT             17
-#define MF_RIGHT            18
-#define MF_TOP              19
-#define MF_WIDTH            20
-#define MF_WIDTHZOOM        21
-#define PB_ORGSIZE          22
-#define RB_SIZECONST        23
-#define RB_ZOOMCONST        24
-#define WN_BSP              25
-#define STR_PPI             2600
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/grfpage.src b/cui/source/tabpages/grfpage.src
deleted file mode 100644
index 0b26fbf..0000000
--- a/cui/source/tabpages/grfpage.src
+++ /dev/null
@@ -1,305 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <cuires.hrc>
-#include "helpid.hrc"
-#include "grfpage.hrc"
-#include <svx/dialogs.hrc>
-
-/************************************************************/
-/*                                                                                                                  */
-/*                                                                                                                  */
-/*                                   Crop-Page                                                          */
-/*                                                                                                                  */
-/*                                                                                                                  */
-/************************************************************/
-TabPage RID_SVXPAGE_GRFCROP
-{
-    Hide = TRUE ;
-    HelpID = HID_SVXPAGE_GRFCROP;
-    SVLook = TRUE ;
-    Pos = MAP_APPFONT ( 0 , 0 ) ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    FixedLine FL_CROP
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 164 , 8 ) ;
-        Text [ en-US ] = "Crop" ;
-    };
-    FixedText FT_LEFT
-    {
-        Pos = MAP_APPFONT ( 12 , 44 ) ;
-        Size = MAP_APPFONT ( 28 , 8 ) ;
-        Text [ en-US ] = "~Left" ;
-    };
-    MetricField MF_LEFT
-    {
-        HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_LEFT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 42 , 42 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        Text = "12,99" ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = -9999 ;
-        Maximum = 9999 ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        First = 0 ;
-        Last = 9999 ;
-        SpinSize = 10 ;
-    };
-    FixedText FT_RIGHT
-    {
-        Pos = MAP_APPFONT ( 12 , 60 ) ;
-        Size = MAP_APPFONT ( 28 , 8 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "~Right" ;
-    };
-    MetricField MF_RIGHT
-    {
-        HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_RIGHT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 42 , 58 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = -9999 ;
-        Maximum = 9999 ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        First = 0 ;
-        Last = 9999 ;
-        SpinSize = 10 ;
-    };
-    FixedText FT_TOP
-    {
-        Pos = MAP_APPFONT ( 94 , 44 ) ;
-        Size = MAP_APPFONT ( 28 , 8 ) ;
-        Text [ en-US ] = "~Top" ;
-    };
-    MetricField MF_TOP
-    {
-        HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_TOP";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 124 , 42 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        Text = "12,99" ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = -9999 ;
-        Maximum = 9999 ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        First = 0 ;
-        Last = 9999 ;
-        SpinSize = 10 ;
-    };
-    FixedText FT_BOTTOM
-    {
-        Pos = MAP_APPFONT ( 94 , 60 ) ;
-        Size = MAP_APPFONT ( 28 , 8 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "~Bottom" ;
-    };
-    MetricField MF_BOTTOM
-    {
-        HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_BOTTOM";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 124 , 58 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = -9999 ;
-        Maximum = 9999 ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        First = 0 ;
-        Last = 9999 ;
-        SpinSize = 10 ;
-    };
-    RadioButton RB_SIZECONST
-    {
-        HelpID = "cui:RadioButton:RID_SVXPAGE_GRFCROP:RB_SIZECONST";
-        Pos = MAP_APPFONT ( 12 , 28 ) ;
-        Size = MAP_APPFONT ( 152 , 10 ) ;
-        Text [ en-US ] = "Keep image si~ze" ;
-    };
-    RadioButton RB_ZOOMCONST
-    {
-        HelpID = "cui:RadioButton:RID_SVXPAGE_GRFCROP:RB_ZOOMCONST";
-        Pos = MAP_APPFONT ( 12 , 14 ) ;
-        Size = MAP_APPFONT ( 152 , 10 ) ;
-        Check = TRUE ;
-        Text [ en-US ] = "Keep ~scale" ;
-    };
-    Window WN_BSP
-    {
-        Pos = MAP_APPFONT ( 176 , 6 ) ;
-        Size = MAP_APPFONT ( 78 , 78 ) ;
-        Border = TRUE ;
-    };
-    FixedLine FL_ZOOM
-    {
-        Pos = MAP_APPFONT ( 6, 76 ) ;
-        Size = MAP_APPFONT ( 164 , 8 ) ;
-        Text [ en-US ] = "Scale" ;
-    };
-    FixedText FT_WIDTHZOOM
-    {
-        Left = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 89 ) ;
-        Size = MAP_APPFONT ( 28 , 8 ) ;
-        Text [ en-US ] = "~Width" ;
-    };
-    MetricField MF_WIDTHZOOM
-    {
-        HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_WIDTHZOOM";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 42 , 87 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        Text = "12,99" ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 1 ;
-        Maximum = 9999 ;
-        First = 5 ;
-        Last = 1000 ;
-        Maximum = 9999 ;
-        Value = 100 ;
-        Unit = FUNIT_CUSTOM ;
-        CustomUnitText = "%" ;
-        SpinSize = 10 ;
-    };
-    FixedText FT_HEIGHTZOOM
-    {
-        Pos = MAP_APPFONT ( 12 , 105 ) ;
-        Size = MAP_APPFONT ( 28 , 8 ) ;
-        Text [ en-US ] = "H~eight" ;
-        Left = TRUE ;
-    };
-    MetricField MF_HEIGHTZOOM
-    {
-        HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_HEIGHTZOOM";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 42 , 103 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 1 ;
-        Maximum = 9999 ;
-        First = 5 ;
-        Last = 1000 ;
-        Maximum = 9999 ;
-        Value = 100 ;
-        Unit = FUNIT_CUSTOM ;
-        CustomUnitText = "%" ;
-        SpinSize = 10 ;
-    };
-    FixedLine FL_SIZE
-    {
-        Pos = MAP_APPFONT ( 6 , 121 ) ;
-        Size = MAP_APPFONT ( 164 , 8 ) ;
-        Text [ en-US ] = "Image size" ;
-    };
-    FixedText FT_WIDTH
-    {
-        Pos = MAP_APPFONT ( 12 , 134 ) ;
-        Size = MAP_APPFONT ( 28 , 8 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "~Width" ;
-    };
-    MetricField MF_WIDTH
-    {
-        HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_WIDTH";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 42 , 132 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        Text = "12,99" ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 5 ;
-        Maximum = 20000 ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        First = 5 ;
-        Last = 20000 ;
-        SpinSize = 10 ;
-    };
-    FixedText FT_HEIGHT
-    {
-        Pos = MAP_APPFONT ( 12 , 150 ) ;
-        Size = MAP_APPFONT ( 28 , 8 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "H~eight" ;
-    };
-    MetricField MF_HEIGHT
-    {
-        HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_HEIGHT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 42 , 148 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 5 ;
-        Maximum = 20000 ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        First = 5 ;
-        Last = 20000 ;
-        SpinSize = 10 ;
-    };
-    FixedText FT_ORIG_SIZE
-    {
-        Pos = MAP_APPFONT ( 176 , 132 ) ;
-        Size = MAP_APPFONT ( 74 , 8 ) ;
-    };
-    PushButton PB_ORGSIZE
-    {
-        HelpID = "cui:PushButton:RID_SVXPAGE_GRFCROP:PB_ORGSIZE";
-        Pos = MAP_APPFONT ( 176 , 143 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Original Size" ;
-    };
-};
-
-String STR_PPI
-{
-    Text [ x-comment ] = "PPI is pixel per inch, %1 is a number" ;
-    Text [ en-US ] = "(%1 PPI)" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/croppage.ui b/cui/uiconfig/ui/croppage.ui
new file mode 100644
index 0000000..fd49a76
--- /dev/null
+++ b/cui/uiconfig/ui/croppage.ui
@@ -0,0 +1,568 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">-99.989999999999995</property>
+    <property name="upper">99.989999999999995</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">1</property>
+    <property name="upper">9999</property>
+    <property name="value">100</property>
+    <property name="step_increment">10</property>
+    <property name="page_increment">100</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="lower">0.050000000000000003</property>
+    <property name="upper">200</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkGrid" id="CropPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="valign">start</property>
+    <property name="hexpand">True</property>
+    <property name="border_width">6</property>
+    <property name="row_spacing">12</property>
+    <property name="column_spacing">18</property>
+    <child>
+      <object class="GtkFrame" id="cropframe">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkGrid" id="grid10">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">18</property>
+                <child>
+                  <object class="GtkRadioButton" id="keepscale">
+                    <property name="label" translatable="yes">Keep _scale</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="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">keepsize</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">2</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="keepsize">
+                    <property name="label" translatable="yes">Keep image si_ze</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>
+                    <property name="group">keepscale</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">2</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="grid1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">12</property>
+                    <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">_Left</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">left:0.00cm</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>
+                    <child>
+                      <object class="GtkSpinButton" id="left:0.00cm">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">•</property>
+                        <property name="adjustment">adjustment1</property>
+                        <property name="digits">2</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="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Right</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">right:0.00cm</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="GtkSpinButton" id="right:0.00cm">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">•</property>
+                        <property name="invisible_char_set">True</property>
+                        <property name="adjustment">adjustment1</property>
+                        <property name="digits">2</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</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">2</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>
+                    <property name="column_spacing">12</property>
+                    <child>
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Top</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">top:0.00cm</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>
+                    <child>
+                      <object class="GtkLabel" id="label5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Bottom</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">bottom:0.00cm</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="GtkSpinButton" id="top:0.00cm">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">•</property>
+                        <property name="invisible_char_set">True</property>
+                        <property name="adjustment">adjustment1</property>
+                        <property name="digits">2</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="GtkSpinButton" id="bottom:0.00cm">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">•</property>
+                        <property name="invisible_char_set">True</property>
+                        <property name="adjustment">adjustment1</property>
+                        <property name="digits">2</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</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">Crop</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </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="GtkFrame" id="scaleframe">
+        <property name="visible">True</property>
+        <property name="can_focus">False</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="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkGrid" id="grid4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="label6">
+                    <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">widthzoom:0%</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>
+                <child>
+                  <object class="GtkSpinButton" id="widthzoom:0%">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="adjustment">adjustment2</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="GtkLabel" id="label7">
+                    <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">heightzoom:0%</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="GtkSpinButton" id="heightzoom:0%">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="adjustment">adjustment2</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label10">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Scale</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </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="GtkFrame" id="sizeframe">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">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>
+                <property name="column_spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="label8">
+                    <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:0.00cm</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>
+                <child>
+                  <object class="GtkSpinButton" id="width:0.00cm">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="adjustment">adjustment3</property>
+                    <property name="digits">2</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="GtkLabel" id="label9">
+                    <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:0.00cm</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="GtkSpinButton" id="height:0.00cm">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="adjustment">adjustment3</property>
+                    <property name="digits">2</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label11">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Image size</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </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>
+    <child>
+      <object class="GtkGrid" id="grid5">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <child>
+          <object class="cuilo-SvxCropExample" id="preview:border">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="halign">center</property>
+            <property name="hexpand">True</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>
+        <child>
+          <object class="GtkGrid" id="origsizegrid">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="halign">center</property>
+            <property name="valign">end</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="row_spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="origsizeft">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">origsize</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>
+            <child>
+              <object class="GtkButton" id="origsize">
+                <property name="label" translatable="yes">_Original Size</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</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>
+          </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>
+      </object>
+      <packing>
+        <property name="left_attach">1</property>
+        <property name="top_attach">0</property>
+        <property name="width">1</property>
+        <property name="height">3</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup1">
+    <widgets>
+      <widget name="label2"/>
+      <widget name="label3"/>
+      <widget name="label4"/>
+      <widget name="label5"/>
+      <widget name="label6"/>
+      <widget name="label7"/>
+      <widget name="label8"/>
+      <widget name="label9"/>
+    </widgets>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroup2">
+    <widgets>
+      <widget name="left:0.00cm"/>
+      <widget name="right:0.00cm"/>
+      <widget name="top:0.00cm"/>
+      <widget name="bottom:0.00cm"/>
+      <widget name="widthzoom:0%"/>
+      <widget name="heightzoom:0%"/>
+      <widget name="width:0.00cm"/>
+      <widget name="height:0.00cm"/>
+    </widgets>
+  </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 55da1eb..fda723f 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -543,6 +543,10 @@
                         generic-name="ClientBox" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
 
+    <glade-widget-class title="CropExample" name="cuilo-SvxCropExample"
+                        generic-name="CropExample" parent="GtkDrawingArea"
+                        icon-name="widget-gtk-drawingarea"/>
+
     <glade-widget-class title="Recent Documents View" name="sfxlo-RecentDocsView"
                         generic-name="Icon View" parent="GtkIconView"
                         icon-name="widget-gtk-iconview"/>


More information about the Libreoffice-commits mailing list