summaryrefslogtreecommitdiff
path: root/sw/source
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:41:17 +0100
commit091b734c82630b7d88de725ec0e41e76f4017f86 (patch)
treedcfe0eece95425e0a5672ce1bf34b72b240f331d /sw/source
parent2171fff4c1a57ede8f9693d7c0d95c1171a49a70 (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 (cherry picked from commit 2e7bb8d12647e1c4adb4fa86961b4839afaca253)
Diffstat (limited to 'sw/source')
-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 bece3856bdf4..6e6a448044b0 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++)
{