dev/null |binary sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 20 -------------------- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 ---- 3 files changed, 24 deletions(-)
New commits: commit 894a0f77c12f3ac4029bdeb671943f32bcad875c Author: László Németh <nem...@numbertext.org> AuthorDate: Wed Aug 26 11:13:48 2020 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Thu Aug 27 09:16:52 2020 +0200 Revert "tdf#123356 DOCX import: fix COUNT formula" This reverts commit f1f27b2487ccfb7a03190ff68eadbfb611dd9749. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport15.cxx Change-Id: Ic5c920fd70f350890c4b696797152be9307b4eee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101394 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/sw/qa/extras/ooxmlexport/data/tdf123356.docx b/sw/qa/extras/ooxmlexport/data/tdf123356.docx deleted file mode 100644 index 9432ca2dbb06..000000000000 Binary files a/sw/qa/extras/ooxmlexport/data/tdf123356.docx and /dev/null differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index 62d1339b3127..3661c3f0b973 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -113,26 +113,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123390, "tdf123390.docx") CPPUNIT_ASSERT_EQUAL(OUString("1"), xEnumerationAccess2->getPresentation(false).trim()); } -DECLARE_OOXMLEXPORT_TEST(testTdf123356, "tdf123356.docx") -{ - uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); - uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields()); - uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration()); - - uno::Reference<text::XTextField> xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(OUString("-11"), xEnumerationAccess1->getPresentation(true).trim()); - CPPUNIT_ASSERT_EQUAL(OUString("-11"), xEnumerationAccess1->getPresentation(false).trim()); - - // Tests cell formula COUNT(x) to SUM(x)/MEAN(x) conversion - uno::Reference<text::XTextField> xEnumerationAccess4(xFields->nextElement(), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(OUString("(SUM(<A1:C1>|<A2:B2>)/MEAN(<A1:C1>|<A2:B2>))"), xEnumerationAccess4->getPresentation(true).trim()); - CPPUNIT_ASSERT_EQUAL(OUString("5"), xEnumerationAccess4->getPresentation(false).trim()); - - uno::Reference<text::XTextField> xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(OUString("(SUM(<A1:C1>)/MEAN(<A1:C1>))"), xEnumerationAccess3->getPresentation(true).trim()); - CPPUNIT_ASSERT_EQUAL(OUString("3"), xEnumerationAccess3->getPresentation(false).trim()); -} - DECLARE_OOXMLEXPORT_TEST(testTdf123388, "tdf123388.docx") { uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index a482a3231551..b5a8f124c142 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4272,10 +4272,6 @@ OUString DomainMapper_Impl::convertFieldFormula(const OUString& input) { icu::RegexMatcher rmatch7("\\bSIGN\\s*(\\(([^()]*|([^()])*\\([^()]*\\)[^()]*)*\\))", usInput, rMatcherFlags, status); usInput = rmatch7.replaceAll(icu::UnicodeString("((0 L $1) - ($1 L 0))"), status); - /* Fix up COUNT(x) using SUM(x)/MEAN(x) (it supports only 1-level nesting) */ - icu::RegexMatcher rmatch8("\\bCOUNT\\s*(\\(([^()]*|([^()])*\\([^()]*\\)[^()]*)*\\))", usInput, rMatcherFlags, status); - usInput = rmatch8.replaceAll(icu::UnicodeString("(SUM$1/MEAN$1)"), status); - return OUString(usInput.getTerminatedBuffer()); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits