From 0d341d28f73603670e3b8c639c583229d3c723a6 Mon Sep 17 00:00:00 2001 From: PriyankaGaikwad Date: Tue, 28 Apr 2015 18:09:50 +0530 Subject: tdf#90908 : FILESAVE: XLSX wrong export of font size 18 After roundtrip is font size changed from 18 to 11 Current behavior: The 'sz' tag was not exported Expected behaviour: After RT 'sz' tag should export with value 18 XML Difference : Original Roundtrip Change-Id: I7955f89a8db9c18c11546f4c60aa130a0be14bb5 Reviewed-on: https://gerrit.libreoffice.org/15565 Tested-by: Markus Mohrhard Reviewed-by: Markus Mohrhard --- sc/qa/unit/data/xlsx/fontSize.xlsx | Bin 0 -> 9883 bytes sc/qa/unit/subsequent_export-test.cxx | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 sc/qa/unit/data/xlsx/fontSize.xlsx (limited to 'sc') diff --git a/sc/qa/unit/data/xlsx/fontSize.xlsx b/sc/qa/unit/data/xlsx/fontSize.xlsx new file mode 100644 index 000000000000..8811df7faec5 Binary files /dev/null and b/sc/qa/unit/data/xlsx/fontSize.xlsx differ diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index ecf39bd891e8..cd3e07b25814 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -138,6 +138,7 @@ public: void testSupBookVirtualPath(); void testSheetLocalRangeNameXLS(); void testSheetTextBoxHyperlink(); + void testFontSize(); CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); @@ -186,6 +187,7 @@ public: CPPUNIT_TEST(testImageWithSpecialID); CPPUNIT_TEST(testSheetLocalRangeNameXLS); CPPUNIT_TEST(testSheetTextBoxHyperlink); + CPPUNIT_TEST(testFontSize); CPPUNIT_TEST_SUITE_END(); @@ -2536,6 +2538,19 @@ void ScExportTest::testSheetTextBoxHyperlink() xDocSh->DoClose(); } +void ScExportTest::testFontSize() +{ + ScDocShellRef xDocSh = loadDoc("fontSize.", XLSX); + CPPUNIT_ASSERT(xDocSh.Is()); + + xmlDocPtr pDoc = XPathHelper::parseExport(&(*xDocSh), m_xSFactory, "xl/drawings/drawing1.xml", XLSX); + CPPUNIT_ASSERT(pDoc); + OUString fontSize = getXPath(pDoc, + "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp[1]/xdr:txBody/a:p[1]/a:r[1]/a:rPr", "sz"); + // make sure that the font size is 18 + CPPUNIT_ASSERT_EQUAL(OUString("1800"), fontSize); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit