cui/source/dialogs/FontFeaturesDialog.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 3f9a8a3b7656470cfcf04c18a46a7b7bbeca8950
Author:     Khaled Hosny <kha...@aliftype.com>
AuthorDate: Mon Dec 5 08:25:50 2022 +0200
Commit:     خالد حسني <kha...@aliftype.com>
CommitDate: Mon Dec 5 08:01:10 2022 +0000

    Mark ssXX and cvXX off by default in font features dialog
    
    We know they are off by default.
    
    Change-Id: I77c8ecb0d65d46ec77ccc2570ecf5c05e6e577e4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143660
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@aliftype.com>

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index ab6063c9b6c3..f4f53f8c8655 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -158,7 +158,15 @@ int 
FontFeaturesDialog::fillGrid(std::vector<vcl::font::Feature> const& rFontFea
         else
         {
             if (nValue < 0)
-                aCurrentItem.m_xCheck->set_state(TRISTATE_INDET);
+            {
+                // If feature is not set, we don’t know if it is enabled by
+                // default or not. But we know that stylistic sets and
+                // character variants are not enabled by default.
+                if (rFontFeature.isStylisticSet() || 
rFontFeature.isCharacterVariant())
+                    aCurrentItem.m_xCheck->set_state(TRISTATE_FALSE);
+                else
+                    aCurrentItem.m_xCheck->set_state(TRISTATE_INDET);
+            }
             else
                 aCurrentItem.m_xCheck->set_state(nValue > 0 ? TRISTATE_TRUE : 
TRISTATE_FALSE);
             aCurrentItem.m_xCheck->set_label(aDefinition.getDescription());

Reply via email to