[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sc/qa sc/source
Balazs Varga (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 19 16:11:18 UTC 2021
sc/qa/uitest/autofilter/autofilter.py | 86 ++++++++++++++++-----------
sc/qa/uitest/data/autofilter/tdf140968.xlsx |binary
sc/qa/uitest/data/autofilter/time_value.xlsx |binary
sc/source/ui/unoobj/datauno.cxx | 13 ----
4 files changed, 54 insertions(+), 45 deletions(-)
New commits:
commit 00cf5ad4752db3494400a51547edd85f83c1119b
Author: Balazs Varga <balazs.varga991 at gmail.com>
AuthorDate: Wed May 12 11:39:08 2021 +0200
Commit: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
CommitDate: Thu Aug 19 18:10:48 2021 +0200
tdf#141309 tdf#142215 OOXML import: fix double conversion in autofilter
resulting missing selection of filtered time values
and numbers ending with zeroes.
No need to convert the filter values from string to
number and back at OOXML import, because we'll do that later
in the model by filtering with the formatted cell values.
Follow-up to commit d5c2584bf36d21580db677b231c57f99f49aa2cb
"Related: tdf#140968 avoid duplicated filter values".
Change-Id: I75e5b2391624ff85a8ed545926ec519355a356bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115473
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 6a2060cef22b19dbe04676c8c16776c4693b4dd8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120715
Tested-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
Reviewed-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
diff --git a/sc/qa/uitest/autofilter/autofilter.py b/sc/qa/uitest/autofilter/autofilter.py
index 6a878f68e238..3f0335afe47f 100644
--- a/sc/qa/uitest/autofilter/autofilter.py
+++ b/sc/qa/uitest/autofilter/autofilter.py
@@ -304,6 +304,19 @@ class AutofilterTest(UITestCase):
xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+ xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"}))
+ xFloatWindow = self.xUITest.getFloatWindow()
+ xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+ xTreeList = xCheckListMenu.getChild("check_list_box")
+ self.assertEqual(5, len(xTreeList.getChildren()))
+ #self.assertEqual('true', get_state_as_dict(xTreeList.getChild('0'))['IsChecked'])
+ #self.assertEqual('false', get_state_as_dict(xTreeList.getChild('1'))['IsChecked'])
+ #self.assertEqual('true', get_state_as_dict(xTreeList.getChild('2'))['IsChecked'])
+ #self.assertEqual('false', get_state_as_dict(xTreeList.getChild('3'))['IsChecked'])
+ #self.assertEqual('true', get_state_as_dict(xTreeList.getChild('4'))['IsChecked'])
+ xOkBtn = xFloatWindow.getChild("cancel")
+ xOkBtn.executeAction("CLICK", tuple())
+
xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "0"}))
xFloatWindow = self.xUITest.getFloatWindow()
xCheckListMenu = xFloatWindow.getChild("check_list_menu")
@@ -314,6 +327,47 @@ class AutofilterTest(UITestCase):
self.ui_test.close_doc()
+ def test_tdf140968(self):
+ doc = self.ui_test.load_file(get_url_for_data_file("tdf140968.xlsx"))
+
+ xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+
+ xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"}))
+ xFloatWindow = self.xUITest.getFloatWindow()
+ xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+ xTreeList = xCheckListMenu.getChild("check_list_box")
+ self.assertEqual(5, len(xTreeList.getChildren()))
+ self.assertEqual("0.000", get_state_as_dict(xTreeList.getChild('0'))['Text'])
+ self.assertEqual("0.046", get_state_as_dict(xTreeList.getChild('1'))['Text'])
+ self.assertEqual("0.365", get_state_as_dict(xTreeList.getChild('2'))['Text'])
+ self.assertEqual("0.500", get_state_as_dict(xTreeList.getChild('3'))['Text'])
+ self.assertEqual("0.516", get_state_as_dict(xTreeList.getChild('4'))['Text'])
+
+ #self.assertEqual('false', get_state_as_dict(xTreeList.getChild('0'))['IsChecked'])
+ #self.assertEqual('true', get_state_as_dict(xTreeList.getChild('1'))['IsChecked'])
+ #self.assertEqual('false', get_state_as_dict(xTreeList.getChild('2'))['IsChecked'])
+ #self.assertEqual('true', get_state_as_dict(xTreeList.getChild('3'))['IsChecked'])
+ #self.assertEqual('true', get_state_as_dict(xTreeList.getChild('4'))['IsChecked'])
+
+ xFirstEntry = xTreeList.getChild("0")
+ xFirstEntry.executeAction("CLICK", tuple())
+ xFirstEntry = xTreeList.getChild("1")
+ xFirstEntry.executeAction("CLICK", tuple())
+
+ xOkBtn = xFloatWindow.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+
+ self.assertFalse(is_row_hidden(doc, 0))
+ self.assertTrue(is_row_hidden(doc, 1))
+ self.assertTrue(is_row_hidden(doc, 2))
+ self.assertTrue(is_row_hidden(doc, 3))
+ self.assertTrue(is_row_hidden(doc, 4))
+ self.assertFalse(is_row_hidden(doc, 5))
+ self.assertFalse(is_row_hidden(doc, 6))
+ self.assertFalse(is_row_hidden(doc, 7))
+
+ self.ui_test.close_doc()
+
def test_tdf142350(self):
self.ui_test.create_doc_in_start_center("calc")
document = self.ui_test.get_component()
@@ -381,36 +435,4 @@ class AutofilterTest(UITestCase):
self.assertTrue(is_row_hidden(doc, 7))
self.assertFalse(is_row_hidden(doc, 8))
- def test_tdf140968(self):
- doc = self.ui_test.load_file(get_url_for_data_file("tdf140968.xlsx"))
-
- xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
-
- xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"}))
- xFloatWindow = self.xUITest.getFloatWindow()
- xCheckListMenu = xFloatWindow.getChild("check_list_menu")
- xTreeList = xCheckListMenu.getChild("check_list_box")
- self.assertEqual(4, len(xTreeList.getChildren()))
- self.assertEqual("0.000", get_state_as_dict(xTreeList.getChild('0'))['Text'])
- self.assertEqual("0.046", get_state_as_dict(xTreeList.getChild('1'))['Text'])
- self.assertEqual("0.365", get_state_as_dict(xTreeList.getChild('2'))['Text'])
- self.assertEqual("0.516", get_state_as_dict(xTreeList.getChild('3'))['Text'])
-
- xFirstEntry = xTreeList.getChild("0")
- xFirstEntry.executeAction("CLICK", tuple())
- xFirstEntry = xTreeList.getChild("1")
- xFirstEntry.executeAction("CLICK", tuple())
-
- xOkBtn = xFloatWindow.getChild("ok")
- xOkBtn.executeAction("CLICK", tuple())
-
- self.assertFalse(is_row_hidden(doc, 0))
- self.assertTrue(is_row_hidden(doc, 1))
- self.assertTrue(is_row_hidden(doc, 2))
- self.assertTrue(is_row_hidden(doc, 3))
- self.assertTrue(is_row_hidden(doc, 4))
- self.assertFalse(is_row_hidden(doc, 5))
- self.assertFalse(is_row_hidden(doc, 6))
-
- self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/autofilter/tdf140968.xlsx b/sc/qa/uitest/data/autofilter/tdf140968.xlsx
index b2b5b2a3e654..e4dd31bd14dd 100644
Binary files a/sc/qa/uitest/data/autofilter/tdf140968.xlsx and b/sc/qa/uitest/data/autofilter/tdf140968.xlsx differ
diff --git a/sc/qa/uitest/data/autofilter/time_value.xlsx b/sc/qa/uitest/data/autofilter/time_value.xlsx
index 4dc6cf85eb2e..e81b4f24e3e4 100644
Binary files a/sc/qa/uitest/data/autofilter/time_value.xlsx and b/sc/qa/uitest/data/autofilter/time_value.xlsx differ
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 3d8754caee3f..ec5ca8989634 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -1130,20 +1130,7 @@ void fillQueryParam(
if (aItem.meType == ScQueryEntry::ByString)
{
- sal_uInt32 nIndex = 0;
aItem.mbFormattedValue = true;
- bool bNumber = pDoc->GetFormatTable()->IsNumberFormat(rVal.StringValue, nIndex, aItem.mfVal);
- if (bNumber)
- {
- if (aItem.mfVal != 0.0)
- {
- OUString aStr;
- pDoc->GetFormatTable()->GetInputLineString(aItem.mfVal, nIndex, aStr);
- aItem.maString = rPool.intern(aStr);
- }
- else
- aItem.meType = ScQueryEntry::ByValue;
- }
}
else if (aItem.meType == ScQueryEntry::ByValue)
{
More information about the Libreoffice-commits
mailing list