[Libreoffice-commits] core.git: sw/qa writerfilter/source
Oliver Specht
oliver.specht at cib.de
Mon Oct 5 22:50:06 PDT 2015
sw/qa/extras/ooxmlimport/data/tdf91417.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 10 ++++++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 501e757649b760229cca1327ac2cf1945dc745a4
Author: Oliver Specht <oliver.specht at cib.de>
Date: Mon Oct 5 13:32:14 2015 +0200
tdf#91417: import hyperlink with history flag correctly
ignore '\h' flag in hyperlinks imported from docx
including import test
Change-Id: I512e811050704f118bf9b2c786378f99e5d04378
Reviewed-on: https://gerrit.libreoffice.org/19154
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht at cib.de>
diff --git a/sw/qa/extras/ooxmlimport/data/tdf91417.docx b/sw/qa/extras/ooxmlimport/data/tdf91417.docx
new file mode 100755
index 0000000..1427f8c
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf91417.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 4f21820..3b1024e 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2851,6 +2851,16 @@ DECLARE_OOXMLIMPORT_TEST(testTdf93919, "tdf93919.docx")
// This was 0, left margin was not inherited from the list style.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
}
+DECLARE_OOXMLIMPORT_TEST(testTdf91417, "tdf91417.docx")
+{
+ // The first paragraph should contain a link to "http://www.google.com/"
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextCursor> xTextCursor(xTextDocument->getText()->createTextCursor( ), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xCursorProps(xTextCursor, uno::UNO_QUERY);
+ OUString aValue;
+ xCursorProps->getPropertyValue("HyperLinkURL") >>= aValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("http://www.google.com/"), aValue);
+}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index d6b1334c..ec8129a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3838,7 +3838,7 @@ void DomainMapper_Impl::CloseFieldCommand()
sURL += "#" + *aPartIt;
}
- else if ( *aPartIt == "\\m" || *aPartIt == "\\n" )
+ else if (*aPartIt == "\\m" || *aPartIt == "\\n" || *aPartIt == "\\h")
{
}
else if ( *aPartIt == "\\o" || *aPartIt == "\\t" )
More information about the Libreoffice-commits
mailing list