diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2016-12-17 10:53:12 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-03-26 21:34:48 +0200 |
commit | c44e25d3c0536c7b963e9102941d42abf1e154b6 (patch) | |
tree | e7a99964e1b8e443b59e0a7bc23cea6918c27318 /sc/qa | |
parent | 0d8837b7d03dd4d82ca28919c4b106bf5724214a (diff) |
tdf#104729 FILESAVE Save author name in comment during export to .xlsx
Change-Id: I59d46f6a713e4f252844cda0f631ace239d73cdb
Reviewed-on: https://gerrit.libreoffice.org/32115
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 36cdf3c35459df63ce137e550a6840a61865c0ca)
(cherry picked from commit b61abf2d3d8638ace8abd08911b06a3ab1478799)
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/ods/comment.ods | bin | 0 -> 8636 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/comment.ods b/sc/qa/unit/data/ods/comment.ods Binary files differnew file mode 100644 index 000000000000..b772a6f00395 --- /dev/null +++ b/sc/qa/unit/data/ods/comment.ods diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 7060520294d8..b5c2cd2f83dd 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -108,6 +108,8 @@ public: void testCellNoteExportXLS(); void testFormatExportODS(); + + void testCommentExportXLSX(); void testCustomColumnWidthExportXLSX(); void testXfDefaultValuesXLSX(); void testColumnWidthResaveXLSX(); @@ -209,6 +211,7 @@ public: CPPUNIT_TEST(testCellNoteExportXLS); CPPUNIT_TEST(testFormatExportODS); + CPPUNIT_TEST(testCommentExportXLSX); CPPUNIT_TEST(testCustomColumnWidthExportXLSX); CPPUNIT_TEST(testXfDefaultValuesXLSX); CPPUNIT_TEST(testColumnWidthResaveXLSX); @@ -499,6 +502,24 @@ void ScExportTest::testFormatExportODS() xDocSh->DoClose(); } + +void ScExportTest::testCommentExportXLSX() +{ + //tdf#104729 FILESAVE OpenOffice do not save author of the comment during export to .xlsx + ScDocShellRef xShell = loadDoc("comment.", FORMAT_ODS); + CPPUNIT_ASSERT(xShell.Is()); + + std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX); + xmlDocPtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/comments1.xml"); + CPPUNIT_ASSERT(pSheet); + + assertXPath(pSheet, "/x:comments/x:authors/x:author[1]", "BAKO"); + assertXPath(pSheet, "/x:comments/x:authors/x:author", 1); + + assertXPath(pSheet, "/x:comments/x:commentList/x:comment/x:text/x:r/x:t", "Komentarz"); + +} + void ScExportTest::testCustomColumnWidthExportXLSX() { //tdf#100946 FILESAVE Excel on OS X ignored column widths in XLSX last saved by LO |