summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfexport/rtfexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtfexport/rtfexport.cxx')
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 20f2a7d4c9e4..33d6ca41f6d2 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -78,6 +78,16 @@ public:
return false;
}
+
+ virtual void postLoad(const char* pFilename) SAL_OVERRIDE
+ {
+ if (OString(pFilename) == "tdf90421.fodt")
+ {
+ // Change the hyperlink, so its URL is empty.
+ uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1), 2), uno::UNO_QUERY);
+ xRun->setPropertyValue("HyperLinkURL", uno::makeAny(OUString()));
+ }
+ }
};
DECLARE_RTFEXPORT_TEST(testZoom, "zoom.rtf")
@@ -889,6 +899,19 @@ DECLARE_RTFEXPORT_TEST(testTdf80708, "tdf80708.rtf")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators").getLength());
}
+DECLARE_RTFEXPORT_TEST(testTdf90421, "tdf90421.fodt")
+{
+ if (mbExported)
+ {
+ SvMemoryStream aMemoryStream;
+ SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
+ aStream.ReadStream(aMemoryStream);
+ OString aData(static_cast<const char*>(aMemoryStream.GetData()), aMemoryStream.GetSize());
+ // This was some positive number, i.e. we exported a hyperlink with an empty URL.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), aData.indexOf("HYPERLINK"));
+ }
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */