diff options
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/view/Outliner.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index e073118c4a8f..6d59a70d51b7 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -957,7 +957,11 @@ void Outliner::ProvideNextTextObject() // Switch to the current object only if it is a valid text object. if (IsValidTextObject (maCurrentPosition)) { - mpObj = SetObject (maCurrentPosition); + // Don't set yet in case of searching: the text object may not match. + if (meMode != SEARCH) + mpObj = SetObject(maCurrentPosition); + else + mpObj = maCurrentPosition.mxObject.get(); } ++maObjectIterator; @@ -983,6 +987,10 @@ void Outliner::ProvideNextTextObject() } else { + if (meMode == SEARCH) + // Instead of doing a full-blown SetObject(), which would do the same -- but would also possibly switch pages. + mbStringFound = false; + mbEndOfSearch = true; EndOfSearch (); } @@ -1175,6 +1183,9 @@ void Outliner::PrepareSearchAndReplace() { if (HasText( *mpSearchItem )) { + // Set the object now that we know it matches. + mpObj = SetObject(maCurrentPosition); + mbStringFound = true; mbMatchMayExist = true; |