[Libreoffice-commits] core.git: 2 commits - basctl/source cui/source formula/source include/formula include/svtools include/svx svtools/source svx/source sw/source

Caolán McNamara caolanm at redhat.com
Mon Aug 12 03:23:09 PDT 2013


 basctl/source/basicide/macrodlg.cxx       |    2 
 cui/source/dialogs/linkdlg.cxx            |    6 +-
 cui/source/options/optfltr.cxx            |    2 
 cui/source/options/optfltr.hxx            |    2 
 formula/source/ui/dlg/structpg.cxx        |    2 
 formula/source/ui/dlg/structpg.hxx        |    4 -
 include/formula/IFunctionDescription.hxx  |    2 
 include/svtools/ivctrl.hxx                |    2 
 include/svtools/svtabbx.hxx               |   30 ++++++------
 include/svtools/treelistbox.hxx           |    8 +--
 include/svx/checklbx.hxx                  |    4 -
 include/svx/ctredlin.hxx                  |    4 -
 svtools/source/contnr/ivctrl.cxx          |    2 
 svtools/source/contnr/simptabl.cxx        |    2 
 svtools/source/contnr/svtabbx.cxx         |   70 ++++++++++++++----------------
 svtools/source/contnr/treelistbox.cxx     |   12 ++---
 svtools/source/control/filectrl2.cxx      |    4 -
 svtools/source/control/stdmenu.cxx        |    4 -
 svtools/source/dialogs/prnsetup.cxx       |    8 +--
 svx/source/dialog/checklbx.cxx            |    4 -
 svx/source/dialog/ctredlin.cxx            |    4 -
 sw/source/ui/dbui/selectdbtabledialog.cxx |    2 
 22 files changed, 88 insertions(+), 92 deletions(-)

New commits:
commit ae035a32737a77be75c9d017f7f5a90a05048e06
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 12 11:00:50 2013 +0100

    Resolves: fdo#67944 set dialogcontrol bit to tab into simpletable
    
    Change-Id: I1ea653d5546961096a9368b4d1d9a1dd39a80745

diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx
index 6da7c47..874df13 100644
--- a/svtools/source/contnr/simptabl.cxx
+++ b/svtools/source/contnr/simptabl.cxx
@@ -43,7 +43,7 @@ SvSimpleTableContainer::SvSimpleTableContainer(Window* pParent, WinBits nBits)
 extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvSimpleTableContainer(Window *pParent,
     VclBuilder::stringmap &)
 {
-    return new SvSimpleTableContainer(pParent, WB_TABSTOP);
+    return new SvSimpleTableContainer(pParent, WB_TABSTOP | WB_DIALOGCONTROL);
 }
 
 void SvSimpleTableContainer::SetTable(SvSimpleTable* pTable)
commit 63483b882c80d656dff4279e5be8a59a664a06fe
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 12 10:57:26 2013 +0100

    XubString->OUString
    
    Change-Id: Ibcb2dd5861ad14e286596999b757ca5c41137626

diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 36dae43..1d6525f 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -580,7 +580,7 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit )
             {
                 SvTreeListEntry* pEntry = m_pMacroBox->GetEntry( n );
                 DBG_ASSERT( pEntry, "Entry ?!" );
-                if ( m_pMacroBox->GetEntryText( pEntry ).CompareIgnoreCaseToAscii( aEdtText ) == COMPARE_EQUAL )
+                if ( m_pMacroBox->GetEntryText( pEntry ).equalsIgnoreAsciiCase( aEdtText ) )
                 {
                     SaveSetCurEntry(*m_pMacroBox, pEntry);
                     bFound = true;
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index db1dfaa..299d04c 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -629,14 +629,14 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uInt16 nPos, sal_
     // So the first text column's width is Tab(2)-Tab(1).
     long nWidthPixel = Links().GetLogicTab( 2 ) - Links().GetLogicTab( 1 );
     nWidthPixel -= SV_TAB_BORDER;
-    XubString aTxt = Links().GetEllipsisString( sFileNm, nWidthPixel, TEXT_DRAW_PATHELLIPSIS );
+    OUString aTxt = Links().GetEllipsisString( sFileNm, nWidthPixel, TEXT_DRAW_PATHELLIPSIS );
     INetURLObject aPath( sFileNm, INET_PROT_FILE );
     String aFileName = aPath.getName();
     aFileName = INetURLObject::decode(aFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS);
 
-    if( aFileName.Len() > aTxt.Len() )
+    if( aFileName.Len() > aTxt.getLength() )
         aTxt = aFileName;
-    else if( aTxt.Search( aFileName, aTxt.Len() - aFileName.Len() ) == STRING_NOTFOUND )
+    else if( aTxt.indexOf( aFileName, aTxt.getLength() - aFileName.Len() ) == -1 )
         // filename not in string
         aTxt = aFileName;
 
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index a427020..384fccd 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -277,7 +277,7 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& )
     aCheckLB.SetUpdateMode( sal_True );
 }
 
-void OfaMSFilterTabPage2::InsertEntry( const String& _rTxt, sal_IntPtr _nType )
+void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType )
 {
     SvTreeListEntry* pEntry = new SvTreeListEntry;
 
diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx
index bdcaf49..81a9650 100644
--- a/cui/source/options/optfltr.hxx
+++ b/cui/source/options/optfltr.hxx
@@ -86,7 +86,7 @@ class OfaMSFilterTabPage2 : public SfxTabPage
     OfaMSFilterTabPage2( Window* pParent, const SfxItemSet& rSet );
     virtual ~OfaMSFilterTabPage2();
 
-    void            InsertEntry( const String& _rTxt, sal_IntPtr _nType );
+    void                InsertEntry( const OUString& _rTxt, sal_IntPtr _nType );
     SvTreeListEntry*    GetEntry4Type( sal_IntPtr _nType ) const;
 
 public:
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index 6f1ffe3..32f0de7 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -109,7 +109,7 @@ void StructPage::ClearStruct()
     aTlbStruct.Clear();
 }
 
-SvTreeListEntry* StructPage::InsertEntry( const XubString& rText, SvTreeListEntry* pParent,
+SvTreeListEntry* StructPage::InsertEntry( const OUString& rText, SvTreeListEntry* pParent,
                                        sal_uInt16 nFlag,sal_uLong nPos,IFormulaToken* pIFormulaToken)
 {
     aTlbStruct.SetActiveFlag( sal_False );
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index ec48d27..c68459b 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -93,10 +93,10 @@ public:
                     StructPage( Window* pParent);
 
     void            ClearStruct();
-    virtual SvTreeListEntry*    InsertEntry(const XubString& rText, SvTreeListEntry* pParent,
+    virtual SvTreeListEntry*    InsertEntry(const OUString& rText, SvTreeListEntry* pParent,
                                 sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL);
 
-    virtual String          GetEntryText(SvTreeListEntry* pEntry) const;
+    virtual String              GetEntryText(SvTreeListEntry* pEntry) const;
     virtual SvTreeListEntry*    GetParent(SvTreeListEntry* pEntry) const;
 
     void            SetSelectionHdl( const Link& rLink ) { aSelLink = rLink; }
diff --git a/include/formula/IFunctionDescription.hxx b/include/formula/IFunctionDescription.hxx
index 1747c2f..23c1464 100644
--- a/include/formula/IFunctionDescription.hxx
+++ b/include/formula/IFunctionDescription.hxx
@@ -115,7 +115,7 @@ namespace formula
     {
     public:
         IStructHelper(){}
-        virtual SvTreeListEntry*    InsertEntry(const XubString& rText, SvTreeListEntry* pParent,
+        virtual SvTreeListEntry*    InsertEntry(const OUString& rText, SvTreeListEntry* pParent,
                                 sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL) = 0;
 
         virtual String          GetEntryText(SvTreeListEntry* pEntry) const = 0;
diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx
index 0a25a5d..81726c7 100644
--- a/include/svtools/ivctrl.hxx
+++ b/include/svtools/ivctrl.hxx
@@ -282,7 +282,7 @@ public:
     void                ArrangeIcons();
 
 
-    SvxIconChoiceCtrlEntry* InsertEntry( const String& rText,
+    SvxIconChoiceCtrlEntry* InsertEntry( const OUString& rText,
                                          const Image& rImage,
                                          sal_uLong nPos = LIST_APPEND,
                                          const Point* pPos = 0,
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index 167e41e..e3368ed 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -47,8 +47,8 @@ class SVT_DLLPUBLIC SvTabListBox : public SvTreeListBox
 {
 private:
     SvLBoxTab*                  pTabList;
-    sal_uInt16                      nTabCount;
-    XubString                   aCurEntry;
+    sal_uInt16                  nTabCount;
+    OUString                    aCurEntry;
 
 protected:
     SvTreeListEntry*                pViewParent;
@@ -73,12 +73,12 @@ public:
     void            SetTab( sal_uInt16 nTab, long nValue, MapUnit = MAP_APPFONT );
     long            GetLogicTab( sal_uInt16 nTab );
 
-    virtual SvTreeListEntry*    InsertEntry( const XubString& rText, SvTreeListEntry* pParent = 0,
+    virtual SvTreeListEntry*    InsertEntry( const OUString& rText, SvTreeListEntry* pParent = 0,
                                          sal_Bool bChildrenOnDemand = sal_False,
                                          sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
                                          SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
 
-    virtual SvTreeListEntry*    InsertEntry( const XubString& rText,
+    virtual SvTreeListEntry*    InsertEntry( const OUString& rText,
                                          const Image& rExpandedEntryBmp,
                                          const Image& rCollapsedEntryBmp,
                                          SvTreeListEntry* pParent = 0,
@@ -94,18 +94,18 @@ public:
                                  const Image& rCollapsedEntryBmp, SvTreeListEntry* pParent = NULL,
                                  sal_uLong nPos = LIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
 
-    virtual String  GetEntryText( SvTreeListEntry* pEntry ) const;
-    String          GetEntryText( SvTreeListEntry*, sal_uInt16 nCol ) const;
-    String          GetEntryText( sal_uLong nPos, sal_uInt16 nCol = 0xffff ) const;
+    virtual OUString GetEntryText( SvTreeListEntry* pEntry ) const;
+    OUString         GetEntryText( SvTreeListEntry*, sal_uInt16 nCol ) const;
+    OUString         GetEntryText( sal_uLong nPos, sal_uInt16 nCol = 0xffff ) const;
     using SvTreeListBox::SetEntryText;
-    void            SetEntryText(const OUString&, sal_uLong, sal_uInt16 nCol=0xffff);
-    void            SetEntryText(const OUString&, SvTreeListEntry*, sal_uInt16 nCol=0xffff);
-    String          GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const;
-    sal_uLong           GetEntryPos( const XubString&, sal_uInt16 nCol = 0xffff );
-    sal_uLong           GetEntryPos( const SvTreeListEntry* pEntry ) const;
-
-    virtual void    Resize();
-    void            SetTabJustify( sal_uInt16 nTab, SvTabJustify );
+    void             SetEntryText(const OUString&, sal_uLong, sal_uInt16 nCol=0xffff);
+    void             SetEntryText(const OUString&, SvTreeListEntry*, sal_uInt16 nCol=0xffff);
+    OUString         GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const;
+    sal_uLong        GetEntryPos( const OUString&, sal_uInt16 nCol = 0xffff );
+    sal_uLong        GetEntryPos( const SvTreeListEntry* pEntry ) const;
+
+    virtual void     Resize();
+    void             SetTabJustify( sal_uInt16 nTab, SvTabJustify );
 };
 
 inline long SvTabListBox::GetTab( sal_uInt16 nTab ) const
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index cc9a27b..1712e56 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -609,12 +609,12 @@ public:
         );
     }
 
-    virtual SvTreeListEntry*    InsertEntry( const XubString& rText, SvTreeListEntry* pParent = 0,
+    virtual SvTreeListEntry*    InsertEntry( const OUString& rText, SvTreeListEntry* pParent = 0,
                                          sal_Bool bChildrenOnDemand = sal_False,
                                          sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
                                          SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
 
-    virtual SvTreeListEntry*    InsertEntry( const XubString& rText,
+    virtual SvTreeListEntry*    InsertEntry( const OUString& rText,
                                          const Image& rExpandedEntryBmp,
                                          const Image& rCollapsedEntryBmp,
                                          SvTreeListEntry* pParent = 0,
@@ -636,8 +636,8 @@ public:
     void            SetExpandedEntryBmp( SvTreeListEntry* _pEntry, const Image& _rImage );
     void            SetCollapsedEntryBmp( SvTreeListEntry* _pEntry, const Image& _rImage );
 
-    virtual String  GetEntryText( SvTreeListEntry* pEntry ) const;
-    String          SearchEntryText( SvTreeListEntry* pEntry ) const;
+    virtual OUString GetEntryText( SvTreeListEntry* pEntry ) const;
+    OUString        SearchEntryText( SvTreeListEntry* pEntry ) const;
     const Image&    GetExpandedEntryBmp(const SvTreeListEntry* _pEntry ) const;
     const Image&    GetCollapsedEntryBmp(const SvTreeListEntry* _pEntry ) const;
 
diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx
index 324de12..327dddc 100644
--- a/include/svx/checklbx.hxx
+++ b/include/svx/checklbx.hxx
@@ -38,7 +38,7 @@ private:
 
     using SvTreeListBox::InsertEntry;
     // Avoid ambiguity with new InsertEntry:
-    virtual SvTreeListEntry*    InsertEntry( const XubString& rText, SvTreeListEntry* pParent,
+    virtual SvTreeListEntry*    InsertEntry( const OUString& rText, SvTreeListEntry* pParent,
                                          sal_Bool bChildrenOnDemand,
                                          sal_uIntPtr nPos, void* pUserData,
                                          SvLBoxButtonKind eButtonKind );
@@ -50,7 +50,7 @@ public:
                      const Image& rNormalStaticImage );
     ~SvxCheckListBox();
 
-    void            InsertEntry         ( const String& rStr,
+    void            InsertEntry         ( const OUString& rStr,
                                           sal_uInt16 nPos = LISTBOX_APPEND,
                                           void* pUserData = NULL,
                                           SvLBoxButtonKind eButtonKind =
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index a7f58cc..c7b7b71 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -138,10 +138,10 @@ public:
     sal_Bool            IsValidComment(const String* pComment);
     // }
 
-    SvTreeListEntry*    InsertEntry(const String& ,RedlinData *pUserData,
+    SvTreeListEntry*    InsertEntry(const OUString& ,RedlinData *pUserData,
                                 SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
 
-    SvTreeListEntry*    InsertEntry(const String& ,RedlinData *pUserData,const Color&,
+    SvTreeListEntry*    InsertEntry(const OUString& ,RedlinData *pUserData,const Color&,
                                 SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
 
 
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 6ce1846..298981c 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -86,7 +86,7 @@ SvtIconChoiceCtrl::~SvtIconChoiceCtrl()
     delete _pImp;
 }
 
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags  )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const OUString& rText, const Image& rImage, sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags  )
 {
     SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, nFlags);
 
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 9120444..00f157a 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -76,9 +76,9 @@ void SvTabListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
     const Image& rColl, const Image& rExp, SvLBoxButtonKind eButtonKind)
 {
     SvTreeListBox::InitEntry(pEntry, rStr, rColl, rExp, eButtonKind);
-    XubString aToken;
+    OUString aToken;
 
-    const sal_Unicode* pCurToken = aCurEntry.GetBuffer();
+    const sal_Unicode* pCurToken = aCurEntry.getStr();
     sal_uInt16 nCurTokenLen;
     const sal_Unicode* pNextToken = GetToken( pCurToken, nCurTokenLen );
     sal_uInt16 nCount = nTabCount; nCount--;
@@ -87,7 +87,7 @@ void SvTabListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
         if( pCurToken && nCurTokenLen )
             aToken = OUString(pCurToken, nCurTokenLen);
         else
-            aToken.Erase();
+            aToken = OUString();
         SvLBoxString* pStr = new SvLBoxString( pEntry, 0, aToken );
         pEntry->AddItem( pStr );
         pCurToken = pNextToken;
@@ -184,7 +184,7 @@ void SvTabListBox::SetTab( sal_uInt16 nTab,long nValue,MapUnit eMapUnit )
     }
 }
 
-SvTreeListEntry* SvTabListBox::InsertEntry( const XubString& rText, SvTreeListEntry* pParent,
+SvTreeListEntry* SvTabListBox::InsertEntry( const OUString& rText, SvTreeListEntry* pParent,
                                         sal_Bool /*bChildrenOnDemand*/,
                                         sal_uLong nPos, void* pUserData,
                                         SvLBoxButtonKind )
@@ -192,7 +192,7 @@ SvTreeListEntry* SvTabListBox::InsertEntry( const XubString& rText, SvTreeListEn
     return InsertEntryToColumn( rText, pParent, nPos, 0xffff, pUserData );
 }
 
-SvTreeListEntry* SvTabListBox::InsertEntry( const XubString& rText,
+SvTreeListEntry* SvTabListBox::InsertEntry( const OUString& rText,
                                         const Image& rExpandedEntryBmp,
                                         const Image& rCollapsedEntryBmp,
                                         SvTreeListEntry* pParent,
@@ -207,26 +207,25 @@ SvTreeListEntry* SvTabListBox::InsertEntry( const XubString& rText,
 SvTreeListEntry* SvTabListBox::InsertEntryToColumn(const OUString& rStr,SvTreeListEntry* pParent,sal_uLong nPos,sal_uInt16 nCol,
     void* pUser )
 {
-    XubString aStr;
+    OUString aStr;
     if( nCol != 0xffff )
     {
         while( nCol )
         {
-            aStr += '\t';
+            aStr += "\t";
             nCol--;
         }
     }
     aStr += rStr;
-    XubString aFirstStr( aStr );
-    sal_uInt16 nEnd = aFirstStr.Search( '\t' );
-    if( nEnd != STRING_NOTFOUND )
+    OUString aFirstStr( aStr );
+    sal_Int32 nEnd = aFirstStr.indexOf( '\t' );
+    if( nEnd != -1 )
     {
-        aFirstStr.Erase( nEnd );
-        aCurEntry = aStr;
-        aCurEntry.Erase( 0, ++nEnd );
+        aFirstStr = aFirstStr.copy(0, nEnd);
+        aCurEntry = aStr.copy(++nEnd);
     }
     else
-        aCurEntry.Erase();
+        aCurEntry = OUString();
     return SvTreeListBox::InsertEntry( aFirstStr, pParent, sal_False, nPos, pUser );
 }
 
@@ -234,26 +233,25 @@ SvTreeListEntry* SvTabListBox::InsertEntryToColumn( const OUString& rStr,
     const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
     SvTreeListEntry* pParent,sal_uLong nPos,sal_uInt16 nCol, void* pUser )
 {
-    XubString aStr;
+    OUString aStr;
     if( nCol != 0xffff )
     {
         while( nCol )
         {
-            aStr += '\t';
+            aStr += "\t";
             nCol--;
         }
     }
     aStr += rStr;
-    XubString aFirstStr( aStr );
-    sal_uInt16 nEnd = aFirstStr.Search( '\t' );
-    if( nEnd != STRING_NOTFOUND )
+    OUString aFirstStr( aStr );
+    sal_Int32 nEnd = aFirstStr.indexOf('\t');
+    if (nEnd != -1)
     {
-        aFirstStr.Erase( nEnd );
-        aCurEntry = aStr;
-        aCurEntry.Erase( 0, ++nEnd );
+        aFirstStr = aFirstStr.copy(0, nEnd);
+        aCurEntry = aStr.copy(++nEnd);
     }
     else
-        aCurEntry.Erase();
+        aCurEntry = OUString();
 
     return SvTreeListBox::InsertEntry(
         aFirstStr,
@@ -267,15 +265,15 @@ SvTreeListEntry* SvTabListBox::InsertEntryToColumn( const OUString& rStr, sal_uL
     return InsertEntryToColumn( rStr,0,nPos, nCol, pUser );
 }
 
-String SvTabListBox::GetEntryText( SvTreeListEntry* pEntry ) const
+OUString SvTabListBox::GetEntryText( SvTreeListEntry* pEntry ) const
 {
     return GetEntryText( pEntry, 0xffff );
 }
 
-String SvTabListBox::GetEntryText( SvTreeListEntry* pEntry, sal_uInt16 nCol ) const
+OUString SvTabListBox::GetEntryText( SvTreeListEntry* pEntry, sal_uInt16 nCol ) const
 {
     DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry");
-    XubString aResult;
+    OUString aResult;
     if( pEntry )
     {
         sal_uInt16 nCount = pEntry->ItemCount();
@@ -287,8 +285,8 @@ String SvTabListBox::GetEntryText( SvTreeListEntry* pEntry, sal_uInt16 nCol ) co
             {
                 if( nCol == 0xffff )
                 {
-                    if( aResult.Len() )
-                        aResult += '\t';
+                    if (!aResult.isEmpty())
+                        aResult += "\t";
                     aResult += static_cast<const SvLBoxString*>(pStr)->GetText();
                 }
                 else
@@ -304,7 +302,7 @@ String SvTabListBox::GetEntryText( SvTreeListEntry* pEntry, sal_uInt16 nCol ) co
     return aResult;
 }
 
-String SvTabListBox::GetEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
+OUString SvTabListBox::GetEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
 {
     SvTreeListEntry* pEntry = GetEntryOnPos( nPos );
     return GetEntryText( pEntry, nCol );
@@ -373,11 +371,11 @@ void SvTabListBox::SetEntryText(const OUString& rStr, SvTreeListEntry* pEntry, s
     delete pData;
 }
 
-String SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const
+OUString SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const
 {
     SvTreeListEntry* pEntry = GetEntryOnPos( nPos );
     DBG_ASSERT( pEntry, "SvTabListBox::GetCellText(): Invalid Entry" );
-    XubString aResult;
+    OUString aResult;
     if (pEntry && pEntry->ItemCount() > static_cast<size_t>(nCol+1))
     {
         const SvLBoxItem* pStr = pEntry->GetItem( nCol + 1 );
@@ -387,13 +385,13 @@ String SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const
     return aResult;
 }
 
-sal_uLong SvTabListBox::GetEntryPos( const XubString& rStr, sal_uInt16 nCol )
+sal_uLong SvTabListBox::GetEntryPos( const OUString& rStr, sal_uInt16 nCol )
 {
     sal_uLong nPos = 0;
     SvTreeListEntry* pEntry = First();
     while( pEntry )
     {
-        XubString aStr( GetEntryText( pEntry, nCol ));
+        OUString aStr( GetEntryText( pEntry, nCol ));
         if( aStr == rStr )
             return nPos;
         pEntry = Next( pEntry );
@@ -449,7 +447,7 @@ String SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
 {
     SvTreeListEntry* pEntry = SvTreeListBox::GetEntry( nPos );
     DBG_ASSERT( pEntry, "GetTabEntryText(): Invalid entry " );
-    XubString aResult;
+    OUString aResult;
     if ( pEntry )
     {
         sal_uInt16 nCount = pEntry->ItemCount();
@@ -461,8 +459,8 @@ String SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
             {
                 if ( nCol == 0xffff )
                 {
-                    if ( aResult.Len() )
-                        aResult += '\t';
+                    if (!aResult.isEmpty())
+                        aResult += "\t";
                     aResult += static_cast<const SvLBoxString*>(pStr)->GetText();
                 }
                 else
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 7798379..ef0625e 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1768,7 +1768,7 @@ void SvTreeListBox::InitEntry(SvTreeListEntry* pEntry,
     pEntry->AddItem( pString );
 }
 
-String SvTreeListBox::GetEntryText(SvTreeListEntry* pEntry) const
+OUString SvTreeListBox::GetEntryText(SvTreeListEntry* pEntry) const
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     DBG_ASSERT( pEntry, "SvTreeListBox::GetEntryText(): no entry" );
@@ -1777,7 +1777,7 @@ String SvTreeListBox::GetEntryText(SvTreeListEntry* pEntry) const
     return pItem->GetText();
 }
 
-String SvTreeListBox::SearchEntryText( SvTreeListEntry* pEntry ) const
+OUString SvTreeListBox::SearchEntryText( SvTreeListEntry* pEntry ) const
 {
     DBG_CHKTHIS(SvTreeListBox,0);
     DBG_ASSERT( pEntry, "SvTreeListBox::SearchEntryText(): no entry" );
@@ -1826,7 +1826,7 @@ IMPL_LINK_INLINE_START( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pDa
 IMPL_LINK_INLINE_END( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData )
 
 SvTreeListEntry* SvTreeListBox::InsertEntry(
-    const XubString& aText,
+    const OUString& rText,
     SvTreeListEntry* pParent,
     sal_Bool bChildrenOnDemand, sal_uLong nPos,
     void* pUser,
@@ -1844,7 +1844,7 @@ SvTreeListEntry* SvTreeListBox::InsertEntry(
 
     SvTreeListEntry* pEntry = CreateEntry();
     pEntry->SetUserData( pUser );
-    InitEntry( pEntry, aText, rDefColBmp, rDefExpBmp, eButtonKind );
+    InitEntry( pEntry, rText, rDefColBmp, rDefExpBmp, eButtonKind );
     pEntry->EnableChildrenOnDemand( bChildrenOnDemand );
 
     if( !pParent )
@@ -1860,7 +1860,7 @@ SvTreeListEntry* SvTreeListBox::InsertEntry(
     return pEntry;
 }
 
-SvTreeListEntry* SvTreeListBox::InsertEntry( const XubString& aText,
+SvTreeListEntry* SvTreeListBox::InsertEntry( const OUString& rText,
     const Image& aExpEntryBmp, const Image& aCollEntryBmp,
     SvTreeListEntry* pParent, sal_Bool bChildrenOnDemand, sal_uLong nPos, void* pUser,
     SvLBoxButtonKind eButtonKind )
@@ -1873,7 +1873,7 @@ SvTreeListEntry* SvTreeListBox::InsertEntry( const XubString& aText,
 
     SvTreeListEntry* pEntry = CreateEntry();
     pEntry->SetUserData( pUser );
-    InitEntry( pEntry, aText, aCollEntryBmp, aExpEntryBmp, eButtonKind );
+    InitEntry( pEntry, rText, aCollEntryBmp, aExpEntryBmp, eButtonKind );
 
     pEntry->EnableChildrenOnDemand( bChildrenOnDemand );
 
diff --git a/svtools/source/control/filectrl2.cxx b/svtools/source/control/filectrl2.cxx
index 120975a..0e1bd93 100644
--- a/svtools/source/control/filectrl2.cxx
+++ b/svtools/source/control/filectrl2.cxx
@@ -35,8 +35,6 @@ void FileControl::ImplBrowseFile( )
 {
     try
     {
-        XubString aNewText;
-
         Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
         Reference < dialogs::XFilePicker3 > xFilePicker = dialogs::FilePicker::createWithMode( xContext, dialogs::TemplateDescription::FILEOPEN_SIMPLE );
         // transform the system notation text into a file URL
@@ -59,7 +57,7 @@ void FileControl::ImplBrowseFile( )
 
             if ( aPathSeq.getLength() )
             {
-                aNewText = aPathSeq[0];
+                OUString aNewText = aPathSeq[0];
                 INetURLObject aObj( aNewText );
                 if ( aObj.GetProtocol() == INET_PROT_FILE )
                     aNewText = aObj.PathToFileName();
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index a7b3067..09b0412 100644
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -67,9 +67,9 @@ void FontNameMenu::Fill( const FontList* pList )
     // more than 100 fonts reduces the speed of opening the menu.
     // So only the first 100 fonts will be displayed.
     sal_uInt16 nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< sal_uInt16 >(100) );
-    for ( sal_uInt16 i = 0; i < nFontCount; i++ )
+    for (sal_uInt16 i = 0; i < nFontCount; ++i)
     {
-        const XubString& rName = pList->GetFontName( i ).GetName();
+        const OUString& rName = pList->GetFontName( i ).GetName();
 
         // sort with the I18nHelper
         sal_uInt16 j = GetItemCount();
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index 1a311bc..498680e 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -93,7 +93,7 @@ Printer* ImplPrnDlgListBoxSelect( ListBox* pBox, PushButton* pPropBtn,
 
 Printer* ImplPrnDlgUpdatePrinter( Printer* pPrinter, Printer* pTempPrinter )
 {
-    XubString aPrnName;
+    OUString aPrnName;
     if ( pTempPrinter )
         aPrnName = pTempPrinter->GetName();
     else
@@ -123,7 +123,7 @@ void ImplPrnDlgUpdateQueueInfo( ListBox* pBox, QueueInfo& rInfo )
 
 // -----------------------------------------------------------------------
 
-static void ImplPrnDlgAddString( XubString& rStr, const XubString& rAddStr )
+static void ImplPrnDlgAddString( XubString& rStr, const OUString& rAddStr )
 {
     if ( rStr.Len() )
         rStr.AppendAscii( "; " );
@@ -206,7 +206,7 @@ OUString ImplPrnDlgGetStatusText( const QueueInfo& rInfo )
     if ( nJobs && (nJobs != QUEUE_JOBS_DONTKNOW) )
     {
         XubString aJobStr( SVT_RESSTR( STR_SVT_PRNDLG_JOBCOUNT ) );
-        XubString aJobs( OUString::number( nJobs ) );
+        OUString aJobs( OUString::number( nJobs ) );
         aJobStr.SearchAndReplaceAscii( "%d", aJobs );
         ImplPrnDlgAddString( aStr, aJobStr );
     }
@@ -269,7 +269,7 @@ void PrinterSetupDialog::ImplSetInfo()
     }
     else
     {
-        XubString aTempStr;
+        OUString aTempStr;
         m_pFiType->SetText( aTempStr );
         m_pFiLocation->SetText( aTempStr );
         m_pFiComment->SetText( aTempStr );
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index d3145bc..e923d91 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -85,7 +85,7 @@ void SvxCheckListBox::Init_Impl()
 
 // -----------------------------------------------------------------------
 
-void SvxCheckListBox::InsertEntry( const String& rStr, sal_uInt16 nPos,
+void SvxCheckListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos,
                                    void* pUserData,
                                    SvLBoxButtonKind eButtonKind )
 {
@@ -267,7 +267,7 @@ void SvxCheckListBox::KeyInput( const KeyEvent& rKEvt )
 
 // -----------------------------------------------------------------------
 
-SvTreeListEntry* SvxCheckListBox::InsertEntry( const XubString& rText, SvTreeListEntry* pParent, sal_Bool bChildrenOnDemand, sal_uIntPtr nPos, void* pUserData, SvLBoxButtonKind eButtonKind )
+SvTreeListEntry* SvxCheckListBox::InsertEntry( const OUString& rText, SvTreeListEntry* pParent, sal_Bool bChildrenOnDemand, sal_uIntPtr nPos, void* pUserData, SvLBoxButtonKind eButtonKind )
 {
     return SvTreeListBox::InsertEntry( rText, pParent, bChildrenOnDemand, nPos, pUserData, eButtonKind );
 }
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 4b31061..6ccbb8f 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -369,7 +369,7 @@ sal_Bool SvxRedlinTable::IsValidComment(const String* pCommentStr)
     return nTheFlag;
 }
 
-SvTreeListEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserData,
+SvTreeListEntry* SvxRedlinTable::InsertEntry(const OUString& rStr,RedlinData *pUserData,
                                 SvTreeListEntry* pParent,sal_uIntPtr nPos)
 {
     aEntryColor=GetTextColor();
@@ -396,7 +396,7 @@ SvTreeListEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUse
 
 }
 
-SvTreeListEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserData,const Color& aColor,
+SvTreeListEntry* SvxRedlinTable::InsertEntry(const OUString& rStr,RedlinData *pUserData,const Color& aColor,
                                 SvTreeListEntry* pParent,sal_uIntPtr nPos)
 {
     aEntryColor=aColor;
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index aa90035..defe63f 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -177,7 +177,7 @@ String      SwSelectDBTableDialog::GetSelectedTable(bool& bIsTable)
 {
     SvTreeListEntry* pEntry = m_aTableLB.FirstSelected();
     bIsTable = pEntry->GetUserData() ? false : true;
-    return pEntry ? m_aTableLB.GetEntryText(pEntry, 0) : String();
+    return pEntry ? m_aTableLB.GetEntryText(pEntry, 0) : OUString();
 }
 
 void   SwSelectDBTableDialog::SetSelectedTable(const String& rTable, bool bIsTable)


More information about the Libreoffice-commits mailing list