[Libreoffice-commits] core.git: 3 commits - extras/source svtools/source sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk vcl/unx

Caolán McNamara caolanm at redhat.com
Mon Aug 12 06:18:52 PDT 2013


 extras/source/glade/libreoffice-catalog.xml.in |    3 
 svtools/source/contnr/simptabl.cxx             |    2 
 sw/UIConfig_swriter.mk                         |    1 
 sw/inc/helpid.h                                |    1 
 sw/source/ui/envelp/labfmt.cxx                 |  382 +++++++++++------------
 sw/source/ui/envelp/labfmt.hrc                 |   28 -
 sw/source/ui/envelp/labfmt.hxx                 |   57 +--
 sw/source/ui/envelp/labfmt.src                 |  245 --------------
 sw/uiconfig/swriter/ui/labelformatpage.ui      |  414 +++++++++++++++++++++++++
 vcl/unx/kde/UnxFilePicker.cxx                  |    2 
 vcl/unx/kde4/KDE4FilePicker.cxx                |    2 
 11 files changed, 628 insertions(+), 509 deletions(-)

New commits:
commit 05dab8aef3becce2f17aa72484c5948927997d16
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 12 11:19:42 2013 +0100

    convert label layout tab to .ui
    
    Change-Id: Ice1a9b365426059704438da5fee2e4470cfb3f72

diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 267ad83..c692556 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -314,6 +314,9 @@
     <glade-widget-class title="NUP Preview" name="vcllo-ShowNupOrderWindow"
                         generic-name="NUP Preview" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
+    <glade-widget-class title="Label Preview" name="swuilo-SwLabPreview"
+                        generic-name="Label Preview" parent="GtkDrawingArea"
+                        icon-name="widget-gtk-drawingarea"/>
     <glade-widget-class title="Rectangle Control" name="svxlo-SvxRectCtl"
                         generic-name="Rectangle Control" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index f573d71..311364c 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -103,6 +103,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/insertsectiondialog \
 	sw/uiconfig/swriter/ui/insertscript \
 	sw/uiconfig/swriter/ui/inserttable \
+	sw/uiconfig/swriter/ui/labelformatpage \
 	sw/uiconfig/swriter/ui/labeloptionspage \
 	sw/uiconfig/swriter/ui/linenumbering \
 	sw/uiconfig/swriter/ui/mailconfigpage \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index d8d4430..3c54ef4 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -145,7 +145,6 @@
 #define HID_FRM_STD                                             "SW_HID_FRM_STD"
 #define HID_GRF_EXT                                             "SW_HID_GRF_EXT"
 #define HID_ENV_PRT                                             "SW_HID_ENV_PRT"
-#define HID_LAB_FMT                                             "SW_HID_LAB_FMT"
 #define HID_ENV_ENV                                             "SW_HID_ENV_ENV"
 #define HID_ENV_FMT                                             "SW_HID_ENV_FMT"
 #define HID_COND_COLL                                           "SW_HID_COND_COLL"
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 947ee59..06b7dd8 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -40,22 +40,19 @@ using namespace ::com::sun::star::beans;
 
 #define ROUND(x) ((sal_uInt16) ((x) + .5))
 
-SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
-
-    Window((Window*) pParent, rResID),
-
-    aGrayColor(COL_LIGHTGRAY),
-
-    aHDistStr (SW_RES(STR_HDIST )),
-    aVDistStr (SW_RES(STR_VDIST )),
-    aWidthStr (SW_RES(STR_WIDTH )),
-    aHeightStr(SW_RES(STR_HEIGHT)),
-    aLeftStr  (SW_RES(STR_LEFT  )),
-    aUpperStr (SW_RES(STR_UPPER )),
-    aColsStr  (SW_RES(STR_COLS  )),
-    aRowsStr  (SW_RES(STR_ROWS  )),
-    aPWidthStr (SW_RES(STR_PWIDTH )),
-    aPHeightStr(SW_RES(STR_PHEIGHT))
+SwLabPreview::SwLabPreview(Window* pParent)
+    : Window(pParent, 0)
+    , aGrayColor(COL_LIGHTGRAY)
+    , aHDistStr(SW_RESSTR(STR_HDIST))
+    , aVDistStr(SW_RESSTR(STR_VDIST))
+    , aWidthStr(SW_RESSTR(STR_WIDTH))
+    , aHeightStr(SW_RESSTR(STR_HEIGHT))
+    , aLeftStr(SW_RESSTR(STR_LEFT))
+    , aUpperStr(SW_RESSTR(STR_UPPER))
+    , aColsStr(SW_RESSTR(STR_COLS))
+    , aRowsStr(SW_RESSTR(STR_ROWS))
+    , aPWidthStr(SW_RESSTR(STR_PWIDTH))
+    , aPHeightStr(SW_RESSTR(STR_PHEIGHT))
 {
     SetMapMode(MAP_PIXEL);
 
@@ -68,12 +65,6 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
     aFont.SetWeight  (WEIGHT_NORMAL);
     SetFont(aFont);
 
-    const Size aSz(GetOutputSizePixel());
-
-    lOutWPix   = aSz.Width ();
-    lOutHPix   = aSz.Height();
-
-
     lHDistWidth  = GetTextWidth(aHDistStr );
     lVDistWidth  = GetTextWidth(aVDistStr );
     lHeightWidth = GetTextWidth(aHeightStr);
@@ -84,20 +75,31 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
     lPHeightWidth = GetTextWidth(aPHeightStr);
     lXHeight = GetTextHeight();
     lXWidth  = GetTextWidth(OUString('X'));
+}
 
-    // Scale factor
-    float fx = (float)(lOutWPix - (2 * (lLeftWidth + 15))) / (float)lOutWPix;
-
-    lOutWPix23 = (long)((float)lOutWPix * fx);
-    lOutHPix23 = (long)((float)lOutHPix * fx);
+Size SwLabPreview::GetOptimalSize() const
+{
+    return LogicToPixel(Size(146 , 161), MapMode(MAP_APPFONT));
 }
 
-SwLabPreview::~SwLabPreview()
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwLabPreview(Window *pParent, VclBuilder::stringmap &)
 {
+    return new SwLabPreview(pParent);
 }
 
 void SwLabPreview::Paint(const Rectangle &)
 {
+    const Size aSz(GetOutputSizePixel());
+
+    long lOutWPix   = aSz.Width ();
+    long lOutHPix   = aSz.Height();
+
+    // Scale factor
+    float fxpix = (float)(lOutWPix - (2 * (lLeftWidth + 15))) / (float)lOutWPix;
+
+    long lOutWPix23 = (long)((float)lOutWPix * fxpix);
+    long lOutHPix23 = (long)((float)lOutHPix * fxpix);
+
     const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
     const Color& rWinColor = rStyleSettings.GetWindowColor();
     const Color& rFieldTextColor = SwViewOption::GetFontColor();
@@ -282,82 +284,72 @@ void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, bool bArrow)
     }
 }
 
-void SwLabPreview::Update(const SwLabItem& rItem)
+void SwLabPreview::UpdateItem(const SwLabItem& rItem)
 {
     aItem = rItem;
     Invalidate();
 }
 
-SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
-
-    SfxTabPage(pParent, SW_RES(TP_LAB_FMT), rSet),
-    aMakeFI      (this, SW_RES(FI_MAKE)),
-    aTypeFI      (this, SW_RES(FI_TYPE)),
-    aPreview     (this, SW_RES(WIN_PREVIEW)),
-    aHDistText   (this, SW_RES(TXT_HDIST  )),
-    aHDistField  (this, SW_RES(FLD_HDIST  )),
-    aVDistText   (this, SW_RES(TXT_VDIST  )),
-    aVDistField  (this, SW_RES(FLD_VDIST  )),
-    aWidthText   (this, SW_RES(TXT_WIDTH  )),
-    aWidthField  (this, SW_RES(FLD_WIDTH  )),
-    aHeightText  (this, SW_RES(TXT_HEIGHT )),
-    aHeightField (this, SW_RES(FLD_HEIGHT )),
-    aLeftText    (this, SW_RES(TXT_LEFT  )),
-    aLeftField   (this, SW_RES(FLD_LEFT  )),
-    aUpperText   (this, SW_RES(TXT_UPPER  )),
-    aUpperField  (this, SW_RES(FLD_UPPER  )),
-    aColsText    (this, SW_RES(TXT_COLUMNS)),
-    aColsField   (this, SW_RES(FLD_COLUMNS)),
-    aRowsText    (this, SW_RES(TXT_ROWS  )),
-    aRowsField   (this, SW_RES(FLD_ROWS  )),
-    aPWidthText   (this, SW_RES(TXT_PWIDTH  )),
-    aPWidthField  (this, SW_RES(FLD_PWIDTH  )),
-    aPHeightText  (this, SW_RES(TXT_PHEIGHT )),
-    aPHeightField (this, SW_RES(FLD_PHEIGHT )),
-    aSavePB      (this, SW_RES(PB_SAVE  )),
-    bModified(false),
-    aItem        ((const SwLabItem&) rSet.Get(FN_LABEL))
+SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet)
+    : SfxTabPage(pParent, "LabelFormatPage",
+        "modules/swriter/ui/labelformatpage.ui", rSet)
+    , bModified(false)
+    , aItem((const SwLabItem&) rSet.Get(FN_LABEL))
 {
-    FreeResource();
     SetExchangeSupport();
 
+    get(m_pMakeFI, "make");
+    get(m_pTypeFI, "type");
+    get(m_pPreview, "preview");
+    get(m_pHDistField, "hori");
+    get(m_pVDistField, "vert");
+    get(m_pWidthField, "width");
+    get(m_pHeightField, "height");
+    get(m_pLeftField, "left");
+    get(m_pUpperField, "top");
+    get(m_pColsField, "cols");
+    get(m_pRowsField, "rows");
+    get(m_pPWidthField, "pagewidth");
+    get(m_pPHeightField, "pageheight");
+    get(m_pSavePB, "save");
+
     // Metrics
     FieldUnit aMetric = ::GetDfltMetric(sal_False);
-    SetMetric(aHDistField , aMetric);
-    SetMetric(aVDistField , aMetric);
-    SetMetric(aWidthField , aMetric);
-    SetMetric(aHeightField, aMetric);
-    SetMetric(aLeftField  , aMetric);
-    SetMetric(aUpperField , aMetric);
-    SetMetric(aPWidthField , aMetric);
-    SetMetric(aPHeightField, aMetric);
+    SetMetric(*m_pHDistField, aMetric);
+    SetMetric(*m_pVDistField , aMetric);
+    SetMetric(*m_pWidthField , aMetric);
+    SetMetric(*m_pHeightField, aMetric);
+    SetMetric(*m_pLeftField  , aMetric);
+    SetMetric(*m_pUpperField , aMetric);
+    SetMetric(*m_pPWidthField , aMetric);
+    SetMetric(*m_pPHeightField, aMetric);
 
     // Install handlers
     Link aLk = LINK(this, SwLabFmtPage, ModifyHdl);
-    aHDistField .SetModifyHdl( aLk );
-    aVDistField .SetModifyHdl( aLk );
-    aWidthField .SetModifyHdl( aLk );
-    aHeightField.SetModifyHdl( aLk );
-    aLeftField  .SetModifyHdl( aLk );
-    aUpperField .SetModifyHdl( aLk );
-    aColsField  .SetModifyHdl( aLk );
-    aRowsField  .SetModifyHdl( aLk );
-    aPWidthField .SetModifyHdl( aLk );
-    aPHeightField.SetModifyHdl( aLk );
+    m_pHDistField->SetModifyHdl( aLk );
+    m_pVDistField->SetModifyHdl( aLk );
+    m_pWidthField->SetModifyHdl( aLk );
+    m_pHeightField->SetModifyHdl( aLk );
+    m_pLeftField->SetModifyHdl( aLk );
+    m_pUpperField->SetModifyHdl( aLk );
+    m_pColsField->SetModifyHdl( aLk );
+    m_pRowsField->SetModifyHdl( aLk );
+    m_pPWidthField->SetModifyHdl( aLk );
+    m_pPHeightField->SetModifyHdl( aLk );
 
     aLk = LINK(this, SwLabFmtPage, LoseFocusHdl);
-    aHDistField .SetLoseFocusHdl( aLk );
-    aVDistField .SetLoseFocusHdl( aLk );
-    aWidthField .SetLoseFocusHdl( aLk );
-    aHeightField.SetLoseFocusHdl( aLk );
-    aLeftField  .SetLoseFocusHdl( aLk );
-    aUpperField .SetLoseFocusHdl( aLk );
-    aColsField  .SetLoseFocusHdl( aLk );
-    aRowsField  .SetLoseFocusHdl( aLk );
-    aPWidthField .SetLoseFocusHdl( aLk );
-    aPHeightField.SetLoseFocusHdl( aLk );
-
-    aSavePB.SetClickHdl( LINK (this, SwLabFmtPage, SaveHdl));
+    m_pHDistField->SetLoseFocusHdl( aLk );
+    m_pVDistField->SetLoseFocusHdl( aLk );
+    m_pWidthField->SetLoseFocusHdl( aLk );
+    m_pHeightField->SetLoseFocusHdl( aLk );
+    m_pLeftField->SetLoseFocusHdl( aLk );
+    m_pUpperField->SetLoseFocusHdl( aLk );
+    m_pColsField->SetLoseFocusHdl( aLk );
+    m_pRowsField->SetLoseFocusHdl( aLk );
+    m_pPWidthField->SetLoseFocusHdl( aLk );
+    m_pPHeightField->SetLoseFocusHdl( aLk );
+
+    m_pSavePB->SetClickHdl( LINK (this, SwLabFmtPage, SaveHdl));
     // Set timer
     aPreviewTimer.SetTimeout(1000);
     aPreviewTimer.SetTimeoutHdl(LINK(this, SwLabFmtPage, PreviewHdl));
@@ -382,7 +374,7 @@ IMPL_LINK_NOARG_INLINE_START(SwLabFmtPage, PreviewHdl)
     aPreviewTimer.Stop();
     ChangeMinMax();
     FillItem( aItem );
-    aPreview.Update( aItem );
+    m_pPreview->UpdateItem( aItem );
 
     return 0;
 }
@@ -404,76 +396,76 @@ void SwLabFmtPage::ChangeMinMax()
 
     // Min and Max
 
-    int nCols   = aColsField.GetValue(),
-        nRows   = aRowsField.GetValue();
-    long lLeft   = static_cast< long >(GETFLDVAL(aLeftField )),
-         lUpper  = static_cast< long >(GETFLDVAL(aUpperField)),
-         lHDist  = static_cast< long >(GETFLDVAL(aHDistField)),
-         lVDist  = static_cast< long >(GETFLDVAL(aVDistField)),
-         lWidth  = static_cast< long >(GETFLDVAL(aWidthField)),
-         lHeight = static_cast< long >(GETFLDVAL(aHeightField)),
+    int nCols   = m_pColsField->GetValue(),
+        nRows   = m_pRowsField->GetValue();
+    long lLeft   = static_cast< long >(GETFLDVAL(*m_pLeftField )),
+         lUpper  = static_cast< long >(GETFLDVAL(*m_pUpperField)),
+         lHDist  = static_cast< long >(GETFLDVAL(*m_pHDistField)),
+         lVDist  = static_cast< long >(GETFLDVAL(*m_pVDistField)),
+         lWidth  = static_cast< long >(GETFLDVAL(*m_pWidthField)),
+         lHeight = static_cast< long >(GETFLDVAL(*m_pHeightField)),
          lMinPWidth  = lLeft  + (nCols - 1) * lHDist + lWidth,
          lMinPHeight = lUpper + (nRows - 1) * lVDist + lHeight;
 
-    aHDistField .SetMin(nMinSize, FUNIT_CM);
-    aVDistField .SetMin(nMinSize, FUNIT_CM);
+    m_pHDistField->SetMin(nMinSize, FUNIT_CM);
+    m_pVDistField->SetMin(nMinSize, FUNIT_CM);
 
-    aHDistField .SetMax((long) 100 * ((lMax - lLeft ) / std::max(1L, (long) nCols)), FUNIT_TWIP);
-    aVDistField .SetMax((long) 100 * ((lMax - lUpper) / std::max(1L, (long) nRows)), FUNIT_TWIP);
+    m_pHDistField->SetMax((long) 100 * ((lMax - lLeft ) / std::max(1L, (long) nCols)), FUNIT_TWIP);
+    m_pVDistField->SetMax((long) 100 * ((lMax - lUpper) / std::max(1L, (long) nRows)), FUNIT_TWIP);
 
-    aWidthField .SetMin(nMinSize, FUNIT_CM);
-    aHeightField.SetMin(nMinSize, FUNIT_CM);
+    m_pWidthField->SetMin(nMinSize, FUNIT_CM);
+    m_pHeightField->SetMin(nMinSize, FUNIT_CM);
 
-    aWidthField .SetMax((long) 100 * (lHDist), FUNIT_TWIP);
-    aHeightField.SetMax((long) 100 * (lVDist), FUNIT_TWIP);
+    m_pWidthField->SetMax((long) 100 * (lHDist), FUNIT_TWIP);
+    m_pHeightField->SetMax((long) 100 * (lVDist), FUNIT_TWIP);
 
-    aLeftField  .SetMax((long) 100 * (lMax - nCols * lHDist), FUNIT_TWIP);
-    aUpperField .SetMax((long) 100 * (lMax - nRows * lVDist), FUNIT_TWIP);
+    m_pLeftField->SetMax((long) 100 * (lMax - nCols * lHDist), FUNIT_TWIP);
+    m_pUpperField->SetMax((long) 100 * (lMax - nRows * lVDist), FUNIT_TWIP);
 
-    aColsField  .SetMin( 1 );
-    aRowsField  .SetMin( 1 );
+    m_pColsField->SetMin( 1 );
+    m_pRowsField->SetMin( 1 );
 
-    aColsField  .SetMax((lMax - lLeft ) / std::max(1L, lHDist));
-    aRowsField  .SetMax((lMax - lUpper) / std::max(1L, lVDist));
-    aPWidthField .SetMin( (long) 100 * lMinPWidth,  FUNIT_TWIP );
-    aPHeightField.SetMin( (long) 100 * lMinPHeight, FUNIT_TWIP );
+    m_pColsField->SetMax((lMax - lLeft ) / std::max(1L, lHDist));
+    m_pRowsField->SetMax((lMax - lUpper) / std::max(1L, lVDist));
+    m_pPWidthField->SetMin( (long) 100 * lMinPWidth,  FUNIT_TWIP );
+    m_pPHeightField->SetMin( (long) 100 * lMinPHeight, FUNIT_TWIP );
 
-    aPWidthField .SetMax( (long) 100 * lMax, FUNIT_TWIP);
-    aPHeightField.SetMax( (long) 100 * lMax, FUNIT_TWIP);
+    m_pPWidthField->SetMax( (long) 100 * lMax, FUNIT_TWIP);
+    m_pPHeightField->SetMax( (long) 100 * lMax, FUNIT_TWIP);
     // First and Last
 
-    aHDistField .SetFirst(aHDistField .GetMin());
-    aVDistField .SetFirst(aVDistField .GetMin());
-
-    aHDistField .SetLast (aHDistField .GetMax());
-    aVDistField .SetLast (aVDistField .GetMax());
-
-    aWidthField .SetFirst(aWidthField .GetMin());
-    aHeightField.SetFirst(aHeightField.GetMin());
-
-    aWidthField .SetLast (aWidthField .GetMax());
-    aHeightField.SetLast (aHeightField.GetMax());
-
-    aLeftField  .SetLast (aLeftField  .GetMax());
-    aUpperField .SetLast (aUpperField .GetMax());
-
-    aColsField  .SetLast (aColsField  .GetMax());
-    aRowsField  .SetLast (aRowsField  .GetMax());
-    aPWidthField .SetFirst(aPWidthField .GetMin());
-    aPHeightField.SetFirst(aPHeightField.GetMin());
-
-    aPWidthField .SetLast (aPWidthField .GetMax());
-    aPHeightField.SetLast (aPHeightField.GetMax());
-    aHDistField .Reformat();
-    aVDistField .Reformat();
-    aWidthField .Reformat();
-    aHeightField.Reformat();
-    aLeftField  .Reformat();
-    aUpperField .Reformat();
-    aColsField  .Reformat();
-    aRowsField  .Reformat();
-    aPWidthField .Reformat();
-    aPHeightField.Reformat();
+    m_pHDistField->SetFirst(m_pHDistField->GetMin());
+    m_pVDistField->SetFirst(m_pVDistField->GetMin());
+
+    m_pHDistField->SetLast (m_pHDistField->GetMax());
+    m_pVDistField->SetLast (m_pVDistField->GetMax());
+
+    m_pWidthField->SetFirst(m_pWidthField->GetMin());
+    m_pHeightField->SetFirst(m_pHeightField->GetMin());
+
+    m_pWidthField->SetLast (m_pWidthField->GetMax());
+    m_pHeightField->SetLast (m_pHeightField->GetMax());
+
+    m_pLeftField->SetLast (m_pLeftField->GetMax());
+    m_pUpperField->SetLast (m_pUpperField->GetMax());
+
+    m_pColsField->SetLast (m_pColsField->GetMax());
+    m_pRowsField->SetLast (m_pRowsField->GetMax());
+    m_pPWidthField->SetFirst(m_pPWidthField->GetMin());
+    m_pPHeightField->SetFirst(m_pPHeightField->GetMin());
+
+    m_pPWidthField->SetLast (m_pPWidthField->GetMax());
+    m_pPHeightField->SetLast (m_pPHeightField->GetMax());
+    m_pHDistField->Reformat();
+    m_pVDistField->Reformat();
+    m_pWidthField->Reformat();
+    m_pHeightField->Reformat();
+    m_pLeftField->Reformat();
+    m_pUpperField->Reformat();
+    m_pColsField->Reformat();
+    m_pRowsField->Reformat();
+    m_pPWidthField->Reformat();
+    m_pPHeightField->Reformat();
 }
 
 SfxTabPage* SwLabFmtPage::Create(Window* pParent, const SfxItemSet& rSet)
@@ -502,16 +494,16 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
         rItem.aMake = rItem.aType = SW_RESSTR(STR_CUSTOM);
 
         SwLabRec& rRec = *GetParentSwLabDlg()->Recs()[0];
-        rItem.lHDist  = rRec.lHDist  = static_cast< long >(GETFLDVAL(aHDistField ));
-        rItem.lVDist  = rRec.lVDist  = static_cast< long >(GETFLDVAL(aVDistField ));
-        rItem.lWidth  = rRec.lWidth  = static_cast< long >(GETFLDVAL(aWidthField ));
-        rItem.lHeight = rRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
-        rItem.lLeft   = rRec.lLeft   = static_cast< long >(GETFLDVAL(aLeftField  ));
-        rItem.lUpper  = rRec.lUpper  = static_cast< long >(GETFLDVAL(aUpperField ));
-        rItem.nCols   = rRec.nCols   = (sal_uInt16) aColsField.GetValue();
-        rItem.nRows   = rRec.nRows   = (sal_uInt16) aRowsField.GetValue();
-        rItem.lPWidth  = rRec.lPWidth  = static_cast< long >(GETFLDVAL(aPWidthField ));
-        rItem.lPHeight = rRec.lPHeight = static_cast< long >(GETFLDVAL(aPHeightField));
+        rItem.lHDist  = rRec.lHDist  = static_cast< long >(GETFLDVAL(*m_pHDistField ));
+        rItem.lVDist  = rRec.lVDist  = static_cast< long >(GETFLDVAL(*m_pVDistField ));
+        rItem.lWidth  = rRec.lWidth  = static_cast< long >(GETFLDVAL(*m_pWidthField ));
+        rItem.lHeight = rRec.lHeight = static_cast< long >(GETFLDVAL(*m_pHeightField));
+        rItem.lLeft   = rRec.lLeft   = static_cast< long >(GETFLDVAL(*m_pLeftField  ));
+        rItem.lUpper  = rRec.lUpper  = static_cast< long >(GETFLDVAL(*m_pUpperField ));
+        rItem.nCols   = rRec.nCols   = (sal_uInt16) m_pColsField->GetValue();
+        rItem.nRows   = rRec.nRows   = (sal_uInt16) m_pRowsField->GetValue();
+        rItem.lPWidth  = rRec.lPWidth  = static_cast< long >(GETFLDVAL(*m_pPWidthField ));
+        rItem.lPHeight = rRec.lPHeight = static_cast< long >(GETFLDVAL(*m_pPHeightField));
     }
 }
 
@@ -528,47 +520,47 @@ void SwLabFmtPage::Reset(const SfxItemSet& )
     // Initialise fields
     GetParentSwLabDlg()->GetLabItem(aItem);
 
-    aHDistField .SetMax(100 * aItem.lHDist , FUNIT_TWIP);
-    aVDistField .SetMax(100 * aItem.lVDist , FUNIT_TWIP);
-    aWidthField .SetMax(100 * aItem.lWidth , FUNIT_TWIP);
-    aHeightField.SetMax(100 * aItem.lHeight, FUNIT_TWIP);
-    aLeftField  .SetMax(100 * aItem.lLeft  , FUNIT_TWIP);
-    aUpperField .SetMax(100 * aItem.lUpper , FUNIT_TWIP);
-    aPWidthField .SetMax(100 * aItem.lPWidth , FUNIT_TWIP);
-    aPHeightField.SetMax(100 * aItem.lPHeight, FUNIT_TWIP);
-
-    SETFLDVAL(aHDistField , aItem.lHDist );
-    SETFLDVAL(aVDistField , aItem.lVDist );
-    SETFLDVAL(aWidthField , aItem.lWidth );
-    SETFLDVAL(aHeightField, aItem.lHeight);
-    SETFLDVAL(aLeftField  , aItem.lLeft  );
-    SETFLDVAL(aUpperField , aItem.lUpper );
-    SETFLDVAL(aPWidthField , aItem.lPWidth );
-    SETFLDVAL(aPHeightField, aItem.lPHeight);
-
-    aColsField.SetMax(aItem.nCols);
-    aRowsField.SetMax(aItem.nRows);
-
-    aColsField  .SetValue(aItem.nCols);
-    aRowsField  .SetValue(aItem.nRows);
-    aMakeFI.SetText(aItem.aMake);
-    aTypeFI.SetText(aItem.aType);
+    m_pHDistField->SetMax(100 * aItem.lHDist , FUNIT_TWIP);
+    m_pVDistField->SetMax(100 * aItem.lVDist , FUNIT_TWIP);
+    m_pWidthField->SetMax(100 * aItem.lWidth , FUNIT_TWIP);
+    m_pHeightField->SetMax(100 * aItem.lHeight, FUNIT_TWIP);
+    m_pLeftField->SetMax(100 * aItem.lLeft  , FUNIT_TWIP);
+    m_pUpperField->SetMax(100 * aItem.lUpper , FUNIT_TWIP);
+    m_pPWidthField->SetMax(100 * aItem.lPWidth , FUNIT_TWIP);
+    m_pPHeightField->SetMax(100 * aItem.lPHeight, FUNIT_TWIP);
+
+    SETFLDVAL(*m_pHDistField, aItem.lHDist );
+    SETFLDVAL(*m_pVDistField , aItem.lVDist );
+    SETFLDVAL(*m_pWidthField , aItem.lWidth );
+    SETFLDVAL(*m_pHeightField, aItem.lHeight);
+    SETFLDVAL(*m_pLeftField  , aItem.lLeft  );
+    SETFLDVAL(*m_pUpperField , aItem.lUpper );
+    SETFLDVAL(*m_pPWidthField , aItem.lPWidth );
+    SETFLDVAL(*m_pPHeightField, aItem.lPHeight);
+
+    m_pColsField->SetMax(aItem.nCols);
+    m_pRowsField->SetMax(aItem.nRows);
+
+    m_pColsField->SetValue(aItem.nCols);
+    m_pRowsField->SetValue(aItem.nRows);
+    m_pMakeFI->SetText(aItem.aMake);
+    m_pTypeFI->SetText(aItem.aType);
     PreviewHdl(0);
 }
 
 IMPL_LINK_NOARG(SwLabFmtPage, SaveHdl)
 {
     SwLabRec aRec;
-    aRec.lHDist  = static_cast< long >(GETFLDVAL(aHDistField ));
-    aRec.lVDist  = static_cast< long >(GETFLDVAL(aVDistField ));
-    aRec.lWidth  = static_cast< long >(GETFLDVAL(aWidthField ));
-    aRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
-    aRec.lLeft   = static_cast< long >(GETFLDVAL(aLeftField  ));
-    aRec.lUpper  = static_cast< long >(GETFLDVAL(aUpperField ));
-    aRec.nCols   = (sal_uInt16) aColsField.GetValue();
-    aRec.nRows   = (sal_uInt16) aRowsField.GetValue();
-    aRec.lPWidth  = static_cast< long >(GETFLDVAL(aPWidthField ));
-    aRec.lPHeight = static_cast< long >(GETFLDVAL(aPHeightField));
+    aRec.lHDist  = static_cast< long >(GETFLDVAL(*m_pHDistField));
+    aRec.lVDist  = static_cast< long >(GETFLDVAL(*m_pVDistField ));
+    aRec.lWidth  = static_cast< long >(GETFLDVAL(*m_pWidthField ));
+    aRec.lHeight = static_cast< long >(GETFLDVAL(*m_pHeightField));
+    aRec.lLeft   = static_cast< long >(GETFLDVAL(*m_pLeftField  ));
+    aRec.lUpper  = static_cast< long >(GETFLDVAL(*m_pUpperField ));
+    aRec.nCols   = (sal_uInt16) m_pColsField->GetValue();
+    aRec.nRows   = (sal_uInt16) m_pRowsField->GetValue();
+    aRec.lPWidth  = static_cast< long >(GETFLDVAL(*m_pPWidthField ));
+    aRec.lPHeight = static_cast< long >(GETFLDVAL(*m_pPHeightField));
     aRec.bCont = aItem.bCont;
     SwSaveLabelDlg* pSaveDlg = new SwSaveLabelDlg(this, aRec);
     pSaveDlg->SetLabel(aItem.aLstMake, aItem.aLstType);
@@ -582,8 +574,8 @@ IMPL_LINK_NOARG(SwLabFmtPage, SaveHdl)
         {
             rMakes = rMan;
         }
-        aMakeFI.SetText(aItem.aMake);
-        aTypeFI.SetText(aItem.aType);
+        m_pMakeFI->SetText(aItem.aMake);
+        m_pTypeFI->SetText(aItem.aType);
     }
     delete pSaveDlg;
     return 0;
diff --git a/sw/source/ui/envelp/labfmt.hrc b/sw/source/ui/envelp/labfmt.hrc
index f9b1d80..fbdec22 100644
--- a/sw/source/ui/envelp/labfmt.hrc
+++ b/sw/source/ui/envelp/labfmt.hrc
@@ -22,34 +22,6 @@
 
 #include "envelp.hrc"
 
-// local resources *********************************************************
-
-#define WIN_PREVIEW   1
-#define TXT_HDIST     2
-#define FLD_HDIST     3
-#define TXT_VDIST     4
-#define FLD_VDIST     5
-#define TXT_WIDTH     6
-#define FLD_WIDTH     7
-#define TXT_HEIGHT    8
-#define FLD_HEIGHT    9
-#define TXT_LEFT     10
-#define FLD_LEFT     11
-#define TXT_UPPER    12
-#define FLD_UPPER    13
-#define TXT_COLUMNS  14
-#define FLD_COLUMNS  15
-#define TXT_ROWS     16
-#define FLD_ROWS     17
-#define TXT_PWIDTH   18
-#define FLD_PWIDTH   19
-#define TXT_PHEIGHT  20
-#define FLD_PHEIGHT  21
-#define FL_NONAME    22
-#define PB_SAVE      23
-#define FI_MAKE      24
-#define FI_TYPE      25
-
 // global resources ********************************************************
 
 #define STR_HDIST    (RC_LABFMT_BEGIN +  1)
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 1359e0f..d13511d 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -28,11 +28,6 @@ class SwLabFmtPage;
 
 class SwLabPreview : public Window
 {
-    long lOutWPix;
-    long lOutHPix;
-    long lOutWPix23;
-    long lOutHPix23;
-
     Color aGrayColor;
 
     String aHDistStr;
@@ -60,51 +55,37 @@ class SwLabPreview : public Window
 
     SwLabItem aItem;
 
-    void Paint(const Rectangle&);
-
-    void DrawArrow(const Point& rP1, const Point& rP2, bool bArrow);
+    virtual void Paint(const Rectangle&);
 
-    using Window::GetParent;
-    SwLabFmtPage* GetParent() {return (SwLabFmtPage*) Window::GetParent();}
+    virtual Size GetOptimalSize() const;
 
-    using Window::Update;
+    void DrawArrow(const Point& rP1, const Point& rP2, bool bArrow);
 
 public:
 
-     SwLabPreview(const SwLabFmtPage* pParent, const ResId& rResID);
-    ~SwLabPreview();
+    SwLabPreview(Window* pParent);
 
-    void Update(const SwLabItem& rItem);
+    void UpdateItem(const SwLabItem& rItem);
 };
 
 // class SwLabFmtPage -------------------------------------------------------
 
 class SwLabFmtPage : public SfxTabPage
 {
-    FixedInfo       aMakeFI;
-    FixedInfo       aTypeFI;
-    SwLabPreview aPreview;
-    FixedText    aHDistText;
-    MetricField  aHDistField;
-    FixedText    aVDistText;
-    MetricField  aVDistField;
-    FixedText    aWidthText;
-    MetricField  aWidthField;
-    FixedText    aHeightText;
-    MetricField  aHeightField;
-    FixedText    aLeftText;
-    MetricField  aLeftField;
-    FixedText    aUpperText;
-    MetricField  aUpperField;
-    FixedText    aColsText;
-    NumericField aColsField;
-    FixedText    aRowsText;
-    NumericField aRowsField;
-    FixedText    aPWidthText;
-    MetricField  aPWidthField;
-    FixedText    aPHeightText;
-    MetricField  aPHeightField;
-    PushButton   aSavePB;
+    FixedText*    m_pMakeFI;
+    FixedText*    m_pTypeFI;
+    SwLabPreview* m_pPreview;
+    MetricField*  m_pHDistField;
+    MetricField*  m_pVDistField;
+    MetricField*  m_pWidthField;
+    MetricField*  m_pHeightField;
+    MetricField*  m_pLeftField;
+    MetricField*  m_pUpperField;
+    NumericField* m_pColsField;
+    NumericField* m_pRowsField;
+    MetricField*  m_pPWidthField;
+    MetricField*  m_pPHeightField;
+    PushButton*   m_pSavePB;
 
     Timer aPreviewTimer;
     bool  bModified;
diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src
index a18b61e..701248e 100644
--- a/sw/source/ui/envelp/labfmt.src
+++ b/sw/source/ui/envelp/labfmt.src
@@ -19,250 +19,7 @@
 
 #include "labfmt.hrc"
 #include "helpid.h"
- // TP_LAB_FMT ---------------------------------------------------------------
-TabPage TP_LAB_FMT
-{
-    HelpID = HID_LAB_FMT ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    Hide = TRUE ;
-    FixedText FI_MAKE
-    {
-        Pos = MAP_APPFONT ( 108 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-    };
-    FixedText FI_TYPE
-    {
-        Pos = MAP_APPFONT ( 162 , 6 ) ;
-        Size = MAP_APPFONT ( 92 , 8 ) ;
-    };
-    Window WIN_PREVIEW
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 108 , 17 ) ;
-        Size = MAP_APPFONT ( 146 , 161 ) ;
-    };
-    FixedText TXT_HDIST
-    {
-        Pos = MAP_APPFONT ( 6 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "Hori~zontal pitch" ;
-        Group = TRUE ;
-        Left = TRUE ;
-    };
-    MetricField FLD_HDIST
-    {
-        HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HDIST";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 4 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Spin = TRUE ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        Repeat = TRUE ;
-        SpinSize = 10 ;
-    };
-    FixedText TXT_VDIST
-    {
-        Pos = MAP_APPFONT ( 6 , 22 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "~Vertical pitch" ;
-        Left = TRUE ;
-    };
-    MetricField FLD_VDIST
-    {
-        HelpID = "sw:MetricField:TP_LAB_FMT:FLD_VDIST";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 20 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Spin = TRUE ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        Repeat = TRUE ;
-        SpinSize = 10 ;
-    };
-    FixedText TXT_WIDTH
-    {
-        Pos = MAP_APPFONT ( 6 , 38 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "~Width" ;
-        Left = TRUE ;
-    };
-    MetricField FLD_WIDTH
-    {
-        HelpID = "sw:MetricField:TP_LAB_FMT:FLD_WIDTH";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 36 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Spin = TRUE ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        Repeat = TRUE ;
-        SpinSize = 10 ;
-    };
-    FixedText TXT_HEIGHT
-    {
-        Pos = MAP_APPFONT ( 6 , 54 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "~Height" ;
-        Left = TRUE ;
-    };
-    MetricField FLD_HEIGHT
-    {
-        HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HEIGHT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 52 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Spin = TRUE ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        Repeat = TRUE ;
-        SpinSize = 10 ;
-    };
-    FixedText TXT_LEFT
-    {
-        Pos = MAP_APPFONT ( 6 , 70 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "~Left margin" ;
-        Left = TRUE ;
-    };
-    MetricField FLD_LEFT
-    {
-        HelpID = "sw:MetricField:TP_LAB_FMT:FLD_LEFT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 68 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Spin = TRUE ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        Repeat = TRUE ;
-        Minimum = 0 ;
-        First = 0 ;
-        SpinSize = 10 ;
-    };
-    FixedText TXT_UPPER
-    {
-        Pos = MAP_APPFONT ( 6 , 86 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "~Top margin" ;
-        Left = TRUE ;
-    };
-    MetricField FLD_UPPER
-    {
-        HelpID = "sw:MetricField:TP_LAB_FMT:FLD_UPPER";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 84 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Spin = TRUE ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        Repeat = TRUE ;
-        Minimum = 0 ;
-        First = 0 ;
-        SpinSize = 10 ;
-    };
-    FixedText TXT_COLUMNS
-    {
-        Pos = MAP_APPFONT ( 6 , 102 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "~Columns" ;
-        Left = TRUE ;
-    };
-    NumericField FLD_COLUMNS
-    {
-        HelpID = "sw:NumericField:TP_LAB_FMT:FLD_COLUMNS";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 100 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 1 ;
-        First = 1 ;
-    };
-    FixedText TXT_ROWS
-    {
-        Pos = MAP_APPFONT ( 6 , 118 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "R~ows" ;
-        Left = TRUE ;
-    };
-    NumericField FLD_ROWS
-    {
-        HelpID = "sw:NumericField:TP_LAB_FMT:FLD_ROWS";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 116 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 1 ;
-        First = 1 ;
-    };
-    FixedText TXT_PWIDTH
-    {
-        Pos = MAP_APPFONT ( 6 , 134 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "P~age Width" ;
-        Left = TRUE ;
-    };
-    MetricField FLD_PWIDTH
-    {
-        HelpID = "sw:MetricField:TP_LAB_FMT:FLD_PWIDTH";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 132 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Spin = TRUE ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        Repeat = TRUE ;
-        SpinSize = 10 ;
-    };
-    FixedText TXT_PHEIGHT
-    {
-        Pos = MAP_APPFONT ( 6 , 150 ) ;
-        Size = MAP_APPFONT ( 50 , 8 ) ;
-        Text [ en-US ] = "Pa~ge Height" ;
-        Left = TRUE ;
-    };
-    MetricField FLD_PHEIGHT
-    {
-        HelpID = "sw:MetricField:TP_LAB_FMT:FLD_PHEIGHT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 148 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Spin = TRUE ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        Repeat = TRUE ;
-        SpinSize = 10 ;
-    };
-    PushButton  PB_SAVE
-    {
-        HelpID = "sw:PushButton:TP_LAB_FMT:PB_SAVE";
-        Pos = MAP_APPFONT ( 50 , 167 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Save...";
-    };
-};
- // String *******************************************************************
+
 String STR_HDIST
 {
     Text [ en-US ] = "H. Pitch" ;
diff --git a/sw/uiconfig/swriter/ui/labelformatpage.ui b/sw/uiconfig/swriter/ui/labelformatpage.ui
new file mode 100644
index 0000000..2782dbf
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/labelformatpage.ui
@@ -0,0 +1,414 @@
+<?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">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="GtkBox" id="LabelFormatPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="spacing">12</property>
+    <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="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Hori_zontal pitch</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">hori: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="label2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">_Vertical pitch</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">vert: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="GtkLabel" id="label3">
+            <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">2</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <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">_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">3</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">_Left margin</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">4</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <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">_Top margin</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">5</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">_Columns</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">cols</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">6</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <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">R_ows</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">rows</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">7</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">P_age Width</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">pagewidth:0.00cm</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">8</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label10">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Pa_ge Height</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">pageheight:0.00cm</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">9</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="save">
+            <property name="label" translatable="yes">_Save...</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="halign">end</property>
+            <property name="use_underline">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">10</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSpinButton" id="hori:0.00cm">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</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="vert: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="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>
+        <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="digits">2</property>
+          </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>
+        <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="digits">2</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">3</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="invisible_char_set">True</property>
+            <property name="digits">2</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">4</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="digits">2</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">5</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSpinButton" id="cols">
+            <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>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">6</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSpinButton" id="rows">
+            <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>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">7</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSpinButton" id="pagewidth: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="digits">2</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">8</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSpinButton" id="pageheight: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="digits">2</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">9</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkGrid" id="grid2">
+        <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">12</property>
+        <child>
+          <object class="swuilo-SwLabPreview" 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">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">2</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="make">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</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="type">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">top:0.00cm</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>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
commit 9f32bf9b053e12ee1052ff905e3068fac98265da
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 12 14:17:27 2013 +0100

    drop intermediate UniString
    
    Change-Id: Ie9a964c19110967ebd4e5480ef35d4ff10928746

diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx
index 481ca96..f5f8261 100644
--- a/vcl/unx/kde/UnxFilePicker.cxx
+++ b/vcl/unx/kde/UnxFilePicker.cxx
@@ -918,7 +918,7 @@ void UnxFilePicker::sendAppendControlCommand( sal_Int16 nControlId )
         aBuffer.appendAscii( " ", 1 );
         appendEscaped( aBuffer, aType );
         aBuffer.appendAscii( " ", 1 );
-        appendEscaped( aBuffer, m_pResMgr? OUString( ResId( nTitleId, *m_pResMgr ) ): OUString() );
+        appendEscaped( aBuffer, m_pResMgr? ResId(nTitleId, *m_pResMgr).toString(): OUString() );
 
         sendCommand( aBuffer.makeStringAndClear() );
     }
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 6ffb013..6f703e0 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -549,7 +549,7 @@ void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
 
             if (_resMgr && resId != -1)
             {
-                OUString s(ResId( resId, *_resMgr ));
+                OUString s(ResId(resId, *_resMgr).toString());
                 label = toQString(s);
                 label.replace("~", "&");
             }
commit c237b781c4c46a9e7a7c7c86915734cf63ef8484
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 12 11:27:55 2013 +0100

    toggle SvSimpleTableContainer border on by default
    
    Change-Id: I4d6ef44148ba7140405facab7c1d3e7f78a0b8ab

diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx
index 874df13..e251f33 100644
--- a/svtools/source/contnr/simptabl.cxx
+++ b/svtools/source/contnr/simptabl.cxx
@@ -43,7 +43,7 @@ SvSimpleTableContainer::SvSimpleTableContainer(Window* pParent, WinBits nBits)
 extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvSimpleTableContainer(Window *pParent,
     VclBuilder::stringmap &)
 {
-    return new SvSimpleTableContainer(pParent, WB_TABSTOP | WB_DIALOGCONTROL);
+    return new SvSimpleTableContainer(pParent, WB_TABSTOP | WB_DIALOGCONTROL | WB_BORDER);
 }
 
 void SvSimpleTableContainer::SetTable(SvSimpleTable* pTable)


More information about the Libreoffice-commits mailing list