Kaydet (Commit) 0e86210b authored tarafından Michael Stahl's avatar Michael Stahl

fdo#64761: sw: avoid another ~SwIndexReg assert

SwXText::convertToTextFrame(): This one is rather spurious since the
local variables aren't used later anyway, so just park them  somewhere safe.

Change-Id: I47d3092fbf22a228fa3f440602c0affa43fbb6d7
üst dbd675df
...@@ -1656,6 +1656,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) ...@@ -1656,6 +1656,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
if (bParaBeforeInserted) if (bParaBeforeInserted)
{ {
SwCursor aDelete(*aStartPam.GetPoint(), 0, false); SwCursor aDelete(*aStartPam.GetPoint(), 0, false);
*aStartPam.GetPoint() = // park it because node is deleted
SwPosition(GetDoc()->GetNodes().GetEndOfContent());
aDelete.MovePara(fnParaCurr, fnParaStart); aDelete.MovePara(fnParaCurr, fnParaStart);
aDelete.SetMark(); aDelete.SetMark();
aDelete.MovePara(fnParaCurr, fnParaEnd); aDelete.MovePara(fnParaCurr, fnParaEnd);
...@@ -1664,6 +1666,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) ...@@ -1664,6 +1666,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
if (bParaAfterInserted) if (bParaAfterInserted)
{ {
SwCursor aDelete(*pEndPam->GetPoint(), 0, false); SwCursor aDelete(*pEndPam->GetPoint(), 0, false);
*pEndPam->GetPoint() = // park it because node is deleted
SwPosition(GetDoc()->GetNodes().GetEndOfContent());
aDelete.MovePara(fnParaCurr, fnParaStart); aDelete.MovePara(fnParaCurr, fnParaStart);
aDelete.SetMark(); aDelete.SetMark();
aDelete.MovePara(fnParaCurr, fnParaEnd); aDelete.MovePara(fnParaCurr, fnParaEnd);
......
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