[Libreoffice-commits] .: 2 commits - svtools/AllLangResTarget_svt.mk svtools/inc svtools/source svtools/uiconfig svtools/UI_svt.mk sw/uiconfig vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 5 02:13:10 PST 2012


 svtools/AllLangResTarget_svt.mk           |    1 
 svtools/UI_svt.mk                         |    1 
 svtools/inc/svtools/prnsetup.hxx          |   24 --
 svtools/inc/svtools/svtools.hrc           |   22 +-
 svtools/source/dialogs/prnsetup.cxx       |   78 +++-----
 svtools/source/dialogs/prnsetup.hrc       |   39 ----
 svtools/source/dialogs/prnsetup.src       |  238 ------------------------
 svtools/source/filter/exportdialog.cxx    |   20 +-
 svtools/source/misc/svtools.src           |  128 ++++++++++++-
 svtools/uiconfig/ui/printersetupdialog.ui |  292 ++++++++++++++++++++++++++++++
 sw/uiconfig/swriter/ui/printersetup.ui    |  286 -----------------------------
 vcl/inc/vcl/builder.hxx                   |    3 
 vcl/source/window/builder.cxx             |    7 
 13 files changed, 478 insertions(+), 661 deletions(-)

New commits:
commit a2863a411dc3fa55bd9025071eccf46bf11230cd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 5 10:11:53 2012 +0000

    move printer setup .ui to svtools and replace .src with it
    
    Change-Id: I8959b08aee2d2974552b8d33c03436973352d599

diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk
index 7be5ae9..3ff3000 100644
--- a/svtools/AllLangResTarget_svt.mk
+++ b/svtools/AllLangResTarget_svt.mk
@@ -52,7 +52,6 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
     svtools/source/dialogs/addresstemplate.src \
     svtools/source/dialogs/filedlg2.src \
     svtools/source/dialogs/formats.src \
-    svtools/source/dialogs/prnsetup.src \
     svtools/source/dialogs/so3res.src \
     svtools/source/dialogs/wizardmachine.src \
     svtools/source/java/javaerror.src \
diff --git a/svtools/UI_svt.mk b/svtools/UI_svt.mk
index 4afe25e..44c2acd 100644
--- a/svtools/UI_svt.mk
+++ b/svtools/UI_svt.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UI_UI,svt))
 $(eval $(call gb_UI_add_uifiles,svt,\
 	svtools/uiconfig/ui/graphicexport \
 	svtools/uiconfig/ui/placeedit \
+	svtools/uiconfig/ui/printersetupdialog \
 	svtools/uiconfig/ui/restartdialog \
 ))
 
diff --git a/svtools/inc/svtools/prnsetup.hxx b/svtools/inc/svtools/prnsetup.hxx
index 3d5b544..9999fdb 100644
--- a/svtools/inc/svtools/prnsetup.hxx
+++ b/svtools/inc/svtools/prnsetup.hxx
@@ -40,23 +40,13 @@ class QueueInfo;
 class SVT_DLLPUBLIC PrinterSetupDialog : public ModalDialog
 {
 private:
-    FixedLine       maFlPrinter;
-    FixedText       maFtName;
-    ListBox         maLbName;
-    PushButton      maBtnProperties;
-    PushButton      maBtnOptions;
-    FixedText       maFtStatus;
-    FixedInfo       maFiStatus;
-    FixedText       maFtType;
-    FixedInfo       maFiType;
-    FixedText       maFtLocation;
-    FixedInfo       maFiLocation;
-    FixedText       maFtComment;
-    FixedInfo       maFiComment;
-    FixedLine       maFlSepButton;
-    OKButton        maBtnOK;
-    CancelButton    maBtnCancel;
-    HelpButton      maBtnHelp;
+    ListBox*        m_pLbName;
+    PushButton*     m_pBtnProperties;
+    PushButton*     m_pBtnOptions;
+    FixedText*      m_pFiStatus;
+    FixedText*      m_pFiType;
+    FixedText*      m_pFiLocation;
+    FixedText*      m_pFiComment;
     AutoTimer       maStatusTimer;
     Printer*        mpPrinter;
     Printer*        mpTempPrinter;
diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc
index 01ee8a8..bccdb1a 100644
--- a/svtools/inc/svtools/svtools.hrc
+++ b/svtools/inc/svtools/svtools.hrc
@@ -41,16 +41,16 @@
 #define STR_SVT_FILEVIEW_COLUMN_TYPE    (RID_SVTOOLS_START + 29)
 #define STR_FILTERNAME_ALL              (RID_SVTOOLS_START + 30)
 #define RID_FILEVIEW_CONTEXTMENU        (RID_SVTOOLS_START + 31)
-#define STR_1BIT_THRESHOLD              (RID_SVTOOLS_START + 32)
-#define STR_1BIT_DITHERED               (RID_SVTOOLS_START + 33)
-#define STR_4BIT_GRAYSCALE              (RID_SVTOOLS_START + 34)
-#define STR_4BIT_COLOR_PALETTE          (RID_SVTOOLS_START + 35)
-#define STR_8BIT_GRAYSCALE              (RID_SVTOOLS_START + 36)
-#define STR_8BIT_COLOR_PALETTE          (RID_SVTOOLS_START + 37)
-#define STR_24BIT_TRUE_COLOR            (RID_SVTOOLS_START + 38)
-#define STR_ESTIMATED_SIZE_PIX_1        (RID_SVTOOLS_START + 39)
-#define STR_ESTIMATED_SIZE_PIX_2        (RID_SVTOOLS_START + 40)
-#define STR_ESTIMATED_SIZE_VEC          (RID_SVTOOLS_START + 41)
+#define STR_SVT_1BIT_THRESHOLD          (RID_SVTOOLS_START + 32)
+#define STR_SVT_1BIT_DITHERED           (RID_SVTOOLS_START + 33)
+#define STR_SVT_4BIT_GRAYSCALE          (RID_SVTOOLS_START + 34)
+#define STR_SVT_4BIT_COLOR_PALETTE      (RID_SVTOOLS_START + 35)
+#define STR_SVT_8BIT_GRAYSCALE          (RID_SVTOOLS_START + 36)
+#define STR_SVT_8BIT_COLOR_PALETTE      (RID_SVTOOLS_START + 37)
+#define STR_SVT_24BIT_TRUE_COLOR        (RID_SVTOOLS_START + 38)
+#define STR_SVT_ESTIMATED_SIZE_PIX_1    (RID_SVTOOLS_START + 39)
+#define STR_SVT_ESTIMATED_SIZE_PIX_2    (RID_SVTOOLS_START + 40)
+#define STR_SVT_ESTIMATED_SIZE_VEC      (RID_SVTOOLS_START + 41)
 
 // doc template dialog
 #define DLG_DOCTEMPLATE                 (RID_SVTOOLS_START+50)
@@ -80,7 +80,7 @@
 #define STR_BASICKEY_FORMAT_CURRENCY    (RID_SVTOOLS_START+130)
 
 #define STR_SVT_PRNDLG_START                (RID_SVTOOLS_START+141)
-#define DLG_SVT_PRNDLG_PRNSETUPDLG          (STR_SVT_PRNDLG_START+0)
+
 #define STR_SVT_PRNDLG_READY                (STR_SVT_PRNDLG_START+2)
 #define STR_SVT_PRNDLG_PAUSED               (STR_SVT_PRNDLG_START+3)
 #define STR_SVT_PRNDLG_PENDING              (STR_SVT_PRNDLG_START+4)
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index 38085c6..80ee930 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -17,11 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <vcl/print.hxx>
-
-#include <svtools/svtresid.hxx>
-#include "prnsetup.hrc"
 #include <svtools/prnsetup.hxx>
+#include <svtools/svtools.hrc>
+#include <svtools/svtresid.hxx>
+#include <vcl/print.hxx>
 
 // =======================================================================
 
@@ -217,45 +216,36 @@ XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo )
 
 // =======================================================================
 
-PrinterSetupDialog::PrinterSetupDialog( Window* pWindow ) :
-    ModalDialog     ( pWindow, SvtResId( DLG_SVT_PRNDLG_PRNSETUPDLG ) ),
-    maFlPrinter     ( this, SvtResId( FL_PRINTER ) ),
-    maFtName        ( this, SvtResId( FT_NAME ) ),
-    maLbName        ( this, SvtResId( LB_NAMES ) ),
-    maBtnProperties ( this, SvtResId( BTN_PROPERTIES ) ),
-    maBtnOptions    ( this, SvtResId( BTN_OPTIONS ) ),
-    maFtStatus      ( this, SvtResId( FT_STATUS ) ),
-    maFiStatus      ( this, SvtResId( FI_STATUS ) ),
-    maFtType        ( this, SvtResId( FT_TYPE ) ),
-    maFiType        ( this, SvtResId( FI_TYPE ) ),
-    maFtLocation    ( this, SvtResId( FT_LOCATION ) ),
-    maFiLocation    ( this, SvtResId( FI_LOCATION ) ),
-    maFtComment     ( this, SvtResId( FT_COMMENT ) ),
-    maFiComment     ( this, SvtResId( FI_COMMENT ) ),
-    maFlSepButton   ( this, SvtResId( FL_SEPBUTTON ) ),
-    maBtnOK         ( this, SvtResId( BTN_OK ) ),
-    maBtnCancel     ( this, SvtResId( BTN_CANCEL ) ),
-    maBtnHelp       ( this, SvtResId( BTN_HELP ) )
+PrinterSetupDialog::PrinterSetupDialog(Window* pParent)
+    : ModalDialog(pParent, "PrinterSetupDialog",
+        "svt/ui/printersetupdialog.ui")
 {
-    FreeResource();
+    get(m_pLbName, "name");
+    m_pLbName->SetStyle(m_pLbName->GetStyle() | WB_SORT);
+    get(m_pBtnProperties, "properties");
+    get(m_pBtnOptions, "options");
+    get(m_pFiStatus, "status");
+    get(m_pFiType, "type");
+    get(m_pFiLocation, "location");
+    get(m_pFiComment, "comment");
 
     // show options button only if link is set
-    maBtnOptions.Hide();
+    m_pBtnOptions->Hide();
 
     mpPrinter       = NULL;
     mpTempPrinter   = NULL;
 
     maStatusTimer.SetTimeout( IMPL_PRINTDLG_STATUS_UPDATE );
     maStatusTimer.SetTimeoutHdl( LINK( this, PrinterSetupDialog, ImplStatusHdl ) );
-    maBtnProperties.SetClickHdl( LINK( this, PrinterSetupDialog, ImplPropertiesHdl ) );
-    maLbName.SetSelectHdl( LINK( this, PrinterSetupDialog, ImplChangePrinterHdl ) );
+    m_pBtnProperties->SetClickHdl( LINK( this, PrinterSetupDialog, ImplPropertiesHdl ) );
+    m_pLbName->SetSelectHdl( LINK( this, PrinterSetupDialog, ImplChangePrinterHdl ) );
 }
 
 // -----------------------------------------------------------------------
 
 PrinterSetupDialog::~PrinterSetupDialog()
 {
-    ImplFreePrnDlgListBox( &maLbName, sal_False );
+    ImplFreePrnDlgListBox(m_pLbName, sal_False);
     delete mpTempPrinter;
 }
 
@@ -263,27 +253,27 @@ PrinterSetupDialog::~PrinterSetupDialog()
 
 void PrinterSetupDialog::SetOptionsHdl( const Link& rLink )
 {
-    maBtnOptions.SetClickHdl( rLink );
-    maBtnOptions.Show( rLink.IsSet() );
+    m_pBtnOptions->SetClickHdl( rLink );
+    m_pBtnOptions->Show( rLink.IsSet() );
 }
 
 void PrinterSetupDialog::ImplSetInfo()
 {
-    const QueueInfo* pInfo = Printer::GetQueueInfo(maLbName.GetSelectEntry(), true);
+    const QueueInfo* pInfo = Printer::GetQueueInfo(m_pLbName->GetSelectEntry(), true);
     if ( pInfo )
     {
-        maFiType.SetText( pInfo->GetDriver() );
-        maFiLocation.SetText( pInfo->GetLocation() );
-        maFiComment.SetText( pInfo->GetComment() );
-        maFiStatus.SetText( ImplPrnDlgGetStatusText( *pInfo ) );
+        m_pFiType->SetText( pInfo->GetDriver() );
+        m_pFiLocation->SetText( pInfo->GetLocation() );
+        m_pFiComment->SetText( pInfo->GetComment() );
+        m_pFiStatus->SetText( ImplPrnDlgGetStatusText( *pInfo ) );
     }
     else
     {
         XubString aTempStr;
-        maFiType.SetText( aTempStr );
-        maFiLocation.SetText( aTempStr );
-        maFiComment.SetText( aTempStr );
-        maFiStatus.SetText( aTempStr );
+        m_pFiType->SetText( aTempStr );
+        m_pFiLocation->SetText( aTempStr );
+        m_pFiComment->SetText( aTempStr );
+        m_pFiStatus->SetText( aTempStr );
     }
 }
 
@@ -292,8 +282,8 @@ void PrinterSetupDialog::ImplSetInfo()
 IMPL_LINK_NOARG(PrinterSetupDialog, ImplStatusHdl)
 {
     QueueInfo aInfo;
-    ImplPrnDlgUpdateQueueInfo( &maLbName, aInfo );
-    maFiStatus.SetText( ImplPrnDlgGetStatusText( aInfo ) );
+    ImplPrnDlgUpdateQueueInfo(m_pLbName, aInfo);
+    m_pFiStatus->SetText( ImplPrnDlgGetStatusText( aInfo ) );
 
     return 0;
 }
@@ -313,7 +303,7 @@ IMPL_LINK_NOARG(PrinterSetupDialog, ImplPropertiesHdl)
 
 IMPL_LINK_NOARG(PrinterSetupDialog, ImplChangePrinterHdl)
 {
-    mpTempPrinter = ImplPrnDlgListBoxSelect( &maLbName, &maBtnProperties,
+    mpTempPrinter = ImplPrnDlgListBoxSelect(m_pLbName, m_pBtnProperties,
                                              mpPrinter, mpTempPrinter );
     ImplSetInfo();
     return 0;
@@ -341,7 +331,7 @@ void PrinterSetupDialog::DataChanged( const DataChangedEvent& rDCEvt )
             pPrn = mpTempPrinter;
         else
             pPrn = mpPrinter;
-        ImplFillPrnDlgListBox( pPrn, &maLbName, &maBtnProperties );
+        ImplFillPrnDlgListBox(pPrn, m_pLbName, m_pBtnProperties);
         ImplSetInfo();
     }
 
@@ -360,7 +350,7 @@ short PrinterSetupDialog::Execute()
 
     Printer::updatePrinters();
 
-    ImplFillPrnDlgListBox( mpPrinter, &maLbName, &maBtnProperties );
+    ImplFillPrnDlgListBox(mpPrinter, m_pLbName, m_pBtnProperties);
     ImplSetInfo();
     maStatusTimer.Start();
 
diff --git a/svtools/source/dialogs/prnsetup.hrc b/svtools/source/dialogs/prnsetup.hrc
deleted file mode 100644
index 2bd69c9..0000000
--- a/svtools/source/dialogs/prnsetup.hrc
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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 <svtools/svtools.hrc>
-
-#define FL_PRINTER          1
-#define LB_NAMES                2
-#define BTN_PROPERTIES          3
-#define FT_NAME                 4
-#define FT_STATUS               5
-#define FI_STATUS               6
-#define FT_TYPE                 7
-#define FI_TYPE                 8
-#define FT_LOCATION             9
-#define FI_LOCATION             10
-#define FT_COMMENT              11
-#define FI_COMMENT              12
-
-#define BTN_OK                  13
-#define BTN_CANCEL              14
-#define BTN_HELP                15
-
-#define FL_SEPBUTTON            16
-
-#define BTN_OPTIONS             17
diff --git a/svtools/source/dialogs/prnsetup.src b/svtools/source/dialogs/prnsetup.src
deleted file mode 100644
index cd667d8..0000000
--- a/svtools/source/dialogs/prnsetup.src
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * 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 "prnsetup.hrc"
-
-String STR_SVT_PRNDLG_READY
-{
-    Text [ en-US ] = "Ready" ;
-};
-String STR_SVT_PRNDLG_PAUSED
-{
-    Text [ en-US ] = "Paused" ;
-};
-String STR_SVT_PRNDLG_PENDING
-{
-    Text [ en-US ] = "Pending deletion" ;
-};
-String STR_SVT_PRNDLG_BUSY
-{
-    Text [ en-US ] = "Busy" ;
-};
-String STR_SVT_PRNDLG_INITIALIZING
-{
-    Text [ en-US ] = "Initializing" ;
-};
-String STR_SVT_PRNDLG_WAITING
-{
-    Text [ en-US ] = "Waiting" ;
-};
-String STR_SVT_PRNDLG_WARMING_UP
-{
-    Text [ en-US ] = "Warming up" ;
-};
-String STR_SVT_PRNDLG_PROCESSING
-{
-    Text [ en-US ] = "Processing" ;
-};
-String STR_SVT_PRNDLG_PRINTING
-{
-    Text [ en-US ] = "Printing" ;
-};
-String STR_SVT_PRNDLG_OFFLINE
-{
-    Text [ en-US ] = "Offline" ;
-};
-String STR_SVT_PRNDLG_ERROR
-{
-    Text [ en-US ] = "Error" ;
-};
-String STR_SVT_PRNDLG_SERVER_UNKNOWN
-{
-    Text [ en-US ] = "Unknown Server" ;
-};
-String STR_SVT_PRNDLG_PAPER_JAM
-{
-    Text [ en-US ] = "Paper jam" ;
-};
-String STR_SVT_PRNDLG_PAPER_OUT
-{
-    Text [ en-US ] = "Not enough paper" ;
-};
-String STR_SVT_PRNDLG_MANUAL_FEED
-{
-    Text [ en-US ] = "Manual feed" ;
-};
-String STR_SVT_PRNDLG_PAPER_PROBLEM
-{
-    Text [ en-US ] = "Paper problem" ;
-};
-String STR_SVT_PRNDLG_IO_ACTIVE
-{
-    Text [ en-US ] = "I/O active" ;
-};
-String STR_SVT_PRNDLG_OUTPUT_BIN_FULL
-{
-    Text [ en-US ] = "Output bin full" ;
-};
-String STR_SVT_PRNDLG_TONER_LOW
-{
-    Text [ en-US ] = "Toner low" ;
-};
-String STR_SVT_PRNDLG_NO_TONER
-{
-    Text [ en-US ] = "No toner" ;
-};
-String STR_SVT_PRNDLG_PAGE_PUNT
-{
-    Text [ en-US ] = "Delete Page" ;
-};
-String STR_SVT_PRNDLG_USER_INTERVENTION
-{
-    Text [ en-US ] = "User intervention necessary" ;
-};
-String STR_SVT_PRNDLG_OUT_OF_MEMORY
-{
-    Text [ en-US ] = "Insufficient memory" ;
-};
-String STR_SVT_PRNDLG_DOOR_OPEN
-{
-    Text [ en-US ] = "Cover open" ;
-};
-String STR_SVT_PRNDLG_POWER_SAVE
-{
-    Text [ en-US ] = "Power save mode" ;
-};
-String STR_SVT_PRNDLG_DEFPRINTER
-{
-    Text [ en-US ] = "Default printer" ;
-};
-String STR_SVT_PRNDLG_JOBCOUNT
-{
-    Text [ en-US ] = "%d documents" ;
-};
-
-ModalDialog DLG_SVT_PRNDLG_PRNSETUPDLG
-{
-    HelpID = "svtools:ModalDialog:DLG_SVT_PRNDLG_PRNSETUPDLG";
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Moveable = TRUE ;
-    Size = MAP_APPFONT ( 260 , 104 ) ;
-    Text [ en-US ] = "Printer Setup" ;
-    FixedLine FL_PRINTER
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Printer" ;
-    };
-    FixedText FT_NAME
-    {
-        Pos = MAP_APPFONT ( 12 , 14 ) ;
-        Size = MAP_APPFONT ( 45 , 10 ) ;
-        Text [ en-US ] = "~Name" ;
-    };
-    ListBox LB_NAMES
-    {
-        HelpID = "svtools:ListBox:DLG_SVT_PRNDLG_PRNSETUPDLG:LB_NAMES";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 60 , 12 ) ;
-        Size = MAP_APPFONT ( 125 , 80 ) ;
-        DropDown = TRUE ;
-        Sort = TRUE ;
-    };
-    PushButton BTN_PROPERTIES
-    {
-        HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRNSETUPDLG:BTN_PROPERTIES";
-        Pos = MAP_APPFONT ( 188 , 12 ) ;
-        Size = MAP_APPFONT ( 60 , 14 ) ;
-        Text [ en-US ] = "Propert~ies..." ;
-    };
-    FixedText FT_STATUS
-    {
-        Pos = MAP_APPFONT ( 12 , 29 ) ;
-        Size = MAP_APPFONT ( 45 , 10 ) ;
-        Text [ en-US ] = "Status" ;
-    };
-    FixedText FI_STATUS
-    {
-        Pos = MAP_APPFONT ( 60 , 29 ) ;
-        Size = MAP_APPFONT ( 188 , 10 ) ;
-    };
-    FixedText FT_TYPE
-    {
-        Pos = MAP_APPFONT ( 12 , 40 ) ;
-        Size = MAP_APPFONT ( 45 , 10 ) ;
-        Text [ en-US ] = "Type" ;
-    };
-    FixedText FI_TYPE
-    {
-        Pos = MAP_APPFONT ( 60 , 40 ) ;
-        Size = MAP_APPFONT ( 188 , 10 ) ;
-    };
-    FixedText FT_LOCATION
-    {
-        Pos = MAP_APPFONT ( 12 , 51 ) ;
-        Size = MAP_APPFONT ( 45 , 10 ) ;
-        Text [ en-US ] = "Location" ;
-    };
-    FixedText FI_LOCATION
-    {
-        Pos = MAP_APPFONT ( 60 , 51 ) ;
-        Size = MAP_APPFONT ( 188 , 10 ) ;
-    };
-    FixedText FT_COMMENT
-    {
-        Pos = MAP_APPFONT ( 12 , 62 ) ;
-        Size = MAP_APPFONT ( 45 , 10 ) ;
-        Text [ en-US ] = "Comment" ;
-    };
-    FixedText FI_COMMENT
-    {
-        Pos = MAP_APPFONT ( 60 , 62 ) ;
-        Size = MAP_APPFONT ( 188 , 10 ) ;
-    };
-    FixedLine FL_SEPBUTTON
-    {
-        Pos = MAP_APPFONT ( 0, 78 );
-        Size = MAP_APPFONT ( 260, 2 );
-    };
-    PushButton BTN_OPTIONS
-    {
-        HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRNSETUPDLG:BTN_OPTIONS";
-        Pos = MAP_APPFONT ( 5 , 84 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Options..." ;
-    };
-    OKButton BTN_OK
-    {
-        Pos = MAP_APPFONT ( 95 , 84 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        DefButton = TRUE ;
-    };
-    CancelButton BTN_CANCEL
-    {
-        Pos = MAP_APPFONT ( 148 , 84 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-    HelpButton BTN_HELP
-    {
-        Pos = MAP_APPFONT ( 204 , 84 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-};
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 9e7d6e0..f161afb 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -568,16 +568,16 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara,
     , mxSourceDocument(rxSourceDocument)
     , mpSbCompression(NULL)
     , mpNfCompression(NULL)
-    , msEstimatedSizePix1(SVT_RESSTR(STR_ESTIMATED_SIZE_PIX_1))
-    , msEstimatedSizePix2(SVT_RESSTR(STR_ESTIMATED_SIZE_PIX_2))
-    , msEstimatedSizeVec(SVT_RESSTR(STR_ESTIMATED_SIZE_VEC))
-    , ms1BitTreshold(SVT_RESSTR(STR_1BIT_THRESHOLD))
-    , ms1BitDithered(SVT_RESSTR(STR_1BIT_DITHERED))
-    , ms4BitGrayscale(SVT_RESSTR(STR_4BIT_GRAYSCALE))
-    , ms4BitColorPalette(SVT_RESSTR(STR_4BIT_COLOR_PALETTE))
-    , ms8BitGrayscale(SVT_RESSTR(STR_8BIT_GRAYSCALE))
-    , ms8BitColorPalette(SVT_RESSTR(STR_8BIT_COLOR_PALETTE))
-    , ms24BitColor(SVT_RESSTR(STR_24BIT_TRUE_COLOR))
+    , msEstimatedSizePix1(SVT_RESSTR(STR_SVT_ESTIMATED_SIZE_PIX_1))
+    , msEstimatedSizePix2(SVT_RESSTR(STR_SVT_ESTIMATED_SIZE_PIX_2))
+    , msEstimatedSizeVec(SVT_RESSTR(STR_SVT_ESTIMATED_SIZE_VEC))
+    , ms1BitTreshold(SVT_RESSTR(STR_SVT_1BIT_THRESHOLD))
+    , ms1BitDithered(SVT_RESSTR(STR_SVT_1BIT_DITHERED))
+    , ms4BitGrayscale(SVT_RESSTR(STR_SVT_4BIT_GRAYSCALE))
+    , ms4BitColorPalette(SVT_RESSTR(STR_SVT_4BIT_COLOR_PALETTE))
+    , ms8BitGrayscale(SVT_RESSTR(STR_SVT_8BIT_GRAYSCALE))
+    , ms8BitColorPalette(SVT_RESSTR(STR_SVT_8BIT_COLOR_PALETTE))
+    , ms24BitColor(SVT_RESSTR(STR_SVT_24BIT_TRUE_COLOR))
     , maExt(rPara.aFilterExt)
     , mnFormat(FORMAT_UNKNOWN)
     , mnMaxFilesizeForRealtimePreview(0)
diff --git a/svtools/source/misc/svtools.src b/svtools/source/misc/svtools.src
index 1ae9e3a..00e7080 100644
--- a/svtools/source/misc/svtools.src
+++ b/svtools/source/misc/svtools.src
@@ -9,44 +9,152 @@
 
 #include "svtools/svtools.hrc"
 
-String STR_1BIT_THRESHOLD
+String STR_SVT_1BIT_THRESHOLD
 {
     Text [ en-US ] = "1 bit threshold";
 };
-String STR_1BIT_DITHERED
+String STR_SVT_1BIT_DITHERED
 {
     Text [ en-US ] = "1 bit dithered";
 };
-String STR_4BIT_GRAYSCALE
+String STR_SVT_4BIT_GRAYSCALE
 {
     Text [ en-US ] = "4 bit grayscale";
 };
-String STR_4BIT_COLOR_PALETTE
+String STR_SVT_4BIT_COLOR_PALETTE
 {
     Text [ en-US ] = "4 bit color";
 };
-String STR_8BIT_GRAYSCALE
+String STR_SVT_8BIT_GRAYSCALE
 {
     Text [ en-US ] = "8 bit grayscale";
 };
-String STR_8BIT_COLOR_PALETTE
+String STR_SVT_8BIT_COLOR_PALETTE
 {
     Text [ en-US ] = "8 bit color";
 };
-String STR_24BIT_TRUE_COLOR
+String STR_SVT_24BIT_TRUE_COLOR
 {
     Text [ en-US ] = "24 bit true color";
 };
-String STR_ESTIMATED_SIZE_PIX_1
+String STR_SVT_ESTIMATED_SIZE_PIX_1
 {
     Text [ en-US ] = "The picture needs about %1 KB of memory.";
 };
-String STR_ESTIMATED_SIZE_PIX_2
+String STR_SVT_ESTIMATED_SIZE_PIX_2
 {
     Text [ en-US ] = "The picture needs about %1 KB of memory, the file size is %2 KB.";
 };
-String STR_ESTIMATED_SIZE_VEC
+String STR_SVT_ESTIMATED_SIZE_VEC
 {
     Text [ en-US ] = "The file size is %1 KB.";
 };
+String STR_SVT_PRNDLG_READY
+{
+    Text [ en-US ] = "Ready" ;
+};
+String STR_SVT_PRNDLG_PAUSED
+{
+    Text [ en-US ] = "Paused" ;
+};
+String STR_SVT_PRNDLG_PENDING
+{
+    Text [ en-US ] = "Pending deletion" ;
+};
+String STR_SVT_PRNDLG_BUSY
+{
+    Text [ en-US ] = "Busy" ;
+};
+String STR_SVT_PRNDLG_INITIALIZING
+{
+    Text [ en-US ] = "Initializing" ;
+};
+String STR_SVT_PRNDLG_WAITING
+{
+    Text [ en-US ] = "Waiting" ;
+};
+String STR_SVT_PRNDLG_WARMING_UP
+{
+    Text [ en-US ] = "Warming up" ;
+};
+String STR_SVT_PRNDLG_PROCESSING
+{
+    Text [ en-US ] = "Processing" ;
+};
+String STR_SVT_PRNDLG_PRINTING
+{
+    Text [ en-US ] = "Printing" ;
+};
+String STR_SVT_PRNDLG_OFFLINE
+{
+    Text [ en-US ] = "Offline" ;
+};
+String STR_SVT_PRNDLG_ERROR
+{
+    Text [ en-US ] = "Error" ;
+};
+String STR_SVT_PRNDLG_SERVER_UNKNOWN
+{
+    Text [ en-US ] = "Unknown Server" ;
+};
+String STR_SVT_PRNDLG_PAPER_JAM
+{
+    Text [ en-US ] = "Paper jam" ;
+};
+String STR_SVT_PRNDLG_PAPER_OUT
+{
+    Text [ en-US ] = "Not enough paper" ;
+};
+String STR_SVT_PRNDLG_MANUAL_FEED
+{
+    Text [ en-US ] = "Manual feed" ;
+};
+String STR_SVT_PRNDLG_PAPER_PROBLEM
+{
+    Text [ en-US ] = "Paper problem" ;
+};
+String STR_SVT_PRNDLG_IO_ACTIVE
+{
+    Text [ en-US ] = "I/O active" ;
+};
+String STR_SVT_PRNDLG_OUTPUT_BIN_FULL
+{
+    Text [ en-US ] = "Output bin full" ;
+};
+String STR_SVT_PRNDLG_TONER_LOW
+{
+    Text [ en-US ] = "Toner low" ;
+};
+String STR_SVT_PRNDLG_NO_TONER
+{
+    Text [ en-US ] = "No toner" ;
+};
+String STR_SVT_PRNDLG_PAGE_PUNT
+{
+    Text [ en-US ] = "Delete Page" ;
+};
+String STR_SVT_PRNDLG_USER_INTERVENTION
+{
+    Text [ en-US ] = "User intervention necessary" ;
+};
+String STR_SVT_PRNDLG_OUT_OF_MEMORY
+{
+    Text [ en-US ] = "Insufficient memory" ;
+};
+String STR_SVT_PRNDLG_DOOR_OPEN
+{
+    Text [ en-US ] = "Cover open" ;
+};
+String STR_SVT_PRNDLG_POWER_SAVE
+{
+    Text [ en-US ] = "Power save mode" ;
+};
+String STR_SVT_PRNDLG_DEFPRINTER
+{
+    Text [ en-US ] = "Default printer" ;
+};
+String STR_SVT_PRNDLG_JOBCOUNT
+{
+    Text [ en-US ] = "%d documents" ;
+};
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/uiconfig/ui/printersetupdialog.ui b/svtools/uiconfig/ui/printersetupdialog.ui
new file mode 100644
index 0000000..4fb4921
--- /dev/null
+++ b/svtools/uiconfig/ui/printersetupdialog.ui
@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="PrinterSetupDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Printer Setup</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="options">
+                <property name="label" translatable="yes">Options...</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="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="grid2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">6</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">Name</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="label3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Status</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="label4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Type</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="label5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Location</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="label6">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Comment</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="status">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">2</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>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">2</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="comment">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">4</property>
+                        <property name="width">2</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="location">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">3</property>
+                        <property name="width">2</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="properties">
+                        <property name="label" translatable="yes">Properties...</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="use_action_appearance">False</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBox" id="name">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                  </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">Printer</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">options</action-widget>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/sw/uiconfig/swriter/ui/printersetup.ui b/sw/uiconfig/swriter/ui/printersetup.ui
deleted file mode 100644
index 5de5dad..0000000
--- a/sw/uiconfig/swriter/ui/printersetup.ui
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkWindow" id="window1">
-    <property name="can_focus">False</property>
-    <child>
-      <object class="GtkBox" id="box1">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">35</property>
-        <child>
-          <object class="GtkFrame" id="frame1">
-            <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="left_padding">12</property>
-                <child>
-                  <object class="GtkGrid" id="grid2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="row_spacing">15</property>
-                    <property name="column_spacing">20</property>
-                    <child>
-                      <object class="GtkGrid" id="grid3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="column_spacing">10</property>
-                        <child>
-                          <object class="GtkButton" id="102">
-                            <property name="label" translatable="yes">Properties</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_action_appearance">False</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="GtkComboBoxText" id="comboboxtext1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="entry_text_column">0</property>
-                            <property name="id_column">1</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left_attach">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="2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Name</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="3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Status</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="4">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Type</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="5">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Location</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="6">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Comment</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="7">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</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="GtkLabel" id="8">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</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="GtkLabel" id="10">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</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="GtkLabel" id="9">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</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>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child type="label">
-              <object class="GtkLabel" id="1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Printer</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButtonBox" id="buttonbox1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">spread</property>
-            <child>
-              <object class="GtkButton" id="101">
-                <property name="label" translatable="yes">Options</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="ok">
-                <property name="label">gtk-ok</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="help">
-                <property name="label">gtk-help</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-</interface>
commit b395637a39fca0512f159159495a06cf3cb2b8de
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 5 10:07:46 2012 +0000

    the builder now always owns all its widgets
    
    and improve warning about un-found toplevel widgets to not
    warn about unfound widgets if the toplevel id is found
    but refers to the passed in parent
    
    Change-Id: Ieaea3cf4d0342e0f65b330a06777d81a119ace14

diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx
index 431d4bf..e2793e6 100644
--- a/vcl/inc/vcl/builder.hxx
+++ b/vcl/inc/vcl/builder.hxx
@@ -47,12 +47,10 @@ private:
         OString m_sID;
         Window *m_pWindow;
         PackingData m_aPackingData;
-        bool m_bOwned;
         WinAndId(const OString &rId, Window *pWindow, bool bVertical)
             : m_sID(rId)
             , m_pWindow(pWindow)
             , m_aPackingData(bVertical)
-            , m_bOwned(true)
         {
         }
     };
@@ -127,6 +125,7 @@ private:
     OString m_sProductName;
     Window *m_pParent;
     bool m_bToplevelHasDeferredInit;
+    bool m_bToplevelParentFound;
     ParserState *m_pParserState;
 
     Window *get_by_name(OString sID);
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index e5711e9..9acdad1 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -121,6 +121,7 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri
     , m_sHelpRoot(OUStringToOString(sUIFile, RTL_TEXTENCODING_UTF8))
     , m_sProductName(OUStringToOString(utl::ConfigManager::getProductName(), RTL_TEXTENCODING_UTF8))
     , m_pParent(pParent)
+    , m_bToplevelParentFound(false)
     , m_pParserState(new ParserState)
 {
     m_bToplevelHasDeferredInit = (pParent && pParent->IsDialog()) ? ((Dialog*)pParent)->isDeferredInit() : false;
@@ -239,7 +240,7 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri
     //drop maps, etc. that we don't need again
     delete m_pParserState;
 
-    SAL_WARN_IF(!m_sID.isEmpty() && !get_by_name(m_sID), "vcl.layout",
+    SAL_WARN_IF(!m_sID.isEmpty() && (!m_bToplevelParentFound && !get_by_name(m_sID)), "vcl.layout",
         "Requested top level widget \"" << m_sID.getStr() <<
         "\" not found in " << sUIFile);
 }
@@ -249,8 +250,7 @@ VclBuilder::~VclBuilder()
     for (std::vector<WinAndId>::reverse_iterator aI = m_aChildren.rbegin(),
          aEnd = m_aChildren.rend(); aI != aEnd; ++aI)
     {
-        if (aI->m_bOwned)
-            delete aI->m_pWindow;
+        delete aI->m_pWindow;
     }
 }
 
@@ -905,6 +905,7 @@ Window *VclBuilder::insertObject(Window *pParent, const OString &rClass,
                 rID.getStr() << ", set helpid " <<
                 pCurrentChild->GetHelpId().getStr());
         }
+        m_bToplevelParentFound = true;
     }
     else
     {


More information about the Libreoffice-commits mailing list