[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 10 06:11:32 UTC 2020
sd/source/ui/view/Outliner.cxx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit ca214ec3f5b3c65c8d6d335d284b0702f29b4c25
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun May 31 21:59:34 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Jun 10 08:11:00 2020 +0200
sd: allow to change the search string between searches
Before this was missing, so even with a different search string,
it still searched using the old string, which was a bug.
Change-Id: I1655cb421e216e30ae593aabd3ead3a2d5c06299
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95461
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
(cherry picked from commit 191288d6a7fb52b31038a21c4e71ee57ffa3bacd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95947
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 09d84fafc3a7..3114196f7cf2 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -837,13 +837,19 @@ bool SdOutliner::SearchAndReplaceOnce(std::vector<sd::SearchSelection>* pSelecti
if (mpImpl->mbCurrentIsVectorGraphic)
{
+ OUString const & rString = mpSearchItem->GetSearchString();
bool bBackwards = mpSearchItem->GetBackward();
- bool bResult = false;
- if (bBackwards)
- bResult = mpImpl->mpVectorGraphicSearch->previous();
- else
- bResult = mpImpl->mpVectorGraphicSearch->next();
+ SearchStartPosition eSearchStartPosition = bBackwards ? SearchStartPosition::End : SearchStartPosition::Begin;
+ bool bResult = mpImpl->mpVectorGraphicSearch->search(rString, eSearchStartPosition);
+
+ if (bResult)
+ {
+ if (bBackwards)
+ bResult = mpImpl->mpVectorGraphicSearch->previous();
+ else
+ bResult = mpImpl->mpVectorGraphicSearch->next();
+ }
if (bResult)
{
More information about the Libreoffice-commits
mailing list