diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-10-14 16:10:29 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-10-14 18:33:45 +0200 |
commit | d3eca4177a78c3db17b4699ea6e071e52488c46f (patch) | |
tree | 53478d0001bed6318deeb9be8b945bdf9cc5c647 | |
parent | 53e4e87d4bccdc12f6b87166b9123de627b844f9 (diff) |
tdf#136577 sw: fix Undo of Replace with nothing
The UI doesn't allow to replace an empty selection anyway, but it now
happens on Undo.
(regression from e1629c210ad78310e3d48c0756723134a27b89df)
Change-Id: I468f28335beaeb8c42df8ed4cfc90f2c03129239
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104308
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
-rw-r--r-- | sw/source/core/doc/DocumentContentOperationsManager.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 4c0e7530c311..ded1dc72fe1e 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -4291,7 +4291,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam) bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUString& rStr, const bool bRegExReplace ) { - if( !rPam.HasMark() || *rPam.GetPoint() == *rPam.GetMark() ) + if (!rPam.HasMark()) return false; bool bJoinText, bJoinPrev; |