sw/qa/extras/ooxmlimport/data/fdo69548.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 8 ++++++++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 10 +++------- 3 files changed, 11 insertions(+), 7 deletions(-)
New commits: commit 7ee2ce24c4060e16b6aa852edfcbe5c531c89b6e Author: Andras Timar <andras.ti...@collabora.com> Date: Wed Oct 16 09:29:56 2013 +0200 fdo#69548 do not remove last space from hyperlink target Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I7efd68fe21dddd7d9262d3e0b7400db67504e6bc diff --git a/sw/qa/extras/ooxmlimport/data/fdo69548.docx b/sw/qa/extras/ooxmlimport/data/fdo69548.docx new file mode 100644 index 0000000..6799f5e Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/fdo69548.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 7fe9b40a..fa5a4b6 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -142,6 +142,7 @@ public: void testFdo43093(); void testMultiColumnSeparator(); void testSmartart(); + void testFdo69548(); CPPUNIT_TEST_SUITE(Test); #if !defined(WNT) @@ -247,6 +248,7 @@ void Test::run() {"fdo43093.docx", &Test::testFdo43093}, {"multi-column-separator-with-line.docx", &Test::testMultiColumnSeparator}, {"smartart.docx", &Test::testSmartart}, + {"fdo69548.docx", &Test::testFdo69548}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1683,6 +1685,12 @@ void Test::testMultiColumnSeparator() CPPUNIT_ASSERT(bValue); } +void Test::testFdo69548() +{ + // The problem was that the last space in target URL was removed + CPPUNIT_ASSERT_EQUAL(OUString("#this is a bookmark"), getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 1be4289..2150362 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2225,14 +2225,10 @@ void FieldContext::AppendCommand(const OUString& rPart) if (bInString) { - if (bInStringNext) - { - sPart += OUString(' '); - sPart += sToken; - } - else + sPart += OUString(' '); + sPart += sToken; + if (!bInStringNext) { - sPart += sToken; aResult.push_back(sPart); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits