Kaydet (Commit) 8bf0e60d authored tarafından Michael Stahl's avatar Michael Stahl

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 be5e4247)

Change-Id: I646e3ca678895480d38ec48f38d720458860a985
üst 419abc4f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment