[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - 2 commits - formula/source sw/qa writerfilter/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 28 19:57:28 UTC 2021


 dev/null                                    |binary
 formula/source/core/api/FormulaCompiler.cxx |    9 ++++++++-
 sw/qa/extras/layout/layout2.cxx             |   16 ----------------
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx   |    2 +-
 writerfilter/source/filter/WriterFilter.cxx |    1 -
 5 files changed, 9 insertions(+), 19 deletions(-)

New commits:
commit 43d2b3bbacdd6bbe24149ed33c54a180d74c77e4
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Wed Jul 28 15:03:21 2021 +0200
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Wed Jul 28 21:57:05 2021 +0200

    Revert "tdf#58521 DOCX import: enable ContinuousEndnotes compat flag"
    
    This reverts commit e35fc16969c0d0a55538733d76fc4bb03bf137b0.
    
    Reason for revert: tdf#143456 shows there are layout problems with this compatibility option
    
    Change-Id: I4f03b9a0cbc6de1d3dbf79681f7caa203a1ce59c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119451
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/qa/extras/layout/data/tdf58521_endnotes.docx b/sw/qa/extras/layout/data/tdf58521_endnotes.docx
deleted file mode 100644
index f709a104c918..000000000000
Binary files a/sw/qa/extras/layout/data/tdf58521_endnotes.docx and /dev/null differ
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index a1c94ea2cb39..1db5f1e69214 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -1571,22 +1571,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testUserFieldTypeLanguage)
                 "1,234.56");
 }
 
-CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf58521)
-{
-    // This is a testcase for the ContinuousEndnotes compat flag in docx.
-    // The document has 2 pages, the endnote anchor is on the first page.
-    // The endnote should be on the 2nd page together with the last page content.
-    createSwDoc(DATA_DIRECTORY, "tdf58521_endnotes.docx");
-    xmlDocUniquePtr pXmlDoc = parseLayoutDump();
-
-    // Without the accompanying fix in place, this test would have failed with:
-    // - Expected: 2
-    // - Actual  : 3
-    // i.e. there was a separate endnote page
-    assertXPath(pXmlDoc, "/root/page", 2);
-    assertXPath(pXmlDoc, "/root/page[2]/ftncont", 1);
-}
-
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index f6d643f7af88..6f784e6174c1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -948,7 +948,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82173_endnoteStyle, "tdf82173_endnoteStyle.docx"
 
 DECLARE_OOXMLEXPORT_TEST(testTdf55427_footnote2endnote, "tdf55427_footnote2endnote.odt")
 {
-    CPPUNIT_ASSERT_EQUAL(5, getPages());
+    CPPUNIT_ASSERT_EQUAL(4, getPages());
     uno::Reference<beans::XPropertySet> xPageStyle(getStyles("ParagraphStyles")->getByName("Footnote"), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote style is rose color", sal_Int32(0xFF007F), getProperty< sal_Int32 >(xPageStyle, "CharColor") );
     xPageStyle.set(getStyles("ParagraphStyles")->getByName("Endnote"), uno::UNO_QUERY);
diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx
index a42e4bd186b4..2d20ab1ef0c3 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -332,7 +332,6 @@ void WriterFilter::setTargetDocument(const uno::Reference<lang::XComponent>& xDo
     xSettings->setPropertyValue("PropLineSpacingShrinksFirstLine", uno::makeAny(true));
     xSettings->setPropertyValue("DoNotCaptureDrawObjsOnPage", uno::makeAny(true));
     xSettings->setPropertyValue("DisableOffPagePositioning", uno::makeAny(true));
-    xSettings->setPropertyValue("ContinuousEndnotes", uno::makeAny(true));
 }
 
 void WriterFilter::setSourceDocument(const uno::Reference<lang::XComponent>& xDoc)
commit 0844bdd6b26af94350ee76803db8c95bc6118255
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Wed Jul 28 02:00:53 2021 +0200
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Wed Jul 28 21:56:49 2021 +0200

    ODFF: eliminate spaces between function name and initial opening parenthesis
    
    Same as for OOXML, they are disallowed in ODFF as well.
    
    Change-Id: Iff78a901838092a3ee32221fdaadd28ee50f7646
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119577
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 6eb9fde88af245a00247fca8a592ed08ee4b8bbe)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119449
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 3907c1ac8314..be5ce09d132f 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -2290,11 +2290,18 @@ const FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuf
                 bWriteSpaces = false;
             }
         }
-        else if (mxSymbols->isOOXML())
+        if (bWriteSpaces)
         {
+            // ODF v1.3 OpenFormula 5.14 Whitespace states "whitespace shall
+            // not separate a function name from its initial opening
+            // parenthesis".
+            //
             // ECMA-376-1:2016 18.17.2 Syntax states "that no space characters
             // shall separate a function-name from the left parenthesis (()
             // that follows it." and Excel even chokes on it.
+            //
+            // Suppress/remove it in any case also in UI, it will not be
+            // preserved.
             const FormulaToken* p = maArrIterator.PeekPrevNoSpaces();
             if (p && p->IsFunction())
             {


More information about the Libreoffice-commits mailing list