sw/source/uibase/shells/basesh.cxx |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 7d6a035db7d3d45cca70eae027cf01c9004043ae
Author:     Jim Raykowski <[email protected]>
AuthorDate: Thu Sep 16 14:14:13 2021 -0800
Commit:     Xisco Fauli <[email protected]>
CommitDate: Mon Sep 20 16:21:05 2021 +0200

    tdf#143813 Outline folding: Make copy cut paste work
    
    Change-Id: Ib8b491fdcce1cd059c8eaf80a9c3bb2590af7c63
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122212
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <[email protected]>
    (cherry picked from commit f4f646eec90c44b6a7ffeaf5f6ce4c85af64eed0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122276
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 9752f24ad189..6812cc3d9b3d 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -281,8 +281,6 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq)
 
 void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
 {
-    MakeAllOutlineContentTemporarilyVisible a(GetShell().GetDoc());
-
     // Attention: At risk of suicide!
     // After paste, paste special the shell can be destroy.
 
@@ -355,6 +353,9 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
                     if( rSh.IsFrameSelected() || rSh.IsObjSelected() )
                         rSh.EnterSelFrameMode();
                     pView->AttrChangedNotify(nullptr);
+
+                    // Fold pasted outlines that have outline content visible 
attribute false
+                    MakeAllOutlineContentTemporarilyVisible a(rSh.GetDoc());
                 }
                 else
                     return;
@@ -386,6 +387,9 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
                         if( rSh.IsFrameSelected() || rSh.IsObjSelected())
                             rSh.EnterSelFrameMode();
                         pView->AttrChangedNotify(nullptr);
+
+                        // Fold pasted outlines that have outline content 
visible attribute false
+                        MakeAllOutlineContentTemporarilyVisible 
a(rSh.GetDoc());
                     }
                 }
             }
@@ -418,6 +422,9 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
                     if (rSh.IsFrameSelected() || rSh.IsObjSelected())
                         rSh.EnterSelFrameMode();
                     pView->AttrChangedNotify(nullptr);
+
+                    // Fold pasted outlines that have outline content visible 
attribute false
+                    MakeAllOutlineContentTemporarilyVisible a(rSh.GetDoc());
                 }
                 else
                     return;
@@ -471,6 +478,9 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
                         if (rSh.IsFrameSelected() || rSh.IsObjSelected())
                             rSh.EnterSelFrameMode();
                         pView->AttrChangedNotify(nullptr);
+
+                        // Fold pasted outlines that have outline content 
visible attribute false
+                        MakeAllOutlineContentTemporarilyVisible 
a(rSh.GetDoc());
                     }
 
                     pDlg->disposeOnce();

Reply via email to