diff options
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" ) |