[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - sd/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Jan 14 10:41:43 PST 2016
sd/source/ui/view/Outliner.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit de0db2872fbeb65067142c216220b86990bd661f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jan 14 17:26:00 2016 +0100
sd: use ScopeGuard in Outliner::SearchAndReplaceAll()
So the flag will be reset on early return as well.
(cherry picked from commit 6372080cd396a7e8608806a35a1be68d288b8fda)
Conflicts:
sd/source/ui/view/Outliner.cxx
Change-Id: Ib086ec4a02dda291a0291a8ac40660c16de0fbf6
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 76b1272..ca625c8 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -80,6 +80,7 @@
#include <editeng/editerr.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/string.hxx>
+#include <comphelper/scopeguard.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -631,7 +632,10 @@ bool Outliner::SearchAndReplaceAll()
}
else if (pViewShell->ISA(DrawViewShell))
{
+ // Disable selection change notifications during search all.
pViewShell->GetDoc()->setTiledSearching(true);
+ comphelper::ScopeGuard aGuard([pViewShell]() { pViewShell->GetDoc()->setTiledSearching(false); });
+
// Go to beginning/end of document.
maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin();
// Switch to the first object which contains the search string.
@@ -681,7 +685,6 @@ bool Outliner::SearchAndReplaceAll()
OString aPayload = aStream.str().c_str();
pViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_RESULT_SELECTION, aPayload.getStr());
}
- pViewShell->GetDoc()->setTiledSearching(false);
}
RestoreStartPosition ();
More information about the Libreoffice-commits
mailing list