diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-09-04 21:53:34 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-09-07 16:49:57 +0200 |
commit | 8bf0e60d1da6d1ab79455dc916fd8701122812d2 (patch) | |
tree | 0811a098764c8de3c9ce8716650fd18e3c9befc7 /sw | |
parent | 419abc4ffda367eb772f506e7c9df80d01a26eb8 (diff) |
sw: erroneous vector assignment in SwTable::OldMerge()
+ rLineBoxes = pFndBox->GetLines()[nEnd]->GetBoxes();
This actually assigns the boxes vector of the last line to the first
line, which the previous code didn't do.
Notably after converting the types from boost::ptr_vector to
std::vector<std::unique_ptr>, the assignment produces a several page
error message from both GCC and clang, and infuriatingly neither
compiler was able to tell on which line in tblrwcl.cxx the template
was instantiated, so i had to bisect that.
(regression from be5e4247e2a164bd1f2eacf9a33d6d73df16d0e3)
Change-Id: I646e3ca678895480d38ec48f38d720458860a985
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/tblrwcl.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index ec0070f928cb..520df3fa24bf 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -1611,17 +1611,15 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, _InsULPara aPara( pTableNd, true, true, pLeftBox, pMergeBox, pRightBox, pInsLine ); // Move the overlapping upper/lower Lines of the selected Area - _FndBoxes& rLineBoxes = pFndBox->GetLines().front().GetBoxes(); - for (_FndBoxes::iterator it = rLineBoxes.begin(); it != rLineBoxes.end(); ++it) + for (auto & it : pFndBox->GetLines().front().GetBoxes()) { - lcl_Merge_MoveBox(*it, &aPara); + lcl_Merge_MoveBox(it, &aPara); } aPara.SetLower( pInsLine ); const auto nEnd = pFndBox->GetLines().size()-1; - rLineBoxes = pFndBox->GetLines()[nEnd].GetBoxes(); - for (_FndBoxes::iterator it = rLineBoxes.begin(); it != rLineBoxes.end(); ++it) + for (auto & it : pFndBox->GetLines()[nEnd].GetBoxes()) { - lcl_Merge_MoveBox(*it, &aPara); + lcl_Merge_MoveBox(it, &aPara); } // Move the Boxes extending into the selected Area from left/right |