[Libreoffice-commits] core.git: svx/source sw/qa

Tomoyuki Kubota (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 3 15:03:18 UTC 2020


 svx/source/sidebar/inspector/InspectorTextPanel.cxx |    4 +-
 sw/qa/uitest/styleInspector/styleInspector.py       |   36 ++++++++++++--------
 2 files changed, 24 insertions(+), 16 deletions(-)

New commits:
commit 73e0b664881d95510be9605b98a2671926f4697a
Author:     Tomoyuki Kubota <himajin100000 at gmail.com>
AuthorDate: Sun Nov 1 16:24:59 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Nov 3 16:02:33 2020 +0100

    tdf#137886 condition for asian and ctl property seems wrong
    
    Change-Id: Ifc11f3bbcc499143904ac7c206674cc692cf5239
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105054
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Tested-by: Jenkins

diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index 9ebcf24f9e14..13714e22bfde 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -62,9 +62,9 @@ InspectorTextPanel::InspectorTextPanel(vcl::Window* pParent,
 static bool GetPropertyValues(const OUString& rPropName, const uno::Any& rAny, OUString& rString)
 {
     // Hide Asian and Complex properties
-    if (SvtLanguageOptions().IsCJKFontEnabled() && rPropName.indexOf("Asian") != -1)
+    if (!SvtLanguageOptions().IsCJKFontEnabled() && rPropName.indexOf("Asian") != -1)
         return false;
-    if (SvtLanguageOptions().IsCTLFontEnabled() && rPropName.indexOf("Complex") != -1)
+    if (!SvtLanguageOptions().IsCTLFontEnabled() && rPropName.indexOf("Complex") != -1)
         return false;
 
     if (bool bValue; rAny >>= bValue)
diff --git a/sw/qa/uitest/styleInspector/styleInspector.py b/sw/qa/uitest/styleInspector/styleInspector.py
index 5eb9f8438e3e..8469d274ee3c 100644
--- a/sw/qa/uitest/styleInspector/styleInspector.py
+++ b/sw/qa/uitest/styleInspector/styleInspector.py
@@ -28,7 +28,7 @@ class styleNavigator(UITestCase):
         # The cursor is on text without formatting and default style
         self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
         self.assertEqual("Default Paragraph Style", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
-        self.assertEqual(118, len(xListBox.getChild('0').getChild('0').getChildren()))
+        self.assertEqual(136, len(xListBox.getChild('0').getChild('0').getChildren()))
         self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
         self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
         self.assertEqual(0, len(xListBox.getChild('3').getChildren()))
@@ -38,7 +38,7 @@ class styleNavigator(UITestCase):
         # The cursor is on text with direct formatting
         self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
         self.assertEqual("Default Paragraph Style", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
-        self.assertEqual(118, len(xListBox.getChild('0').getChild('0').getChildren()))
+        self.assertEqual(136, len(xListBox.getChild('0').getChild('0').getChildren()))
         self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
         self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
 
@@ -56,7 +56,7 @@ class styleNavigator(UITestCase):
         # The cursor is on text with paragraph direct formatting
         self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
         self.assertEqual("Default Paragraph Style", get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
-        self.assertEqual(118, len(xListBox.getChild('0').getChild('0').getChildren()))
+        self.assertEqual(136, len(xListBox.getChild('0').getChild('0').getChildren()))
 
         xParDirFormatting = xListBox.getChild('1')
         self.assertEqual(7, len(xParDirFormatting.getChildren()))
@@ -77,21 +77,29 @@ class styleNavigator(UITestCase):
         xParStyle = xListBox.getChild('0')
         self.assertEqual(3, len(xParStyle.getChildren()))
         self.assertEqual("Default Paragraph Style", get_state_as_dict(xParStyle.getChild('0'))['Text'])
-        self.assertEqual(118, len(xParStyle.getChild('0').getChildren()))
+        self.assertEqual(136, len(xParStyle.getChild('0').getChildren()))
         self.assertEqual("Heading", get_state_as_dict(xParStyle.getChild('1'))['Text'])
-        self.assertEqual(14, len(xParStyle.getChild('1').getChildren()))
+        self.assertEqual(28, len(xParStyle.getChild('1').getChildren()))
 
         xTitleStyle = xParStyle.getChild('2')
         self.assertEqual("Title", get_state_as_dict(xTitleStyle)['Text'])
-        self.assertEqual(8, len(xTitleStyle.getChildren()))
+        self.assertEqual(16, len(xTitleStyle.getChildren()))
         self.assertEqual("Char Difference Height\t0", get_state_as_dict(xTitleStyle.getChild('0'))['Text'])
-        self.assertEqual("Char Height\t28", get_state_as_dict(xTitleStyle.getChild('1'))['Text'])
-        self.assertEqual("Char Property Height\t100", get_state_as_dict(xTitleStyle.getChild('2'))['Text'])
-        self.assertEqual("Char Weight\tbold", get_state_as_dict(xTitleStyle.getChild('3'))['Text'])
-        self.assertEqual("Follow Style\tText body", get_state_as_dict(xTitleStyle.getChild('4'))['Text'])
-        self.assertEqual("Para Adjust\t3", get_state_as_dict(xTitleStyle.getChild('5'))['Text'])
-        self.assertEqual("Para Expand Single Word\tfalse", get_state_as_dict(xTitleStyle.getChild('6'))['Text'])
-        self.assertEqual("Para Last Line Adjust\t0", get_state_as_dict(xTitleStyle.getChild('7'))['Text'])
+        self.assertEqual("Char Difference Height Asian\t0", get_state_as_dict(xTitleStyle.getChild('1'))['Text'])
+        self.assertEqual("Char Difference Height Complex\t0", get_state_as_dict(xTitleStyle.getChild('2'))['Text'])
+        self.assertEqual("Char Height\t28", get_state_as_dict(xTitleStyle.getChild('3'))['Text'])
+        self.assertEqual("Char Height Asian\t28", get_state_as_dict(xTitleStyle.getChild('4'))['Text'])
+        self.assertEqual("Char Height Complex\t28", get_state_as_dict(xTitleStyle.getChild('5'))['Text'])
+        self.assertEqual("Char Property Height\t100", get_state_as_dict(xTitleStyle.getChild('6'))['Text'])
+        self.assertEqual("Char Property Height Asian\t100", get_state_as_dict(xTitleStyle.getChild('7'))['Text'])
+        self.assertEqual("Char Property Height Complex\t100", get_state_as_dict(xTitleStyle.getChild('8'))['Text'])
+        self.assertEqual("Char Weight\tbold", get_state_as_dict(xTitleStyle.getChild('9'))['Text'])
+        self.assertEqual("Char Weight Asian\tbold", get_state_as_dict(xTitleStyle.getChild('10'))['Text'])
+        self.assertEqual("Char Weight Complex\tbold", get_state_as_dict(xTitleStyle.getChild('11'))['Text'])
+        self.assertEqual("Follow Style\tText body", get_state_as_dict(xTitleStyle.getChild('12'))['Text'])
+        self.assertEqual("Para Adjust\t3", get_state_as_dict(xTitleStyle.getChild('13'))['Text'])
+        self.assertEqual("Para Expand Single Word\tfalse", get_state_as_dict(xTitleStyle.getChild('14'))['Text'])
+        self.assertEqual("Para Last Line Adjust\t0", get_state_as_dict(xTitleStyle.getChild('15'))['Text'])
 
         self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
         self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
@@ -103,7 +111,7 @@ class styleNavigator(UITestCase):
         xParStyle = xListBox.getChild('0')
         self.assertEqual(3, len(xParStyle.getChildren()))
         self.assertEqual("Default Paragraph Style", get_state_as_dict(xParStyle.getChild('0'))['Text'])
-        self.assertEqual(118, len(xParStyle.getChild('0').getChildren()))
+        self.assertEqual(136, len(xParStyle.getChild('0').getChildren()))
         self.assertEqual("Text Body", get_state_as_dict(xParStyle.getChild('1'))['Text'])
         self.assertEqual(6, len(xParStyle.getChild('1').getChildren()))
 


More information about the Libreoffice-commits mailing list