[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/qa writerfilter/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 27 14:31:09 UTC 2019
sw/qa/extras/ooxmlimport/data/tdf126114.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 7 +++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit e48aa5f55fd80f3e50d642c86a89c7506e04c4f8
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Jun 26 20:04:37 2019 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Thu Jun 27 16:28:39 2019 +0200
tdf#126114 - Form fields are displayed twice (double)
We need to make sure that IsFieldResultAsString() returns true
for drop-down field, to ignore the placeholder string.
Change-Id: I127800bdff78eb68e000fdbfe433bc88181ac2c3
Reviewed-on: https://gerrit.libreoffice.org/74752
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit 8e5982d799e23bee86404f3ccb3aaed524ae9675)
Reviewed-on: https://gerrit.libreoffice.org/74796
diff --git a/sw/qa/extras/ooxmlimport/data/tdf126114.docx b/sw/qa/extras/ooxmlimport/data/tdf126114.docx
new file mode 100644
index 000000000000..33e0395689c6
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf126114.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 1c7282623b00..629c390de4ca 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -365,6 +365,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf124670, "tdf124670.docx")
paragraph->getString());
}
+DECLARE_OOXMLIMPORT_TEST(testTdf126114, "tdf126114.docx")
+{
+ // The problem was that after the drop-down form field, also the placeholder string
+ // was imported as text. Beside the duplication of the field, it also caused a crash.
+ CPPUNIT_ASSERT_EQUAL(7, getLength());
+}
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f03ee6f8271b..19bfff932e30 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4925,7 +4925,7 @@ bool DomainMapper_Impl::IsFieldResultAsString()
OSL_ENSURE( pContext.get(), "no field context available");
if( pContext.get() )
{
- bRet = pContext->GetTextField().is();
+ bRet = pContext->GetTextField().is() || pContext->GetFieldId() == FIELD_FORMDROPDOWN;
}
return bRet;
}
More information about the Libreoffice-commits
mailing list