summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-12-05 23:16:51 +0100
committerMichael Stahl <mstahl@redhat.com>2013-12-05 23:25:37 +0100
commit2e7bb8d12647e1c4adb4fa86961b4839afaca253 (patch)
tree1ca38037645914059e26706db41e01de53ccb3b0
parent4580094d2d9d5b952c4526ee23204f75a5bb2f1b (diff)
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 d6e321f8264188ce8371c060ebeb75b213f0c90f) Change-Id: I01b831f35a52bde207a7db8cae9d4aadb826b2d8
-rw-r--r--sw/source/core/doc/doctxm.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 5ac032a94774..1fb42547e0ba 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1583,7 +1583,8 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
// pTOXNd is only set at the first mark
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 = "";
for(sal_uInt16 nIndex = nArrayIdx; nIndex < nArrayIdx + nCount; nIndex++)
{