tdf#135244: prevent jumping when generating drop caps preview

Change-Id: Ifd9ade76384c66312eda8c8ee7cb41891459b3f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99757
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index a02cd8d..9580fbd 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -195,6 +195,9 @@ void SwDropCapsPict::UpdatePaintSettings()
    vcl::Font aFont;
    if (mpPage)
    {
        // tdf#135244: preview generation should not jump document view
        auto aLock(mpPage->rSh.GetView().GetDocShell()->LockAllViews());

        if (!mpPage->m_xTemplateBox->get_active())
        {
            // query the Font at paragraph's beginning