sc/qa/unit/data/xlsx/page_scale.xlsx |binary sc/qa/unit/subsequent_filters-test.cxx | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+)
New commits: commit be00e2a73d10483b675a080f4899f8bf85d331db Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Jun 28 04:17:57 2017 +0200 add test for tdf#65848 Change-Id: I6a75fdf0eb615a80d76f9298d3dad8ecbec7c66e Reviewed-on: https://gerrit.libreoffice.org/39335 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/qa/unit/data/xlsx/page_scale.xlsx b/sc/qa/unit/data/xlsx/page_scale.xlsx new file mode 100644 index 000000000000..070f218d6d04 Binary files /dev/null and b/sc/qa/unit/data/xlsx/page_scale.xlsx differ 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" ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits