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

fdo#70143: fix SwDoc::ReplaceRangeImpl() a bit more

Fixes regex replace of "$" with nothing (to delete line
breaks).

Change-Id: If7ec1e5f524f7bb308a2949ace16cb8aa6989106
üst 2386a92c
...@@ -2440,18 +2440,23 @@ SetRedlineMode( eOld ); ...@@ -2440,18 +2440,23 @@ SetRedlineMode( eOld );
} }
} }
if (aDelPam.GetMark() != pStt) *rPam.GetPoint() = *aDelPam.GetMark();
*rPam.GetPoint() = *aDelPam.GetMark();
++aPtNd; ++aPtNd;
rPam.GetMark()->nNode = aPtNd; rPam.GetMark()->nNode = aPtNd;
rPam.GetMark()->nContent.Assign( aPtNd.GetNode().GetCntntNode(), rPam.GetMark()->nContent.Assign( aPtNd.GetNode().GetCntntNode(),
nPtCnt ); nPtCnt );
if (bJoinTxt && !bJoinPrev) if (bJoinTxt)
{ {
assert(rPam.GetPoint() == rPam.End());
// move so that SetEnd remembers position after sw_JoinText
rPam.Move(fnMoveBackward); 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 ) if( pUndoRpl )
{ {
......
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