summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-11-14 19:03:05 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-11-15 10:32:49 +0100
commiteac3e6e746300df379226941ba75c4e0ce1feb7a (patch)
treeac53538cd0e45a7d6f67e5a6bcaed0a57716125d /sw/qa/extras/ooxmlexport/ooxmlexport.cxx
parentdd77f79f0acf202ba7ff40cdd5b7411d277b9d1c (diff)
n#789482 DOCX: export track change data after w:hyperlink
Change-Id: If204523d7da544b11b2d809993ada180476104ef
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 1a1c15791b16..8fe19859258f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -66,6 +66,7 @@ public:
void testFdo47669();
void testTableBorders();
void testFdo51550();
+ void testN789482();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -103,6 +104,7 @@ void Test::run()
{"fdo47669.docx", &Test::testFdo47669},
{"table-borders.docx", &Test::testTableBorders},
{"fdo51550.odt", &Test::testFdo51550},
+ {"n789482.docx", &Test::testN789482},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@@ -482,6 +484,24 @@ void Test::testFdo51550()
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDraws->getCount());
}
+void Test::testN789482()
+{
+ // The problem was that w:del was exported before w:hyperlink, resulting in an invalid XML.
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
+ getRun(xParagraph, 1, "Before. ");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Delete"), getProperty<OUString>(getRun(xParagraph, 2), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(sal_True, getProperty<sal_Bool>(getRun(xParagraph, 2), "IsStart"));
+
+ getRun(xParagraph, 3, "www.test.com");
+ CPPUNIT_ASSERT_EQUAL(OUString("http://www.test.com/"), getProperty<OUString>(getRun(xParagraph, 3), "HyperLinkURL"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Delete"), getProperty<OUString>(getRun(xParagraph, 4), "RedlineType"));
+ CPPUNIT_ASSERT_EQUAL(sal_False, getProperty<sal_Bool>(getRun(xParagraph, 4), "IsStart"));
+
+ getRun(xParagraph, 5, " After.");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();