summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@aliftype.com>2022-12-05 08:25:50 +0200
committerخالد حسني <khaled@aliftype.com>2022-12-05 08:01:10 +0000
commit3f9a8a3b7656470cfcf04c18a46a7b7bbeca8950 (patch)
tree757acfeb4f7085c39e6e681f700f47f2dd7c5fea
parentfd4f5c46a58adf136d86d6e9544c06e229161584 (diff)
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: خالد حسني <khaled@aliftype.com>
-rw-r--r--cui/source/dialogs/FontFeaturesDialog.cxx10
1 files changed, 9 insertions, 1 deletions
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());