summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-07-29 17:58:15 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-07-30 00:03:02 +0200
commit1486f96317aa6eac34ddb7ef4e1c64824bb269b4 (patch)
treea612f99dafad870819e7100301bc62132cc22f0c
parent2036db5ecd227f97e0e5ab403de61b80fff93c38 (diff)
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@collabora.com>
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx5
1 files changed, 5 insertions, 0 deletions
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;