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

New commits:
commit 876da94619d561e4b4c6c7d12a8d6726eb857df8
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Feb 1 17:44:39 2021 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Feb 1 23:38:48 2021 +0100

    sw lok: disable field shadings
    
    There are two problems with it:
    
    First, the field shading is rendered behind bullet portions depending on
    the cursor position (if the cursor is before the bullet, then we
    render it; but not if the cursor is after the bullet), and tiled
    rendering assumes that the render result is independent from the cursor
    position.
    
    Second, field shading is always painted directly (not going via
    invalidation), so it's possible to end up with one tile showing field
    shadings and another not, which is inconsistent. And even if it would be
    there consistently, that would mean a lot of unnecessary invalidations.
    
    The alternative would be to disable this from online.git's
    loolconfig.xcu, but the item's path would end with something like
    "ColorScheme['LibreOfficeDev']/WriterFieldShadings", which means it's
    not easy to do this in a way that's independent from the product name.
    
    Change-Id: I23c62acc3c15966cfba98fcee99cc96854ba4394
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110263
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 1a0615b0f09f..2575fe176f1c 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3458,6 +3458,10 @@ void SwXTextDocument::initializeForTiledRendering(const 
css::uno::Sequence<css::
     // Tiled rendering defaults.
     SwViewOption aViewOption(*pViewShell->GetViewOptions());
     aViewOption.SetHardBlank(false);
+
+    // Disable field shadings: the result would depend on the cursor position.
+    SwViewOption::SetAppearanceFlag(ViewOptFlags::FieldShadings, false);
+
     for (const beans::PropertyValue& rValue : rArguments)
     {
         if (rValue.Name == ".uno:HideWhitespace" && rValue.Value.has<bool>())
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to