summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/doc/doctxm.cxx19
-rw-r--r--sw/source/core/inc/txmsrt.hxx6
-rw-r--r--sw/source/core/tox/txmsrt.cxx5
-rwxr-xr-xunusedcode.easy6
4 files changed, 14 insertions, 22 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index b1c91998e651..c8dd37945a3c 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1563,7 +1563,7 @@ String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, sal
{
String sRet;
- if( !rBase.pTxtMark && rBase.aTOXSources.Count() > 0 )
+ if( !rBase.pTxtMark && !rBase.aTOXSources.empty() )
{ // only if it's not a Mark
const SwTxtNode* pNd = rBase.aTOXSources[0].pNd->GetTxtNode();
if( pNd )
@@ -1721,11 +1721,11 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
// Place holder for the PageNumber; we only respect the first one
{
// The count of similiar entries gives the PagerNumber pattern
- sal_uInt16 nSize = rBase.aTOXSources.Count();
- if( nSize > 0 )
+ size_t nSize = rBase.aTOXSources.size();
+ if (nSize > 0)
{
String aInsStr( cNumRepl );
- for(sal_uInt16 i=1; i < nSize; ++i)
+ for (size_t i = 1; i < nSize; ++i)
{
aInsStr.AppendAscii( sPageDeli );
aInsStr += cNumRepl;
@@ -1740,7 +1740,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
{
// A bit tricky: Find a random Frame
const SwTOXSource* pTOXSource = 0;
- if(rBase.aTOXSources.Count())
+ if (!rBase.aTOXSources.empty())
pTOXSource = &rBase.aTOXSources[0];
// #i53420#
@@ -1906,9 +1906,8 @@ void SwTOXBaseSection::UpdatePageNum()
for(sal_uInt16 nRunInEntry = nCnt; nRunInEntry < nCnt + nRange; nRunInEntry++)
{
SwTOXSortTabBase* pSortBase = aSortArr[nRunInEntry];
- sal_uInt16 nSize = pSortBase->aTOXSources.Count();
- sal_uInt16 i;
- for( sal_uInt16 j = 0; j < nSize; ++j )
+ size_t nSize = pSortBase->aTOXSources.size();
+ for (size_t j = 0; j < nSize; ++j)
{
::SetProgressState( 0, pDoc->GetDocShell() );
@@ -1936,6 +1935,7 @@ void SwTOXBaseSection::UpdatePageNum()
}
// Insert as sorted
+ sal_uInt16 i;
for( i = 0; i < aNums.size() && aNums[i] < nPage; ++i )
;
@@ -2220,8 +2220,7 @@ void SwTOXBaseSection::InsertSorted(SwTOXSortTabBase* pNew)
return;
}
// If the own entry is already present, add it to the references list
- pOld->aTOXSources.Insert( pNew->aTOXSources[0],
- pOld->aTOXSources.Count() );
+ pOld->aTOXSources.push_back(pNew->aTOXSources[0]);
delete pNew;
return;
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index 5b3e79d3e793..e707741cadec 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -58,13 +58,13 @@ struct SwTOXSource
xub_StrLen nPos;
sal_Bool bMainEntry;
- SwTOXSource() : pNd(0), nPos(0), bMainEntry(sal_False) {}
SwTOXSource( const SwCntntNode* pNode, xub_StrLen n, sal_Bool bMain )
: pNd(pNode), nPos(n), bMainEntry(bMain)
- {}
+ {
+ }
};
-SV_DECL_VARARR( SwTOXSources, SwTOXSource, 0 )
+typedef std::vector<SwTOXSource> SwTOXSources;
class SwTOXInternational
{
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 13e51e8d6daa..e6f18c1bcae8 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -64,9 +64,6 @@ using ::rtl::OUString;
sal_uInt16 SwTOXSortTabBase::nOpt = 0;
-SV_IMPL_VARARR( SwTOXSources, SwTOXSource )
-
-
SwTOXInternational::SwTOXInternational( LanguageType nLang, sal_uInt16 nOpt,
const String& rSortAlgorithm ) :
eLang( nLang ),
@@ -164,7 +161,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
n = *pTxtMark->GetStart();
SwTOXSource aTmp( pNd, n,
pTxtMark ? pTxtMark->GetTOXMark().IsMainEntry() : sal_False );
- aTOXSources.Insert( aTmp, aTOXSources.Count() );
+ aTOXSources.push_back(aTmp);
nPos = pNd->GetIndex();
diff --git a/unusedcode.easy b/unusedcode.easy
index a63332effd0c..08c0f9600764 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -272,11 +272,6 @@ SwSortTableLines::Remove(SwTableLine* const&, unsigned short)
SwSortTableLines::Remove(unsigned short, unsigned short)
SwSyncChildWin::GetChildWindowId()
SwTOXMarks::DeleteAndDestroy(unsigned short, unsigned short)
-SwTOXSources::Insert(SwTOXSources const*, unsigned short, unsigned short, unsigned short)
-SwTOXSources::Remove(unsigned short, unsigned short)
-SwTOXSources::Replace(SwTOXSource const&, unsigned short)
-SwTOXSources::Replace(SwTOXSource const*, unsigned short, unsigned short)
-SwTOXSources::_ForEach(unsigned short, unsigned short, unsigned char (*)(SwTOXSource const&, void*), void*)
SwTabFrm::GetLeaf(MakePageType, unsigned char)
SwTableSortBoxes::DeleteAndDestroy(unsigned short, unsigned short)
SwTableSortBoxes::Insert(SwTableBox* const&, unsigned short&)
@@ -368,6 +363,7 @@ XMLTextListAutoStylePoolNames_Impl::Remove(rtl::OUString*)
XMLTextListAutoStylePool_Impl::GetPos(XMLTextListAutoStylePoolEntry_Impl const*) const
XMLTextListAutoStylePool_Impl::Remove(XMLTextListAutoStylePoolEntry_Impl*)
XclExpPivotCache::GetFieldAcc(rtl::OUString const&)
+XclPCField::GetBaseFieldIndex() const
_CpyTabFrms::Insert(_CpyTabFrm const&, unsigned short&)
_CpyTabFrms::Insert(_CpyTabFrm const*, unsigned short)
_CpyTabFrms::Insert(_CpyTabFrms const*, unsigned short, unsigned short)