sw/source/core/doc/tblrwcl.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits: commit 969ba5fe88c2f817f2121bb26f2d472cff891399 Author: Michael Stahl <mst...@redhat.com> Date: Fri Sep 4 21:53:34 2015 +0200 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 (cherry picked from commit 8bf0e60d1da6d1ab79455dc916fd8701122812d2) Reviewed-on: https://gerrit.libreoffice.org/18379 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 08db77b..12c24a5 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -1613,17 +1613,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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits