[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 29 16:19:28 UTC 2020
sc/qa/unit/data/ods/tdf130132.ods |binary
sc/qa/unit/subsequent_filters-test.cxx | 19 +++++++++++++++++++
2 files changed, 19 insertions(+)
New commits:
commit 1332a16f42c47f377a29cb53c17704a449235664
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Jan 29 16:08:35 2020 +0100
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Jan 29 17:18:05 2020 +0100
tdf#130132, tdf#129393: Add unittest
Change-Id: Ia613dca3dc8bb1aa2e45e73149932be6ac61f8cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87691
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf130132.ods b/sc/qa/unit/data/ods/tdf130132.ods
new file mode 100644
index 000000000000..d37487ce6ef6
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf130132.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 113d0d0b188f..d57404bc3ed9 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -217,6 +217,7 @@ public:
void testRefStringXLSX();
void testHiddenSheetsXLSX();
void testRelFormulaValidationXLS();
+ void testTdf130132();
void testColumnStyle2XLSX();
void testAutofilterXLSX();
@@ -358,6 +359,7 @@ public:
CPPUNIT_TEST(testEditEngStrikeThroughXLSX);
CPPUNIT_TEST(testRefStringXLSX);
CPPUNIT_TEST(testRelFormulaValidationXLS);
+ CPPUNIT_TEST(testTdf130132);
CPPUNIT_TEST(testColumnStyle2XLSX);
CPPUNIT_TEST(testAutofilterXLSX);
@@ -3464,6 +3466,23 @@ void ScFiltersTest::testRefStringXLSX()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf130132()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf130132.", FORMAT_ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+ const ScPatternAttr* pAttr = rDoc.GetPattern(434, 0, 0);
+
+ {
+ const SfxPoolItem& rItem = pAttr->GetItem(ATTR_BACKGROUND);
+ const SvxBrushItem& rBackground = static_cast<const SvxBrushItem&>(rItem);
+ const Color& rColor = rBackground.GetColor();
+ // background colour is yellow
+ CPPUNIT_ASSERT_EQUAL(Color(255, 255, 0), rColor);
+ }
+}
+
void ScFiltersTest::testColumnStyle2XLSX()
{
ScDocShellRef xDocSh = loadDoc("column_style.", FORMAT_XLSX);
More information about the Libreoffice-commits
mailing list