[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/source svx/source

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 17 16:14:49 UTC 2021


 sd/source/ui/view/drawview.cxx |    7 ++++++-
 svx/source/svdraw/svdedxv.cxx  |    1 -
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 7db8c3d36db3ed727ade2609b7c1017cc813a560
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Feb 17 15:53:08 2021 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Feb 17 17:14:15 2021 +0100

    Better fix for tdf#125824: switch page only for the current view.
    
    First workaround was avoiding undoing:
    9dca7c2fac5c6b83a6910aa61b1a2a316f36d948
    
    Second workaround was forcing all views to exit text editing:
    e6c7a018a0cfee395ce2886d41c908a2447ef5cc
    
    Instead of these solutions, we allow to continue text editing
    in other views. What we do is avoiding jumping to the object
    location in all views while undoing. In theory, the two views
    / windows should be able to edit the document's different parts
    independently. So one view should not jump to the location where
    the other view edits something / does an undo.
    
    It works both with multi-window and Collabora Online's collaborative
    editing.
    
    Change-Id: I7ffe29bf175b8f855fe3e92b3d7e11ca6bcd3f5f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111073
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 2c1a4e676c33..883d6d35b0b4 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -424,8 +424,13 @@ void DrawView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
         // switch to that page when it's not a master page
         if(SdrHintKind::SwitchToPage == eHintKind)
         {
-            const SdrPage* pPage = static_cast<const SdrHint&>(rHint).GetPage();
+            // We switch page only in the current view, which triggered this event
+            // and keep other views ontouched.
+            SfxViewShell* pViewShell = SfxViewShell::Current();
+            if(pViewShell && pViewShell != &mpDrawViewShell->GetViewShellBase())
+                return;
 
+            const SdrPage* pPage = static_cast<const SdrHint&>(rHint).GetPage();
             if(pPage && !pPage->IsMasterPage())
             {
                 if(mpDrawViewShell->GetActualPage() != pPage)
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 17c5f57f672d..43ea7336af56 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1522,7 +1522,6 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
             const bool bUndo = IsUndoEnabled();
             if (bUndo)
             {
-                EndTextEditAllViews();
                 OUString aObjName(pTEObj->TakeObjNameSingul());
                 BegUndo(SvxResId(STR_UndoObjSetText), aObjName);
             }


More information about the Libreoffice-commits mailing list