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

New commits:
commit 1486f96317aa6eac34ddb7ef4e1c64824bb269b4
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Jul 29 17:58:15 2020 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Jul 30 00:03:02 2020 +0200

    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.kagan...@collabora.com>

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 637f13488921..a590e61f040a 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2928,6 +2928,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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to