[PATCH] eliminate SvUShorts type

Daniel Di Marco d.dimarco at gmx.de
Sat Oct 29 04:24:48 PDT 2011


---
 cui/source/dialogs/iconcdlg.cxx    |   29 +++++++------------------
 cui/source/inc/cfg.hxx             |    3 --
 cui/source/inc/selector.hxx        |    3 --
 editeng/inc/editeng/svxrtf.hxx     |   16 ++++++--------
 editeng/source/rtf/rtfitem.cxx     |   16 +++++++-------
 editeng/source/rtf/svxrtf.cxx      |   31 +++++++++++++--------------
 fpicker/source/office/iodlgimp.hxx |    1 -
 sfx2/inc/sfx2/app.hxx              |    3 +-
 sfx2/inc/sfx2/dispatch.hxx         |    3 --
 sfx2/inc/sfx2/evntconf.hxx         |    2 -
 sfx2/inc/sfx2/macrconf.hxx         |    4 +--
 sfx2/source/appl/appmisc.cxx       |   12 +++++-----
 sfx2/source/appl/workwin.cxx       |   40 ++++++++++++++++++------------------
 sfx2/source/control/dispatch.cxx   |    6 ++--
 sfx2/source/control/macrconf.cxx   |    8 +++---
 sfx2/source/dialog/tabdlg.cxx      |   36 +++++++++----------------------
 sfx2/source/dialog/templdlg.cxx    |   12 +++++-----
 sfx2/source/doc/docvor.cxx         |   16 +++++---------
 sfx2/source/inc/appdata.hxx        |    4 +-
 sfx2/source/inc/templdgi.hxx       |    5 +---
 sfx2/source/inc/workwin.hxx        |    4 +--
 svl/inc/svl/svarray.hxx            |    1 -
 svl/inc/svl/svstdarr.hxx           |    6 -----
 svl/source/memtools/svarray.cxx    |    2 -
 svtools/inc/svtools/svparser.hxx   |    4 +-
 svtools/source/svrtf/svparser.cxx  |   12 +++++++---
 sw/inc/node.hxx                    |    1 -
 sw/source/core/docnode/ndtbl1.cxx  |   12 +++++-----
 sw/source/core/fields/expfld.cxx   |   10 ++++----
 sw/source/core/fields/reffld.cxx   |    4 +--
 sw/source/core/undo/untbl.cxx      |   12 +++++-----
 sw/source/filter/html/htmlform.cxx |   15 +++++++------
 sw/source/filter/html/htmltab.cxx  |   26 +++++++++++-----------
 sw/source/filter/html/svxcss1.cxx  |    6 ++--
 sw/source/filter/html/svxcss1.hxx  |    4 +-
 sw/source/filter/html/swhtml.cxx   |   24 ++++++++++----------
 sw/source/filter/html/swhtml.hxx   |    7 +----
 sw/source/filter/rtf/rtffly.cxx    |   18 ++++++++--------
 sw/source/filter/rtf/swparrtf.cxx  |   14 ++++++------
 sw/source/filter/ww8/wrtw8esh.cxx  |   12 +++++-----
 sw/source/filter/ww8/wrtww8.hxx    |    2 +-
 sw/source/ui/uiview/viewsrch.cxx   |   23 ++++++++++---------
 xmloff/inc/xmloff/xmlexppr.hxx     |    5 +--
 xmloff/source/style/xmlexppr.cxx   |   21 ++++++++----------
 44 files changed, 214 insertions(+), 281 deletions(-)

diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 51e9f1d..99e0c6d 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -30,8 +30,6 @@
 #include <tools/rc.h>
 #include <tools/shl.hxx>
 
-#define _SVSTDARR_USHORTS
-#include <svl/svstdarr.hxx>
 #include <dialmgr.hxx>
 
 #include "iconcdlg.hxx"
@@ -45,11 +43,6 @@
 
 using ::std::vector;
 
-int SAL_CALL IconcDlgCmpUS_Impl( const void* p1, const void* p2 )
-{
-    return *(sal_uInt16*)p1 - *(sal_uInt16*)p2;
-}
-
 // some stuff for easier changes for SvtViewOptions
 static const sal_Char*      pViewOptDataName = "dialog data";
 #define VIEWOPT_DATANAME    ::rtl::OUString::createFromAscii( pViewOptDataName )
@@ -962,7 +955,7 @@ const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool )
 
     if ( pRanges )
         return pRanges;
-    SvUShorts aUS( 16, 16 );
+    std::vector<sal_uInt16> aUS;
 
     size_t nCount = maPageList.size();
     for ( size_t i = 0; i < nCount; ++i )
@@ -976,32 +969,26 @@ const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool )
             sal_uInt16 nLen;
             for( nLen = 0; *pIter; ++nLen, ++pIter )
                 ;
-            aUS.Insert( pTmpRanges, nLen, aUS.Count() );
+            aUS.insert( aUS.end(), pTmpRanges, pTmpRanges + nLen );
         }
     }
 
     // remove double Id's
     {
-        nCount = aUS.Count();
+        nCount = aUS.size();
         for ( size_t i = 0; i < nCount; ++i )
             aUS[i] = rPool.GetWhich( aUS[i] );
     }
 
     // sortieren
-    if ( aUS.Count() > 1 )
+    if ( aUS.size() > 1 )
     {
-#if defined __SUNPRO_CC
-#pragma disable_warn
-#endif
-        qsort( (void*)aUS.GetData(), aUS.Count(), sizeof(sal_uInt16), IconcDlgCmpUS_Impl );
-#if defined __SUNPRO_CC
-#pragma enable_warn
-#endif
+        std::sort( aUS.begin(), aUS.end() );
     }
 
-    pRanges = new sal_uInt16[aUS.Count() + 1];
-    memcpy(pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count());
-    pRanges[aUS.Count()] = 0;
+    pRanges = new sal_uInt16[aUS.size() + 1];
+    std::copy( aUS.begin(), aUS.end(), pRanges );
+    pRanges[aUS.size()] = 0;
 
     return pRanges;
 }
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index dfcbc59..9bb95b6 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -49,9 +49,6 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
 
-#define _SVSTDARR_USHORTS
-#define _SVSTDARR_STRINGSDTOR
-#include <svl/svstdarr.hxx>     // SvUShorts
 #include <sfx2/minarray.hxx>
 #include <sfx2/tabdlg.hxx>
 #include <vector>
diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx
index 2959b0e..d7c6641 100644
--- a/cui/source/inc/selector.hxx
+++ b/cui/source/inc/selector.hxx
@@ -39,9 +39,6 @@
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/script/browse/XBrowseNode.hpp>
 
-#define _SVSTDARR_USHORTS
-#define _SVSTDARR_STRINGSDTOR
-#include <svl/svstdarr.hxx>     // SvUShorts
 #include <sfx2/minarray.hxx>
 
 #define SVX_CFGGROUP_FUNCTION 1
diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx
index f1e9321..125ce55 100644
--- a/editeng/inc/editeng/svxrtf.hxx
+++ b/editeng/inc/editeng/svxrtf.hxx
@@ -34,8 +34,6 @@
 #include <svl/itemset.hxx>
 #include <svtools/parrtf.hxx>
 
-#define _SVSTDARR_sal_uInt16S
-#include <svl/svstdarr.hxx>
 #include <editeng/editengdllapi.h>
 
 #include <deque>
@@ -231,9 +229,9 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser
     SvxRTFItemStack aAttrStack;
     SvxRTFItemStackList aAttrSetList;
 
-    SvUShorts aPlainMap;
-    SvUShorts aPardMap;
-    SvUShorts aWhichMap;
+    std::vector<sal_uInt16> aPlainMap;
+    std::vector<sal_uInt16> aPardMap;
+    std::vector<sal_uInt16> aWhichMap;
     String  sBaseURL;
 
     SvxPosition* pInsPos;
@@ -360,8 +358,8 @@ protected:
 
     // Query/Set the mapping IDs for the Pard/Plain attributes
     //(Set: It is noted in the pointers, which thus does not create a copy)
-    void AddPardAttr( sal_uInt16 nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); }
-    void AddPlainAttr( sal_uInt16 nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); }
+    void AddPardAttr( sal_uInt16 nWhich ) { aPardMap.push_back( nWhich ); }
+    void AddPlainAttr( sal_uInt16 nWhich ) { aPlainMap.push_back( nWhich ); }
 
     SvxRTFStyleTbl& GetStyleTbl()               { return aStyleTbl; }
     SvxRTFItemStack& GetAttrStack()             { return aAttrStack; }
@@ -393,9 +391,9 @@ public:
     void SetAttrPool( SfxItemPool* pNewPool )   { pAttrPool = pNewPool; }
     // to set different WhichIds for a different pool.
     RTFPardAttrMapIds& GetPardMap()
-                        { return (RTFPardAttrMapIds&)*aPardMap.GetData(); }
+                        { return (RTFPardAttrMapIds&)*aPardMap.begin(); }
     RTFPlainAttrMapIds& GetPlainMap()
-                        { return (RTFPlainAttrMapIds&)*aPlainMap.GetData(); }
+                        { return (RTFPlainAttrMapIds&)*aPlainMap.begin(); }
     // to be able to assign them from the outside as for example table cells
     void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False );
     void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False  );
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index d97c05b..2d9873a 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -109,14 +109,14 @@ inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_uInt16 nId,sa
 inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True)
     { return (const SvxULSpaceItem&)rSet.Get( nId,bInP); }
 
-#define PARDID      ((RTFPardAttrMapIds*)aPardMap.GetData())
-#define PLAINID     ((RTFPlainAttrMapIds*)aPlainMap.GetData())
+#define PARDID      ((RTFPardAttrMapIds*)&(*aPardMap.begin()))
+#define PLAINID     ((RTFPlainAttrMapIds*)&(*aPlainMap.begin()))
 
 void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
                                     SfxPoolItem& rItem )
 {
     const sal_uInt16 *pNormal = 0, *pCJK = 0, *pCTL = 0;
-    const RTFPlainAttrMapIds* pIds = (RTFPlainAttrMapIds*)aPlainMap.GetData();
+    const RTFPlainAttrMapIds* pIds = (RTFPlainAttrMapIds*)&(*aPlainMap.begin());
     switch( rItem.Which() )
     {
     case SID_ATTR_CHAR_FONT:
@@ -1761,13 +1761,13 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
             if( bPard )
             {
                 pAkt->nStyleNo = 0;
-                pPtr = aPardMap.GetData();
-                nCnt = aPardMap.Count();
+                pPtr = &(*aPardMap.begin());
+                nCnt = aPardMap.size();
             }
             else
             {
-                pPtr = aPlainMap.GetData();
-                nCnt = aPlainMap.Count();
+                pPtr = &(*aPlainMap.begin());
+                nCnt = aPlainMap.size();
             }
 
             for( sal_uInt16 n = 0; n < nCnt; ++n, ++pPtr )
@@ -1827,7 +1827,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
     if( !bNewDoc )
         return;
 
-    SfxItemSet aTmp( *pAttrPool, aWhichMap.GetData() );
+    SfxItemSet aTmp( *pAttrPool, &(*aWhichMap.begin()) );
     sal_Bool bOldFlag = bIsLeftToRightDef;
     bIsLeftToRightDef = sal_True;
     switch( nToken )
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index e249053..546a26d 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -94,13 +94,13 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn,
 
     {
         RTFPlainAttrMapIds aTmp( rPool );
-        aPlainMap.Insert( (sal_uInt16*)&aTmp,
-                    sizeof( RTFPlainAttrMapIds ) / sizeof(sal_uInt16), 0 );
+        aPlainMap.insert( aPlainMap.begin(), (sal_uInt16*)&aTmp,
+                (sal_uInt16*)&aTmp + (sizeof( RTFPlainAttrMapIds ) / sizeof(sal_uInt16)) );
     }
     {
         RTFPardAttrMapIds aTmp( rPool );
-        aPardMap.Insert( (sal_uInt16*)&aTmp,
-                    sizeof( RTFPardAttrMapIds ) / sizeof(sal_uInt16), 0 );
+        aPardMap.insert( aPardMap.begin(), (sal_uInt16*)&aTmp,
+                (sal_uInt16*)&aTmp + (sizeof( RTFPardAttrMapIds ) / sizeof(sal_uInt16)) );
     }
     pDfltFont = new Font;
     pDfltColor = new Color;
@@ -340,7 +340,7 @@ void SvxRTFParser::ReadStyleTable()
     int nToken, bSaveChkStyleAttr = bChkStyleAttr;
     short nStyleNo = 0;
     int _nOpenBrakets = 1;      // the first was already detected earlier!!
-    SvxRTFStyleType* pStyle = new SvxRTFStyleType( *pAttrPool, aWhichMap.GetData() );
+    SvxRTFStyleType* pStyle = new SvxRTFStyleType( *pAttrPool, &(*aWhichMap.begin()) );
     pStyle->aAttrSet.Put( GetRTFDefaults() );
 
     bIsInReadStyleTab = sal_True;
@@ -396,7 +396,7 @@ void SvxRTFParser::ReadStyleTable()
                 }
                 // All data from the font is available, so off to the table
                 aStyleTbl.Insert( nStyleNo, pStyle );
-                pStyle = new SvxRTFStyleType( *pAttrPool, aWhichMap.GetData() );
+                pStyle = new SvxRTFStyleType( *pAttrPool, &(*aWhichMap.begin()) );
                 pStyle->aAttrSet.Put( GetRTFDefaults() );
                 nStyleNo = 0;
             }
@@ -841,7 +841,7 @@ const Font& SvxRTFParser::GetFont( sal_uInt16 nId )
     {
         const SvxFontItem& rDfltFont = (const SvxFontItem&)
                         pAttrPool->GetDefaultItem(
-                    ((RTFPlainAttrMapIds*)aPlainMap.GetData())->nFont );
+                    ((RTFPlainAttrMapIds*)&(*aPlainMap.begin()))->nFont );
         pDfltFont->SetName( rDfltFont.GetStyleName() );
         pDfltFont->SetFamily( rDfltFont.GetFamily() );
         pFont = pDfltFont;
@@ -856,7 +856,7 @@ SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr )
     if( pAkt )
         pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, bCopyAttr );
     else
-        pNew = new SvxRTFItemStackType( *pAttrPool, aWhichMap.GetData(),
+        pNew = new SvxRTFItemStackType( *pAttrPool, &(*aWhichMap.begin()),
                                         *pInsPos );
     pNew->SetRTFDefaults( GetRTFDefaults() );
 
@@ -982,7 +982,7 @@ void SvxRTFParser::AttrGroupEnd()   // process the current, delete from Stack
                         pNew->aAttrSet.SetParent( pOld->aAttrSet.GetParent() );
 
                         // Delete all paragraph attributes from pNew
-                        for( sal_uInt16 n = 0; n < aPardMap.Count() &&
+                        for( sal_uInt16 n = 0; n < aPardMap.size() &&
                                             pNew->aAttrSet.Count(); ++n )
                             if( aPardMap[n] )
                                 pNew->aAttrSet.ClearItem( aPardMap[n] );
@@ -1132,24 +1132,23 @@ void SvxRTFParser::SetAttrInDoc( SvxRTFItemStackType & )
 
 void SvxRTFParser::BuildWhichTbl()
 {
-    if( aWhichMap.Count() )
-        aWhichMap.Remove( 0, aWhichMap.Count() );
-    aWhichMap.Insert( (sal_uInt16)0, (sal_uInt16)0 );
+    aWhichMap.clear();
+    aWhichMap.push_back( 0 );
 
     // Building a Which-Map 'rWhichMap' from an Array of
     // 'pWhichIds' frm Which-Ids. It has the long 'nWhichIds'.
     // The Which-Map is not going to be deleted.
-    SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)aPardMap.GetData(), aPardMap.Count() );
-    SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)aPlainMap.GetData(), aPlainMap.Count() );
+    SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)&(*aPardMap.begin()), aPardMap.size() );
+    SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)&(*aPlainMap.begin()), aPlainMap.size() );
 }
 
 const SfxItemSet& SvxRTFParser::GetRTFDefaults()
 {
     if( !pRTFDefaults )
     {
-        pRTFDefaults = new SfxItemSet( *pAttrPool, aWhichMap.GetData() );
+        pRTFDefaults = new SfxItemSet( *pAttrPool, &(*aWhichMap.begin()) );
         sal_uInt16 nId;
-        if( 0 != ( nId = ((RTFPardAttrMapIds*)aPardMap.GetData())->nScriptSpace ))
+        if( 0 != ( nId = ((RTFPardAttrMapIds*)&(*aPardMap.begin()))->nScriptSpace ))
         {
             SvxScriptSpaceItem aItem( sal_False, nId );
             if( bNewDoc )
diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx
index 2cc4f71..1048bc3 100644
--- a/fpicker/source/office/iodlgimp.hxx
+++ b/fpicker/source/office/iodlgimp.hxx
@@ -45,7 +45,6 @@ class Accelerator;
 class CheckBox;
 class SvtFileDialog;
 class SvStringsDtor;
-class SvUShorts;
 
 //*****************************************************************************
 
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 87c32f5..c255035 100644
--- a/sfx2/inc/sfx2/app.hxx
+++ b/sfx2/inc/sfx2/app.hxx
@@ -88,7 +88,6 @@ class SfxViewShellArr_Impl;
 class StarBASIC;
 class SfxWorkWindow;
 class SfxFilterMatcher;
-class SvUShorts;
 class SfxModule;
 class SfxModuleArr_Impl;
 class Window;
@@ -269,7 +268,7 @@ public:
     SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl(const SfxViewFrame *pFrame=0) const;
 
     // TODO/CLEANUP: still needed?
-    SAL_DLLPRIVATE SvUShorts*   GetDisabledSlotList_Impl();
+    SAL_DLLPRIVATE std::vector<sal_uInt16>* GetDisabledSlotList_Impl();
     SAL_DLLPRIVATE SfxSlotPool& GetAppSlotPool_Impl() const;
     SAL_DLLPRIVATE SfxModule*   GetModule_Impl();
     SAL_DLLPRIVATE ResMgr*      GetOffResManager_Impl();
diff --git a/sfx2/inc/sfx2/dispatch.hxx b/sfx2/inc/sfx2/dispatch.hxx
index 0ce4f2b..0591d1f 100644
--- a/sfx2/inc/sfx2/dispatch.hxx
+++ b/sfx2/inc/sfx2/dispatch.hxx
@@ -34,9 +34,6 @@
 
 #include <stdarg.h>
 
-#define _SVSTDARR_USHORTS
-#include <svl/svstdarr.hxx>     // SvUShorts
-
 #include <sfx2/bindings.hxx>
 #include <sfx2/viewfrm.hxx>
 
diff --git a/sfx2/inc/sfx2/evntconf.hxx b/sfx2/inc/sfx2/evntconf.hxx
index 89fef8d..5bb5f17 100644
--- a/sfx2/inc/sfx2/evntconf.hxx
+++ b/sfx2/inc/sfx2/evntconf.hxx
@@ -35,8 +35,6 @@
 #include <vcl/fixed.hxx>
 #include <vcl/button.hxx>
 
-#define _SVSTDARR_USHORTS
-#include <svl/svstdarr.hxx>     // SvUShorts
 #include <sfx2/event.hxx>
 
 #include <sfx2/sfxsids.hrc>
diff --git a/sfx2/inc/sfx2/macrconf.hxx b/sfx2/inc/sfx2/macrconf.hxx
index 60692b4..1957b11 100644
--- a/sfx2/inc/sfx2/macrconf.hxx
+++ b/sfx2/inc/sfx2/macrconf.hxx
@@ -32,8 +32,6 @@
 #include "sfx2/dllapi.h"
 #include "sal/types.h"
 #include <tools/errcode.hxx>
-#define _SVSTDARR_USHORTS
-#include <svl/svstdarr.hxx>     // SvUShorts
 #include <sfx2/evntconf.hxx>
 
 class SfxMacroInfo;
@@ -106,7 +104,7 @@ friend class SfxEventConfiguration;
     SAL_DLLPRIVATE static SfxMacroConfig* pMacroConfig;
 
     SfxMacroConfig_Impl*    pImp;
-    SvUShorts               aIdArray;
+    std::vector<sal_uInt16> aIdArray;
 
 public:
                             SfxMacroConfig();
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index fffecd3..2ada96e 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -170,10 +170,10 @@ SfxProgress* SfxApplication::GetProgress() const
 
 //------------------------------------------------------------------------
 
-SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
+std::vector<sal_uInt16>* SfxApplication::GetDisabledSlotList_Impl()
 {
     sal_Bool bError = sal_False;
-    SvUShorts* pList = pAppData_Impl->pDisabledSlotList;
+    std::vector<sal_uInt16>* pList = pAppData_Impl->pDisabledSlotList;
     if ( !pList )
     {
         // Is there a slot file?
@@ -200,13 +200,13 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
                 sal_uInt16 nCount;
                 (*pStream) >> nCount;
                 pList = pAppData_Impl->pDisabledSlotList =
-                        new SvUShorts( nCount < 255 ? (sal_Int8) nCount : 255, 255 );
+                        new std::vector<sal_uInt16>;
 
                 sal_uInt16 nSlot;
                 for ( sal_uInt16 n=0; n<nCount; n++ )
                 {
                     (*pStream) >> nSlot;
-                    pList->Insert( nSlot, n );
+                    pList->push_back( nSlot );
                 }
 
                 pStream->ReadByteString(aTitle);
@@ -231,13 +231,13 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
 
         delete pStream;
     }
-    else if ( pList == (SvUShorts*) -1L )
+    else if ( pList == (std::vector<sal_uInt16>*) -1L )
     {
         return NULL;
     }
 
     if ( !pList )
-        pAppData_Impl->pDisabledSlotList = (SvUShorts*) -1L;
+        pAppData_Impl->pDisabledSlotList = (std::vector<sal_uInt16>*) -1L;
 
     if ( bError )
     {
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index bdd2c41..2ea9a9f 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -516,18 +516,18 @@ sal_uInt16 ChildTravelValue( SfxChildAlignment eAlign )
 
 void SfxWorkWindow::Sort_Impl()
 {
-    aSortedList.Remove(0, aSortedList.Count());
+    aSortedList.clear();
     for (sal_uInt16 i=0; i<pChilds->Count(); i++)
     {
         SfxChild_Impl *pCli = (*pChilds)[i];
         if (pCli)
         {
             sal_uInt16 k;
-            for (k=0; k<aSortedList.Count(); k++)
+            for (k=0; k<aSortedList.size(); k++)
                 if (ChildAlignValue((*pChilds)[aSortedList[k]]->eAlign) >
                     ChildAlignValue(pCli->eAlign))
                     break;
-            aSortedList.Insert (i,k);
+            aSortedList.insert( aSortedList.begin() + k, i );
         }
     }
 
@@ -825,7 +825,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
     Size aSize;
     Rectangle aTmp( aClientArea );
 
-    for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n )
+    for ( sal_uInt16 n=0; n<aSortedList.size(); ++n )
     {
         SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
         if ( !pCli->pWin )
@@ -1786,7 +1786,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
 
     SfxChild_Impl *pChild = 0;
     sal_uInt16 n;
-    for ( n=0; n<aSortedList.Count(); ++n )
+    for ( n=0; n<aSortedList.size(); ++n )
     {
         pChild = (*pChilds)[aSortedList[n]];
         if ( pChild )
@@ -1794,7 +1794,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
             break;
     }
 
-    if ( n < aSortedList.Count() )
+    if ( n < aSortedList.size() )
         // sometimes called while toggeling float mode
         nPos = aSortedList[n];
 
@@ -1812,7 +1812,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
 
             // The current affected window is included in the calculation of
             // the inner rectangle!
-            for ( sal_uInt16 m=0; m<aSortedList.Count(); ++m )
+            for ( sal_uInt16 m=0; m<aSortedList.size(); ++m )
             {
                 sal_uInt16 i=aSortedList[m];
                 SfxChild_Impl* pCli = (*pChilds)[i];
@@ -2542,7 +2542,7 @@ void SfxWorkWindow::MakeChildsVisible_Impl( sal_Bool bVis )
     {
         if ( !bSorted )
             Sort_Impl();
-        for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n )
+        for ( sal_uInt16 n=0; n<aSortedList.size(); ++n )
         {
             SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
             if ( (pCli->eAlign == SFX_ALIGN_NOALIGNMENT) || (IsDockingAllowed() && bInternalDockingAllowed) )
@@ -2553,7 +2553,7 @@ void SfxWorkWindow::MakeChildsVisible_Impl( sal_Bool bVis )
     {
         if ( !bSorted )
             Sort_Impl();
-        for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n )
+        for ( sal_uInt16 n=0; n<aSortedList.size(); ++n )
         {
             SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
             pCli->nVisible &= ~CHILD_ACTIVE;
@@ -2761,37 +2761,37 @@ void SfxWorkWindow::SetActiveChild_Impl( Window *pChild )
 sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward )
 {
     // Sort all children under list
-    SvUShorts aList;
+    std::vector<sal_uInt16> aList;
     for ( sal_uInt16 i=SFX_OBJECTBAR_MAX; i<pChilds->Count(); i++)
     {
         SfxChild_Impl *pCli = (*pChilds)[i];
         if ( pCli && pCli->bCanGetFocus && pCli->pWin )
         {
             sal_uInt16 k;
-            for (k=0; k<aList.Count(); k++)
+            for (k=0; k<aList.size(); k++)
                 if ( ChildTravelValue((*pChilds)[aList[k]]->eAlign) > ChildTravelValue(pCli->eAlign) )
                     break;
-            aList.Insert(i,k);
+            aList.insert( aList.begin() + k, i );
         }
     }
 
-    if ( aList.Count() == 0 )
+    if ( aList.empty() )
         return sal_False;
 
     sal_uInt16 nTopValue  = ChildTravelValue( SFX_ALIGN_LOWESTTOP );
-    for ( sal_uInt16 i=0; i<aList.Count(); i++ )
+    for ( sal_uInt16 i=0; i<aList.size(); i++ )
     {
         SfxChild_Impl* pCli = (*pChilds)[aList[i]];
         if ( pCli->pWin && ChildTravelValue( pCli->eAlign ) > nTopValue )
             break;
     }
 
-    sal_uInt16 n = bForward ? 0 : aList.Count()-1;
+    sal_uInt16 n = bForward ? 0 : aList.size()-1;
     SfxChild_Impl *pAct=NULL;
     if ( pActiveChild )
     {
         // Look for the active window
-        for ( n=0; n<aList.Count(); n++ )
+        for ( n=0; n<aList.size(); n++ )
         {
             SfxChild_Impl* pCli = (*pChilds)[aList[n]];
             if ( pCli && pCli->pWin && ( pCli->pWin == pActiveChild || !pActiveChild ) )
@@ -2803,8 +2803,8 @@ sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward )
     }
 
     // dummy entries for the container window
-    aList.Insert( 0xFFFF, 0 );
-    aList.Insert( 0xFFFF, aList.Count() );
+    aList.insert( aList.begin(), 0xFFFF );
+    aList.push_back( 0xFFFF );
     n = n + 1;
     if ( pAct )
     {
@@ -2827,7 +2827,7 @@ sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward )
         else
             n = n-1;
 
-        if ( n == 0 || n == aList.Count()-1 )
+        if ( n == 0 || n == aList.size()-1 )
             return sal_False;
     }
 
@@ -2865,7 +2865,7 @@ sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward )
         else
             n = n-1;
 
-        if ( n == 0 || n == aList.Count()-1 )
+        if ( n == 0 || n == aList.size()-1 )
             break;
     }
 
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 5aa16e1..8df3b4a 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -164,7 +164,7 @@ struct SfxDispatcher_Impl
     sal_uInt16           nFilterCount;  // Number of SIDs in pFilterSIDs
     const sal_uInt16*    pFilterSIDs;   // sorted Array of SIDs
     sal_uInt16           nStandardMode; // ExecuteMode from PlugInDispatcher
-    SvUShorts*           pDisableList;
+    std::vector<sal_uInt16>* pDisableList;
     sal_uInt32           nDisableFlags;
 };
 
@@ -2498,8 +2498,8 @@ sal_Bool SfxDispatcher::IsAllowed
     }
 
     // BinSearch in the disable list
-    SvUShorts& rList = *pImp->pDisableList;
-    sal_uInt16 nCount = rList.Count();
+    std::vector<sal_uInt16>& rList = *pImp->pDisableList;
+    sal_uInt16 nCount = rList.size();
     sal_uInt16 nLow = 0, nMid = 0, nHigh;
     sal_Bool bFound = sal_False;
     nHigh = nCount - 1;
diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx
index 1464ffe..c02dc8f 100644
--- a/sfx2/source/control/macrconf.cxx
+++ b/sfx2/source/control/macrconf.cxx
@@ -447,7 +447,7 @@ sal_uInt16 SfxMacroConfig::GetSlotId(SfxMacroInfoPtr pInfo)
     if (i == nCount)
     {
         // Macro still unknown
-        nCount = aIdArray.Count();
+        nCount = aIdArray.size();
         sal_uInt16 n;
         for (n=0; n<nCount; n++) // Seearch for free SlotId
             if (aIdArray[n] > SID_MACRO_START + n)
@@ -456,7 +456,7 @@ sal_uInt16 SfxMacroConfig::GetSlotId(SfxMacroInfoPtr pInfo)
         sal_uInt16 nNewSlotId = SID_MACRO_START + n;
         if ( nNewSlotId > SID_MACRO_END )
             return 0;
-        aIdArray.Insert( SID_MACRO_START + n, n );
+        aIdArray.insert( aIdArray.begin() + n, SID_MACRO_START + n );
 
         SfxSlot *pNewSlot = new SfxSlot;
         pNewSlot->nSlotId = SID_MACRO_START + n;
@@ -531,12 +531,12 @@ void SfxMacroConfig::ReleaseSlotId(sal_uInt16 nId)
                 pImp->aArr.Remove(i);
 
                 // Release SlotId again
-                sal_uInt16 nIdCount = aIdArray.Count();
+                sal_uInt16 nIdCount = aIdArray.size();
                 for (sal_uInt16 n=0; n<nIdCount; n++)
                 {
                     if (aIdArray[n] == nId)
                     {
-                        aIdArray.Remove(n);
+                        aIdArray.erase( aIdArray.begin() + n );
                         break;
                     }
                 }
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 57e6013..fd2d1f1 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -31,12 +31,10 @@
 
 #include <limits.h>
 #include <stdlib.h>
+#include <algorithm>
 #include <vcl/msgbox.hxx>
 #include <unotools/viewoptions.hxx>
 
-#define _SVSTDARR_sal_uInt16S
-#include <svl/svstdarr.hxx>
-
 #include "appdata.hxx"
 #include "sfxtypes.hxx"
 #include <sfx2/minarray.hxx>
@@ -1453,19 +1451,6 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
 
 // -----------------------------------------------------------------------
 
-extern "C" int SAL_CALL TabDlgCmpUS_Impl( const void* p1, const void* p2 )
-
-/*  [Description]
-
-    Comparison function for qsort
-*/
-
-{
-    return *(sal_uInt16*)p1 - *(sal_uInt16*)p2;
-}
-
-// -----------------------------------------------------------------------
-
 void SfxTabDialog::ShowPage( sal_uInt16 nId )
 
 /*  [Description]
@@ -1509,7 +1494,7 @@ const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
 
     if ( pRanges )
         return pRanges;
-    SvUShorts aUS( 16, 16 );
+    std::vector<sal_uInt16> aUS;
     sal_uInt16 nCount = pImpl->pData->Count();
 
     sal_uInt16 i;
@@ -1525,26 +1510,27 @@ const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
             sal_uInt16 nLen;
             for( nLen = 0; *pIter; ++nLen, ++pIter )
                 ;
-            aUS.Insert( pTmpRanges, nLen, aUS.Count() );
+            aUS.insert( aUS.end(), pTmpRanges, pTmpRanges + nLen );
         }
     }
 
     //! Remove duplicated Ids?
     {
-        nCount = aUS.Count();
+        nCount = aUS.size();
 
         for ( i = 0; i < nCount; ++i )
             aUS[i] = rPool.GetWhich( aUS[i] );
     }
 
     // sort
-    if ( aUS.Count() > 1 )
-        qsort( (void*)aUS.GetData(),
-               aUS.Count(), sizeof(sal_uInt16), TabDlgCmpUS_Impl );
+    if ( aUS.size() > 1 )
+    {
+        std::sort( aUS.begin(), aUS.end() );
+    }
 
-    pRanges = new sal_uInt16[aUS.Count() + 1];
-    memcpy(pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count());
-    pRanges[aUS.Count()] = 0;
+    pRanges = new sal_uInt16[aUS.size() + 1];
+    std::copy( aUS.begin(), aUS.end(), pRanges );
+    pRanges[aUS.size()] = 0;
     return pRanges;
 }
 
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index df6f09d..c925248 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -2796,7 +2796,7 @@ void SfxTemplateCatalog_Impl::CheckItem(sal_uInt16 nMesId, sal_Bool /*bCheck*/)
     if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
         return;
     sal_uInt16 i;
-    for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ ) ;
+    for ( i = 0; i < aFamIds.size() && aFamIds[i] != nMesId; i++ ) ;
     aFamList.SelectEntryPos(i);
 }
 
@@ -2807,7 +2807,7 @@ sal_Bool SfxTemplateCatalog_Impl::IsCheckedItem(sal_uInt16 nMesId)
     if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
         return sal_False;
     sal_uInt16 i;
-    for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ )
+    for ( i = 0; i < aFamIds.size() && aFamIds[i] != nMesId; i++ )
         ;
     return aFamList.IsEntrySelected( String::CreateFromInt32(i) );
 }
@@ -2818,10 +2818,10 @@ sal_Bool SfxTemplateCatalog_Impl::IsCheckedItem(sal_uInt16 nMesId)
 void SfxTemplateCatalog_Impl::EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnable )
 {
     if ( !bEnable )
-        for ( sal_uInt16 nPos = aFamIds.Count(); nPos--; )
+        for ( sal_uInt16 nPos = aFamIds.size(); nPos--; )
             if ( aFamIds[ nPos ] == nId )
             {
-                aFamIds.Remove( nPos );
+                aFamIds.erase( aFamIds.begin() + nPos );
                 aFamList.RemoveEntry( nPos );
             }
 }
@@ -2831,13 +2831,13 @@ void SfxTemplateCatalog_Impl::InsertFamilyItem( sal_uInt16 nId, const SfxStyleFa
     if ( nId > SFX_STYLE_FAMILY_PSEUDO || nId < SFX_STYLE_FAMILY_CHAR )
         return;
     aFamList.InsertEntry( pItem->GetText(), 0 );
-    aFamIds.Insert( nId, 0 );
+    aFamIds.insert( aFamIds.begin(), nId );
 }
 
 void SfxTemplateCatalog_Impl::ClearFamilyList()
 {
     aFamList.Clear();
-    aFamIds.Remove( 0, aFamIds.Count() );
+    aFamIds.clear();
 }
 
 void SfxTemplateCatalog_Impl::PrepareDeleteAction()
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index 0f9609f..26b35dd 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -381,7 +381,7 @@ void ErrorDelete_Impl(Window *pParent, const String &rName, sal_Bool bFolder = s
 
 struct ImpPath_Impl
 {
-    SvUShorts   aUS;
+    std::vector<sal_uInt16> aUS;
     sal_uInt16      nRef;
 
     ImpPath_Impl();
@@ -390,7 +390,7 @@ struct ImpPath_Impl
 
 //-------------------------------------------------------------------------
 
-ImpPath_Impl::ImpPath_Impl() : aUS(5), nRef(1)
+ImpPath_Impl::ImpPath_Impl() : nRef(1)
 {
 }
 
@@ -398,14 +398,9 @@ ImpPath_Impl::ImpPath_Impl() : aUS(5), nRef(1)
 
 ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) :
 
-    aUS ( (sal_uInt8)rCopy.aUS.Count() ),
-    nRef( 1 )
+    aUS(rCopy.aUS), nRef( 1 )
 
 {
-    const sal_uInt16 nCount = rCopy.aUS.Count();
-
-    for ( sal_uInt16 i = 0; i < nCount; ++i )
-        aUS.Insert( rCopy.aUS[i], i );
 }
 
 //==========================================================================
@@ -442,7 +437,7 @@ public:
         if(!--pData->nRef)
             delete pData;
     }
-    sal_uInt16 Count() const { return pData->aUS.Count(); }
+    sal_uInt16 Count() const { return pData->aUS.size(); }
     sal_uInt16 operator[]( sal_uInt16 i ) const
     {
         return i < Count()? pData->aUS[i]: INDEX_IGNORE;
@@ -459,7 +454,8 @@ Path::Path(SvLBox *pBox, SvLBoxEntry *pEntry) :
         return;
     SvLBoxEntry *pParent = pBox->GetParent(pEntry);
     do {
-        pData->aUS.Insert((sal_uInt16)pBox->GetModel()->GetRelPos(pEntry), 0);
+        pData->aUS.insert(pData->aUS.begin(),
+                (sal_uInt16)pBox->GetModel()->GetRelPos(pEntry));
         if(0 == pParent)
             break;
         pEntry = pParent;
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index b807f5c..8783675 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -38,6 +38,7 @@
 #include <com/sun/star/frame/XModel.hpp>
 
 #include "bitset.hxx"
+#include <vector>
 
 class SfxApplication;
 class SvStrings;
@@ -50,7 +51,6 @@ class SfxMacroConfig;
 class SfxItemPool;
 class SfxInitLinkList;
 class SfxFilterMatcher;
-class SvUShorts;
 class ISfxTemplateCommon;
 class SfxFilterMatcher;
 class SfxStatusDispatcher;
@@ -124,7 +124,7 @@ public:
 
     // global pointers
     SfxItemPool*                        pPool;
-    SvUShorts*                          pDisabledSlotList;
+    std::vector<sal_uInt16>*            pDisabledSlotList;
     SvStrings*                          pSecureURLs;
     SvtSaveOptions*                     pSaveOptions;
     SvtUndoOptions*                     pUndoOptions;
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 45e00a2..ea797be 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -37,9 +37,6 @@ class SfxTemplateControllerItem;
 #include <svtools/svtreebx.hxx>
 #include <svl/eitem.hxx>
 
-#define _SVSTDARR_USHORTS
-#include <svl/svstdarr.hxx>     // SvUShorts
-
 #include <rsc/rscsfx.hxx>
 #include <tools/rtti.hxx>
 
@@ -344,7 +341,7 @@ private:
     HelpButton              aHelpBtn;
 
     SfxTemplateCatalog*     pReal;
-    SvUShorts               aFamIds;
+    std::vector<sal_uInt16> aFamIds;
     SfxModalDefParentHelper aHelper;
 
 protected:
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index eebc341..347147d 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -38,8 +38,6 @@
 #include <cppuhelper/weak.hxx>
 #include <cppuhelper/propshlp.hxx>
 
-#define _SVSTDARR_sal_uInt16S
-#include <svl/svstdarr.hxx>     // SvUShorts
 #include <rtl/ustring.hxx>
 #include <osl/mutex.hxx>
 
@@ -234,7 +232,7 @@ class SfxWorkWindow
     friend class LayoutManagerListener;
 
 protected:
-    SvUShorts               aSortedList;
+    std::vector<sal_uInt16> aSortedList;
     SfxStatBar_Impl         aStatBar;
     std::vector< SfxObjectBar_Impl > aObjBarList;
     Rectangle               aClientArea;
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index a0db903..4c8d077 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -81,7 +81,6 @@
 *           Sortierung mit Hilfe der Object-operatoren "<" und "=="
 *
 * JP 09.10.96:  vordefinierte Arrays:
-*   VarArr:     SvUShorts
 *   PtrArr:     SvStrings, SvStringsDtor
 *   SortArr:    SvStringsSort, SvStringsSortDtor,
 *               SvStringsISort, SvStringsISortDtor
diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index 9df5b4b..50349f4 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -32,7 +32,6 @@
 *   (die defines setzen sich aus "_SVSTDARR_" und dem Namen des Array
 *    ohne "Sv" zusammen)
 *
-*   VarArr:     SvUShorts
 *   PtrArr:     SvStrings, SvStringsDtor
 *   SortArr:    SvStringsSort, SvStringsSortDtor,
 *               SvStringsISort, SvStringsISortDtor,
@@ -42,11 +41,6 @@
 #include <svl/svarray.hxx>
 #include <deque>
 
-#ifndef _SVSTDARR_USHORTS_DECL
-SV_DECL_VARARR_VISIBILITY( SvUShorts, sal_uInt16, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_USHORTS_DECL
-#endif
-
 #include <tools/string.hxx>
 
 typedef String* StringPtr;
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index 7024640..95df58a 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -61,8 +61,6 @@ sal_uInt16 SvPtrarr::GetPos( const VoidPtr& aElement ) const
     return ( n >= nA ? USHRT_MAX : n );
 }
 
-SV_IMPL_VARARR( SvUShorts, sal_uInt16 )
-
 SV_IMPL_PTRARR( SvStrings, StringPtr )
 SV_IMPL_PTRARR( SvStringsDtor, StringPtr )
 SV_IMPL_OP_PTRARR_SORT( SvStringsSort, StringPtr )
diff --git a/svtools/inc/svtools/svparser.hxx b/svtools/inc/svtools/svparser.hxx
index b82a5a8..eac4a92 100644
--- a/svtools/inc/svtools/svparser.hxx
+++ b/svtools/inc/svtools/svparser.hxx
@@ -34,11 +34,11 @@
 #include <tools/ref.hxx>
 #include <rtl/textenc.h>
 #include <boost/utility.hpp>
+#include <vector>
 
 
 struct SvParser_Impl;
 class SvStream;
-class SvUShorts;
 
 enum SvParserState
 {
@@ -174,7 +174,7 @@ public:
     // Aufbau einer Which-Map 'rWhichMap' aus einem Array von
     // 'pWhichIds' von Which-Ids. Es hat die Lange 'nWhichIds'.
     // Die Which-Map wird nicht geloescht.
-    static void BuildWhichTbl( SvUShorts &rWhichMap,
+    static void BuildWhichTbl( std::vector<sal_uInt16> &rWhichMap,
                                sal_uInt16 *pWhichIds,
                                sal_uInt16 nWhichIds );
 };
diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index 9cb6ba8..84ebfa4 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -572,7 +572,7 @@ void SvParser::Continue( int )
 {
 }
 
-void SvParser::BuildWhichTbl( SvUShorts &rWhichMap,
+void SvParser::BuildWhichTbl( std::vector<sal_uInt16> &rWhichMap,
                               sal_uInt16 *pWhichIds,
                               sal_uInt16 nWhichIds )
 {
@@ -590,7 +590,7 @@ void SvParser::BuildWhichTbl( SvUShorts &rWhichMap,
                 if( *pWhichIds < rWhichMap[nOfs] - 1 )
                 {
                     // neuen Range davor
-                    rWhichMap.Insert( aNewRange, 2, nOfs );
+                    rWhichMap.insert( rWhichMap.begin() + nOfs, aNewRange, aNewRange + 2 );
                     bIns = sal_False;
                     break;
                 }
@@ -607,7 +607,8 @@ void SvParser::BuildWhichTbl( SvUShorts &rWhichMap,
                     {
                         // mit dem naechsten Bereich mergen
                         rWhichMap[nOfs+1] = rWhichMap[nOfs+3];
-                        rWhichMap.Remove( nOfs+2, 2 );
+                        rWhichMap.erase( rWhichMap.begin() + nOfs + 2,
+                                rWhichMap.begin() + nOfs + 4 );
                     }
                     else
                         // diesen Range nach oben erweitern
@@ -619,7 +620,10 @@ void SvParser::BuildWhichTbl( SvUShorts &rWhichMap,
 
             // einen Range hinten anhaengen
             if( bIns )
-                rWhichMap.Insert( aNewRange, 2, rWhichMap.Count()-1 );
+            {
+                rWhichMap.insert( rWhichMap.begin() + rWhichMap.size() - 1,
+                        aNewRange, aNewRange + 2 );
+            }
         }
 }
 
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 597f02e..1ad1555 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -47,7 +47,6 @@
 // forward declarations
 // ---------------------
 
-class SvUShorts;
 class SwCntntFrm;
 class SwCntntNode;
 class SwDoc;
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 5f66a3d..2067dd3 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1301,7 +1301,7 @@ sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell )
  *dieser erhalten, kleinere Wuensche werden ueberschrieben.
  */
 
-void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
+void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols &rCols,
                               const SwLayoutFrm *pCell, const SwLayoutFrm *pTab,
                               sal_Bool bWishValues )
 {
@@ -1361,7 +1361,7 @@ void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
  *                      schneidet wird der Minimalwert ermittelt.
  */
 
-void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
+void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols &rCols,
                            const SwLayoutFrm *pStart, const SwLayoutFrm *pEnd,
                            sal_Bool bWishValues )
 {
@@ -1471,14 +1471,14 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance )
         return;
 
     const sal_uInt8 nTmp = (sal_uInt8)Max( sal_uInt16(255), sal_uInt16(aTabCols.Count() + 1) );
-    SvUShorts aWish( nTmp, nTmp ),
+    std::vector<sal_uInt16> aWish( nTmp, nTmp ),
               aMins( nTmp, nTmp );
     sal_uInt16 i;
 
     for ( i = 0; i <= aTabCols.Count(); ++i )
     {
-        aWish.Insert( sal_uInt16(0), aWish.Count() );
-        aMins.Insert( sal_uInt16(0), aMins.Count() );
+        aWish.push_back( 0 );
+        aMins.push_back( 0 );
     }
     ::lcl_CalcColValues( aWish, aTabCols, pStart, pEnd, sal_True  );
 
@@ -1511,7 +1511,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance )
             }
         }
         nWish = nWish / nCnt;
-        for ( i = 0; i < aWish.Count(); ++i )
+        for ( i = 0; i < aWish.size(); ++i )
             if ( aWish[i] )
                 aWish[i] = nWish;
     }
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 76ab5fc..5d0305e 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -557,8 +557,8 @@ sal_uInt16 SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rFld )
     if( !GetDepends() || !(nsSwGetSetExpType::GSE_SEQ & nType) )
         return USHRT_MAX;
 
-extern void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
-    SvUShorts aArr( 64 );
+extern void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
+    std::vector<sal_uInt16> aArr;
 
     sal_uInt16 n;
 
@@ -577,18 +577,18 @@ extern void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos =
     sal_uInt16 nNum = rFld.GetSeqNumber();
     if( USHRT_MAX != nNum )
     {
-        for( n = 0; n < aArr.Count(); ++n )
+        for( n = 0; n < aArr.size(); ++n )
             if( aArr[ n ] > nNum )
                 return nNum;            // nicht vorhanden -> also benutzen
             else if( aArr[ n ] == nNum )
                 break;                  // schon vorhanden -> neue erzeugen
 
-        if( n == aArr.Count() )
+        if( n == aArr.size() )
             return nNum;            // nicht vorhanden -> also benutzen
     }
 
     // alle Nummern entsprechend geflag, also bestimme die richtige Nummer
-    for( n = 0; n < aArr.Count(); ++n )
+    for( n = 0; n < aArr.size(); ++n )
         if( n != aArr[ n ] )
             break;
 
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 17f0dd2..3b52849 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -30,8 +30,6 @@
 #include "precompiled_sw.hxx"
 
 
-#define _SVSTDARR_USHORTS
-#include <svl/svstdarr.hxx>
 #include <com/sun/star/text/ReferenceFieldPart.hpp>
 #include <com/sun/star/text/ReferenceFieldSource.hpp>
 #include <unotools/localedatawrapper.hxx>
@@ -80,7 +78,7 @@ using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::lang;
 using ::rtl::OUString;
 
-extern void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
+extern void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
 
 void lcl_GetLayTree( const SwFrm* pFrm, SvPtrarr& rArr )
 {
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 8f3563f..013566c 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -191,7 +191,7 @@ public:
     void CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl );
 };
 
-void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
+void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
 
 #if OSL_DEBUG_LEVEL > 1
 #include "shellio.hxx"
@@ -3175,21 +3175,21 @@ void SwUndoMergeTbl::SaveFormula( SwHistory& rHistory )
 
 //////////////////////////////////////////////////////////////////////////
 
-void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos )
+void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos )
 {
-    sal_uInt16 nO   = rArr.Count(), nM, nU = 0;
+    sal_uInt16 nO   = rArr.size(), nM, nU = 0;
     if( nO > 0 )
     {
         nO--;
         while( nU <= nO )
         {
             nM = nU + ( nO - nU ) / 2;
-            if( *(rArr.GetData() + nM) == nIdx )
+            if ( rArr[nM] == nIdx )
             {
                 OSL_FAIL( "Index already exists. This should never happen." );
                 return;
             }
-            if( *(rArr.GetData() + nM) < nIdx )
+            if( rArr[nM] < nIdx )
                 nU = nM + 1;
             else if( nM == 0 )
                 break;
@@ -3197,7 +3197,7 @@ void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos )
                 nO = nM - 1;
         }
     }
-    rArr.Insert( nIdx, nU );
+    rArr.insert( rArr.begin() + nU, nIdx );
     if( pInsPos )
         *pInsPos = nU;
 }
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index a6ef894..7fc9179 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -208,7 +208,7 @@ class SwHTMLForm_Impl
     String                      sText;
     SvStringsDtor               aStringList;
     SvStringsDtor               aValueList;
-    SvUShorts                   aSelectedList;
+    std::vector<sal_uInt16>     aSelectedList;
 
 public:
 
@@ -269,10 +269,10 @@ public:
         aValueList.DeleteAndDestroy( 0, aValueList.Count() );
     }
 
-    SvUShorts& GetSelectedList() { return aSelectedList; }
+    std::vector<sal_uInt16>& GetSelectedList() { return aSelectedList; }
     void EraseSelectedList()
     {
-        aSelectedList.Remove( 0, aSelectedList.Count() );
+        aSelectedList.clear();
     }
 
     SvKeyValueIterator *GetHeaderAttrs() const { return pHeaderAttrs; }
@@ -2544,12 +2544,12 @@ void SwHTMLParser::EndSelect()
         rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("ListSource")),
                                     aAny );
 
-        sal_uInt16 nSelCnt = pFormImpl->GetSelectedList().Count();
+        size_t nSelCnt = pFormImpl->GetSelectedList().size();
         if( !nSelCnt && 1 == nSelectEntryCnt && nEntryCnt )
         {
             // In einer DropDown-Listbox sollte immer ein Eintrag selektiert
             // sein.
-            pFormImpl->GetSelectedList().Insert( (sal_uInt16)0, (sal_uInt16)0 );
+            pFormImpl->GetSelectedList().insert( pFormImpl->GetSelectedList().begin(), 0 );
             nSelCnt = 1;
         }
         Sequence<sal_Int16> aSelList( (sal_Int32)nSelCnt );
@@ -2624,8 +2624,9 @@ void SwHTMLParser::InsertSelectOption()
     pFormImpl->GetStringList().Insert( new String( aEmptyStr ), nEntryCnt );
     pFormImpl->GetValueList().Insert( new String( aValue ), nEntryCnt );
     if( bLBEntrySelected )
-        pFormImpl->GetSelectedList().Insert( nEntryCnt,
-                                pFormImpl->GetSelectedList().Count() );
+    {
+        pFormImpl->GetSelectedList().push_back( nEntryCnt );
+    }
 }
 
 void SwHTMLParser::InsertSelectText()
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 17b5498..de92f07 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -398,7 +398,7 @@ class HTMLTable
     String aDir;
 
     SdrObjects *pResizeDrawObjs;// SDR objects
-    SvUShorts *pDrawObjPrcWidths;   // column of draw object and its rel. width
+    std::vector<sal_uInt16> *pDrawObjPrcWidths;   // column of draw object and its rel. width
 
     HTMLTableRows *pRows;           // table rows
     HTMLTableColumns *pColumns;     // table columns
@@ -2810,10 +2810,10 @@ void HTMLTable::RegisterDrawObject( SdrObject *pObj, sal_uInt8 nPrcWidth )
     pResizeDrawObjs->C40_INSERT( SdrObject, pObj, pResizeDrawObjs->Count() );
 
     if( !pDrawObjPrcWidths )
-        pDrawObjPrcWidths = new SvUShorts;
-    pDrawObjPrcWidths->Insert( nCurRow, pDrawObjPrcWidths->Count() );
-    pDrawObjPrcWidths->Insert( nCurCol, pDrawObjPrcWidths->Count() );
-    pDrawObjPrcWidths->Insert( (sal_uInt16)nPrcWidth, pDrawObjPrcWidths->Count() );
+        pDrawObjPrcWidths = new std::vector<sal_uInt16>;
+    pDrawObjPrcWidths->push_back( nCurRow );
+    pDrawObjPrcWidths->push_back( nCurCol );
+    pDrawObjPrcWidths->push_back( (sal_uInt16)nPrcWidth );
 }
 
 void HTMLTable::MakeParentContents()
@@ -3081,11 +3081,11 @@ _SectionSaveStruct::_SectionSaveStruct( SwHTMLParser& rParser ) :
 {
     // Font-Stacks einfrieren
     nBaseFontStMinSave = rParser.nBaseFontStMin;
-    rParser.nBaseFontStMin = rParser.aBaseFontStack.Count();
+    rParser.nBaseFontStMin = rParser.aBaseFontStack.size();
 
     nFontStMinSave = rParser.nFontStMin;
     nFontStHeadStartSave = rParser.nFontStHeadStart;
-    rParser.nFontStMin = rParser.aFontStack.Count();
+    rParser.nFontStMin = rParser.aFontStack.size();
 
     // Kontext-Stack einfrieren
     nContextStMinSave = rParser.nContextStMin;
@@ -3105,16 +3105,16 @@ void _SectionSaveStruct::Restore( SwHTMLParser& rParser )
 {
     // Font-Stacks wieder auftauen
     sal_uInt16 nMin = rParser.nBaseFontStMin;
-    if( rParser.aBaseFontStack.Count() > nMin )
-        rParser.aBaseFontStack.Remove( nMin,
-                                rParser.aBaseFontStack.Count() - nMin );
+    if( rParser.aBaseFontStack.size() > nMin )
+        rParser.aBaseFontStack.erase( rParser.aBaseFontStack.begin() + nMin,
+                rParser.aBaseFontStack.end() );
     rParser.nBaseFontStMin = nBaseFontStMinSave;
 
 
     nMin = rParser.nFontStMin;
-    if( rParser.aFontStack.Count() > nMin )
-        rParser.aFontStack.Remove( nMin,
-                            rParser.aFontStack.Count() - nMin );
+    if( rParser.aFontStack.size() > nMin )
+        rParser.aFontStack.erase( rParser.aFontStack.begin() + nMin,
+                rParser.aFontStack.end() );
     rParser.nFontStMin = nFontStMinSave;
     rParser.nFontStHeadStart = nFontStHeadStartSave;
 
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 8ad0742..ce7af4f 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -782,15 +782,15 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, sal_uI
     aItemIds.nLanguageCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, sal_False );
     aItemIds.nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False );
 
-    aWhichMap.Insert( (sal_uInt16)0, (sal_uInt16)0 );
+    aWhichMap.insert( aWhichMap.begin(), 0 );
     SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16 *)&aItemIds,
                              sizeof(aItemIds) / sizeof(sal_uInt16) );
     if( pWhichIds && nWhichIds )
         SvParser::BuildWhichTbl( aWhichMap, pWhichIds, nWhichIds );
 
-    pSheetItemSet = new SfxItemSet( rPool, aWhichMap.GetData() );
+    pSheetItemSet = new SfxItemSet( rPool, &(*aWhichMap.begin()) );
     pSheetPropInfo = new SvxCSS1PropertyInfo;
-    pSearchEntry = new SvxCSS1MapEntry( rPool, aWhichMap.GetData() );
+    pSearchEntry = new SvxCSS1MapEntry( rPool, &(*aWhichMap.begin()) );
 }
 
 SvxCSS1Parser::~SvxCSS1Parser()
diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx
index b90fcdf..5e18774 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -245,7 +245,7 @@ class SvxCSS1Parser : public CSS1Parser
     void ParseProperty( const String& rProperty,
                         const CSS1Expression *pExpr );
 
-    SvUShorts aWhichMap;        // Which-Map des Parser
+    std::vector<sal_uInt16> aWhichMap;        // Which-Map des Parser
 
     using CSS1Parser::ParseStyleOption;
 
@@ -310,7 +310,7 @@ public:
 
     virtual const FontList *GetFontList() const;
 
-    const sal_uInt16 *GetWhichMap() const { return aWhichMap.GetData(); }
+    const sal_uInt16 *GetWhichMap() const { return &(*aWhichMap.begin()); }
 
     void InsertMapEntry( const String& rKey, const SfxItemSet& rItemSet,
                          const SvxCSS1PropertyInfo& rProp, CSS1Map& rMap );
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 9a8d77a..29a4da1 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -3558,7 +3558,7 @@ void SwHTMLParser::NewBasefontAttr()
     PushContext( pCntxt );
 
     // die Font-Size merken
-    aBaseFontStack.Insert( nSize, aBaseFontStack.Count() );
+    aBaseFontStack.push_back( nSize );
 }
 
 void SwHTMLParser::EndBasefontAttr()
@@ -3566,19 +3566,19 @@ void SwHTMLParser::EndBasefontAttr()
     EndTag( HTML_BASEFONT_ON );
 
     // Stack-Unterlauf in Tabellen vermeiden
-    if( aBaseFontStack.Count() > nBaseFontStMin )
-        aBaseFontStack.Remove( aBaseFontStack.Count()-1, 1 );
+    if( aBaseFontStack.size() > nBaseFontStMin )
+        aBaseFontStack.erase( aBaseFontStack.begin() + aBaseFontStack.size() - 1 );
 }
 
 void SwHTMLParser::NewFontAttr( int nToken )
 {
     sal_uInt16 nBaseSize =
-        ( aBaseFontStack.Count() > nBaseFontStMin
-            ? (aBaseFontStack[aBaseFontStack.Count()-1] & FONTSIZE_MASK)
+        ( aBaseFontStack.size() > nBaseFontStMin
+            ? (aBaseFontStack[aBaseFontStack.size()-1] & FONTSIZE_MASK)
             : 3 );
     sal_uInt16 nFontSize =
-        ( aFontStack.Count() > nFontStMin
-            ? (aFontStack[aFontStack.Count()-1] & FONTSIZE_MASK)
+        ( aFontStack.size() > nFontStMin
+            ? (aFontStack[aFontStack.size()-1] & FONTSIZE_MASK)
             : nBaseSize );
 
     String aFace, aId, aStyle, aClass, aLang, aDir;
@@ -3653,7 +3653,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
         {
             // wenn die Schriftgroesse in der Ueberschrift noch
             // nicht veraendert ist, die aus der Vorlage nehmen
-            if( nFontStHeadStart==aFontStack.Count() )
+            if( nFontStHeadStart==aFontStack.size() )
                 nFontSize = static_cast< sal_uInt16 >(6 - (nPoolId - RES_POOLCOLL_HEADLINE1));
         }
         else
@@ -3786,7 +3786,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
     // den Kontext merken
     PushContext( pCntxt );
 
-    aFontStack.Insert( nSize, aFontStack.Count() );
+    aFontStack.push_back( nSize );
 }
 
 void SwHTMLParser::EndFontAttr( int nToken )
@@ -3794,8 +3794,8 @@ void SwHTMLParser::EndFontAttr( int nToken )
     EndTag( nToken );
 
     // Stack-Unterlauf in Tabellen vermeiden
-    if( aFontStack.Count() > nFontStMin )
-        aFontStack.Remove( aFontStack.Count()-1, 1 );
+    if( aFontStack.size() > nFontStMin )
+        aFontStack.erase( aFontStack.begin() + aFontStack.size() - 1 );
 }
 
 
@@ -4002,7 +4002,7 @@ void SwHTMLParser::NewHeading( int nToken )
     // und die Vorlage oder deren Attribute setzen
     SetTxtCollAttrs( pCntxt );
 
-    nFontStHeadStart = aFontStack.Count();
+    nFontStHeadStart = aFontStack.size();
 
     // Laufbalkenanzeige
     ShowStatline();
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 127f912..f218c36 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -33,9 +33,6 @@
 #ifndef _SVSTDARR_XUB_STRLEN_DECL
 #define _SVSTDARR_XUB_STRLEN
 #endif
-#ifndef _SVSTDARR_USHORTS_DECL
-#define _SVSTDARR_USHORTS
-#endif
 #ifndef _SVSTDARR_STRINGSDTOR_DECL
 #define _SVSTDARR_STRINGSDTOR
 #endif
@@ -394,9 +391,9 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
     String      aBulletGrfs[MAXLEVEL];
     String      sJmpMark;
 
-    SvUShorts   aBaseFontStack; // Stack fuer <BASEFONT>
+    std::vector<sal_uInt16>   aBaseFontStack; // Stack fuer <BASEFONT>
                                 // Bit 0-2: Fontgroesse (1-7)
-    SvUShorts   aFontStack;     // Stack fuer <FONT>, <BIG>, <SMALL>
+    std::vector<sal_uInt16>   aFontStack;     // Stack fuer <FONT>, <BIG>, <SMALL>
                                 // Bit 0-2: Fontgroesse (1-7)
                                 // Bit 15: Fontfarbe wurde gesetzt
 
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index fb5af60..e034679 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -559,7 +559,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
     SvxFrameDirectionItem aFrmDir( FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR );
 
     sal_uInt16 nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
-    SvUShorts aColumns;
+    std::vector<sal_uInt16> aColumns;
 
     sal_Bool bChkDropCap = 0 == pSet;
     sal_uInt16 nDropCapLines = 0, nDropCapAnchor = 0;
@@ -740,10 +740,10 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
                 else
                     SkipToken( -1 );        // wieder zurueck
 
-                if( --nAktCol == ( aColumns.Count() / 2 ) )
+                if( --nAktCol == ( aColumns.size() / 2 ) )
                 {
-                    aColumns.Insert( nWidth + nSpace, aColumns.Count() );
-                    aColumns.Insert( nSpace, aColumns.Count() );
+                    aColumns.push_back( nWidth + nSpace );
+                    aColumns.push_back( nSpace );
                 }
             }
             break;
@@ -858,10 +858,10 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
                             else
                                 SkipToken( -1 );        // wieder zurueck
 
-                            if( --nAktCol == ( aColumns.Count() / 2 ) )
+                            if( --nAktCol == ( aColumns.size() / 2 ) )
                             {
-                                aColumns.Insert( nWidth + nSpace, aColumns.Count() );
-                                aColumns.Insert( nSpace, aColumns.Count() );
+                                aColumns.push_back( nWidth + nSpace );
+                                aColumns.push_back( nSpace );
                             }
                         }
                         break;
@@ -961,9 +961,9 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
 
         sal_uLong nWidth = USHRT_MAX;
         aCol.Init( nCols, nColSpace, sal_uInt16( nWidth ) );
-        if( nCols == ( aColumns.Count() / 2 ) )
+        if( nCols == ( aColumns.size() / 2 ) )
         {
-            for( sal_uInt16 n = 0, i = 0; n < aColumns.Count(); n += 2, ++i )
+            for( sal_uInt16 n = 0, i = 0; n < aColumns.size(); n += 2, ++i )
             {
                 SwColumn* pCol = aCol.GetColumns()[ i ];
                 sal_uLong nTmp = aColumns[ n ];
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 6d7085c..38236e6 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -2762,7 +2762,7 @@ void SwRTFParser::MakeStyleTab()
 }
 
 sal_Bool lcl_SetFmtCol( SwFmt& rFmt, sal_uInt16 nCols, sal_uInt16 nColSpace,
-                    const SvUShorts& rColumns )
+                    const std::vector<sal_uInt16>& rColumns )
 {
     sal_Bool bSet = sal_False;
     if( nCols && USHRT_MAX != nCols )
@@ -2772,11 +2772,11 @@ sal_Bool lcl_SetFmtCol( SwFmt& rFmt, sal_uInt16 nCols, sal_uInt16 nColSpace,
             nColSpace = 720;
 
         aCol.Init( nCols, nColSpace, USHRT_MAX );
-        if( nCols == ( rColumns.Count() / 2 ) )
+        if( nCols == ( rColumns.size() / 2 ) )
         {
             aCol._SetOrtho( sal_False );
             sal_uInt16 nWishWidth = 0, nHalfPrev = 0;
-            for( sal_uInt16 n = 0, i = 0; n < rColumns.Count(); n += 2, ++i )
+            for( sal_uInt16 n = 0, i = 0; n < rColumns.size(); n += 2, ++i )
             {
                 SwColumn* pCol = aCol.GetColumns()[ i ];
                 pCol->SetLeft( nHalfPrev );
@@ -3262,7 +3262,7 @@ void SwRTFParser::ReadPageDescTbl()
     SvxFrameDirectionItem aFrmDir(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR);
 
     sal_uInt16 nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
-    SvUShorts aColumns;
+    std::vector<sal_uInt16> aColumns;
 
     while( nNumOpenBrakets && IsParserWorking() )
     {
@@ -3422,10 +3422,10 @@ void SwRTFParser::ReadPageDescTbl()
                 else
                     SkipToken( -1 );        // wieder zurueck
 
-                if( --nAktCol == ( aColumns.Count() / 2 ) )
+                if( --nAktCol == ( aColumns.size() / 2 ) )
                 {
-                    aColumns.Insert( nWidth, aColumns.Count() );
-                    aColumns.Insert( nSpace, aColumns.Count() );
+                    aColumns.push_back( nWidth );
+                    aColumns.push_back( nSpace );
                 }
             }
             break;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 5c1d220..e7bf299 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -874,7 +874,7 @@ void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar )
     // wird, dass am Absatzanfang sowieso die Attribute neu ausgegeben
     // werden.
     aChrTxtAtrArr.Remove( 0, aChrTxtAtrArr.Count() );
-    aChrSetArr.Remove( 0, aChrSetArr.Count() );
+    aChrSetArr.clear();
     nAktSwPos = nTmpSwPos = 0;
 
     SfxItemSet aSet( pEditObj->GetParaAttribs( nPara ));
@@ -892,8 +892,8 @@ void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar )
 
 rtl_TextEncoding MSWord_SdrAttrIter::GetNextCharSet() const
 {
-    if( aChrSetArr.Count() )
-        return (rtl_TextEncoding)aChrSetArr[ aChrSetArr.Count() - 1 ];
+    if( aChrSetArr.size() )
+        return (rtl_TextEncoding)aChrSetArr[ aChrSetArr.size() - 1 ];
     return eNdChrSet;
 }
 
@@ -945,14 +945,14 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart)
         sal_uInt16 nPos;
         if( bStart )
         {
-            nPos = aChrSetArr.Count();
-            aChrSetArr.Insert( eChrSet, nPos );
+            nPos = aChrSetArr.size();
+            aChrSetArr.push_back( eChrSet );
             aChrTxtAtrArr.Insert( p, nPos );
         }
         else if( USHRT_MAX != ( nPos = aChrTxtAtrArr.GetPos( p )) )
         {
             aChrTxtAtrArr.Remove( nPos );
-            aChrSetArr.Remove( nPos );
+            aChrSetArr.erase( aChrSetArr.begin() + nPos );
         }
     }
 }
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 761fc2a..ed7fe30 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1373,7 +1373,7 @@ private:
     const SfxItemPool* pEditPool;
     EECharAttribArray aTxtAtrArr;
     SvPtrarr aChrTxtAtrArr;
-    SvUShorts aChrSetArr;
+    std::vector<sal_uInt16> aChrSetArr;
     sal_uInt16 nPara;
     xub_StrLen nAktSwPos;
     xub_StrLen nTmpSwPos;                   // for HasItem()
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index ca6a1a4..9142364 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -374,21 +374,22 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
                 RES_CHRATR_CTL_FONT,    RES_CHRATR_CTL_WEIGHT
             };
 
-            SvUShorts aArr( 0, 16 );
-            aArr.Insert(    aNormalAttr,
-                            SAL_N_ELEMENTS( aNormalAttr ),
-                            0 );
+            std::vector<sal_uInt16> aArr;
+            aArr.insert( aArr.begin(), aNormalAttr,
+                    aNormalAttr + SAL_N_ELEMENTS( aNormalAttr ));
             if( SW_MOD()->GetCTLOptions().IsCTLFontEnabled() )
-                aArr.Insert(    aCTLAttr,
-                                SAL_N_ELEMENTS( aCTLAttr ),
-                                14 );
+            {
+                aArr.insert( aArr.begin() + 14, aCTLAttr,
+                        aCTLAttr + SAL_N_ELEMENTS( aCTLAttr ));
+            }
             SvtCJKOptions aCJKOpt;
             if( aCJKOpt.IsAnyEnabled() )
-                aArr.Insert(    aCJKAttr,
-                                SAL_N_ELEMENTS( aCJKAttr ),
-                                14 );
+            {
+                aArr.insert( aArr.begin() + 14, aCJKAttr,
+                        aCJKAttr + SAL_N_ELEMENTS( aCJKAttr ));
+            }
 
-            SfxItemSet aSet( pWrtShell->GetAttrPool(), aArr.GetData() );
+            SfxItemSet aSet( pWrtShell->GetAttrPool(), &(*aArr.begin()) );
             sal_uInt16 nWhich = SID_SEARCH_SEARCHSET;
 
             if ( FID_SEARCH_REPLACESET == nSlot )
diff --git a/xmloff/inc/xmloff/xmlexppr.hxx b/xmloff/inc/xmloff/xmlexppr.hxx
index b7a2c68..fb5851e 100644
--- a/xmloff/inc/xmloff/xmlexppr.hxx
+++ b/xmloff/inc/xmloff/xmlexppr.hxx
@@ -39,7 +39,6 @@ namespace rtl { class OUString; }
 class SvXMLUnitConverter;
 class SvXMLAttributeList;
 class SvXMLNamespaceMap;
-class SvUShorts;
 class FilterPropertiesInfos_Impl;
 class SvXMLExport;
 
@@ -85,7 +84,7 @@ protected:
                      const SvXMLUnitConverter& rUnitConverter,
                      const SvXMLNamespaceMap& rNamespaceMap,
                      sal_uInt16 nFlags,
-                     SvUShorts* pIndexArray,
+                     std::vector<sal_uInt16>* pIndexArray,
                        sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx ) const;
 
     void _exportXML( SvXMLAttributeList& rAttrList,
@@ -100,7 +99,7 @@ protected:
             SvXMLExport& rExport,
             const ::std::vector< XMLPropertyState >& rProperties,
             sal_uInt16 nFlags,
-            const SvUShorts& rIndexArray ) const;
+            const std::vector<sal_uInt16>& rIndexArray ) const;
 
 public:
 
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 2b83ec2..631a0c4 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -49,11 +49,6 @@
 #include <xmloff/PropertySetInfoHash.hxx>
 #include <comphelper/stl_types.hxx>
 
-#ifndef _SVSTDARR_USHORTS
-#define _SVSTDARR_USHORTS
-#include <svl/svstdarr.hxx>
-#endif
-
 using ::rtl::OUString;
 using ::rtl::OUStringBuffer;
 
@@ -830,7 +825,7 @@ void SvXMLExportPropertyMapper::exportXML(
         sal_uInt16 nPropType = aPropTokens[i].nType;
         if( 0==i || (nPropTypeFlags & (1 << nPropType)) != 0 )
         {
-            SvUShorts aIndexArray;
+            std::vector<sal_uInt16> aIndexArray;
 
             _exportXML( nPropType, nPropTypeFlags,
                         rExport.GetAttrList(), rProperties,
@@ -841,7 +836,7 @@ void SvXMLExportPropertyMapper::exportXML(
 
             if( rExport.GetAttrList().getLength() > 0L ||
                 (nFlags & XML_EXPORT_FLAG_EMPTY) != 0 ||
-                aIndexArray.Count() != 0 )
+                !aIndexArray.empty() )
             {
                 SvXMLElementExport aElem( rExport, XML_NAMESPACE_STYLE,
                                   aPropTokens[i].eToken,
@@ -898,7 +893,7 @@ void SvXMLExportPropertyMapper::_exportXML(
         const SvXMLUnitConverter& rUnitConverter,
         const SvXMLNamespaceMap& rNamespaceMap,
         sal_uInt16 nFlags,
-        SvUShorts* pIndexArray,
+        std::vector<sal_uInt16>* pIndexArray,
         sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx ) const
 {
     const sal_uInt32 nCount = rProperties.size();
@@ -928,7 +923,9 @@ void SvXMLExportPropertyMapper::_exportXML(
                     // element items do not add any properties,
                     // we export it later
                     if( pIndexArray )
-                        pIndexArray->Insert( (sal_uInt16)nIndex, pIndexArray->Count() );
+                    {
+                        pIndexArray->push_back( (sal_uInt16)nIndex );
+                    }
                 }
                 else
                 {
@@ -1092,15 +1089,15 @@ void SvXMLExportPropertyMapper::exportElementItems(
         SvXMLExport& rExport,
         const ::std::vector< XMLPropertyState >& rProperties,
         sal_uInt16 nFlags,
-        const SvUShorts& rIndexArray ) const
+        const std::vector<sal_uInt16>& rIndexArray ) const
 {
-    const sal_uInt16 nCount = rIndexArray.Count();
+    const sal_uInt16 nCount = rIndexArray.size();
 
     sal_Bool bItemsExported = sal_False;
     OUString sWS( GetXMLToken(XML_WS) );
     for( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
     {
-        const sal_uInt16 nElement = rIndexArray.GetObject( nIndex );
+        const sal_uInt16 nElement = rIndexArray.at( nIndex );
 
         OSL_ENSURE( 0 != ( maPropMapper->GetEntryFlags(
                 rProperties[nElement].mnIndex ) & MID_FLAG_ELEMENT_ITEM_EXPORT),
-- 
1.7.7.1


--------------090004040503070704020906--


More information about the LibreOffice mailing list