summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-09-04 21:30:15 +0200
committerMichael Stahl <mstahl@redhat.com>2015-09-07 16:49:58 +0200
commita68eaa09a4979dc4814301f137e4186c85dee54f (patch)
treebe5a055e8fd7e6214f1b037d47bb9c3f9edb5ba0 /sw/source/core/docnode
parentb7a5b788f37707f9d0c473877be9777ce784175a (diff)
sw: convert boost::ptr_vector to std::vector<std::unique_ptr>
Change-Id: I341fb7c0712dff77ebfed41560a487f85c27c25a
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r--sw/source/core/docnode/ndtbl.cxx14
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx3
2 files changed, 7 insertions, 10 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 3635c4ab05ba..5f50cc95a2c6 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1860,7 +1860,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor )
while( 1 == pFndBox->GetLines().size() &&
1 == pFndBox->GetLines().front()->GetBoxes().size() )
{
- _FndBox *const pTmp = & pFndBox->GetLines().front()->GetBoxes()[0];
+ _FndBox *const pTmp = pFndBox->GetLines().front()->GetBoxes()[0].get();
if( pTmp->GetBox()->GetSttNd() )
break; // Else it gets too far
pFndBox = pTmp;
@@ -3657,8 +3657,7 @@ static bool lcl_SetAFormatLine(_FndLine &, _SetAFormatTabPara *pPara);
static bool lcl_SetAFormatLine(_FndLine & rLine, _SetAFormatTabPara *pPara)
{
- for (_FndBoxes::iterator it = rLine.GetBoxes().begin();
- it != rLine.GetBoxes().end(); ++it)
+ for (auto const& it : rLine.GetBoxes())
{
lcl_SetAFormatBox(*it, pPara);
}
@@ -3749,7 +3748,7 @@ bool SwDoc::SetTableAutoFormat( const SwSelBoxes& rBoxes, const SwTableAutoForma
while( 1 == pFndBox->GetLines().size() &&
1 == pFndBox->GetLines().front()->GetBoxes().size())
{
- pFndBox = &pFndBox->GetLines().front()->GetBoxes()[0];
+ pFndBox = pFndBox->GetLines().front()->GetBoxes()[0].get();
}
if( pFndBox->GetLines().empty() ) // One too far? (only one sel. Box)
@@ -3789,8 +3788,7 @@ bool SwDoc::SetTableAutoFormat( const SwSelBoxes& rBoxes, const SwTableAutoForma
aPara.nCurBox = 0;
aPara.nEndBox = pLine->GetBoxes().size()-1;
aPara.pUndo = pUndo;
- for (_FndBoxes::iterator it = pLine->GetBoxes().begin();
- it != pLine->GetBoxes().end(); ++it)
+ for (auto const& it : pLine->GetBoxes())
{
lcl_SetAFormatBox(*it, &aPara);
}
@@ -3836,7 +3834,7 @@ bool SwDoc::GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGe
while( 1 == pFndBox->GetLines().size() &&
1 == pFndBox->GetLines().front()->GetBoxes().size())
{
- pFndBox = &pFndBox->GetLines().front()->GetBoxes()[0];
+ pFndBox = pFndBox->GetLines().front()->GetBoxes()[0].get();
}
if( pFndBox->GetLines().empty() ) // One too far? (only one sel. Box)
@@ -3862,7 +3860,7 @@ bool SwDoc::GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGe
for( sal_uInt8 nBox = 0; nBox < 4; ++nBox )
{
- SwTableBox* pFBox = rLine.GetBoxes()[ aBoxArr[ nBox ] ].GetBox();
+ SwTableBox* pFBox = rLine.GetBoxes()[ aBoxArr[ nBox ] ]->GetBox();
// Always apply to the first ones
while( !pFBox->GetSttNd() )
pFBox = pFBox->GetTabLines()[0]->GetTabBoxes()[0];
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 51d5fa76f696..797c159e3b30 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -207,8 +207,7 @@ bool _FindBox( _FndBox & rBox, LinesAndTable* pPara )
bool _FindLine( _FndLine& rLine, LinesAndTable* pPara )
{
- for (_FndBoxes::iterator it = rLine.GetBoxes().begin();
- it != rLine.GetBoxes().end(); ++it)
+ for (auto const& it : rLine.GetBoxes())
{
_FindBox(*it, pPara);
}