[Libreoffice-commits] core.git: sw/qa writerfilter/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 27 07:18:40 UTC 2020


 dev/null                                          |binary
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx        |   24 ----------------------
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    6 -----
 3 files changed, 1 insertion(+), 29 deletions(-)

New commits:
commit a2b48254e4ce731edcdbd2f3fa9f6720ae676ae8
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Wed Aug 26 11:51:41 2020 +0200
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Thu Aug 27 09:17:45 2020 +0200

    Revert "tdf#123390 DOCX import: fix SIGN formula"
    
    This reverts commit 4d9b72d1c3929eca04c7a2e363ab6214676b0f64.
    
    Change-Id: Icd342121c375b26ad9c95631ee118de5e0a5f585
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101397
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf123390.docx b/sw/qa/extras/ooxmlexport/data/tdf123390.docx
deleted file mode 100644
index c3591dbfd2e6..000000000000
Binary files a/sw/qa/extras/ooxmlexport/data/tdf123390.docx and /dev/null differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 8436eed13a04..ae3e174ca911 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -89,30 +89,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123354, "tdf123354.docx")
     CPPUNIT_ASSERT_EQUAL(OUString("233423"), xEnumerationAccess3->getPresentation(false).trim());
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf123390, "tdf123390.docx")
-{
-    // Tests cell formula SIGN(x) to (0 < x) - (x < 0) conversion
-    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("((0 L (-11)) - ((-11) L 0))"), xEnumerationAccess1->getPresentation(true).trim());
-    CPPUNIT_ASSERT_EQUAL(OUString("-1"), xEnumerationAccess1->getPresentation(false).trim());
-
-    uno::Reference<text::XTextField> xEnumerationAccess4(xFields->nextElement(), uno::UNO_QUERY);
-    CPPUNIT_ASSERT_EQUAL(OUString("((0 L (<B2>)) - ((<B2>) L 0))"), xEnumerationAccess4->getPresentation(true).trim());
-    CPPUNIT_ASSERT_EQUAL(OUString("0"), xEnumerationAccess4->getPresentation(false).trim());
-
-    uno::Reference<text::XTextField> xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
-    CPPUNIT_ASSERT_EQUAL(OUString("((0 L (0)) - ((0) L 0))"), xEnumerationAccess3->getPresentation(true).trim());
-    CPPUNIT_ASSERT_EQUAL(OUString("0"), xEnumerationAccess3->getPresentation(false).trim());
-
-    uno::Reference<text::XTextField> xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
-    CPPUNIT_ASSERT_EQUAL(OUString("((0 L (<B1>)) - ((<B1>) L 0))"), xEnumerationAccess2->getPresentation(true).trim());
-    CPPUNIT_ASSERT_EQUAL(OUString("1"), xEnumerationAccess2->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 b5a8f124c142..d720e53a2a53 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4264,14 +4264,10 @@ OUString DomainMapper_Impl::convertFieldFormula(const OUString& input) {
     icu::RegexMatcher rmatch5("\\bDEFINED\\s*\\(<([A-Z]+[0-9]+)>\\)", usInput, rMatcherFlags, status);
     usInput = rmatch5.replaceAll(icu::UnicodeString("DEFINED($1)"), status);
 
-    /* Fix up ABS(x) using SQRT(x POW 2) (it supports only 1-level nesting) */
+    /* Fix up ABS(x) using SQRT(x POW 2) - it supports only 1-level nesting */
     icu::RegexMatcher rmatch6("\\bABS\\s*(\\(([^()]*|([^()])*\\([^()]*\\)[^()]*)*\\))", usInput, rMatcherFlags, status);
     usInput = rmatch6.replaceAll(icu::UnicodeString("SQRT($1 POW 2)"), status);
 
-    /* Fix up SIGN(x) using (0 < x) - (x < 0) (it supports only 1-level nesting) */
-    icu::RegexMatcher rmatch7("\\bSIGN\\s*(\\(([^()]*|([^()])*\\([^()]*\\)[^()]*)*\\))", usInput, rMatcherFlags, status);
-    usInput = rmatch7.replaceAll(icu::UnicodeString("((0 L $1) - ($1 L 0))"), status);
-
     return OUString(usInput.getTerminatedBuffer());
 }
 


More information about the Libreoffice-commits mailing list