summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-19 05:26:16 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-05-19 05:33:48 +0200
commit02b6abe87c4a9d3c11f795d36078fcabbbda498b (patch)
treec32b13c5d72e78520f20712e931d4cbf062659dd
parent2ae89f59fdad8ac5a98ce02ea31cbe55a5048c43 (diff)
add test for tdf#91335
Change-Id: I27d70b5c3bdba01a57fa66416da725a426c6b784
-rw-r--r--sc/qa/unit/data/xlsx/cond_parent.xlsxbin0 -> 8207 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/cond_parent.xlsx b/sc/qa/unit/data/xlsx/cond_parent.xlsx
new file mode 100644
index 000000000000..90f900723437
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/cond_parent.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 249c04cacc8e..1c6f94a134ab 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -32,6 +32,7 @@
#include <editeng/editobj.hxx>
#include <editeng/borderline.hxx>
#include <editeng/flditem.hxx>
+#include <editeng/justifyitem.hxx>
#include <dbdata.hxx>
#include "validat.hxx"
#include "formulacell.hxx"
@@ -138,6 +139,7 @@ public:
void testCondFormatThemeColorXLSX();
void testCondFormatThemeColor2XLSX(); // negative bar color and axis color
void testComplexIconSetsXLSX();
+ void testCondFormatParentXLSX();
void testLiteralInFormulaXLS();
@@ -247,6 +249,7 @@ public:
CPPUNIT_TEST(testCondFormatThemeColorXLSX);
CPPUNIT_TEST(testCondFormatThemeColor2XLSX);
CPPUNIT_TEST(testComplexIconSetsXLSX);
+ CPPUNIT_TEST(testCondFormatParentXLSX);
CPPUNIT_TEST(testLiteralInFormulaXLS);
CPPUNIT_TEST(testNumberFormatHTML);
@@ -2469,6 +2472,20 @@ void ScFiltersTest::testComplexIconSetsXLSX()
testCustomIconSetsXLSX_Impl(rDoc, 3, 3, IconSet_3Arrows, 2);
}
+void ScFiltersTest::testCondFormatParentXLSX()
+{
+ ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc( "cond_parent.", XLSX );
+
+ CPPUNIT_ASSERT_MESSAGE("Failed to load cond_parent.xlsx", xDocSh.Is());
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+ const SfxItemSet* pCondSet = rDoc.GetCondResult(2, 5, 0);
+ const ScPatternAttr* pPattern = rDoc.GetPattern(2, 5, 0);
+ const SfxPoolItem& rPoolItem = pPattern->GetItem(ATTR_VER_JUSTIFY, pCondSet);
+ const SvxVerJustifyItem& rVerJustify = static_cast<const SvxVerJustifyItem&>(rPoolItem);
+ CPPUNIT_ASSERT_EQUAL(SVX_VER_JUSTIFY_TOP, static_cast<SvxCellVerJustify>(rVerJustify.GetValue()));
+}
+
void ScFiltersTest::testLiteralInFormulaXLS()
{
ScDocShellRef xDocSh = loadDoc("shared-string/literal-in-formula.", XLS);