[Libreoffice-commits] .: 12 commits - connectivity/source padmin/source padmin/uiconfig padmin/UI_spa.mk sc/inc sc/source sfx2/source svtools/source svx/source sw/source tools/inc tools/source unusedcode.easy vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Dec 17 01:35:47 PST 2012


 connectivity/source/drivers/file/FDatabaseMetaData.cxx |   13 -
 connectivity/source/drivers/file/quotedstring.cxx      |   11 
 connectivity/source/drivers/flat/ETable.cxx            |   39 +--
 connectivity/source/inc/file/quotedstring.hxx          |    2 
 padmin/UI_spa.mk                                       |    2 
 padmin/source/cmddlg.cxx                               |    2 
 padmin/source/prtsetup.cxx                             |  169 ++++++-------
 padmin/source/prtsetup.hxx                             |   25 -
 padmin/source/rtsetup.hrc                              |   17 -
 padmin/source/rtsetup.src                              |  107 --------
 padmin/uiconfig/ui/printerpaperpage.ui                 |  133 ++++++++++
 padmin/uiconfig/ui/printerproperties.ui                |  218 -----------------
 padmin/uiconfig/ui/printerpropertiesdialog.ui          |  149 +++++++++++
 sc/inc/dpobject.hxx                                    |    2 
 sc/source/core/data/dpobject.cxx                       |   89 ------
 sc/source/core/data/dptabsrc.cxx                       |    2 
 sc/source/core/data/table4.cxx                         |    7 
 sc/source/core/tool/compiler.cxx                       |    7 
 sc/source/core/tool/editutil.cxx                       |   14 -
 sc/source/filter/inc/formulabase.hxx                   |   10 
 sc/source/filter/oox/formulabase.cxx                   |    8 
 sc/source/ui/cctrl/checklistmenu.cxx                   |    5 
 sc/source/ui/inc/checklistmenu.hxx                     |    2 
 sfx2/source/control/thumbnailviewacc.cxx               |   21 -
 sfx2/source/control/thumbnailviewacc.hxx               |    1 
 sfx2/source/dialog/tabdlg.cxx                          |   11 
 svtools/source/misc/imagemgr.cxx                       |   10 
 svx/source/svdraw/svdpntv.cxx                          |    3 
 svx/source/svdraw/svdview.cxx                          |    5 
 sw/source/core/text/porglue.cxx                        |    6 
 sw/source/core/text/portxt.cxx                         |    6 
 sw/source/core/txtnode/fntcache.cxx                    |    6 
 sw/source/filter/html/swhtml.cxx                       |    2 
 sw/source/filter/ww8/ww8par2.cxx                       |    7 
 sw/source/ui/docvw/srcedtw.cxx                         |    6 
 sw/source/ui/utlui/gloslst.cxx                         |    2 
 tools/inc/tools/string.hxx                             |    2 
 tools/source/string/tustring.cxx                       |   30 --
 unusedcode.easy                                        |    1 
 vcl/inc/vcl/tabctrl.hxx                                |   18 -
 vcl/source/control/field2.cxx                          |   10 
 vcl/source/control/tabctrl.cxx                         |   65 ++++-
 vcl/source/window/builder.cxx                          |    4 
 43 files changed, 518 insertions(+), 731 deletions(-)

New commits:
commit 5af4fff6d4dede7e60d407766f30e7191eeeee66
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 20:37:33 2012 +0000

    convert print properties tabdialog to .ui format
    
    the dialog itself that is, two of the pages are in .ui
    format and the rest are pending conversion
    
    Change-Id: I5a22cf1603abb0400272ce8969c0b43a00ed7739

diff --git a/padmin/UI_spa.mk b/padmin/UI_spa.mk
index ce10748..6b1e011 100644
--- a/padmin/UI_spa.mk
+++ b/padmin/UI_spa.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UI_UI,spa))
 $(eval $(call gb_UI_add_uifiles,spa,\
 	padmin/uiconfig/ui/printerdevicepage \
 	padmin/uiconfig/ui/printerpaperpage \
+	padmin/uiconfig/ui/printerpropertiesdialog \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/padmin/source/cmddlg.cxx b/padmin/source/cmddlg.cxx
index f5496fb..ba0691e 100644
--- a/padmin/source/cmddlg.cxx
+++ b/padmin/source/cmddlg.cxx
@@ -214,7 +214,7 @@ void CommandStore::setFaxCommands( const ::std::list< String >& rCommands )
 
 
 RTSCommandPage::RTSCommandPage( RTSDialog* pParent ) :
-        TabPage( &pParent->m_aTabControl, PaResId( RID_RTS_COMMANDPAGE ) ),
+        TabPage( pParent->m_pTabControl, PaResId( RID_RTS_COMMANDPAGE ) ),
         m_pParent( pParent ),
         m_aCommandsCB( this, PaResId( RID_RTS_CMD_CB_COMMANDS ) ),
         m_aExternalCB( this, PaResId( RID_RTS_CMD_CB_EXTERNAL ) ),
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 47b800c..3df1a5e 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -79,21 +79,20 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con
  * RTSDialog
  */
 
-RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool bAllPages, Window* pParent ) :
-        TabDialog(  pParent, PaResId( RID_RTS_RTSDIALOG ) ),
-        m_aJobData( rJobData ),
-        m_aPrinter( rPrinter ),
-        m_aTabControl( this, PaResId( RID_RTS_RTSDIALOG_TABCONTROL ) ),
-        m_aOKButton( this ),
-        m_aCancelButton( this ),
-        m_pPaperPage( NULL ),
-        m_pDevicePage( NULL ),
-        m_pOtherPage( NULL ),
-        m_pFontSubstPage( NULL ),
-        m_pCommandPage( NULL ),
-        m_aInvalidString( PaResId( RID_RTS_RTSDIALOG_INVALID_TXT ) )
-{
-    FreeResource();
+RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool bAllPages, Window* pParent )
+    : TabDialog(pParent, "PrinterPropertiesDialog", "spa/ui/printerpropertiesdialog.ui" )
+    , m_aJobData(rJobData)
+    , m_aPrinter(rPrinter)
+    , m_pPaperPage(NULL)
+    , m_pDevicePage(NULL)
+    , m_pOtherPage(NULL)
+    , m_pFontSubstPage(NULL)
+    , m_pCommandPage(NULL)
+    , m_aInvalidString(PaResId(RID_RTS_RTSDIALOG_INVALID_TXT).toString())
+{
+    get(m_pOKButton, "ok");
+    get(m_pCancelButton, "cancel");
+    get(m_pTabControl, "notebook");
 
     String aTitle( GetText() );
     aTitle.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), m_aJobData.m_aPrinterName );
@@ -101,23 +100,20 @@ RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool
 
     if( ! bAllPages )
     {
-        m_aTabControl.RemovePage( RID_RTS_OTHERPAGE );
-        m_aTabControl.RemovePage( RID_RTS_FONTSUBSTPAGE );
-        m_aTabControl.RemovePage( RID_RTS_COMMANDPAGE );
+        m_pTabControl->RemovePage(m_pTabControl->GetPageId("other"));
+        m_pTabControl->RemovePage(m_pTabControl->GetPageId("font"));
+        m_pTabControl->RemovePage(m_pTabControl->GetPageId("command"));
     }
     else if( m_aJobData.m_aDriverName.compareToAscii( "CUPS:", 5 ) == 0 && ! PrinterInfoManager::get().isCUPSDisabled() )
     {
         // command page makes no sense for CUPS printers
-        m_aTabControl.RemovePage( RID_RTS_COMMANDPAGE );
+        m_pTabControl->RemovePage(m_pTabControl->GetPageId("command"));
     }
 
-    m_aTabControl.SetActivatePageHdl( LINK( this, RTSDialog, ActivatePage ) );
-    m_aOKButton.SetClickHdl( LINK( this, RTSDialog, ClickButton ) );
-    m_aCancelButton.SetClickHdl( LINK( this, RTSDialog, ClickButton ) );
-    ActivatePage( &m_aTabControl );
-
-    m_aOKButton.Show();
-    m_aCancelButton.Show();
+    m_pTabControl->SetActivatePageHdl( LINK( this, RTSDialog, ActivatePage ) );
+    m_pOKButton->SetClickHdl( LINK( this, RTSDialog, ClickButton ) );
+    m_pCancelButton->SetClickHdl( LINK( this, RTSDialog, ClickButton ) );
+    ActivatePage(m_pTabControl);
 }
 
 // --------------------------------------------------------------------------
@@ -140,35 +136,33 @@ RTSDialog::~RTSDialog()
 
 IMPL_LINK( RTSDialog, ActivatePage, TabControl*, pTabCtrl )
 {
-    if( pTabCtrl != &m_aTabControl )
+    if( pTabCtrl != m_pTabControl )
         return 0;
 
-    sal_uInt16 nId = m_aTabControl.GetCurPageId();
-
-    if ( ! m_aTabControl.GetTabPage( nId ) )
+    sal_uInt16 nId = m_pTabControl->GetCurPageId();
+    OString sPage = m_pTabControl->GetPageName(nId);
+    if ( ! m_pTabControl->GetTabPage( nId ) )
     {
         TabPage *pPage = NULL;
-        if( nId == RID_RTS_PAPERPAGE )
+        if (sPage == "paper")
             pPage = m_pPaperPage = new RTSPaperPage( this );
-        else if( nId == RID_RTS_DEVICEPAGE )
+        else if (sPage == "device")
             pPage = m_pDevicePage = new RTSDevicePage( this );
-        else if( nId == RID_RTS_OTHERPAGE )
+        else if (sPage == "other")
             pPage = m_pOtherPage = new RTSOtherPage( this );
-        else if( nId == RID_RTS_FONTSUBSTPAGE )
+        else if (sPage == "font")
             pPage = m_pFontSubstPage = new RTSFontSubstPage( this );
-        else if( nId == RID_RTS_COMMANDPAGE )
+        else if (sPage == "command")
             pPage = m_pCommandPage = new RTSCommandPage( this );
         if( pPage )
-            m_aTabControl.SetTabPage( nId, pPage );
+            m_pTabControl->SetTabPage( nId, pPage );
     }
     else
     {
-        switch( nId )
-        {
-            case RID_RTS_PAPERPAGE:     m_pPaperPage->update();break;
-            case RID_RTS_DEVICEPAGE:    m_pDevicePage->update();break;
-            default: break;
-        }
+        if (sPage == "paper")
+            m_pPaperPage->update();
+        else if (sPage == "device")
+            m_pDevicePage->update();
     }
 
     return 0;
@@ -178,7 +172,7 @@ IMPL_LINK( RTSDialog, ActivatePage, TabControl*, pTabCtrl )
 
 IMPL_LINK( RTSDialog, ClickButton, Button*, pButton )
 {
-    if( pButton == &m_aOKButton )
+    if( pButton == m_pOKButton )
     {
         // refresh the changed values
         if( m_pPaperPage )
@@ -203,7 +197,7 @@ IMPL_LINK( RTSDialog, ClickButton, Button*, pButton )
 
         EndDialog( 1 );
     }
-    else if( pButton == &m_aCancelButton )
+    else if( pButton == m_pCancelButton )
         EndDialog( 0 );
 
     return 0;
@@ -216,7 +210,7 @@ IMPL_LINK( RTSDialog, ClickButton, Button*, pButton )
  */
 
 RTSPaperPage::RTSPaperPage(RTSDialog* pParent)
-    : TabPage(&pParent->m_aTabControl, "PrinterPaperPage", "spa/ui/printerpaperpage.ui" )
+    : TabPage(pParent->m_pTabControl, "PrinterPaperPage", "spa/ui/printerpaperpage.ui" )
     , m_pParent( pParent )
 {
     get(m_pPaperText, "paperft");
@@ -341,7 +335,7 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox )
  */
 
 RTSDevicePage::RTSDevicePage( RTSDialog* pParent )
-    : TabPage(&pParent->m_aTabControl, "PrinterDevicePage", "spa/ui/printerdevicepage.ui" )
+    : TabPage(pParent->m_pTabControl, "PrinterDevicePage", "spa/ui/printerdevicepage.ui" )
     , m_pParent( pParent )
 {
     get(m_pPPDKeyBox, "options");
@@ -530,7 +524,7 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey )
  */
 
 RTSOtherPage::RTSOtherPage( RTSDialog* pParent ) :
-        TabPage( &pParent->m_aTabControl, PaResId( RID_RTS_OTHERPAGE ) ),
+        TabPage( pParent->m_pTabControl, PaResId( RID_RTS_OTHERPAGE ) ),
         m_pParent( pParent ),
         m_aLeftTxt( this, PaResId( RID_RTS_OTHER_LEFTMARGIN_TXT ) ),
         m_aLeftLB( this, PaResId( RID_RTS_OTHER_LEFTMARGIN_BOX ) ),
@@ -642,7 +636,7 @@ IMPL_LINK( RTSOtherPage, ClickBtnHdl, Button*, pButton )
  */
 
 RTSFontSubstPage::RTSFontSubstPage( RTSDialog* pParent ) :
-        TabPage( &pParent->m_aTabControl, PaResId( RID_RTS_FONTSUBSTPAGE ) ),
+        TabPage( pParent->m_pTabControl, PaResId( RID_RTS_FONTSUBSTPAGE ) ),
         m_pParent( pParent ),
         m_aSubstitutionsText( this, PaResId( RID_RTS_FS_SUBST_TXT ) ),
         m_aSubstitutionsBox( this, PaResId( RID_RTS_FS_SUBST_BOX ) ),
diff --git a/padmin/source/prtsetup.hxx b/padmin/source/prtsetup.hxx
index 1de4f89..efc2170 100644
--- a/padmin/source/prtsetup.hxx
+++ b/padmin/source/prtsetup.hxx
@@ -55,9 +55,9 @@ class RTSDialog : public TabDialog
     String                  m_aPrinter;
 
     // controls
-    TabControl              m_aTabControl;
-    OKButton                m_aOKButton;
-    CancelButton            m_aCancelButton;
+    TabControl*             m_pTabControl;
+    OKButton*               m_pOKButton;
+    CancelButton*           m_pCancelButton;
 
     // pages
     RTSPaperPage*           m_pPaperPage;
@@ -67,7 +67,7 @@ class RTSDialog : public TabDialog
     RTSCommandPage*         m_pCommandPage;
 
     // some resources
-    String                  m_aInvalidString;
+    OUString                m_aInvalidString;
 
     DECL_LINK( ActivatePage, TabControl* );
     DECL_LINK( ClickButton, Button* );
diff --git a/padmin/source/rtsetup.hrc b/padmin/source/rtsetup.hrc
index 711e303..bf90cf0 100644
--- a/padmin/source/rtsetup.hrc
+++ b/padmin/source/rtsetup.hrc
@@ -19,10 +19,7 @@
 #ifndef _PAD_RTSETUP_HRC_
 #define _PAD_RTSETUP_HRC_
 
-#define RID_RTS_RTSDIALOG                   4001
-#define RID_RTS_RTSDIALOG_INVALID_TXT       1
-#define RID_RTS_RTSDIALOG_FROMDRIVER_TXT    2
-#define RID_RTS_RTSDIALOG_TABCONTROL        3
+#define RID_RTS_RTSDIALOG_INVALID_TXT       4001
 
 #define RID_RTS_OTHERPAGE                   4002
 #define RID_RTS_OTHER_LEFTMARGIN_TXT        1
@@ -37,9 +34,6 @@
 #define RID_RTS_OTHER_COMMENT_EDT           10
 #define RID_RTS_OTHER_DEFAULT_BTN           11
 
-#define RID_RTS_DEVICEPAGE                  4003
-#define RID_RTS_PAPERPAGE                   4004
-
 #define RID_RTS_FONTSUBSTPAGE               4005
 #define RID_RTS_FS_SUBST_TXT                1
 #define RID_RTS_FS_SUBST_BOX                2
diff --git a/padmin/source/rtsetup.src b/padmin/source/rtsetup.src
index 56128c7..8edb7a0 100644
--- a/padmin/source/rtsetup.src
+++ b/padmin/source/rtsetup.src
@@ -18,50 +18,9 @@
 
 #include "rtsetup.hrc"
 
-TabDialog RID_RTS_RTSDIALOG
+String RID_RTS_RTSDIALOG_INVALID_TXT
 {
-    Moveable = TRUE;
-    Sizeable = TRUE;
-    Closeable = TRUE;
-    SVLook = TRUE;
-
-    TabControl RID_RTS_RTSDIALOG_TABCONTROL
-    {
-        OutputSize = TRUE;
-        PageList =
-        {
-            PageItem
-            {
-                Identifier = RID_RTS_COMMANDPAGE;
-                Text [ en-US ] = "Command";
-            };
-            PageItem
-            {
-                Identifier = RID_RTS_PAPERPAGE;
-                Text [ en-US ] = "Paper";
-            };
-            PageItem
-            {
-                Identifier = RID_RTS_DEVICEPAGE;
-                Text [ en-US ] = "Device";
-            };
-            PageItem
-            {
-                Identifier = RID_RTS_FONTSUBSTPAGE;
-                Text [ en-US ] = "Font Replacement";
-            };
-            PageItem
-            {
-                Identifier = RID_RTS_OTHERPAGE;
-                Text [ en-US ] = "Other Settings";
-            };
-        };
-    };
-    String RID_RTS_RTSDIALOG_INVALID_TXT
-    {
-        Text [ en-US ] = "<ignore>";
-    };
-    Text [ en-US ] = "Properties of %s";
+    Text [ en-US ] = "<ignore>";
 };
 
 TabPage RID_RTS_FONTSUBSTPAGE
diff --git a/padmin/uiconfig/ui/printerpropertiesdialog.ui b/padmin/uiconfig/ui/printerpropertiesdialog.ui
new file mode 100644
index 0000000..a84bdb4
--- /dev/null
+++ b/padmin/uiconfig/ui/printerpropertiesdialog.ui
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="PrinterPropertiesDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Properties of %s</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="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">0</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">1</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="GtkNotebook" id="notebook">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="command">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Command</property>
+              </object>
+              <packing>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="paper">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Paper</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="device">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Device</property>
+              </object>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="font">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Font Replacement</property>
+              </object>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="other">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Other Settings</property>
+              </object>
+              <packing>
+                <property name="position">4</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+    </action-widgets>
+  </object>
+</interface>
commit be61350e8b078fbc34d820868d67f7e393bf93df
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Dec 14 16:06:18 2012 +0000

    split out printer paper page and adapt code to .ui
    
    Change-Id: I95266926801ab5cb63ec012b37cd35757ec541ef

diff --git a/padmin/UI_spa.mk b/padmin/UI_spa.mk
index 70008c2..ce10748 100644
--- a/padmin/UI_spa.mk
+++ b/padmin/UI_spa.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_UI_UI,spa))
 
 $(eval $(call gb_UI_add_uifiles,spa,\
 	padmin/uiconfig/ui/printerdevicepage \
+	padmin/uiconfig/ui/printerpaperpage \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 6b398f1..47b800c 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -28,9 +28,6 @@
 
 #include <officecfg/Office/Common.hxx>
 
-#define LSCAPE_STRING String( RTL_CONSTASCII_USTRINGPARAM( "Landscape" ) )
-#define PORTRAIT_STRING String( RTL_CONSTASCII_USTRINGPARAM( "Portrait" ) )
-
 using namespace psp;
 using namespace padmin;
 
@@ -187,7 +184,8 @@ IMPL_LINK( RTSDialog, ClickButton, Button*, pButton )
         if( m_pPaperPage )
         {
             // orientation
-            m_aJobData.m_eOrientation = m_pPaperPage->getOrientation().Equals( LSCAPE_STRING ) ? orientation::Landscape : orientation::Portrait;
+            m_aJobData.m_eOrientation = m_pPaperPage->getOrientation() == 0 ?
+                orientation::Portrait : orientation::Landscape;
         }
         if( m_pDevicePage )
         {
@@ -217,40 +215,34 @@ IMPL_LINK( RTSDialog, ClickButton, Button*, pButton )
  * RTSPaperPage
  */
 
-RTSPaperPage::RTSPaperPage( RTSDialog* pParent ) :
-        TabPage( & pParent->m_aTabControl, PaResId( RID_RTS_PAPERPAGE ) ),
-
-        m_pParent( pParent ),
-
-        m_aPaperText( this, PaResId( RID_RTS_PAPER_PAPER_TXT ) ),
-        m_aPaperBox( this, PaResId( RID_RTS_PAPER_PAPER_BOX ) ),
-        m_aOrientText( this, PaResId( RID_RTS_PAPER_ORIENTATION_TXT ) ),
-        m_aOrientBox( this, PaResId( RID_RTS_PAPER_ORIENTATION_BOX ) ),
-        m_aDuplexText( this, PaResId( RID_RTS_PAPER_DUPLEX_TXT ) ),
-        m_aDuplexBox( this, PaResId( RID_RTS_PAPER_DUPLEX_BOX ) ),
-        m_aSlotText( this, PaResId( RID_RTS_PAPER_SLOT_TXT ) ),
-        m_aSlotBox( this, PaResId( RID_RTS_PAPER_SLOT_BOX ) )
+RTSPaperPage::RTSPaperPage(RTSDialog* pParent)
+    : TabPage(&pParent->m_aTabControl, "PrinterPaperPage", "spa/ui/printerpaperpage.ui" )
+    , m_pParent( pParent )
 {
-    m_aPaperBox.SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
-    m_aOrientBox.SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
-    m_aDuplexBox.SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
-    m_aSlotBox.SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
+    get(m_pPaperText, "paperft");
+    get(m_pPaperBox, "paperlb");
+    get(m_pOrientBox, "orientlb");
+    get(m_pDuplexText, "duplexft");
+    get(m_pDuplexBox, "duplexlb");
+    get(m_pSlotText, "slotft");
+    get(m_pSlotBox, "slotlb");
 
-    FreeResource();
+    m_pPaperBox->SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
+    m_pOrientBox->SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
+    m_pDuplexBox->SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
+    m_pSlotBox->SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
 
     sal_uInt16 nPos = 0;
 
-    m_aOrientBox.InsertEntry( PORTRAIT_STRING );
-    m_aOrientBox.InsertEntry( LSCAPE_STRING );
     // duplex
-    nPos = m_aDuplexBox.InsertEntry( m_pParent->m_aInvalidString );
-    m_aDuplexBox.SetEntryData( nPos, NULL );
+    nPos = m_pDuplexBox->InsertEntry( m_pParent->m_aInvalidString );
+    m_pDuplexBox->SetEntryData( nPos, NULL );
 
     // paper does not have an invalid entry
 
     // input slots
-    nPos = m_aSlotBox.InsertEntry( m_pParent->m_aInvalidString );
-    m_aSlotBox.SetEntryData( nPos, NULL );
+    nPos = m_pSlotBox->InsertEntry( m_pParent->m_aInvalidString );
+    m_pSlotBox->SetEntryData( nPos, NULL );
 
     update();
 }
@@ -268,44 +260,43 @@ void RTSPaperPage::update()
     const PPDKey* pKey      = NULL;
 
     // orientation
-    m_aOrientBox.SelectEntry(
-        m_pParent->m_aJobData.m_eOrientation == orientation::Landscape
-        ? LSCAPE_STRING : PORTRAIT_STRING );
+    m_pOrientBox->SelectEntryPos(
+        m_pParent->m_aJobData.m_eOrientation == orientation::Portrait ? 0 : 1);
 
     // duplex
     if( m_pParent->m_aJobData.m_pParser &&
         (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) )) )
     {
-        m_pParent->insertAllPPDValues( m_aDuplexBox, m_pParent->m_aJobData.m_pParser, pKey );
+        m_pParent->insertAllPPDValues( *m_pDuplexBox, m_pParent->m_aJobData.m_pParser, pKey );
     }
     else
     {
-        m_aDuplexText.Enable( sal_False );
-        m_aDuplexBox.Enable( sal_False );
+        m_pDuplexText->Enable( sal_False );
+        m_pDuplexBox->Enable( sal_False );
     }
 
     // paper
     if( m_pParent->m_aJobData.m_pParser &&
         (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) )) )
     {
-        m_pParent->insertAllPPDValues( m_aPaperBox, m_pParent->m_aJobData.m_pParser, pKey );
+        m_pParent->insertAllPPDValues( *m_pPaperBox, m_pParent->m_aJobData.m_pParser, pKey );
     }
     else
     {
-        m_aPaperText.Enable( sal_False );
-        m_aPaperBox.Enable( sal_False );
+        m_pPaperText->Enable( sal_False );
+        m_pPaperBox->Enable( sal_False );
     }
 
     // input slots
     if( m_pParent->m_aJobData.m_pParser &&
         (pKey = m_pParent->m_aJobData.m_pParser->getKey( rtl::OUString("InputSlot") )) )
     {
-        m_pParent->insertAllPPDValues( m_aSlotBox, m_pParent->m_aJobData.m_pParser, pKey );
+        m_pParent->insertAllPPDValues( *m_pSlotBox, m_pParent->m_aJobData.m_pParser, pKey );
     }
     else
     {
-        m_aSlotText.Enable( sal_False );
-        m_aSlotBox.Enable( sal_False );
+        m_pSlotText->Enable( sal_False );
+        m_pSlotBox->Enable( sal_False );
     }
 }
 
@@ -314,24 +305,24 @@ void RTSPaperPage::update()
 IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox )
 {
     const PPDKey* pKey = NULL;
-    if( pBox == &m_aPaperBox )
+    if( pBox == m_pPaperBox )
     {
         if( m_pParent->m_aJobData.m_pParser )
             pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
     }
-    else if( pBox == &m_aDuplexBox )
+    else if( pBox == m_pDuplexBox )
     {
         if( m_pParent->m_aJobData.m_pParser )
             pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
     }
-    else if( pBox == &m_aSlotBox )
+    else if( pBox == m_pSlotBox )
     {
         if( m_pParent->m_aJobData.m_pParser )
             pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
     }
-    else if( pBox == &m_aOrientBox )
+    else if( pBox == m_pOrientBox )
     {
-        m_pParent->m_aJobData.m_eOrientation = m_aOrientBox.GetSelectEntry().Equals( LSCAPE_STRING ) ? orientation::Landscape : orientation::Portrait;
+        m_pParent->m_aJobData.m_eOrientation = m_pOrientBox->GetSelectEntryPos() == 0 ? orientation::Portrait : orientation::Landscape;
     }
     if( pKey )
     {
diff --git a/padmin/source/prtsetup.hxx b/padmin/source/prtsetup.hxx
index 9e8d098..1de4f89 100644
--- a/padmin/source/prtsetup.hxx
+++ b/padmin/source/prtsetup.hxx
@@ -85,17 +85,16 @@ class RTSPaperPage : public TabPage
 {
     RTSDialog*          m_pParent;
 
-    FixedText           m_aPaperText;
-    ListBox             m_aPaperBox;
+    FixedText*          m_pPaperText;
+    ListBox*            m_pPaperBox;
 
-    FixedText           m_aOrientText;
-    ListBox             m_aOrientBox;
+    ListBox*            m_pOrientBox;
 
-    FixedText           m_aDuplexText;
-    ListBox             m_aDuplexBox;
+    FixedText*          m_pDuplexText;
+    ListBox*            m_pDuplexBox;
 
-    FixedText           m_aSlotText;
-    ListBox             m_aSlotBox;
+    FixedText*          m_pSlotText;
+    ListBox*            m_pSlotBox;
 
     DECL_LINK( SelectHdl, ListBox* );
 public:
@@ -104,7 +103,7 @@ public:
 
     void update();
 
-    String getOrientation() { return m_aOrientBox.GetSelectEntry(); }
+    sal_uInt16 getOrientation() { return m_pOrientBox->GetSelectEntryPos(); }
 };
 
 class RTSDevicePage : public TabPage
diff --git a/padmin/source/rtsetup.hrc b/padmin/source/rtsetup.hrc
index 75bf2f9..711e303 100644
--- a/padmin/source/rtsetup.hrc
+++ b/padmin/source/rtsetup.hrc
@@ -38,16 +38,7 @@
 #define RID_RTS_OTHER_DEFAULT_BTN           11
 
 #define RID_RTS_DEVICEPAGE                  4003
-
 #define RID_RTS_PAPERPAGE                   4004
-#define RID_RTS_PAPER_PAPER_TXT         1
-#define RID_RTS_PAPER_PAPER_BOX         2
-#define RID_RTS_PAPER_ORIENTATION_TXT       3
-#define RID_RTS_PAPER_ORIENTATION_BOX       4
-#define RID_RTS_PAPER_DUPLEX_TXT            5
-#define RID_RTS_PAPER_DUPLEX_BOX            6
-#define RID_RTS_PAPER_SLOT_TXT              7
-#define RID_RTS_PAPER_SLOT_BOX              8
 
 #define RID_RTS_FONTSUBSTPAGE               4005
 #define RID_RTS_FS_SUBST_TXT                1
diff --git a/padmin/source/rtsetup.src b/padmin/source/rtsetup.src
index 9005c09..56128c7 100644
--- a/padmin/source/rtsetup.src
+++ b/padmin/source/rtsetup.src
@@ -21,6 +21,7 @@
 TabDialog RID_RTS_RTSDIALOG
 {
     Moveable = TRUE;
+    Sizeable = TRUE;
     Closeable = TRUE;
     SVLook = TRUE;
 
@@ -63,69 +64,6 @@ TabDialog RID_RTS_RTSDIALOG
     Text [ en-US ] = "Properties of %s";
 };
 
-TabPage RID_RTS_PAPERPAGE
-{
-    HelpID = "padmin:TabPage:RID_RTS_PAPERPAGE";
-    Hide = TRUE;
-    Size = MAP_APPFONT( 230, 175 );
-    FixedText RID_RTS_PAPER_PAPER_TXT
-    {
-        Pos = MAP_APPFONT( 5, 5 );
-        Size = MAP_APPFONT( 80, 8 );
-        Text [ en-US ] = "~Paper size";
-    };
-    ListBox RID_RTS_PAPER_PAPER_BOX
-    {
-        HelpID = "padmin:ListBox:RID_RTS_PAPERPAGE:RID_RTS_PAPER_PAPER_BOX";
-        Border = TRUE;
-        DropDown = TRUE;
-        Pos = MAP_APPFONT( 115, 5 );
-        Size = MAP_APPFONT( 110, 120 );
-    };
-    FixedText RID_RTS_PAPER_ORIENTATION_TXT
-    {
-        Pos = MAP_APPFONT( 5, 20 );
-        Size = MAP_APPFONT( 80, 8 );
-        Text [ en-US ] = "~Orientation";
-    };
-    ListBox RID_RTS_PAPER_ORIENTATION_BOX
-    {
-        HelpID = "padmin:ListBox:RID_RTS_PAPERPAGE:RID_RTS_PAPER_ORIENTATION_BOX";
-        Border = TRUE;
-        DropDown = TRUE;
-        Pos = MAP_APPFONT( 115, 20 );
-        Size = MAP_APPFONT( 110, 120 );
-    };
-    FixedText RID_RTS_PAPER_DUPLEX_TXT
-    {
-        Pos = MAP_APPFONT( 5, 35 );
-        Size = MAP_APPFONT( 80, 8 );
-        Text [ en-US ] = "~Duplex";
-    };
-    ListBox RID_RTS_PAPER_DUPLEX_BOX
-    {
-        HelpID = "padmin:ListBox:RID_RTS_PAPERPAGE:RID_RTS_PAPER_DUPLEX_BOX";
-        Border = TRUE;
-        DropDown = TRUE;
-        Pos = MAP_APPFONT( 115, 35 );
-        Size = MAP_APPFONT( 110, 120 );
-    };
-    FixedText RID_RTS_PAPER_SLOT_TXT
-    {
-        Pos = MAP_APPFONT( 5, 50 );
-        Size = MAP_APPFONT( 80, 8 );
-        Text [ en-US ] = "Paper tray";
-    };
-    ListBox RID_RTS_PAPER_SLOT_BOX
-    {
-        HelpID = "padmin:ListBox:RID_RTS_PAPERPAGE:RID_RTS_PAPER_SLOT_BOX";
-        Border = TRUE;
-        DropDown = TRUE;
-        Pos = MAP_APPFONT( 115, 50 );
-        Size = MAP_APPFONT( 110, 120 );
-    };
-};
-
 TabPage RID_RTS_FONTSUBSTPAGE
 {
     HelpID = "padmin:TabPage:RID_RTS_FONTSUBSTPAGE";
diff --git a/padmin/uiconfig/ui/printerpaperpage.ui b/padmin/uiconfig/ui/printerpaperpage.ui
new file mode 100644
index 0000000..0ecf42c
--- /dev/null
+++ b/padmin/uiconfig/ui/printerpaperpage.ui
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkGrid" id="PrinterPaperPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="row_spacing">6</property>
+    <property name="column_spacing">12</property>
+    <property name="column_homogeneous">True</property>
+    <child>
+      <object class="GtkLabel" id="paperft">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">_Paper size</property>
+        <property name="use_underline">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="label4">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">_Orientation</property>
+        <property name="use_underline">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">1</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="duplexft">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">_Duplex</property>
+        <property name="use_underline">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">2</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="slotft">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">Paper tray</property>
+        <property name="use_underline">True</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="GtkComboBoxText" id="paperlb">
+        <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">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="orientlb">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="entry_text_column">0</property>
+        <property name="id_column">1</property>
+        <items>
+          <item translatable="yes">Portrait</item>
+          <item translatable="yes">Landscape</item>
+        </items>
+      </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="GtkComboBoxText" id="duplexlb">
+        <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">1</property>
+        <property name="top_attach">2</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkComboBoxText" id="slotlb">
+        <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">1</property>
+        <property name="top_attach">3</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/padmin/uiconfig/ui/printerproperties.ui b/padmin/uiconfig/ui/printerproperties.ui
deleted file mode 100644
index f78d12c..0000000
--- a/padmin/uiconfig/ui/printerproperties.ui
+++ /dev/null
@@ -1,218 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkDialog" id="dialog1">
-    <property name="can_focus">False</property>
-    <property name="border_width">5</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="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">0</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">1</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="GtkNotebook" id="notebook1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <child>
-              <object class="GtkGrid" id="grid1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
-                <property name="row_spacing">6</property>
-                <property name="column_spacing">12</property>
-                <property name="column_homogeneous">True</property>
-                <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">_Paper size</property>
-                    <property name="use_underline">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label4">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">_Orientataion</property>
-                    <property name="use_underline">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">1</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <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">_Duplex</property>
-                    <property name="use_underline">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">2</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <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">Paper tray</property>
-                    <property name="use_underline">True</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="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">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="comboboxtext2">
-                    <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">1</property>
-                    <property name="top_attach">1</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkComboBoxText" id="comboboxtext3">
-                    <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">1</property>
-                    <property name="top_attach">2</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkComboBoxText" id="comboboxtext4">
-                    <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">1</property>
-                    <property name="top_attach">3</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Paper </property>
-              </object>
-              <packing>
-                <property name="tab_fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child type="tab">
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="0">ok</action-widget>
-      <action-widget response="0">cancel</action-widget>
-    </action-widgets>
-  </object>
-</interface>
commit 126ec8f96680ad5222b10a4bf6aac9ff8b58fe88
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 17 09:27:33 2012 +0000

    Move forcing existence of tabpages to TabControl::GetOptimalSize
    
    rather than just for SfxTabDialog, do it for all TabControls
    
    Change-Id: I29a19c51c7ce3baec428df716e2ee3595e496c39

diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index a7574c5..f3514ed 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -727,17 +727,6 @@ sal_Bool SfxTabDialog::IsApplyButtonEnabled() const
 
 void SfxTabDialog::Start_Impl()
 {
-    //We need to force all tabs to exist to get overall optimal size for dialog
-    for (sal_uInt16 n=0; n < m_pTabCtrl->GetPageCount(); ++n)
-    {
-        sal_uInt16 nPageId = m_pTabCtrl->GetPageId(n);
-        if (!m_pTabCtrl->GetTabPage(nPageId))
-        {
-            m_pTabCtrl->SetCurPageId(nPageId);
-            ActivatePageHdl(m_pTabCtrl);
-        }
-    }
-
     DBG_ASSERT( pImpl->pData->Count() == m_pTabCtrl->GetPageCount(), "not all pages registered" );
     sal_uInt16 nActPage = m_pTabCtrl->GetPageId( 0 );
 
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index e5eb0ce..e2fecc2 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2205,6 +2205,17 @@ Size TabControl::calculateRequisition() const
     {
         const TabPage *pPage = it->mpTabPage;
         //it's a real nuisance if the page is not inserted yet :-(
+        //We need to force all tabs to exist to get overall optimal size for dialog
+        if (!pPage)
+        {
+            TabControl *pThis = const_cast<TabControl*>(this);
+            sal_uInt16 nLastPageId = pThis->GetCurPageId();
+            pThis->SetCurPageId(it->mnId);
+            pThis->ActivatePage();
+            pThis->SetCurPageId(nLastPageId);
+            pPage = it->mpTabPage;
+        }
+
         if (!pPage)
             continue;
 
commit cbcb304b8be5d0824872625b5373729a79042f0f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 20:33:03 2012 +0000

    allow tabpageids to have names which can be queried
    
    and in the .ui builder set that name from the name of the
    label widget matching that tab
    
    which allows human understandable names to be used in looking
    up the pageids for a given tab page rather than fragile
    by_position so tab pages can be freely moved around without
    busting the code
    
    Change-Id: Ieaff1408b25545c561a0b28c51ec205af6e1400f

diff --git a/vcl/inc/vcl/tabctrl.hxx b/vcl/inc/vcl/tabctrl.hxx
index 649ac31..39cbad3 100644
--- a/vcl/inc/vcl/tabctrl.hxx
+++ b/vcl/inc/vcl/tabctrl.hxx
@@ -128,11 +128,12 @@ public:
     void                Clear();
     void                EnablePage( sal_uInt16 nPageId, bool bEnable = true );
 
-    sal_uInt16              GetPageCount() const;
-    sal_uInt16              GetPageId( sal_uInt16 nPos ) const;
-    sal_uInt16              GetPagePos( sal_uInt16 nPageId ) const;
-    sal_uInt16              GetPageId( const Point& rPos ) const;
-    sal_uInt16              GetPageId( const TabPage& rPage ) const;
+    sal_uInt16          GetPagePos( sal_uInt16 nPageId ) const;
+    sal_uInt16          GetPageCount() const;
+    sal_uInt16          GetPageId( sal_uInt16 nPos ) const;
+    sal_uInt16          GetPageId( const Point& rPos ) const;
+    sal_uInt16          GetPageId( const TabPage& rPage ) const;
+    sal_uInt16          GetPageId( const OString& rName ) const;
 
     void                SetCurPageId( sal_uInt16 nPageId );
     sal_uInt16              GetCurPageId() const;
@@ -153,8 +154,11 @@ public:
     void                SetHelpText( sal_uInt16 nPageId, const XubString& rText );
     const XubString&    GetHelpText( sal_uInt16 nPageId ) const;
 
-    void                SetHelpId( sal_uInt16 nPageId, const rtl::OString& rId ) const;
-    rtl::OString        GetHelpId( sal_uInt16 nPageId ) const;
+    void                SetHelpId( sal_uInt16 nPageId, const OString& rId ) const;
+    OString             GetHelpId( sal_uInt16 nPageId ) const;
+
+    void                SetPageName( sal_uInt16 nPageId, const OString& rName ) const;
+    OString             GetPageName( sal_uInt16 nPageId ) const;
 
     void                SetPageImage( sal_uInt16 nPageId, const Image& rImage );
 
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index d0cd3bf..e5eb0ce 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -42,14 +42,15 @@
 
 struct ImplTabItem
 {
-    sal_uInt16              mnId;
+    sal_uInt16          mnId;
     TabPage*            mpTabPage;
     String              maText;
     String              maFormatText;
     String              maHelpText;
-    rtl::OString        maHelpId;
+    OString             maHelpId;
+    OString             maTabName;
     Rectangle           maRect;
-    sal_uInt16              mnLine;
+    sal_uInt16          mnLine;
     bool                mbFullVisible;
     bool                mbEnabled;
     Image               maTabImage;
@@ -1855,6 +1856,18 @@ sal_uInt16 TabControl::GetPageId( const TabPage& rPage ) const
     return 0;
 }
 
+sal_uInt16 TabControl::GetPageId( const OString& rName ) const
+{
+    for( std::vector< ImplTabItem >::const_iterator it = mpTabCtrlData->maItemList.begin();
+         it != mpTabCtrlData->maItemList.end(); ++it )
+    {
+        if ( it->maTabName == rName )
+            return it->mnId;
+    }
+
+    return 0;
+}
+
 // -----------------------------------------------------------------------
 
 void TabControl::SetCurPageId( sal_uInt16 nPageId )
@@ -2036,7 +2049,7 @@ const XubString& TabControl::GetHelpText( sal_uInt16 nPageId ) const
 
 // -----------------------------------------------------------------------
 
-void TabControl::SetHelpId( sal_uInt16 nPageId, const rtl::OString& rId ) const
+void TabControl::SetHelpId( sal_uInt16 nPageId, const OString& rId ) const
 {
     ImplTabItem* pItem = ImplGetItem( nPageId );
 
@@ -2044,15 +2057,32 @@ void TabControl::SetHelpId( sal_uInt16 nPageId, const rtl::OString& rId ) const
         pItem->maHelpId = rId;
 }
 
-rtl::OString TabControl::GetHelpId( sal_uInt16 nPageId ) const
+OString TabControl::GetHelpId( sal_uInt16 nPageId ) const
+{
+    ImplTabItem* pItem = ImplGetItem( nPageId );
+
+    if (pItem)
+        return pItem->maHelpId;
+
+    return OString();
+}
+
+void TabControl::SetPageName( sal_uInt16 nPageId, const OString& rName ) const
 {
-    rtl::OString aRet;
     ImplTabItem* pItem = ImplGetItem( nPageId );
 
     if ( pItem )
-        aRet = pItem->maHelpId;
+        pItem->maTabName = rName;
+}
 
-    return aRet;
+OString TabControl::GetPageName( sal_uInt16 nPageId ) const
+{
+    ImplTabItem* pItem = ImplGetItem( nPageId );
+
+    if (pItem)
+        return pItem->maTabName;
+
+    return OString();
 }
 
 // -----------------------------------------------------------------------
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index a328bb3..9a6b911 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1137,8 +1137,10 @@ void VclBuilder::handleTabChild(Window *pParent, xmlreader::XmlReader &reader)
     VclBuilder::stringmap::iterator aFind = aProperties.find(OString("label"));
     if (aFind != aProperties.end())
     {
-        pTabControl->SetPageText(pTabControl->GetCurPageId(),
+        sal_uInt16 nPageId = pTabControl->GetCurPageId();
+        pTabControl->SetPageText(nPageId,
             OStringToOUString(aFind->second, RTL_TEXTENCODING_UTF8));
+        pTabControl->SetPageName(nPageId, sID);
     }
     else
         pTabControl->RemovePage(pTabControl->GetCurPageId());
commit 98818ee54e3555e2ed8fe3a2160095a1fe84b818
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 20:01:47 2012 +0000

    mnTabPageResId is not used anywhere, continue to skip the resource though
    
    Change-Id: Ief4707613352b1382fb23e5914fd05f6c7618327

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 44bb424..d0cd3bf 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -43,7 +43,6 @@
 struct ImplTabItem
 {
     sal_uInt16              mnId;
-    sal_uInt16              mnTabPageResId;
     TabPage*            mpTabPage;
     String              maText;
     String              maFormatText;
@@ -56,7 +55,7 @@ struct ImplTabItem
     Image               maTabImage;
 
     ImplTabItem()
-    : mnId( 0 ), mnTabPageResId( 0 ), mpTabPage( NULL ),
+    : mnId( 0 ), mpTabPage( NULL ),
       mnLine( 0 ), mbFullVisible( sal_False ), mbEnabled( true )
     {}
 };
@@ -1652,8 +1651,8 @@ void TabControl::InsertPage( const ResId& rResId, sal_uInt16 nPos )
     // PageResID
     if ( nObjMask & RSC_TABCONTROLITEM_PAGERESID )
     {
-        ImplTabItem& rItem = mpTabCtrlData->maItemList[ GetPagePos( nItemId ) ];
-        rItem.mnTabPageResId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
+        //skip unused TabPageResId value
+        ReadLongRes();
     }
 }
 
@@ -1697,7 +1696,6 @@ void TabControl::InsertPage( sal_uInt16 nPageId, const XubString& rText,
     // init new page item
     pItem->mnId             = nPageId;
     pItem->mpTabPage        = NULL;
-    pItem->mnTabPageResId   = 0;
     pItem->maText           = rText;
     pItem->mbFullVisible    = sal_False;
 
commit 68d421bdac59295bf91457def4cc041ea5c3d8d0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 18:23:04 2012 +0000

    callcatcher: update unusedcode code list
    
    Change-Id: I3ba30e0745c8f2adac29a6c4ff15a8156cee4baf

diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index ea7fb3a..b74db73 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -193,8 +193,6 @@ public:
 
     void GetMemberResultNames(ScDPUniqueStringSet& rNames, long nDimension);
 
-    void FillPageList( std::vector<rtl::OUString>& rStrings, long nField );
-
     void                ToggleDetails(const ::com::sun::star::sheet::DataPilotTableHeaderData& rElemDesc, ScDPObject* pDestObj);
 
     bool                FillOldParam(ScPivotParam& rParam) const;
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index e55a9c8..3c43378 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1170,95 +1170,6 @@ long ScDPObject::GetDimCount()
     return nRet;
 }
 
-void ScDPObject::FillPageList( std::vector<rtl::OUString>& rStrings, long nField )
-{
-    //! merge members access with ToggleDetails?
-
-    //! convert field index to dimension index?
-
-    OSL_ENSURE( xSource.is(), "no source" );
-    if ( !xSource.is() ) return;
-
-    uno::Reference<container::XNamed> xDim;
-    uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
-    uno::Reference<container::XIndexAccess> xIntDims = new ScNameToIndexAccess( xDimsName );
-    long nIntCount = xIntDims->getCount();
-    if ( nField < nIntCount )
-    {
-        uno::Reference<uno::XInterface> xIntDim = ScUnoHelpFunctions::AnyToInterface(
-                                    xIntDims->getByIndex(nField) );
-        xDim = uno::Reference<container::XNamed>( xIntDim, uno::UNO_QUERY );
-    }
-    OSL_ENSURE( xDim.is(), "dimension not found" );
-    if ( !xDim.is() ) return;
-
-    uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
-    long nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp,
-                            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_USEDHIERARCHY)) );
-    long nLevel = 0;
-
-    long nHierCount = 0;
-    uno::Reference<container::XIndexAccess> xHiers;
-    uno::Reference<sheet::XHierarchiesSupplier> xHierSupp( xDim, uno::UNO_QUERY );
-    if ( xHierSupp.is() )
-    {
-        uno::Reference<container::XNameAccess> xHiersName = xHierSupp->getHierarchies();
-        xHiers = new ScNameToIndexAccess( xHiersName );
-        nHierCount = xHiers->getCount();
-    }
-    uno::Reference<uno::XInterface> xHier;
-    if ( nHierarchy < nHierCount )
-        xHier = ScUnoHelpFunctions::AnyToInterface( xHiers->getByIndex(nHierarchy) );
-    OSL_ENSURE( xHier.is(), "hierarchy not found" );
-    if ( !xHier.is() ) return;
-
-    long nLevCount = 0;
-    uno::Reference<container::XIndexAccess> xLevels;
-    uno::Reference<sheet::XLevelsSupplier> xLevSupp( xHier, uno::UNO_QUERY );
-    if ( xLevSupp.is() )
-    {
-        uno::Reference<container::XNameAccess> xLevsName = xLevSupp->getLevels();
-        xLevels = new ScNameToIndexAccess( xLevsName );
-        nLevCount = xLevels->getCount();
-    }
-    uno::Reference<uno::XInterface> xLevel;
-    if ( nLevel < nLevCount )
-        xLevel = ScUnoHelpFunctions::AnyToInterface( xLevels->getByIndex(nLevel) );
-    OSL_ENSURE( xLevel.is(), "level not found" );
-    if ( !xLevel.is() ) return;
-
-    uno::Reference<container::XNameAccess> xMembers;
-    uno::Reference<sheet::XMembersSupplier> xMbrSupp( xLevel, uno::UNO_QUERY );
-    if ( xMbrSupp.is() )
-        xMembers = xMbrSupp->getMembers();
-    OSL_ENSURE( xMembers.is(), "members not found" );
-    if ( !xMembers.is() ) return;
-
-    uno::Sequence<rtl::OUString> aNames = xMembers->getElementNames();
-    long nNameCount = aNames.getLength();
-    const rtl::OUString* pNameArr = aNames.getConstArray();
-    for (long nPos = 0; nPos < nNameCount; ++nPos)
-    {
-        // Make sure to insert only visible members.
-        Reference<XPropertySet> xPropSet(xMembers->getByName(pNameArr[nPos]), UNO_QUERY);
-        sal_Bool bVisible = false;
-        if (xPropSet.is())
-        {
-            Any any = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISVISIBLE)));
-            any >>= bVisible;
-        }
-
-        if (bVisible)
-        {
-            // use the order from getElementNames
-            rStrings.push_back(pNameArr[nPos]);
-        }
-    }
-
-    //  add "-all-" entry to the top (unsorted)
-    rStrings.insert(rStrings.begin(), SC_RESSTR(SCSTR_ALL));
-}
-
 void ScDPObject::GetHeaderPositionData(const ScAddress& rPos, DataPilotTableHeaderData& rData)
 {
     using namespace ::com::sun::star::sheet::DataPilotTablePositionType;
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index b2d9895..88d5fdb 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1433,7 +1433,7 @@ const ScDPItemData& ScDPDimension::GetSelectedData()
     {
         // find the named member to initialize pSelectedData from it, with name and value
 
-        long nLevel = 0;        // same as in ScDPObject::FillPageList
+        long nLevel = 0;
 
         long nHierarchy = getUsedHierarchy();
         if ( nHierarchy >= GetHierarchiesObject()->getCount() )
diff --git a/sc/source/filter/inc/formulabase.hxx b/sc/source/filter/inc/formulabase.hxx
index 342e533..8fbe09d 100644
--- a/sc/source/filter/inc/formulabase.hxx
+++ b/sc/source/filter/inc/formulabase.hxx
@@ -653,16 +653,6 @@ public:
                             const BinAddress& rAddress,
                             bool bAbsolute );
 
-    /** Generates a cell range string in A1:A1 notation from the passed binary
-        cell range address.
-
-        @param rRange  The cell range address containing column and row indexes.
-        @param bAbsolute  True = adds dollar signs before columns and rows.
-     */
-    static ::rtl::OUString generateRange2dString(
-                            const BinRange& rRange,
-                            bool bAbsolute );
-
     // ------------------------------------------------------------------------
 
     /** Generates a string in Calc formula notation from the passed string.
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index e7060ce..e9796f8 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1430,14 +1430,6 @@ OUString FormulaProcessorBase::generateAddress2dString( const BinAddress& rAddre
     return aBuffer.makeStringAndClear();
 }
 
-OUString FormulaProcessorBase::generateRange2dString( const BinRange& rRange, bool bAbsolute )
-{
-    OUStringBuffer aBuffer( generateAddress2dString( rRange.maFirst, bAbsolute ) );
-    if( (rRange.getColCount() > 1) || (rRange.getRowCount() > 1) )
-        aBuffer.append( sal_Unicode( ':' ) ).append( generateAddress2dString( rRange.maLast, bAbsolute ) );
-    return aBuffer.makeStringAndClear();
-}
-
 // ----------------------------------------------------------------------------
 
 OUString FormulaProcessorBase::generateApiString( const OUString& rString )
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index ccc47c0..b125c01 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1319,11 +1319,6 @@ void ScCheckListMenuWindow::setConfig(const Config& rConfig)
     maConfig = rConfig;
 }
 
-const Size& ScCheckListMenuWindow::getWindowSize() const
-{
-    return maWndSize;
-}
-
 bool ScCheckListMenuWindow::isAllSelected() const
 {
     return maChkToggleAll.IsChecked();
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index cabddc5..1a36ae5 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -244,8 +244,6 @@ public:
     void initMembers();
     void setConfig(const Config& rConfig);
 
-    const Size& getWindowSize() const;
-
     bool isAllSelected() const;
     void getResult(ResultType& rResult);
     void launch(const Rectangle& rRect);
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 8a7da2b..ada8fbe 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -622,27 +622,6 @@ ThumbnailViewItemAcc::~ThumbnailViewItemAcc()
 {
 }
 
-void ThumbnailViewItemAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValue, const uno::Any& rNewValue )
-{
-    if( nEventId )
-    {
-        ::std::vector< uno::Reference< accessibility::XAccessibleEventListener > >                  aTmpListeners( mxEventListeners );
-        ::std::vector< uno::Reference< accessibility::XAccessibleEventListener > >::const_iterator  aIter( aTmpListeners.begin() );
-        accessibility::AccessibleEventObject                                                        aEvtObject;
-
-        aEvtObject.EventId = nEventId;
-        aEvtObject.Source = static_cast<uno::XWeak*>(this);
-        aEvtObject.NewValue = rNewValue;
-        aEvtObject.OldValue = rOldValue;
-
-        while( aIter != aTmpListeners.end() )
-        {
-            (*aIter)->notifyEvent( aEvtObject );
-            aIter++;
-        }
-    }
-}
-
 void ThumbnailViewItemAcc::ParentDestroyed()
 {
     const ::osl::MutexGuard aGuard( maMutex );
diff --git a/sfx2/source/control/thumbnailviewacc.hxx b/sfx2/source/control/thumbnailviewacc.hxx
index bfa3b45..612cf7d 100644
--- a/sfx2/source/control/thumbnailviewacc.hxx
+++ b/sfx2/source/control/thumbnailviewacc.hxx
@@ -189,7 +189,6 @@ public:
 
     void    ParentDestroyed();
 
-    void    FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue );
     sal_Bool    HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
 
 public:
diff --git a/unusedcode.easy b/unusedcode.easy
index cce5489..8b0f151 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -10,7 +10,6 @@ ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent()
 ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&)
 SfxDocumentTemplateDlg::SfxDocumentTemplateDlg(Window*, SfxDocumentTemplates*)
 TextEngine::GetLeftMargin() const
-ThumbnailViewItemAcc::FireAccessibleEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&)
 TransitionScene::clear()
 UnoControl::UnoControl()
 VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer(Size const&, Fraction const&, Point const&, boost::shared_array<unsigned char> const&)
commit 0d5644bbe90e87ccd646276bfc545c3201caa005
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 12:02:39 2012 +0000

    UniString::Fill -> OUStringBuffer::padToLength
    
    none of these strings starts out before "Fill" longer than the size they are
    asked to be filled to so there are no trailing unfilled bits to consider
    
    all of which means that we can get rid of UniString::Fill now
    
    Change-Id: I8da21e9787017da9243a2c1d7118d3fbcca2a7fb

diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 4aec7df..1b9debb 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -23,6 +23,7 @@
 #endif
 
 #include "scitems.hxx"
+#include <comphelper/string.hxx>
 #include <svx/algitem.hxx>
 #include <editeng/boxitem.hxx>
 #include <editeng/brshitem.hxx>
@@ -138,9 +139,9 @@ static String lcl_ValueString( sal_Int32 nValue, sal_uInt16 nMinDigits )
         String aStr = String::CreateFromInt32( Abs( nValue ) );
         if ( aStr.Len() < nMinDigits )
         {
-            String aZero;
-            aZero.Fill( nMinDigits - aStr.Len(), '0' );
-            aStr.Insert( aZero, 0 );
+            OUStringBuffer aZero;
+            comphelper::string::padToLength(aZero, nMinDigits - aStr.Len(), '0');
+            aStr.Insert(aZero.makeStringAndClear(), 0);
         }
         //  nMinDigits doesn't include the '-' sign -> add after inserting zeros
         if ( nValue < 0 )
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 1b55b92..8e96901 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -71,7 +71,9 @@ sal_Bool SwGluePortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt )
     if( GetLen() && rInf.OnWin() &&
         rInf.GetOpt().IsBlank() && rInf.IsNoSymbol() )
     {
-        rTxt.Fill( GetLen(), CH_BULLET );
+        OUStringBuffer aBuf;
+        comphelper::string::padToLength(aBuf, GetLen(), CH_BULLET);
+        rTxt = aBuf.makeStringAndClear();
         return sal_True;
     }
     return sal_False;
@@ -88,7 +90,7 @@ void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
 
     if( rInf.GetFont()->IsPaintBlank() )
     {
-        rtl::OUStringBuffer aBuf;
+        OUStringBuffer aBuf;
         comphelper::string::padToLength(aBuf, GetFixWidth() / GetLen(), ' ');
         String aTxt(aBuf.makeStringAndClear());
         SwTxtPaintInfo aInf( rInf, aTxt );
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 49774bf..6eaf2d0 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <boost/scoped_ptr.hpp>
+#include <comphelper/string.hxx>
 #include <tools/solar.h>
 #include <vcl/vclenum.hxx>
 #include <vcl/font.hxx>
@@ -687,8 +688,10 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
             if( bListSymbol )
             {
                 //cBulletChar benutzen, damit auf dem MAC richtig gemappt wird
-                sTxt.Fill(  SVBT8ToByte( rAV.cbTextBefore )
-                          + SVBT8ToByte( rAV.cbTextAfter  ), cBulletChar );
+                OUStringBuffer aBuf;
+                comphelper::string::padToLength(aBuf, SVBT8ToByte(rAV.cbTextBefore)
+                    + SVBT8ToByte(rAV.cbTextAfter), cBulletChar);
+                sTxt = aBuf.makeStringAndClear();
             }
         }
     }
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 674c36d..03276c1 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -227,8 +227,6 @@ public:
     UniString&          Erase( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN );
     UniString           Copy( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN ) const;
 
-    UniString&          Fill( xub_StrLen nCount, sal_Unicode cFillChar = ' ' );
-
     UniString&          ToLowerAscii();
     UniString&          ToUpperAscii();
 
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index 0beac79..f8fc18a 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -237,36 +237,6 @@ StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
         return COMPARE_GREATER;
 }
 
-STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
-{
-    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
-    if ( !nCount )
-        return *this;
-
-    // extend string if fill length is larger
-    if ( nCount > mpData->mnLen )
-    {
-        // allocate string of new length
-        STRINGDATA* pNewData = ImplAllocData( nCount );
-        STRING_RELEASE((STRING_TYPE *)mpData);
-        mpData = pNewData;
-    }
-    else
-        ImplCopyData();
-
-    STRCODE* pStr = mpData->maStr;
-    do
-    {
-        *pStr = cFillChar;
-        ++pStr,
-        --nCount;
-    }
-    while ( nCount );
-
-    return *this;
-}
-
 STRCODE* STRING::GetBufferAccess()
 {
     DBG_CHKTHIS( STRING, DBGCHECKSTRING );
commit 2be589381e8e8969764e0de1ad079fca959afb8a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 15:42:15 2012 +0000

    remove rather pointless uses of aEmptyStr
    
    Change-Id: I66fdf76c9e6aceca594bac6e1007676250ac7301

diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index d2140b6..dffcfa4 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -188,7 +188,7 @@ static sal_uInt16 lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr
             bool bOldOnWin = rInf.OnWin();
             ((SwTxtSizeInfo &)rInf).SetOnWin( false );
 
-            XubString aStr( aEmptyStr );
+            XubString aStr;
             pPor->GetExpTxt( rInf, aStr );
             ((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
 
@@ -616,7 +616,7 @@ xub_StrLen SwTxtPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf,
             bool bOldOnWin = rInf.OnWin();
             ((SwTxtSizeInfo &)rInf).SetOnWin( false );
 
-            XubString aStr( aEmptyStr );
+            XubString aStr;
             GetExpTxt( rInf, aStr );
             ((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
 
@@ -646,7 +646,7 @@ long SwTxtPortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) cons
             bool bOldOnWin = rInf.OnWin();
             ((SwTxtSizeInfo &)rInf).SetOnWin( false );
 
-            XubString aStr( aEmptyStr );
+            XubString aStr;
             GetExpTxt( rInf, aStr );
             ((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
             if( nSpaceAdd > 0 )
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 3eba96d..14f7485 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -71,9 +71,9 @@ sal_uInt16 GetDefaultFontHeight( SwDrawTextInfo &rInf )
     SwDocShell* pDocShell = rInf.GetShell()->GetDoc()->GetDocShell();
     SfxStyleSheetBasePool* pBasePool = pDocShell->GetStyleSheetPool();
 
-    String aString(SW_RES(STR_POOLCOLL_STANDARD));
+    OUString sString(SW_RESSTR(STR_POOLCOLL_STANDARD));
 
-    SfxStyleSheetBase* pStyle = pBasePool->Find( aString, (SfxStyleFamily)SFX_STYLE_FAMILY_PARA );
+    SfxStyleSheetBase* pStyle = pBasePool->Find(sString, (SfxStyleFamily)SFX_STYLE_FAMILY_PARA);
     SfxItemSet& aTmpSet = pStyle->GetItemSet();
     SvxFontHeightItem &aDefaultFontItem = (SvxFontHeightItem&)aTmpSet.Get(RES_CHRATR_CJK_FONTSIZE);
     return (sal_uInt16)aDefaultFontItem.GetHeight();
@@ -1410,7 +1410,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
     else
     {
         const String* pStr = &rInf.GetText();
-        String aStr( aEmptyStr );
+        String aStr;
         sal_Bool bBullet = rInf.GetBullet();
         if( bSymbol )
             bBullet = sal_False;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 8509ff8..3b39dcc 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -4560,7 +4560,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
     SwTxtFmtColl *pCollToSet = 0;   // die zu setzende Vorlage
     SfxItemSet *pItemSet = 0;       // der Set fuer harte Attrs
     sal_uInt16 nTopColl = pContext ? pContext->GetTxtFmtColl() : 0;
-    const String& rTopClass = pContext ? pContext->GetClass() : (const String&) aEmptyStr;
+    const String& rTopClass = pContext ? pContext->GetClass() : aEmptyStr;
     sal_uInt16 nDfltColl = RES_POOLCOLL_TEXT;
 
     sal_Bool bInPRE=sal_False;                          // etwas Kontext Info
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx
index a89a06d..2a306b6 100644
--- a/sw/source/ui/utlui/gloslst.cxx
+++ b/sw/source/ui/utlui/gloslst.cxx
@@ -189,7 +189,7 @@ sal_uInt16  SwGlossaryList::GetGroupCount()
 String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* pTitle)
 {
     OSL_ENSURE(aGroupArr.size() > nPos, "group not available");
-    String sRet(aEmptyStr);
+    String sRet;
     if(nPos < aGroupArr.size())
     {
         AutoTextGroup* pGroup = aGroupArr[nPos];
commit fd84daf696a368c2c7561b5253b32a63ecdeca4a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 14:57:53 2012 +0000

    UniString::ToUpperAscii -> OUString::toAsciiUpperCase
    
    Change-Id: I70f2238021c79a34b97a6bdbcc374d8b1ffb2a31

diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 703ee24..dfe7f64 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -105,16 +105,17 @@ namespace
             }
 
             // get two extensions which differ by case only
-            String sExtension1 = aContentURL.getExtension();
-            String sExtension2( sExtension1 );
-            sExtension2.ToLowerAscii();
-            if ( sExtension2 == sExtension1 )
+            OUString sExtension1(aContentURL.getExtension());
+            OUString sExtension2(sExtension1.toAsciiLowerCase());
+            if (sExtension2 == sExtension1)
+            {
                 // the extension was already in lower case
-                sExtension2.ToUpperAscii();
+                sExtension2 = sExtension2.toAsciiUpperCase();
+            }
 
             // the complete URL for the second extension
             INetURLObject aURL2( aContentURL );
-            if ( sExtension2.Len() )
+            if (!sExtension2.isEmpty())
                 aURL2.SetExtension( sExtension2 );
             if ( aURL2.GetMainURL(INetURLObject::NO_DECODE) == aContentURL.GetMainURL(INetURLObject::NO_DECODE) )
                 return -1;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 6be204b..4656e2b 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3515,19 +3515,18 @@ void ScCompiler::AutoCorrectParsedSymbol()
     }
 }
 
-static inline bool lcl_UpperAsciiOrI18n( String& rUpper, const String& rOrg, FormulaGrammar::Grammar eGrammar )
+static inline bool lcl_UpperAsciiOrI18n( String& rUpper, const OUString& rOrg, FormulaGrammar::Grammar eGrammar )
 {
     if (FormulaGrammar::isODFF( eGrammar ))
     {
         // ODFF has a defined set of English function names, avoid i18n
         // overhead.
-        rUpper = rOrg;
-        rUpper.ToUpperAscii();
+        rUpper = rOrg.toAsciiUpperCase();
         return true;
     }
     else
     {
-        rUpper = ScGlobal::pCharClass->uppercase( rOrg );
+        rUpper = ScGlobal::pCharClass->uppercase(rOrg);
         return false;
     }
 }
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 5fd4de4..016124f 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -580,9 +580,9 @@ static String lcl_GetCharStr( sal_Int32 nNo )
     return aStr;
 }
 
-static String lcl_GetNumStr( sal_Int32 nNo, SvxNumType eType )
+static OUString lcl_GetNumStr(sal_Int32 nNo, SvxNumType eType)
 {
-    String aTmpStr(rtl::OUString('0'));
+    OUString aTmpStr('0');
     if( nNo )
     {
         switch( eType )
@@ -597,11 +597,11 @@ static String lcl_GetNumStr( sal_Int32 nNo, SvxNumType eType )
             if( nNo < 4000 )
                 aTmpStr = SvxNumberFormat::CreateRomanString( nNo, ( eType == SVX_ROMAN_UPPER ) );
             else
-                aTmpStr.Erase();
+                aTmpStr = OUString();
             break;
 
         case SVX_NUMBER_NONE:
-            aTmpStr.Erase();
+            aTmpStr = OUString();
             break;
 
 //      CHAR_SPECIAL:
@@ -609,12 +609,12 @@ static String lcl_GetNumStr( sal_Int32 nNo, SvxNumType eType )
 
 //      case ARABIC:    ist jetzt default
         default:
-            aTmpStr = String::CreateFromInt32( nNo );
+            aTmpStr = OUString::valueOf(nNo);
             break;
         }
 
         if( SVX_CHARS_UPPER_LETTER == eType )
-            aTmpStr.ToUpperAscii();
+            aTmpStr = aTmpStr.toAsciiUpperCase();
     }
     return aTmpStr;
 }
@@ -641,7 +641,7 @@ String ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
     if (!pFieldData)
         return rtl::OUString("?");
 
-    rtl::OUString aRet;
+    OUString aRet;
     sal_Int32 nClsId = pFieldData->GetClassId();
     switch (nClsId)
     {
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 3952c02..f8bc484 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -529,8 +529,8 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aTimeLog, "svtools", "hb93813", "SvFileInformationManager::GetDescription_Impl()" );
 
-    String sDescription;
-    String sExtension( rObject.getExtension() ), sURL( rObject.GetMainURL( INetURLObject::NO_DECODE ) );
+    OUString sExtension(rObject.getExtension());
+    String sDescription, sURL( rObject.GetMainURL( INetURLObject::NO_DECODE ) );
     sal_uInt16 nResId = 0;
     sal_Bool bShowExt = sal_False, bDetected = sal_False, bOnlyFile = sal_False;
     sal_Bool bFolder = bDetectFolder ? CONTENT_HELPER::IsFolder( sURL ) : sal_False;
@@ -552,10 +552,10 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje
             if ( !bDetected )
             {
                 // search a description by extension
-                sal_Bool bExt = ( sExtension.Len() > 0 );
+                bool bExt = !sExtension.isEmpty();
                 if ( bExt )
                 {
-                    sExtension.ToLowerAscii();
+                    sExtension = sExtension.toAsciiLowerCase();
                     nResId = GetDescriptionId_Impl( sExtension, bShowExt );
                 }
                 if ( !nResId )
@@ -574,7 +574,7 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje
         if ( bOnlyFile )
         {
             bShowExt = sal_False;
-            sExtension.ToUpperAscii();
+            sExtension = sExtension.toAsciiUpperCase();
             sDescription = sExtension;
             sDescription += '-';
         }
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 1b1f0c3..7333a36 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1284,9 +1284,8 @@ XubString SdrView::GetStatusText()
     if(aStr.Len())
     {
         // capitalize first letter
-        String aTmpStr(aStr.Copy(0, 1));
-        aTmpStr.ToUpperAscii();
-        aStr.Replace(0, 1, aTmpStr);
+        OUString aTmpStr(aStr.Copy(0, 1));
+        aStr.Replace(0, 1, aTmpStr.toAsciiUpperCase());
     }
     return aStr;
 }
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 1e40586..0e5e46d 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -139,8 +139,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
                 if(nSrchPos > nActPos + 1)
                 {
                     // some string was found
-                    String sToken = rSource.Copy(nActPos + 1, nSrchPos - nActPos - 1 );
-                    sToken.ToUpperAscii();
+                    OUString sToken = rSource.Copy(nActPos + 1, nSrchPos - nActPos - 1 );
+                    sToken = sToken.toAsciiUpperCase();
                     int nToken = ::GetHTMLToken(sToken);
                     if(nToken)
                     {
@@ -154,7 +154,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
                         // what was that?
                         SAL_WARN(
                             "sw.level2",
-                            "Token " << rtl::OUString(sToken)
+                            "Token " << sToken
                                 << " not recognised!");
                     }
 
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 725f697..cdc358a 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -2383,12 +2383,10 @@ static sal_Bool ImplTimeGetValue( const XubString& rStr, Time& rTime,
             return sal_False;
 
         aStr.ToUpperAscii();
-        XubString aAM( rLocaleDataWrapper.getTimeAM() );
-        XubString aPM( rLocaleDataWrapper.getTimePM() );
-        aAM.ToUpperAscii();
-        aPM.ToUpperAscii();
-        rtl::OUString aAM2("AM");  // aAM is localized
-        rtl::OUString aPM2("PM");  // aPM is localized
+        OUString aAM(rLocaleDataWrapper.getTimeAM().toAsciiUpperCase());
+        OUString aPM(rLocaleDataWrapper.getTimePM().toAsciiUpperCase());
+        OUString aAM2("AM");  // aAM is localized
+        OUString aPM2("PM");  // aPM is localized
 
         if ( (nHour < 12) && ( ( aStr.Search( aPM ) != STRING_NOTFOUND ) || ( aStr.Search( aPM2 ) != STRING_NOTFOUND ) ) )
             nHour += 12;
commit a1175f3d6ba3e16f81bb12b55c590fc605695b5f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 14:51:15 2012 +0000

    String aNam uppercased but otherwise unused
    
    Change-Id: Ifd8c5edd3711357374efb2aba0ed108a36d3c740

diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 5ae7521..aa4bb54 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -175,13 +175,10 @@ void SdrPaintView::ImpClearVars()
     nGraphicManagerDrawMode = GRFMGR_DRAW_STANDARD;
     aComeBackTimer.SetTimeout(1);
     aComeBackTimer.SetTimeoutHdl(LINK(this,SdrPaintView,ImpComeBackHdl));
-    String aNam;    // System::GetUserName() just return an empty string
 
     if (pMod)
         SetDefaultStyleSheet(pMod->GetDefaultStyleSheet(), sal_True);
 
-    aNam.ToUpperAscii();
-
     maGridColor = Color( COL_BLACK );
 }
 
commit bba34cfa6df4f8b7ca181d517dca675c0dc23b81
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 12:45:36 2012 +0000

    use return value optimization
    
    Change-Id: I08e6b49c9250d3542777f207e93f1d7b6d1a92a7

diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx
index ffb468a..b8d9c6b 100644
--- a/connectivity/source/drivers/file/quotedstring.cxx
+++ b/connectivity/source/drivers/file/quotedstring.cxx
@@ -85,10 +85,10 @@ namespace connectivity
     }
 
     //------------------------------------------------------------------
-    void QuotedTokenizedString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel ) const
+    String QuotedTokenizedString::GetTokenSpecial(xub_StrLen& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel) const
     {
         RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen at sun.com", "QuotedTokenizedString::GetTokenCount" );
-        _rStr.Erase();
+        String aStr;
         const xub_StrLen nLen = m_sString.Len();
         if ( nLen )
         {
@@ -98,9 +98,9 @@ namespace connectivity
             if (bInString )
                 ++nStartPos;            // skip this character!
             if ( nStartPos >= nLen )
-                return;
+                return aStr;
 
-            sal_Unicode* pData = _rStr.AllocBuffer( nLen - nStartPos + 1 );
+            sal_Unicode* pData = aStr.AllocBuffer( nLen - nStartPos + 1 );
             const sal_Unicode* pStart = pData;
             // Search until end of string for the first not matching character
             for( xub_StrLen i = nStartPos; i < nLen; ++i )
@@ -147,8 +147,9 @@ namespace connectivity
                 }
             } // for( xub_StrLen i = nStartPos; i < nLen; ++i )
             *pData = 0;
-            _rStr.ReleaseBufferAccess(xub_StrLen(pData - pStart));
+            aStr.ReleaseBufferAccess(xub_StrLen(pData - pStart));
         }
+        return aStr;
     }
 }
 
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 7982417..6f13d6d 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -132,7 +132,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
             {
                 if ( bHasHeaderLine )
                 {
-                    aHeaderLine.GetTokenSpecial(aColumnName,nStartPosHeaderLine,m_cFieldDelimiter,m_cStringDelimiter);
+                    aColumnName = aHeaderLine.GetTokenSpecial(nStartPosHeaderLine,m_cFieldDelimiter,m_cStringDelimiter);
                     if ( !aColumnName.Len() )
                     {
                         aColumnName = 'C';
@@ -192,14 +192,13 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
         if ( bNumeric )
         {
             // first without fielddelimiter
-            String aField;
-            aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine,m_cFieldDelimiter,'\0');
+            String aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine,m_cFieldDelimiter,'\0');
             if (aField.Len() == 0 ||
                 (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0)))
             {
                 bNumeric = sal_False;
                 if ( m_cStringDelimiter != '\0' )
-                    aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                    aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
                 else
                     nStartPosFirstLine2 = nStartPosFirstLine;
             }
@@ -207,7 +206,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
             {
                 String aField2;
                 if ( m_cStringDelimiter != '\0' )
-                    aFirstLine.GetTokenSpecial(aField2,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                    aField2 = aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
                 else
                     aField2 = aField;
 
@@ -284,8 +283,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
         }
         else if ( io_nType == DataType::DATE || io_nType == DataType::TIMESTAMP || io_nType == DataType::TIME)
         {
-            String aField;
-            aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine,m_cFieldDelimiter,'\0');
+            String aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine,m_cFieldDelimiter,'\0');
             if (aField.Len() == 0 ||
                 (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0)))
             {
@@ -294,7 +292,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
             {
                 String aField2;
                 if ( m_cStringDelimiter != '\0' )
-                    aFirstLine.GetTokenSpecial(aField2,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                    aField2 = aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
                 else
                     aField2 = aField;
                 if (aField2.Len() )
@@ -375,21 +373,19 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x
     }
     else
     {
-        String aField;
-        aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine,m_cFieldDelimiter,'\0');
+        String aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine,m_cFieldDelimiter,'\0');
         if (aField.Len() == 0 ||
                 (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0)))
         {
             if ( m_cStringDelimiter != '\0' )
-                aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                aField = aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
             else
                 nStartPosFirstLine2 = nStartPosFirstLine;
         }
         else
         {
-            String aField2;
             if ( m_cStringDelimiter != '\0' )
-                aFirstLine.GetTokenSpecial(aField2,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
+                aFirstLine.GetTokenSpecial(nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter);
         }
     }
 }
@@ -614,14 +610,13 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
     const sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
     // Fields:
     xub_StrLen nStartPos = 0;
-    String aStr;
     OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
     OSQLColumns::Vector::const_iterator aEnd = _rCols.get().end();
     const OValueRefVector::Vector::size_type nCount = _rRow->get().size();
     for (OValueRefVector::Vector::size_type i = 1; aIter != aEnd && i < nCount;
          ++aIter, i++)
     {
-        m_aCurrentLine.GetTokenSpecial(aStr,nStartPos,m_cFieldDelimiter,m_cStringDelimiter);
+        String aStr = m_aCurrentLine.GetTokenSpecial(nStartPos,m_cFieldDelimiter,m_cStringDelimiter);
 
         if (aStr.Len() == 0)
             (_rRow->get())[i]->setNull();
diff --git a/connectivity/source/inc/file/quotedstring.hxx b/connectivity/source/inc/file/quotedstring.hxx
index fe498a0..b7b13d7 100644
--- a/connectivity/source/inc/file/quotedstring.hxx
+++ b/connectivity/source/inc/file/quotedstring.hxx
@@ -37,7 +37,7 @@ namespace connectivity
         QuotedTokenizedString(const String& _sString) : m_sString(_sString){}
 
         xub_StrLen  GetTokenCount( sal_Unicode cTok , sal_Unicode cStrDel ) const;
-        void        GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Unicode cTok = ';', sal_Unicode cStrDel = '\0' ) const;
+        String      GetTokenSpecial(xub_StrLen& nStartPos, sal_Unicode cTok = ';', sal_Unicode cStrDel = '\0') const;
         inline String& GetString() { return m_sString; }
         inline xub_StrLen Len() const { return m_sString.Len(); }
         inline operator String&() { return m_sString; }
commit 7b028f4aaefe626edfa5283363e21146ceca4acf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 15 12:42:04 2012 +0000

    String::AllocBuffer -> OUStringBuffer
    
    Change-Id: I66489516df4b363fd7ed61e90471efaeb1235333

diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 87e2d66..7982417 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -674,23 +674,20 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
                 case DataType::NUMERIC:
                 {
 
-                    String aStrConverted;
+                    OUString aStrConverted;
                     if ( DataType::INTEGER != nType )
                     {
-                        sal_Unicode* pData = aStrConverted.AllocBuffer(aStr.Len());
-                        const sal_Unicode* pStart = pData;
-
                         OSL_ENSURE((cDecimalDelimiter && nType != DataType::INTEGER) ||
                                    (!cDecimalDelimiter && nType == DataType::INTEGER),
                                    "FalscherTyp");
 
+                        OUStringBuffer aBuf(aStr.Len());
                         // convert to Standard-Notation (DecimalPOINT without thousands-comma):
                         for (xub_StrLen j = 0; j < aStr.Len(); ++j)
                         {
                             const sal_Unicode cChar = aStr.GetChar(j);
                             if (cDecimalDelimiter && cChar == cDecimalDelimiter)
-                                *pData++ = '.';
-                                //aStrConverted.Append( '.' );
+                                aBuf.append('.');
                             else if ( cChar == '.' ) // special case, if decimal seperator isn't '.' we have to put the string after it
                                 continue;
                             else if (cThousandDelimiter && cChar == cThousandDelimiter)
@@ -698,10 +695,9 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
                                 // leave out
                             }
                             else
-                                *pData++ = cChar;
-                                //aStrConverted.Append(cChar);
+                                aBuf.append(cChar);
                         } // for (xub_StrLen j = 0; j < aStr.Len(); ++j)
-                        aStrConverted.ReleaseBufferAccess(xub_StrLen(pData - pStart));
+                        aStrConverted = aBuf.makeStringAndClear();
                     } // if ( DataType::INTEGER != nType )
                     else
                     {


More information about the Libreoffice-commits mailing list