diff options
author | yogesh.bharate001 <yogesh.bharate@synerzip.com> | 2015-04-27 15:08:16 +0530 |
---|---|---|
committer | Joren De Cuyper <jorendc@libreoffice.org> | 2015-05-11 19:02:45 +0000 |
commit | 8865ed2efecd03722d10e522265f31c99b13b2bb (patch) | |
tree | fc9802f0444a440769f65ef2a983a841311f7d7f /sc/qa | |
parent | 686034d5ced19ea2a16127ba3f5af49e7f9e1b35 (diff) |
tdf#90812: rPr is not exported after roundtrip.
Problem Description:
XML Difference: In sharedStrings.xml
Original file :
<r>
<rPr>
<sz val="11"/>
<color rgb="FFFF0000"/>
<rFont val="Calibri"/>
<family val="2"/>
<scheme val="minor"/>
</rPr>
<t>Red</t>
</r>
Roundtrip file:
<r>
<t>Red</t>
</r>
rPr is missing in roundtrip file.
Conflicts:
sc/qa/unit/subsequent_export-test.cxx
Change-Id: I79efd0f8f1a735ef7e4ebd3fda220b3e339ea91c
Reviewed-on: https://gerrit.libreoffice.org/15548
Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/xlsx/TextColor.xlsx | bin | 0 -> 9531 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 20 |
2 files changed, 19 insertions, 1 deletions
diff --git a/sc/qa/unit/data/xlsx/TextColor.xlsx b/sc/qa/unit/data/xlsx/TextColor.xlsx Binary files differnew file mode 100644 index 000000000000..4de93876379a --- /dev/null +++ b/sc/qa/unit/data/xlsx/TextColor.xlsx diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 42d8b42b6f3d..d42e29eb8357 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -142,6 +142,7 @@ public: void testSheetCharacterKerningSpace(); void testSheetCondensedCharacterSpace(); void testTextUnderlineColor(); + void testSheetRunParagraphProperty(); CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); @@ -194,6 +195,7 @@ public: CPPUNIT_TEST(testSheetCharacterKerningSpace); CPPUNIT_TEST(testSheetCondensedCharacterSpace); CPPUNIT_TEST(testTextUnderlineColor); + CPPUNIT_TEST(testSheetRunParagraphProperty); CPPUNIT_TEST_SUITE_END(); @@ -220,7 +222,8 @@ void ScExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) { BAD_CAST("table"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:table:1.0") }, { BAD_CAST("text"), BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:text:1.0") }, { BAD_CAST("xlink"), BAD_CAST("http://www.w3c.org/1999/xlink") }, - { BAD_CAST("xdr"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing") } + { BAD_CAST("xdr"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing") }, + { BAD_CAST("x"), BAD_CAST("http://schemas.openxmlformats.org/spreadsheetml/2006/main") } }; for(size_t i = 0; i < SAL_N_ELEMENTS(aNamespaces); ++i) { @@ -2611,6 +2614,21 @@ void ScExportTest::testTextUnderlineColor() CPPUNIT_ASSERT_EQUAL(OUString("ff0000"), color); } +void ScExportTest::testSheetRunParagraphProperty() +{ + ScDocShellRef xShell = loadDoc("TextColor.", XLSX); + CPPUNIT_ASSERT(xShell.Is()); + + ScDocShellRef xDocSh = saveAndReload(&(*xShell), XLSX); + CPPUNIT_ASSERT(xDocSh.Is()); + + xmlDocPtr pDoc = XPathHelper::parseExport(&(*xDocSh), m_xSFactory, "xl/sharedStrings.xml", XLSX); + CPPUNIT_ASSERT(pDoc); + + assertXPath(pDoc, "/x:sst/x:si/x:r[1]/x:rPr[1]", 1); + + xDocSh->DoClose(); +} CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); |