sw/source/core/doc/docedt.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
New commits: commit a55ba57c0ad4d5c2d8f49d4d57d00e7e05380351 Author: Arnaud Versini <arnaud.vers...@libreoffice.org> Date: Mon Oct 7 21:09:26 2013 +0200 fdo#70143: fix SwDoc::ReplaceRangeImpl() Fix fdo#70143 by reporting swaping of positions (regression from 6b08fe833186a04f9aef698a540d3a7493ac4519, which changed SwUndoReplace::Impl::SetEnd to use the wrongly set end position in rPam) Change-Id: I14c6f58bc5c1418c69eb565d42f1829856eed58c (cherry picked from commit 9685d20f2a0526a4c454cea1bd947eccbaeefa84) Fixes regex replace of "$" with nothing (to delete line breaks). Change-Id: If7ec1e5f524f7bb308a2949ace16cb8aa6989106 (cherry picked from commit f011a5c5071ed4a60f0ee7117608b72cecbb958d) Reviewed-on: https://gerrit.libreoffice.org/6175 Reviewed-by: Arnaud Versini <arnaud.vers...@libreoffice.org> Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit ca83560f3079289df88dd7df7c00917efbd72dc0) Reviewed-on: https://gerrit.libreoffice.org/6225 diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index f169ae5..b0794e6 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -2442,17 +2442,23 @@ SetRedlineMode( eOld ); } } - *rPam.GetMark() = *aDelPam.GetMark(); - + *rPam.GetPoint() = *aDelPam.GetMark(); ++aPtNd; rPam.GetMark()->nNode = aPtNd; rPam.GetMark()->nContent.Assign( aPtNd.GetNode().GetCntntNode(), nPtCnt ); - if (bJoinTxt && !bJoinPrev) + if (bJoinTxt) { + assert(rPam.GetPoint() == rPam.End()); + // move so that SetEnd remembers position after sw_JoinText rPam.Move(fnMoveBackward); } + else if (aDelPam.GetPoint() == pStt) // backward selection? + { + assert(*rPam.GetMark() <= *rPam.GetPoint()); + rPam.Exchange(); // swap so that rPam is backwards + } if( pUndoRpl ) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits