Kaydet (Commit) 501e7576 authored tarafından Oliver Specht's avatar Oliver Specht

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/19154Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarOliver Specht <oliver.specht@cib.de>
üst b1a6a99b
......@@ -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();
......
......@@ -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" )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment