sw/source/core/doc/docedt.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
New commits: commit bb90748abbe4196bf0bca324b979fcc44bd643a2 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/6176 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 f431f2fbaad8098870b1f9bdb71b6db514d2cbda) Reviewed-on: https://gerrit.libreoffice.org/6214 diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 6d34685..52b0b40 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -2469,17 +2469,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