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

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 22 10:39:39 UTC 2021


 sw/source/uibase/uno/unotxdoc.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit bfd1c48fd30c12f05c2d4aaaad8d3da2bf30a90c
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Jul 29 17:58:15 2020 +0300
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Mar 22 11:39:04 2021 +0100

    tdf#135244: prevent jumping to cursor at document render
    
    This prevents the jumps when printing
    
    Change-Id: I8b6f7d60aa0ed443ec8e05ad5812830a6b655abb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99715
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112827
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 6eeec4395f04..1f9a92724c2c 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2951,6 +2951,11 @@ void SAL_CALL SwXTextDocument::render(
     if (0 > nRenderer)
         throw IllegalArgumentException();
 
+    // tdf#135244: prevent jumping to cursor at any temporary modification
+    decltype(pDocShell->LockAllViews()) aLock;
+    if (pDocShell)
+        aLock = pDocShell->LockAllViews();
+
     const bool bHasPDFExtOutDevData = lcl_SeqHasProperty( rxOptions, "HasPDFExtOutDevData" );
     const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" ) || bHasPDFExtOutDevData;
     bool bIsSwSrcView = false;


More information about the Libreoffice-commits mailing list