[Libreoffice-commits] core.git: 3 commits - editeng/source include/editeng sc/source sd/source svx/inc sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk vcl/source

Caolán McNamara caolanm at redhat.com
Wed Aug 14 01:13:44 PDT 2013


 editeng/source/editeng/eehtml.cxx             |    6 
 editeng/source/items/textitem.cxx             |   18 -
 editeng/source/outliner/outlvw.cxx            |    6 
 include/editeng/fontitem.hxx                  |   24 -
 include/editeng/outliner.hxx                  |    4 
 sc/source/core/tool/autoform.cxx              |    4 
 sd/source/ui/annotations/annotationwindow.cxx |    2 
 sd/source/ui/view/drviews7.cxx                |    2 
 sd/source/ui/view/drviewsf.cxx                |    2 
 sd/source/ui/view/outlnvsh.cxx                |    2 
 svx/inc/svdibrow.hxx                          |    4 
 sw/UIConfig_swriter.mk                        |    3 
 sw/inc/helpid.h                               |    8 
 sw/source/core/doc/tblafmt.cxx                |    4 
 sw/source/filter/ww8/ww8par5.cxx              |    2 
 sw/source/ui/envelp/envelp.src                |    4 
 sw/source/ui/envelp/envprt.cxx                |  133 +++++-----
 sw/source/ui/envelp/envprt.hrc                |   21 -
 sw/source/ui/envelp/envprt.hxx                |   23 -
 sw/source/ui/envelp/envprt.src                |  143 -----------
 sw/uiconfig/swriter/ui/envprinterpage.ui      |  321 ++++++++++++++++++++++++++
 vcl/source/window/builder.cxx                 |   20 +
 vcl/source/window/toolbox.cxx                 |   14 -
 23 files changed, 467 insertions(+), 303 deletions(-)

New commits:
commit 965a83346d1aaefe1124ddf713adb1dd7d9ad1b1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 14 09:12:21 2013 +0100

    don't cycle tab if toolbar is inside a container
    
    Change-Id: I275013be9e3587a73bd9bd6b20a2d42f850a83ef

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 8a83ece..76d4c71 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -33,6 +33,7 @@
 #include <vcl/bitmap.hxx>
 #include <vcl/mnemonic.hxx>
 #include <vcl/gradient.hxx>
+#include <vcl/layout.hxx>
 #include <vcl/menu.hxx>
 
 #include <svdata.hxx>
@@ -4360,11 +4361,14 @@ long ToolBox::Notify( NotifyEvent& rNEvt )
         switch( nKeyCode )
         {
             case KEY_TAB:
-                {
-                // internal TAB cycling only if parent is not a dialog or if we are the ony child
+            {
+                // internal TAB cycling only if parent is not a dialog or if we are the only child
                 // otherwise the dialog control will take over
-                sal_Bool bNoTabCycling = ( ( ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL &&
-                    ImplGetParent()->GetChildCount() != 1 );
+                Window *pParent = ImplGetParent();
+                bool bOldSchoolContainer =
+                    ((pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL &&
+                    pParent->GetChildCount() != 1);
+                bool bNoTabCycling = bOldSchoolContainer || isContainerWindow(pParent);
 
                 if( bNoTabCycling &&  ! (GetStyle() & WB_FORCETABCYCLE) )
                     return DockingWindow::Notify( rNEvt );
@@ -4372,7 +4376,7 @@ long ToolBox::Notify( NotifyEvent& rNEvt )
                     return sal_False;
                 else
                     return DockingWindow::Notify( rNEvt );
-                }
+            }
             default:
                 break;
         };
commit 6fc33b576eddc1ee2a4362243f7f891a13597613
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 13 20:42:44 2013 +0100

    convert envelope printer page to .ui
    
    Change-Id: I0d57f816abd05d8bb190fe47804b5a8db07ca6b5

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 96447e4..020df2d 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -82,9 +82,10 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/datasourcesunavailabledialog \
 	sw/uiconfig/swriter/ui/dropcapspage \
 	sw/uiconfig/swriter/ui/dropdownfielddialog \
-	sw/uiconfig/swriter/ui/endnotepage \
 	sw/uiconfig/swriter/ui/editcategories \
 	sw/uiconfig/swriter/ui/editsectiondialog \
+	sw/uiconfig/swriter/ui/endnotepage \
+	sw/uiconfig/swriter/ui/envprinterpage \
 	sw/uiconfig/swriter/ui/exchangedatabases \
 	sw/uiconfig/swriter/ui/formatsectiondialog \
 	sw/uiconfig/swriter/ui/formattablepage \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 918bba2..ddad116 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -144,7 +144,6 @@
 
 #define HID_FRM_STD                                             "SW_HID_FRM_STD"
 #define HID_GRF_EXT                                             "SW_HID_GRF_EXT"
-#define HID_ENV_PRT                                             "SW_HID_ENV_PRT"
 #define HID_ENV_ENV                                             "SW_HID_ENV_ENV"
 #define HID_ENV_FMT                                             "SW_HID_ENV_FMT"
 #define HID_COND_COLL                                           "SW_HID_COND_COLL"
@@ -509,13 +508,6 @@
 #define HID_MM_HEADER_12                                        "SW_HID_MM_HEADER_12"
 #define HID_MM_HEADER_13                                        "SW_HID_MM_HEADER_13"
 
-#define HID_ITM_HOR_LEFT                                        "SW_HID_ITM_HOR_LEFT"
-#define HID_ITM_HOR_CNTR                                        "SW_HID_ITM_HOR_CNTR"
-#define HID_ITM_HOR_RGHT                                        "SW_HID_ITM_HOR_RGHT"
-#define HID_ITM_VER_LEFT                                        "SW_HID_ITM_VER_LEFT"
-#define HID_ITM_VER_CNTR                                        "SW_HID_ITM_VER_CNTR"
-#define HID_ITM_VER_RGHT                                        "SW_HID_ITM_VER_RGHT"
-
 #define HID_TBX_FORMULA_CALC                                    "SW_HID_TBX_FORMULA_CALC"
 #define HID_TBX_FORMULA_CANCEL                                  "SW_HID_TBX_FORMULA_CANCEL"
 #define HID_TBX_FORMULA_APPLY                                   "SW_HID_TBX_FORMULA_APPLY"
diff --git a/sw/source/ui/envelp/envelp.src b/sw/source/ui/envelp/envelp.src
index 9ad5ed2..86fa51f 100644
--- a/sw/source/ui/envelp/envelp.src
+++ b/sw/source/ui/envelp/envelp.src
@@ -19,7 +19,9 @@
 
 #include "envelp.hrc"
 #include "globals.hrc"
- // Strings ******************************************************************
+
+// Strings ******************************************************************
+
 String STR_DATABASE_NOT_OPENED
 {
     Text [ en-US ] = "Database could not be opened." ;
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 1562fa9..7fc870d 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -28,78 +28,71 @@
 
 #include "envprt.hrc"
 
-SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) :
-
-    SfxTabPage(pParent, SW_RES(TP_ENV_PRT), rSet),
-
-    aAlignBox    (this, SW_RES(BOX_ALIGN  )),
-    aTopButton   (this, SW_RES(BTN_TOP    )),
-    aBottomButton(this, SW_RES(BTN_BOTTOM )),
-    aRightText   (this, SW_RES(TXT_RIGHT  )),
-    aRightField  (this, SW_RES(FLD_RIGHT  )),
-    aDownText    (this, SW_RES(TXT_DOWN   )),
-    aDownField   (this, SW_RES(FLD_DOWN   )),
-    aPrinterInfo (this, SW_RES(TXT_PRINTER)),
-    aNoNameFL    (this, SW_RES(FL_NONAME )),
-    aPrinterFL   (this, SW_RES(FL_PRINTER )),
-    aPrtSetup    (this, SW_RES(BTN_PRTSETUP))
-
+SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet)
+    : SfxTabPage(pParent, "EnvPrinterPage",
+        "modules/swriter/ui/envprinterpage.ui", rSet)
 {
-    FreeResource();
+    get(m_pAlignBox, "alignbox");
+    get(m_pTopButton, "top");
+    get(m_pBottomButton, "bottom");
+    get(m_pRightField, "right");
+    get(m_pDownField, "down");
+    get(m_pPrinterInfo, "printername");
+    get(m_pPrtSetup, "setup");
     SetExchangeSupport();
 
     // Metrics
     FieldUnit eUnit = ::GetDfltMetric(sal_False);
-    SetMetric(aRightField, eUnit);
-    SetMetric(aDownField , eUnit);
+    SetMetric(*m_pRightField, eUnit);
+    SetMetric(*m_pDownField, eUnit);
 
     // Install handlers
-    aTopButton   .SetClickHdl(LINK(this, SwEnvPrtPage, ClickHdl));
-    aBottomButton.SetClickHdl(LINK(this, SwEnvPrtPage, ClickHdl));
+    m_pTopButton->SetClickHdl(LINK(this, SwEnvPrtPage, ClickHdl));
+    m_pBottomButton->SetClickHdl(LINK(this, SwEnvPrtPage, ClickHdl));
 
-    aPrtSetup    .SetClickHdl(LINK(this, SwEnvPrtPage, ButtonHdl));
+    m_pPrtSetup->SetClickHdl(LINK(this, SwEnvPrtPage, ButtonHdl));
 
     // Bitmaps
-    aBottomButton.GetClickHdl().Call(&aBottomButton);
+    m_pBottomButton->GetClickHdl().Call(m_pBottomButton);
 
     // ToolBox
-    Size aSz = aAlignBox.CalcWindowSizePixel();
-    aAlignBox.SetSizePixel(aSz);
-    aAlignBox.SetClickHdl(LINK(this, SwEnvPrtPage, AlignHdl));
-}
-
-SwEnvPrtPage::~SwEnvPrtPage()
-{
+    m_pAlignBox->SetClickHdl(LINK(this, SwEnvPrtPage, AlignHdl));
+    m_aIds[ENV_HOR_LEFT] = m_pAlignBox->GetItemId("horileft");
+    m_aIds[ENV_HOR_CNTR] = m_pAlignBox->GetItemId("horicenter");
+    m_aIds[ENV_HOR_RGHT] = m_pAlignBox->GetItemId("horiright");
+    m_aIds[ENV_VER_LEFT] = m_pAlignBox->GetItemId("vertleft");
+    m_aIds[ENV_VER_CNTR] = m_pAlignBox->GetItemId("vertcenter");
+    m_aIds[ENV_VER_RGHT] = m_pAlignBox->GetItemId("vertright");
 }
 
 IMPL_LINK_NOARG(SwEnvPrtPage, ClickHdl)
 {
-    if (aBottomButton.IsChecked())
+    if (m_pBottomButton->IsChecked())
     {
         // Envelope from botton
-        aAlignBox.SetItemImage(ITM_HOR_LEFT, Bitmap(SW_RES(BMP_HOR_LEFT_LOWER)));
-        aAlignBox.SetItemImage(ITM_HOR_CNTR, Bitmap(SW_RES(BMP_HOR_CNTR_LOWER)));
-        aAlignBox.SetItemImage(ITM_HOR_RGHT, Bitmap(SW_RES(BMP_HOR_RGHT_LOWER)));
-        aAlignBox.SetItemImage(ITM_VER_LEFT, Bitmap(SW_RES(BMP_VER_LEFT_LOWER)));
-        aAlignBox.SetItemImage(ITM_VER_CNTR, Bitmap(SW_RES(BMP_VER_CNTR_LOWER)));
-        aAlignBox.SetItemImage(ITM_VER_RGHT, Bitmap(SW_RES(BMP_VER_RGHT_LOWER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_LEFT], Bitmap(SW_RES(BMP_HOR_LEFT_LOWER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_CNTR], Bitmap(SW_RES(BMP_HOR_CNTR_LOWER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_RGHT], Bitmap(SW_RES(BMP_HOR_RGHT_LOWER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_VER_LEFT], Bitmap(SW_RES(BMP_VER_LEFT_LOWER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_VER_CNTR], Bitmap(SW_RES(BMP_VER_CNTR_LOWER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_VER_RGHT], Bitmap(SW_RES(BMP_VER_RGHT_LOWER)));
     }
     else
     {
         // Envelope from top
-        aAlignBox.SetItemImage(ITM_HOR_LEFT, Bitmap(SW_RES(BMP_HOR_LEFT_UPPER)));
-        aAlignBox.SetItemImage(ITM_HOR_CNTR, Bitmap(SW_RES(BMP_HOR_CNTR_UPPER)));
-        aAlignBox.SetItemImage(ITM_HOR_RGHT, Bitmap(SW_RES(BMP_HOR_RGHT_UPPER)));
-        aAlignBox.SetItemImage(ITM_VER_LEFT, Bitmap(SW_RES(BMP_VER_LEFT_UPPER)));
-        aAlignBox.SetItemImage(ITM_VER_CNTR, Bitmap(SW_RES(BMP_VER_CNTR_UPPER)));
-        aAlignBox.SetItemImage(ITM_VER_RGHT, Bitmap(SW_RES(BMP_VER_RGHT_UPPER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_LEFT], Bitmap(SW_RES(BMP_HOR_LEFT_UPPER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_CNTR], Bitmap(SW_RES(BMP_HOR_CNTR_UPPER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_RGHT], Bitmap(SW_RES(BMP_HOR_RGHT_UPPER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_VER_LEFT], Bitmap(SW_RES(BMP_VER_LEFT_UPPER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_VER_CNTR], Bitmap(SW_RES(BMP_VER_CNTR_UPPER)));
+        m_pAlignBox->SetItemImage(m_aIds[ENV_VER_RGHT], Bitmap(SW_RES(BMP_VER_RGHT_UPPER)));
     }
     return 0;
 }
 
 IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn )
 {
-    if (pBtn == &aPrtSetup)
+    if (pBtn == m_pPrtSetup)
     {
         // Call printer setup
         if (pPrt)
@@ -109,7 +102,7 @@ IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn )
             pDlg->Execute();
             delete pDlg;
             GrabFocus();
-            aPrinterInfo.SetText(pPrt->GetName());
+            m_pPrinterInfo->SetText(pPrt->GetName());
         }
     }
     return 0;
@@ -117,17 +110,17 @@ IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn )
 
 IMPL_LINK_NOARG(SwEnvPrtPage, AlignHdl)
 {
-    if (aAlignBox.GetCurItemId())
+    if (m_pAlignBox->GetCurItemId())
     {
-        for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT; i++)
-            aAlignBox.CheckItem(i, sal_False);
-        aAlignBox.CheckItem(aAlignBox.GetCurItemId(), sal_True);
+        for (sal_uInt16 i = ENV_HOR_LEFT; i <= ENV_VER_RGHT; ++i)
+            m_pAlignBox->CheckItem(m_aIds[i], false);
+        m_pAlignBox->CheckItem(m_pAlignBox->GetCurItemId(), true);
     }
     else
     {
         // GetCurItemId() == 0 is possible!
         const SwEnvItem& rItem = (const SwEnvItem&) GetItemSet().Get(FN_ENVELOP);
-        aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT, sal_True);
+        m_pAlignBox->CheckItem(m_aIds[rItem.eAlign], true);
     }
     return 0;
 }
@@ -140,7 +133,7 @@ SfxTabPage* SwEnvPrtPage::Create(Window* pParent, const SfxItemSet& rSet)
 void SwEnvPrtPage::ActivatePage(const SfxItemSet&)
 {
     if (pPrt)
-        aPrinterInfo.SetText(pPrt->GetName());
+        m_pPrinterInfo->SetText(pPrt->GetName());
 }
 
 int SwEnvPrtPage::DeactivatePage(SfxItemSet* _pSet)
@@ -152,15 +145,20 @@ int SwEnvPrtPage::DeactivatePage(SfxItemSet* _pSet)
 
 void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
 {
-    sal_uInt16 nID = 0;
-    for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT && !nID; i++)
-        if (aAlignBox.IsItemChecked(i))
-            nID = i;
-
-    rItem.eAlign          = (SwEnvAlign) (nID - ITM_HOR_LEFT);
-    rItem.bPrintFromAbove = aTopButton.IsChecked();
-    rItem.lShiftRight     = static_cast< sal_Int32 >(GetFldVal(aRightField));
-    rItem.lShiftDown      = static_cast< sal_Int32 >(GetFldVal(aDownField ));
+    sal_uInt16 nOrient = 0;
+    for (sal_uInt16 i = ENV_HOR_LEFT; i <= ENV_VER_RGHT; ++i)
+    {
+        if (m_pAlignBox->IsItemChecked(m_aIds[i]))
+        {
+            nOrient = i;
+            break;
+        }
+    }
+
+    rItem.eAlign          = (SwEnvAlign) (nOrient);
+    rItem.bPrintFromAbove = m_pTopButton->IsChecked();
+    rItem.lShiftRight     = static_cast< sal_Int32 >(GetFldVal(*m_pRightField));
+    rItem.lShiftDown      = static_cast< sal_Int32 >(GetFldVal(*m_pDownField ));
 }
 
 sal_Bool SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
@@ -174,21 +172,18 @@ void SwEnvPrtPage::Reset(const SfxItemSet& rSet)
 {
     // Read item
     const SwEnvItem& rItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP);
-    aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT);
+    m_pAlignBox->CheckItem(m_aIds[rItem.eAlign]);
 
     if (rItem.bPrintFromAbove)
-        aTopButton   .Check();
+        m_pTopButton->Check();
     else
-        aBottomButton.Check();
+        m_pBottomButton->Check();
 
-    SetFldVal(aRightField, rItem.lShiftRight);
-    SetFldVal(aDownField , rItem.lShiftDown );
+    SetFldVal(*m_pRightField, rItem.lShiftRight);
+    SetFldVal(*m_pDownField , rItem.lShiftDown );
 
     ActivatePage(rSet);
-    ClickHdl(&aTopButton);
+    ClickHdl(m_pTopButton);
 }
 
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/envprt.hrc b/sw/source/ui/envelp/envprt.hrc
index ec33c35..cd852b9 100644
--- a/sw/source/ui/envelp/envprt.hrc
+++ b/sw/source/ui/envelp/envprt.hrc
@@ -22,20 +22,6 @@
 
 #include "envelp.hrc"
 
-// local resources *********************************************************
-
-#define BOX_ALIGN      1
-#define BTN_TOP        7
-#define BTN_BOTTOM     8
-#define TXT_RIGHT      9
-#define FLD_RIGHT     10
-#define TXT_DOWN      11
-#define FLD_DOWN      12
-#define TXT_PRINTER   13
-#define FL_NONAME    14
-#define BTN_PRTSETUP  15
-#define FL_PRINTER    16
-
 // global resources ********************************************************
 
 #define BMP_HOR_LEFT_LOWER  (RC_ENVPRT_BEGIN     )
@@ -52,13 +38,6 @@
 #define BMP_VER_RGHT_LOWER  (RC_ENVPRT_BEGIN + 10)
 #define BMP_VER_RGHT_UPPER  (RC_ENVPRT_BEGIN + 11)
 
-#define ITM_HOR_LEFT        (RC_ENVPRT_BEGIN + 12)
-#define ITM_HOR_CNTR        (RC_ENVPRT_BEGIN + 13)
-#define ITM_HOR_RGHT        (RC_ENVPRT_BEGIN + 14)
-#define ITM_VER_LEFT        (RC_ENVPRT_BEGIN + 15)
-#define ITM_VER_CNTR        (RC_ENVPRT_BEGIN + 16)
-#define ITM_VER_RGHT        (RC_ENVPRT_BEGIN + 17)
-
 // overflow check ********************************************************
 
 #define ENVPRT_ACT_END  ITM_VER_RGHT
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index d0b2273..70dc8df 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -39,22 +39,19 @@ class SwEnvDlg;
 
 class SwEnvPrtPage : public SfxTabPage
 {
-    ToolBox      aAlignBox;
-    RadioButton  aTopButton;
-    RadioButton  aBottomButton;
-    FixedText    aRightText;
-    MetricField  aRightField;
-    FixedText    aDownText;
-    MetricField  aDownField;
-    FixedInfo    aPrinterInfo;
-    FixedLine    aNoNameFL;
-    FixedLine    aPrinterFL;
-    PushButton   aPrtSetup;
+    ToolBox*     m_pAlignBox;
+    RadioButton* m_pTopButton;
+    RadioButton* m_pBottomButton;
+    MetricField* m_pRightField;
+    MetricField* m_pDownField;
+    FixedText*   m_pPrinterInfo;
+    PushButton*  m_pPrtSetup;
+
+    sal_uInt16 m_aIds[6];
 
     Printer* pPrt;
 
-     SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet);
-    ~SwEnvPrtPage();
+    SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet);
 
     DECL_LINK(ClickHdl, void *);
     DECL_LINK(AlignHdl, void *);
diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src
index 656ee63..b7f9ac3 100644
--- a/sw/source/ui/envelp/envprt.src
+++ b/sw/source/ui/envelp/envprt.src
@@ -19,146 +19,9 @@
 
 #include "envprt.hrc"
 #include "helpid.h"
- // TP_ENV_PRT ---------------------------------------------------------------
-TabPage TP_ENV_PRT
-{
-    HelpID = HID_ENV_PRT ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    Hide = TRUE ;
-    FixedLine FL_NONAME
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Envelope orientation";
-    };
-    ToolBox BOX_ALIGN
-    {
-        Pos = MAP_APPFONT ( 12 , 14 ) ;
-        ItemList =
-        {
-            ToolBoxItem
-            {
-                Identifier = ITM_HOR_LEFT ;
-                HelpID = HID_ITM_HOR_LEFT ;
-            };
-            ToolBoxItem
-            {
-                Identifier = ITM_HOR_CNTR ;
-                HelpID = HID_ITM_HOR_CNTR ;
-            };
-            ToolBoxItem
-            {
-                Identifier = ITM_HOR_RGHT ;
-                HelpID = HID_ITM_HOR_RGHT ;
-            };
-            ToolBoxItem
-            {
-                Identifier = ITM_VER_LEFT ;
-                HelpID = HID_ITM_VER_LEFT ;
-            };
-            ToolBoxItem
-            {
-                Identifier = ITM_VER_CNTR ;
-                HelpID = HID_ITM_VER_CNTR ;
-            };
-            ToolBoxItem
-            {
-                Identifier = ITM_VER_RGHT ;
-                HelpID = HID_ITM_VER_RGHT ;
-            };
-        };
-    };
-    RadioButton BTN_TOP
-    {
-        HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_TOP";
-        Pos = MAP_APPFONT ( 18 , 42 ) ;
-        Size = MAP_APPFONT ( 179 , 10 ) ;
-        Text [ en-US ] = "~Print from top" ;
-        TabStop = TRUE ;
-        Group = TRUE ;
-        Check = TRUE ;
-    };
-    RadioButton BTN_BOTTOM
-    {
-        HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_BOTTOM";
-        Pos = MAP_APPFONT ( 18 , 56 ) ;
-        Size = MAP_APPFONT ( 179 , 10 ) ;
-        Text [ en-US ] = "Print from ~bottom" ;
-        TabStop = TRUE ;
-    };
-    FixedText TXT_RIGHT
-    {
-        Pos = MAP_APPFONT ( 12 , 74 ) ;
-        Size = MAP_APPFONT ( 72 , 8 ) ;
-        Text [ en-US ] = "~Shift right" ;
-        Left = TRUE ;
-    };
-    MetricField FLD_RIGHT
-    {
-        HelpID = "sw:MetricField:TP_ENV_PRT:FLD_RIGHT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 86 , 72 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 0 ;
-        Maximum = 10000 ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        First = 0 ;
-        Last = 10000 ;
-        SpinSize = 10 ;
-    };
-    FixedText TXT_DOWN
-    {
-        Pos = MAP_APPFONT ( 12 , 90 ) ;
-        Size = MAP_APPFONT ( 72 , 8 ) ;
-        Text [ en-US ] = "Shift ~down" ;
-        Left = TRUE ;
-    };
-    MetricField FLD_DOWN
-    {
-        HelpID = "sw:MetricField:TP_ENV_PRT:FLD_DOWN";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 86 , 88 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 0 ;
-        Maximum = 10000 ;
-        DecimalDigits = 2 ;
-        Unit = FUNIT_CM ;
-        First = 0 ;
-        Last = 10000 ;
-        SpinSize = 10 ;
-    };
-    FixedLine FL_PRINTER
-    {
-        Pos = MAP_APPFONT ( 3 , 103 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Current printer";
-    };
-    FixedText TXT_PRINTER
-    {
-        Pos = MAP_APPFONT ( 12 , 116 ) ;
-        Size = MAP_APPFONT ( 179 , 8 ) ;
-        Text [ en-US ] = "- No printer installed -" ;
-        Left = TRUE ;
-    };
-    PushButton BTN_PRTSETUP
-    {
-        HelpID = "sw:PushButton:TP_ENV_PRT:BTN_PRTSETUP";
-        Pos = MAP_APPFONT ( 198 , 114 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Setup..." ;
-    };
-};
- // Bitmaps ******************************************************************
+
+// Bitmaps ******************************************************************
+
 Bitmap BMP_HOR_LEFT_LOWER
 {
     File = "envhl_l.bmp" ;
diff --git a/sw/uiconfig/swriter/ui/envprinterpage.ui b/sw/uiconfig/swriter/ui/envprinterpage.ui
new file mode 100644
index 0000000..db7440e
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/envprinterpage.ui
@@ -0,0 +1,321 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkBox" id="EnvPrinterPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">12</property>
+    <child>
+      <object class="GtkFrame" id="frame1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkGrid" id="grid2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
+                <child>
+                  <object class="GtkRadioButton" id="top">
+                    <property name="label" translatable="yes">_Print from top</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="active">True</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">bottom</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">2</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkRadioButton" id="bottom">
+                    <property name="label" translatable="yes">Print from _bottom</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">top</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">2</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Shift right</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="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Shift _down</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="right:0.00cm">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="digits">2</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="down:0.00cm1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="adjustment">adjustment1</property>
+                    <property name="digits">2</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolbar" id="alignbox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkToolButton" id="horileft">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="tooltip_text" translatable="yes">Horizontal Left</property>
+                        <property name="action_name">horileft</property>
+                        <property name="label" translatable="yes">Horizontal Left</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkToolButton" id="horicenter">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="tooltip_text" translatable="yes">Horizontal Center</property>
+                        <property name="action_name">horicenter</property>
+                        <property name="label" translatable="yes">Horizontal Center</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkToolButton" id="horiright">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="tooltip_text" translatable="yes">Horizontal Right</property>
+                        <property name="action_name">horiright</property>
+                        <property name="label" translatable="yes">Horizontal Right</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkToolButton" id="vertleft">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="tooltip_text" translatable="yes">Vertical Left</property>
+                        <property name="action_name">vertleft</property>
+                        <property name="label" translatable="yes">Vertical Left</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkToolButton" id="vertcenter">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="tooltip_text" translatable="yes">Vertical Center</property>
+                        <property name="action_name">vertcenter</property>
+                        <property name="label" translatable="yes">Vertical Center</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkToolButton" id="vertright">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="tooltip_text" translatable="yes">Vertical Right</property>
+                        <property name="action_name">vertright</property>
+                        <property name="label" translatable="yes">Vertical Right</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">2</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label">Envelope orientation</property>
+            <attributes>
+              <attribute name="weight" value="semibold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="printerframe">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkGrid" id="grid1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="column_spacing">12</property>
+                <child>
+                  <object class="GtkButton" id="setup">
+                    <property name="label" translatable="yes">Setup...</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="printername">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Printer Name</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">setup</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label">Current Printer</property>
+            <attributes>
+              <attribute name="weight" value="semibold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 7295c31..9d31230 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1430,18 +1430,28 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
         {
             OUString aCommand(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8));
 
+            sal_uInt16 nItemId = 0;
             ToolBoxItemBits nBits = 0;
             if (name == "GtkMenuToolButton")
                 nBits |= TIB_DROPDOWN;
 
-            if (!aCommand.isEmpty())
+            if (!aCommand.isEmpty() && m_xFrame.is())
             {
                 pToolBox->InsertItem(aCommand, m_xFrame, nBits, extractSizeRequest(rMap));
-
-                OUString aTooltip(OStringToOUString(extractTooltipText(rMap), RTL_TEXTENCODING_UTF8));
-                if (!aTooltip.isEmpty())
-                    pToolBox->SetQuickHelpText(pToolBox->GetItemId(aCommand), aTooltip);
+                nItemId = pToolBox->GetItemId(aCommand);
             }
+            else
+            {
+                const sal_uInt16 COMMAND_ITEMID_START = 30000;
+                nItemId = COMMAND_ITEMID_START + pToolBox->GetItemCount();
+                pToolBox->InsertItem(nItemId,
+                    OStringToOUString(extractLabel(rMap), RTL_TEXTENCODING_UTF8), nBits);
+                pToolBox->SetItemCommand(nItemId, aCommand);
+            }
+
+            OUString sTooltip(OStringToOUString(extractTooltipText(rMap), RTL_TEXTENCODING_UTF8));
+            if (!sTooltip.isEmpty())
+                pToolBox->SetQuickHelpText(nItemId, sTooltip);
 
             return NULL; // no widget to be created
         }
commit 403a75a275d9be8b3cc192b0653b4af3533f1ecc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 13 20:41:52 2013 +0100

    XubString->OUString
    
    Change-Id: I178f9eb702afb6143c583d5fd54003a427d895fa

diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 31b0e43..b7bf858 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -654,13 +654,13 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
     if ( nHLevel == STYLE_PRE )
     {
         Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 );
-        SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO );
+        SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO );
         aItems.Put( aFontItem );
 
-        SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
+        SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
         aItems.Put( aFontItemCJK );
 
-        SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
+        SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
         aItems.Put( aFontItemCTL );
     }
 
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 2918b22..dc93320 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -222,8 +222,8 @@ SvxFontItem::SvxFontItem( const sal_uInt16 nId ) :
 
 // -----------------------------------------------------------------------
 
-SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName,
-                  const XubString& aStName, const FontPitch eFontPitch,
+SvxFontItem::SvxFontItem( const FontFamily eFam, const OUString& aName,
+                  const OUString& aStName, const FontPitch eFontPitch,
                   const rtl_TextEncoding eFontTextEncoding, const sal_uInt16 nId ) :
 
     SfxPoolItem( nId ),
@@ -256,19 +256,19 @@ bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
         case 0:
         {
             com::sun::star::awt::FontDescriptor aFontDescriptor;
-            aFontDescriptor.Name = aFamilyName.GetBuffer();
-            aFontDescriptor.StyleName = aStyleName.GetBuffer();
+            aFontDescriptor.Name = aFamilyName;
+            aFontDescriptor.StyleName = aStyleName;
             aFontDescriptor.Family = (sal_Int16)(eFamily);
             aFontDescriptor.CharSet = (sal_Int16)(eTextEncoding);
             aFontDescriptor.Pitch = (sal_Int16)(ePitch);
             rVal <<= aFontDescriptor;
         }
         break;
-        case MID_FONT_FAMILY_NAME   :
-            rVal <<= OUString(aFamilyName.GetBuffer());
+        case MID_FONT_FAMILY_NAME:
+            rVal <<= aFamilyName;
         break;
         case MID_FONT_STYLE_NAME:
-            rVal <<= OUString(aStyleName.GetBuffer());
+            rVal <<= aStyleName;
         break;
         case MID_FONT_FAMILY    : rVal <<= (sal_Int16)(eFamily);    break;
         case MID_FONT_CHAR_SET  : rVal <<= (sal_Int16)(eTextEncoding);  break;
@@ -300,7 +300,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId)
             OUString aStr;
             if(!(rVal >>= aStr))
                 return sal_False;
-            aFamilyName = aStr.getStr();
+            aFamilyName = aStr;
         }
         break;
         case MID_FONT_STYLE_NAME:
@@ -308,7 +308,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId)
             OUString aStr;
             if(!(rVal >>= aStr))
                 return sal_False;
-            aStyleName = aStr.getStr();
+            aStyleName = aStr;
         }
         break;
         case MID_FONT_FAMILY :
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index a9701fe..5534781 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1248,11 +1248,11 @@ void OutlinerView::RemoveAttribs( sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich
 // ======================================================================
 
 
-void OutlinerView::InsertText( const XubString& rNew, sal_Bool bSelect )
+void OutlinerView::InsertText( const OUString& rNew, sal_Bool bSelect )
 {
     DBG_CHKTHIS(OutlinerView,0);
     if( pOwner->bFirstParaIsEmpty )
-        pOwner->Insert( String() );
+        pOwner->Insert( OUString() );
     pEditView->InsertText( rNew, bSelect );
 }
 
@@ -1330,7 +1330,7 @@ Rectangle OutlinerView::GetOutputArea() const
 }
 
 
-XubString OutlinerView::GetSelected() const
+OUString OutlinerView::GetSelected() const
 {
     DBG_CHKTHIS(OutlinerView,0);
     return pEditView->GetSelected();
diff --git a/include/editeng/fontitem.hxx b/include/editeng/fontitem.hxx
index e9d1475..e083e86 100644
--- a/include/editeng/fontitem.hxx
+++ b/include/editeng/fontitem.hxx
@@ -35,9 +35,9 @@ class SvXMLUnitConverter;
 
 class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem
 {
-    String  aFamilyName;
-    String  aStyleName;
-    FontFamily  eFamily;
+    OUString aFamilyName;
+    OUString aStyleName;
+    FontFamily eFamily;
     FontPitch ePitch;
     rtl_TextEncoding eTextEncoding;
 
@@ -47,8 +47,8 @@ public:
     TYPEINFO();
 
     explicit SvxFontItem( const sal_uInt16 nId  );
-    SvxFontItem( const FontFamily eFam, const String& rFamilyName,
-        const String& rStyleName,
+    SvxFontItem( const FontFamily eFam, const OUString& rFamilyName,
+        const OUString& rStyleName,
         const FontPitch eFontPitch /*= PITCH_DONTKNOW*/,
         const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/,
         const sal_uInt16 nId  );
@@ -67,21 +67,21 @@ public:
                                     OUString &rText, const IntlWrapper * = 0 ) const;
 
     // Access methods:
-    void SetFamilyName( const String& rFamilyName ) { aFamilyName = rFamilyName; }
-    inline const String &GetFamilyName() const { return aFamilyName; }
+    void SetFamilyName( const OUString& rFamilyName ) { aFamilyName = rFamilyName; }
+    const OUString &GetFamilyName() const { return aFamilyName; }
 
-    void SetStyleName(const String &rStyleName ) { aStyleName = rStyleName; }
-    inline const String &GetStyleName() const { return aStyleName; }
+    void SetStyleName(const OUString &rStyleName ) { aStyleName = rStyleName; }
+    const OUString &GetStyleName() const { return aStyleName; }
 
     void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; }
-    inline FontFamily GetFamily() const { return eFamily; }
+    FontFamily GetFamily() const { return eFamily; }
 
     void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; }
-    inline FontPitch GetPitch() const { return ePitch; }
+    FontPitch GetPitch() const { return ePitch; }
 
     void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; }
 
-    inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
+    rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
 
     SvxFontItem& operator=(const SvxFontItem& rFont);
 
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 0f1a540..7336870 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -266,7 +266,7 @@ public:
                     sal_Bool bSelect=sal_True,
                     sal_Bool bWChildren=sal_True);
 
-    String      GetSelected() const;
+    OUString    GetSelected() const;
     void        SelectRange( sal_Int32 nFirst, sal_Int32 nCount );
     void        SetAttribs( const SfxItemSet& );
     void        Indent( short nDiff );
@@ -276,7 +276,7 @@ public:
 
     sal_uLong       Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
 
-    void        InsertText( const String& rNew, sal_Bool bSelect = sal_False );
+    void        InsertText( const OUString& rNew, sal_Bool bSelect = sal_False );
     void        InsertText( const OutlinerParaObject& rParaObj );
     void        Expand();
     void        Collapse();
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 18b5061..234ec8e 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -657,7 +657,7 @@ void ScAutoFormatData::FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, S
         rItemSet.Put( rField.GetPosture() );
         // do not insert empty CJK font
         const SvxFontItem& rCJKFont = rField.GetCJKFont();
-        if( rCJKFont.GetStyleName().Len() )
+        if (!rCJKFont.GetStyleName().isEmpty())
         {
             rItemSet.Put( rCJKFont );
             rItemSet.Put( rField.GetCJKHeight() );
@@ -672,7 +672,7 @@ void ScAutoFormatData::FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, S
         }
         // do not insert empty CTL font
         const SvxFontItem& rCTLFont = rField.GetCTLFont();
-        if( rCTLFont.GetStyleName().Len() )
+        if (rCTLFont.GetStyleName().isEmpty())
         {
             rItemSet.Put( rCTLFont );
             rItemSet.Put( rField.GetCTLHeight() );
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 8768531..ff0ac65 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -253,7 +253,7 @@ Selection AnnotationTextWindow::GetSurroundingTextSelection() const
     if( mpOutlinerView )
     {
         if( mpOutlinerView->HasSelection() )
-            return Selection( 0, mpOutlinerView->GetSelected().Len() );
+            return Selection( 0, mpOutlinerView->GetSelected().getLength() );
         else
         {
             ESelection aSelection = mpOutlinerView->GetEditView().GetSelection();
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index fee4ded..f91881d 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -943,7 +943,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
 
         if (pOlView)
         {
-            if ( pOlView->GetSelected().Len() == 0 )
+            if (pOlView->GetSelected().isEmpty())
             {
                 rSet.DisableItem( SID_CUT );
                 rSet.DisableItem( SID_COPY );
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 5bb62d2..f18f175 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -779,7 +779,7 @@ sal_Bool DrawViewShell::HasSelection(sal_Bool bText) const
     {
         OutlinerView* pOlView = mpDrawView->GetTextEditOutlinerView();
 
-        if (pOlView && pOlView->GetSelected().Len() != 0)
+        if (pOlView && !pOlView->GetSelected().isEmpty())
         {
             bReturn = sal_True;
         }
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index cf375fa..1c5a50d 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1504,7 +1504,7 @@ sal_Bool OutlineViewShell::HasSelection(sal_Bool bText) const
     {
         OutlinerView* pOutlinerView = pOlView->GetViewByWindow( GetActiveWindow() );
 
-        if (pOutlinerView && pOutlinerView->GetSelected().Len() != 0)
+        if (pOutlinerView && !pOutlinerView->GetSelected().isEmpty())
         {
             bReturn = sal_True;
         }
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index 04cfbfa..cffdabb 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -34,7 +34,7 @@ friend class ImpItemEdit;
     std::vector<ImpItemListRow*> aList;
     long nAktPaintRow;
     Edit* pEditControl;
-    XubString aWNamMerk;
+    OUString aWNamMerk;
     Link aEntryChangedHdl;
     Link aSetDirtyHdl;
     ImpItemListRow* pAktChangeEntry;
@@ -87,7 +87,7 @@ public:
     virtual OUString  GetCellText(long _nRow, sal_uInt16 _nColId) const;
 
     const ImpItemListRow* GetAktChangeEntry() const { return pAktChangeEntry; }
-    XubString GetNewEntryValue() const                 { return pEditControl->GetText(); }
+    OUString GetNewEntryValue() const                 { return pEditControl->GetText(); }
     void SetEntryChangedHdl(const Link& rLink)      { aEntryChangedHdl=rLink; }
     const Link& GetEntryChangedHdl() const          { return aEntryChangedHdl; }
     void SetSetDirtyHdl(const Link& rLink)          { aSetDirtyHdl=rLink; }
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 8343b98..fa5e659 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -767,7 +767,7 @@ void SwTableAutoFmt::UpdateToSet(sal_uInt8 nPos, SfxItemSet& rSet,
             rSet.Put( rChg.GetPosture() );
             // do not insert empty CJK font
             const SvxFontItem& rCJKFont = rChg.GetCJKFont();
-            if( rCJKFont.GetStyleName().Len() )
+            if (!rCJKFont.GetStyleName().isEmpty())
             {
                 rSet.Put( rChg.GetCJKFont() );
                 rSet.Put( rChg.GetCJKHeight() );
@@ -782,7 +782,7 @@ void SwTableAutoFmt::UpdateToSet(sal_uInt8 nPos, SfxItemSet& rSet,
             }
             // do not insert empty CTL font
             const SvxFontItem& rCTLFont = rChg.GetCTLFont();
-            if( rCTLFont.GetStyleName().Len() )
+            if (!rCTLFont.GetStyleName().isEmpty())
             {
                 rSet.Put( rChg.GetCTLFont() );
                 rSet.Put( rChg.GetCTLHeight() );
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index dbae13c..22e1e60 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2771,7 +2771,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
             {
                 const SvxFontItem &rF = ItemGet<SvxFontItem>(*(*aIter),
                     GetWhichOfScript(RES_CHRATR_FONT,nScript));
-                if (rF.GetFamilyName().Equals(sFontName))
+                if (rF.GetFamilyName().equals(sFontName))
                 {
                     pCharFmt=*aIter;
                     break;


More information about the Libreoffice-commits mailing list