summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShivam Kumar Singh <shivamhere247@gmail.com>2020-06-30 19:47:56 +0530
committerMike Kaganski <mike.kaganski@collabora.com>2020-07-16 02:41:16 +0200
commit9006cbf6a13317a386194d6857f22391464c2aa0 (patch)
treef7ab45ecf430c8487d502deb7d82bce64082b965
parent28f09062b2e9a3228ef5fe41312769ad566cc4b6 (diff)
Support for disabling Asian/Complex fonts for Inspector
Hide/Show Asian and Complex properties from the Inspector when disabled/enabled from Tools->Options->Language Settings Change-Id: I6447d4406b9371d63e757b332c3393f3496e0a4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97530 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index 83c48c41815a..da9f7eaa4709 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <unotextrange.hxx>
+#include <svl/languageoptions.hxx>
namespace sw::sidebar
{
@@ -62,7 +63,9 @@ static bool GetPropertyValues(const beans::Property rProperty, const uno::Any& r
OUString& rString)
{
// Hide Asian and Complex properties
- if (rProperty.Name.indexOf("Asian") != -1 || rProperty.Name.indexOf("Complex") != -1)
+ if (SvtLanguageOptions().IsCJKFontEnabled() && rProperty.Name.indexOf("Asian") != -1)
+ return false;
+ if (SvtLanguageOptions().IsCTLFontEnabled() && rProperty.Name.indexOf("Complex") != -1)
return false;
OUString aValue;