From daba307859942e17ec6686988d5d7ac34b06d438 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 10 Mar 2025 11:12:34 +0100 Subject: [PATCH] tdf#154311: sc_subsequent_filters: Add unittest Change-Id: Id59ad205a969abc0ae9d2f9cc34a24b25323f682 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182728 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sc/qa/unit/data/xml/tdf154311.xml | 252 ++++++++++++++++++++++++ sc/qa/unit/subsequent_filters_test2.cxx | 16 ++ 2 files changed, 268 insertions(+) create mode 100644 sc/qa/unit/data/xml/tdf154311.xml diff --git a/sc/qa/unit/data/xml/tdf154311.xml b/sc/qa/unit/data/xml/tdf154311.xml new file mode 100644 index 000000000000..7c044e12010a --- /dev/null +++ b/sc/qa/unit/data/xml/tdf154311.xml @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MyLife Organized Excel Export File + + + File name: + D:\Donnees\x2002063\Mes documents\MyLifeOrganized\MyLifeOrganizedDemo.ml + + + Export time: + 22/10/2007 11:31:17 + + + + + + Number of tasks: + 73 + + + Number of completed tasks: + 15 + + + Number of projects: + 7 + + + Total time required (min/max) + 513 hours, 25 min / 879 hours, 13 min + + + Is completed + Task name + Start time + Due time + Recurrence + Places + Notes + Outlined task name + Full path + Created + Modified + Completed + Importance + Urgency + Goal + Project (immediate) + Project (top level) + Is project + Project Status + Project Completion % + Task Effort + Min time required + Max time required + Hide in To-Do + Complete subtasks in order + Has subtasks + Has uncompleted subtasks + Priority By Importance + Priority By Urgency + Priority By Both + + + + + Business and Career + + + + + + @Office + + + + Business and Career + + + \ + + + 2007-10-22T11:27:38 + + + 2007-10-22T11:27:38 + + + + 75 + + + 100 + + + + + + + + + 50 + + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + +
+ + +
+
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx index f1d9faec8c4b..4b2bc019d153 100644 --- a/sc/qa/unit/subsequent_filters_test2.cxx +++ b/sc/qa/unit/subsequent_filters_test2.cxx @@ -368,6 +368,22 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testColumnStyleAutoFilterXLSX) CPPUNIT_ASSERT(!rAttr.HasAutoFilter()); } +CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testTdf154311) +{ + createScDoc("xml/tdf154311.xml"); + ScDocument* pDoc = getScDoc(); + + // From Column A to Y + for (SCCOL nCol = 0; nCol <= 24; ++nCol) + { + const ScPatternAttr* pPattern = pDoc->GetPattern(nCol, 10, 0); + CPPUNIT_ASSERT(pPattern); + + const ScMergeFlagAttr& rAttr = pPattern->GetItem(ATTR_MERGE_FLAG); + CPPUNIT_ASSERT(rAttr.HasAutoFilter()); + } +} + CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testSharedFormulaHorizontalXLS) { createScDoc("xls/shared-formula/horizontal.xls");