From 24be7ef5887ec3598b3b34cb4fccff17ed6e1106 Mon Sep 17 00:00:00 2001 From: PriyankaGaikwad Date: Fri, 24 Apr 2015 18:25:11 +0530 Subject: tdf#90828 FILESAVE:XLSX export of underline color for text inside textbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem Description: Unable to save .xlsx with underline color for text inside textbox. Current behavior: After RT text underline color was not exported Expected behaviour: After RT text underline color should export Added export support for Change-Id: If8ffeb07f2f5e0b768689647e480792ea9c8540a Reviewed-on: https://gerrit.libreoffice.org/15514 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sc/qa/unit/data/xlsx/underlineColor.xlsx | Bin 0 -> 9605 bytes sc/qa/unit/subsequent_export-test.cxx | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 sc/qa/unit/data/xlsx/underlineColor.xlsx (limited to 'sc') diff --git a/sc/qa/unit/data/xlsx/underlineColor.xlsx b/sc/qa/unit/data/xlsx/underlineColor.xlsx new file mode 100644 index 000000000000..30346ce733db Binary files /dev/null and b/sc/qa/unit/data/xlsx/underlineColor.xlsx differ diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 4924adcb78a6..4256253a73ec 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -141,6 +141,7 @@ public: void testFontSize(); void testSheetCharacterKerningSpace(); void testSheetCondensedCharacterSpace(); + void testTextUnderlineColor(); CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); @@ -192,6 +193,7 @@ public: CPPUNIT_TEST(testFontSize); CPPUNIT_TEST(testSheetCharacterKerningSpace); CPPUNIT_TEST(testSheetCondensedCharacterSpace); + CPPUNIT_TEST(testTextUnderlineColor); CPPUNIT_TEST_SUITE_END(); @@ -2595,6 +2597,21 @@ void ScExportTest::testSheetCondensedCharacterSpace() xDocSh->DoClose(); } +void ScExportTest::testTextUnderlineColor() +{ + + ScDocShellRef xDocSh = loadDoc("underlineColor.", XLSX); + CPPUNIT_ASSERT(xDocSh.Is()); + + xmlDocPtr pDoc = XPathHelper::parseExport(&(*xDocSh), m_xSFactory, "xl/drawings/drawing1.xml", XLSX); + CPPUNIT_ASSERT(pDoc); + OUString color = getXPath(pDoc, + "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp[1]/xdr:txBody/a:p[1]/a:r[1]/a:rPr/a:uFill/a:solidFill/a:srgbClr", "val"); + // make sure that the underline color is RED + CPPUNIT_ASSERT(color.equals("ff0000")); +} + + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit