diff options
author | Szabolcs Toth <szabolcs450@gmail.com> | 2019-09-11 13:49:56 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-10-04 07:36:27 +0200 |
commit | 89c0b79911c469518c8872a4ec06b3d2c61c357c (patch) | |
tree | 287cb2f16d60e03c18f32ffece59804ab4d28924 /sc/qa | |
parent | 1ab80992b8b9445e4cfad7f5b772bbef5a4b3c7b (diff) |
tdf#123341 XLSX: fix vertical alignment in comments
Import and export of VML element TextVAlign weren't
supported by Calc, losing vertical aligment of the
comments assigned to the spreadsheet cells.
Change-Id: Ice70d3c65021902991ae869b6c60e30e4cdef8c3
Reviewed-on: https://gerrit.libreoffice.org/78816
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/qa')
-rwxr-xr-x | sc/qa/unit/data/ods/CommentTextVAlign.ods | bin | 0 -> 7796 bytes | |||
-rwxr-xr-x | sc/qa/unit/subsequent_export-test.cxx | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/CommentTextVAlign.ods b/sc/qa/unit/data/ods/CommentTextVAlign.ods Binary files differnew file mode 100755 index 000000000000..a1cac792cbac --- /dev/null +++ b/sc/qa/unit/data/ods/CommentTextVAlign.ods diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 30cb91116875..eaadde60f558 100755 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -222,6 +222,7 @@ public: void testTdf79972XLSX(); void testTdf126024XLSX(); void testTdf126177XLSX(); + void testCommentTextVAlignment(); void testXltxExport(); @@ -349,6 +350,7 @@ public: CPPUNIT_TEST(testTdf79972XLSX); CPPUNIT_TEST(testTdf126024XLSX); CPPUNIT_TEST(testTdf126177XLSX); + CPPUNIT_TEST(testCommentTextVAlignment); CPPUNIT_TEST(testXltxExport); @@ -4486,6 +4488,22 @@ void ScExportTest::testTdf126177XLSX() assertXPath(pXmlRels, "/r:Relationships/r:Relationship", "TargetMode", "External"); } +void ScExportTest::testCommentTextVAlignment() +{ + // Testing comment text alignments. + ScDocShellRef xShell = loadDoc("CommentTextVAlign.", FORMAT_ODS); + CPPUNIT_ASSERT(xShell.is()); + + std::shared_ptr<utl::TempFile> pXPathFile + = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX); + + const xmlDocPtr pVmlDrawing + = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/drawings/vmlDrawing1.vml"); + CPPUNIT_ASSERT(pVmlDrawing); + + assertXPathContent(pVmlDrawing, "/xml/v:shape/xx:ClientData/xx:TextVAlign", "Center"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |