diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/node.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl1.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/fields/expfld.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/fields/reffld.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/html/htmlform.cxx | 15 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 26 | ||||
-rw-r--r-- | sw/source/filter/html/svxcss1.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/svxcss1.hxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 24 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.hxx | 7 | ||||
-rw-r--r-- | sw/source/filter/rtf/rtffly.cxx | 18 | ||||
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewsrch.cxx | 23 |
16 files changed, 93 insertions, 97 deletions
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 597f02e626a1..1ad155504eda 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 5f66a3d17fbd..2067dd31e643 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 76ab5fc5f3e7..5d0305e2a814 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 17f0dd225c42..3b5284965234 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 8f3563f4e694..013566cfed71 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 a6ef89445241..7fc91799d7a5 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 17b54983c842..de92f0755bad 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 8ad074212094..93b54e154464 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[0] ); pSheetPropInfo = new SvxCSS1PropertyInfo; - pSearchEntry = new SvxCSS1MapEntry( rPool, aWhichMap.GetData() ); + pSearchEntry = new SvxCSS1MapEntry( rPool, &aWhichMap[0] ); } SvxCSS1Parser::~SvxCSS1Parser() diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx index b90fcdfa91a9..bcd7a283e1f1 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[0]; } 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 9a8d77af3a9b..29a4da1f0c32 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 127f9129078e..f218c361328b 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 fb5af60f114f..e03467959d9b 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 6d7085cdbf1f..38236e6ccee8 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 5c1d220ade60..e7bf299cc5e6 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 761fc2acfd4a..ed7fe30b4d73 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 ca6a1a4b16ef..bbd490f0640b 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[0] ); sal_uInt16 nWhich = SID_SEARCH_SEARCHSET; if ( FID_SEARCH_REPLACESET == nSlot ) |