Kaydet (Commit) be00e2a7 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add test for tdf#65848

Change-Id: I6a75fdf0eb615a80d76f9298d3dad8ecbec7c66e
Reviewed-on: https://gerrit.libreoffice.org/39335Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst e7c6301e
...@@ -238,6 +238,8 @@ public: ...@@ -238,6 +238,8 @@ public:
void testTdf100709XLSX(); void testTdf100709XLSX();
void testTdf97598XLSX(); void testTdf97598XLSX();
void testPageScalingXLSX();
CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBooleanFormatXLSX); CPPUNIT_TEST(testBooleanFormatXLSX);
CPPUNIT_TEST(testBasicCellContentODS); CPPUNIT_TEST(testBasicCellContentODS);
...@@ -358,6 +360,8 @@ public: ...@@ -358,6 +360,8 @@ public:
CPPUNIT_TEST(testTdf100709XLSX); CPPUNIT_TEST(testTdf100709XLSX);
CPPUNIT_TEST(testTdf97598XLSX); CPPUNIT_TEST(testTdf97598XLSX);
CPPUNIT_TEST(testPageScalingXLSX);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -3892,6 +3896,22 @@ void ScFiltersTest::testCondFormatXLSB() ...@@ -3892,6 +3896,22 @@ void ScFiltersTest::testCondFormatXLSB()
xDocSh->DoClose(); 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() ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "sc/qa/unit/data" ) : ScBootstrapFixture( "sc/qa/unit/data" )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment