[Libreoffice-commits] core.git: 15 commits - basctl/source basic/source cui/source dbaccess/source editeng/source formula/source framework/source include/editeng include/svl include/vcl sc/source sfx2/source svl/source svx/source sw/inc sw/source toolkit/source vcl/source

Michael Stahl mstahl at redhat.com
Thu Aug 8 14:32:17 PDT 2013


 basctl/source/basicide/brkdlg.cxx                        |    2 
 basic/source/classes/sbunoobj.cxx                        |   48 +--
 basic/source/sbx/sbxobj.cxx                              |   31 +-
 basic/source/sbx/sbxstr.cxx                              |    4 
 basic/source/sbx/sbxvalue.cxx                            |   50 +--
 cui/source/dialogs/cuifmsearch.cxx                       |    2 
 cui/source/tabpages/tabstpge.cxx                         |    2 
 dbaccess/source/core/api/RowSetCache.cxx                 |    2 
 dbaccess/source/ui/querydesign/LimitBox.cxx              |    2 
 editeng/source/items/svxfont.cxx                         |   20 -
 formula/source/ui/dlg/formula.cxx                        |    8 
 formula/source/ui/dlg/funcutl.cxx                        |    4 
 framework/source/uielement/comboboxtoolbarcontroller.cxx |    2 
 include/editeng/svxfont.hxx                              |    5 
 include/svl/macitem.hxx                                  |   28 --
 include/vcl/combobox.hxx                                 |    6 
 sc/source/ui/dbgui/filtdlg.cxx                           |    2 
 sfx2/source/appl/newhelp.cxx                             |    2 
 sfx2/source/dialog/srchdlg.cxx                           |    2 
 svl/source/items/macitem.cxx                             |   22 -
 svx/source/dialog/srchdlg.cxx                            |    2 
 svx/source/fmcomp/gridcell.cxx                           |    2 
 svx/source/tbxctrls/tbunosearchcontrollers.cxx           |    2 
 sw/inc/SwStyleNameMapper.hxx                             |   96 ++++---
 sw/inc/ccoll.hxx                                         |    6 
 sw/inc/docstyle.hxx                                      |    9 
 sw/inc/ndtxt.hxx                                         |   29 +-
 sw/source/core/doc/SwStyleNameMapper.cxx                 |  190 ++++++++-------
 sw/source/core/doc/docnum.cxx                            |    2 
 sw/source/core/docnode/ndnotxt.cxx                       |    2 
 sw/source/core/docnode/node.cxx                          |    2 
 sw/source/core/edit/editsh.cxx                           |    2 
 sw/source/core/fields/reffld.cxx                         |    4 
 sw/source/core/layout/atrfrm.cxx                         |    4 
 sw/source/core/text/EnhancedPDFExportHelper.cxx          |   28 +-
 sw/source/core/txtnode/fmtatr2.cxx                       |   38 +--
 sw/source/core/txtnode/ndtxt.cxx                         |  169 ++++++-------
 sw/source/core/txtnode/thints.cxx                        |    2 
 sw/source/core/txtnode/txtedt.cxx                        |    9 
 sw/source/core/unocore/SwXTextDefaults.cxx               |    2 
 sw/source/core/unocore/unocrsrhelper.cxx                 |   11 
 sw/source/core/unocore/unofield.cxx                      |    5 
 sw/source/core/unocore/unoframe.cxx                      |    5 
 sw/source/core/unocore/unoidx.cxx                        |   34 +-
 sw/source/core/unocore/unoobj.cxx                        |   14 -
 sw/source/core/unocore/unosett.cxx                       |   59 ++--
 sw/source/core/unocore/unostyle.cxx                      |   68 ++---
 sw/source/core/unocore/unotbl.cxx                        |   14 -
 sw/source/core/view/viewsh.cxx                           |    9 
 sw/source/core/view/vnew.cxx                             |    2 
 sw/source/core/view/vprint.cxx                           |    7 
 sw/source/filter/ww8/ww8graf.cxx                         |    4 
 sw/source/filter/ww8/ww8par5.cxx                         |    2 
 sw/source/filter/xml/xmlfmt.cxx                          |    8 
 sw/source/filter/xml/xmlfmte.cxx                         |    2 
 sw/source/filter/xml/xmltexte.cxx                        |    2 
 sw/source/ui/app/appenv.cxx                              |    2 
 sw/source/ui/app/docstyle.cxx                            |    8 
 sw/source/ui/cctrl/swlbox.cxx                            |   60 +---
 sw/source/ui/chrdlg/ccoll.cxx                            |   12 
 sw/source/ui/chrdlg/chardlg.cxx                          |    6 
 sw/source/ui/chrdlg/swuiccoll.cxx                        |    2 
 sw/source/ui/config/optload.cxx                          |   71 ++---
 sw/source/ui/dbui/dbinsdlg.cxx                           |   12 
 sw/source/ui/fmtui/tmpdlg.cxx                            |    4 
 sw/source/ui/inc/optload.hxx                             |   32 +-
 sw/source/ui/inc/swlbox.hxx                              |   40 ---
 sw/source/ui/index/cnttab.cxx                            |    4 
 sw/source/ui/misc/bookmark.cxx                           |   10 
 sw/source/ui/misc/docfnote.cxx                           |    2 
 sw/source/ui/misc/num.cxx                                |    2 
 sw/source/ui/misc/outline.cxx                            |    4 
 sw/source/ui/uiview/view.cxx                             |    2 
 sw/source/ui/uiview/view2.cxx                            |    3 
 sw/source/ui/uno/unotxvw.cxx                             |   11 
 sw/source/ui/utlui/uitool.cxx                            |    2 
 toolkit/source/awt/vclxwindows.cxx                       |   13 -
 vcl/source/control/combobox.cxx                          |   10 
 vcl/source/control/field.cxx                             |    8 
 vcl/source/control/field2.cxx                            |    6 
 vcl/source/control/longcurr.cxx                          |    2 
 81 files changed, 673 insertions(+), 745 deletions(-)

New commits:
commit 5cb4ac45309364eb1e3aa61090062b5cc26dd7b7
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Aug 7 23:16:06 2013 +0200

    boost::ptr_vector<OUString> considered silly
    
    Change-Id: I85c3d8a0e6b64c7a8dcf66a3dfde25151718c4d9

diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx
index b3cb9c9..4ef0c2d 100644
--- a/sw/inc/SwStyleNameMapper.hxx
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SWSTYLENAMEMAPPER_HXX
-#define _SWSTYLENAMEMAPPER_HXX
+#ifndef SWSTYLENAMEMAPPER_HXX
+#define SWSTYLENAMEMAPPER_HXX
 
 #include <sal/types.h>
 #include <tools/string.hxx>
@@ -27,7 +27,7 @@
 #include <boost/unordered_map.hpp>
 #include <stringhash.hxx>
 
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <vector>
 
 /** This class holds all data about the names of styles used in the user
  * interface (UI names...these are localised into different languages).
@@ -86,7 +86,7 @@ class SwStyleNameMapper
 
 protected:
     // UI Name tables
-    static boost::ptr_vector<OUString> *pTextUINameArray,
+    static ::std::vector<OUString> *pTextUINameArray,
                             *pListsUINameArray,
                             *pExtraUINameArray,
                             *pRegisterUINameArray,
@@ -166,29 +166,29 @@ public:
                     const OUString& rExtraUIName);
     static const OUString GetSpecialExtraUIName(const OUString& rExtraProgName);
 
-    static const boost::ptr_vector<OUString>& GetTextUINameArray();
-    static const boost::ptr_vector<OUString>& GetListsUINameArray();
-    static const boost::ptr_vector<OUString>& GetExtraUINameArray();
-    static const boost::ptr_vector<OUString>& GetRegisterUINameArray();
-    static const boost::ptr_vector<OUString>& GetDocUINameArray();
-    static const boost::ptr_vector<OUString>& GetHTMLUINameArray();
-    static const boost::ptr_vector<OUString>& GetFrmFmtUINameArray();
-    static const boost::ptr_vector<OUString>& GetChrFmtUINameArray();
-    static const boost::ptr_vector<OUString>& GetHTMLChrFmtUINameArray();
-    static const boost::ptr_vector<OUString>& GetPageDescUINameArray();
-    static const boost::ptr_vector<OUString>& GetNumRuleUINameArray();
-
-    static const boost::ptr_vector<OUString>& GetTextProgNameArray();
-    static const boost::ptr_vector<OUString>& GetListsProgNameArray();
-    static const boost::ptr_vector<OUString>& GetExtraProgNameArray();
-    static const boost::ptr_vector<OUString>& GetRegisterProgNameArray();
-    static const boost::ptr_vector<OUString>& GetDocProgNameArray();
-    static const boost::ptr_vector<OUString>& GetHTMLProgNameArray();
-    static const boost::ptr_vector<OUString>& GetFrmFmtProgNameArray();
-    static const boost::ptr_vector<OUString>& GetChrFmtProgNameArray();
-    static const boost::ptr_vector<OUString>& GetHTMLChrFmtProgNameArray();
-    static const boost::ptr_vector<OUString>& GetPageDescProgNameArray();
-    static const boost::ptr_vector<OUString>& GetNumRuleProgNameArray();
+    static const ::std::vector<OUString>& GetTextUINameArray();
+    static const ::std::vector<OUString>& GetListsUINameArray();
+    static const ::std::vector<OUString>& GetExtraUINameArray();
+    static const ::std::vector<OUString>& GetRegisterUINameArray();
+    static const ::std::vector<OUString>& GetDocUINameArray();
+    static const ::std::vector<OUString>& GetHTMLUINameArray();
+    static const ::std::vector<OUString>& GetFrmFmtUINameArray();
+    static const ::std::vector<OUString>& GetChrFmtUINameArray();
+    static const ::std::vector<OUString>& GetHTMLChrFmtUINameArray();
+    static const ::std::vector<OUString>& GetPageDescUINameArray();
+    static const ::std::vector<OUString>& GetNumRuleUINameArray();
+
+    static const ::std::vector<OUString>& GetTextProgNameArray();
+    static const ::std::vector<OUString>& GetListsProgNameArray();
+    static const ::std::vector<OUString>& GetExtraProgNameArray();
+    static const ::std::vector<OUString>& GetRegisterProgNameArray();
+    static const ::std::vector<OUString>& GetDocProgNameArray();
+    static const ::std::vector<OUString>& GetHTMLProgNameArray();
+    static const ::std::vector<OUString>& GetFrmFmtProgNameArray();
+    static const ::std::vector<OUString>& GetChrFmtProgNameArray();
+    static const ::std::vector<OUString>& GetHTMLChrFmtProgNameArray();
+    static const ::std::vector<OUString>& GetPageDescProgNameArray();
+    static const ::std::vector<OUString>& GetNumRuleProgNameArray();
 };
 #endif // _NAME_MAPPER_HXX
 
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index da2d0d1..bda6a87 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -16,15 +16,16 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _DOCSTYLE_HXX
-#define _DOCSTYLE_HXX
+#ifndef SW_DOCSTYLE_HXX
+#define SW_DOCSTYLE_HXX
 
 #include <rtl/ref.hxx>
 
 #include <svl/style.hxx>
 #include <svl/itemset.hxx>
 #include "swdllapi.h"
-#include <boost/ptr_container/ptr_vector.hpp>
+
+#include <vector>
 
 class SwDoc;
 class SwDocStyleSheetPool;
@@ -156,7 +157,7 @@ class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
     sal_uInt16              nLastPos;
     sal_Bool                bFirstCalled;
 
-    void                AppendStyleList(const boost::ptr_vector<OUString>& rLst,
+    void                AppendStyleList(const ::std::vector<OUString>& rLst,
                                         sal_Bool    bUsed,
                                         sal_Bool    bTestHidden,
                                         bool        bOnlyHidden,
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 7c1855a..d8ac49a 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -27,7 +27,7 @@
 
 extern ResMgr* pSwResMgr;
 // Initialise UI names to 0
-boost::ptr_vector<OUString> *SwStyleNameMapper::pTextUINameArray = 0,
+::std::vector<OUString> *SwStyleNameMapper::pTextUINameArray = 0,
                 *SwStyleNameMapper::pListsUINameArray = 0,
                 *SwStyleNameMapper::pExtraUINameArray = 0,
                 *SwStyleNameMapper::pRegisterUINameArray = 0,
@@ -308,28 +308,29 @@ const struct SwTableEntry NumRuleProgNameTable [] =
 };
 #undef ENTRY
 
-static boost::ptr_vector<OUString>*
+static ::std::vector<OUString>*
 lcl_NewUINameArray(sal_uInt16 nStt, sal_uInt16 const nEnd)
 {
-    boost::ptr_vector<OUString> *const pNameArray = new boost::ptr_vector<OUString>;
+    ::std::vector<OUString> *const pNameArray = new ::std::vector<OUString>;
     pNameArray->reserve(nEnd - nStt);
     while( nStt < nEnd )
     {
         const ResId rRId( nStt, *pSwResMgr );
-        pNameArray->push_back(new OUString(rRId));
+        pNameArray->push_back(OUString(rRId));
         ++nStt;
     }
     return pNameArray;
 }
 
-static boost::ptr_vector<OUString>*
+static ::std::vector<OUString>*
 lcl_NewProgNameArray(const SwTableEntry *pTable, sal_uInt8 const nCount)
 {
-    boost::ptr_vector<OUString> *const pProgNameArray = new boost::ptr_vector<OUString>;
+    ::std::vector<OUString> *const pProgNameArray = new ::std::vector<OUString>;
     pProgNameArray->reserve(nCount);
     while (pTable->nLength)
     {
-        pProgNameArray->push_back(new OUString(pTable->pChar, pTable->nLength, RTL_TEXTENCODING_ASCII_US));
+        pProgNameArray->push_back(OUString(
+                pTable->pChar, pTable->nLength, RTL_TEXTENCODING_ASCII_US));
         pTable++;
     }
     return pProgNameArray;
@@ -338,7 +339,7 @@ lcl_NewProgNameArray(const SwTableEntry *pTable, sal_uInt8 const nCount)
 static OUString
 lcl_GetSpecialExtraName(const OUString& rExtraName, const bool bIsUIName )
 {
-    const boost::ptr_vector<OUString>& rExtraArr = bIsUIName
+    const ::std::vector<OUString>& rExtraArr = bIsUIName
         ? SwStyleNameMapper::GetExtraUINameArray()
         : SwStyleNameMapper::GetExtraProgNameArray();
     static const sal_uInt16 nIds[] =
@@ -392,7 +393,7 @@ static void lcl_CheckSuffixAndDelete(OUString & rString)
 const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlags, bool bProgName )
 {
     NameToIdHash *pHash = 0;
-    const boost::ptr_vector<OUString> *pStrings;
+    const ::std::vector<OUString> *pStrings = 0;
 
     switch ( eFlags )
     {
@@ -732,7 +733,7 @@ const OUString& SwStyleNameMapper::getNameFromId(
         sal_uInt16 const nId, const OUString& rFillName, bool const bProgName)
 {
     sal_uInt16 nStt = 0;
-    const boost::ptr_vector<OUString>* pStrArr = 0;
+    const ::std::vector<OUString>* pStrArr = 0;
 
     switch( (USER_FMT | COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID) & nId )
     {
@@ -861,7 +862,7 @@ sal_uInt16 SwStyleNameMapper::GetPoolIdFromProgName(
     return aIter != rHashMap.end() ? (*aIter).second : USHRT_MAX;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetTextUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetTextUINameArray()
 {
     if (!pTextUINameArray)
         pTextUINameArray = lcl_NewUINameArray( RC_POOLCOLL_TEXT_BEGIN,
@@ -869,7 +870,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetTextUINameArray()
     return *pTextUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetListsUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetListsUINameArray()
 {
     if (!pListsUINameArray)
         pListsUINameArray = lcl_NewUINameArray( RC_POOLCOLL_LISTS_BEGIN,
@@ -877,7 +878,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetListsUINameArray()
     return *pListsUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetExtraUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetExtraUINameArray()
 {
     if (!pExtraUINameArray)
         pExtraUINameArray = lcl_NewUINameArray( RC_POOLCOLL_EXTRA_BEGIN,
@@ -885,7 +886,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetExtraUINameArray()
     return *pExtraUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetRegisterUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetRegisterUINameArray()
 {
     if (!pRegisterUINameArray)
         pRegisterUINameArray = lcl_NewUINameArray( RC_POOLCOLL_REGISTER_BEGIN,
@@ -893,7 +894,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetRegisterUINameArray()
     return *pRegisterUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetDocUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetDocUINameArray()
 {
     if (!pDocUINameArray)
         pDocUINameArray = lcl_NewUINameArray( RC_POOLCOLL_DOC_BEGIN,
@@ -901,7 +902,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetDocUINameArray()
     return *pDocUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetHTMLUINameArray()
 {
     if (!pHTMLUINameArray)
         pHTMLUINameArray = lcl_NewUINameArray( RC_POOLCOLL_HTML_BEGIN,
@@ -909,7 +910,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLUINameArray()
     return *pHTMLUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetFrmFmtUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetFrmFmtUINameArray()
 {
     if (!pFrmFmtUINameArray)
         pFrmFmtUINameArray = lcl_NewUINameArray( RC_POOLFRMFMT_BEGIN,
@@ -917,7 +918,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetFrmFmtUINameArray()
     return *pFrmFmtUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetChrFmtUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetChrFmtUINameArray()
 {
     if (!pChrFmtUINameArray)
         pChrFmtUINameArray = lcl_NewUINameArray( RC_POOLCHRFMT_BEGIN,
@@ -925,7 +926,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetChrFmtUINameArray()
     return *pChrFmtUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLChrFmtUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetHTMLChrFmtUINameArray()
 {
     if (!pHTMLChrFmtUINameArray)
         pHTMLChrFmtUINameArray = lcl_NewUINameArray( RC_POOLCHRFMT_HTML_BEGIN,
@@ -933,7 +934,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLChrFmtUINameArray()
     return *pHTMLChrFmtUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetPageDescUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetPageDescUINameArray()
 {
     if (!pPageDescUINameArray)
         pPageDescUINameArray = lcl_NewUINameArray( RC_POOLPAGEDESC_BEGIN,
@@ -941,7 +942,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetPageDescUINameArray()
     return *pPageDescUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetNumRuleUINameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetNumRuleUINameArray()
 {
     if (!pNumRuleUINameArray)
         pNumRuleUINameArray = lcl_NewUINameArray( RC_POOLNUMRULE_BEGIN,
@@ -949,7 +950,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetNumRuleUINameArray()
     return *pNumRuleUINameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetTextProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetTextProgNameArray()
 {
     if (!pTextProgNameArray)
         pTextProgNameArray = lcl_NewProgNameArray(TextProgNameTable,
@@ -957,7 +958,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetTextProgNameArray()
     return *pTextProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetListsProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetListsProgNameArray()
 {
     if (!pListsProgNameArray)
         pListsProgNameArray = lcl_NewProgNameArray( ListsProgNameTable,
@@ -965,7 +966,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetListsProgNameArray()
     return *pListsProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetExtraProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetExtraProgNameArray()
 {
     if (!pExtraProgNameArray)
         pExtraProgNameArray = lcl_NewProgNameArray( ExtraProgNameTable,
@@ -973,7 +974,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetExtraProgNameArray()
     return *pExtraProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetRegisterProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetRegisterProgNameArray()
 {
     if (!pRegisterProgNameArray)
         pRegisterProgNameArray = lcl_NewProgNameArray( RegisterProgNameTable,
@@ -981,7 +982,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetRegisterProgNameArray()
     return *pRegisterProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetDocProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetDocProgNameArray()
 {
     if (!pDocProgNameArray)
         pDocProgNameArray = lcl_NewProgNameArray( DocProgNameTable,
@@ -989,7 +990,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetDocProgNameArray()
     return *pDocProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetHTMLProgNameArray()
 {
     if (!pHTMLProgNameArray)
         pHTMLProgNameArray = lcl_NewProgNameArray( HTMLProgNameTable,
@@ -997,7 +998,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLProgNameArray()
     return *pHTMLProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetFrmFmtProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetFrmFmtProgNameArray()
 {
     if (!pFrmFmtProgNameArray)
         pFrmFmtProgNameArray = lcl_NewProgNameArray( FrmFmtProgNameTable,
@@ -1005,7 +1006,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetFrmFmtProgNameArray()
     return *pFrmFmtProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetChrFmtProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetChrFmtProgNameArray()
 {
     if (!pChrFmtProgNameArray)
         pChrFmtProgNameArray = lcl_NewProgNameArray( ChrFmtProgNameTable,
@@ -1013,7 +1014,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetChrFmtProgNameArray()
     return *pChrFmtProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLChrFmtProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetHTMLChrFmtProgNameArray()
 {
     if (!pHTMLChrFmtProgNameArray)
         pHTMLChrFmtProgNameArray = lcl_NewProgNameArray( HTMLChrFmtProgNameTable,
@@ -1021,7 +1022,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLChrFmtProgNameArray
     return *pHTMLChrFmtProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetPageDescProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetPageDescProgNameArray()
 {
     if (!pPageDescProgNameArray)
         pPageDescProgNameArray = lcl_NewProgNameArray( PageDescProgNameTable,
@@ -1029,7 +1030,7 @@ const boost::ptr_vector<OUString>& SwStyleNameMapper::GetPageDescProgNameArray()
     return *pPageDescProgNameArray;
 }
 
-const boost::ptr_vector<OUString>& SwStyleNameMapper::GetNumRuleProgNameArray()
+const ::std::vector<OUString>& SwStyleNameMapper::GetNumRuleProgNameArray()
 {
     if (!pNumRuleProgNameArray)
         pNumRuleProgNameArray = lcl_NewProgNameArray( NumRuleProgNameTable,
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 44d99c7..6ef7872 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -565,7 +565,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
         bool bSetValue = true;
         if( rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_SUB_TYPE)))
         {
-            const boost::ptr_vector<OUString>& rExtraArr(
+            const ::std::vector<OUString>& rExtraArr(
                     SwStyleNameMapper::GetExtraUINameArray());
             OUString sTypeName = pType->GetName();
             static sal_uInt16 nIds[] =
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 7d3b56f..4ee1310 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -2810,7 +2810,7 @@ SfxStyleSheetBase*  SwStyleSheetIterator::Find(const OUString& rName)
     return 0;
 }
 
-void SwStyleSheetIterator::AppendStyleList(const boost::ptr_vector<OUString>& rList,
+void SwStyleSheetIterator::AppendStyleList(const ::std::vector<OUString>& rList,
                                             sal_Bool bTestUsed, sal_Bool bTestHidden, bool bOnlyHidden,
                                             sal_uInt16 nSection, char cType )
 {
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 7f438b8..c68f616 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -297,7 +297,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
 
     // pool formats
     //
-    const boost::ptr_vector<OUString>& rFrmPoolArr(
+    const ::std::vector<OUString>& rFrmPoolArr(
             SwStyleNameMapper::GetFrmFmtUINameArray());
     for( i = 0; i < rFrmPoolArr.size(); ++i )
     {
commit f12ce0ae0f3bae7fede84337433e34f880d732ea
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Aug 7 23:06:43 2013 +0200

    sw: convert rest of SwStyleNameMapper to OUString
    
    Change-Id: I54d1a31b86e60ceb9070f502df305d75bcfa23d9

diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx
index 60efad6..b3cb9c9 100644
--- a/sw/inc/SwStyleNameMapper.hxx
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -76,7 +76,8 @@
 class String;
 struct SwTableEntry;
 
-typedef ::boost::unordered_map < const String*, sal_uInt16, StringHash, StringEq > NameToIdHash;
+typedef ::boost::unordered_map<const OUString, sal_uInt16, OUStringHash>
+    NameToIdHash;
 
 class SwStyleNameMapper
 {
@@ -85,7 +86,7 @@ class SwStyleNameMapper
 
 protected:
     // UI Name tables
-    static boost::ptr_vector<String> *pTextUINameArray,
+    static boost::ptr_vector<OUString> *pTextUINameArray,
                             *pListsUINameArray,
                             *pExtraUINameArray,
                             *pRegisterUINameArray,
@@ -149,42 +150,45 @@ public:
                                                     const OUString& rName);
 
     // This gets the PoolId from the UI Name
-    SW_DLLPUBLIC static sal_uInt16 GetPoolIdFromUIName( const String& rName, SwGetPoolIdFromName );
+    SW_DLLPUBLIC static sal_uInt16 GetPoolIdFromUIName(const OUString& rName,
+                                                       SwGetPoolIdFromName);
 
     // Get the Pool ID from the programmatic name
-    static sal_uInt16 GetPoolIdFromProgName( const String& rName, SwGetPoolIdFromName );
+    static sal_uInt16 GetPoolIdFromProgName(const OUString& rName,
+                                            SwGetPoolIdFromName);
 
     // used to convert the 4 special ExtraProg/UINames for
     // RES_POOLCOLL_LABEL_DRAWING,  RES_POOLCOLL_LABEL_ABB,
     // RES_POOLCOLL_LABEL_TABLE, RES_POOLCOLL_LABEL_FRAME
     // forth and back.
     // Non-matching names remain unchanged.
-    SW_DLLPUBLIC static const String GetSpecialExtraProgName( const String& rExtraUIName );
-    static const String GetSpecialExtraUIName( const String& rExtraProgName );
-
-    static const boost::ptr_vector<String>& GetTextUINameArray();
-    static const boost::ptr_vector<String>& GetListsUINameArray();
-    static const boost::ptr_vector<String>& GetExtraUINameArray();
-    static const boost::ptr_vector<String>& GetRegisterUINameArray();
-    static const boost::ptr_vector<String>& GetDocUINameArray();
-    static const boost::ptr_vector<String>& GetHTMLUINameArray();
-    static const boost::ptr_vector<String>& GetFrmFmtUINameArray();
-    static const boost::ptr_vector<String>& GetChrFmtUINameArray();
-    static const boost::ptr_vector<String>& GetHTMLChrFmtUINameArray();
-    static const boost::ptr_vector<String>& GetPageDescUINameArray();
-    static const boost::ptr_vector<String>& GetNumRuleUINameArray();
-
-    static const boost::ptr_vector<String>& GetTextProgNameArray();
-    static const boost::ptr_vector<String>& GetListsProgNameArray();
-    static const boost::ptr_vector<String>& GetExtraProgNameArray();
-    static const boost::ptr_vector<String>& GetRegisterProgNameArray();
-    static const boost::ptr_vector<String>& GetDocProgNameArray();
-    static const boost::ptr_vector<String>& GetHTMLProgNameArray();
-    static const boost::ptr_vector<String>& GetFrmFmtProgNameArray();
-    static const boost::ptr_vector<String>& GetChrFmtProgNameArray();
-    static const boost::ptr_vector<String>& GetHTMLChrFmtProgNameArray();
-    static const boost::ptr_vector<String>& GetPageDescProgNameArray();
-    static const boost::ptr_vector<String>& GetNumRuleProgNameArray();
+    SW_DLLPUBLIC static const OUString GetSpecialExtraProgName(
+                    const OUString& rExtraUIName);
+    static const OUString GetSpecialExtraUIName(const OUString& rExtraProgName);
+
+    static const boost::ptr_vector<OUString>& GetTextUINameArray();
+    static const boost::ptr_vector<OUString>& GetListsUINameArray();
+    static const boost::ptr_vector<OUString>& GetExtraUINameArray();
+    static const boost::ptr_vector<OUString>& GetRegisterUINameArray();
+    static const boost::ptr_vector<OUString>& GetDocUINameArray();
+    static const boost::ptr_vector<OUString>& GetHTMLUINameArray();
+    static const boost::ptr_vector<OUString>& GetFrmFmtUINameArray();
+    static const boost::ptr_vector<OUString>& GetChrFmtUINameArray();
+    static const boost::ptr_vector<OUString>& GetHTMLChrFmtUINameArray();
+    static const boost::ptr_vector<OUString>& GetPageDescUINameArray();
+    static const boost::ptr_vector<OUString>& GetNumRuleUINameArray();
+
+    static const boost::ptr_vector<OUString>& GetTextProgNameArray();
+    static const boost::ptr_vector<OUString>& GetListsProgNameArray();
+    static const boost::ptr_vector<OUString>& GetExtraProgNameArray();
+    static const boost::ptr_vector<OUString>& GetRegisterProgNameArray();
+    static const boost::ptr_vector<OUString>& GetDocProgNameArray();
+    static const boost::ptr_vector<OUString>& GetHTMLProgNameArray();
+    static const boost::ptr_vector<OUString>& GetFrmFmtProgNameArray();
+    static const boost::ptr_vector<OUString>& GetChrFmtProgNameArray();
+    static const boost::ptr_vector<OUString>& GetHTMLChrFmtProgNameArray();
+    static const boost::ptr_vector<OUString>& GetPageDescProgNameArray();
+    static const boost::ptr_vector<OUString>& GetNumRuleProgNameArray();
 };
 #endif // _NAME_MAPPER_HXX
 
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 900bbbc..da2d0d1 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -156,7 +156,7 @@ class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
     sal_uInt16              nLastPos;
     sal_Bool                bFirstCalled;
 
-    void                AppendStyleList(const boost::ptr_vector<String>& rLst,
+    void                AppendStyleList(const boost::ptr_vector<OUString>& rLst,
                                         sal_Bool    bUsed,
                                         sal_Bool    bTestHidden,
                                         bool        bOnlyHidden,
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index adaf2da..7c1855a 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -27,7 +27,7 @@
 
 extern ResMgr* pSwResMgr;
 // Initialise UI names to 0
-boost::ptr_vector<String> *SwStyleNameMapper::pTextUINameArray = 0,
+boost::ptr_vector<OUString> *SwStyleNameMapper::pTextUINameArray = 0,
                 *SwStyleNameMapper::pListsUINameArray = 0,
                 *SwStyleNameMapper::pExtraUINameArray = 0,
                 *SwStyleNameMapper::pRegisterUINameArray = 0,
@@ -308,34 +308,37 @@ const struct SwTableEntry NumRuleProgNameTable [] =
 };
 #undef ENTRY
 
-boost::ptr_vector<String>* lcl_NewUINameArray( sal_uInt16 nStt, sal_uInt16 nEnd )
+static boost::ptr_vector<OUString>*
+lcl_NewUINameArray(sal_uInt16 nStt, sal_uInt16 const nEnd)
 {
-    boost::ptr_vector<String>* pNameArray = new boost::ptr_vector<String>;
+    boost::ptr_vector<OUString> *const pNameArray = new boost::ptr_vector<OUString>;
     pNameArray->reserve(nEnd - nStt);
     while( nStt < nEnd )
     {
         const ResId rRId( nStt, *pSwResMgr );
-        pNameArray->push_back(new String(rRId));
+        pNameArray->push_back(new OUString(rRId));
         ++nStt;
     }
     return pNameArray;
 }
 
-boost::ptr_vector<String>* lcl_NewProgNameArray( const SwTableEntry *pTable, sal_uInt8 nCount )
+static boost::ptr_vector<OUString>*
+lcl_NewProgNameArray(const SwTableEntry *pTable, sal_uInt8 const nCount)
 {
-    boost::ptr_vector<String>* pProgNameArray = new boost::ptr_vector<String>;
+    boost::ptr_vector<OUString> *const pProgNameArray = new boost::ptr_vector<OUString>;
     pProgNameArray->reserve(nCount);
     while (pTable->nLength)
     {
-        pProgNameArray->push_back(new String( pTable->pChar, pTable->nLength, RTL_TEXTENCODING_ASCII_US ));
+        pProgNameArray->push_back(new OUString(pTable->pChar, pTable->nLength, RTL_TEXTENCODING_ASCII_US));
         pTable++;
     }
     return pProgNameArray;
 }
 
-String lcl_GetSpecialExtraName( const String& rExtraName, const bool bIsUIName )
+static OUString
+lcl_GetSpecialExtraName(const OUString& rExtraName, const bool bIsUIName )
 {
-    const boost::ptr_vector<String>& rExtraArr = bIsUIName
+    const boost::ptr_vector<OUString>& rExtraArr = bIsUIName
         ? SwStyleNameMapper::GetExtraUINameArray()
         : SwStyleNameMapper::GetExtraProgNameArray();
     static const sal_uInt16 nIds[] =
@@ -359,10 +362,10 @@ String lcl_GetSpecialExtraName( const String& rExtraName, const bool bIsUIName )
     return rExtraName;
 }
 
-bool lcl_SuffixIsUser ( const String & rString )
+static bool lcl_SuffixIsUser(const OUString & rString)
 {
-    const sal_Unicode *pChar = rString.GetBuffer();
-    sal_Int32 nLen = rString.Len();
+    const sal_Unicode *pChar = rString.getStr();
+    sal_Int32 nLen = rString.getLength();
     bool bRet = false;
     if( nLen > 8 &&
         pChar[nLen-7] == ' ' &&
@@ -389,7 +392,7 @@ static void lcl_CheckSuffixAndDelete(OUString & rString)
 const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlags, bool bProgName )
 {
     NameToIdHash *pHash = 0;
-    const boost::ptr_vector<String> *pStrings;
+    const boost::ptr_vector<OUString> *pStrings;
 
     switch ( eFlags )
     {
@@ -409,22 +412,22 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
                                            RES_POOLCOLL_HTML_END - RES_POOLCOLL_HTML_BEGIN );
                 pStrings = bProgName ? &GetTextProgNameArray() : &GetTextUINameArray();
                 for ( nIndex = 0, nId = RES_POOLCOLL_TEXT_BEGIN ; nId < RES_POOLCOLL_TEXT_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 pStrings = bProgName ? &GetListsProgNameArray() : &GetListsUINameArray();
                 for ( nIndex = 0, nId = RES_POOLCOLL_LISTS_BEGIN ; nId < RES_POOLCOLL_LISTS_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 pStrings = bProgName ? &GetExtraProgNameArray() : &GetExtraUINameArray();
                 for ( nIndex = 0, nId = RES_POOLCOLL_EXTRA_BEGIN ; nId < RES_POOLCOLL_EXTRA_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 pStrings = bProgName ? &GetRegisterProgNameArray() : &GetRegisterUINameArray();
                 for ( nIndex = 0, nId = RES_POOLCOLL_REGISTER_BEGIN ; nId < RES_POOLCOLL_REGISTER_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 pStrings = bProgName ? &GetDocProgNameArray() : &GetDocUINameArray();
                 for ( nIndex = 0, nId = RES_POOLCOLL_DOC_BEGIN ; nId < RES_POOLCOLL_DOC_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 pStrings = bProgName ? &GetHTMLProgNameArray() : &GetHTMLUINameArray();
                 for ( nIndex = 0, nId = RES_POOLCOLL_HTML_BEGIN ; nId < RES_POOLCOLL_HTML_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
 
                 if ( bProgName )
                     pParaProgMap = pHash;
@@ -445,10 +448,10 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
                                            RES_POOLCHR_HTML_END - RES_POOLCHR_HTML_BEGIN );
                 pStrings = bProgName ? &GetChrFmtProgNameArray() : &GetChrFmtUINameArray();
                 for ( nIndex = 0, nId = RES_POOLCHR_NORMAL_BEGIN ; nId < RES_POOLCHR_NORMAL_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 pStrings = bProgName ? &GetHTMLChrFmtProgNameArray() : &GetHTMLChrFmtUINameArray();
                 for ( nIndex = 0, nId = RES_POOLCHR_HTML_BEGIN ; nId < RES_POOLCHR_HTML_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 if (bProgName )
                     pCharProgMap = pHash;
                 else
@@ -464,7 +467,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
                 pHash = new NameToIdHash ( RES_POOLFRM_END - RES_POOLFRM_BEGIN );
                 pStrings = bProgName ? &GetFrmFmtProgNameArray() : &GetFrmFmtUINameArray();
                 for ( sal_uInt16 nIndex=0,nId = RES_POOLFRM_BEGIN ; nId < RES_POOLFRM_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 if ( bProgName )
                     pFrameProgMap = pHash;
                 else
@@ -480,7 +483,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
                 pHash = new NameToIdHash ( RES_POOLPAGE_END - RES_POOLPAGE_BEGIN );
                 pStrings = bProgName ? &GetPageDescProgNameArray() : &GetPageDescUINameArray();
                 for ( sal_uInt16 nIndex=0,nId = RES_POOLPAGE_BEGIN ; nId < RES_POOLPAGE_END ; nId++,nIndex++ )
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 if ( bProgName )
                     pPageProgMap = pHash;
                 else
@@ -497,7 +500,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
                 pStrings = bProgName ? &GetNumRuleProgNameArray() : &GetNumRuleUINameArray();
                 for ( sal_uInt16 nIndex=0,nId = RES_POOLNUMRULE_BEGIN ; nId < RES_POOLNUMRULE_END ; nId++,nIndex++ )
                 {
-                    (*pHash)[&((*pStrings)[nIndex])] = nId;
+                    (*pHash)[((*pStrings)[nIndex])] = nId;
                 }
                 if ( bProgName )
                     pNumRuleProgMap = pHash;
@@ -515,7 +518,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
         {
             for ( sal_uInt16 nIndex = 0, nId = RES_POOLCOLL_TEXT_BEGIN ; nId < RES_POOLCOLL_TEXT_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -527,7 +530,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
             }
             for ( nIndex = 0, nId = RES_POOLCOLL_LISTS_BEGIN ; nId < RES_POOLCOLL_LISTS_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -539,7 +542,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
             }
             for ( nIndex = 0, nId = RES_POOLCOLL_EXTRA_BEGIN ; nId < RES_POOLCOLL_EXTRA_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -551,7 +554,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
             }
             for ( nIndex = 0, nId = RES_POOLCOLL_REGISTER_BEGIN ; nId < RES_POOLCOLL_REGISTER_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -563,7 +566,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
             }
             for ( nIndex = 0, nId = RES_POOLCOLL_DOC_BEGIN ; nId < RES_POOLCOLL_DOC_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -575,7 +578,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
             }
             for ( nIndex = 0, nId = RES_POOLCOLL_HTML_BEGIN ; nId < RES_POOLCOLL_HTML_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -589,7 +592,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
         {
             for ( sal_uInt16 nIndex = 0, nId = RES_POOLCHR_NORMAL_BEGIN ; nId < RES_POOLCHR_NORMAL_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -601,7 +604,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
             }
             for ( nIndex = 0, nId = RES_POOLCHR_HTML_BEGIN ; nId < RES_POOLCHR_HTML_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -615,7 +618,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
         {
             for ( sal_uInt16 nIndex=0,nId = RES_POOLFRM_BEGIN ; nId < RES_POOLFRM_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -629,7 +632,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
         {
             for ( sal_uInt16 nIndex=0,nId = RES_POOLPAGE_BEGIN ; nId < RES_POOLPAGE_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -643,7 +646,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
         {
             for ( sal_uInt16 nIndex=0,nId = RES_POOLNUMRULE_BEGIN ; nId < RES_POOLNUMRULE_END ; nId++,nIndex++ )
             {
-                String aString, bString;
+                OUString aString, bString;
                 FillUIName ( nId, aString );
                 bString = GetProgName ( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, aString );
                 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
@@ -729,7 +732,7 @@ const OUString& SwStyleNameMapper::getNameFromId(
         sal_uInt16 const nId, const OUString& rFillName, bool const bProgName)
 {
     sal_uInt16 nStt = 0;
-    const boost::ptr_vector<String>* pStrArr = 0;
+    const boost::ptr_vector<OUString>* pStrArr = 0;
 
     switch( (USER_FMT | COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID) & nId )
     {
@@ -809,8 +812,7 @@ const OUString& SwStyleNameMapper::getNameFromId(
         }
         break;
     }
-    //FIXME
-    return pStrArr ? reinterpret_cast<OUString const&>(pStrArr->operator[](nId - nStt)) : rFillName;
+    return pStrArr ? pStrArr->operator[](nId - nStt) : rFillName;
 }
 
 void SwStyleNameMapper::fillNameFromId(
@@ -843,21 +845,23 @@ SwStyleNameMapper::GetProgName(sal_uInt16 const nId, const OUString& rName)
     return getNameFromId(nId, rName, true);
 }
 // This gets the PoolId from the UI Name
-sal_uInt16 SwStyleNameMapper::GetPoolIdFromUIName( const String& rName, SwGetPoolIdFromName eFlags )
+sal_uInt16 SwStyleNameMapper::GetPoolIdFromUIName(
+        const OUString& rName, SwGetPoolIdFromName const eFlags)
 {
     const NameToIdHash & rHashMap = getHashTable ( eFlags, false );
-    NameToIdHash::const_iterator aIter = rHashMap.find ( &rName );
+    NameToIdHash::const_iterator aIter = rHashMap.find(rName);
     return aIter != rHashMap.end() ? (*aIter).second : USHRT_MAX;
 }
 // Get the Pool ID from the programmatic name
-sal_uInt16 SwStyleNameMapper::GetPoolIdFromProgName( const String& rName, SwGetPoolIdFromName eFlags )
+sal_uInt16 SwStyleNameMapper::GetPoolIdFromProgName(
+            const OUString& rName, SwGetPoolIdFromName const eFlags)
 {
     const NameToIdHash & rHashMap = getHashTable ( eFlags, true );
-    NameToIdHash::const_iterator aIter = rHashMap.find ( &rName );
+    NameToIdHash::const_iterator aIter = rHashMap.find(rName);
     return aIter != rHashMap.end() ? (*aIter).second : USHRT_MAX;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetTextUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetTextUINameArray()
 {
     if (!pTextUINameArray)
         pTextUINameArray = lcl_NewUINameArray( RC_POOLCOLL_TEXT_BEGIN,
@@ -865,7 +869,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetTextUINameArray()
     return *pTextUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetListsUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetListsUINameArray()
 {
     if (!pListsUINameArray)
         pListsUINameArray = lcl_NewUINameArray( RC_POOLCOLL_LISTS_BEGIN,
@@ -873,7 +877,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetListsUINameArray()
     return *pListsUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetExtraUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetExtraUINameArray()
 {
     if (!pExtraUINameArray)
         pExtraUINameArray = lcl_NewUINameArray( RC_POOLCOLL_EXTRA_BEGIN,
@@ -881,7 +885,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetExtraUINameArray()
     return *pExtraUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetRegisterUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetRegisterUINameArray()
 {
     if (!pRegisterUINameArray)
         pRegisterUINameArray = lcl_NewUINameArray( RC_POOLCOLL_REGISTER_BEGIN,
@@ -889,7 +893,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetRegisterUINameArray()
     return *pRegisterUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetDocUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetDocUINameArray()
 {
     if (!pDocUINameArray)
         pDocUINameArray = lcl_NewUINameArray( RC_POOLCOLL_DOC_BEGIN,
@@ -897,7 +901,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetDocUINameArray()
     return *pDocUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetHTMLUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLUINameArray()
 {
     if (!pHTMLUINameArray)
         pHTMLUINameArray = lcl_NewUINameArray( RC_POOLCOLL_HTML_BEGIN,
@@ -905,7 +909,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetHTMLUINameArray()
     return *pHTMLUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetFrmFmtUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetFrmFmtUINameArray()
 {
     if (!pFrmFmtUINameArray)
         pFrmFmtUINameArray = lcl_NewUINameArray( RC_POOLFRMFMT_BEGIN,
@@ -913,7 +917,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetFrmFmtUINameArray()
     return *pFrmFmtUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetChrFmtUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetChrFmtUINameArray()
 {
     if (!pChrFmtUINameArray)
         pChrFmtUINameArray = lcl_NewUINameArray( RC_POOLCHRFMT_BEGIN,
@@ -921,7 +925,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetChrFmtUINameArray()
     return *pChrFmtUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetHTMLChrFmtUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLChrFmtUINameArray()
 {
     if (!pHTMLChrFmtUINameArray)
         pHTMLChrFmtUINameArray = lcl_NewUINameArray( RC_POOLCHRFMT_HTML_BEGIN,
@@ -929,7 +933,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetHTMLChrFmtUINameArray()
     return *pHTMLChrFmtUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetPageDescUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetPageDescUINameArray()
 {
     if (!pPageDescUINameArray)
         pPageDescUINameArray = lcl_NewUINameArray( RC_POOLPAGEDESC_BEGIN,
@@ -937,7 +941,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetPageDescUINameArray()
     return *pPageDescUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetNumRuleUINameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetNumRuleUINameArray()
 {
     if (!pNumRuleUINameArray)
         pNumRuleUINameArray = lcl_NewUINameArray( RC_POOLNUMRULE_BEGIN,
@@ -945,7 +949,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetNumRuleUINameArray()
     return *pNumRuleUINameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetTextProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetTextProgNameArray()
 {
     if (!pTextProgNameArray)
         pTextProgNameArray = lcl_NewProgNameArray(TextProgNameTable,
@@ -953,7 +957,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetTextProgNameArray()
     return *pTextProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetListsProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetListsProgNameArray()
 {
     if (!pListsProgNameArray)
         pListsProgNameArray = lcl_NewProgNameArray( ListsProgNameTable,
@@ -961,7 +965,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetListsProgNameArray()
     return *pListsProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetExtraProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetExtraProgNameArray()
 {
     if (!pExtraProgNameArray)
         pExtraProgNameArray = lcl_NewProgNameArray( ExtraProgNameTable,
@@ -969,7 +973,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetExtraProgNameArray()
     return *pExtraProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetRegisterProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetRegisterProgNameArray()
 {
     if (!pRegisterProgNameArray)
         pRegisterProgNameArray = lcl_NewProgNameArray( RegisterProgNameTable,
@@ -977,7 +981,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetRegisterProgNameArray()
     return *pRegisterProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetDocProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetDocProgNameArray()
 {
     if (!pDocProgNameArray)
         pDocProgNameArray = lcl_NewProgNameArray( DocProgNameTable,
@@ -985,7 +989,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetDocProgNameArray()
     return *pDocProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetHTMLProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLProgNameArray()
 {
     if (!pHTMLProgNameArray)
         pHTMLProgNameArray = lcl_NewProgNameArray( HTMLProgNameTable,
@@ -993,7 +997,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetHTMLProgNameArray()
     return *pHTMLProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetFrmFmtProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetFrmFmtProgNameArray()
 {
     if (!pFrmFmtProgNameArray)
         pFrmFmtProgNameArray = lcl_NewProgNameArray( FrmFmtProgNameTable,
@@ -1001,7 +1005,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetFrmFmtProgNameArray()
     return *pFrmFmtProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetChrFmtProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetChrFmtProgNameArray()
 {
     if (!pChrFmtProgNameArray)
         pChrFmtProgNameArray = lcl_NewProgNameArray( ChrFmtProgNameTable,
@@ -1009,7 +1013,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetChrFmtProgNameArray()
     return *pChrFmtProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetHTMLChrFmtProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetHTMLChrFmtProgNameArray()
 {
     if (!pHTMLChrFmtProgNameArray)
         pHTMLChrFmtProgNameArray = lcl_NewProgNameArray( HTMLChrFmtProgNameTable,
@@ -1017,7 +1021,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetHTMLChrFmtProgNameArray()
     return *pHTMLChrFmtProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetPageDescProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetPageDescProgNameArray()
 {
     if (!pPageDescProgNameArray)
         pPageDescProgNameArray = lcl_NewProgNameArray( PageDescProgNameTable,
@@ -1025,7 +1029,7 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetPageDescProgNameArray()
     return *pPageDescProgNameArray;
 }
 
-const boost::ptr_vector<String>& SwStyleNameMapper::GetNumRuleProgNameArray()
+const boost::ptr_vector<OUString>& SwStyleNameMapper::GetNumRuleProgNameArray()
 {
     if (!pNumRuleProgNameArray)
         pNumRuleProgNameArray = lcl_NewProgNameArray( NumRuleProgNameTable,
@@ -1034,12 +1038,14 @@ const boost::ptr_vector<String>& SwStyleNameMapper::GetNumRuleProgNameArray()
 }
 
 
-const String SwStyleNameMapper::GetSpecialExtraProgName( const String& rExtraUIName )
+const OUString
+SwStyleNameMapper::GetSpecialExtraProgName(const OUString& rExtraUIName)
 {
     return lcl_GetSpecialExtraName( rExtraUIName, true );
 }
 
-const String SwStyleNameMapper::GetSpecialExtraUIName( const String& rExtraProgName )
+const OUString
+SwStyleNameMapper::GetSpecialExtraUIName(const OUString& rExtraProgName)
 {
     return lcl_GetSpecialExtraName( rExtraProgName, false );
 }
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index a6e0554..44d99c7 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -565,8 +565,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
         bool bSetValue = true;
         if( rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_SUB_TYPE)))
         {
-            const boost::ptr_vector<String>& rExtraArr(SwStyleNameMapper::GetExtraUINameArray());
-            String sTypeName = pType->GetName();
+            const boost::ptr_vector<OUString>& rExtraArr(
+                    SwStyleNameMapper::GetExtraUINameArray());
+            OUString sTypeName = pType->GetName();
             static sal_uInt16 nIds[] =
             {
                 RES_POOLCOLL_LABEL_DRAWING - RES_POOLCOLL_EXTRA_BEGIN,
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index d7cea9f..7d3b56f 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -2477,8 +2477,8 @@ SfxStyleSheetBase*  SwStyleSheetIterator::First()
             }
 
             aLst.Append( cCHAR, pFmt == rDoc.GetDfltCharFmt()
-                        ? SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
-                                                RES_POOLCOLL_TEXT_BEGIN ]
+                        ? String(SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
+                                                RES_POOLCOLL_TEXT_BEGIN ])
                         : pFmt->GetName() );
         }
 
@@ -2810,7 +2810,7 @@ SfxStyleSheetBase*  SwStyleSheetIterator::Find(const OUString& rName)
     return 0;
 }
 
-void SwStyleSheetIterator::AppendStyleList(const boost::ptr_vector<String>& rList,
+void SwStyleSheetIterator::AppendStyleList(const boost::ptr_vector<OUString>& rList,
                                             sal_Bool bTestUsed, sal_Bool bTestHidden, bool bOnlyHidden,
                                             sal_uInt16 nSection, char cType )
 {
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 514f76d..7f438b8 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -297,7 +297,8 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
 
     // pool formats
     //
-    const boost::ptr_vector<String>& rFrmPoolArr(SwStyleNameMapper::GetFrmFmtUINameArray());
+    const boost::ptr_vector<OUString>& rFrmPoolArr(
+            SwStyleNameMapper::GetFrmFmtUINameArray());
     for( i = 0; i < rFrmPoolArr.size(); ++i )
     {
         aFormats.push_back(rFrmPoolArr[i]);
commit 8d4aafa7ce55c873fa55b11d4ffbfa409b412a92
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Aug 7 22:20:19 2013 +0200

    sw: turns out that SwComboBoxStyle stuff was not actually used
    
    Change-Id: I4e0e3832268e11a445391a99d52d099917bc8aec

diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index d66cebc..9860138 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -22,8 +22,6 @@
 #include <swtypes.hxx>
 #include <swlbox.hxx>
 
-using namespace nsSwComboBoxStyle;
-
 
 //     Description: ListboxElement
 SwBoxEntry::SwBoxEntry() :
@@ -49,16 +47,14 @@ SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
 {
 }
 
-SwComboBox::SwComboBox(Window* pParent, sal_uInt16 nStyleBits) :
-    ComboBox(pParent),
-    nStyle(nStyleBits)
+SwComboBox::SwComboBox(Window* pParent)
+    : ComboBox(pParent)
 {
     Init();
 }
 
-SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits) :
-    ComboBox(pParent, rId),
-    nStyle(nStyleBits)
+SwComboBox::SwComboBox(Window* pParent, const ResId& rId)
+    : ComboBox(pParent, rId)
 {
     Init();
 }
@@ -145,36 +141,4 @@ void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
     aEntryLst.insert( aEntryLst.begin() + nPos, pEntry );
 }
 
-void SwComboBox::KeyInput( const KeyEvent& rKEvt )
-{
-    sal_uInt16 nChar = rKEvt.GetCharCode();
-
-    if(nStyle & CBS_FILENAME)
-    {
-#if defined UNX
-        if(nChar == '/' || nChar == ' ' )
-            return;
-#else
-        if(nChar == ':' || nChar == '\\' || nChar == '.' || nChar == ' ')
-            return;
-#endif
-    }
-    ComboBox::KeyInput(rKEvt);
-}
-
-// Convert text according to option
-OUString SwComboBox::GetText() const
-{
-    OUString aTxt( ComboBox::GetText() );
-
-    if(nStyle & CBS_LOWER)
-        aTxt = GetAppCharClass().lowercase( aTxt );
-    else if( nStyle & CBS_UPPER )
-        aTxt = GetAppCharClass().uppercase( aTxt );
-
-    return aTxt;
-}
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index fe0b9af..1b8a02f 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -53,41 +53,23 @@ public:
 /*--------------------------------------------------------------------
      Description: for combo boxes
  --------------------------------------------------------------------*/
-typedef sal_uInt16 SwComboBoxStyle;
-
-namespace nsSwComboBoxStyle
-{
-    const SwComboBoxStyle CBS_UPPER         = 0x01;
-    const SwComboBoxStyle CBS_LOWER         = 0x02;
-    const SwComboBoxStyle CBS_ALL           = 0x04;
-    const SwComboBoxStyle CBS_FILENAME      = 0x08;
-    const SwComboBoxStyle CBS_SW_FILENAME   = CBS_FILENAME;
-}
 
 class SW_DLLPUBLIC SwComboBox : public ComboBox
 {
     SwEntryLst              aEntryLst;
     SwEntryLst              aDelEntryLst;
     SwBoxEntry              aDefault;
-    sal_uInt16                  nStyle;
 
     SW_DLLPRIVATE void InitComboBox();
     SW_DLLPRIVATE void InsertSorted(SwBoxEntry* pEntry);
     SW_DLLPRIVATE void Init();
 
-    using Window::GetStyle;
-    using Window::SetStyle;
-
 public:
 
-    SwComboBox(Window* pParent,
-               sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL);
-    SwComboBox(Window* pParent, const ResId& rId,
-               sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL);
+    SwComboBox(Window* pParent);
+    SwComboBox(Window* pParent, const ResId& rId);
     ~SwComboBox();
 
-    virtual void            KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE;
-
     void                    InsertSwEntry(const SwBoxEntry&);
     virtual sal_uInt16      InsertEntry(const OUString& rStr, sal_uInt16 = 0) SAL_OVERRIDE;
 
@@ -99,11 +81,6 @@ public:
     sal_uInt16                  GetRemovedCount() const;
     const SwBoxEntry&       GetRemovedEntry(sal_uInt16 nPos) const;
 
-    // FIXME ??? what is this
-    sal_uInt16                  GetSwStyle() const            { return nStyle;    }
-    void                    SetSwStyle(const sal_uInt16 nSt)  { nStyle = nSt;     }
-
-    OUString                GetText() const;
 };
 
 #endif /* _SWLBOX_HXX */
commit 03eb15938e04a8a28fc08ca7528b2f7068fe1c7a
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Aug 7 22:09:06 2013 +0200

    vcl, sw: fix the inheritance of SwComboBox from ComboBox a bit
    
    Remove the silly overloading, and introduce virtual methods.
    
    Change-Id: If54a6a3fb7464283f80d3387ae23db234690f8a3

diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index bb32586..7acaa5b 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -217,7 +217,7 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton )
         if ( pBrk )
         {
             delete m_aModifiedBreakPointList.remove( pBrk );
-            aComboBox.RemoveEntry( nEntry );
+            aComboBox.RemoveEntryAt(nEntry);
             if ( nEntry && !( nEntry < aComboBox.GetEntryCount() ) )
                 nEntry--;
             aComboBox.SetText( aComboBox.GetEntry( nEntry ) );
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index a1c3e1f..ff177e1 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -344,7 +344,7 @@ IMPL_LINK_NOARG(FmSearchDialog, OnClickedSearchAgain)
         // the remove/insert makes sure that a) the OUString does not appear twice and
         // that b) the last searched strings are at the beginning and limit the list length
         while (m_cmbSearchText.GetEntryCount() > MAX_HISTORY_ENTRIES)
-            m_cmbSearchText.RemoveEntry(m_cmbSearchText.GetEntryCount()-1);
+            m_cmbSearchText.RemoveEntryAt(m_cmbSearchText.GetEntryCount()-1);
 
         // take out the 'overflow' hint
         m_ftHint.SetText(OUString());
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index ba44cf2..3141081 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -542,7 +542,7 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, DelHdl_Impl)
     }
 
     // Delete Tab
-    m_pTabBox->RemoveEntry( nPos );
+    m_pTabBox->RemoveEntryAt(nPos);
     aNewTabs.Remove( nPos );
 
     // Reset aAktTab
diff --git a/dbaccess/source/ui/querydesign/LimitBox.cxx b/dbaccess/source/ui/querydesign/LimitBox.cxx
index 52f436e..688758f 100644
--- a/dbaccess/source/ui/querydesign/LimitBox.cxx
+++ b/dbaccess/source/ui/querydesign/LimitBox.cxx
@@ -84,7 +84,7 @@ void LimitBox::ReformatAll()
     ///First entry is All, which do not need numeric reformat
     if ( GetEntryCount() > 0 )
     {
-        RemoveEntry( 0 );
+        RemoveEntryAt( 0 );
         NumericBox::ReformatAll();
         InsertValue( ALL_INT, 0);
     }
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index de69836..cf3d228 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -350,7 +350,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
                 if ( rControlCommand.Arguments[i].Value >>= nPos )
                 {
                     if ( nPos < sal_Int32( m_pComboBox->GetEntryCount() ))
-                        m_pComboBox->RemoveEntry( sal_uInt16( nPos ));
+                        m_pComboBox->RemoveEntryAt(sal_uInt16(nPos));
                 }
                 break;
             }
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx
index aa19e9c..a4aed8d 100644
--- a/include/vcl/combobox.hxx
+++ b/include/vcl/combobox.hxx
@@ -128,11 +128,11 @@ public:
     virtual void    SetText( const OUString& rStr );
     virtual void    SetText( const OUString& rStr, const Selection& rNewSelection );
 
-    sal_uInt16      InsertEntry( const OUString& rStr, sal_uInt16 nPos = COMBOBOX_APPEND );
-    sal_uInt16      InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos = COMBOBOX_APPEND );
+    virtual sal_uInt16 InsertEntry(const OUString& rStr, sal_uInt16 nPos = COMBOBOX_APPEND);
+    void            InsertEntryWithImage( const OUString& rStr, const Image& rImage, sal_uInt16 nPos = COMBOBOX_APPEND );
 
     void            RemoveEntry( const OUString& rStr );
-    void            RemoveEntry( sal_uInt16 nPos );
+    virtual void    RemoveEntryAt(sal_uInt16 nPos);
 
     void            Clear();
 
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 74b5199..0b7b8f0 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -611,7 +611,7 @@ void ScFilterDlg::UpdateHdrInValueList( size_t nList )
     else                    // Omit entry
     {
         if (bWasThere)
-            pValList->RemoveEntry(nListPos);
+            pValList->RemoveEntryAt(nListPos);
     }
 }
 
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index ac78943..425bf57 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1043,7 +1043,7 @@ void SearchTabPage_Impl::RememberSearchText( const String& rSearchText )
     {
         if ( rSearchText == aSearchED.GetEntry(i) )
         {
-            aSearchED.RemoveEntry(i);
+            aSearchED.RemoveEntryAt(i);
             break;
         }
     }
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 7ed2528..66fb596 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -136,7 +136,7 @@ IMPL_LINK_NOARG(SearchDialog, FindHdl)
     String sSrchTxt = m_aSearchEdit.GetText();
     sal_uInt16 nPos = m_aSearchEdit.GetEntryPos( sSrchTxt );
     if ( nPos > 0 && nPos != COMBOBOX_ENTRY_NOTFOUND )
-        m_aSearchEdit.RemoveEntry( nPos );
+        m_aSearchEdit.RemoveEntryAt(nPos);
     if ( nPos > 0 )
         m_aSearchEdit.InsertEntry( sSrchTxt, 0 );
     m_aFindHdl.Call( this );
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 11d235e..6d7cf6c 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -1547,7 +1547,7 @@ void SvxSearchDialog::Remember_Impl( const String &rStr,sal_Bool _bSearch )
     // delete oldest entry at maximum occupancy (ListBox and Array)
     if(REMEMBER_SIZE < pArr->size())
     {
-        pListBox->RemoveEntry( sal_uInt16(REMEMBER_SIZE - 1) );
+        pListBox->RemoveEntryAt(static_cast<sal_uInt16>(REMEMBER_SIZE - 1));
         (*pArr)[REMEMBER_SIZE - 1] = rStr;
         pArr->erase(pArr->begin() + REMEMBER_SIZE - 1);
     }
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index ffca681..577e3e1 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -4550,7 +4550,7 @@ void SAL_CALL FmXComboBoxCell::removeItems( sal_Int16 _Pos, sal_Int16 _Count ) t
     if ( m_pComboBox )
     {
         for ( sal_uInt16 n = _Count; n; )
-            m_pComboBox->RemoveEntry( _Pos + (--n) );
+            m_pComboBox->RemoveEntryAt( _Pos + (--n) );
     }
 }
 
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 74a2abf..07cedc3 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -147,7 +147,7 @@ void FindTextFieldControl::Remember_Impl(const String& rStr)
     }
 
     if (nCount == REMEMBER_SIZE)
-        RemoveEntry(REMEMBER_SIZE-1);
+        RemoveEntryAt(REMEMBER_SIZE-1);
 
     InsertEntry(rStr, 0);
 }
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index c3694ef..d66cebc 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -79,19 +79,25 @@ SwComboBox::~SwComboBox()
 {
 }
 
-void SwComboBox::InsertEntry(const SwBoxEntry& rEntry)
+void SwComboBox::InsertSwEntry(const SwBoxEntry& rEntry)
 {
     InsertSorted(new SwBoxEntry(rEntry));
 }
 
-void SwComboBox::RemoveEntry(sal_uInt16 nPos)
+sal_uInt16 SwComboBox::InsertEntry(const OUString& rStr, sal_uInt16)
+{
+    InsertSwEntry(SwBoxEntry(rStr));
+    return 0;
+}
+
+void SwComboBox::RemoveEntryAt(sal_uInt16 const nPos)
 {
     if(nPos >= aEntryLst.size())
         return;
 
     // Remove old element
     SwBoxEntry* pEntry = &aEntryLst[nPos];
-    ComboBox::RemoveEntry(nPos);
+    ComboBox::RemoveEntryAt(nPos);
 
     // Don't add new entries to the list
     if(pEntry->bNew)
@@ -106,12 +112,12 @@ void SwComboBox::RemoveEntry(sal_uInt16 nPos)
     }
 }
 
-sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
+sal_uInt16 SwComboBox::GetSwEntryPos(const SwBoxEntry& rEntry) const
 {
     return ComboBox::GetEntryPos(rEntry.aName);
 }
 
-const SwBoxEntry& SwComboBox::GetEntry(sal_uInt16 nPos) const
+const SwBoxEntry& SwComboBox::GetSwEntry(sal_uInt16 const nPos) const
 {
     if(nPos < aEntryLst.size())
         return aEntryLst[nPos];
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 2b19c92..d3bc1a6 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -641,7 +641,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
         InsCaptionOpt* pOpt = (InsCaptionOpt*)pSelEntry->GetUserData();
 
         aCategoryBox.Clear();
-        aCategoryBox.InsertEntry(String(m_sNone)); //FIXME
+        aCategoryBox.InsertEntry(m_sNone);
         if (pSh)
         {
             sal_uInt16 nCount = pMgr->GetFldTypeCount();
@@ -651,15 +651,15 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
                 SwFieldType *pType = pMgr->GetFldType( USHRT_MAX, i );
                 if( pType->Which() == RES_SETEXPFLD &&
                     ((SwSetExpFieldType *) pType)->GetType() & nsSwGetSetExpType::GSE_SEQ )
-                    aCategoryBox.InsertEntry(SwBoxEntry(pType->GetName()));
+                    aCategoryBox.InsertSwEntry(SwBoxEntry(pType->GetName()));
             }
         }
         else
         {
-            aCategoryBox.InsertEntry(SwBoxEntry(m_sIllustration));
-            aCategoryBox.InsertEntry(SwBoxEntry(m_sTable));
-            aCategoryBox.InsertEntry(SwBoxEntry(m_sText));
-            aCategoryBox.InsertEntry(SwBoxEntry(m_sDrawing));
+            aCategoryBox.InsertSwEntry(SwBoxEntry(m_sIllustration));
+            aCategoryBox.InsertSwEntry(SwBoxEntry(m_sTable));
+            aCategoryBox.InsertSwEntry(SwBoxEntry(m_sText));
+            aCategoryBox.InsertSwEntry(SwBoxEntry(m_sDrawing));
         }
 
         if(pOpt->GetCategory().Len())
@@ -679,7 +679,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
                 case TABLE_CAP:         nPos = 2;   break;
                 case FRAME_CAP:         nPos = 3;   break;
             }
-            aCategoryBox.SetText(aCategoryBox.GetEntry(nPos).GetName());
+            aCategoryBox.SetText(aCategoryBox.GetSwEntry(nPos).GetName());
         }
 
         for (sal_uInt16 i = 0; i < aFormatBox.GetEntryCount(); i++)
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index 26b8e91..fe0b9af 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -75,36 +75,33 @@ class SW_DLLPUBLIC SwComboBox : public ComboBox
     SW_DLLPRIVATE void InsertSorted(SwBoxEntry* pEntry);
     SW_DLLPRIVATE void Init();
 
-    using ComboBox::InsertEntry;
-    using ComboBox::RemoveEntry;
+    using Window::GetStyle;
     using Window::SetStyle;
 
 public:
 
-    using ComboBox::GetEntryPos;
-
     SwComboBox(Window* pParent,
                sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL);
     SwComboBox(Window* pParent, const ResId& rId,
                sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL);
     ~SwComboBox();
 
-    virtual void            KeyInput( const KeyEvent& rKEvt );
+    virtual void            KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE;
 
-    void                    InsertEntry(const SwBoxEntry&);
-    sal_uInt16                  InsertEntry( const XubString& rStr, sal_uInt16 = 0)
-                            {        InsertEntry( SwBoxEntry( rStr ) ); return 0;    }
+    void                    InsertSwEntry(const SwBoxEntry&);
+    virtual sal_uInt16      InsertEntry(const OUString& rStr, sal_uInt16 = 0) SAL_OVERRIDE;
 
-    void                    RemoveEntry(sal_uInt16 nPos);
+    virtual void            RemoveEntryAt(sal_uInt16 nPos) SAL_OVERRIDE;
 
-    sal_uInt16                  GetEntryPos(const SwBoxEntry& rEntry) const;
-    const SwBoxEntry&       GetEntry(sal_uInt16) const;
+    sal_uInt16              GetSwEntryPos(const SwBoxEntry& rEntry) const;
+    const SwBoxEntry&       GetSwEntry(sal_uInt16) const;
 
     sal_uInt16                  GetRemovedCount() const;
     const SwBoxEntry&       GetRemovedEntry(sal_uInt16 nPos) const;
 
-    sal_uInt16                  GetStyle() const            { return nStyle;    }
-    void                    SetStyle(const sal_uInt16 nSt)  { nStyle = nSt;     }
+    // FIXME ??? what is this
+    sal_uInt16                  GetSwStyle() const            { return nStyle;    }
+    void                    SetSwStyle(const sal_uInt16 nSt)  { nStyle = nSt;     }
 
     OUString                GetText() const;
 };
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 1a520f7..245d164 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -75,7 +75,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl)
     // remove text marks from the ComboBox
 
     for (sal_uInt16 i = m_pBookmarkBox->GetSelectEntryCount(); i; i-- )
-        m_pBookmarkBox->RemoveEntry(m_pBookmarkBox->GetSelectEntryPos(i - 1));
+        m_pBookmarkBox->RemoveEntryAt(m_pBookmarkBox->GetSelectEntryPos(i - 1));
 
     m_pBookmarkBox->SetText(aEmptyStr);
     m_pDeleteBtn->Enable(sal_False);   // no further entries there
@@ -105,7 +105,8 @@ void SwInsertBookmarkDlg::Apply()
     // insert text mark
     SwBoxEntry  aTmpEntry(m_pBookmarkBox->GetText(), 0 );
 
-    if ( !m_pBookmarkBox->GetText().isEmpty() && (m_pBookmarkBox->GetEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND) )
+    if (!m_pBookmarkBox->GetText().isEmpty() &&
+        (m_pBookmarkBox->GetSwEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND))
     {
         String sEntry(comphelper::string::remove(m_pBookmarkBox->GetText(),
             m_pBookmarkBox->GetMultiSelectionSeparator()));
@@ -143,7 +144,10 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRe
         ++ppBookmark)
     {
         if(IDocumentMarkAccess::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark))
-            m_pBookmarkBox->InsertEntry( SwBoxEntry( ppBookmark->get()->GetName(), nId++ ) );
+        {
+            m_pBookmarkBox->InsertSwEntry(
+                    SwBoxEntry(ppBookmark->get()->GetName(), nId++));
+        }
     }
 
     sRemoveWarning = String(SW_RES(STR_REMOVE_WARNING));
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index aeff407..0323f6d 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -239,7 +239,7 @@ void SwView::SelectShell()
     }
     m_pLastTableFormat = pCurTableFmt;
 
-    //SEL_TBL and SEL_TBL_CELLS can be changed!
+    //SEL_TBL and SEL_TBL_CELLS can be ORed!
     int nNewSelectionType = (m_pWrtShell->GetSelectionType()
                                 & ~nsSelectionType::SEL_TBL_CELLS);
 
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 079b994..3f72467 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -4283,7 +4283,7 @@ void VCLXComboBox::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::
     if ( pBox )
     {
         for ( sal_uInt16 n = nCount; n; )
-            pBox->RemoveEntry( nPos + (--n) );
+            pBox->RemoveEntryAt( nPos + (--n) );
     }
 }
 
@@ -4553,7 +4553,7 @@ void SAL_CALL VCLXComboBox::listItemInserted( const ItemListEvent& i_rEvent ) th
     ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemInserted: no ComboBox?!" );
     ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= sal_Int32( pComboBox->GetEntryCount() ) ),
         "VCLXComboBox::listItemInserted: illegal (inconsistent) item position!" );
-    pComboBox->InsertEntry(
+    pComboBox->InsertEntryWithImage(
         i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : OUString(),
         i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : Image(),
         i_rEvent.ItemPosition );
@@ -4569,7 +4569,7 @@ void SAL_CALL VCLXComboBox::listItemRemoved( const ItemListEvent& i_rEvent ) thr
     ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pComboBox->GetEntryCount() ) ),
         "VCLXComboBox::listItemRemoved: illegal (inconsistent) item position!" );
 
-    pComboBox->RemoveEntry( i_rEvent.ItemPosition );
+    pComboBox->RemoveEntryAt( i_rEvent.ItemPosition );
 }
 
 void SAL_CALL VCLXComboBox::listItemModified( const ItemListEvent& i_rEvent ) throw (RuntimeException)
@@ -4587,8 +4587,8 @@ void SAL_CALL VCLXComboBox::listItemModified( const ItemListEvent& i_rEvent ) th
     const OUString sNewText = i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : OUString( pComboBox->GetEntry( i_rEvent.ItemPosition ) );
     const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : pComboBox->GetEntryImage( i_rEvent.ItemPosition  ) );
 
-    pComboBox->RemoveEntry( i_rEvent.ItemPosition );
-    pComboBox->InsertEntry( sNewText, aNewImage, i_rEvent.ItemPosition );
+    pComboBox->RemoveEntryAt( i_rEvent.ItemPosition );
+    pComboBox->InsertEntryWithImage(sNewText, aNewImage, i_rEvent.ItemPosition);
 }
 
 void SAL_CALL VCLXComboBox::allItemsRemoved( const EventObject& i_rEvent ) throw (RuntimeException)
@@ -4634,7 +4634,8 @@ void SAL_CALL VCLXComboBox::itemListChanged( const EventObject& i_rEvent ) throw
         {
             aLocalizationKey = xStringResourceResolver->resolveString(aLocalizationKey.copy( 1 ));
         }
-        pComboBox->InsertEntry( aLocalizationKey, lcl_getImageFromURL( aItems[i].Second ) );
+        pComboBox->InsertEntryWithImage(aLocalizationKey,
+                lcl_getImageFromURL(aItems[i].Second));
     }
 }
 void SAL_CALL VCLXComboBox::disposing( const EventObject& i_rEvent ) throw (RuntimeException)
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 77735c8..b46213d 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -921,7 +921,7 @@ void ComboBox::ImplUpdateFloatSelection()
 
 // -----------------------------------------------------------------------
 
-sal_uInt16 ComboBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
+sal_uInt16 ComboBox::InsertEntry(const OUString& rStr, sal_uInt16 const nPos)
 {
     sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
     nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
@@ -931,24 +931,24 @@ sal_uInt16 ComboBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
 
 // -----------------------------------------------------------------------
 
-sal_uInt16 ComboBox::InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos )
+void ComboBox::InsertEntryWithImage(
+        const OUString& rStr, const Image& rImage, sal_uInt16 const nPos)
 {
     sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
     nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
     CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
-    return nRealPos;
 }
 
 // -----------------------------------------------------------------------
 
 void ComboBox::RemoveEntry( const OUString& rStr )
 {
-    RemoveEntry( GetEntryPos( rStr ) );
+    RemoveEntryAt(GetEntryPos(rStr));
 }
 
 // -----------------------------------------------------------------------
 
-void ComboBox::RemoveEntry( sal_uInt16 nPos )
+void ComboBox::RemoveEntryAt(sal_uInt16 const nPos)
 {
     mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
     CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(nPos) );
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 32fda19..d7f3531 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -283,7 +283,7 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe
                 aText = pCombo->GetEntry( i );
                 void* pEntryData = pCombo->GetEntryData( i );
                 ImplUpdateSeparatorString( aText, rOldDecSep, rNewDecSep, rOldThSep, rNewThSep );
-                pCombo->RemoveEntry( i );
+                pCombo->RemoveEntryAt(i);
                 pCombo->InsertEntry( aText, i );
                 pCombo->SetEntryData( i, pEntryData );
             }
@@ -1089,7 +1089,7 @@ void NumericBox::ReformatAll()
     for ( sal_uInt16 i=0; i < nEntryCount; i++ )
     {
         ImplNumericReformat( GetEntry( i ), nValue, aStr );
-        RemoveEntry( i );
+        RemoveEntryAt(i);
         InsertEntry( aStr, i );
     }
     NumericFormatter::Reformat();
@@ -2026,7 +2026,7 @@ void MetricBox::ReformatAll()
     for ( sal_uInt16 i=0; i < nEntryCount; i++ )
     {
         ImplMetricReformat( GetEntry( i ), nValue, aStr );
-        RemoveEntry( i );
+        RemoveEntryAt(i);
         InsertEntry( aStr, i );
     }
     MetricFormatter::Reformat();
@@ -2409,7 +2409,7 @@ void CurrencyBox::ReformatAll()
     for ( sal_uInt16 i=0; i < nEntryCount; i++ )
     {
         ImplCurrencyReformat( GetEntry( i ), aStr );
-        RemoveEntry( i );
+        RemoveEntryAt(i);
         InsertEntry( aStr, i );
     }
     CurrencyFormatter::Reformat();
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index a7f2c44..7891e63 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -983,7 +983,7 @@ void PatternBox::ReformatAll()
     for ( sal_uInt16 i=0; i < nEntryCount; i++ )
     {
         aStr = ImplPatternReformat( GetEntry( i ), GetEditMask(), GetLiteralMask(), GetFormatFlags() );
-        RemoveEntry( i );
+        RemoveEntryAt(i);
         InsertEntry( aStr, i );
     }
     PatternFormatter::Reformat();
@@ -2157,7 +2157,7 @@ void DateBox::ReformatAll()
     for ( sal_uInt16 i=0; i < nEntryCount; i++ )
     {
         ImplDateReformat( GetEntry( i ), aStr, GetFieldSettings() );
-        RemoveEntry( i );
+        RemoveEntryAt(i);
         InsertEntry( aStr, i );
     }
     DateFormatter::Reformat();
@@ -3155,7 +3155,7 @@ void TimeBox::ReformatAll()
     for ( sal_uInt16 i=0; i < nEntryCount; i++ )
     {
         ImplTimeReformat( GetEntry( i ), aStr );
-        RemoveEntry( i );
+        RemoveEntryAt(i);
         InsertEntry( aStr, i );
     }
     TimeFormatter::Reformat();
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 14ace59..f944fb2 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -598,7 +598,7 @@ void LongCurrencyBox::ReformatAll()
         ImplLongCurrencyReformat( GetEntry( i ), mnMin, mnMax,
                                   GetDecimalDigits(), GetLocaleDataWrapper(),
                                   aStr, *this );
-        RemoveEntry( i );
+        RemoveEntryAt(i);
         InsertEntry( aStr, i );
     }
     LongCurrencyFormatter::Reformat();
commit af2d474ff9a91645043c1d4292891c313cceef5e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Aug 7 14:34:05 2013 +0200

    sw: convert SwCaptionOptPage to OUString
    
    Change-Id: Ibd54c1472a3f86a0799386e4cf5e929d73ac104d

diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index beb916e..2c08cca 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -161,7 +161,7 @@ sal_Bool SwCondCollPage::FillItemSet(SfxItemSet &rSet)
     SwCondCollItem aCondItem;
     for(sal_uInt16 i = 0; i < aStrArr.Count(); i++)
     {
-        String sEntry = aTbLinks.GetEntryText(i, 1);
+        OUString sEntry = aTbLinks.GetEntryText(i, 1);
         aCondItem.SetStyle( &sEntry, i);
     }
     rSet.Put(aCondItem);
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 312e56f..2b19c92 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -398,16 +398,16 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
     aCharStyleLB    (this, SW_RES(LB_CHARSTYLE  )),
     aApplyBorderCB  (this, SW_RES(CB_APPLYBORDER)),
 
-    sSWTable        (SW_RES(STR_TABLE           )),
-    sSWFrame        (SW_RES(STR_FRAME           )),
-    sSWGraphic      (SW_RES(STR_GRAPHIC         )),
-    sOLE            (SW_RES(STR_OLE             )),
+    m_sSWTable      (SW_RES(STR_TABLE           )),
+    m_sSWFrame      (SW_RES(STR_FRAME           )),
+    m_sSWGraphic    (SW_RES(STR_GRAPHIC         )),
+    m_sOLE          (SW_RES(STR_OLE             )),
 
-    sBegin          (SW_RESSTR(STR_BEGINNING            )),
-    sEnd            (SW_RESSTR(STR_END                  )),
-    sAbove          (SW_RESSTR(STR_ABOVE                )),
-    sBelow          (SW_RESSTR(STR_CP_BELOW             )),
-    sNone           (SW_RESSTR( STR_CATEGORY_NONE )),
+    m_sBegin        (SW_RESSTR(STR_BEGINNING            )),
+    m_sEnd          (SW_RESSTR(STR_END                  )),
+    m_sAbove        (SW_RESSTR(STR_ABOVE                )),
+    m_sBelow        (SW_RESSTR(STR_CP_BELOW             )),
+    m_sNone         (SW_RESSTR( STR_CATEGORY_NONE )),
 
     pMgr            (new SwFldMgr()),
     bHTMLMode(sal_False)
@@ -415,15 +415,10 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
     Wallpaper   aBack( GetSettings().GetStyleSettings().GetWindowColor() );
     aPreview.SetBackground( aBack );
 
-    OUString tmp1, tmp2, tmp3, tmp4; //FIXME
-    SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_ABB, tmp1);
-    SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_TABLE, tmp2);
-    SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_FRAME, tmp3);
-    SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_DRAWING, tmp4);
-    sIllustration = tmp1;
-    sTable = tmp2;
-    sText = tmp3;
-    sDrawing = tmp4;
+    SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_ABB, m_sIllustration);
+    SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_TABLE, m_sTable);
+    SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_FRAME, m_sText);
+    SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_DRAWING, m_sDrawing);
 
     sal_uInt16 i, nCount;
     SwWrtShell *pSh = ::GetActiveWrtShell();
@@ -548,11 +543,11 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
 
     // Writer objects
     sal_uInt16 nPos = 0;
-    aCheckLB.InsertEntry(sSWTable);
+    aCheckLB.InsertEntry(m_sSWTable);
     SetOptions(nPos++, TABLE_CAP);
-    aCheckLB.InsertEntry(sSWFrame);
+    aCheckLB.InsertEntry(m_sSWFrame);
     SetOptions(nPos++, FRAME_CAP);
-    aCheckLB.InsertEntry(sSWGraphic);
+    aCheckLB.InsertEntry(m_sSWGraphic);
     SetOptions(nPos++, GRAPHIC_CAP);
 
     // get Productname and -version
@@ -568,10 +563,11 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
     for ( sal_uLong i = 0; i < aObjS.Count(); ++i )
     {
         const SvGlobalName &rOleId = aObjS[i].GetClassName();
-        const String* pClassName = &aObjS[i].GetHumanName();
-        if ( rOleId == SvGlobalName( SO3_OUT_CLASSID ) )
-            pClassName = &sOLE;
-        String sClass( *pClassName );
+        String sClass;
+        if (rOleId == SvGlobalName(SO3_OUT_CLASSID))
+            sClass = aObjS[i].GetHumanName();
+        else
+            sClass = m_sOLE;
         // don't show product version
         sClass.SearchAndReplace( sComplete, sWithoutVersion );
         aCheckLB.InsertEntry( sClass );
@@ -645,7 +641,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
         InsCaptionOpt* pOpt = (InsCaptionOpt*)pSelEntry->GetUserData();
 
         aCategoryBox.Clear();
-        aCategoryBox.InsertEntry( sNone );
+        aCategoryBox.InsertEntry(String(m_sNone)); //FIXME
         if (pSh)
         {
             sal_uInt16 nCount = pMgr->GetFldTypeCount();
@@ -660,16 +656,16 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
         }
         else
         {
-            aCategoryBox.InsertEntry(SwBoxEntry(sIllustration));
-            aCategoryBox.InsertEntry(SwBoxEntry(sTable));
-            aCategoryBox.InsertEntry(SwBoxEntry(sText));
-            aCategoryBox.InsertEntry(SwBoxEntry(sDrawing));
+            aCategoryBox.InsertEntry(SwBoxEntry(m_sIllustration));
+            aCategoryBox.InsertEntry(SwBoxEntry(m_sTable));
+            aCategoryBox.InsertEntry(SwBoxEntry(m_sText));
+            aCategoryBox.InsertEntry(SwBoxEntry(m_sDrawing));
         }
 
         if(pOpt->GetCategory().Len())
             aCategoryBox.SetText(pOpt->GetCategory());
         else
-            aCategoryBox.SetText( sNone );
+            aCategoryBox.SetText(m_sNone);
         if (pOpt->GetCategory().Len() &&
             aCategoryBox.GetEntryPos(OUString(pOpt->GetCategory())) == COMBOBOX_ENTRY_NOTFOUND)
             aCategoryBox.InsertEntry(pOpt->GetCategory());
@@ -702,12 +698,12 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
             case GRAPHIC_CAP:
             case TABLE_CAP:
             case OLE_CAP:
-                aPosBox.InsertEntry(sAbove);
-                aPosBox.InsertEntry(sBelow);
+                aPosBox.InsertEntry(m_sAbove);
+                aPosBox.InsertEntry(m_sBelow);
                 break;
             case FRAME_CAP:
-                aPosBox.InsertEntry(sBegin);
-                aPosBox.InsertEntry(sEnd);
+                aPosBox.InsertEntry(m_sBegin);
+                aPosBox.InsertEntry(m_sEnd);
                 break;
         }
         aPosBox.SelectEntryPos(pOpt->GetPos());
@@ -752,7 +748,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
 
         pOpt->UseCaption() = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pEntry));
         String aName( aCategoryBox.GetText() );
-        if(aName == sNone)
+        if (aName == m_sNone)
             pOpt->SetCategory(aEmptyStr);
         else
             pOpt->SetCategory(comphelper::string::strip(aName, ' '));
@@ -780,7 +776,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl)
     PushButton *pBtn = pDlg ? pDlg->GetOKButton() : NULL;
     if (pBtn)
         pBtn->Enable(sFldTypeName.Len() != 0);
-    sal_Bool bEnable = aCategoryBox.IsEnabled() && sFldTypeName != sNone;
+    sal_Bool bEnable = aCategoryBox.IsEnabled() && sFldTypeName != m_sNone;
 
     aFormatText.Enable(bEnable);
     aFormatBox.Enable(bEnable);
@@ -819,7 +815,7 @@ void SwCaptionOptPage::DrawSample()
 {
     String aStr;
 
-    if( aCategoryBox.GetText() != OUString(sNone))
+    if( aCategoryBox.GetText() != m_sNone)
     {
         //#i61007# order of captions
         bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1;
diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx
index 293f357..a69dee8 100644
--- a/sw/source/ui/inc/optload.hxx
+++ b/sw/source/ui/inc/optload.hxx
@@ -134,22 +134,22 @@ private:
     ListBox         aCharStyleLB;
     CheckBox        aApplyBorderCB;
 
-    String          sSWTable;
-    String          sSWFrame;
-    String          sSWGraphic;
-    String          sOLE;
-
-    String          sIllustration;
-    String          sTable;
-    String          sText;
-    String          sDrawing;
-
-    String          sBegin;
-    String          sEnd;
-    String          sAbove;
-    String          sBelow;
-
-    String          sNone;
+    OUString        m_sSWTable;
+    OUString        m_sSWFrame;
+    OUString        m_sSWGraphic;
+    OUString        m_sOLE;
+
+    OUString        m_sIllustration;
+    OUString        m_sTable;
+    OUString        m_sText;
+    OUString        m_sDrawing;
+
+    OUString        m_sBegin;
+    OUString        m_sEnd;
+    OUString        m_sAbove;
+    OUString        m_sBelow;
+
+    OUString        m_sNone;
 
     SwFldMgr        *pMgr;
     bool            bHTMLMode;
commit 40b4567be2ea4aca90677167e0251cfd05385055
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Aug 7 14:07:33 2013 +0200

    sw: convert SwCondCollItem to OUString
    
    Change-Id: Id3efca3f1cb555ec995973b8a5bdd2a78318e18f

diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index 23d768c..6935b84 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -62,7 +62,7 @@ class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem
 {
     static const CommandStruct  aCmds[COND_COMMAND_COUNT];
 
-    String                      sStyles[COND_COMMAND_COUNT];
+    OUString                    m_sStyles[COND_COMMAND_COUNT];
 
 public:
     SwCondCollItem(sal_uInt16 nWhich = FN_COND_COLL);
@@ -75,8 +75,8 @@ public:
 
     static const CommandStruct* GetCmds();
 
-    const String&               GetStyle(sal_uInt16 nPos) const;
-    void                        SetStyle( const String* pStyle, sal_uInt16 nPos);
+    OUString            GetStyle(sal_uInt16 nPos) const;
+    void                SetStyle(const OUString* pStyle, sal_uInt16 nPos);
 
 };
 
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index f03bc5b..a098370 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1918,8 +1918,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
                         break;
                     }
 
-                    String tmp(aStyleName); //FIXME
-                    aCondItem.SetStyle( &tmp, nIdx);
+                    aCondItem.SetStyle(&aStyleName, nIdx);
                 }
                 else
                     bFailed = sal_True;
diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx
index a12d8d5..7968527 100644
--- a/sw/source/ui/chrdlg/ccoll.cxx
+++ b/sw/source/ui/chrdlg/ccoll.cxx
@@ -162,7 +162,8 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
     OSL_ENSURE( SfxPoolItem::operator==(rItem), "different types" );
     sal_Bool bReturn = sal_True;
     for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
-        if(sStyles[i] != ((SwCondCollItem&)rItem).sStyles[i])
+        if (m_sStyles[i] !=
+                static_cast<SwCondCollItem const&>(rItem).m_sStyles[i])
         {
             bReturn = sal_False;
             break;
@@ -171,15 +172,16 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
     return bReturn;
 }
 
-const String&   SwCondCollItem::GetStyle(sal_uInt16 nPos) const
+OUString SwCondCollItem::GetStyle(sal_uInt16 const nPos) const
 {
-    return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr;
+    return (nPos < COND_COMMAND_COUNT) ? m_sStyles[nPos] : OUString();
 }
 
-void SwCondCollItem::SetStyle(const String* pStyle, sal_uInt16 nPos)
+void
+SwCondCollItem::SetStyle(OUString const*const pStyle, sal_uInt16 const nPos)
 {
     if( nPos < COND_COMMAND_COUNT )
-        sStyles[nPos] = pStyle ? *pStyle : aEmptyStr;
+        m_sStyles[nPos] = (pStyle) ? *pStyle : OUString();
 }
 
 const CommandStruct* SwCondCollItem::GetCmds()
commit df7ffcdb022b0b30006aa8238ba4070eb4c64bd5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Aug 7 13:43:44 2013 +0200

    sw: convert some SwStyleNameMapper methods to OUString
    
    Change-Id: I151678b2bf155a7561b4c4e4b2d9fd1f05930477

diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx
index 1c3d512..60efad6 100644
--- a/sw/inc/SwStyleNameMapper.hxx
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -121,26 +121,32 @@ protected:
                             *pFrameProgMap,
                             *pNumRuleProgMap;
 
-    static void fillNameFromId ( sal_uInt16 nId, String &rName, bool bProgName );
-    static const String& getNameFromId ( sal_uInt16 nId, const String &rName, bool bProgName );
+    static void fillNameFromId(sal_uInt16 nId, OUString &rName, bool bProgName);
+    static const OUString& getNameFromId(sal_uInt16 nId, const OUString &rName,
+                                         bool bProgName);
     static const NameToIdHash& getHashTable ( SwGetPoolIdFromName, bool bProgName );
 
 public:
     // This gets the UI Name from the programmatic name
-    static const String& GetUIName ( const String& rName, SwGetPoolIdFromName );
-    static         void FillUIName ( const String& rName, String& rFillName, SwGetPoolIdFromName, bool bDisambiguate = false );
+    static const OUString& GetUIName(const OUString& rName, SwGetPoolIdFromName);
+    static         void FillUIName(const OUString& rName, OUString& rFillName,
+                            SwGetPoolIdFromName, bool bDisambiguate = false);
 
     // Get the programmatic Name from the UI name
-    static const String& GetProgName ( const String& rName, SwGetPoolIdFromName );
-    static         void FillProgName ( const String& rName, String& rFillName, SwGetPoolIdFromName, bool bDisambiguate = false );
+    static const OUString& GetProgName(const OUString& rName,
+                                       SwGetPoolIdFromName);
+    static         void FillProgName(const OUString& rName, OUString& rFillName,
+                            SwGetPoolIdFromName, bool bDisambiguate = false);
 
     // This gets the UI Name from the Pool ID
-    SW_DLLPUBLIC static          void FillUIName ( sal_uInt16 nId, String& rFillName );
-    SW_DLLPUBLIC static const String& GetUIName  ( sal_uInt16 nId, const String& rName );
+    SW_DLLPUBLIC static void FillUIName(sal_uInt16 nId, OUString& rFillName);
+    SW_DLLPUBLIC static const OUString& GetUIName(sal_uInt16 nId,
+                                                  const OUString& rName);
 
     // This gets the programmatic Name from the Pool ID
-    static          void FillProgName( sal_uInt16 nId, String& rFillName );
-    SW_DLLPUBLIC static const String& GetProgName ( sal_uInt16 nId, const String& rName );
+    static         void FillProgName(sal_uInt16 nId, OUString& rFillName);
+    SW_DLLPUBLIC static const OUString& GetProgName(sal_uInt16 nId,
+                                                    const OUString& rName);
 
     // This gets the PoolId from the UI Name
     SW_DLLPUBLIC static sal_uInt16 GetPoolIdFromUIName( const String& rName, SwGetPoolIdFromName );
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 486094b..adaf2da 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -376,11 +376,11 @@ bool lcl_SuffixIsUser ( const String & rString )
     return bRet;
 }
 
-void lcl_CheckSuffixAndDelete ( String & rString )
+static void lcl_CheckSuffixAndDelete(OUString & rString)
 {
     if (lcl_SuffixIsUser(rString))
     {
-        rString.Erase ( rString.Len() - 7, 7 );
+        rString = rString.copy(0, rString.getLength() - 7);
     }
 }
 
@@ -659,7 +659,8 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
     return *pHash;
 }
 // This gets the UI Name from the programmatic name
-const String& SwStyleNameMapper::GetUIName ( const String& rName, SwGetPoolIdFromName eFlags )
+const OUString& SwStyleNameMapper::GetUIName(const OUString& rName,
+                                             SwGetPoolIdFromName const eFlags)
 {
     sal_uInt16 nId = GetPoolIdFromProgName ( rName, eFlags );
     return nId != USHRT_MAX ? GetUIName( nId, rName ) : rName;
@@ -667,14 +668,17 @@ const String& SwStyleNameMapper::GetUIName ( const String& rName, SwGetPoolIdFro
 
 
 // Get the programmatic Name from the UI name
-const String& SwStyleNameMapper::GetProgName( const String& rName, SwGetPoolIdFromName eFlags )
+const OUString& SwStyleNameMapper::GetProgName(
+        const OUString& rName, SwGetPoolIdFromName const eFlags)
 {
     sal_uInt16 nId = GetPoolIdFromUIName ( rName, eFlags );
     return nId != USHRT_MAX ? GetProgName( nId, rName ) : rName;
 }
 
 // Get the programmatic name from the UI name in rName and put it into rFillName
-void SwStyleNameMapper::FillProgName ( const String& rName, String& rFillName, SwGetPoolIdFromName eFlags, bool bDisambiguate )
+void SwStyleNameMapper::FillProgName(
+        const OUString& rName, OUString& rFillName,
+        SwGetPoolIdFromName const eFlags, bool const bDisambiguate)
 {
     sal_uInt16 nId = GetPoolIdFromUIName ( rName, eFlags );
     if ( bDisambiguate && nId == USHRT_MAX )
@@ -687,23 +691,25 @@ void SwStyleNameMapper::FillProgName ( const String& rName, String& rFillName, S
         {
             // It isn't ...make sure the suffix isn't already " (user)"...if it is,
             // we need to add another one
-            if ( lcl_SuffixIsUser ( rFillName ) )
-                rFillName.AppendAscii ( RTL_CONSTASCII_STRINGPARAM ( " (user)" ) );
+            if (lcl_SuffixIsUser(rFillName))
+                rFillName += " (user)";
         }
         else
         {
             // It's in the programmatic name table...append suffix
-            rFillName.AppendAscii ( RTL_CONSTASCII_STRINGPARAM ( " (user)" ) );
+            rFillName += " (user)";
         }
     }
     else
     {
         // If we aren't trying to disambiguate, then just do a normal fill

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list