diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-06-28 04:17:57 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-06-28 16:51:08 +0200 |
commit | be00e2a73d10483b675a080f4899f8bf85d331db (patch) | |
tree | d002b7c7ee598de181bbc18fca7f8da106899a08 /sc | |
parent | e7c6301e707fcc461bdda5ac74c7499f568ff716 (diff) |
add test for tdf#65848
Change-Id: I6a75fdf0eb615a80d76f9298d3dad8ecbec7c66e
Reviewed-on: https://gerrit.libreoffice.org/39335
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/xlsx/page_scale.xlsx | bin | 0 -> 4243 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/page_scale.xlsx b/sc/qa/unit/data/xlsx/page_scale.xlsx Binary files differnew file mode 100644 index 000000000000..070f218d6d04 --- /dev/null +++ b/sc/qa/unit/data/xlsx/page_scale.xlsx diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 38e83104aa83..d41e0eb0a912 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -238,6 +238,8 @@ public: void testTdf100709XLSX(); void testTdf97598XLSX(); + void testPageScalingXLSX(); + CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBooleanFormatXLSX); CPPUNIT_TEST(testBasicCellContentODS); @@ -358,6 +360,8 @@ public: CPPUNIT_TEST(testTdf100709XLSX); CPPUNIT_TEST(testTdf97598XLSX); + CPPUNIT_TEST(testPageScalingXLSX); + CPPUNIT_TEST_SUITE_END(); private: @@ -3892,6 +3896,22 @@ void ScFiltersTest::testCondFormatXLSB() xDocSh->DoClose(); } +void ScFiltersTest::testPageScalingXLSX() +{ + ScDocShellRef xDocSh = loadDoc("page_scale.", FORMAT_XLSX); + ScDocument& rDoc = xDocSh->GetDocument(); + + OUString aStyleName = rDoc.GetPageStyle(0); + ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool(); + SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SfxStyleFamily::Page ); + CPPUNIT_ASSERT(pStyleSheet); + + SfxItemSet& rSet = pStyleSheet->GetItemSet(); + sal_uInt16 nVal = static_cast<const SfxUInt16Item&>(rSet.Get(ATTR_PAGE_SCALE)).GetValue(); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(90), nVal); + + xDocSh->DoClose(); +} ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "sc/qa/unit/data" ) |