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>
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 637f134..a590e61 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;