sd/source/ui/view/Outliner.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
New commits: commit 191288d6a7fb52b31038a21c4e71ee57ffa3bacd Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sun May 31 21:59:34 2020 +0200 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Thu Jun 4 00:44:19 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 <qui...@gmail.com> diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 3843cd692872..f8cec9464896 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -826,13 +826,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) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits