Kaydet (Commit) 2e7bb8d1 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#71866: sw: un-break index updates

SwTOXBaseSection::GenerateText() wants to operate directly on
SwTxtNode::m_Text and accepts no substitutes such as a temporary string
on the stack; this regression shows that developers often
significantly underestimate the craziness of the existing code.

(regression from d6e321f8)

Change-Id: I01b831f35a52bde207a7db8cae9d4aadb826b2d8
üst 4580094d
...@@ -1583,7 +1583,8 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx, ...@@ -1583,7 +1583,8 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
// pTOXNd is only set at the first mark // pTOXNd is only set at the first mark
SwTxtNode* pTOXNd = (SwTxtNode*)aSortArr[nArrayIdx]->pTOXNd; SwTxtNode* pTOXNd = (SwTxtNode*)aSortArr[nArrayIdx]->pTOXNd;
OUString rTxt = pTOXNd->GetTxt(); // FIXME this operates directly on the node text
OUString & rTxt = const_cast<OUString&>(pTOXNd->GetTxt());
rTxt = ""; rTxt = "";
for(sal_uInt16 nIndex = nArrayIdx; nIndex < nArrayIdx + nCount; nIndex++) for(sal_uInt16 nIndex = nArrayIdx; nIndex < nArrayIdx + nCount; nIndex++)
{ {
......
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