Accepting request 898137 from LibreOffice:7.1
OBS-URL: https://build.opensuse.org/request/show/898137 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=966
This commit is contained in:
parent
1b95cf2675
commit
9f8675da64
72
bsc1185797.patch
Normal file
72
bsc1185797.patch
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
From db6efbaf5f9d6ae818afccec6a9fab219268b621 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= <tomaz.vajngerl@collabora.co.uk>
|
||||||
|
Date: Sun, 6 Jun 2021 20:55:28 +0900
|
||||||
|
Subject: [PATCH] tdf#142478 fix crash when searching and a viewshell change
|
||||||
|
occurs
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
When searching a impress document for a word, and the word is in
|
||||||
|
notes as welll as in the document, a crash happens (only when
|
||||||
|
searching with "find all"). The regressing commit changed that the
|
||||||
|
search is now bound to a view (and to a viewshell). When searching
|
||||||
|
for words in notes and document, at the transition from "standard"
|
||||||
|
to "notes" page kind mode, the view and viewshells are destroyed
|
||||||
|
and the new one created again. The problem lies here as when we
|
||||||
|
destroy the viewshell, we also destroy the search context and
|
||||||
|
FuSearch objects, but we are still executing the search -> crash.
|
||||||
|
|
||||||
|
The solution for this is that when we change the page kind,
|
||||||
|
we take the FuSearch object from the old viewshell and put it
|
||||||
|
into the newly created viewshell, so that we keep the FuSearch
|
||||||
|
object alive and don't throw away the search context too.
|
||||||
|
|
||||||
|
Change-Id: I50931cca2a20c5704f7450e3cc8b3466af4c5a3e
|
||||||
|
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116758
|
||||||
|
Tested-by: Jenkins
|
||||||
|
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
||||||
|
(cherry picked from commit 3b75f9add7ed80e803b0771d86892d6ca0f47e71)
|
||||||
|
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116703
|
||||||
|
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
||||||
|
---
|
||||||
|
sd/source/ui/view/Outliner.cxx | 12 +++++++++++-
|
||||||
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
|
||||||
|
index 59e740b4bda1..70df0bd17bfe 100644
|
||||||
|
--- a/sd/source/ui/view/Outliner.cxx
|
||||||
|
+++ b/sd/source/ui/view/Outliner.cxx
|
||||||
|
@@ -61,6 +61,7 @@
|
||||||
|
#include <comphelper/lok.hxx>
|
||||||
|
#include <comphelper/scopeguard.hxx>
|
||||||
|
#include <VectorGraphicSearchContext.hxx>
|
||||||
|
+#include <fusearch.hxx>
|
||||||
|
|
||||||
|
using namespace ::com::sun::star;
|
||||||
|
using namespace ::com::sun::star::uno;
|
||||||
|
@@ -1550,6 +1551,11 @@ void SdOutliner::SetViewMode (PageKind ePageKind)
|
||||||
|
bool bMatchMayExist = mbMatchMayExist;
|
||||||
|
|
||||||
|
sd::ViewShellBase& rBase = pViewShell->GetViewShellBase();
|
||||||
|
+
|
||||||
|
+ rtl::Reference<sd::FuSearch> xFuSearch;
|
||||||
|
+ if (pViewShell->GetView())
|
||||||
|
+ xFuSearch = pViewShell->GetView()->getSearchContext().getFunctionSearch();
|
||||||
|
+
|
||||||
|
SetViewShell(std::shared_ptr<sd::ViewShell>());
|
||||||
|
sd::framework::FrameworkHelper::Instance(rBase)->RequestView(
|
||||||
|
sViewURL,
|
||||||
|
@@ -1560,7 +1566,11 @@ void SdOutliner::SetViewMode (PageKind ePageKind)
|
||||||
|
// instead. But that would involve major restructuring of the
|
||||||
|
// Outliner code.
|
||||||
|
sd::framework::FrameworkHelper::Instance(rBase)->RequestSynchronousUpdate();
|
||||||
|
- SetViewShell(rBase.GetMainViewShell());
|
||||||
|
+
|
||||||
|
+ auto pNewViewShell = rBase.GetMainViewShell();
|
||||||
|
+ SetViewShell(pNewViewShell);
|
||||||
|
+ if (xFuSearch.is() && pNewViewShell->GetView())
|
||||||
|
+ pNewViewShell->GetView()->getSearchContext().setSearchFunction(xFuSearch);
|
||||||
|
|
||||||
|
// Switching to another view shell has intermediatly called
|
||||||
|
// EndSpelling(). A PrepareSpelling() is pending, so call that now.
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 27 11:27:04 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Fix bsc#1185797: Searching in PPTX document makes LibreOffice crash
|
||||||
|
* bsc1185797.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 26 13:32:48 UTC 2021 - Andras Timar <andras.timar@collabora.com>
|
Wed May 26 13:32:48 UTC 2021 - Andras Timar <andras.timar@collabora.com>
|
||||||
|
|
||||||
|
@ -107,6 +107,8 @@ Patch5: bsc1184961.patch
|
|||||||
Patch6: gcc11-fix-error.patch
|
Patch6: gcc11-fix-error.patch
|
||||||
# bsc#1185505 - LO-L3: Text highlight "bleeds" when saving as PPTX
|
# bsc#1185505 - LO-L3: Text highlight "bleeds" when saving as PPTX
|
||||||
Patch7: bsc1185505.patch
|
Patch7: bsc1185505.patch
|
||||||
|
# bsc#1185797 Searching in PPTX document makes LibreOffice crash
|
||||||
|
Patch8: bsc1185797.patch
|
||||||
# Build with java 8
|
# Build with java 8
|
||||||
Patch101: 0001-Revert-java-9-changes.patch
|
Patch101: 0001-Revert-java-9-changes.patch
|
||||||
# try to save space by using hardlinks
|
# try to save space by using hardlinks
|
||||||
@ -981,6 +983,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
%if 0%{?suse_version} < 1500
|
%if 0%{?suse_version} < 1500
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user