core.git: sw/qa xmloff/source
sw/qa/extras/odfexport/odfexport2.cxx |6 +- xmloff/source/text/XMLTextListBlockContext.hxx |1 xmloff/source/text/txtimp.cxx | 72 - 3 files changed, 5 insertions(+), 74 deletions(-) New commits: commit 546741148863ae0b2a25cc994a7323c8113cb573 Author: Michael Stahl AuthorDate: Fri Apr 19 18:04:47 2024 +0200 Commit: Michael Stahl CommitDate: Fri Apr 26 13:08:35 2024 +0200 tdf#114287 tdf#159366 xmloff: ODF import: revert text:list override This reverts commit ade0a153f453500f15343380ac937252992733e0 "tdf#114287 xmloff: ODF import: fix text:list override of list style" and subsequent commits 7cf5faec6fdbc27dd77d2d36fb2ff205322cba0d and 1b2a6b98291cf8b7022951be19b915fe2a9e18e6. It turns out that there is actually a paragraph in ODF 1.2 and later that gives paragraph's indent priority over the list style's, which i unfortunately missed when investigating the above issues: 17.20 ... The fo:text-indent and fo:margin-left attributes are evaluated only for paragraphs inside list items whose paragraph styles do not specify them. If one of the two properties, or both, are specified by the paragraph style, the text indent and/or left margin are taken from the paragraph style. In this case the paragraph style's properties are used to determine the indent and margin for the text lines and thus also the alignment position. This is usually interpreted as "on the same level", so applying a list-style at a paragraph style overrides the indents inherited from a parent paragraph style, but if the style then specifies its own indents that overrides the list style's indents. Furthermore it turns out that Google Docs now imports this bugdoc the same way as LO 7.5 does; unclear if that changed recently (it shows it like Word does in the preview, but like LO 7.5 does after opening it). This means the way MS Word imports the bugdoc, which remains unchanged, now looks like a bug and we should not change LO to be compatible with it (when the same structure is created in Word, storing to ODF and loading again, it looks different too). Change-Id: I0c65bde38de9e6fcbccec55899c60c3245adb5ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166309 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index 0da0ca9ac69f..be3f891b4e81 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -1046,9 +1046,9 @@ DECLARE_ODFEXPORT_TEST(testTdf114287, "tdf114287.odt") xmlDocUniquePtr pXmlDoc = parseLayoutDump(); assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/infos/prtBounds"_ostr, "left"_ostr, "2268"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/infos/prtBounds"_ostr, "right"_ostr, "11339"); -// the problem was that the list style name of the list must override the -// paragraph style even though it's the same list style -assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/infos/prtBounds"_ostr, "left"_ostr, "357"); +// the list style name of the list is the same as the list style name of the +// paragraph, but in any case the margins of the paragraph take precedence +assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/infos/prtBounds"_ostr, "left"_ostr, "2268"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/infos/prtBounds"_ostr, "right"_ostr, "11339"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/infos/prtBounds"_ostr, "left"_ostr, "357"); assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/infos/prtBounds"_ostr, "right"_ostr, "11339"); diff --git a/xmloff/source/text/XMLTextListBlockContext.hxx b/xmloff/source/text/XMLTextListBlockContext.hxx index 4b18d625cc36..a529afd1e476 100644 --- a/xmloff/source/text/XMLTextListBlockContext.hxx +++ b/xmloff/source/text/XMLTextListBlockContext.hxx @@ -66,7 +66,6 @@ public: void ResetRestartNumbering() { mbRestartNumbering = false; } /// does this list have (possibly inherited from parent) list-style-name? -bool HasListStyleName() { return !msListStyleName.isEmpty(); } const css::uno::Reference < css::container::XIndexReplace >& GetNumRules() const { return mxNumRules; } diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index b0790da2cf46..21870f73a063 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1002,45 +1002,6 @@ static bool lcl_HasListStyle( const OUString& sStyleName, return bRet; } -namespace { - -auto IsPropertySet(uno::Reference const& rxParaStyles, -uno::Reference const& rxPropSet, -OUString const& rProperty) -{ -uno::Reference const xPropState(rxPropSet, uno::UNO_QUERY); -// note: this is true only if it is set in
core.git: sw/source
sw/source/filter/html/htmlctxt.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit ac05822b8957d80018d3ce1cbf97cd9faa0dfe99 Author: Michael Stahl AuthorDate: Thu Apr 25 18:20:20 2024 +0200 Commit: Michael Stahl CommitDate: Fri Apr 26 12:59:19 2024 +0200 tdf#154581 tdf#157411 tdf#158549 sw: HTML import: fix SfxItemIter reuse This is obviously wrong, as ALG just pointed out: the aIter is at the end after the 1st loop, so the 2nd loop does nothing. Thx Gabor for checking all the reported bugs. (regression from commit db115bec9254417ef7a3faf687478fe5424ab378) Change-Id: Iae37b9ab5c630d0ee774f42c84d5e76349b92a90 Tested-by: Gabor Kelemen Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166643 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index 80245ba2ea6a..0e87b83644f8 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -656,7 +656,8 @@ void SwHTMLParser::InsertAttrs( SfxItemSet , } #endif -for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem()) +SfxItemIter aIter2(rItemSet); +for (const SfxPoolItem* pItem = aIter2.GetCurItem(); pItem; pItem = aIter2.NextItem()) { HTMLAttr **ppAttr = nullptr;
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/core/text/data/Broken indent demo.odt |binary sw/qa/core/text/data/tdf156146.fodt | 281 sw/qa/core/text/text.cxx| 62 ++ sw/source/core/text/inftxt.hxx |6 sw/source/core/text/itratr.hxx |2 sw/source/core/text/itrtxt.hxx |2 6 files changed, 348 insertions(+), 5 deletions(-) New commits: commit bd3519a67250550e8b793ca11b1b620feb988dfe Author: Michael Stahl AuthorDate: Thu Apr 18 18:23:29 2024 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Apr 22 17:50:10 2024 +0200 tdf#156146 tdf#159903 sw: add unit tests Unfortunately the actual computed margins are not stored in text formatting data structures so are only available directly from SwTextMargin. Change-Id: Ia7ce5e148194a55b5d9874ed112aaa977ed16c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166258 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0c7ae3bd96130eaa400d55a3ba9bf1e2fe6600de) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166221 Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/qa/core/text/data/Broken indent demo.odt b/sw/qa/core/text/data/Broken indent demo.odt new file mode 100644 index ..af5928bfa556 Binary files /dev/null and b/sw/qa/core/text/data/Broken indent demo.odt differ diff --git a/sw/qa/core/text/data/tdf156146.fodt b/sw/qa/core/text/data/tdf156146.fodt new file mode 100644 index ..1587cd945e49 --- /dev/null +++ b/sw/qa/core/text/data/tdf156146.fodt @@ -0,0 +1,281 @@ + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2023-06-14T01:10:01.4975110772024-04-18T18:00:26.359273842PT14M47S2ZetaOffice/7.4.8.0.0$Linux_X86_64 LibreOffice_project/b82f1163cc2fc696cf86209d94d838d04998350f + + + false + false + false + true + true + true + true + true + false + 0 + false + false + false + true + false + false + true + false + false + false + false + true + true + true + false + false + false + false + false + false + false + false + true + false + false + true + false + false + false + true + 0 + 1 + true + false + + high-resolution + true + + + false + false + true + false + true + true + true + false + true + + true + 910346 + + true + false + true + true + 0 + + false + false + false + true + false + true + 0 + false + false + false + false + true + false + false + false + + false + false + true + false + false + false + false + false + false + false + false + false + 811422 + false + false + false + false + false + true + false + true + true + + + + + + +
core.git: Branch 'libreoffice-7-6' - sw/qa sw/source
sw/qa/core/text/data/Broken indent demo.odt |binary sw/qa/core/text/data/tdf156146.fodt | 281 sw/qa/core/text/text.cxx| 62 ++ sw/source/core/text/inftxt.hxx |6 sw/source/core/text/itratr.hxx |2 sw/source/core/text/itrtxt.hxx |2 6 files changed, 348 insertions(+), 5 deletions(-) New commits: commit 2545b0885bdd269b4937ed9ef4813ed5597d71cc Author: Michael Stahl AuthorDate: Thu Apr 18 18:23:29 2024 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Apr 22 17:49:59 2024 +0200 tdf#156146 tdf#159903 sw: add unit tests Unfortunately the actual computed margins are not stored in text formatting data structures so are only available directly from SwTextMargin. Change-Id: Ia7ce5e148194a55b5d9874ed112aaa977ed16c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166258 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0c7ae3bd96130eaa400d55a3ba9bf1e2fe6600de) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166222 Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/qa/core/text/data/Broken indent demo.odt b/sw/qa/core/text/data/Broken indent demo.odt new file mode 100644 index ..af5928bfa556 Binary files /dev/null and b/sw/qa/core/text/data/Broken indent demo.odt differ diff --git a/sw/qa/core/text/data/tdf156146.fodt b/sw/qa/core/text/data/tdf156146.fodt new file mode 100644 index ..1587cd945e49 --- /dev/null +++ b/sw/qa/core/text/data/tdf156146.fodt @@ -0,0 +1,281 @@ + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2023-06-14T01:10:01.4975110772024-04-18T18:00:26.359273842PT14M47S2ZetaOffice/7.4.8.0.0$Linux_X86_64 LibreOffice_project/b82f1163cc2fc696cf86209d94d838d04998350f + + + false + false + false + true + true + true + true + true + false + 0 + false + false + false + true + false + false + true + false + false + false + false + true + true + true + false + false + false + false + false + false + false + false + true + false + false + true + false + false + false + true + 0 + 1 + true + false + + high-resolution + true + + + false + false + true + false + true + true + true + false + true + + true + 910346 + + true + false + true + true + 0 + + false + false + false + true + false + true + 0 + false + false + false + false + true + false + false + false + + false + false + true + false + false + false + false + false + false + false + false + false + 811422 + false + false + false + false + false + true + false + true + true + + + + + + +
core.git: Branch 'libreoffice-7-6' - xmloff/source
xmloff/source/text/txtimp.cxx |8 1 file changed, 8 insertions(+) New commits: commit 0b816bade2395d532862e8f2bba6fd7ea0ce540f Author: Michael Stahl AuthorDate: Thu Apr 18 13:00:04 2024 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Apr 22 16:47:01 2024 +0200 tdf#159903 xmloff: ODF import: fix bug in margin compatibility override The check for the property being set was wrong: the state in a parent style may be DIRECT_VALUE but a derived style may have a list style set, which effectively overrides the ParaLeftMargin and ParaFirstLineIndent. Fix this so that the compatibility override only happens when required. (regression from commit 7cf5faec6fdbc27dd77d2d36fb2ff205322cba0d) Change-Id: I6c8ca493df946afcb48a63c01c132620bcd7b390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166257 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 1b2a6b98291cf8b7022951be19b915fe2a9e18e6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166218 Reviewed-by: Adolfo Jayme Barrientos diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 1e17f9921df0..f63b13cebe86 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1016,6 +1016,10 @@ auto IsPropertySet(uno::Reference const& rxParaStyles { return true; } +if (xPropState->getPropertyState("NumberingStyleName") == beans::PropertyState_DIRECT_VALUE) +{ +return false; // tdf#159903 this overrides value in the parent style +} // check if it is set by any parent common style OUString style; rxPropSet->getPropertyValue("ParaStyleName") >>= style; @@ -1028,6 +1032,10 @@ auto IsPropertySet(uno::Reference const& rxParaStyles { return true; } +if (xStyleProps->getPropertyState("NumberingStyleName") == beans::PropertyState_DIRECT_VALUE) +{ +return false; // tdf#159903 this overrides value in the parent style +} style = xStyle->getParentStyle(); } return false;
core.git: Branch 'libreoffice-24-2' - xmloff/source
xmloff/source/text/txtimp.cxx |8 1 file changed, 8 insertions(+) New commits: commit 3df05ad4ec73e160f8c29af94ab3a34ee403b90d Author: Michael Stahl AuthorDate: Thu Apr 18 13:00:04 2024 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Apr 22 16:47:14 2024 +0200 tdf#159903 xmloff: ODF import: fix bug in margin compatibility override The check for the property being set was wrong: the state in a parent style may be DIRECT_VALUE but a derived style may have a list style set, which effectively overrides the ParaLeftMargin and ParaFirstLineIndent. Fix this so that the compatibility override only happens when required. (regression from commit 7cf5faec6fdbc27dd77d2d36fb2ff205322cba0d) Change-Id: I6c8ca493df946afcb48a63c01c132620bcd7b390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166257 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 1b2a6b98291cf8b7022951be19b915fe2a9e18e6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166217 Reviewed-by: Adolfo Jayme Barrientos diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index ac0e89474245..d6e132323d34 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1016,6 +1016,10 @@ auto IsPropertySet(uno::Reference const& rxParaStyles { return true; } +if (xPropState->getPropertyState("NumberingStyleName") == beans::PropertyState_DIRECT_VALUE) +{ +return false; // tdf#159903 this overrides value in the parent style +} // check if it is set by any parent common style OUString style; rxPropSet->getPropertyValue("ParaStyleName") >>= style; @@ -1028,6 +1032,10 @@ auto IsPropertySet(uno::Reference const& rxParaStyles { return true; } +if (xStyleProps->getPropertyState("NumberingStyleName") == beans::PropertyState_DIRECT_VALUE) +{ +return false; // tdf#159903 this overrides value in the parent style +} style = xStyle->getParentStyle(); } return false;
core.git: sw/qa sw/source
sw/qa/core/text/data/Broken indent demo.odt |binary sw/qa/core/text/data/tdf156146.fodt | 281 sw/qa/core/text/text.cxx| 62 ++ sw/source/core/text/inftxt.hxx |6 sw/source/core/text/itratr.hxx |6 sw/source/core/text/itrtxt.hxx |2 6 files changed, 350 insertions(+), 7 deletions(-) New commits: commit 0c7ae3bd96130eaa400d55a3ba9bf1e2fe6600de Author: Michael Stahl AuthorDate: Thu Apr 18 18:23:29 2024 +0200 Commit: Michael Stahl CommitDate: Fri Apr 19 18:12:33 2024 +0200 tdf#156146 tdf#159903 sw: add unit tests Unfortunately the actual computed margins are not stored in text formatting data structures so are only available directly from SwTextMargin. Change-Id: Ia7ce5e148194a55b5d9874ed112aaa977ed16c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166258 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/qa/core/text/data/Broken indent demo.odt b/sw/qa/core/text/data/Broken indent demo.odt new file mode 100644 index ..af5928bfa556 Binary files /dev/null and b/sw/qa/core/text/data/Broken indent demo.odt differ diff --git a/sw/qa/core/text/data/tdf156146.fodt b/sw/qa/core/text/data/tdf156146.fodt new file mode 100644 index ..1587cd945e49 --- /dev/null +++ b/sw/qa/core/text/data/tdf156146.fodt @@ -0,0 +1,281 @@ + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2023-06-14T01:10:01.4975110772024-04-18T18:00:26.359273842PT14M47S2ZetaOffice/7.4.8.0.0$Linux_X86_64 LibreOffice_project/b82f1163cc2fc696cf86209d94d838d04998350f + + + false + false + false + true + true + true + true + true + false + 0 + false + false + false + true + false + false + true + false + false + false + false + true + true + true + false + false + false + false + false + false + false + false + true + false + false + true + false + false + false + true + 0 + 1 + true + false + + high-resolution + true + + + false + false + true + false + true + true + true + false + true + + true + 910346 + + true + false + true + true + 0 + + false + false + false + true + false + true + 0 + false + false + false + false + true + false + false + false + + false + false + true + false + false + false + false + false + false + false + false + false + 811422 + false + false + false + false + false + true + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
core.git: xmloff/source
xmloff/source/text/txtimp.cxx |8 1 file changed, 8 insertions(+) New commits: commit 1b2a6b98291cf8b7022951be19b915fe2a9e18e6 Author: Michael Stahl AuthorDate: Thu Apr 18 13:00:04 2024 +0200 Commit: Michael Stahl CommitDate: Fri Apr 19 10:49:40 2024 +0200 tdf#159903 xmloff: ODF import: fix bug in margin compatibility override The check for the property being set was wrong: the state in a parent style may be DIRECT_VALUE but a derived style may have a list style set, which effectively overrides the ParaLeftMargin and ParaFirstLineIndent. Fix this so that the compatibility override only happens when required. (regression from commit 7cf5faec6fdbc27dd77d2d36fb2ff205322cba0d) Change-Id: I6c8ca493df946afcb48a63c01c132620bcd7b390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166257 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index b98f6a41d3e4..b0790da2cf46 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1014,6 +1014,10 @@ auto IsPropertySet(uno::Reference const& rxParaStyles { return true; } +if (xPropState->getPropertyState("NumberingStyleName") == beans::PropertyState_DIRECT_VALUE) +{ +return false; // tdf#159903 this overrides value in the parent style +} // check if it is set by any parent common style OUString style; rxPropSet->getPropertyValue("ParaStyleName") >>= style; @@ -1026,6 +1030,10 @@ auto IsPropertySet(uno::Reference const& rxParaStyles { return true; } +if (xStyleProps->getPropertyState("NumberingStyleName") == beans::PropertyState_DIRECT_VALUE) +{ +return false; // tdf#159903 this overrides value in the parent style +} style = xStyle->getParentStyle(); } return false;
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/layout/tabfrm.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 13e517aa5baa1ce9afefd84ff41496c1adeb5367 Author: Michael Stahl AuthorDate: Thu Apr 11 16:37:12 2024 +0200 Commit: Caolán McNamara CommitDate: Sun Apr 14 20:31:13 2024 +0200 sw: workaround crash in IsAllHiddenRow() Not sure why but somehow still crashes in the code added in commit ab7893544dc6be6dc192dffefd57cd5ddd421c35 https://crashreport.libreoffice.org/stats/crash_details/912e7417-5e04-4279-bbaf-380234f4cd33 Change-Id: I23b7ecdd83009cfe6584866ed72102d8f2179f86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166010 Tested-by: Michael Stahl Reviewed-by: Michael Stahl (cherry picked from commit 44ff9907eb1f2851b3b9087e7ec5e5dfae5a00c6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165940 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index fe3a5232356e..adffbba17715 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1523,7 +1523,8 @@ namespace } } } -if (rTab.IsCollapsingBorders() && !rCell.Lower()->IsRowFrame()) +assert(rCell.Lower()); +if (rTab.IsCollapsingBorders() && rCell.Lower() && !rCell.Lower()->IsRowFrame()) { if (rRow.GetTopMarginForLowers() != 0 || rRow.GetBottomMarginForLowers() != 0)
core.git: sw/source
sw/source/core/layout/tabfrm.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 44ff9907eb1f2851b3b9087e7ec5e5dfae5a00c6 Author: Michael Stahl AuthorDate: Thu Apr 11 16:37:12 2024 +0200 Commit: Michael Stahl CommitDate: Fri Apr 12 11:10:54 2024 +0200 sw: workaround crash in IsAllHiddenRow() Not sure why but somehow still crashes in the code added in commit ab7893544dc6be6dc192dffefd57cd5ddd421c35 https://crashreport.libreoffice.org/stats/crash_details/912e7417-5e04-4279-bbaf-380234f4cd33 Change-Id: I23b7ecdd83009cfe6584866ed72102d8f2179f86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166010 Tested-by: Michael Stahl Reviewed-by: Michael Stahl diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index cd44758e574b..e8ec84faad83 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1523,7 +1523,8 @@ namespace } } } -if (rTab.IsCollapsingBorders() && !rCell.Lower()->IsRowFrame()) +assert(rCell.Lower()); +if (rTab.IsCollapsingBorders() && rCell.Lower() && !rCell.Lower()->IsRowFrame()) { if (rRow.GetTopMarginForLowers() != 0 || rRow.GetBottomMarginForLowers() != 0)
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/data/pagebreak-source.fodt | 12 ++-- sw/qa/extras/uiwriter/data/pagebreak-target.fodt | 12 ++-- sw/qa/extras/uiwriter/uiwriter.cxx | 22 +- sw/source/core/layout/pagechg.cxx|6 +- 4 files changed, 42 insertions(+), 10 deletions(-) New commits: commit 51dda113fd893fb879c0e8a345bc2b6b99e00771 Author: Michael Stahl AuthorDate: Wed Mar 13 09:38:00 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Apr 12 09:25:39 2024 +0200 sw: layout: use page style set on hidden paragraph SwPageFrame::FindPageDesc() now ignores paragraphs hidden for any reason, but to maintain layout compatibility it should only ignore paragraphs in a hidden section, not paragraphs hidden by fields. (regression from commit 0c96119895b347f8eb5bb89f393351bd3c02b9f1) Change-Id: Iad5e76f5cc437d35b4ae9bde6bc9b73dbe32bf3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164761 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 7335babda93974104a39202c434e9499b8086f3a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164742 Reviewed-by: Caolán McNamara diff --git a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt index e09c1b447cfd..cb72fea62a85 100644 --- a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt +++ b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt @@ -85,7 +85,7 @@ - + @@ -101,9 +101,17 @@ + + + + + + + + @@ -120,4 +128,4 @@ - \ No newline at end of file + diff --git a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt index f059e33f1514..1219cdd95e25 100644 --- a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt +++ b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt @@ -86,7 +86,7 @@ - + @@ -104,9 +104,17 @@ + + + + + + + + @@ -126,4 +134,4 @@ - \ No newline at end of file + diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 1fd0ac7cf713..b6913d4f6b53 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -383,6 +383,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) SwDoc* pDoc = getSwDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); + pWrtShell->SelAll(); dispatchCommand(mxComponent, ".uno:Copy", {}); @@ -395,36 +397,46 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName()); +// page style WithMargin is used +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); dispatchCommand(mxComponent, ".uno:Paste", {}); CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size()); CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), pWrtShell->GetCurrSection()->GetSectionName()); // the problem was that there was a page break now CPPUNIT_ASSERT_EQUAL(1, getPages()); +// page style WithMargin is used +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->Undo(); CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName()); CPPUNIT_ASSERT_EQUAL(1, getPages()); +// page style WithMargin is used +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->Redo(); CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(size_t(2),
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/data/pagebreak-source.fodt| 123 +++ sw/qa/extras/uiwriter/data/pagebreak-target.fodt| 129 sw/qa/extras/uiwriter/uiwriter.cxx | 109 + sw/qa/extras/uiwriter/uiwriter2.cxx |6 sw/qa/extras/uiwriter/uiwriter3.cxx |3 sw/source/core/doc/DocumentContentOperationsManager.cxx | 73 - sw/source/core/docnode/nodes.cxx|2 sw/source/core/edit/edglss.cxx |8 sw/source/core/frmedt/fecopy.cxx| 15 + sw/source/core/undo/untblk.cxx |6 sw/source/core/unocore/unotext.cxx |6 11 files changed, 434 insertions(+), 46 deletions(-) New commits: commit 6d3b6db240a826113a40df8cb6168816aef3441c Author: Michael Stahl AuthorDate: Mon Mar 4 15:45:07 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Apr 12 09:24:54 2024 +0200 sw: SelectAll of section with RES_PAGEDESC corner-case The main problem here is that if a document has a RES_PAGEDESC on its first body text node, and you paste a section whose first text node also has a RES_PAGEDESC, the result inevitably has a page break that wasn't there before, and which is unwanted. SwEditShell::CopySelToDoc() needs a change to include the end node of a section at the start, so it is copied. Change CopyImplImpl() to insert a non-textnode *before* a text node at the insert position, instead of after it. This simplifies the implementation: only SwFEShell::Paste() needs to care about removing an empty trailing paragraph, but SwEditShell::CopySelToDoc() needs no changes; both functions would need to delete the empty paragraph when inserting after. Several tests such as CppunitTest_sw_ooxmlexport3 testCrashWhileSave fail because of this, which can be solved by removing the DelFullPara() call in SwXText::copyText() that is now unnecessary. Generalise and simplify the "bAfterTable" code in CopyImplImpl(): it doesn't really matter what is before the insert position, what matters is if the pasted text starts with a table or section. Also, the fly-anchor-correction code (both here and in SwUndoInserts::RedoImpl()) needs to move to the first text node also in case a section was inserted (but the equal-looking code *before* inserting remains as is!), in the situation where the last node will be deleted. Now there are some test failures: unowriter.cxx:430:Assertion Test name: (anonymous namespace)::testSectionAnchorCopyTableAtStart::TestBody equality assertion failed - Expected: quux foo bar - Actual : quux foo This is because the end position was created from SwNodeIndex aInsPos only, it needs to take also the aDestIdx from the "if (pEndTextNd)" branch. testTdf134250::TestBody finished in: 867ms uiwriter2.cxx:462:Assertion Test name: testTdf134250::TestBody equality assertion failed - Expected: 1 - Actual : 2 The section is pasted now, so there are 2. uiwriter3.cxx:1519:Assertion Test name: testTdf135733::TestBody equality assertion failed - Expected: 1 - Actual : 2 Table is now inserted before the first paragraph, which has a RES_PAGEDESC. (presumably regression from commit 9667e5ffd18d6167344e102b89a393bc981644ec) Change-Id: I820e381113fee90a81249afbc2280bfc3ddb7647 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164401 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit fcd4222d36e1864452163e5c94976eea353bbaf0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164741 Reviewed-by: Caolán McNamara diff --git a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt new file mode 100644 index ..e09c1b447cfd --- /dev/null +++ b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt @@ -0,0 +1,123 @@ + +http://openoffice.org/2009/office; xmlns:css3t="http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
core.git: Branch 'libreoffice-24-2' - sw/inc sw/qa sw/source writerfilter/source
sw/inc/IDocumentSettingAccess.hxx |1 sw/qa/core/text/data/A011-charheight.rtf | 27 ++ sw/qa/core/text/itrform2.cxx | 18 + sw/source/core/doc/DocumentSettingManager.cxx | 11 ++ sw/source/core/inc/DocumentSettingManager.hxx |1 sw/source/core/text/itrform2.cxx | 13 +--- sw/source/filter/ww8/ww8par.cxx |1 sw/source/filter/xml/xmlimp.cxx | 10 + sw/source/uibase/uno/SwXDocumentSettings.cxx | 18 + writerfilter/source/filter/WriterFilter.cxx |1 10 files changed, 98 insertions(+), 3 deletions(-) New commits: commit 570a36ad5f76ea28e0653d1a7a43250432bf1afa Author: Michael Stahl AuthorDate: Mon Apr 8 15:26:00 2024 +0200 Commit: Thorsten Behrens CommitDate: Thu Apr 11 23:12:21 2024 +0200 tdf#88214 sw: text formatting: adapt empty line at end of para to Word For an empty line at the end of an empty paragraph, Writer already uses any existing text attribute in the paragraph, see for example testEmptyTrailingSpans. For an empty line at the end of a non-empty paragraph, Writer text formatting uses only paragraph attributes, ignoring any text attributes, whereas the UI will display the attributes from the text attributes (such as font height) if you move the cursor there. Word uses text attributes also in this case, so adapt the inconsistent Writer behaviour: text formatting now uses text attributes too. Apparently this can be achieved by calling SeekAndChgBefore() instead of SeekAndChg(). Add another compat flag "ApplyTextAttrToEmptyLineAtEndOfParagraph" to preserve the formatting of existing ODF documents. Adapt test document fdo74110.docx, it has a line break with "Angsana New" font. Change-Id: I0863d3077e419404194b47110e4ad2bdda3d11c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165887 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 2b47fae7e3e23ee7c733708500cb0482ad7f8af1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165906 Reviewed-by: Thorsten Behrens diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 74b123dc462e..0dd9467bdf13 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -98,6 +98,7 @@ enum class DocumentSettingId ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK, // tdf#119908 new paragraph justification JUSTIFY_LINES_WITH_SHRINKING, +APPLY_TEXT_ATTR_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH, // COMPATIBILITY FLAGS END BROWSE_MODE, HTML_MODE, diff --git a/sw/qa/core/text/data/A011-charheight.rtf b/sw/qa/core/text/data/A011-charheight.rtf new file mode 100644 index ..4b56ecdd6a15 --- /dev/null +++ b/sw/qa/core/text/data/A011-charheight.rtf @@ -0,0 +1,27 @@ +{ tf1deflang1025nsinsicpg1252\uc1deff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang3079\deflangfe3079 hemelang3079hemelangfe0 hemelangcs0 +{onttbl{0bidi romancharset0prq2Times New Roman{\*alt Arial};} +} +{\*\defchp 0s22\lang3079\langfe1033\langfenp1033 } +{\*\defpap \ql \li0 i0\sa200\sl276\slmult1 +\widctlpar\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 } + oqfpromote +{\stylesheet +{\ql \li0 i0\sa200\sl276\slmult1\widctlpar\wrapdefaultspalphaspnum aautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 +0s23\lang3079\langfe1033+{\s15\ql \li0 i0\widctlpar qc x4536 qr x9072\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 0s23\lang3079\langfe1033+\sbasedon0 \snext15 \slink16 \sunhideused header;} +{\*+} +\paperw11906\paperh16838\margl1417\margr1417\margt1417\margb1134\gutter0\ltrsect +\deftab708\widowctrltnbjenddoc\hyphhotz425 rackmoves0 rackformatting1\donotembedsysfont1 elyonvml0\donotembedlingdata0\grfdocevents0 alidatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0 +\showxmlerrors1 oxlattoyenxpshrtn oultrlspc\dntblnsbdb ospaceforul ormshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1417\dgvorigin1417\dghshow1\dgvshow1 +\jexpandiewkind1iewscale100\pgbrdrhead\pgbrdrfoot\splytwnine tnlytwnine\htmautsp olnhtadjtbl\useltbalnlntblind\lytcalctblwd\lyttblrtgr\lnbrkrule obrkwrptbl\snaptogridincellllowfieldendsel\wrppunct +sianbrkrule ewtblstyruls ogrowautofit\usenormstyforlist oindnmbrtselnbrelev ocxsptable\indrlsweleven oafcnsttblfelev\utinl\hwelev\spltpgpar otcvasp otbrkcnstfrctbl otvatxbx\krnprsnet+{\*\wgrffmtfilter 2450} ofeaturethrottle1\ilfomacatclnup0 + +\ltrpar \pard\plain \ltrpar\s15\qc \li0 i0\widctlpar + qc x4536 qr x9072\wrapdefaultspalphaspnum aautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 0 s23\lang3079\langfe1033+s16 \line \line
core.git: Branch 'libreoffice-7-6' - config_host/config_crypto.h.in configure.ac include/curlinit.hxx include/opensslinit.hxx vcl/source
config_host/config_crypto.h.in |2 ++ configure.ac |3 +++ include/curlinit.hxx | 23 +-- include/opensslinit.hxx| 41 + vcl/source/app/svmain.cxx | 25 + 5 files changed, 72 insertions(+), 22 deletions(-) New commits: commit d8fa11184fae396e4bca3c2201380613c6031ac8 Author: Michael Stahl AuthorDate: Wed Nov 8 14:50:26 2023 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Wed Apr 10 08:07:46 2024 +0200 Related: tdf#157480 vcl,openssl: set SSL_CERT_FILE for bundled OpenSSL OpenSSL may read a CA certificate file from $SSL_CERT_FILE, if the client library calls SSL_CTX_set_default_verify_paths(); python's ssl module does it but apparently libcurl does not. So split the code from commit 3fc632c0261c75fb4079a5305e814698e791f75c and set the environment variable in ImplSVMain(), hopefully before any threads are spawned; seems to work for PyMailSMTPService. This needs to have SYSTEM_OPENSSL available in a config header. Change-Id: I63b747cb61bb236cf4f605bb9858e5b0083388fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159149 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 1472e2d68b9cff43b99069d3ba9439fff0a5684c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159283 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165597 Reviewed-by: Adolfo Jayme Barrientos diff --git a/config_host/config_crypto.h.in b/config_host/config_crypto.h.in index 106485d55213..33877f99af36 100644 --- a/config_host/config_crypto.h.in +++ b/config_host/config_crypto.h.in @@ -33,4 +33,6 @@ #endif +#undef SYSTEM_OPENSSL + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/configure.ac b/configure.ac index ecc8cf29733a..fb6103eb6181 100644 --- a/configure.ac +++ b/configure.ac @@ -11051,6 +11051,9 @@ if test "$enable_openssl" = "yes"; then OPENSSL_LIBS="-lssl -lcrypto" else libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl]) +if test -n "${SYSTEM_OPENSSL}"; then +AC_DEFINE([SYSTEM_OPENSSL]) +fi fi if test "$with_system_openssl" = "yes"; then AC_MSG_CHECKING([whether openssl supports SHA512]) diff --git a/include/curlinit.hxx b/include/curlinit.hxx index 8b3a9968419d..1cf766f9 100644 --- a/include/curlinit.hxx +++ b/include/curlinit.hxx @@ -14,28 +14,7 @@ #if defined(LINUX) && !defined(SYSTEM_CURL) #include -#include - -static char const* GetCABundleFile() -{ -// try system ones first; inspired by: -// https://www.happyassassin.net/posts/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/ -auto const candidates = { -"/etc/pki/tls/certs/ca-bundle.crt", -"/etc/pki/tls/certs/ca-bundle.trust.crt", -"/etc/ssl/certs/ca-certificates.crt", -"/var/lib/ca-certificates/ca-bundle.pem", -}; -for (char const* const candidate : candidates) -{ -if (access(candidate, R_OK) == 0) -{ -return candidate; -} -} - -throw css::uno::RuntimeException("no OpenSSL CA certificate bundle found"); -} +#include "opensslinit.hxx" static void InitCurl_easy(CURL* const pCURL) { diff --git a/include/opensslinit.hxx b/include/opensslinit.hxx new file mode 100644 index ..9c3f4c860895 --- /dev/null +++ b/include/opensslinit.hxx @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include + +#if defined(LINUX) && !defined(SYSTEM_OPENSSL) +#include + +#include + +static char const* GetCABundleFile() +{ +// try system ones first; inspired by: +// https://www.happyassassin.net/posts/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/ +auto const candidates = { +"/etc/pki/tls/certs/ca-bundle.crt", +"/etc/pki/tls/certs/ca-bundle.trust.crt", +"/etc/ssl/certs/ca-certificates.crt", +"/var/lib/ca-certificates/ca-bundle.pem", +}; +for (char const* const candidate : candidates) +{ +if (access(candidate, R_OK) == 0) +{ +return candidate; +} +} + +throw css::uno::RuntimeException("no OpenSSL CA certificate bundle found"); +} +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index
core.git: Branch 'feature/cib_contract49' - 2 commits - sw/inc sw/qa sw/source writerfilter/source
sw/inc/IDocumentSettingAccess.hxx |1 sw/qa/core/text/data/A011-charheight.rtf | 27 ++ sw/qa/core/text/itrform2.cxx | 18 + sw/source/core/doc/DocumentSettingManager.cxx | 11 ++ sw/source/core/inc/DocumentSettingManager.hxx |1 sw/source/core/layout/layact.cxx |6 + sw/source/core/text/itrform2.cxx | 13 +--- sw/source/filter/ww8/ww8par.cxx |1 sw/source/filter/xml/xmlimp.cxx | 10 + sw/source/uibase/uno/SwXDocumentSettings.cxx | 18 + writerfilter/source/filter/WriterFilter.cxx |1 11 files changed, 104 insertions(+), 3 deletions(-) New commits: commit 283c16f56500ee517c10cf86182954ef12340bde Author: Michael Stahl AuthorDate: Thu Apr 4 19:26:31 2024 +0200 Commit: Michael Stahl CommitDate: Tue Apr 9 14:37:27 2024 +0200 sw: layout: remove superfluous pages again in InternalAction() The bugdoc has a very large header containing hidden text changes height when toggling Formatting Marks. When toggling on, it crashes, because UnHide() iterates the text frames in all headers, but after the first one empty pages at the end of the document are removed, so UAF. Remove the pages without content earlier; SwLayAction::InternalAction() already does it after the "normal" page loop, but the 2nd page loop following that may also move content off pages, so do it again. Change-Id: Iaae6a16842b3494f25cba8fc036d15049b71961f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165801 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 759d822dac5edc6104ce61b70c578425d9f2470d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165728 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index a705ef251176..f4a578fe99eb 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -809,6 +809,12 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) unlockPositionOfObjects( pPg ); pPg = static_cast(pPg->GetNext()); } +if (m_pRoot->IsSuperfluous()) // could be newly set now! +{ +bool bOld = IsAgain(); +m_pRoot->RemoveSuperfluous(); +SetAgain(bOld); +} // reset flag for special interrupt content formatting. mbFormatContentOnInterrupt = false; } commit acc47a4392777b4ad59633c31db71e96a4340cf5 Author: Michael Stahl AuthorDate: Mon Apr 8 15:26:00 2024 +0200 Commit: Michael Stahl CommitDate: Tue Apr 9 14:34:04 2024 +0200 tdf#88214 sw: text formatting: adapt empty line at end of para to Word For an empty line at the end of an empty paragraph, Writer already uses any existing text attribute in the paragraph, see for example testEmptyTrailingSpans. For an empty line at the end of a non-empty paragraph, Writer text formatting uses only paragraph attributes, ignoring any text attributes, whereas the UI will display the attributes from the text attributes (such as font height) if you move the cursor there. Word uses text attributes also in this case, so adapt the inconsistent Writer behaviour: text formatting now uses text attributes too. Apparently this can be achieved by calling SeekAndChgBefore() instead of SeekAndChg(). Add another compat flag "ApplyTextAttrToEmptyLineAtEndOfParagraph" to preserve the formatting of existing ODF documents. Adapt test document fdo74110.docx, it has a line break with "Angsana New" font. Change-Id: I0863d3077e419404194b47110e4ad2bdda3d11c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165887 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 2b47fae7e3e23ee7c733708500cb0482ad7f8af1) diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index ad1d95c10b0d..ac319e3fb2a2 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -94,6 +94,7 @@ enum class DocumentSettingId HYPHENATE_URLS, ///< tdf#152952 DO_NOT_BREAK_WRAPPED_TABLES, ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK, +APPLY_TEXT_ATTR_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH, // COMPATIBILITY FLAGS END BROWSE_MODE, HTML_MODE, diff --git a/sw/qa/core/text/data/A011-charheight.rtf b/sw/qa/core/text/data/A011-charheight.rtf new file mode 100644 index ..4b56ecdd6a15 --- /dev/null +++ b/sw/qa/core/text/data/A011-charheight.rtf @@ -0,0 +1,27 @@ +{ tf1deflang1025nsinsicpg1252\uc1deff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang3079\deflangfe3079 hemelang3079hemelangfe0 hemelangcs0 +{onttbl{0bidi romancharset0prq2Times New
core.git: sw/inc sw/qa sw/source writerfilter/source
sw/inc/IDocumentSettingAccess.hxx |1 sw/qa/core/text/data/A011-charheight.rtf | 27 ++ sw/qa/core/text/itrform2.cxx | 18 + sw/qa/extras/ooxmlexport/data/fdo74110.docx |binary sw/source/core/doc/DocumentSettingManager.cxx | 11 ++ sw/source/core/inc/DocumentSettingManager.hxx |1 sw/source/core/text/itrform2.cxx | 13 +--- sw/source/filter/ww8/ww8par.cxx |1 sw/source/filter/xml/xmlimp.cxx | 10 + sw/source/uibase/uno/SwXDocumentSettings.cxx | 18 + writerfilter/source/filter/WriterFilter.cxx |1 11 files changed, 98 insertions(+), 3 deletions(-) New commits: commit 2b47fae7e3e23ee7c733708500cb0482ad7f8af1 Author: Michael Stahl AuthorDate: Mon Apr 8 15:26:00 2024 +0200 Commit: Michael Stahl CommitDate: Tue Apr 9 14:10:19 2024 +0200 tdf#88214 sw: text formatting: adapt empty line at end of para to Word For an empty line at the end of an empty paragraph, Writer already uses any existing text attribute in the paragraph, see for example testEmptyTrailingSpans. For an empty line at the end of a non-empty paragraph, Writer text formatting uses only paragraph attributes, ignoring any text attributes, whereas the UI will display the attributes from the text attributes (such as font height) if you move the cursor there. Word uses text attributes also in this case, so adapt the inconsistent Writer behaviour: text formatting now uses text attributes too. Apparently this can be achieved by calling SeekAndChgBefore() instead of SeekAndChg(). Add another compat flag "ApplyTextAttrToEmptyLineAtEndOfParagraph" to preserve the formatting of existing ODF documents. Adapt test document fdo74110.docx, it has a line break with "Angsana New" font. Change-Id: I0863d3077e419404194b47110e4ad2bdda3d11c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165887 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 74b123dc462e..0dd9467bdf13 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -98,6 +98,7 @@ enum class DocumentSettingId ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK, // tdf#119908 new paragraph justification JUSTIFY_LINES_WITH_SHRINKING, +APPLY_TEXT_ATTR_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH, // COMPATIBILITY FLAGS END BROWSE_MODE, HTML_MODE, diff --git a/sw/qa/core/text/data/A011-charheight.rtf b/sw/qa/core/text/data/A011-charheight.rtf new file mode 100644 index ..4b56ecdd6a15 --- /dev/null +++ b/sw/qa/core/text/data/A011-charheight.rtf @@ -0,0 +1,27 @@ +{ tf1deflang1025nsinsicpg1252\uc1deff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang3079\deflangfe3079 hemelang3079hemelangfe0 hemelangcs0 +{onttbl{0bidi romancharset0prq2Times New Roman{\*alt Arial};} +} +{\*\defchp 0s22\lang3079\langfe1033\langfenp1033 } +{\*\defpap \ql \li0 i0\sa200\sl276\slmult1 +\widctlpar\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 } + oqfpromote +{\stylesheet +{\ql \li0 i0\sa200\sl276\slmult1\widctlpar\wrapdefaultspalphaspnum aautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 +0s23\lang3079\langfe1033+{\s15\ql \li0 i0\widctlpar qc x4536 qr x9072\wrapdefaultspalphaspnumaautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 0s23\lang3079\langfe1033+\sbasedon0 \snext15 \slink16 \sunhideused header;} +{\*+} +\paperw11906\paperh16838\margl1417\margr1417\margt1417\margb1134\gutter0\ltrsect +\deftab708\widowctrltnbjenddoc\hyphhotz425 rackmoves0 rackformatting1\donotembedsysfont1 elyonvml0\donotembedlingdata0\grfdocevents0 alidatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0 +\showxmlerrors1 oxlattoyenxpshrtn oultrlspc\dntblnsbdb ospaceforul ormshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1417\dgvorigin1417\dghshow1\dgvshow1 +\jexpandiewkind1iewscale100\pgbrdrhead\pgbrdrfoot\splytwnine tnlytwnine\htmautsp olnhtadjtbl\useltbalnlntblind\lytcalctblwd\lyttblrtgr\lnbrkrule obrkwrptbl\snaptogridincellllowfieldendsel\wrppunct +sianbrkrule ewtblstyruls ogrowautofit\usenormstyforlist oindnmbrtselnbrelev ocxsptable\indrlsweleven oafcnsttblfelev\utinl\hwelev\spltpgpar otcvasp otbrkcnstfrctbl otvatxbx\krnprsnet+{\*\wgrffmtfilter 2450} ofeaturethrottle1\ilfomacatclnup0 + +\ltrpar \pard\plain \ltrpar\s15\qc \li0 i0\widctlpar + qc x4536 qr x9072\wrapdefaultspalphaspnum aautodjustright in0\lin0\itap0 tlchcs1 f0fs22lang1025 \ltrchcs0 0 s23\lang3079\langfe1033+s16 \line \line \line +\par \line +\par } +} diff --git a/sw/qa/core/text/itrform2.cxx b/sw/qa/core/text/itrform2.cxx index
core.git: Branch 'distro/collabora/co-24.04' - 30 commits - basic/CppunitTest_basic_scanner.mk basic/Library_sb.mk basic/source cui/source dbaccess/source desktop/source download.lst editeng/qa editen
basic/CppunitTest_basic_scanner.mk|6 basic/Library_sb.mk |6 basic/source/runtime/runtime.cxx | 46 +++-- cui/source/dialogs/SpellDialog.cxx| 13 + cui/source/inc/SpellDialog.hxx|3 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |6 dbaccess/source/ui/dlg/dbwizsetup.cxx |3 dbaccess/source/ui/dlg/generalpage.cxx| 32 +-- desktop/source/deployment/registry/configuration/dp_configuration.cxx |8 download.lst | 32 +-- editeng/qa/unit/core-test.cxx | 15 - editeng/source/editeng/impedit.hxx|2 editeng/source/editeng/impedit2.cxx |4 editeng/source/editeng/impedit4.cxx | 11 - external/lcms2/0001-Added-missing-export.patch.1 | 25 ++ external/lcms2/ExternalPackage_lcms2.mk |2 external/lcms2/UnpackedTarball_lcms2.mk |4 external/lcms2/c++17.patch.1 | 13 - external/libassuan/ExternalPackage_libassuan.mk |2 external/libgpg-error/ExternalPackage_libgpg-error.mk |2 include/systools/curlinit.hxx |9 - include/systools/opensslinit.hxx |4 sc/CppunitTest_sc_parallelism.mk | 81 + sc/Module_sc.mk |1 sc/qa/unit/data/ods/tdf160368.ods |binary sc/qa/unit/parallelism.cxx| 88 ++ sc/qa/unit/ucalc_parallelism.cxx |3 sc/source/core/data/formulacell.cxx | 11 + sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx| 82 ++--- svx/qa/unit/customshapes.cxx | 42 svx/qa/unit/data/tdf160421_3D_FlipLight.odp |binary svx/source/customshapes/EnhancedCustomShape3d.cxx |8 svx/source/svdraw/svdpntv.cxx |7 sw/inc/usrfld.hxx |2 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx | 11 + sw/qa/core/accessibilitycheck/data/Tabs-in-TOC.odt|binary sw/qa/extras/htmlexport/data/tdf160390.fodt | 17 + sw/qa/extras/htmlexport/htmlexport.cxx|7 sw/source/core/access/AccessibilityCheck.cxx |5 sw/source/core/layout/layact.cxx |6 sw/source/filter/html/htmlatr.cxx | 40 ++-- sw/source/filter/ww8/ww8par.cxx | 43 ++-- sw/source/filter/ww8/ww8par5.cxx | 30 ++- sw/source/ui/index/swuiidxmrk.cxx |1 sw/source/uibase/shells/textsh.cxx|9 - toolkit/source/awt/vclxmenu.cxx | 23 ++ vcl/source/app/svmain.cxx |2 vcl/source/treelist/iconviewimpl.cxx |1 vcl/source/window/printdlg.cxx|2 vcl/unx/gtk3/gtkframe.cxx | 22 +- vcl/unx/gtk3/gtkinst.cxx | 33 +++ 51 files changed, 650 insertions(+), 175 deletions(-) New commits: commit 560b9055d6b7c00dfed7b528e25cd5136839ad3f Author: Michael Stahl AuthorDate: Thu Apr 4 19:26:31 2024 +0200 Commit: Andras Timar CommitDate: Sun Apr 7 13:58:06 2024 +0200 sw: layout: remove superfluous pages again in InternalAction() The bugdoc has a very large header containing hidden text changes height when toggling Formatting Marks. When toggling on, it crashes, because UnHide() iterates the text frames in all headers, but after the first one empty pages at the end of the document are removed, so UAF. Remove the pages without content earlier; SwLayAction::InternalAction() already does it after the "normal" page loop, but the 2nd page loop following that may also move content off pages, so do it again. Change-Id:
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/layout/layact.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 9f20d89ded05600233ceed7db40cdef57aca1442 Author: Michael Stahl AuthorDate: Thu Apr 4 19:26:31 2024 +0200 Commit: Caolán McNamara CommitDate: Sat Apr 6 22:57:21 2024 +0200 sw: layout: remove superfluous pages again in InternalAction() The bugdoc has a very large header containing hidden text changes height when toggling Formatting Marks. When toggling on, it crashes, because UnHide() iterates the text frames in all headers, but after the first one empty pages at the end of the document are removed, so UAF. Remove the pages without content earlier; SwLayAction::InternalAction() already does it after the "normal" page loop, but the 2nd page loop following that may also move content off pages, so do it again. Change-Id: Iaae6a16842b3494f25cba8fc036d15049b71961f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165801 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 759d822dac5edc6104ce61b70c578425d9f2470d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165727 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 06c3027bebc5..1a0a1260a135 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -809,6 +809,12 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) unlockPositionOfObjects( pPg ); pPg = static_cast(pPg->GetNext()); } +if (m_pRoot->IsSuperfluous()) // could be newly set now! +{ +bool bOld = IsAgain(); +m_pRoot->RemoveSuperfluous(); +SetAgain(bOld); +} // reset flag for special interrupt content formatting. mbFormatContentOnInterrupt = false; }
core.git: Branch 'libreoffice-7-6' - sw/source
sw/source/core/layout/layact.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit fc7b3932a6a6f05c6142b0c6398c82681a93dd9e Author: Michael Stahl AuthorDate: Thu Apr 4 19:26:31 2024 +0200 Commit: Caolán McNamara CommitDate: Sat Apr 6 22:57:29 2024 +0200 sw: layout: remove superfluous pages again in InternalAction() The bugdoc has a very large header containing hidden text changes height when toggling Formatting Marks. When toggling on, it crashes, because UnHide() iterates the text frames in all headers, but after the first one empty pages at the end of the document are removed, so UAF. Remove the pages without content earlier; SwLayAction::InternalAction() already does it after the "normal" page loop, but the 2nd page loop following that may also move content off pages, so do it again. Change-Id: Iaae6a16842b3494f25cba8fc036d15049b71961f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165801 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 759d822dac5edc6104ce61b70c578425d9f2470d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165728 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index a705ef251176..f4a578fe99eb 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -809,6 +809,12 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) unlockPositionOfObjects( pPg ); pPg = static_cast(pPg->GetNext()); } +if (m_pRoot->IsSuperfluous()) // could be newly set now! +{ +bool bOld = IsAgain(); +m_pRoot->RemoveSuperfluous(); +SetAgain(bOld); +} // reset flag for special interrupt content formatting. mbFormatContentOnInterrupt = false; }
core.git: sw/source
sw/source/core/layout/layact.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 759d822dac5edc6104ce61b70c578425d9f2470d Author: Michael Stahl AuthorDate: Thu Apr 4 19:26:31 2024 +0200 Commit: Michael Stahl CommitDate: Fri Apr 5 10:03:13 2024 +0200 sw: layout: remove superfluous pages again in InternalAction() The bugdoc has a very large header containing hidden text changes height when toggling Formatting Marks. When toggling on, it crashes, because UnHide() iterates the text frames in all headers, but after the first one empty pages at the end of the document are removed, so UAF. Remove the pages without content earlier; SwLayAction::InternalAction() already does it after the "normal" page loop, but the 2nd page loop following that may also move content off pages, so do it again. Change-Id: Iaae6a16842b3494f25cba8fc036d15049b71961f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165801 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index abbca7d67eab..5add4e40a8a7 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -809,6 +809,12 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) unlockPositionOfObjects( pPg ); pPg = static_cast(pPg->GetNext()); } +if (m_pRoot->IsSuperfluous()) // could be newly set now! +{ +bool bOld = IsAgain(); +m_pRoot->RemoveSuperfluous(); +SetAgain(bOld); +} // reset flag for special interrupt content formatting. mbFormatContentOnInterrupt = false; }
core.git: Branch 'libreoffice-7-6' - ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) New commits: commit 780aeb304eaf6c90c18ca001e54708f5b6c78c0c Author: Michael Stahl AuthorDate: Thu Mar 14 15:47:28 2024 +0100 Commit: Caolán McNamara CommitDate: Sun Mar 31 22:38:46 2024 +0200 ucb: webdav-curl: always set CURLOPT_NOBODY for HEAD Otherwise there will be timeout that depends on when the server will close the connection, which varies by server but can be several minutes; getting a potential error document from the server for this one request when logging is enabled is less important. Change-Id: I505b014b148ba009c400d37d826c9edb8c3a6da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164838 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit c8400f5acc36d2cf0c007260bdc94534a53bba90) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164823 Reviewed-by: Caolán McNamara diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 1ca713337d60..260bfd97c446 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -165,15 +165,6 @@ struct CurlOption } }; -// NOBODY will prevent logging the response body in ProcessRequest() exception -// handler, so only use it if logging is disabled -const CurlOption g_NoBody{ CURLOPT_NOBODY, - sal_detail_log_report(SAL_DETAIL_LOG_LEVEL_INFO, "ucb.ucp.webdav.curl") - == SAL_DETAIL_LOG_ACTION_IGNORE - ? 1L - : 0L, - nullptr }; - /// combined guard class to ensure things are released in correct order, /// particularly in ProcessRequest() error handling class Guard @@ -1853,7 +1844,11 @@ auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector co CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); ::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } +// NOBODY will prevent logging the response body in ProcessRequest() +// exception, but omitting it here results in a long timeout until the +// server closes the connection, which is worse +{ CURLOPT_NOBODY, 1L, nullptr }, +{ CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } }; ::std::pair<::std::vector const&, DAVResource&> const headers(rHeaderNames,
core.git: Branch 'libreoffice-7-6' - 2 commits - ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) New commits: commit 012aa0a6e454fd15f91ac89d98faa30339e145c1 Author: Michael Stahl AuthorDate: Fri Mar 8 11:20:45 2024 +0100 Commit: Caolán McNamara CommitDate: Sun Mar 31 22:38:38 2024 +0200 ucb: webdav-curl: only set CURLOPT_NOBODY for HEAD Some testing with Apache httpd+mod_dav reveals that it usually sends a body with a 401 status, which causes the CURLE_WEIRD_SERVER_REPLY error code from curl. So we should either ignore this error in case there's a HTTP status too, or stop using CURLOPT_NOBODY. The latter seems to have no downside, except for HEAD requests, where strangely the server keeps the connection open and curl waits for 5 seconds for no body to arrive, blocking the UI, so continue to use CURLOPT_NOBODY for HEAD. The other methods don't seem to block. It turns out that the SAL_LOG-dependent setting of g_NoBody turned HEAD into GET anyway if logging is enabled, so explicitly set the method. Change-Id: Ibe2eef8e7a827d4e356ba37c4b56bee0be3b9c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164569 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit e0259d4c0951c4dd77c74d08b9d905728d4c8dfd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164508 Reviewed-by: Caolán McNamara diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 34fb5438150e..1ca713337d60 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1852,7 +1852,9 @@ auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector co CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ g_NoBody }; +::std::vector const options{ +g_NoBody, { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } +}; ::std::pair<::std::vector const&, DAVResource&> const headers(rHeaderNames, io_rResource); @@ -2087,9 +2089,8 @@ auto CurlSession::MKCOL(OUString const& rURIReference, DAVRequestEnvironment con CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "MKCOL", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "MKCOL", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "MKCOL", options, , nullptr, nullptr, nullptr, nullptr); @@ -2117,9 +2118,8 @@ auto CurlProcessor::MoveOrCopy(CurlSession& rSession, std::u16string_view rSourc throw uno::RuntimeException("curl_slist_append failed"); } -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, pMethod, "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, pMethod, + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(rSession, uriSource, OUString::createFromAscii(pMethod), options, , ::std::move(pList), nullptr, nullptr, nullptr); @@ -2149,9 +2149,8 @@ auto CurlSession::DESTROY(OUString const& rURIReference, DAVRequestEnvironment c CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "DELETE", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "DELETE", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "DESTROY", options, , nullptr, nullptr, nullptr, nullptr); commit fd9ad62bb93a44e3deadaef7f84f916c7ab19a51 Author: Michael Stahl AuthorDate: Thu Mar 7 20:10:48 2024 +0100 Commit: Caolán McNamara CommitDate: Sun Mar 31 22:38:29 2024 +0200 ucb: webdav-curl: don't set CURLOPT_NOBODY for OPTIONS The problem is that if the server does send a body, then curl returns CURLE_WEIRD_SERVER_REPLY error code, which is translated to DAVException; this looks unnecessary now because write_callback will just return if there's no stream to write to anyway. Change-Id: Iddaee9778ac7bbd538b64584f822f65ab0e395c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164550 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 980ca3953084560806cd980d2ec16951d9e30c2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164502 Reviewed-by: Caolán McNamara diff --git
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter5.cxx |2 -- sw/source/core/undo/untbl.cxx | 15 ++- 2 files changed, 14 insertions(+), 3 deletions(-) New commits: commit 36757ace36a5bcb0acd9ba5c4ee6cceed3c14b67 Author: Michael Stahl AuthorDate: Thu Mar 14 12:14:28 2024 +0100 Commit: Xisco Fauli CommitDate: Fri Mar 22 20:49:16 2024 +0100 sw: fix ~SwIndexReg assert in testTdf149498 The problem is that a SwNavigationMgr thingy has a cursor in one of the table cells, and the text node is moved to the undo nodes array in SwUndoTableCpyTable::AddBoxBefore() and deleted in SwUndoTableCpyTable::UndoImpl(). SwUndoTableCpyTable needs to move the cursors out of the way because SwUndoDelete doesn't do it. Change-Id: I75e271c84a6624ffb0df151b171acb1e1f743928 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164807 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 873af30a36504751c6923d4235abd4de040e0001) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164820 Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx index c6353f980d29..702f6d7dd30e 100644 --- a/sw/qa/extras/uiwriter/uiwriter5.cxx +++ b/sw/qa/extras/uiwriter/uiwriter5.cxx @@ -3007,7 +3007,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf156487) assertXPath(pXmlDoc, "/metafile/push/push/push/textarray/text"_ostr, 1); } -#ifndef DBG_UTIL CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf149498) { // load a table, and delete the first column with enabled change tracking: @@ -3023,7 +3022,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf149498) // this would crash due to bookmark over cell boundary dispatchCommand(mxComponent, ".uno:Undo", {}); } -#endif CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf150673_RedlineTableColumnDeletionWithExport) { diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 72f1c809e227..52157df0cae1 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2599,11 +2599,17 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent if( bDelContent ) { SwNodeIndex aInsIdx( *rBox.GetSttNd(), 1 ); -pDoc->GetNodes().MakeTextNode( aInsIdx.GetNode(), pDoc->GetDfltTextFormatColl() ); +SwTextNode *const pNewNode(pDoc->GetNodes().MakeTextNode(aInsIdx.GetNode(), pDoc->GetDfltTextFormatColl())); SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() ); if( !pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) +{ +{ // move cursors to new node which precedes aPam +SwPosition const pos(*pNewNode, 0); +::PaMCorrAbs(aPam, pos); +} pEntry->pUndo = std::make_unique(aPam, SwDeleteFlags::Default, true); +} } pEntry->pBoxNumAttr = std::make_uniqueGetDoc(); DEBUG_REDLINE( pDoc ) +{ // move cursors to first node which was inserted +SwPaM pam(SwNodeIndex(*rBox.GetSttNd(), 1)); +assert(pam.GetPoint()->GetNode().IsTextNode()); +pam.SetMark(); +pam.Move(fnMoveForward, GoInContent); +::PaMCorrAbs(pam, *pam.GetPoint()); +} if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) { SwPosition aTmpPos( rIdx );
core.git: Branch 'libreoffice-24-2-2' - 2 commits - sw/source
sw/source/core/docnode/ndtbl.cxx | 43 --- 1 file changed, 40 insertions(+), 3 deletions(-) New commits: commit 3146edaf76f4533f5872dc687a76a55c691ce4e9 Author: Michael Stahl AuthorDate: Fri Mar 22 14:27:01 2024 +0100 Commit: Christian Lohmaier CommitDate: Fri Mar 22 19:54:03 2024 +0100 tdf#157241 sw: assert when importing ToX in table in rhbz589883-2.docx ndtbl.cxx:1417: SwNodes::TextToTable(): Assertion `!rNode.IsSectionNode()' failed. (regression from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Change-Id: Iec12282573cb914d1924f4da4a28e26e01b866df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165164 Tested-by: Michael Stahl Reviewed-by: Michael Stahl (cherry picked from commit df6fdb0041f8bfd251a4b03030b8bc47f0614c36) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165173 Tested-by: Jenkins Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165193 Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index d052ed7eda4b..f3b3a07d63b5 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1413,16 +1413,19 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, // delete frames of all contained content nodes for( nLines = 0; aNodeIndex <= rTableNodes.rbegin()->rbegin()->aEnd; ++aNodeIndex,++nLines ) { -SwNode& rNode = aNodeIndex.GetNode(); -assert(!rNode.IsSectionNode()); // not possible in writerfilter import -if (rNode.IsTableNode()) +SwNode* pNode(()); +while (pNode->IsSectionNode()) // could be ToX field in table { -lcl_RemoveBreaksTable(static_cast(rNode), +pNode = pNode->GetNodes()[pNode->GetIndex()+1]; +} +if (pNode->IsTableNode()) +{ +lcl_RemoveBreaksTable(static_cast(*pNode), (0 == nLines) ? pTableFormat : nullptr); } -else if (rNode.IsContentNode()) +else if (pNode->IsContentNode()) { -lcl_RemoveBreaks(static_cast(rNode), +lcl_RemoveBreaks(static_cast(*pNode), (0 == nLines) ? pTableFormat : nullptr); } } commit 8506ffb5cef6e18c01350874231e66080efbaf5e Author: Michael Stahl AuthorDate: Wed Mar 13 18:57:21 2024 +0100 Commit: Christian Lohmaier CommitDate: Fri Mar 22 19:53:57 2024 +0100 tdf#157241 sw: fix crash on RTF paste or insert of nested tables The problem is that there are tables with only empty cell frames in the layout, which causes a crash in IsAllHiddenCell() added in commit ab7893544dc6be6dc192dffefd57cd5ddd421c35. This happens because first inner tables are created, with layout frames because the layout already exists. Then when SwNodes::TextToTable() is called for the outer table, it deletes the SwTextFrames, but not the SwTabFrames/SwCellFrames, so they remain uselessly in the layout. Delete these too, they will be recreated when the frame for the outer table is created. Also the transfer of any existing break to the outer table was missing. Change-Id: Idc2bc1d4c6572702510ae4355e4015c42770eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164788 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164813 Reviewed-by: Caolán McNamara (cherry picked from commit df5bb0c4343b4a090de3343c7d454a93099989c0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165003 Reviewed-by: Xisco Fauli Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index a7a2bee478da..d052ed7eda4b 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -888,6 +888,34 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, return } +static void lcl_RemoveBreaksTable(SwTableNode & rNode, SwTableFormat *const pTableFormat) +{ +// delete old layout frames, new ones need to be created... +rNode.DelFrames(nullptr); + +// remove PageBreaks/PageDesc/ColBreak +SwFrameFormat & rFormat(*rNode.GetTable().GetFrameFormat()); + +if (const SvxFormatBreakItem* pItem = rFormat.GetItemIfSet(RES_BREAK, false)) +{ +if (pTableFormat) +{ +pTableFormat->SetFormatAttr(*pItem); +} +rFormat.ResetFormatAttr(RES_BREAK); +} + +SwFormatPageDesc const*const pPageDescItem(rFormat.GetItemIfSet(RES_PAGEDESC, false)); +if (pPageDescItem && pPageDescItem->GetPageDesc()) +
core.git: Branch 'libreoffice-24-2-2' - sw/qa sw/source
sw/qa/core/unocore/unocore.cxx | 27 +++ sw/source/core/unocore/unocrsrhelper.cxx |2 +- 2 files changed, 28 insertions(+), 1 deletion(-) New commits: commit 9b4c239b51244dfb28a6822e2046c72e8f937227 Author: Michael Stahl AuthorDate: Fri Mar 22 12:28:43 2024 +0100 Commit: Christian Lohmaier CommitDate: Fri Mar 22 19:48:03 2024 +0100 sw: GetSelectableFromAny() broken for SwXTextRange The function unnecessarily uses an intermediate XUnoTunnel variable to handle SwXTextRange, but the implementation of XUnoTunnel was removed. (regression from commit 635448a996714a81cb15b41ac4bb0c73cabfb74f) Change-Id: I90dd7acbd259e8ca562a534ad0bc9a5b85356553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165162 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 8f2de92b3da99346f7282e623d47912f40f92b7b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165180 Reviewed-by: Xisco Fauli Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 381fe0dab3e2..3e52b12a363c 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -78,6 +78,33 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf119081) CPPUNIT_ASSERT_EQUAL(OUString("x"), pWrtShell->GetCurrentShellCursor().GetText()); } +CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, selectTextRange) +{ +createSwDoc(); +uno::Reference const xTD(mxComponent, uno::UNO_QUERY_THROW); +uno::Reference const xText(xTD->getText()); +uno::Reference const xCursor(xText->createTextCursor()); +xText->insertString(xCursor, "test", /*bAbsorb=*/false); +xCursor->gotoStart(false); +xCursor->gotoEnd(true); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xCursor->getString()); +uno::Reference const xMSF(mxComponent, uno::UNO_QUERY_THROW); +uno::Reference const xSection( +xMSF->createInstance("com.sun.star.text.TextSection"), uno::UNO_QUERY_THROW); +xText->insertTextContent(xCursor, xSection, true); +uno::Reference const xAnchor(xSection->getAnchor()); +uno::Reference const xView(xTD->getCurrentController(), + uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xAnchor->getString()); +CPPUNIT_ASSERT(xView->select(uno::Any(xAnchor))); +uno::Reference xSel; +CPPUNIT_ASSERT(xView->getSelection() >>= xSel); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSel->getCount()); +uno::Reference xSelRange; +CPPUNIT_ASSERT(xSel->getByIndex(0) >>= xSelRange); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xSelRange->getString()); +} + CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor) { createSwDoc(); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 70a724814cc6..30f6d6e6190e 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -225,7 +225,7 @@ void GetSelectableFromAny(uno::Reference const& xIfc, return; } -uno::Reference const xTextRange(xTunnel, UNO_QUERY); +uno::Reference const xTextRange(xIfc, UNO_QUERY); if (xTextRange.is()) { SwUnoInternalPaM aPam(rTargetDoc);
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/core/unocore/unocore.cxx | 27 +++ sw/source/core/unocore/unocrsrhelper.cxx |2 +- 2 files changed, 28 insertions(+), 1 deletion(-) New commits: commit 0398d6900835ff29767f7ac39bc7fb57917d8ccd Author: Michael Stahl AuthorDate: Fri Mar 22 12:28:43 2024 +0100 Commit: Christian Lohmaier CommitDate: Fri Mar 22 19:47:40 2024 +0100 sw: GetSelectableFromAny() broken for SwXTextRange The function unnecessarily uses an intermediate XUnoTunnel variable to handle SwXTextRange, but the implementation of XUnoTunnel was removed. (regression from commit 635448a996714a81cb15b41ac4bb0c73cabfb74f) Change-Id: I90dd7acbd259e8ca562a534ad0bc9a5b85356553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165162 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 8f2de92b3da99346f7282e623d47912f40f92b7b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165170 Reviewed-by: Christian Lohmaier diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 381fe0dab3e2..3e52b12a363c 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -78,6 +78,33 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf119081) CPPUNIT_ASSERT_EQUAL(OUString("x"), pWrtShell->GetCurrentShellCursor().GetText()); } +CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, selectTextRange) +{ +createSwDoc(); +uno::Reference const xTD(mxComponent, uno::UNO_QUERY_THROW); +uno::Reference const xText(xTD->getText()); +uno::Reference const xCursor(xText->createTextCursor()); +xText->insertString(xCursor, "test", /*bAbsorb=*/false); +xCursor->gotoStart(false); +xCursor->gotoEnd(true); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xCursor->getString()); +uno::Reference const xMSF(mxComponent, uno::UNO_QUERY_THROW); +uno::Reference const xSection( +xMSF->createInstance("com.sun.star.text.TextSection"), uno::UNO_QUERY_THROW); +xText->insertTextContent(xCursor, xSection, true); +uno::Reference const xAnchor(xSection->getAnchor()); +uno::Reference const xView(xTD->getCurrentController(), + uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xAnchor->getString()); +CPPUNIT_ASSERT(xView->select(uno::Any(xAnchor))); +uno::Reference xSel; +CPPUNIT_ASSERT(xView->getSelection() >>= xSel); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSel->getCount()); +uno::Reference xSelRange; +CPPUNIT_ASSERT(xSel->getByIndex(0) >>= xSelRange); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xSelRange->getString()); +} + CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor) { createSwDoc(); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 70a724814cc6..30f6d6e6190e 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -225,7 +225,7 @@ void GetSelectableFromAny(uno::Reference const& xIfc, return; } -uno::Reference const xTextRange(xTunnel, UNO_QUERY); +uno::Reference const xTextRange(xIfc, UNO_QUERY); if (xTextRange.is()) { SwUnoInternalPaM aPam(rTargetDoc);
core.git: Branch 'libreoffice-24-2-2' - configure.ac download.lst
configure.ac |2 +- download.lst |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 7eeaa3f188f8a3c24d2c7a5fe90d97de4708bfc8 Author: Michael Stahl AuthorDate: Wed Mar 20 10:52:09 2024 +0100 Commit: Christian Lohmaier CommitDate: Fri Mar 22 19:38:13 2024 +0100 python3: upgrade to release 3.8.19 Fixes CVE-2023-6597 and also CVE-2024-0450 Change-Id: Iebca2608e16a966356736201c63f1be5185430d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0633e4b4205334dd65ec64d7f3e306ee125e31be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165111 Reviewed-by: Xisco Fauli Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/configure.ac b/configure.ac index 758e160400ba..30cf1ea77625 100644 --- a/configure.ac +++ b/configure.ac @@ -10044,7 +10044,7 @@ if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_pyt SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 -PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 +PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index b65f8a067340..f64d3702d481 100644 --- a/download.lst +++ b/download.lst @@ -555,8 +555,8 @@ POSTGRESQL_TARBALL := postgresql-13.11.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f -PYTHON_TARBALL := Python-3.8.18.tar.xz +PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076 +PYTHON_TARBALL := Python-3.8.19.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts
core.git: Branch 'libreoffice-7-6' - 2 commits - sw/source
sw/source/core/docnode/ndtbl.cxx | 43 --- 1 file changed, 40 insertions(+), 3 deletions(-) New commits: commit 921abac0a5a0caa46875db640e3432379a5bcfa7 Author: Michael Stahl AuthorDate: Fri Mar 22 14:27:01 2024 +0100 Commit: Xisco Fauli CommitDate: Fri Mar 22 18:13:43 2024 +0100 tdf#157241 sw: assert when importing ToX in table in rhbz589883-2.docx ndtbl.cxx:1417: SwNodes::TextToTable(): Assertion `!rNode.IsSectionNode()' failed. (regression from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Change-Id: Iec12282573cb914d1924f4da4a28e26e01b866df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165164 Tested-by: Michael Stahl Reviewed-by: Michael Stahl (cherry picked from commit df6fdb0041f8bfd251a4b03030b8bc47f0614c36) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165172 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index faabbf1d4953..b913f0c48a21 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1413,16 +1413,19 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, // delete frames of all contained content nodes for( nLines = 0; aNodeIndex <= rTableNodes.rbegin()->rbegin()->aEnd; ++aNodeIndex,++nLines ) { -SwNode& rNode = aNodeIndex.GetNode(); -assert(!rNode.IsSectionNode()); // not possible in writerfilter import -if (rNode.IsTableNode()) +SwNode* pNode(()); +while (pNode->IsSectionNode()) // could be ToX field in table { -lcl_RemoveBreaksTable(static_cast(rNode), +pNode = pNode->GetNodes()[pNode->GetIndex()+1]; +} +if (pNode->IsTableNode()) +{ +lcl_RemoveBreaksTable(static_cast(*pNode), (0 == nLines) ? pTableFormat : nullptr); } -else if (rNode.IsContentNode()) +else if (pNode->IsContentNode()) { -lcl_RemoveBreaks(static_cast(rNode), +lcl_RemoveBreaks(static_cast(*pNode), (0 == nLines) ? pTableFormat : nullptr); } } commit 56676a8cb6899f376d9893392700e096ad589bed Author: Michael Stahl AuthorDate: Wed Mar 13 18:57:21 2024 +0100 Commit: Xisco Fauli CommitDate: Fri Mar 22 18:13:38 2024 +0100 tdf#157241 sw: fix crash on RTF paste or insert of nested tables The problem is that there are tables with only empty cell frames in the layout, which causes a crash in IsAllHiddenCell() added in commit ab7893544dc6be6dc192dffefd57cd5ddd421c35. This happens because first inner tables are created, with layout frames because the layout already exists. Then when SwNodes::TextToTable() is called for the outer table, it deletes the SwTextFrames, but not the SwTabFrames/SwCellFrames, so they remain uselessly in the layout. Delete these too, they will be recreated when the frame for the outer table is created. Also the transfer of any existing break to the outer table was missing. Change-Id: Idc2bc1d4c6572702510ae4355e4015c42770eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164788 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164814 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index cec3e7df57c4..faabbf1d4953 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -888,6 +888,34 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, return } +static void lcl_RemoveBreaksTable(SwTableNode & rNode, SwTableFormat *const pTableFormat) +{ +// delete old layout frames, new ones need to be created... +rNode.DelFrames(nullptr); + +// remove PageBreaks/PageDesc/ColBreak +SwFrameFormat & rFormat(*rNode.GetTable().GetFrameFormat()); + +if (const SvxFormatBreakItem* pItem = rFormat.GetItemIfSet(RES_BREAK, false)) +{ +if (pTableFormat) +{ +pTableFormat->SetFormatAttr(*pItem); +} +rFormat.ResetFormatAttr(RES_BREAK); +} + +SwFormatPageDesc const*const pPageDescItem(rFormat.GetItemIfSet(RES_PAGEDESC, false)); +if (pPageDescItem && pPageDescItem->GetPageDesc()) +{ +if (pTableFormat) +{ +pTableFormat->SetFormatAttr(*pPageDescItem); +} +rFormat.ResetFormatAttr(RES_PAGEDESC); +} +} + static void lcl_RemoveBreaks(SwContentNode & rNode, SwTableFormat *const pTableFormat) { // delete old layout frames, new ones need to be created... @@ -1386,7 +1414,13 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t &
core.git: Branch 'libreoffice-7-6' - sw/qa sw/source
sw/qa/core/unocore/unocore.cxx | 27 +++ sw/source/core/unocore/unocrsrhelper.cxx |2 +- 2 files changed, 28 insertions(+), 1 deletion(-) New commits: commit e41212466ef6b52c8890dcf0b071fac3fec11c9d Author: Michael Stahl AuthorDate: Fri Mar 22 12:28:43 2024 +0100 Commit: Xisco Fauli CommitDate: Fri Mar 22 18:05:10 2024 +0100 sw: GetSelectableFromAny() broken for SwXTextRange The function unnecessarily uses an intermediate XUnoTunnel variable to handle SwXTextRange, but the implementation of XUnoTunnel was removed. (regression from commit 635448a996714a81cb15b41ac4bb0c73cabfb74f) Change-Id: I90dd7acbd259e8ca562a534ad0bc9a5b85356553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165162 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 8f2de92b3da99346f7282e623d47912f40f92b7b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165171 Reviewed-by: Xisco Fauli diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index cb6f52d0fdbb..3d759e467000 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -77,6 +77,33 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf119081) CPPUNIT_ASSERT_EQUAL(OUString("x"), pWrtShell->GetCurrentShellCursor().GetText()); } +CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, selectTextRange) +{ +createSwDoc(); +uno::Reference const xTD(mxComponent, uno::UNO_QUERY_THROW); +uno::Reference const xText(xTD->getText()); +uno::Reference const xCursor(xText->createTextCursor()); +xText->insertString(xCursor, "test", /*bAbsorb=*/false); +xCursor->gotoStart(false); +xCursor->gotoEnd(true); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xCursor->getString()); +uno::Reference const xMSF(mxComponent, uno::UNO_QUERY_THROW); +uno::Reference const xSection( +xMSF->createInstance("com.sun.star.text.TextSection"), uno::UNO_QUERY_THROW); +xText->insertTextContent(xCursor, xSection, true); +uno::Reference const xAnchor(xSection->getAnchor()); +uno::Reference const xView(xTD->getCurrentController(), + uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xAnchor->getString()); +CPPUNIT_ASSERT(xView->select(uno::Any(xAnchor))); +uno::Reference xSel; +CPPUNIT_ASSERT(xView->getSelection() >>= xSel); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSel->getCount()); +uno::Reference xSelRange; +CPPUNIT_ASSERT(xSel->getByIndex(0) >>= xSelRange); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xSelRange->getString()); +} + CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor) { createSwDoc(); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 831cffd5ac1d..de1927aafb31 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -232,7 +232,7 @@ void GetSelectableFromAny(uno::Reference const& xIfc, return; } -uno::Reference const xTextRange(xTunnel, UNO_QUERY); +uno::Reference const xTextRange(xIfc, UNO_QUERY); if (xTextRange.is()) { SwUnoInternalPaM aPam(rTargetDoc);
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/docnode/ndtbl.cxx | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) New commits: commit 6c155583c83eb19c3520084c90df51eca725da00 Author: Michael Stahl AuthorDate: Fri Mar 22 14:27:01 2024 +0100 Commit: Xisco Fauli CommitDate: Fri Mar 22 17:48:23 2024 +0100 tdf#157241 sw: assert when importing ToX in table in rhbz589883-2.docx ndtbl.cxx:1417: SwNodes::TextToTable(): Assertion `!rNode.IsSectionNode()' failed. (regression from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Change-Id: Iec12282573cb914d1924f4da4a28e26e01b866df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165164 Tested-by: Michael Stahl Reviewed-by: Michael Stahl (cherry picked from commit df6fdb0041f8bfd251a4b03030b8bc47f0614c36) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165173 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index d052ed7eda4b..f3b3a07d63b5 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1413,16 +1413,19 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, // delete frames of all contained content nodes for( nLines = 0; aNodeIndex <= rTableNodes.rbegin()->rbegin()->aEnd; ++aNodeIndex,++nLines ) { -SwNode& rNode = aNodeIndex.GetNode(); -assert(!rNode.IsSectionNode()); // not possible in writerfilter import -if (rNode.IsTableNode()) +SwNode* pNode(()); +while (pNode->IsSectionNode()) // could be ToX field in table { -lcl_RemoveBreaksTable(static_cast(rNode), +pNode = pNode->GetNodes()[pNode->GetIndex()+1]; +} +if (pNode->IsTableNode()) +{ +lcl_RemoveBreaksTable(static_cast(*pNode), (0 == nLines) ? pTableFormat : nullptr); } -else if (rNode.IsContentNode()) +else if (pNode->IsContentNode()) { -lcl_RemoveBreaks(static_cast(rNode), +lcl_RemoveBreaks(static_cast(*pNode), (0 == nLines) ? pTableFormat : nullptr); } }
core.git: sw/source
sw/source/core/docnode/ndtbl.cxx | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) New commits: commit df6fdb0041f8bfd251a4b03030b8bc47f0614c36 Author: Michael Stahl AuthorDate: Fri Mar 22 14:27:01 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 22 16:06:20 2024 +0100 tdf#157241 sw: assert when importing ToX in table in rhbz589883-2.docx ndtbl.cxx:1417: SwNodes::TextToTable(): Assertion `!rNode.IsSectionNode()' failed. (regression from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Change-Id: Iec12282573cb914d1924f4da4a28e26e01b866df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165164 Tested-by: Michael Stahl Reviewed-by: Michael Stahl diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 00698a0c91c7..7cb12d996ef9 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1413,16 +1413,19 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, // delete frames of all contained content nodes for( nLines = 0; aNodeIndex <= rTableNodes.rbegin()->rbegin()->aEnd; ++aNodeIndex,++nLines ) { -SwNode& rNode = aNodeIndex.GetNode(); -assert(!rNode.IsSectionNode()); // not possible in writerfilter import -if (rNode.IsTableNode()) +SwNode* pNode(()); +while (pNode->IsSectionNode()) // could be ToX field in table { -lcl_RemoveBreaksTable(static_cast(rNode), +pNode = pNode->GetNodes()[pNode->GetIndex()+1]; +} +if (pNode->IsTableNode()) +{ +lcl_RemoveBreaksTable(static_cast(*pNode), (0 == nLines) ? pTableFormat : nullptr); } -else if (rNode.IsContentNode()) +else if (pNode->IsContentNode()) { -lcl_RemoveBreaks(static_cast(rNode), +lcl_RemoveBreaks(static_cast(*pNode), (0 == nLines) ? pTableFormat : nullptr); } }
core.git: sw/qa sw/source
sw/qa/core/unocore/unocore.cxx | 27 +++ sw/source/core/unocore/unocrsrhelper.cxx |2 +- 2 files changed, 28 insertions(+), 1 deletion(-) New commits: commit 8f2de92b3da99346f7282e623d47912f40f92b7b Author: Michael Stahl AuthorDate: Fri Mar 22 12:28:43 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 22 15:15:06 2024 +0100 sw: GetSelectableFromAny() broken for SwXTextRange The function unnecessarily uses an intermediate XUnoTunnel variable to handle SwXTextRange, but the implementation of XUnoTunnel was removed. (regression from commit 635448a996714a81cb15b41ac4bb0c73cabfb74f) Change-Id: I90dd7acbd259e8ca562a534ad0bc9a5b85356553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165162 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 381fe0dab3e2..3e52b12a363c 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -78,6 +78,33 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf119081) CPPUNIT_ASSERT_EQUAL(OUString("x"), pWrtShell->GetCurrentShellCursor().GetText()); } +CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, selectTextRange) +{ +createSwDoc(); +uno::Reference const xTD(mxComponent, uno::UNO_QUERY_THROW); +uno::Reference const xText(xTD->getText()); +uno::Reference const xCursor(xText->createTextCursor()); +xText->insertString(xCursor, "test", /*bAbsorb=*/false); +xCursor->gotoStart(false); +xCursor->gotoEnd(true); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xCursor->getString()); +uno::Reference const xMSF(mxComponent, uno::UNO_QUERY_THROW); +uno::Reference const xSection( +xMSF->createInstance("com.sun.star.text.TextSection"), uno::UNO_QUERY_THROW); +xText->insertTextContent(xCursor, xSection, true); +uno::Reference const xAnchor(xSection->getAnchor()); +uno::Reference const xView(xTD->getCurrentController(), + uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xAnchor->getString()); +CPPUNIT_ASSERT(xView->select(uno::Any(xAnchor))); +uno::Reference xSel; +CPPUNIT_ASSERT(xView->getSelection() >>= xSel); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSel->getCount()); +uno::Reference xSelRange; +CPPUNIT_ASSERT(xSel->getByIndex(0) >>= xSelRange); +CPPUNIT_ASSERT_EQUAL(OUString("test"), xSelRange->getString()); +} + CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor) { createSwDoc(); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 5f3c88f3511b..9821f9477c85 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -226,7 +226,7 @@ void GetSelectableFromAny(uno::Reference const& xIfc, return; } -uno::Reference const xTextRange(xTunnel, UNO_QUERY); +uno::Reference const xTextRange(xIfc, UNO_QUERY); if (xTextRange.is()) { SwUnoInternalPaM aPam(rTargetDoc);
core.git: Branch 'libreoffice-24-2' - configmgr/source
configmgr/source/xcsparser.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 27526cde7fb6cdcf23f23349cdc7ebdaa3d9bcfa Author: Michael Stahl AuthorDate: Thu Mar 21 18:47:03 2024 +0100 Commit: Stephan Bergmann CommitDate: Fri Mar 22 10:09:12 2024 +0100 configmgr: fix parse error if subelements of used The unused but valid child elements of such as may be used by exentions. This fails with: warn:configmgr:15104:10916:configmgr/source/components.cxx:660: error reading "file:///instdir/program/../share/uno_packages/cache/uno_packages/xcs" com.sun.star.uno.RuntimeException message: "bad member in xcs at configmgr/source/xcsparser.cxx:289" Because ending the first such element sets bIsParsingInfo_ to false. This fix just concatenates all the characters in all the children, should work well enough for extensions. (regression from commit db3078bd8c8e3ce3a99fc3987bb6e93b609990c1) Change-Id: I17a3fb7014cd34c1d546701036550085365432a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165143 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 8350404ec1c02df8b4f6b4f48947ddbff53d91e5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165126 Reviewed-by: Stephan Bergmann diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index e70ddac6a6c9..35f61fa1959e 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -129,7 +129,9 @@ bool XcsParser::startElement( // illegal content): if (ignoring_ > 0 || (nsId == xmlreader::XmlReader::NAMESPACE_NONE -&& (name == "import" || name == "uses" || name == "constraints" || name == "desc"))) +&& (name == "import" || name == "uses" || name == "constraints" || name == "desc" +// the following are unused by LO but valid +|| name == "deprecated" || name == "author" || name == "label"))) { assert(ignoring_ < LONG_MAX); ++ignoring_;
core.git: configmgr/source
configmgr/source/xcsparser.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 8350404ec1c02df8b4f6b4f48947ddbff53d91e5 Author: Michael Stahl AuthorDate: Thu Mar 21 18:47:03 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 22 08:46:04 2024 +0100 configmgr: fix parse error if subelements of used The unused but valid child elements of such as may be used by exentions. This fails with: warn:configmgr:15104:10916:configmgr/source/components.cxx:660: error reading "file:///instdir/program/../share/uno_packages/cache/uno_packages/xcs" com.sun.star.uno.RuntimeException message: "bad member in xcs at configmgr/source/xcsparser.cxx:289" Because ending the first such element sets bIsParsingInfo_ to false. This fix just concatenates all the characters in all the children, should work well enough for extensions. (regression from commit db3078bd8c8e3ce3a99fc3987bb6e93b609990c1) Change-Id: I17a3fb7014cd34c1d546701036550085365432a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165143 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index e70ddac6a6c9..35f61fa1959e 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -129,7 +129,9 @@ bool XcsParser::startElement( // illegal content): if (ignoring_ > 0 || (nsId == xmlreader::XmlReader::NAMESPACE_NONE -&& (name == "import" || name == "uses" || name == "constraints" || name == "desc"))) +&& (name == "import" || name == "uses" || name == "constraints" || name == "desc" +// the following are unused by LO but valid +|| name == "deprecated" || name == "author" || name == "label"))) { assert(ignoring_ < LONG_MAX); ++ignoring_;
core.git: Branch 'libreoffice-7-6-6' - configure.ac download.lst
configure.ac |2 +- download.lst |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit c3f1a904180abed14779bc165382406e1d20b4bd Author: Michael Stahl AuthorDate: Wed Mar 20 10:52:09 2024 +0100 Commit: Christian Lohmaier CommitDate: Thu Mar 21 18:13:57 2024 +0100 python3: upgrade to release 3.8.19 Fixes CVE-2023-6597 and also CVE-2024-0450 Change-Id: Iebca2608e16a966356736201c63f1be5185430d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0633e4b4205334dd65ec64d7f3e306ee125e31be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165009 Reviewed-by: Xisco Fauli (cherry picked from commit a65cb686e8e9bf842c354b77945a0dad252c4188) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165115 Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/configure.ac b/configure.ac index 29f6ba8bfd2f..8801f9cb0850 100644 --- a/configure.ac +++ b/configure.ac @@ -9955,7 +9955,7 @@ if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_pyt SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 -PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 +PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 5743c6c951a3..21c6aa046ffb 100644 --- a/download.lst +++ b/download.lst @@ -470,8 +470,8 @@ POSTGRESQL_TARBALL := postgresql-13.11.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f -PYTHON_TARBALL := Python-3.8.18.tar.xz +PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076 +PYTHON_TARBALL := Python-3.8.19.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts
core.git: Branch 'libreoffice-24-2' - configure.ac download.lst
configure.ac |2 +- download.lst |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit fc26519a0b11e470ace3651a0cad8ea82d3b03d4 Author: Michael Stahl AuthorDate: Wed Mar 20 10:52:09 2024 +0100 Commit: Xisco Fauli CommitDate: Thu Mar 21 16:09:01 2024 +0100 python3: upgrade to release 3.8.19 Fixes CVE-2023-6597 and also CVE-2024-0450 Change-Id: Iebca2608e16a966356736201c63f1be5185430d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0633e4b4205334dd65ec64d7f3e306ee125e31be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165008 Reviewed-by: Xisco Fauli diff --git a/configure.ac b/configure.ac index b8dbb3c0e7be..b78d73420d81 100644 --- a/configure.ac +++ b/configure.ac @@ -10044,7 +10044,7 @@ if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_pyt SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 -PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 +PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index b65f8a067340..f64d3702d481 100644 --- a/download.lst +++ b/download.lst @@ -555,8 +555,8 @@ POSTGRESQL_TARBALL := postgresql-13.11.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f -PYTHON_TARBALL := Python-3.8.18.tar.xz +PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076 +PYTHON_TARBALL := Python-3.8.19.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts
core.git: Branch 'libreoffice-7-6' - configure.ac download.lst
configure.ac |2 +- download.lst |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 2f9c4b3e0f486f479b0ed12cc008e05fcef5cf2a Author: Michael Stahl AuthorDate: Wed Mar 20 10:52:09 2024 +0100 Commit: Xisco Fauli CommitDate: Thu Mar 21 10:56:55 2024 +0100 python3: upgrade to release 3.8.19 Fixes CVE-2023-6597 and also CVE-2024-0450 Change-Id: Iebca2608e16a966356736201c63f1be5185430d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0633e4b4205334dd65ec64d7f3e306ee125e31be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165009 Reviewed-by: Xisco Fauli diff --git a/configure.ac b/configure.ac index 11f796584019..ecc8cf29733a 100644 --- a/configure.ac +++ b/configure.ac @@ -9955,7 +9955,7 @@ if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_pyt SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 -PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 +PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 5743c6c951a3..21c6aa046ffb 100644 --- a/download.lst +++ b/download.lst @@ -470,8 +470,8 @@ POSTGRESQL_TARBALL := postgresql-13.11.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f -PYTHON_TARBALL := Python-3.8.18.tar.xz +PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076 +PYTHON_TARBALL := Python-3.8.19.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts
core.git: framework/source
framework/source/uielement/menubarmanager.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit 447a15f4772bcbc9366cfa43b92c55ae644e9b03 Author: Michael Stahl AuthorDate: Wed Mar 20 21:42:50 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 21 10:49:06 2024 +0100 framework: MenuBarManager: fix WNT crash if queryDispatch() throws a Java extension throws RuntimeException from queryDispatch(), which is translated to a C++ exception and thrown by the mscx_uno bridge, and this is apparently not handled anywhere (Visual Studio says "Unhandled Exception"), and what happens then apparently is the exception goes poof and vanishes, and normal return from the mscx_uno bridge code happens, but the out parameter used for the return value is never initialised, and then the uno::Reference move assignment operator crashes. Change-Id: I21535fcf0ab4ec30a712d01b5039b7e2fb7b09d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165081 Tested-by: Michael Stahl Reviewed-by: Michael Stahl diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 770e6b166a1c..0eb7705e66fd 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -660,7 +660,16 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool ) if ( aTargetURL.Complete.startsWith( ".uno:StyleApply?" ) ) xMenuItemDispatch = new StyleDispatcher( m_xFrame, m_xURLTransformer, aTargetURL ); else -xMenuItemDispatch = xDispatchProvider->queryDispatch( aTargetURL, menuItemHandler->aTargetFrame, 0 ); +{ +try +{ +xMenuItemDispatch = xDispatchProvider->queryDispatch( aTargetURL, menuItemHandler->aTargetFrame, 0 ); +} +catch (uno::Exception const&) +{ +TOOLS_WARN_EXCEPTION("fwk.uielement", "MenuBarManager::Activate(): exception from queryDispatch()"); +} +} bool bPopupMenu( false ); if ( !menuItemHandler->xPopupMenuController.is() &&
core.git: Branch 'distro/cib/libreoffice-6-4' - configure.ac download.lst
configure.ac |2 +- download.lst |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit d96f1f068a46187e3138e74933fa412e52ef0e55 Author: Michael Stahl AuthorDate: Wed Mar 20 10:52:09 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 20 21:53:57 2024 +0100 python3: upgrade to release 3.8.19 Fixes CVE-2023-6597 and also CVE-2024-0450 Change-Id: Iebca2608e16a966356736201c63f1be5185430d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0633e4b4205334dd65ec64d7f3e306ee125e31be) diff --git a/configure.ac b/configure.ac index 6121d25e6b41..4b7de8d43669 100644 --- a/configure.ac +++ b/configure.ac @@ -8796,7 +8796,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 -PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 +PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 79bf14911ba0..4353d04acf67 100644 --- a/download.lst +++ b/download.lst @@ -480,8 +480,8 @@ POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f -PYTHON_TARBALL := Python-3.8.18.tar.xz +PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076 +PYTHON_TARBALL := Python-3.8.19.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts
core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - configure.ac download.lst
configure.ac |2 +- download.lst |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 1bdfcc2ebfb6947699a733411e061c6ae6d87bd1 Author: Michael Stahl AuthorDate: Wed Mar 20 10:52:09 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 20 21:54:37 2024 +0100 python3: upgrade to release 3.8.19 Fixes CVE-2023-6597 and also CVE-2024-0450 Change-Id: Iebca2608e16a966356736201c63f1be5185430d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0633e4b4205334dd65ec64d7f3e306ee125e31be) diff --git a/configure.ac b/configure.ac index dd5019135fe9..2d1c1ea6cb63 100644 --- a/configure.ac +++ b/configure.ac @@ -8797,7 +8797,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 -PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 +PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 4102d8231629..3e7e149f8f50 100644 --- a/download.lst +++ b/download.lst @@ -485,8 +485,8 @@ POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f -PYTHON_TARBALL := Python-3.8.18.tar.xz +PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076 +PYTHON_TARBALL := Python-3.8.19.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts
core.git: Branch 'distro/allotropia/zeta-7-4' - configure.ac download.lst
configure.ac |2 +- download.lst |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit b82f1163cc2fc696cf86209d94d838d04998350f Author: Michael Stahl AuthorDate: Wed Mar 20 10:52:09 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 20 21:53:08 2024 +0100 python3: upgrade to release 3.8.19 Fixes CVE-2023-6597 and also CVE-2024-0450 Change-Id: Iebca2608e16a966356736201c63f1be5185430d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0633e4b4205334dd65ec64d7f3e306ee125e31be) diff --git a/configure.ac b/configure.ac index 0bfa249542e7..dbe334682335 100644 --- a/configure.ac +++ b/configure.ac @@ -9932,7 +9932,7 @@ if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_pyt SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 -PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 +PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 163c5794f1e0..2c2b82e2e3b8 100644 --- a/download.lst +++ b/download.lst @@ -486,8 +486,8 @@ POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f -PYTHON_TARBALL := Python-3.8.18.tar.xz +PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076 +PYTHON_TARBALL := Python-3.8.19.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts
core.git: configure.ac download.lst
configure.ac |2 +- download.lst |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 0633e4b4205334dd65ec64d7f3e306ee125e31be Author: Michael Stahl AuthorDate: Wed Mar 20 10:52:09 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 20 21:37:59 2024 +0100 python3: upgrade to release 3.8.19 Fixes CVE-2023-6597 and also CVE-2024-0450 Change-Id: Iebca2608e16a966356736201c63f1be5185430d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165053 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/configure.ac b/configure.ac index 051934a3cce1..81d9ec93ac19 100644 --- a/configure.ac +++ b/configure.ac @@ -10069,7 +10069,7 @@ if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_pyt SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 -PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 +PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 8589b1fc..27391725e6a5 100644 --- a/download.lst +++ b/download.lst @@ -555,8 +555,8 @@ POSTGRESQL_TARBALL := postgresql-13.11.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f -PYTHON_TARBALL := Python-3.8.18.tar.xz +PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076 +PYTHON_TARBALL := Python-3.8.19.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/docnode/ndtbl.cxx | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) New commits: commit df5bb0c4343b4a090de3343c7d454a93099989c0 Author: Michael Stahl AuthorDate: Wed Mar 13 18:57:21 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Mar 19 20:56:46 2024 +0100 tdf#157241 sw: fix crash on RTF paste or insert of nested tables The problem is that there are tables with only empty cell frames in the layout, which causes a crash in IsAllHiddenCell() added in commit ab7893544dc6be6dc192dffefd57cd5ddd421c35. This happens because first inner tables are created, with layout frames because the layout already exists. Then when SwNodes::TextToTable() is called for the outer table, it deletes the SwTextFrames, but not the SwTabFrames/SwCellFrames, so they remain uselessly in the layout. Delete these too, they will be recreated when the frame for the outer table is created. Also the transfer of any existing break to the outer table was missing. Change-Id: Idc2bc1d4c6572702510ae4355e4015c42770eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164788 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164813 Reviewed-by: Caolán McNamara diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index a7a2bee478da..d052ed7eda4b 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -888,6 +888,34 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, return } +static void lcl_RemoveBreaksTable(SwTableNode & rNode, SwTableFormat *const pTableFormat) +{ +// delete old layout frames, new ones need to be created... +rNode.DelFrames(nullptr); + +// remove PageBreaks/PageDesc/ColBreak +SwFrameFormat & rFormat(*rNode.GetTable().GetFrameFormat()); + +if (const SvxFormatBreakItem* pItem = rFormat.GetItemIfSet(RES_BREAK, false)) +{ +if (pTableFormat) +{ +pTableFormat->SetFormatAttr(*pItem); +} +rFormat.ResetFormatAttr(RES_BREAK); +} + +SwFormatPageDesc const*const pPageDescItem(rFormat.GetItemIfSet(RES_PAGEDESC, false)); +if (pPageDescItem && pPageDescItem->GetPageDesc()) +{ +if (pTableFormat) +{ +pTableFormat->SetFormatAttr(*pPageDescItem); +} +rFormat.ResetFormatAttr(RES_PAGEDESC); +} +} + static void lcl_RemoveBreaks(SwContentNode & rNode, SwTableFormat *const pTableFormat) { // delete old layout frames, new ones need to be created... @@ -1386,7 +1414,13 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, for( nLines = 0; aNodeIndex <= rTableNodes.rbegin()->rbegin()->aEnd; ++aNodeIndex,++nLines ) { SwNode& rNode = aNodeIndex.GetNode(); -if( rNode.IsContentNode() ) +assert(!rNode.IsSectionNode()); // not possible in writerfilter import +if (rNode.IsTableNode()) +{ +lcl_RemoveBreaksTable(static_cast(rNode), +(0 == nLines) ? pTableFormat : nullptr); +} +else if (rNode.IsContentNode()) { lcl_RemoveBreaks(static_cast(rNode), (0 == nLines) ? pTableFormat : nullptr);
core.git: Branch 'libreoffice-24-2' - 2 commits - ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 32 +++-- 1 file changed, 13 insertions(+), 19 deletions(-) New commits: commit 84b5de0e000372e46d7243873859fc03e114bde8 Author: Michael Stahl AuthorDate: Thu Mar 14 15:47:28 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Mar 19 20:56:22 2024 +0100 ucb: webdav-curl: always set CURLOPT_NOBODY for HEAD Otherwise there will be timeout that depends on when the server will close the connection, which varies by server but can be several minutes; getting a potential error document from the server for this one request when logging is enabled is less important. Change-Id: I505b014b148ba009c400d37d826c9edb8c3a6da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164838 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit c8400f5acc36d2cf0c007260bdc94534a53bba90) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164822 Reviewed-by: Caolán McNamara diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 3b40d2c3082f..2f104d5388d7 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -166,15 +166,6 @@ struct CurlOption } }; -// NOBODY will prevent logging the response body in ProcessRequest() exception -// handler, so only use it if logging is disabled -const CurlOption g_NoBody{ CURLOPT_NOBODY, - sal_detail_log_report(SAL_DETAIL_LOG_LEVEL_INFO, "ucb.ucp.webdav.curl") - == SAL_DETAIL_LOG_ACTION_IGNORE - ? 1L - : 0L, - nullptr }; - /// combined guard class to ensure things are released in correct order, /// particularly in ProcessRequest() error handling class Guard @@ -1829,7 +1820,11 @@ auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector co CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); ::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } +// NOBODY will prevent logging the response body in ProcessRequest() +// exception, but omitting it here results in a long timeout until the +// server closes the connection, which is worse +{ CURLOPT_NOBODY, 1L, nullptr }, +{ CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } }; ::std::pair<::std::vector const&, DAVResource&> const headers(rHeaderNames, commit 372ee9e4c24e628ce73ec0c6a6fee91abd2e6b94 Author: Michael Stahl AuthorDate: Fri Mar 8 11:20:45 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Mar 19 20:56:14 2024 +0100 ucb: webdav-curl: only set CURLOPT_NOBODY for HEAD Some testing with Apache httpd+mod_dav reveals that it usually sends a body with a 401 status, which causes the CURLE_WEIRD_SERVER_REPLY error code from curl. So we should either ignore this error in case there's a HTTP status too, or stop using CURLOPT_NOBODY. The latter seems to have no downside, except for HEAD requests, where strangely the server keeps the connection open and curl waits for 5 seconds for no body to arrive, blocking the UI, so continue to use CURLOPT_NOBODY for HEAD. The other methods don't seem to block. It turns out that the SAL_LOG-dependent setting of g_NoBody turned HEAD into GET anyway if logging is enabled, so explicitly set the method. Change-Id: Ibe2eef8e7a827d4e356ba37c4b56bee0be3b9c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164569 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit e0259d4c0951c4dd77c74d08b9d905728d4c8dfd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164507 Reviewed-by: Caolán McNamara diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 18bd7ab61e2b..3b40d2c3082f 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1828,7 +1828,9 @@ auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector co CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ g_NoBody }; +::std::vector const options{ +g_NoBody, { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } +}; ::std::pair<::std::vector const&, DAVResource&> const headers(rHeaderNames, io_rResource); @@ -2063,9 +2065,8 @@ auto CurlSession::MKCOL(OUString const& rURIReference, DAVRequestEnvironment con CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST,
core.git: Branch 'libreoffice-24-2' - ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 7e5891a327889be3a052594efd7862ed5be13606 Author: Michael Stahl AuthorDate: Thu Mar 7 20:10:48 2024 +0100 Commit: Caolán McNamara CommitDate: Tue Mar 19 20:55:19 2024 +0100 ucb: webdav-curl: don't set CURLOPT_NOBODY for OPTIONS The problem is that if the server does send a body, then curl returns CURLE_WEIRD_SERVER_REPLY error code, which is translated to DAVException; this looks unnecessary now because write_callback will just return if there's no stream to write to anyway. Change-Id: Iddaee9778ac7bbd538b64584f822f65ab0e395c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164550 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 980ca3953084560806cd980d2ec16951d9e30c2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164501 Reviewed-by: Caolán McNamara diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index a54e9d1addfb..18bd7ab61e2b 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1519,9 +1519,8 @@ auto CurlSession::OPTIONS(OUString const& rURIReference, DAVResource result; ::std::pair<::std::vector const&, DAVResource&> const headers(headerNames, result); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "OPTIONS", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "OPTIONS", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "OPTIONS", options, , nullptr, nullptr, nullptr, );
core.git: Branch 'libreoffice-24-2-2' - sw/source
sw/source/core/layout/tabfrm.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6a9feb0bba19bcff87e0e1a16fcd03ad3a390dfa Author: Michael Stahl AuthorDate: Tue Mar 12 16:21:57 2024 +0100 Commit: Xisco Fauli CommitDate: Tue Mar 19 18:51:46 2024 +0100 tdf#157241 sw: layout: inconsistent conditions in lcl_RecalcSplitLine() A mistake, when checking before the condition is "if (pTab == )" but when checking after it is "if (pTab)" - the latter is correct as the former is checked *inside* the block, after resolving to top-level table. This caused erroneously setting rIsFootnoteGrowth = true in SwTabFrame::MakeAll() of tab 939 in the bugdoc, when in fact the footnote container shrunk from 5 to 2 footnotes. (regression from commit c303981cfd95ce1c3881366023d5495ae2edce97) Change-Id: Ib4cad9fef0e500ebe7a3636c2371a4108b32fb5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164717 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 7d3b439de357c8e97c0a73f6f63e67ec980e432d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164733 Reviewed-by: Xisco Fauli (cherry picked from commit 3ea0c848b490f5b6f5f3860a9036ce25754a1f17) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164740 Reviewed-by: Adolfo Jayme Barrientos Reviewed-by: Michael Weghorn Tested-by: Xisco Fauli diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 8c49106364dc..c4a742c0373d 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -667,7 +667,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine, { SwContentFrame const*const pAnchor = pFootnote->GetRef(); SwTabFrame const* pTab = pAnchor->FindTabFrame(); -if (pTab == ) +if (pTab) { while (pTab->GetUpper()->IsInTab()) {
core.git: Branch 'feature/allo_contract45533' - 2 commits - sw/qa sw/source
sw/qa/core/layout/data/floattable-in-section.docx |binary sw/qa/core/layout/layact.cxx | 22 ++ sw/qa/extras/uiwriter/uiwriter5.cxx |2 -- sw/source/core/layout/layact.cxx |6 +- sw/source/core/undo/untbl.cxx | 15 ++- 5 files changed, 41 insertions(+), 4 deletions(-) New commits: commit 2f1cf8dd8b230f64ce9f64fc7761c425ebefaca2 Author: Michael Stahl AuthorDate: Thu Mar 14 12:14:28 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 15 11:05:34 2024 +0100 sw: fix ~SwIndexReg assert in testTdf149498 The problem is that a SwNavigationMgr thingy has a cursor in one of the table cells, and the text node is moved to the undo nodes array in SwUndoTableCpyTable::AddBoxBefore() and deleted in SwUndoTableCpyTable::UndoImpl(). SwUndoTableCpyTable needs to move the cursors out of the way because SwUndoDelete doesn't do it. Change-Id: I75e271c84a6624ffb0df151b171acb1e1f743928 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164807 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 873af30a36504751c6923d4235abd4de040e0001) diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx index 285a3adb7c61..7b0b90b31759 100644 --- a/sw/qa/extras/uiwriter/uiwriter5.cxx +++ b/sw/qa/extras/uiwriter/uiwriter5.cxx @@ -2807,7 +2807,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf156487) assertXPath(pXmlDoc, "/metafile/push/push/push/textarray/text", 1); } -#ifndef DBG_UTIL CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf149498) { // load a table, and delete the first column with enabled change tracking: @@ -2823,7 +2822,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf149498) // this would crash due to bookmark over cell boundary dispatchCommand(mxComponent, ".uno:Undo", {}); } -#endif CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf150673_RedlineTableColumnDeletionWithExport) { diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 3092df0c2fd3..145a4ca12310 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2592,11 +2592,17 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent if( bDelContent ) { SwNodeIndex aInsIdx( *rBox.GetSttNd(), 1 ); -pDoc->GetNodes().MakeTextNode( aInsIdx.GetNode(), pDoc->GetDfltTextFormatColl() ); +SwTextNode *const pNewNode(pDoc->GetNodes().MakeTextNode(aInsIdx.GetNode(), pDoc->GetDfltTextFormatColl())); SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() ); if( !pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) +{ +{ // move cursors to new node which precedes aPam +SwPosition const pos(*pNewNode, 0); +::PaMCorrAbs(aPam, pos); +} pEntry->pUndo = std::make_unique(aPam, SwDeleteFlags::Default, true); +} } pEntry->pBoxNumAttr = std::make_uniqueGetDoc(); DEBUG_REDLINE( pDoc ) +{ // move cursors to first node which was inserted +SwPaM pam(SwNodeIndex(*rBox.GetSttNd(), 1)); +assert(pam.GetPoint()->GetNode().IsTextNode()); +pam.SetMark(); +pam.Move(fnMoveForward, GoInContent); +::PaMCorrAbs(pam, *pam.GetPoint()); +} if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) { SwPosition aTmpPos( rIdx ); commit 34358b553343126a8f0b50d0111f794788be54db Author: Miklos Vajna AuthorDate: Fri Feb 23 09:12:17 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 14 10:00:54 2024 +0100 Related: tdf#158986 sw floattable: fix unexpected page break with sections Regression from commit c303981cfd95ce1c3881366023d5495ae2edce97 (tdf#156724 sw: layout: fix tables not splitting due to footnotes differently, 2023-08-24), the floating table in the DOCX version of the bugdoc went from page 1 to page 2. It seems what happens is that the first page has 2 section frames, and we used to directly recalc the last lower of the first section frame, which triggered a recalc of the second section frame, so the table moved from page 2 to page 1 once the top of the second section frame was reduced (so the table could fit on page 1). But this direct recalc was removed because it caused problems for split tables and footnotes in tdf#156724. Fix the problem by conditionally restoring the OptCalc() call in SwLayAction::FormatLayout(): only do it for the last lower of section frames, which is enough for the DOCX version of tdf#158986, but it keeps the old tdf#156724 use-case working (the layout of that bugdoc doesn't modify with this change). The RTF version of the bugdoc (which was the originally
core.git: Branch 'distro/cib/libreoffice-6-4' - 2 commits - ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 65 - 1 file changed, 46 insertions(+), 19 deletions(-) New commits: commit 6d4b6d11b4b55e530315cb2e4bedc16be4dca3bc Author: Michael Stahl AuthorDate: Thu Mar 14 15:47:28 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 14 19:37:57 2024 +0100 ucb: webdav-curl: always set CURLOPT_NOBODY for HEAD Otherwise there will be timeout that depends on when the server will close the connection, which varies by server but can be several minutes; getting a potential error document from the server for this one request when logging is enabled is less important. Change-Id: I505b014b148ba009c400d37d826c9edb8c3a6da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164838 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit c8400f5acc36d2cf0c007260bdc94534a53bba90) diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 7fb981838e3e..0d384633d66a 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -209,15 +209,6 @@ struct CurlOption } }; -// NOBODY will prevent logging the response body in ProcessRequest() exception -// handler, so only use it if logging is disabled -const CurlOption g_NoBody{ CURLOPT_NOBODY, - sal_detail_log_report(SAL_DETAIL_LOG_LEVEL_INFO, "ucb.ucp.webdav.curl") - == SAL_DETAIL_LOG_ACTION_IGNORE - ? 1L - : 0L, - nullptr }; - /// combined guard class to ensure things are released in correct order, /// particularly in ProcessRequest() error handling class Guard @@ -1947,7 +1938,11 @@ auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector co CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); ::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } +// NOBODY will prevent logging the response body in ProcessRequest() +// exception, but omitting it here results in a long timeout until the +// server closes the connection, which is worse +{ CURLOPT_NOBODY, 1L, nullptr }, +{ CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } }; ::std::pair<::std::vector const&, DAVResource&> const headers(rHeaderNames, commit 602175e05f29921649f467df3f5e81a5a399737b Author: Michael Stahl AuthorDate: Thu Mar 14 14:55:48 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 14 17:41:50 2024 +0100 ucb: webdav-curl: improve fallback authentication The bundled curl on Linux doesn't support Negotiate, and a system curl may not support NTLM either. If setting the auth method fails with CURLE_NOT_BUILT_IN, abort. Change-Id: I7b7f7afd1ebedd665d9475fd40cac0e0641062a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164837 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 3d56fb36c47f5cfdf646e26d241b2bd7f1d68884) diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 4bae872b1757..7fb981838e3e 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1324,9 +1324,14 @@ auto CurlProcessor::ProcessRequest( throw DAVException(DAVException::DAV_INVALID_ARG); } rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HTTPAUTH, oAuth->AuthMask); -assert( -rc -== CURLE_OK); // it shouldn't be possible to reduce auth to 0 via the authSystem masks +if (rc != CURLE_OK) +{ // NEGOTIATE typically disabled on Linux, NTLM is optional too +assert(rc == CURLE_NOT_BUILT_IN); +SAL_INFO("ucb.ucp.webdav.curl", "no auth method available"); +throw DAVException( +DAVException::DAV_HTTP_NOAUTH, +ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort())); +} } if (oAuthProxy && !rSession.m_isAuthenticatedProxy) @@ -1352,9 +1357,14 @@ auto CurlProcessor::ProcessRequest( throw DAVException(DAVException::DAV_INVALID_ARG); } rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_PROXYAUTH, oAuthProxy->AuthMask); -assert( -rc -== CURLE_OK); // it shouldn't be possible to reduce auth to 0 via the authSystem masks +if (rc != CURLE_OK) +{ // NEGOTIATE typically disabled on Linux, NTLM is optional too +assert(rc == CURLE_NOT_BUILT_IN); +SAL_INFO("ucb.ucp.webdav.curl", "no auth method available"); +
core.git: ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) New commits: commit c8400f5acc36d2cf0c007260bdc94534a53bba90 Author: Michael Stahl AuthorDate: Thu Mar 14 15:47:28 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 14 18:59:16 2024 +0100 ucb: webdav-curl: always set CURLOPT_NOBODY for HEAD Otherwise there will be timeout that depends on when the server will close the connection, which varies by server but can be several minutes; getting a potential error document from the server for this one request when logging is enabled is less important. Change-Id: I505b014b148ba009c400d37d826c9edb8c3a6da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164838 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 420e1123d589..4dde0d512e61 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -229,15 +229,6 @@ struct CurlOption } }; -// NOBODY will prevent logging the response body in ProcessRequest() exception -// handler, so only use it if logging is disabled -const CurlOption g_NoBody{ CURLOPT_NOBODY, - sal_detail_log_report(SAL_DETAIL_LOG_LEVEL_INFO, "ucb.ucp.webdav.curl") - == SAL_DETAIL_LOG_ACTION_IGNORE - ? 1L - : 0L, - nullptr }; - /// combined guard class to ensure things are released in correct order, /// particularly in ProcessRequest() error handling class Guard @@ -1969,7 +1960,11 @@ auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector co CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); ::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } +// NOBODY will prevent logging the response body in ProcessRequest() +// exception, but omitting it here results in a long timeout until the +// server closes the connection, which is worse +{ CURLOPT_NOBODY, 1L, nullptr }, +{ CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } }; ::std::pair<::std::vector const&, DAVResource&> const headers(rHeaderNames,
core.git: ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 50 +++-- 1 file changed, 41 insertions(+), 9 deletions(-) New commits: commit 3d56fb36c47f5cfdf646e26d241b2bd7f1d68884 Author: Michael Stahl AuthorDate: Thu Mar 14 14:55:48 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 14 17:40:50 2024 +0100 ucb: webdav-curl: improve fallback authentication The bundled curl on Linux doesn't support Negotiate, and a system curl may not support NTLM either. If setting the auth method fails with CURLE_NOT_BUILT_IN, abort. Change-Id: I7b7f7afd1ebedd665d9475fd40cac0e0641062a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164837 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 9cd1745326b6..420e1123d589 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1338,9 +1338,14 @@ auto CurlProcessor::ProcessRequest( throw DAVException(DAVException::DAV_INVALID_ARG); } rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HTTPAUTH, oAuth->AuthMask); -assert( -rc -== CURLE_OK); // it shouldn't be possible to reduce auth to 0 via the authSystem masks +if (rc != CURLE_OK) +{ // NEGOTIATE typically disabled on Linux, NTLM is optional too +assert(rc == CURLE_NOT_BUILT_IN); +SAL_INFO("ucb.ucp.webdav.curl", "no auth method available"); +throw DAVException( +DAVException::DAV_HTTP_NOAUTH, +ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort())); +} } if (oAuthProxy && !rSession.m_isAuthenticatedProxy) @@ -1366,9 +1371,14 @@ auto CurlProcessor::ProcessRequest( throw DAVException(DAVException::DAV_INVALID_ARG); } rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_PROXYAUTH, oAuthProxy->AuthMask); -assert( -rc -== CURLE_OK); // it shouldn't be possible to reduce auth to 0 via the authSystem masks +if (rc != CURLE_OK) +{ // NEGOTIATE typically disabled on Linux, NTLM is optional too +assert(rc == CURLE_NOT_BUILT_IN); +SAL_INFO("ucb.ucp.webdav.curl", "no auth method available"); +throw DAVException( +DAVException::DAV_HTTP_NOAUTH, +ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort())); +} } ResponseHeaders headers(rSession.m_pCurl.get()); @@ -1503,20 +1513,42 @@ auto CurlProcessor::ProcessRequest( OUString userName(roAuth ? roAuth->UserName : OUString()); OUString passWord(roAuth ? roAuth->PassWord : OUString()); long authAvail(0); -auto const rc +auto rc = curl_easy_getinfo(rSession.m_pCurl.get(), statusCode != SC_PROXY_AUTHENTICATION_REQUIRED ? CURLINFO_HTTPAUTH_AVAIL : CURLINFO_PROXYAUTH_AVAIL, ); assert(rc == CURLE_OK); -(void)rc; if (statusCode == SC_FORBIDDEN) { // SharePoint fallback: try Negotiate auth assert(authAvail == 0); // note: this must be a single value! // would need 2 iterations to try CURLAUTH_NTLM too -authAvail = CURLAUTH_NEGOTIATE; +rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HTTPAUTH, + CURLAUTH_NEGOTIATE); +if (rc == CURLE_OK) +{ +authAvail = CURLAUTH_NEGOTIATE; +} +else +{ +rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HTTPAUTH, + CURLAUTH_NTLM); +if (rc == CURLE_OK) +{ +authAvail = CURLAUTH_NTLM; +} +else +{ // can't work +
core.git: sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter5.cxx |2 -- sw/source/core/undo/untbl.cxx | 15 ++- 2 files changed, 14 insertions(+), 3 deletions(-) New commits: commit 873af30a36504751c6923d4235abd4de040e0001 Author: Michael Stahl AuthorDate: Thu Mar 14 12:14:28 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 14 14:16:08 2024 +0100 sw: fix ~SwIndexReg assert in testTdf149498 The problem is that a SwNavigationMgr thingy has a cursor in one of the table cells, and the text node is moved to the undo nodes array in SwUndoTableCpyTable::AddBoxBefore() and deleted in SwUndoTableCpyTable::UndoImpl(). SwUndoTableCpyTable needs to move the cursors out of the way because SwUndoDelete doesn't do it. Change-Id: I75e271c84a6624ffb0df151b171acb1e1f743928 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164807 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx index c6353f980d29..702f6d7dd30e 100644 --- a/sw/qa/extras/uiwriter/uiwriter5.cxx +++ b/sw/qa/extras/uiwriter/uiwriter5.cxx @@ -3007,7 +3007,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf156487) assertXPath(pXmlDoc, "/metafile/push/push/push/textarray/text"_ostr, 1); } -#ifndef DBG_UTIL CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf149498) { // load a table, and delete the first column with enabled change tracking: @@ -3023,7 +3022,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf149498) // this would crash due to bookmark over cell boundary dispatchCommand(mxComponent, ".uno:Undo", {}); } -#endif CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf150673_RedlineTableColumnDeletionWithExport) { diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index e38abcecd000..5c5c88f74c24 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -2599,11 +2599,17 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent if( bDelContent ) { SwNodeIndex aInsIdx( *rBox.GetSttNd(), 1 ); -pDoc->GetNodes().MakeTextNode( aInsIdx.GetNode(), pDoc->GetDfltTextFormatColl() ); +SwTextNode *const pNewNode(pDoc->GetNodes().MakeTextNode(aInsIdx.GetNode(), pDoc->GetDfltTextFormatColl())); SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() ); if( !pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) +{ +{ // move cursors to new node which precedes aPam +SwPosition const pos(*pNewNode, 0); +::PaMCorrAbs(aPam, pos); +} pEntry->pUndo = std::make_unique(aPam, SwDeleteFlags::Default, true); +} } pEntry->pBoxNumAttr = std::make_uniqueGetDoc(); DEBUG_REDLINE( pDoc ) +{ // move cursors to first node which was inserted +SwPaM pam(SwNodeIndex(*rBox.GetSttNd(), 1)); +assert(pam.GetPoint()->GetNode().IsTextNode()); +pam.SetMark(); +pam.Move(fnMoveForward, GoInContent); +::PaMCorrAbs(pam, *pam.GetPoint()); +} if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) { SwPosition aTmpPos( rIdx );
core.git: Branch 'distro/cib/libreoffice-6-4' - sw/qa
sw/qa/extras/uiwriter/uiwriter.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 517df06183508742ae1f3640b28af65fc0069b79 Author: Michael Stahl AuthorDate: Thu Mar 14 13:13:36 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 14 13:14:27 2024 +0100 sw: oops, forgot to commit test changes Change-Id: I8cde7ee17d1e717bf2228affe6f88d3461e4b5b3 diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index c3b5c0d98dac..d1b117f6a467 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -813,7 +813,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) SwDoc * pDoc(createDoc("pagebreak-source.fodt")); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); -CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); +CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->SelAll(); @@ -833,7 +833,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName()); // page style WithMargin is used -CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); +CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); //paste not working in this branch? lcl_dispatchCommand(mxComponent, ".uno:Paste", {}); TransferableDataHelper aHelper(pTransfer.get()); @@ -846,7 +846,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) // the problem was that there was a page break now CPPUNIT_ASSERT_EQUAL(1, getPages()); // page style WithMargin is used -CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); +CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->Undo(); CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); @@ -854,7 +854,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // page style WithMargin is used -CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); +CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->Redo(); CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); @@ -863,7 +863,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), pWrtShell->GetCurrSection()->GetSectionName()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // page style WithMargin is used -CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); +CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->Undo(); CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); @@ -871,7 +871,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName()); CPPUNIT_ASSERT_EQUAL(1, getPages()); // page style WithMargin is used -CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); +CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); } void SwUiWriterTest::testBookmarkCopy()
core.git: sw/source
sw/source/core/docnode/ndtbl.cxx | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) New commits: commit 62cb3b8b8d6106c6aeb073b12d84973a107182ef Author: Michael Stahl AuthorDate: Wed Mar 13 18:57:21 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 14 09:43:15 2024 +0100 tdf#157241 sw: fix crash on RTF paste or insert of nested tables The problem is that there are tables with only empty cell frames in the layout, which causes a crash in IsAllHiddenCell() added in commit ab7893544dc6be6dc192dffefd57cd5ddd421c35. This happens because first inner tables are created, with layout frames because the layout already exists. Then when SwNodes::TextToTable() is called for the outer table, it deletes the SwTextFrames, but not the SwTabFrames/SwCellFrames, so they remain uselessly in the layout. Delete these too, they will be recreated when the frame for the outer table is created. Also the transfer of any existing break to the outer table was missing. Change-Id: Idc2bc1d4c6572702510ae4355e4015c42770eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164788 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 592e8914ae8c..00698a0c91c7 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -888,6 +888,34 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, return } +static void lcl_RemoveBreaksTable(SwTableNode & rNode, SwTableFormat *const pTableFormat) +{ +// delete old layout frames, new ones need to be created... +rNode.DelFrames(nullptr); + +// remove PageBreaks/PageDesc/ColBreak +SwFrameFormat & rFormat(*rNode.GetTable().GetFrameFormat()); + +if (const SvxFormatBreakItem* pItem = rFormat.GetItemIfSet(RES_BREAK, false)) +{ +if (pTableFormat) +{ +pTableFormat->SetFormatAttr(*pItem); +} +rFormat.ResetFormatAttr(RES_BREAK); +} + +SwFormatPageDesc const*const pPageDescItem(rFormat.GetItemIfSet(RES_PAGEDESC, false)); +if (pPageDescItem && pPageDescItem->GetPageDesc()) +{ +if (pTableFormat) +{ +pTableFormat->SetFormatAttr(*pPageDescItem); +} +rFormat.ResetFormatAttr(RES_PAGEDESC); +} +} + static void lcl_RemoveBreaks(SwContentNode & rNode, SwTableFormat *const pTableFormat) { // delete old layout frames, new ones need to be created... @@ -1386,7 +1414,13 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, for( nLines = 0; aNodeIndex <= rTableNodes.rbegin()->rbegin()->aEnd; ++aNodeIndex,++nLines ) { SwNode& rNode = aNodeIndex.GetNode(); -if( rNode.IsContentNode() ) +assert(!rNode.IsSectionNode()); // not possible in writerfilter import +if (rNode.IsTableNode()) +{ +lcl_RemoveBreaksTable(static_cast(rNode), +(0 == nLines) ? pTableFormat : nullptr); +} +else if (rNode.IsContentNode()) { lcl_RemoveBreaks(static_cast(rNode), (0 == nLines) ? pTableFormat : nullptr);
core.git: sw/source
sw/source/core/text/atrstck.cxx |3 +-- sw/source/core/unocore/unomap.cxx |2 +- 2 files changed, 2 insertions(+), 3 deletions(-) New commits: commit 7389be1996159b557f2e4022459ed8408302d72a Author: Michael Stahl AuthorDate: Wed Mar 13 16:24:50 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 13 19:22:17 2024 +0100 sw: convert OSL_ENSURE to assert To avoid spurious -Warray-bounds from GCC 13.2.1 Change-Id: I26aba84a6ceda79ffc111c925c8be96df8b186dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164782 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 048878292fc0..0eb8d74e89c6 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -472,8 +472,7 @@ void SwAttrHandler::Pop( const SwTextAttr& rAttr ) void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr ) { -OSL_ENSURE( nAttr < RES_TXTATR_WITHEND_END, -"I cannot activate this attribute, nWhich >= RES_TXTATR_WITHEND_END" ); +assert(nAttr < RES_TXTATR_WITHEND_END); const sal_uInt16 nStackPos = StackPos[ nAttr ]; const SwTextAttr* pTopAt = GetTop(nStackPos); diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 1565ce7ea8c2..55e1632c57e3 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -73,7 +73,7 @@ using namespace ::com::sun::star::beans; std::span SwUnoPropertyMapProvider::GetPropertyMapEntries(sal_uInt16 nPropertyId) { -OSL_ENSURE(nPropertyId < PROPERTY_MAP_END, "Id ?" ); +assert(nPropertyId < PROPERTY_MAP_END); if( m_aMapEntriesArr[ nPropertyId ].empty() ) { switch(nPropertyId)
core.git: Branch 'feature/allo_contract45533' - 2 commits - sw/source
sw/source/core/layout/tabfrm.cxx |2 +- sw/source/core/text/atrstck.cxx |3 +-- sw/source/core/unocore/unomap.cxx |2 +- 3 files changed, 3 insertions(+), 4 deletions(-) New commits: commit 80f3ab2f2cf1d1b21f020760fbd4a1155cd2b406 Author: Michael Stahl AuthorDate: Wed Mar 13 16:24:50 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 13 16:25:29 2024 +0100 sw: convert OSL_ENSURE to assert To avoid spurious -Warray-bounds from GCC 13.2.1 Change-Id: I26aba84a6ceda79ffc111c925c8be96df8b186dd diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 048878292fc0..0eb8d74e89c6 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -472,8 +472,7 @@ void SwAttrHandler::Pop( const SwTextAttr& rAttr ) void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr ) { -OSL_ENSURE( nAttr < RES_TXTATR_WITHEND_END, -"I cannot activate this attribute, nWhich >= RES_TXTATR_WITHEND_END" ); +assert(nAttr < RES_TXTATR_WITHEND_END); const sal_uInt16 nStackPos = StackPos[ nAttr ]; const SwTextAttr* pTopAt = GetTop(nStackPos); diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index ea8bb59f5cdd..e6ca2ce998af 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -73,7 +73,7 @@ using namespace ::com::sun::star::beans; o3tl::span SwUnoPropertyMapProvider::GetPropertyMapEntries(sal_uInt16 nPropertyId) { -OSL_ENSURE(nPropertyId < PROPERTY_MAP_END, "Id ?" ); +assert(nPropertyId < PROPERTY_MAP_END); if( m_aMapEntriesArr[ nPropertyId ].empty() ) { switch(nPropertyId) commit 9af1d710e51af114b6a1110ade295f3eaa93f1d3 Author: Michael Stahl AuthorDate: Tue Mar 12 16:21:57 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 13 11:49:50 2024 +0100 tdf#157241 sw: layout: inconsistent conditions in lcl_RecalcSplitLine() A mistake, when checking before the condition is "if (pTab == )" but when checking after it is "if (pTab)" - the latter is correct as the former is checked *inside* the block, after resolving to top-level table. This caused erroneously setting rIsFootnoteGrowth = true in SwTabFrame::MakeAll() of tab 939 in the bugdoc, when in fact the footnote container shrunk from 5 to 2 footnotes. (regression from commit c303981cfd95ce1c3881366023d5495ae2edce97) Change-Id: Ib4cad9fef0e500ebe7a3636c2371a4108b32fb5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164717 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 7d3b439de357c8e97c0a73f6f63e67ec980e432d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164733 Reviewed-by: Xisco Fauli (cherry picked from commit 2fa450193fbf6013144bdf436076aa4971c3a12e) diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index bbea3ddbb6f0..a7ac10b65bd4 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -667,7 +667,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine, { SwContentFrame const*const pAnchor = pFootnote->GetRef(); SwTabFrame const* pTab = pAnchor->FindTabFrame(); -if (pTab == ) +if (pTab) { while (pTab->GetUpper()->IsInTab()) {
core.git: Branch 'libreoffice-7-6' - sw/source
sw/source/core/layout/tabfrm.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f22b3bb6876c8094ad7682719fc6a6684ef43b45 Author: Michael Stahl AuthorDate: Tue Mar 12 16:21:57 2024 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Wed Mar 13 15:13:21 2024 +0100 tdf#157241 sw: layout: inconsistent conditions in lcl_RecalcSplitLine() A mistake, when checking before the condition is "if (pTab == )" but when checking after it is "if (pTab)" - the latter is correct as the former is checked *inside* the block, after resolving to top-level table. This caused erroneously setting rIsFootnoteGrowth = true in SwTabFrame::MakeAll() of tab 939 in the bugdoc, when in fact the footnote container shrunk from 5 to 2 footnotes. (regression from commit c303981cfd95ce1c3881366023d5495ae2edce97) Change-Id: Ib4cad9fef0e500ebe7a3636c2371a4108b32fb5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164717 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 7d3b439de357c8e97c0a73f6f63e67ec980e432d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164734 Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index c85f86672013..4d712325a3ff 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -667,7 +667,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine, { SwContentFrame const*const pAnchor = pFootnote->GetRef(); SwTabFrame const* pTab = pAnchor->FindTabFrame(); -if (pTab == ) +if (pTab) { while (pTab->GetUpper()->IsInTab()) {
core.git: Branch 'distro/cib/libreoffice-6-4' - sw/qa sw/source
sw/qa/extras/uiwriter/data/pagebreak-source.fodt | 12 ++-- sw/qa/extras/uiwriter/data/pagebreak-target.fodt | 12 ++-- sw/qa/extras/uiwriter/uiwriter.cxx | 22 +- sw/source/core/layout/pagechg.cxx|6 +- 4 files changed, 42 insertions(+), 10 deletions(-) New commits: commit 391b620507d137f50aad2fe84d42583b62761e28 Author: Michael Stahl AuthorDate: Wed Mar 13 09:38:00 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 13 14:15:29 2024 +0100 sw: layout: use page style set on hidden paragraph SwPageFrame::FindPageDesc() now ignores paragraphs hidden for any reason, but to maintain layout compatibility it should only ignore paragraphs in a hidden section, not paragraphs hidden by fields. (regression from commit 0c96119895b347f8eb5bb89f393351bd3c02b9f1) Change-Id: Iad5e76f5cc437d35b4ae9bde6bc9b73dbe32bf3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164761 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 7335babda93974104a39202c434e9499b8086f3a) diff --git a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt index e09c1b447cfd..cb72fea62a85 100644 --- a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt +++ b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt @@ -85,7 +85,7 @@ - + @@ -101,9 +101,17 @@ + + + + + + + + @@ -120,4 +128,4 @@ - \ No newline at end of file + diff --git a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt index f059e33f1514..1219cdd95e25 100644 --- a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt +++ b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt @@ -86,7 +86,7 @@ - + @@ -104,9 +104,17 @@ + + + + + + + + @@ -126,4 +134,4 @@ - \ No newline at end of file + diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 9e1a8c4c3b50..c3b5c0d98dac 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -811,7 +811,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) rtl::Reference pTransfer; { SwDoc * pDoc(createDoc("pagebreak-source.fodt")); + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->SelAll(); @@ -828,38 +830,48 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName()); +// page style WithMargin is used +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); //paste not working in this branch? lcl_dispatchCommand(mxComponent, ".uno:Paste", {}); TransferableDataHelper aHelper(pTransfer.get()); SwTransferable::Paste(*pWrtShell, aHelper); CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size()); CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), pWrtShell->GetCurrSection()->GetSectionName()); // the problem was that there was a page break now CPPUNIT_ASSERT_EQUAL(1, getPages()); +// page style WithMargin is used +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->Undo(); CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName()); CPPUNIT_ASSERT_EQUAL(1, getPages()); +// page style WithMargin is used +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->Redo(); CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1),
core.git: sw/qa sw/source
sw/qa/extras/uiwriter/data/pagebreak-source.fodt | 12 ++-- sw/qa/extras/uiwriter/data/pagebreak-target.fodt | 12 ++-- sw/qa/extras/uiwriter/uiwriter.cxx | 22 +- sw/source/core/layout/pagechg.cxx|6 +- 4 files changed, 42 insertions(+), 10 deletions(-) New commits: commit 7335babda93974104a39202c434e9499b8086f3a Author: Michael Stahl AuthorDate: Wed Mar 13 09:38:00 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 13 13:34:19 2024 +0100 sw: layout: use page style set on hidden paragraph SwPageFrame::FindPageDesc() now ignores paragraphs hidden for any reason, but to maintain layout compatibility it should only ignore paragraphs in a hidden section, not paragraphs hidden by fields. (regression from commit 0c96119895b347f8eb5bb89f393351bd3c02b9f1) Change-Id: Iad5e76f5cc437d35b4ae9bde6bc9b73dbe32bf3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164761 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt index e09c1b447cfd..cb72fea62a85 100644 --- a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt +++ b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt @@ -85,7 +85,7 @@ - + @@ -101,9 +101,17 @@ + + + + + + + + @@ -120,4 +128,4 @@ - \ No newline at end of file + diff --git a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt index f059e33f1514..1219cdd95e25 100644 --- a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt +++ b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt @@ -86,7 +86,7 @@ - + @@ -104,9 +104,17 @@ + + + + + + + + @@ -126,4 +134,4 @@ - \ No newline at end of file + diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index da264592015b..2ac9bb97ec75 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -383,6 +383,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) SwDoc* pDoc = getSwDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); + pWrtShell->SelAll(); dispatchCommand(mxComponent, ".uno:Copy", {}); @@ -395,36 +397,46 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak) SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName()); +// page style WithMargin is used +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); dispatchCommand(mxComponent, ".uno:Paste", {}); CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size()); CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), pWrtShell->GetCurrSection()->GetSectionName()); // the problem was that there was a page break now CPPUNIT_ASSERT_EQUAL(1, getPages()); +// page style WithMargin is used +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->Undo(); CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName()); CPPUNIT_ASSERT_EQUAL(1, getPages()); +// page style WithMargin is used +CPPUNIT_ASSERT_EQUAL(tools::Long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top()); pWrtShell->Redo(); CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); -CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty(getParagraph(1), "PageDescName")); +CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty(getParagraph(1), "PageDescName")); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size()); CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), pWrtShell->GetCurrSection()->GetSectionName()); CPPUNIT_ASSERT_EQUAL(1, getPages());
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/layout/tabfrm.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2fa450193fbf6013144bdf436076aa4971c3a12e Author: Michael Stahl AuthorDate: Tue Mar 12 16:21:57 2024 +0100 Commit: Xisco Fauli CommitDate: Wed Mar 13 11:42:03 2024 +0100 tdf#157241 sw: layout: inconsistent conditions in lcl_RecalcSplitLine() A mistake, when checking before the condition is "if (pTab == )" but when checking after it is "if (pTab)" - the latter is correct as the former is checked *inside* the block, after resolving to top-level table. This caused erroneously setting rIsFootnoteGrowth = true in SwTabFrame::MakeAll() of tab 939 in the bugdoc, when in fact the footnote container shrunk from 5 to 2 footnotes. (regression from commit c303981cfd95ce1c3881366023d5495ae2edce97) Change-Id: Ib4cad9fef0e500ebe7a3636c2371a4108b32fb5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164717 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 7d3b439de357c8e97c0a73f6f63e67ec980e432d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164733 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 8c49106364dc..c4a742c0373d 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -667,7 +667,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine, { SwContentFrame const*const pAnchor = pFootnote->GetRef(); SwTabFrame const* pTab = pAnchor->FindTabFrame(); -if (pTab == ) +if (pTab) { while (pTab->GetUpper()->IsInTab()) {
core.git: sw/source
sw/source/core/layout/tabfrm.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7d3b439de357c8e97c0a73f6f63e67ec980e432d Author: Michael Stahl AuthorDate: Tue Mar 12 16:21:57 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 13 09:21:48 2024 +0100 tdf#157241 sw: layout: inconsistent conditions in lcl_RecalcSplitLine() A mistake, when checking before the condition is "if (pTab == )" but when checking after it is "if (pTab)" - the latter is correct as the former is checked *inside* the block, after resolving to top-level table. This caused erroneously setting rIsFootnoteGrowth = true in SwTabFrame::MakeAll() of tab 939 in the bugdoc, when in fact the footnote container shrunk from 5 to 2 footnotes. (regression from commit c303981cfd95ce1c3881366023d5495ae2edce97) Change-Id: Ib4cad9fef0e500ebe7a3636c2371a4108b32fb5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164717 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 10d1b163777e..edb10beb35c6 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -667,7 +667,7 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine, { SwContentFrame const*const pAnchor = pFootnote->GetRef(); SwTabFrame const* pTab = pAnchor->FindTabFrame(); -if (pTab == ) +if (pTab) { while (pTab->GetUpper()->IsInTab()) {
core.git: Branch 'distro/cib/libreoffice-6-4' - ucb/source
ucb/source/ucp/webdav-curl/ImportCookies.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 84baeb6c2b7690c18d00ee78d34c5cceba3a46ba Author: Michael Stahl AuthorDate: Tue Mar 12 15:10:35 2024 +0100 Commit: Michael Stahl CommitDate: Tue Mar 12 15:10:35 2024 +0100 ucb: webdav-curl: add missing return diff --git a/ucb/source/ucp/webdav-curl/ImportCookies.cxx b/ucb/source/ucp/webdav-curl/ImportCookies.cxx index fa9aa9731b1a..ff5d7389aeac 100644 --- a/ucb/source/ucp/webdav-curl/ImportCookies.cxx +++ b/ucb/source/ucp/webdav-curl/ImportCookies.cxx @@ -97,7 +97,11 @@ OString TryImportCookies(uno::Reference const& xContext[ // apparently this may crash, and sqlite3_errstr() isn't exported? // SAL_INFO("ucb.ucp.webdav.curl", "sqlite3_open failed: " << sqlite3_errmsg(db)); SAL_INFO("ucb.ucp.webdav.curl", "sqlite3_open failed: " << rc); -sqlite3_close(db); +if (db) +{ +sqlite3_close(db); +} +return OString(); } char* err(nullptr); Value value;
core.git: Branch 'distro/cib/libreoffice-6-4' - ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) New commits: commit b0aeac2376ee5d74373e35eace8258a500e7cf00 Author: Michael Stahl AuthorDate: Fri Mar 8 11:20:45 2024 +0100 Commit: Michael Stahl CommitDate: Tue Mar 12 14:51:32 2024 +0100 ucb: webdav-curl: only set CURLOPT_NOBODY for HEAD Some testing with Apache httpd+mod_dav reveals that it usually sends a body with a 401 status, which causes the CURLE_WEIRD_SERVER_REPLY error code from curl. So we should either ignore this error in case there's a HTTP status too, or stop using CURLOPT_NOBODY. The latter seems to have no downside, except for HEAD requests, where strangely the server keeps the connection open and curl waits for 5 seconds for no body to arrive, blocking the UI, so continue to use CURLOPT_NOBODY for HEAD. The other methods don't seem to block. It turns out that the SAL_LOG-dependent setting of g_NoBody turned HEAD into GET anyway if logging is enabled, so explicitly set the method. Change-Id: Ibe2eef8e7a827d4e356ba37c4b56bee0be3b9c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164569 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit e0259d4c0951c4dd77c74d08b9d905728d4c8dfd) diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 645d41502156..4bae872b1757 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1914,7 +1914,9 @@ auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector co CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ g_NoBody }; +::std::vector const options{ +g_NoBody, { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } +}; ::std::pair<::std::vector const&, DAVResource&> const headers(rHeaderNames, io_rResource); @@ -2147,9 +2149,8 @@ auto CurlSession::MKCOL(OUString const& rURIReference, DAVRequestEnvironment con CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "MKCOL", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "MKCOL", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "MKCOL", options, , nullptr, nullptr, nullptr, nullptr); @@ -2177,9 +2178,8 @@ auto CurlProcessor::MoveOrCopy(CurlSession& rSession, OUString const& rSourceURI throw uno::RuntimeException("curl_slist_append failed"); } -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, pMethod, "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, pMethod, + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(rSession, uriSource, OUString::createFromAscii(pMethod), options, , ::std::move(pList), nullptr, nullptr, nullptr); @@ -2209,9 +2209,8 @@ auto CurlSession::DESTROY(OUString const& rURIReference, DAVRequestEnvironment c CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "DELETE", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "DELETE", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "DESTROY", options, , nullptr, nullptr, nullptr, nullptr);
core.git: Branch 'distro/cib/libreoffice-6-4' - ucb/source
ucb/source/ucp/webdav-curl/ImportCookies.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 4c6574abe8cca7d74129c12c486b722c668fdaba Author: Michael Stahl AuthorDate: Tue Mar 12 14:44:00 2024 +0100 Commit: Michael Stahl CommitDate: Tue Mar 12 14:44:16 2024 +0100 ucb: webdav-curl: avoid crashing in SAL_INFO It's not clear why calling sqlite3_errmsg would crash, but avoid it... Change-Id: If2a375671fd5484d72af1c0f538f424f02149a0a diff --git a/ucb/source/ucp/webdav-curl/ImportCookies.cxx b/ucb/source/ucp/webdav-curl/ImportCookies.cxx index 4df885e4efc7..fa9aa9731b1a 100644 --- a/ucb/source/ucp/webdav-curl/ImportCookies.cxx +++ b/ucb/source/ucp/webdav-curl/ImportCookies.cxx @@ -94,7 +94,9 @@ OString TryImportCookies(uno::Reference const& xContext[ int rc = sqlite3_open_v2(dbUrl.getStr(), , SQLITE_OPEN_READONLY | SQLITE_OPEN_URI, nullptr); if (rc != SQLITE_OK) { -SAL_INFO("ucb.ucp.webdav.curl", "sqlite3_open failed: " << sqlite3_errmsg(db)); +// apparently this may crash, and sqlite3_errstr() isn't exported? +// SAL_INFO("ucb.ucp.webdav.curl", "sqlite3_open failed: " << sqlite3_errmsg(db)); +SAL_INFO("ucb.ucp.webdav.curl", "sqlite3_open failed: " << rc); sqlite3_close(db); } char* err(nullptr);
core.git: Branch 'libreoffice-24-2' - accessibility/source vcl/source
accessibility/source/standard/vclxaccessibletoolbox.cxx | 11 --- vcl/source/window/accessibility.cxx |2 +- 2 files changed, 9 insertions(+), 4 deletions(-) New commits: commit 5a897e100370c93414479226515d4844b8c20bd3 Author: Michael Stahl AuthorDate: Tue Mar 5 19:21:21 2024 +0100 Commit: Noel Grandin CommitDate: Fri Mar 8 19:26:20 2024 +0100 vcl,accessibility: try to fix a crash while disposing SvxFontNameBox_Impl This happened in a 6.3 based branch, no idea how to reproduce it. Clearly the SvxFontNameBox_Impl is being disposed and in its base class Window::dispose() when a call to SvxFontNameBox_Impl::CreateAccessible() happens, which seems very suspicious; try to prevent that. mergedlo.dll!ImplListBox::InsertEntry(long nPos, const rtl::OUString & rStr) Zeile 2225 unter d:\lomergedlo.dll!ComboBox::InsertEntry(const rtl::OUString & rStr, long nPos) Zeile 886 unter d:\lomergedlo.dll!FontNameBox::Fill(const FontList * pList) Zeile 447 unter d:\lo[Inlineframe] mergedlo.dll!SvxFontNameBox_Impl::Fill(const FontList * pList) Zeile 236 unter d:\lomergedlo.dll!lcl_GetDocFontList(const FontList * * ppFontList, SvxFontNameBox_Impl * pBox) Zeile 1290 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::FillList() Zeile 1331 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::CreateAccessible() Zeile 3739 unter d:\lomergedlo.dll!vcl::Window::GetAccessible(bool bCreate) Zeile 129 unter d:\lo acclo.dll!VCLXAccessibleToolBox::getAccessibleChild(long i) Zeile 733 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetItemWindowAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 784 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetChildAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 795 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 165 unter d:\lo acclo.dll!VCLXAccessibleToolBox::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 657 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::WindowChildEventListener(VclWindowEvent & rEvent) Zeile 129 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::LinkStubWindowChildEventListener(void * instance, VclWindowEvent & data) Zeile 118 unter d:\lo[Inlineframe] mergedlo.dll!Link::Call(VclWindowEvent &) Zeile 84 unter d:\lo mergedlo.dll!vcl::Window::CallEventListeners(VclEventId nEvent, void * pData) Zeile 280 unter d:\lomergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 735 unter d:\lomergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 747 unter d:\lomergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2198 unter d:\lomergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2176 unter d:\lo[Inlineframe] mergedlo.dll!vcl::Window::Hide() Zeile 925 unter d:\lomergedlo.dll!vcl::Window::dispose() Zeile 402 unter d:\lomergedlo.dll!Edit::dispose() Zeile 258 unter d:\lomergedlo.dll!ComboBox::dispose() Zeile 132 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::dispose() Zeile 1322 unter d:\lo[Inlineframe] mergedlo.dll!VclPtr::disposeAndClear() Zeile 206 unter d:\lomergedlo.dll!SvxFontNameToolBoxControl::dispose() Zeile 3309 unter d:\lo mergedlo.dll!framework::ToolBarManager::RemoveControllers() Zeile 651 unter d:\lomergedlo.dll!framework::ToolBarManager::dispose() Zeile 468 unter d:\lomergedlo.dll!framework::ToolBarWrapper::dispose() Zeile 105 unter d:\lo mergedlo.dll!framework::ToolbarLayoutManager::destroyToolbars() Zeile 666 unter d:\lo mergedlo.dll!framework::ToolbarLayoutManager::reset() Zeile 364 unter d:\lo mergedlo.dll!framework::LayoutManager::implts_reset(bool bAttached) Zeile 458 unter d:\lo mergedlo.dll!framework::LayoutManager::frameAction(const com::sun::star::frame::FrameActionEvent & aEvent) Zeile 2757 unter d:\lomergedlo.dll!`anonymous namespace'::XFrameImpl::implts_sendFrameActionEvent(const com::sun::star::frame::FrameAction & aAction) Zeile 2952 unter d:\lomergedlo.dll!`anonymous namespace'::XFrameImpl::setComponent(const com::sun::star::uno::Reference & xComponentWindow, const com::sun::star::uno::Reference & xController) Zeile 1470 unter d:\lomergedlo.dll!`anonymous namespace'::XFrameImpl::close(unsigned char bDeliverOwnership) Zeile 1701 unter d:\lo mergedlo.dll!framework::pattern::frame::closeIt(const com::sun::star::uno::Reference &
core.git: Branch 'distro/allotropia/zeta-7-4' - 5 commits - ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 151 - 1 file changed, 125 insertions(+), 26 deletions(-) New commits: commit 1e97e58c76a3538ed4b7e514fb18e80f2982a1a2 Author: Michael Stahl AuthorDate: Fri Mar 8 11:20:45 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 8 16:36:03 2024 +0100 ucb: webdav-curl: only set CURLOPT_NOBODY for HEAD Some testing with Apache httpd+mod_dav reveals that it usually sends a body with a 401 status, which causes the CURLE_WEIRD_SERVER_REPLY error code from curl. So we should either ignore this error in case there's a HTTP status too, or stop using CURLOPT_NOBODY. The latter seems to have no downside, except for HEAD requests, where strangely the server keeps the connection open and curl waits for 5 seconds for no body to arrive, blocking the UI, so continue to use CURLOPT_NOBODY for HEAD. The other methods don't seem to block. It turns out that the SAL_LOG-dependent setting of g_NoBody turned HEAD into GET anyway if logging is enabled, so explicitly set the method. Change-Id: Ibe2eef8e7a827d4e356ba37c4b56bee0be3b9c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164569 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit e0259d4c0951c4dd77c74d08b9d905728d4c8dfd) diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 9e99db92227a..dc5dfcaa2252 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1940,7 +1940,9 @@ auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector co CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ g_NoBody }; +::std::vector const options{ +g_NoBody, { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } +}; ::std::pair<::std::vector const&, DAVResource&> const headers(rHeaderNames, io_rResource); @@ -2175,9 +2177,8 @@ auto CurlSession::MKCOL(OUString const& rURIReference, DAVRequestEnvironment con CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "MKCOL", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "MKCOL", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "MKCOL", options, , nullptr, nullptr, nullptr, nullptr); @@ -2205,9 +2206,8 @@ auto CurlProcessor::MoveOrCopy(CurlSession& rSession, OUString const& rSourceURI throw uno::RuntimeException("curl_slist_append failed"); } -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, pMethod, "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, pMethod, + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(rSession, uriSource, OUString::createFromAscii(pMethod), options, , ::std::move(pList), nullptr, nullptr, nullptr); @@ -2237,9 +2237,8 @@ auto CurlSession::DESTROY(OUString const& rURIReference, DAVRequestEnvironment c CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "DELETE", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "DELETE", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "DESTROY", options, , nullptr, nullptr, nullptr, nullptr); commit 1da30e522960487eafd4fb455e48e4165199 Author: Michael Stahl AuthorDate: Wed Oct 19 14:30:55 2022 +0200 Commit: Michael Stahl CommitDate: Fri Mar 8 16:35:52 2024 +0100 ucb: webdav-curl: try to share DNS and TLS data as well Not necessary but probably faster. Documentation says that CURL_LOCK_DATA_CONNECT isn't safe in a multi threaded program. Change-Id: Iae79c01330b48f443b94abf6101a50559cb46189 (cherry picked from commit fa5feda2f891651933703e029dcc757e47a6801f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164553 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 21c1f50373d1937fecd8e4e8c4dfba0f3066652e) diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 5d50a8c3f69d..9e99db92227a 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -89,6 +89,13 @@ struct Init
core.git: ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) New commits: commit e0259d4c0951c4dd77c74d08b9d905728d4c8dfd Author: Michael Stahl AuthorDate: Fri Mar 8 11:20:45 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 8 16:26:06 2024 +0100 ucb: webdav-curl: only set CURLOPT_NOBODY for HEAD Some testing with Apache httpd+mod_dav reveals that it usually sends a body with a 401 status, which causes the CURLE_WEIRD_SERVER_REPLY error code from curl. So we should either ignore this error in case there's a HTTP status too, or stop using CURLOPT_NOBODY. The latter seems to have no downside, except for HEAD requests, where strangely the server keeps the connection open and curl waits for 5 seconds for no body to arrive, blocking the UI, so continue to use CURLOPT_NOBODY for HEAD. The other methods don't seem to block. It turns out that the SAL_LOG-dependent setting of g_NoBody turned HEAD into GET anyway if logging is enabled, so explicitly set the method. Change-Id: Ibe2eef8e7a827d4e356ba37c4b56bee0be3b9c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164569 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 858af08b5efb..9cd1745326b6 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1936,7 +1936,9 @@ auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector co CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ g_NoBody }; +::std::vector const options{ +g_NoBody, { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" } +}; ::std::pair<::std::vector const&, DAVResource&> const headers(rHeaderNames, io_rResource); @@ -2171,9 +2173,8 @@ auto CurlSession::MKCOL(OUString const& rURIReference, DAVRequestEnvironment con CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "MKCOL", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "MKCOL", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "MKCOL", options, , nullptr, nullptr, nullptr, nullptr); @@ -2201,9 +2202,8 @@ auto CurlProcessor::MoveOrCopy(CurlSession& rSession, std::u16string_view rSourc throw uno::RuntimeException("curl_slist_append failed"); } -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, pMethod, "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, pMethod, + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(rSession, uriSource, OUString::createFromAscii(pMethod), options, , ::std::move(pList), nullptr, nullptr, nullptr); @@ -2233,9 +2233,8 @@ auto CurlSession::DESTROY(OUString const& rURIReference, DAVRequestEnvironment c CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference)); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "DELETE", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "DELETE", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "DESTROY", options, , nullptr, nullptr, nullptr, nullptr);
core.git: ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 21c1f50373d1937fecd8e4e8c4dfba0f3066652e Author: Michael Stahl AuthorDate: Wed Oct 19 14:30:55 2022 +0200 Commit: Michael Stahl CommitDate: Fri Mar 8 16:25:08 2024 +0100 ucb: webdav-curl: try to share DNS and TLS data as well Not necessary but probably faster. Documentation says that CURL_LOCK_DATA_CONNECT isn't safe in a multi threaded program. Change-Id: Iae79c01330b48f443b94abf6101a50559cb46189 (cherry picked from commit fa5feda2f891651933703e029dcc757e47a6801f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164553 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 61c54cba2df8..858af08b5efb 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -94,6 +94,13 @@ struct Init assert(!"curl_share_setopt failed"); ::std::abort(); // can't handle error here } +sh = curl_share_setopt(pShare.get(), CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS); +// might fail but this is just a perf improvement +SAL_WARN_IF(sh != CURLSHE_OK, "ucb.ucp.webdav.curl", "curl_share_setopt failed"); +sh = curl_share_setopt(pShare.get(), CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION); +// might fail but this is just a perf improvement +SAL_WARN_IF(sh != CURLSHE_OK, "ucb.ucp.webdav.curl", "curl_share_setopt failed"); +// note: CURL_LOCK_DATA_CONNECT isn't safe in a multi threaded program. } // do not call curl_global_cleanup() - this is not the only client of curl };
core.git: ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 57 + 1 file changed, 57 insertions(+) New commits: commit 27fb4efea57881d49e9598e84b4a1df6a6e8719a Author: Michael Stahl AuthorDate: Wed Oct 19 14:27:04 2022 +0200 Commit: Michael Stahl CommitDate: Fri Mar 8 16:24:36 2024 +0100 ucb: webdav-curl: add a shared cookie store Change-Id: I8796aa7de6335c57818aa570a55fdc64d85bd9f9 (cherry picked from commit 7e8b26560020ae2819cfd621b5790e51083b7e92) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164552 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 342ba3669699..61c54cba2df8 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -49,6 +49,9 @@ using namespace ::com::sun::star; namespace { +void lock_cb(CURL*, curl_lock_data, curl_lock_access, void*); +void unlock_cb(CURL*, curl_lock_data, curl_lock_access, void*); + /// globals container struct Init { @@ -56,17 +59,69 @@ struct Init /// so don't call LockStore with m_Mutex held to prevent deadlock. ::http_dav_ucp::SerfLockStore LockStore; +/// libcurl shared data - to store cookies beyond one connection +::std::mutex ShareLock[CURL_LOCK_DATA_LAST]; +::std::unique_ptr> pShare; + Init() { if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { assert(!"curl_global_init failed"); +::std::abort(); // can't handle error here +} +pShare.reset(curl_share_init()); +if (!pShare) +{ +assert(!"curl_share_init failed"); +::std::abort(); // can't handle error here +} +CURLSHcode sh = curl_share_setopt(pShare.get(), CURLSHOPT_LOCKFUNC, lock_cb); +if (sh != CURLSHE_OK) +{ +assert(!"curl_share_setopt failed"); +::std::abort(); // can't handle error here +} +sh = curl_share_setopt(pShare.get(), CURLSHOPT_UNLOCKFUNC, unlock_cb); +if (sh != CURLSHE_OK) +{ +assert(!"curl_share_setopt failed"); +::std::abort(); // can't handle error here +} +sh = curl_share_setopt(pShare.get(), CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE); +if (sh != CURLSHE_OK) +{ +assert(!"curl_share_setopt failed"); +::std::abort(); // can't handle error here } } // do not call curl_global_cleanup() - this is not the only client of curl }; Init g_Init; +// global callbacks + +void lock_cb(CURL* /*handle*/, curl_lock_data const data, curl_lock_access /*access*/, + void* /*userptr*/) +{ +assert(0 <= data && data < CURL_LOCK_DATA_LAST); +try +{ +g_Init.ShareLock[data].lock(); +} +catch (std::exception const&) +{ +::std::abort(); +} +} + +void unlock_cb(CURL* /*handle*/, curl_lock_data const data, curl_lock_access /*access*/, + void* /*userptr*/) +{ +assert(0 <= data && data < CURL_LOCK_DATA_LAST); +g_Init.ShareLock[data].unlock(); +} + struct ResponseHeaders { ::std::vector<::std::pair<::std::vector, ::std::optional>> HeaderFields; @@ -673,6 +728,8 @@ CurlSession::CurlSession(uno::Reference xContext, assert(rc == CURLE_OK); #endif } +rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_SHARE, g_Init.pShare.get()); +assert(rc == CURLE_OK); // set this initially, may be overwritten during authentication rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_HTTPAUTH, CURLAUTH_ANY); assert(rc == CURLE_OK); // ANY is always available
core.git: ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx | 63 +++-- 1 file changed, 50 insertions(+), 13 deletions(-) New commits: commit d7492813058bff81c17068feee0e4ba7627c17de Author: Michael Stahl AuthorDate: Thu Mar 7 18:38:22 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 8 15:18:49 2024 +0100 ucb: webdav-curl: try fallback authentication on 403 error Sharepoint reports lack of authentication with 403 status and additional X-MSDAVEXT_ERROR header value 0x000E0098. Try to add the magic header "X-FORMS_BASED_AUTH_ACCEPTED: f" and fallback to Negotiate auth in this case; this requires cookies to be enabled. Note that the build config of libcurl on Linux is such that adding CURLAUTH_NEGOTIATE has no effect, but on WNT having both NEGOTIATE and NTLM causes the AuthMask to be ambiguous and prevents curl from trying. Change-Id: I47dada2ef08b21a43cdfa3db9eb2fcdb4043a04f Change-Id: Ia3e31c994bde0f8db84a60931702323c94c02e0e (cherry picked from commit c6df10ce7f91b3084255bfbbac95e865bbb3ce7b) Change-Id: I93e0c8f95beafc30b94296430352f2ae54e65b11 (cherry picked from commit 37abfd767874441568d9f5ac499b2d93d34e10fe) Change-Id: I0018a9904857d7521895936dc27607a54523f300 (cherry picked from commit 388a702af2fe45b2c436e64eb8639f16c1e24b76) Change-Id: Iafa8bdd183ef8a514b656ec41a9b7a6fa1e3acb9 (cherry picked from commit e84c21aca4b72d9e86c856f717b3bf1b75f190af) Change-Id: I6dfcb3ba6e44bbb76bc403e30b4a7b6ee95296f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164551 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 4096115a40aa..342ba3669699 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1386,6 +1386,31 @@ auto CurlProcessor::ProcessRequest( } break; } +case SC_FORBIDDEN: +{ +::std::map const headerMap( +ProcessHeaders(headers.HeaderFields.back().first)); +// X-MSDAVEXT_Error see [MS-WEBDAVE] 2.2.3.1.9 +auto const it(headerMap.find("x-msdavext_error")); +if (it == headerMap.end() || !it->second.startsWith("917656;")) +{ +break; +} +// fallback needs cookie engine enabled +CURLcode rc += curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_COOKIEFILE, ""); +assert(rc == CURLE_OK); +(void)rc; +SAL_INFO("ucb.ucp.webdav.curl", "403 fallback authentication"); +// disable 302 redirect +pRequestHeaderList.reset(curl_slist_append( +pRequestHeaderList.release(), "X-FORMS_BASED_AUTH_ACCEPTED: f")); +if (!pRequestHeaderList) +{ +throw uno::RuntimeException("curl_slist_append failed"); +} +} +[[fallthrough]]; // SP, no cookie, or cookie failed: try NTLM/Negotiate case SC_UNAUTHORIZED: case SC_PROXY_AUTHENTICATION_REQUIRED: { @@ -1393,8 +1418,9 @@ auto CurlProcessor::ProcessRequest( ? rSession.m_isAuthenticated : rSession.m_isAuthenticatedProxy) = false; // any auth data in m_pCurl is invalid -auto& rnAuthRequests(statusCode == SC_UNAUTHORIZED ? nAuthRequests - : nAuthRequestsProxy); +auto& rnAuthRequests(statusCode != SC_PROXY_AUTHENTICATION_REQUIRED + ? nAuthRequests + : nAuthRequestsProxy); if (rnAuthRequests == 10) { SAL_INFO("ucb.ucp.webdav.curl", "aborting authentication after " @@ -1402,22 +1428,32 @@ auto CurlProcessor::ProcessRequest( } else if (pEnv && pEnv->m_xAuthListener) { -::std::optional const oRealm(ExtractRealm( -headers, statusCode == SC_UNAUTHORIZED ? "WWW-Authenticate" - : "Proxy-Authenticate")); +::std::optional const oRealm( +
core.git: Branch 'distro/cib/libreoffice-6-4' - include/sal
include/sal/types.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit e969c692dd8705af5894a065674e2461ff514985 Author: Michael Stahl AuthorDate: Fri Mar 8 13:40:44 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 8 13:40:44 2024 +0100 sal: the old MSVC doesn't know _Pragma, only __pragma Change-Id: I139922d9cfabb3772782589f097234fd33e41809 diff --git a/include/sal/types.h b/include/sal/types.h index f8a53ae722a5..2e8d5e8ad873 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -497,10 +497,10 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { _Pragma(SAL_STRINGIFY_ARG(GCC diagnostic pop)) #elif defined LIBO_INTERNAL_ONLY && defined _MSC_VER #define SAL_WNODEPRECATED_DECLARATIONS_PUSH \ -_Pragma(SAL_STRINGIFY_ARG(warning(push))) \ -_Pragma(SAL_STRINGIFY_ARG(warning(disable : 4996))) +__pragma(warning(push)) \ +__pragma(warning(disable : 4996)) #define SAL_WNODEPRECATED_DECLARATIONS_POP \ -_Pragma(SAL_STRINGIFY_ARG(warning(pop))) +__pragma(warning(pop)) #else # define SAL_WNODEPRECATED_DECLARATIONS_PUSH # define SAL_WNODEPRECATED_DECLARATIONS_POP
core.git: Branch 'distro/cib/libreoffice-6-4' - ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit dafc3780ffbef9b316839059076f58fe8c4eb231 Author: Michael Stahl AuthorDate: Thu Mar 7 20:10:48 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 8 10:26:34 2024 +0100 ucb: webdav-curl: don't set CURLOPT_NOBODY for OPTIONS The problem is that if the server does send a body, then curl returns CURLE_WEIRD_SERVER_REPLY error code, which is translated to DAVException; this looks unnecessary now because write_callback will just return if there's no stream to write to anyway. Change-Id: Iddaee9778ac7bbd538b64584f822f65ab0e395c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164550 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 980ca3953084560806cd980d2ec16951d9e30c2b) diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 2a15b9faea5b..645d41502156 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1607,9 +1607,8 @@ auto CurlSession::OPTIONS(OUString const& rURIReference, DAVResource result; ::std::pair<::std::vector const&, DAVResource&> const headers(headerNames, result); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "OPTIONS", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "OPTIONS", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "OPTIONS", options, , nullptr, nullptr, nullptr, );
core.git: ucb/source
ucb/source/ucp/webdav-curl/CurlSession.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 980ca3953084560806cd980d2ec16951d9e30c2b Author: Michael Stahl AuthorDate: Thu Mar 7 20:10:48 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 8 10:24:34 2024 +0100 ucb: webdav-curl: don't set CURLOPT_NOBODY for OPTIONS The problem is that if the server does send a body, then curl returns CURLE_WEIRD_SERVER_REPLY error code, which is translated to DAVException; this looks unnecessary now because write_callback will just return if there's no stream to write to anyway. Change-Id: Iddaee9778ac7bbd538b64584f822f65ab0e395c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164550 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 11dc964fbe00..4096115a40aa 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1526,9 +1526,8 @@ auto CurlSession::OPTIONS(OUString const& rURIReference, DAVResource result; ::std::pair<::std::vector const&, DAVResource&> const headers(headerNames, result); -::std::vector const options{ -g_NoBody, { CURLOPT_CUSTOMREQUEST, "OPTIONS", "CURLOPT_CUSTOMREQUEST" } -}; +::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "OPTIONS", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "OPTIONS", options, , nullptr, nullptr, nullptr, );
core.git: Branch 'distro/cib/libreoffice-6-4' - 10 commits - sw/inc sw/qa sw/source
sw/inc/crsrsh.hxx | 18 sw/inc/doc.hxx|9 sw/inc/ndarr.hxx |7 sw/inc/node.hxx |2 sw/inc/undobj.hxx | 12 sw/qa/extras/layout/data/largeTopMarginAndHiddenFirstSection.fodt | 15 sw/qa/extras/layout/data/pageBreakInHiddenSection.fodt| 90 ++ sw/qa/extras/layout/layout.cxx| 66 + sw/qa/extras/odfimport/odfimport.cxx |4 sw/qa/extras/uiwriter/data/FrameInHiddenSection.fodt | 20 sw/qa/extras/uiwriter/data/hiddenSectionsAroundPageBreak.fodt | 21 sw/qa/extras/uiwriter/data/pagebreak-source.fodt | 123 +++ sw/qa/extras/uiwriter/data/pagebreak-target.fodt | 129 +++ sw/qa/extras/uiwriter/data/table-at-end-of-cell.fodt | 219 ++ sw/qa/extras/uiwriter/uiwriter.cxx| 177 sw/qa/extras/uiwriter/uiwriter2.cxx | 23 sw/qa/extras/unowriter/data/tdf134252_onlytable_protected.fodt| 87 ++ sw/qa/extras/unowriter/unowriter.cxx | 62 + sw/source/core/crsr/crsrsh.cxx| 358 +- sw/source/core/crsr/pam.cxx |5 sw/source/core/crsr/swcrsr.cxx| 17 sw/source/core/doc/DocumentContentOperationsManager.cxx | 97 +- sw/source/core/doc/doccorr.cxx|7 sw/source/core/doc/docedt.cxx |4 sw/source/core/docnode/ndsect.cxx |4 sw/source/core/docnode/ndtbl.cxx | 299 sw/source/core/docnode/nodes.cxx | 49 + sw/source/core/docnode/section.cxx|7 sw/source/core/edit/eddel.cxx | 36 - sw/source/core/edit/edglss.cxx| 19 sw/source/core/edit/editsh.cxx|2 sw/source/core/frmedt/fecopy.cxx | 35 sw/source/core/frmedt/fetab.cxx |3 sw/source/core/inc/UndoTable.hxx |2 sw/source/core/inc/frame.hxx |2 sw/source/core/inc/layfrm.hxx |1 sw/source/core/inc/sectfrm.hxx|2 sw/source/core/inc/txtfrm.hxx |2 sw/source/core/layout/calcmove.cxx| 13 sw/source/core/layout/findfrm.cxx |8 sw/source/core/layout/flowfrm.cxx | 120 +-- sw/source/core/layout/frmtool.cxx | 23 sw/source/core/layout/ftnfrm.cxx | 10 sw/source/core/layout/pagechg.cxx |5 sw/source/core/layout/sectfrm.cxx | 38 + sw/source/core/layout/tabfrm.cxx |6 sw/source/core/layout/trvlfrm.cxx | 25 sw/source/core/layout/wsfrm.cxx | 12 sw/source/core/text/txtfrm.cxx| 15 sw/source/core/text/xmldump.cxx |9 sw/source/core/undo/undobj.cxx| 22 sw/source/core/undo/unins.cxx |4 sw/source/core/undo/untbl.cxx |8 sw/source/core/undo/untblk.cxx| 12 sw/source/core/unocore/unoobj2.cxx| 14 sw/source/core/unocore/unotbl.cxx |2 sw/source/core/unocore/unotext.cxx|6 sw/source/filter/xml/XMLRedlineImportHelper.cxx |5 sw/source/uibase/wrtsh/move.cxx | 46 + sw/source/uibase/wrtsh/select.cxx | 36 - 60 files changed, 1993 insertions(+), 481 deletions(-) New commits: commit 0a0196bc0fe18449debae5f6353c1ddb312df916 Author: Michael Stahl AuthorDate: Mon Mar 4 15:45:07 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 7 15:14:42 2024 +0100 sw: SelectAll of section with RES_PAGEDESC corner-case The main problem here is that if a document has a RES_PAGEDESC on its first body text node, and you paste a section
core.git: Branch 'libreoffice-24-2' - 2 commits - sw/qa sw/source
sw/qa/extras/htmlexport/data/char_border_and_font_color.fodt | 14 sw/qa/extras/htmlexport/htmlexport.cxx | 21 sw/qa/uitest/writer_tests7/tdf150443.py |4 sw/source/filter/html/css1atr.cxx|6 sw/source/filter/html/htmlatr.cxx| 409 --- 5 files changed, 226 insertions(+), 228 deletions(-) New commits: commit b84f10d5eadeecc668e29159c0485376466b7f54 Author: Michael Stahl AuthorDate: Mon Mar 4 12:47:15 2024 +0100 Commit: Xisco Fauli CommitDate: Thu Mar 7 12:02:35 2024 +0100 sw: UITest_writer_tests8 test_tdf150443 more tolerant This fails on Fedora 39, also in the libreoffice-24-2 branch, with: self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "4") AssertionError: '5' != '4' Presumably a font substitution changing metrics problem, as "NexusSansOT" is not found. It looks like the exact page doesn't matter for the test. Change-Id: I62eadb8321352ea47a0f8f83ab91fd50ff01f7e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164353 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 0b21e2a404c114529376dc50764dc0286dafc745) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164364 Reviewed-by: Xisco Fauli diff --git a/sw/qa/uitest/writer_tests7/tdf150443.py b/sw/qa/uitest/writer_tests7/tdf150443.py index fb39bd8a0375..91937551a4b3 100644 --- a/sw/qa/uitest/writer_tests7/tdf150443.py +++ b/sw/qa/uitest/writer_tests7/tdf150443.py @@ -26,7 +26,9 @@ class tdf150443(UITestCase): xsearch = xDialog.getChild("search") xsearch.executeAction("CLICK", tuple()) #first search xToolkit.processEventsToIdle() - self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "4") +page = get_state_as_dict(xWriterEdit)["CurrentPage"] +# page may depend on font subsitution, just check it moved +self.assertTrue(page == "4" or page == "5") # reject the tracked table row in Manage Changes dialog window with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: commit 6ebe0eceb1ae4a3e544c733be37e5f02c5f46e80 Author: Mike Kaganski AuthorDate: Mon Mar 4 12:20:13 2024 +0600 Commit: Xisco Fauli CommitDate: Thu Mar 7 12:02:29 2024 +0100 tdf160017: make sure to emit the closing tags in correct order This reimplements how the starts and ends of attributes are stored in HTMLEndPosLst. Instead of a plain list, now it is a sorted map, with positions as keys, and a vector of HTMLStartEndPos* as values. In commit b94b1fe936ddc4a9b86fbeb9c9c6ab0fca52f0bc (CharBrd 9.1: HTML filters, 2013-09-08), the character borders attributes started to be set in a special order, in front of the position's other attributes, to allow merging them. But that created a problem of knowing in which order to close respective tags. The change here sorts the closing tags for the current node only when writing them. At this point, it is possible to consider the opening positions correctly. Change-Id: I466ffa1c0eb28874ded003035e0cf772e31585b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164325 Tested-by: Jenkins Reviewed-by: Mike Kaganski Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164357 diff --git a/sw/qa/extras/htmlexport/data/char_border_and_font_color.fodt b/sw/qa/extras/htmlexport/data/char_border_and_font_color.fodt new file mode 100644 index ..bda2ec63133c --- /dev/null +++ b/sw/qa/extras/htmlexport/data/char_border_and_font_color.fodt @@ -0,0 +1,14 @@ + + + + + + + + + + + foo + + + \ No newline at end of file diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index 1bd883be111f..de2e9da4c678 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -3032,6 +3032,27 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_NoBrClearForImageWrap) 0); } +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_Tdf160017_spanClosingOrder) +{ +// Given a document with a paragraph having explicit font color and character border properties: +createSwDoc("char_border_and_font_color.fodt"); +// When exporting to reqif: +ExportToReqif(); +// Without the fix, this would fail, because there was an extra closing +WrapReqifFromTempFile(); +} + +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testHTML_Tdf160017_spanClosingOrder) +{ +// Given a document with a paragraph having explicit font color and character border properties: +createSwDoc("char_border_and_font_color.fodt"); +// When exporting to HTML: +
core.git: Branch 'feature/allo_contract45533' - 2 commits - accessibility/source distro-configs/LibreOfficeLinux.conf vcl/source
accessibility/source/standard/vclxaccessibletoolbox.cxx | 11 --- distro-configs/LibreOfficeLinux.conf|1 - vcl/source/window/accessibility.cxx |2 +- 3 files changed, 9 insertions(+), 5 deletions(-) New commits: commit 33d25f42f0308f1fa8a8212762cd6abc06b33d42 Author: Michael Stahl AuthorDate: Thu Feb 15 13:06:32 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 7 11:58:26 2024 +0100 tdf#159502 remove --without-system-libxml from LibreOfficeLinux.conf configure.ac explicitly excludes libxml from --without-system-libs but this distro-config "helpfully" adds it explicitly, when the system already contains a usable libxml/libxslt anyway. Change-Id: I79d65d9ed9185277ffde8624efc152b290a6ffb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163438 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 6f6364e572a0570fb097fec098314bffadc5b474) (cherry picked from commit 5ffb9f751f782953b382f8be4b6e4649049f7ce0) diff --git a/distro-configs/LibreOfficeLinux.conf b/distro-configs/LibreOfficeLinux.conf index db759a8cb4e5..fba02d362d31 100644 --- a/distro-configs/LibreOfficeLinux.conf +++ b/distro-configs/LibreOfficeLinux.conf @@ -4,7 +4,6 @@ --without-system-poppler --without-system-openssl --without-system-libpng ---without-system-libxml --without-system-jpeg --without-system-jars --without-system-postgresql commit baed91da1f9fa0ef91503df8eb68d8fbb1b0e976 Author: Michael Stahl AuthorDate: Tue Mar 5 19:21:21 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 7 11:53:08 2024 +0100 vcl,accessibility: try to fix a crash while disposing SvxFontNameBox_Impl This happened in a 6.3 based branch, no idea how to reproduce it. Clearly the SvxFontNameBox_Impl is being disposed and in its base class Window::dispose() when a call to SvxFontNameBox_Impl::CreateAccessible() happens, which seems very suspicious; try to prevent that. mergedlo.dll!ImplListBox::InsertEntry(long nPos, const rtl::OUString & rStr) Zeile 2225 unter d:\lomergedlo.dll!ComboBox::InsertEntry(const rtl::OUString & rStr, long nPos) Zeile 886 unter d:\lomergedlo.dll!FontNameBox::Fill(const FontList * pList) Zeile 447 unter d:\lo[Inlineframe] mergedlo.dll!SvxFontNameBox_Impl::Fill(const FontList * pList) Zeile 236 unter d:\lomergedlo.dll!lcl_GetDocFontList(const FontList * * ppFontList, SvxFontNameBox_Impl * pBox) Zeile 1290 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::FillList() Zeile 1331 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::CreateAccessible() Zeile 3739 unter d:\lomergedlo.dll!vcl::Window::GetAccessible(bool bCreate) Zeile 129 unter d:\lo acclo.dll!VCLXAccessibleToolBox::getAccessibleChild(long i) Zeile 733 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetItemWindowAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 784 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetChildAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 795 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 165 unter d:\lo acclo.dll!VCLXAccessibleToolBox::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 657 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::WindowChildEventListener(VclWindowEvent & rEvent) Zeile 129 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::LinkStubWindowChildEventListener(void * instance, VclWindowEvent & data) Zeile 118 unter d:\lo[Inlineframe] mergedlo.dll!Link::Call(VclWindowEvent &) Zeile 84 unter d:\lo mergedlo.dll!vcl::Window::CallEventListeners(VclEventId nEvent, void * pData) Zeile 280 unter d:\lomergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 735 unter d:\lomergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 747 unter d:\lomergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2198 unter d:\lomergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2176 unter d:\lo[Inlineframe] mergedlo.dll!vcl::Window::Hide() Zeile 925 unter d:\lomergedlo.dll!vcl::Window::dispose() Zeile 402 unter d:\lomergedlo.dll!Edit::dispose() Zeile 258 unter d:\lomergedlo.dll!ComboBox::dispose() Zeile 132 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::dispose() Zeile 1322 unter d:\lo[Inlineframe] mergedlo.dll!VclPtr::disposeAndClear() Zeile 206 unter d:\lomergedlo.dll!SvxFontNameToolBoxControl::dispose() Zeile 3309 unter d:\lo
core.git: Branch 'libreoffice-24-2' - distro-configs/LibreOfficeLinux.conf
distro-configs/LibreOfficeLinux.conf |1 - 1 file changed, 1 deletion(-) New commits: commit b20f17ce082f30b0a2afd0d311f63f6b2ad8a99a Author: Michael Stahl AuthorDate: Thu Feb 15 13:06:32 2024 +0100 Commit: Christian Lohmaier CommitDate: Thu Mar 7 11:55:16 2024 +0100 tdf#159502 remove --without-system-libxml from LibreOfficeLinux.conf configure.ac explicitly excludes libxml from --without-system-libs but this distro-config "helpfully" adds it explicitly, when the system already contains a usable libxml/libxslt anyway. Change-Id: I79d65d9ed9185277ffde8624efc152b290a6ffb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163438 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 6f6364e572a0570fb097fec098314bffadc5b474) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163409 Reviewed-by: Christian Lohmaier diff --git a/distro-configs/LibreOfficeLinux.conf b/distro-configs/LibreOfficeLinux.conf index db759a8cb4e5..fba02d362d31 100644 --- a/distro-configs/LibreOfficeLinux.conf +++ b/distro-configs/LibreOfficeLinux.conf @@ -4,7 +4,6 @@ --without-system-poppler --without-system-openssl --without-system-libpng ---without-system-libxml --without-system-jpeg --without-system-jars --without-system-postgresql
core.git: Branch 'feature/cib_contract57d' - accessibility/source vcl/source
accessibility/source/standard/vclxaccessibletoolbox.cxx | 11 --- vcl/source/window/accessibility.cxx |2 +- 2 files changed, 9 insertions(+), 4 deletions(-) New commits: commit ade99ebb4d00f58339c86bcf4c952805ddce922b Author: Michael Stahl AuthorDate: Tue Mar 5 19:21:21 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 7 10:58:11 2024 +0100 vcl,accessibility: try to fix a crash while disposing SvxFontNameBox_Impl This happened in a 6.3 based branch, no idea how to reproduce it. Clearly the SvxFontNameBox_Impl is being disposed and in its base class Window::dispose() when a call to SvxFontNameBox_Impl::CreateAccessible() happens, which seems very suspicious; try to prevent that. mergedlo.dll!ImplListBox::InsertEntry(long nPos, const rtl::OUString & rStr) Zeile 2225 unter d:\lomergedlo.dll!ComboBox::InsertEntry(const rtl::OUString & rStr, long nPos) Zeile 886 unter d:\lomergedlo.dll!FontNameBox::Fill(const FontList * pList) Zeile 447 unter d:\lo[Inlineframe] mergedlo.dll!SvxFontNameBox_Impl::Fill(const FontList * pList) Zeile 236 unter d:\lomergedlo.dll!lcl_GetDocFontList(const FontList * * ppFontList, SvxFontNameBox_Impl * pBox) Zeile 1290 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::FillList() Zeile 1331 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::CreateAccessible() Zeile 3739 unter d:\lomergedlo.dll!vcl::Window::GetAccessible(bool bCreate) Zeile 129 unter d:\lo acclo.dll!VCLXAccessibleToolBox::getAccessibleChild(long i) Zeile 733 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetItemWindowAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 784 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetChildAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 795 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 165 unter d:\lo acclo.dll!VCLXAccessibleToolBox::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 657 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::WindowChildEventListener(VclWindowEvent & rEvent) Zeile 129 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::LinkStubWindowChildEventListener(void * instance, VclWindowEvent & data) Zeile 118 unter d:\lo[Inlineframe] mergedlo.dll!Link::Call(VclWindowEvent &) Zeile 84 unter d:\lo mergedlo.dll!vcl::Window::CallEventListeners(VclEventId nEvent, void * pData) Zeile 280 unter d:\lomergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 735 unter d:\lomergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 747 unter d:\lomergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2198 unter d:\lomergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2176 unter d:\lo[Inlineframe] mergedlo.dll!vcl::Window::Hide() Zeile 925 unter d:\lomergedlo.dll!vcl::Window::dispose() Zeile 402 unter d:\lomergedlo.dll!Edit::dispose() Zeile 258 unter d:\lomergedlo.dll!ComboBox::dispose() Zeile 132 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::dispose() Zeile 1322 unter d:\lo[Inlineframe] mergedlo.dll!VclPtr::disposeAndClear() Zeile 206 unter d:\lomergedlo.dll!SvxFontNameToolBoxControl::dispose() Zeile 3309 unter d:\lo mergedlo.dll!framework::ToolBarManager::RemoveControllers() Zeile 651 unter d:\lomergedlo.dll!framework::ToolBarManager::dispose() Zeile 468 unter d:\lomergedlo.dll!framework::ToolBarWrapper::dispose() Zeile 105 unter d:\lo mergedlo.dll!framework::ToolbarLayoutManager::destroyToolbars() Zeile 666 unter d:\lo mergedlo.dll!framework::ToolbarLayoutManager::reset() Zeile 364 unter d:\lo mergedlo.dll!framework::LayoutManager::implts_reset(bool bAttached) Zeile 458 unter d:\lo mergedlo.dll!framework::LayoutManager::frameAction(const com::sun::star::frame::FrameActionEvent & aEvent) Zeile 2757 unter d:\lomergedlo.dll!`anonymous namespace'::XFrameImpl::implts_sendFrameActionEvent(const com::sun::star::frame::FrameAction & aAction) Zeile 2952 unter d:\lomergedlo.dll!`anonymous namespace'::XFrameImpl::setComponent(const com::sun::star::uno::Reference & xComponentWindow, const com::sun::star::uno::Reference & xController) Zeile 1470 unter d:\lomergedlo.dll!`anonymous namespace'::XFrameImpl::close(unsigned char bDeliverOwnership) Zeile 1701 unter d:\lo mergedlo.dll!framework::pattern::frame::closeIt(const com::sun::star::uno::Reference &
core.git: accessibility/source vcl/source
accessibility/source/standard/vclxaccessibletoolbox.cxx | 11 --- vcl/source/window/accessibility.cxx |2 +- 2 files changed, 9 insertions(+), 4 deletions(-) New commits: commit 825dde03999a55d02e4d5bc88a4d5beacb65e67f Author: Michael Stahl AuthorDate: Tue Mar 5 19:21:21 2024 +0100 Commit: Michael Stahl CommitDate: Thu Mar 7 10:52:12 2024 +0100 vcl,accessibility: try to fix a crash while disposing SvxFontNameBox_Impl This happened in a 6.3 based branch, no idea how to reproduce it. Clearly the SvxFontNameBox_Impl is being disposed and in its base class Window::dispose() when a call to SvxFontNameBox_Impl::CreateAccessible() happens, which seems very suspicious; try to prevent that. mergedlo.dll!ImplListBox::InsertEntry(long nPos, const rtl::OUString & rStr) Zeile 2225 unter d:\lomergedlo.dll!ComboBox::InsertEntry(const rtl::OUString & rStr, long nPos) Zeile 886 unter d:\lomergedlo.dll!FontNameBox::Fill(const FontList * pList) Zeile 447 unter d:\lo[Inlineframe] mergedlo.dll!SvxFontNameBox_Impl::Fill(const FontList * pList) Zeile 236 unter d:\lomergedlo.dll!lcl_GetDocFontList(const FontList * * ppFontList, SvxFontNameBox_Impl * pBox) Zeile 1290 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::FillList() Zeile 1331 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::CreateAccessible() Zeile 3739 unter d:\lomergedlo.dll!vcl::Window::GetAccessible(bool bCreate) Zeile 129 unter d:\lo acclo.dll!VCLXAccessibleToolBox::getAccessibleChild(long i) Zeile 733 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetItemWindowAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 784 unter d:\lo acclo.dll!VCLXAccessibleToolBox::GetChildAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 795 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 165 unter d:\lo acclo.dll!VCLXAccessibleToolBox::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 657 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::WindowChildEventListener(VclWindowEvent & rEvent) Zeile 129 unter d:\lo mergedlo.dll!VCLXAccessibleComponent::LinkStubWindowChildEventListener(void * instance, VclWindowEvent & data) Zeile 118 unter d:\lo[Inlineframe] mergedlo.dll!Link::Call(VclWindowEvent &) Zeile 84 unter d:\lo mergedlo.dll!vcl::Window::CallEventListeners(VclEventId nEvent, void * pData) Zeile 280 unter d:\lomergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 735 unter d:\lomergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 747 unter d:\lomergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2198 unter d:\lomergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2176 unter d:\lo[Inlineframe] mergedlo.dll!vcl::Window::Hide() Zeile 925 unter d:\lomergedlo.dll!vcl::Window::dispose() Zeile 402 unter d:\lomergedlo.dll!Edit::dispose() Zeile 258 unter d:\lomergedlo.dll!ComboBox::dispose() Zeile 132 unter d:\lomergedlo.dll!SvxFontNameBox_Impl::dispose() Zeile 1322 unter d:\lo[Inlineframe] mergedlo.dll!VclPtr::disposeAndClear() Zeile 206 unter d:\lomergedlo.dll!SvxFontNameToolBoxControl::dispose() Zeile 3309 unter d:\lo mergedlo.dll!framework::ToolBarManager::RemoveControllers() Zeile 651 unter d:\lomergedlo.dll!framework::ToolBarManager::dispose() Zeile 468 unter d:\lomergedlo.dll!framework::ToolBarWrapper::dispose() Zeile 105 unter d:\lo mergedlo.dll!framework::ToolbarLayoutManager::destroyToolbars() Zeile 666 unter d:\lo mergedlo.dll!framework::ToolbarLayoutManager::reset() Zeile 364 unter d:\lo mergedlo.dll!framework::LayoutManager::implts_reset(bool bAttached) Zeile 458 unter d:\lo mergedlo.dll!framework::LayoutManager::frameAction(const com::sun::star::frame::FrameActionEvent & aEvent) Zeile 2757 unter d:\lomergedlo.dll!`anonymous namespace'::XFrameImpl::implts_sendFrameActionEvent(const com::sun::star::frame::FrameAction & aAction) Zeile 2952 unter d:\lomergedlo.dll!`anonymous namespace'::XFrameImpl::setComponent(const com::sun::star::uno::Reference & xComponentWindow, const com::sun::star::uno::Reference & xController) Zeile 1470 unter d:\lomergedlo.dll!`anonymous namespace'::XFrameImpl::close(unsigned char bDeliverOwnership) Zeile 1701 unter d:\lo mergedlo.dll!framework::pattern::frame::closeIt(const com::sun::star::uno::Reference &
core.git: 2 commits - sw/qa sw/source
sw/qa/extras/uiwriter/data/pagebreak-source.fodt| 123 +++ sw/qa/extras/uiwriter/data/pagebreak-target.fodt| 129 sw/qa/extras/uiwriter/uiwriter.cxx | 109 + sw/qa/extras/uiwriter/uiwriter2.cxx |6 sw/qa/extras/uiwriter/uiwriter3.cxx |3 sw/source/core/doc/DocumentContentOperationsManager.cxx | 87 +- sw/source/core/docnode/nodes.cxx|2 sw/source/core/edit/edglss.cxx |8 sw/source/core/frmedt/fecopy.cxx| 15 + sw/source/core/undo/untblk.cxx |6 sw/source/core/unocore/unotext.cxx |6 11 files changed, 436 insertions(+), 58 deletions(-) New commits: commit 1063e875c89789ee6bc1a4c77507e0f133832530 Author: Michael Stahl AuthorDate: Mon Mar 4 19:47:15 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 6 10:46:05 2024 +0100 sw: remove dead code in CopyImplImpl() This looks dead already in CVS import? Change-Id: I865058d0e38b45917e82266925911addd10ec634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164435 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 975f0e0a0dbe..d065af3a60a5 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -5171,12 +5171,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo rDoc.getIDocumentContentOperations().SplitNode( rPos, false ); } -if (bCanMoveBack && rPos == *pCopyPam->GetPoint()) -{ -// after the SplitNode, span the CpyPam correctly again -pCopyPam->Move( fnMoveBackward, GoInContent ); -pCopyPam->Move( fnMoveBackward, GoInContent ); -} +assert(rPos != *pCopyPam->GetPoint()); // code removed pDestTextNd = rDoc.GetNodes()[ aInsPos.GetIndex()-SwNodeOffset(1) ]->GetTextNode(); aDestIdx.Assign( @@ -5262,12 +5257,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo rDoc.getIDocumentContentOperations().SplitNode( rPos, false ); } -if (bCanMoveBack && rPos == *pCopyPam->GetPoint()) -{ -// after the SplitNode, span the CpyPam correctly again -pCopyPam->Move( fnMoveBackward, GoInContent ); -pCopyPam->Move( fnMoveBackward, GoInContent ); -} +assert(rPos != *pCopyPam->GetPoint()); // code removed // Correct the area again if( bEndEqualIns ) commit fcd4222d36e1864452163e5c94976eea353bbaf0 Author: Michael Stahl AuthorDate: Mon Mar 4 15:45:07 2024 +0100 Commit: Michael Stahl CommitDate: Wed Mar 6 10:45:57 2024 +0100 sw: SelectAll of section with RES_PAGEDESC corner-case The main problem here is that if a document has a RES_PAGEDESC on its first body text node, and you paste a section whose first text node also has a RES_PAGEDESC, the result inevitably has a page break that wasn't there before, and which is unwanted. SwEditShell::CopySelToDoc() needs a change to include the end node of a section at the start, so it is copied. Change CopyImplImpl() to insert a non-textnode *before* a text node at the insert position, instead of after it. This simplifies the implementation: only SwFEShell::Paste() needs to care about removing an empty trailing paragraph, but SwEditShell::CopySelToDoc() needs no changes; both functions would need to delete the empty paragraph when inserting after. Several tests such as CppunitTest_sw_ooxmlexport3 testCrashWhileSave fail because of this, which can be solved by removing the DelFullPara() call in SwXText::copyText() that is now unnecessary. Generalise and simplify the "bAfterTable" code in CopyImplImpl(): it doesn't really matter what is before the insert position, what matters is if the pasted text starts with a table or section. Also, the fly-anchor-correction code (both here and in SwUndoInserts::RedoImpl()) needs to move to the first text node also in case a section was inserted (but the equal-looking code *before* inserting remains as is!), in the situation where the last node will be deleted. Now there are some test failures: unowriter.cxx:430:Assertion Test name: (anonymous namespace)::testSectionAnchorCopyTableAtStart::TestBody equality
core.git: sw/qa
sw/qa/uitest/writer_tests8/tdf150443.py |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 0b21e2a404c114529376dc50764dc0286dafc745 Author: Michael Stahl AuthorDate: Mon Mar 4 12:47:15 2024 +0100 Commit: Michael Stahl CommitDate: Mon Mar 4 15:28:46 2024 +0100 sw: UITest_writer_tests8 test_tdf150443 more tolerant This fails on Fedora 39, also in the libreoffice-24-2 branch, with: self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "4") AssertionError: '5' != '4' Presumably a font substitution changing metrics problem, as "NexusSansOT" is not found. It looks like the exact page doesn't matter for the test. Change-Id: I62eadb8321352ea47a0f8f83ab91fd50ff01f7e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164353 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/qa/uitest/writer_tests8/tdf150443.py b/sw/qa/uitest/writer_tests8/tdf150443.py index fb39bd8a0375..91937551a4b3 100644 --- a/sw/qa/uitest/writer_tests8/tdf150443.py +++ b/sw/qa/uitest/writer_tests8/tdf150443.py @@ -26,7 +26,9 @@ class tdf150443(UITestCase): xsearch = xDialog.getChild("search") xsearch.executeAction("CLICK", tuple()) #first search xToolkit.processEventsToIdle() - self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "4") +page = get_state_as_dict(xWriterEdit)["CurrentPage"] +# page may depend on font subsitution, just check it moved +self.assertTrue(page == "4" or page == "5") # reject the tracked table row in Manage Changes dialog window with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg:
core.git: sw/inc sw/source
sw/inc/undobj.hxx |2 +- sw/source/core/doc/DocumentContentOperationsManager.cxx |2 +- sw/source/core/txtnode/ndtxt.cxx|2 +- sw/source/core/undo/untblk.cxx | 15 --- 4 files changed, 11 insertions(+), 10 deletions(-) New commits: commit cf4df3e51b609613134e3146f526d8e6b07946c3 Author: Michael Stahl AuthorDate: Fri Mar 1 14:30:42 2024 +0100 Commit: Michael Stahl CommitDate: Mon Mar 4 11:23:44 2024 +0100 sw: for Undo, add FLY_AT_PAGE in GetFlysAnchoredAt() SwUndoInserts::IsCreateUndoForNewFly() now returns true for these, so they get Undo objects on Paste, which is of course wrong. (regression from commit 359e5af31c330a137fed6ba3140b77cd759c28bb) Change-Id: Id5abb38c662a9c55826cde6d8b151613c852de72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164221 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 03ad720aabe7..7fb61309ec29 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -244,7 +244,7 @@ class SwUndoInsLayFormat; namespace sw { std::optional> -GetFlysAnchoredAt(SwDoc & rDoc, SwNodeOffset nSttNode); +GetFlysAnchoredAt(SwDoc & rDoc, SwNodeOffset nSttNode, bool isAtPageIncluded); } diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index e799555b9dd7..1c3df58bd6cd 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -5066,7 +5066,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo } else { -pFlys = sw::GetFlysAnchoredAt(rDoc, rPos.GetNodeIndex()); +pFlys = sw::GetFlysAnchoredAt(rDoc, rPos.GetNodeIndex(), false); pFlysAtInsPos = pFlys ? &*pFlys : nullptr; } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index dc2625d33c54..bbb725e5c13c 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -462,7 +462,7 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition & rPos, } bool bSplitFly = false; -std::optional> oFlys = sw::GetFlysAnchoredAt(GetDoc(), GetIndex()); +std::optional> oFlys = sw::GetFlysAnchoredAt(GetDoc(), GetIndex(), false); if (oFlys.has_value()) { // See if one of the flys is a split fly. If so, we need to keep diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index 158167809712..328d901ca482 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -38,7 +38,7 @@ namespace sw { std::optional> -GetFlysAnchoredAt(SwDoc & rDoc, SwNodeOffset const nSttNode) +GetFlysAnchoredAt(SwDoc & rDoc, SwNodeOffset const nSttNode, bool const isAtPageIncluded) { std::optional> pFrameFormats; const size_t nArrLen = rDoc.GetSpzFrameFormats()->size(); @@ -47,10 +47,11 @@ GetFlysAnchoredAt(SwDoc & rDoc, SwNodeOffset const nSttNode) SwFrameFormat *const pFormat = (*rDoc.GetSpzFrameFormats())[n]; SwFormatAnchor const*const pAnchor = >GetAnchor(); SwNode const*const pAnchorNode = pAnchor->GetAnchorNode(); -if (pAnchorNode - && nSttNode == pAnchorNode->GetIndex() - && ((pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) - || (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_CHAR))) +if ((pAnchorNode +&& nSttNode == pAnchorNode->GetIndex() +&& ((pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) +|| (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_CHAR))) +|| (isAtPageIncluded && pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PAGE)) { if (!pFrameFormats) pFrameFormats.emplace(); @@ -89,7 +90,7 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam ) // These flys will be saved in pFrameFormats array (only flys which exist BEFORE insertion!) // Then in SwUndoInserts::SetInsertRange the flys saved in pFrameFormats will NOT create Undos. // m_FlyUndos will only be filled with newly inserted flys. -m_pFrameFormats = sw::GetFlysAnchoredAt(rDoc, m_nSttNode); +m_pFrameFormats = sw::GetFlysAnchoredAt(rDoc, m_nSttNode, true); } // consider Redline if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() ) @@ -392,7 +393,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext) if( ( m_nSttNode != m_nEndNode || m_nSttContent != m_nEndContent ) && m_oUndoNodeIndex) { auto const pFlysAtInsPos(sw::GetFlysAnchoredAt(rDoc, -rPam.GetPoint()->GetNodeIndex())); +rPam.GetPoint()->GetNodeIndex(), false)); ::std::optional oMvBkwrd = MovePtBackward(rPam);
core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - helpcompiler/source
helpcompiler/source/HelpCompiler.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 233077b2fc9ba0924de42c94da2e01b323ee09f4 Author: Michael Stahl AuthorDate: Tue Feb 27 11:01:29 2024 +0100 Commit: Michael Stahl CommitDate: Mon Mar 4 11:06:01 2024 +0100 helpcompiler: suppress deprecation warning Commit 77cb90532d14d5035990d078977fce7b407c4fad removed these 2 lines but i don't want to check if the "I can find no difference in our output help dir with these removed" is true also in this older branch so suppress the warning instead. Change-Id: I35865e3accd018462ef4d65c8c11fb914f53ac38 diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index cdfb0fbc37cf..9cd0425c2e05 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -137,9 +137,15 @@ xmlDocPtr HelpCompiler::getSourceDocument(const fs::path ) if (!cur) { static std::string fsroot('\'' + src.toUTF8() + '\''); - +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4996) +#endif xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 1; +#if defined(_MSC_VER) +#pragma warning(pop) +#endif cur = xsltParseStylesheetFile(reinterpret_cast(resEmbStylesheet.native_file_string().c_str())); int nbparams = 0;
core.git: Branch 'libreoffice-24-2' - 2 commits - sw/qa sw/source writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf158597.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport21.cxx| 258 ++ sw/qa/extras/rtfimport/data/tdf153196.rtf | 114 + sw/qa/extras/rtfimport/rtfimport.cxx | 20 + sw/source/core/unocore/unomap1.cxx|1 sw/source/core/unocore/unoobj.cxx | 14 - sw/source/uibase/utlui/uitool.cxx |1 writerfilter/source/dmapper/DomainMapper_Impl.cxx | 12 - writerfilter/source/dmapper/DomainMapper_Impl.hxx |4 writerfilter/source/dmapper/PropertyMap.cxx | 34 ++ 10 files changed, 448 insertions(+), 10 deletions(-) New commits: commit 3fbc5a9dfebb94e893d98d3c00bcf0805b79ba37 Author: Michael Stahl AuthorDate: Tue Feb 20 11:54:13 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Mar 1 11:58:55 2024 +0100 tdf#153196 writerfilter: fix page style for even/odd section break This is a bit of a special case, where the first section starts with an evenPage break (\sbkeven), which causes a Left-only page style to be created. In completeCopyHeaderFooter(), the HeaderTextFirst and FooterTextFirst are copied from the source style to the Left-only page style, but then they also need to be deleted from the source style, because the Left-only page style is the one that is used for the first page of the section, and the source style is used for the subsequent pages. Additionally, when there is *only* a "first" header/footer, and no previous section has one to inherit, Word will not display a header/footer at all on subsequent pages; a PageStyle will always have a header/footer if it has a HeaderTextFirst/FooterTextFirst. In this case, delete the header/footer from the source style. Unfortunately exporting this doesn't work ideally, a spurious evenPage footer will be created, both due to the FooterShare being automatically reset for no obvious reason in ItemSetToPageDesc(), and setProperty("FooterIsShared", true) "stashing" the left footer since commit b802ab694a8a7357d4657f3e11b571144fa7c7bf. (presumably regression from commit b32881b6723072c8d1a652ea147d12e75766d504) Change-Id: Ie4f9c49605df690e9705e14777c0e4bcb0dfad8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163668 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 340f8ea4ae7f11b4d3a95499188a29fe801867cf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163673 Reviewed-by: Caolán McNamara diff --git a/sw/qa/extras/rtfimport/data/tdf153196.rtf b/sw/qa/extras/rtfimport/data/tdf153196.rtf new file mode 100644 index ..835cdeeb41b8 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf153196.rtf @@ -0,0 +1,114 @@ +{ tf1deflang1025nsinsicpg1250\uc1deff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1038\deflangfe1038 hemelang1038hemelangfe0 hemelangcs0{onttbl{0bidi roman charset0prq2{\*\panose 02020603050405020304}Times New Roman{\*alt Times New Roman};} +{0bidi romancharset0prq2{\*\panose 02020603050405020304}Times New Roman{\*alt Times New Roman};}{39bidi swisscharset0prq2{\*\panose 020f0502020204030204}Calibri;} +{lomajor31500bidi romancharset0prq2{\*\panose 02020603050405020304}Times New Roman{\*alt Times New Roman};}{dbmajor31501bidi romancharset0 prq2{\*\panose 02020603050405020304}Times New Roman{\*alt Times New Roman};} +{himajor31502bidi swisscharset0prq2{\*\panose 020f0302020204030204}Calibri Light;}{bimajor31503bidi romancharset0 prq2{\*\panose 02020603050405020304}Times New Roman{\*alt Times New Roman};} +{lominor31504bidi romancharset0prq2{\*\panose 02020603050405020304}Times New Roman{\*alt Times New Roman};}{dbminor31505bidi romancharset0 prq2{\*\panose 02020603050405020304}Times New Roman{\*alt Times New Roman};} +{himinor31506bidi swisscharset0prq2{\*\panose 020f0502020204030204}Calibri;}{biminor31507bidi romancharset0 prq2{\*\panose 02020603050405020304}Times New Roman{\*alt Times New Roman};} +{364bidi romancharset238prq2 Times New Roman CE{\*alt Times New Roman};}{365bidi romancharset204prq2 Times New Roman Cyr{\*alt Times New Roman};} +{367bidi romancharset161prq2 Times New Roman Greek{\*alt Times New Roman};}{368bidi romancharset162prq2 Times New Roman Tur{\*alt Times New Roman};} +{369bidi romancharset177prq2 Times New Roman (Hebrew){\*alt Times New Roman};}{370bidi romancharset178prq2 Times New Roman (Arabic){\*alt Times New Roman};} +{371bidi romancharset186prq2 Times New Roman Baltic{\*alt Times New Roman};}{372bidi romancharset163prq2 Times New Roman (Vietnamese){\*alt Times New Roman};} +{364bidi romancharset238prq2 Times New Roman CE{\*alt Times New Roman};}{365bidi romancharset204prq2 Times New
core.git: Branch 'libreoffice-24-2' - external/libxml2
external/libxml2/UnpackedTarball_libxml2.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7f939fee0ee20a63272267fbf6cecdb034e1bbd6 Author: Michael Stahl AuthorDate: Thu Feb 15 18:51:27 2024 +0100 Commit: Caolán McNamara CommitDate: Fri Mar 1 11:58:07 2024 +0100 tdf#159502 libxml2: apply Solaris ld patch only on Solaris Diverging from upstream by inventing a LIBXML2_GLOBAL_VARIABLES version should only be done if actually required. Change-Id: I1520ca5078dc24ffd83e927f9c857d625e71749b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163455 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit eebdda4e221327cae5a9177893394819ca510d5f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163490 Reviewed-by: Caolán McNamara diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk index d50d52cbeef8..489fb007572b 100644 --- a/external/libxml2/UnpackedTarball_libxml2.mk +++ b/external/libxml2/UnpackedTarball_libxml2.mk @@ -14,7 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2) $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2)) $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\ - external/libxml2/libxml2-global-symbols.patch \ + $(if $(filter SOLARIS,$(OS)),external/libxml2/libxml2-global-symbols.patch) \ external/libxml2/libxml2-vc10.patch \ external/libxml2/libxml2-XMLCALL-redefine.patch.0 \ $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
core.git: sw/source
sw/source/core/docnode/nodes.cxx |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit 25c2b4c4505060bbf207ed82036a63fee97a3689 Author: Michael Stahl AuthorDate: Wed Feb 28 15:18:31 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 1 10:29:25 2024 +0100 sw: deliver promised punishment via assert() Change-Id: I57c3ead622c3f64c5b2f007309987e60249b079b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164157 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 23729d1bedc0..a5c8e6a52bb2 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -1763,10 +1763,8 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange, return; // when inserting into the source range, nothing need to be done -OSL_ENSURE( () == this, -"aRg should use this node array" ); -OSL_ENSURE( () == (), - "Range across different nodes arrays? You deserve punishment!"); +assert(() == this); +assert(() == ()); if( () == () && rPos.GetIndex() >= aRg.aStart.GetIndex() && rPos.GetIndex() < aRg.aEnd.GetIndex() )
core.git: sw/source
sw/source/core/crsr/swcrsr.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit d0cd421833d85e8137688533dfc921e0add89dff Author: Michael Stahl AuthorDate: Wed Feb 28 12:59:12 2024 +0100 Commit: Michael Stahl CommitDate: Fri Mar 1 10:28:47 2024 +0100 remove accidentally committed debug comment Change-Id: If0e445ff6b8ea2308aa14e2b60f32914ca1b795f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164156 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 3f31fd037a5c..63b107f823d8 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -331,7 +331,6 @@ bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags) if( pNd->IsContentNode() && !dynamic_cast(this) ) { const SwContentFrame* pFrame = static_cast(pNd)->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ); -// ^ null if ( (SwCursorSelOverFlags::ChangePos & eFlags) //allowed to change position if it's a bad one && pFrame && pFrame->isFrameAreaDefinitionValid() && !pFrame->getFrameArea().Height() //a bad zero height position
core.git: Branch 'distro/collabora/co-24.04' - external/libxml2
external/libxml2/UnpackedTarball_libxml2.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0583ea73a8cdbdb2cdde0e41489588df7ab711ec Author: Michael Stahl AuthorDate: Thu Feb 15 18:51:27 2024 +0100 Commit: Andras Timar CommitDate: Thu Feb 29 17:14:25 2024 +0100 tdf#159502 libxml2: apply Solaris ld patch only on Solaris Diverging from upstream by inventing a LIBXML2_GLOBAL_VARIABLES version should only be done if actually required. Change-Id: I1520ca5078dc24ffd83e927f9c857d625e71749b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163455 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit eebdda4e221327cae5a9177893394819ca510d5f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164116 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk index d50d52cbeef8..489fb007572b 100644 --- a/external/libxml2/UnpackedTarball_libxml2.mk +++ b/external/libxml2/UnpackedTarball_libxml2.mk @@ -14,7 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2) $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2)) $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\ - external/libxml2/libxml2-global-symbols.patch \ + $(if $(filter SOLARIS,$(OS)),external/libxml2/libxml2-global-symbols.patch) \ external/libxml2/libxml2-vc10.patch \ external/libxml2/libxml2-XMLCALL-redefine.patch.0 \ $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
core.git: Branch 'distro/cib/libreoffice-6-4' - external/libxml2
external/libxml2/UnpackedTarball_libxml2.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 821f06726337c0108c5620498621f3baa7344c7e Author: Michael Stahl AuthorDate: Thu Feb 15 18:51:27 2024 +0100 Commit: Michael Stahl CommitDate: Wed Feb 28 11:03:19 2024 +0100 tdf#159502 libxml2: apply Solaris ld patch only on Solaris Diverging from upstream by inventing a LIBXML2_GLOBAL_VARIABLES version should only be done if actually required. Change-Id: I1520ca5078dc24ffd83e927f9c857d625e71749b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163455 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit eebdda4e221327cae5a9177893394819ca510d5f) diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk index d50d52cbeef8..489fb007572b 100644 --- a/external/libxml2/UnpackedTarball_libxml2.mk +++ b/external/libxml2/UnpackedTarball_libxml2.mk @@ -14,7 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2) $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2)) $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\ - external/libxml2/libxml2-global-symbols.patch \ + $(if $(filter SOLARIS,$(OS)),external/libxml2/libxml2-global-symbols.patch) \ external/libxml2/libxml2-vc10.patch \ external/libxml2/libxml2-XMLCALL-redefine.patch.0 \ $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
core.git: Branch 'libreoffice-7-6' - sw/inc sw/source
sw/inc/pagedesc.hxx|6 +-- sw/source/core/doc/docfmt.cxx | 12 +++--- sw/source/core/layout/pagedesc.cxx | 74 ++--- 3 files changed, 46 insertions(+), 46 deletions(-) New commits: commit 737f8ce51d47e030b4cd6d955ef24cfb71c185c2 Author: Michael Stahl AuthorDate: Fri Feb 23 17:18:04 2024 +0100 Commit: Xisco Fauli CommitDate: Tue Feb 27 14:43:54 2024 +0100 tdf#147731 sw: fix memory leak in SwDoc::CopyPageDesc() Commit 963de9feb37105560fde14b44d992e47f341bb5b "sw: fix issue with copying stashed frame format" fixed the actual bug here, but introduced a new memory leak. This causes an assert in CppunitTest_uiwriter3: cppunittester: svl/source/items/itempool.cxx:779: void SfxItemPool::Remove(const SfxPoolItem&): Assertion `rItem.GetRefCount() && "RefCount == 0, Remove impossible"' failed. The assert happens only when this is backported to the libreoffice-7-6 branch, because commit ab7c81f55621d7b0d1468c63305163016dd78837 "ITEM: Get away from classic 'poolable' Item flag" removed the assert. The problem is that a SwFormatFrameSize inside a footer SwFrameFormat is leaked 4 times, because 4 SwFrameFormats are leaked; the leak is that SwDoc::CopyPageDesc() creates a new pNewFormat, passed it to StashFrameFormat(), which copies it but doesn't free it. There is also a usage of std::shared_ptr here that is very questionable; SwFrameFormat should never be shared between different SwPageDesc. (regression from commit b802ab694a8a7357d4657f3e11b571144fa7c7bf) Change-Id: I44133bc5e6789a51ce064f1aa5ea8b325224365b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163854 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 5c4ae1b19c51dcd62dad8e1d3e8beb87a0311352) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163846 Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164012 diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 11bb347aa1fb..ddc7e659a5bb 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -151,9 +151,9 @@ class SW_DLLPUBLIC SwPageDesc final struct StashedPageDesc { -std::shared_ptr m_pStashedFirst; -std::shared_ptr m_pStashedLeft; -std::shared_ptr m_pStashedFirstLeft; +std::optional m_oStashedFirst; +std::optional m_oStashedLeft; +std::optional m_oStashedFirstLeft; }; mutable StashedPageDesc m_aStashedHeader; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 17eaf5418e61..9145c67ee539 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1556,21 +1556,21 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, { if (pStashedFormatSrc->GetDoc() != this) { -SwFrameFormat* pNewFormat = new SwFrameFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); +SwFrameFormat newFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); SfxItemSet aAttrSet(pStashedFormatSrc->GetAttrSet()); aAttrSet.ClearItem(RES_HEADER); aAttrSet.ClearItem(RES_FOOTER); -pNewFormat->DelDiffs( aAttrSet ); -pNewFormat->SetFormatAttr( aAttrSet ); +newFormat.DelDiffs(aAttrSet); +newFormat.SetFormatAttr(aAttrSet); if (bHeader) -CopyHeader(*pStashedFormatSrc, *pNewFormat); +CopyHeader(*pStashedFormatSrc, newFormat); else -CopyFooter(*pStashedFormatSrc, *pNewFormat); +CopyFooter(*pStashedFormatSrc, newFormat); -rDstDesc.StashFrameFormat(*pNewFormat, bHeader, bLeft, bFirst); +rDstDesc.StashFrameFormat(newFormat, bHeader, bLeft, bFirst); } else { diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index 40a7b5865766..5bc08706b80a 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -83,13 +83,13 @@ SwPageDesc::SwPageDesc( const SwPageDesc ) , m_FootnoteInfo( rCpy.GetFootnoteInfo() ) , m_pdList( nullptr ) { -m_aStashedHeader.m_pStashedFirst = rCpy.m_aStashedHeader.m_pStashedFirst; -m_aStashedHeader.m_pStashedLeft = rCpy.m_aStashedHeader.m_pStashedLeft; -m_aStashedHeader.m_pStashedFirstLeft = rCpy.m_aStashedHeader.m_pStashedFirstLeft; +m_aStashedHeader.m_oStashedFirst = rCpy.m_aStashedHeader.m_oStashedFirst; +
core.git: Branch 'distro/cib/libreoffice-6-4' - helpcompiler/source
helpcompiler/source/HelpCompiler.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 2838a9168bb1a321ce0d2297284e6c8cf529604c Author: Michael Stahl AuthorDate: Tue Feb 27 11:01:29 2024 +0100 Commit: Michael Stahl CommitDate: Tue Feb 27 11:03:49 2024 +0100 helpcompiler: suppress deprecation warning Commit 77cb90532d14d5035990d078977fce7b407c4fad removed these 2 lines but i don't want to check if the "I can find no difference in our output help dir with these removed" is true also in this older branch so suppress the warning instead. Change-Id: I35865e3accd018462ef4d65c8c11fb914f53ac38 diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index 0436d9efb461..98fd7f6eb55d 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -149,9 +149,15 @@ xmlDocPtr HelpCompiler::getSourceDocument(const fs::path ) if (!cur) { static std::string fsroot('\'' + src.toUTF8() + '\''); - +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4996) +#endif xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 1; +#if defined(_MSC_VER) +#pragma warning(pop) +#endif cur = xsltParseStylesheetFile(reinterpret_cast(resEmbStylesheet.native_file_string().c_str())); int nbparams = 0;
core.git: Branch 'libreoffice-24-2' - sw/inc sw/source
sw/inc/pagedesc.hxx|6 +-- sw/source/core/doc/docfmt.cxx | 12 +++--- sw/source/core/layout/pagedesc.cxx | 74 ++--- 3 files changed, 46 insertions(+), 46 deletions(-) New commits: commit a06a5905df7af2f6b69133e419dbfa99d232ab02 Author: Michael Stahl AuthorDate: Fri Feb 23 17:18:04 2024 +0100 Commit: Xisco Fauli CommitDate: Tue Feb 27 09:48:26 2024 +0100 tdf#147731 sw: fix memory leak in SwDoc::CopyPageDesc() Commit 963de9feb37105560fde14b44d992e47f341bb5b "sw: fix issue with copying stashed frame format" fixed the actual bug here, but introduced a new memory leak. This causes an assert in CppunitTest_uiwriter3: cppunittester: svl/source/items/itempool.cxx:779: void SfxItemPool::Remove(const SfxPoolItem&): Assertion `rItem.GetRefCount() && "RefCount == 0, Remove impossible"' failed. The assert happens only when this is backported to the libreoffice-7-6 branch, because commit ab7c81f55621d7b0d1468c63305163016dd78837 "ITEM: Get away from classic 'poolable' Item flag" removed the assert. The problem is that a SwFormatFrameSize inside a footer SwFrameFormat is leaked 4 times, because 4 SwFrameFormats are leaked; the leak is that SwDoc::CopyPageDesc() creates a new pNewFormat, passed it to StashFrameFormat(), which copies it but doesn't free it. There is also a usage of std::shared_ptr here that is very questionable; SwFrameFormat should never be shared between different SwPageDesc. (regression from commit b802ab694a8a7357d4657f3e11b571144fa7c7bf) Change-Id: I44133bc5e6789a51ce064f1aa5ea8b325224365b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163854 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 5c4ae1b19c51dcd62dad8e1d3e8beb87a0311352) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163846 Reviewed-by: Xisco Fauli diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 11bb347aa1fb..ddc7e659a5bb 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -151,9 +151,9 @@ class SW_DLLPUBLIC SwPageDesc final struct StashedPageDesc { -std::shared_ptr m_pStashedFirst; -std::shared_ptr m_pStashedLeft; -std::shared_ptr m_pStashedFirstLeft; +std::optional m_oStashedFirst; +std::optional m_oStashedLeft; +std::optional m_oStashedFirstLeft; }; mutable StashedPageDesc m_aStashedHeader; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index d6c943dbcdc8..1c696bebb6a0 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1553,21 +1553,21 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, { if (pStashedFormatSrc->GetDoc() != this) { -SwFrameFormat* pNewFormat = new SwFrameFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); +SwFrameFormat newFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); SfxItemSet aAttrSet(pStashedFormatSrc->GetAttrSet()); aAttrSet.ClearItem(RES_HEADER); aAttrSet.ClearItem(RES_FOOTER); -pNewFormat->DelDiffs( aAttrSet ); -pNewFormat->SetFormatAttr( aAttrSet ); +newFormat.DelDiffs(aAttrSet); +newFormat.SetFormatAttr(aAttrSet); if (bHeader) -CopyHeader(*pStashedFormatSrc, *pNewFormat); +CopyHeader(*pStashedFormatSrc, newFormat); else -CopyFooter(*pStashedFormatSrc, *pNewFormat); +CopyFooter(*pStashedFormatSrc, newFormat); -rDstDesc.StashFrameFormat(*pNewFormat, bHeader, bLeft, bFirst); +rDstDesc.StashFrameFormat(newFormat, bHeader, bLeft, bFirst); } else { diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index 2b7882332789..f9679bb2a8e7 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -83,13 +83,13 @@ SwPageDesc::SwPageDesc( const SwPageDesc ) , m_FootnoteInfo( rCpy.GetFootnoteInfo() ) , m_pdList( nullptr ) { -m_aStashedHeader.m_pStashedFirst = rCpy.m_aStashedHeader.m_pStashedFirst; -m_aStashedHeader.m_pStashedLeft = rCpy.m_aStashedHeader.m_pStashedLeft; -m_aStashedHeader.m_pStashedFirstLeft = rCpy.m_aStashedHeader.m_pStashedFirstLeft; +m_aStashedHeader.m_oStashedFirst = rCpy.m_aStashedHeader.m_oStashedFirst; +m_aStashedHeader.m_oStashedLeft = rCpy.m_aStashedHeader.m_oStashedLeft; +m_aStashedHeader.m_oStashedFirstLeft =
core.git: Branch 'distro/allotropia/zeta-7-4' - 3 commits - drawinglayer/source filter/source helpcompiler/source include/xmloff sax/source sc/source sw/inc sw/source unoxml/source xmloff/source xmlse
drawinglayer/source/tools/primitive2dxmldump.cxx |1 filter/source/xsltfilter/LibXSLTTransformer.cxx |2 helpcompiler/source/HelpLinker.cxx |4 + include/xmloff/xmltoken.hxx |2 sax/source/fastparser/fastparser.cxx |2 sc/source/core/tool/interpr7.cxx |1 sc/source/filter/xml/XMLExportDataPilot.cxx |2 sc/source/filter/xml/XMLExportDatabaseRanges.cxx |2 sc/source/filter/xml/xmlfilti.cxx|6 - sw/inc/pagedesc.hxx |8 +- sw/source/core/doc/docfmt.cxx| 33 + sw/source/core/layout/pagedesc.cxx | 76 +++ unoxml/source/dom/attr.cxx |1 unoxml/source/dom/document.cxx |1 unoxml/source/dom/documentbuilder.cxx|1 unoxml/source/dom/entity.cxx |1 unoxml/source/xpath/xpathapi.cxx |7 +- xmloff/source/core/xmltoken.cxx |2 xmloff/source/draw/sdpropls.cxx |2 xmloff/source/style/PageMasterStyleMap.cxx |6 - xmloff/source/table/XMLTableExport.cxx |2 xmlsecurity/inc/xmlsec-wrapper.h |1 xmlsecurity/inc/xmlsec/saxhelper.hxx |1 23 files changed, 105 insertions(+), 59 deletions(-) New commits: commit 3b737ae67d26387e17d497a88206aafc53a182ce Author: Michael Stahl AuthorDate: Fri Feb 23 17:18:04 2024 +0100 Commit: Michael Stahl CommitDate: Mon Feb 26 16:20:30 2024 +0100 tdf#147731 sw: fix memory leak in SwDoc::CopyPageDesc() Commit 963de9feb37105560fde14b44d992e47f341bb5b "sw: fix issue with copying stashed frame format" fixed the actual bug here, but introduced a new memory leak. This causes an assert in CppunitTest_uiwriter3: cppunittester: svl/source/items/itempool.cxx:779: void SfxItemPool::Remove(const SfxPoolItem&): Assertion `rItem.GetRefCount() && "RefCount == 0, Remove impossible"' failed. The assert happens only when this is backported to the libreoffice-7-6 branch, because commit ab7c81f55621d7b0d1468c63305163016dd78837 "ITEM: Get away from classic 'poolable' Item flag" removed the assert. The problem is that a SwFormatFrameSize inside a footer SwFrameFormat is leaked 4 times, because 4 SwFrameFormats are leaked; the leak is that SwDoc::CopyPageDesc() creates a new pNewFormat, passed it to StashFrameFormat(), which copies it but doesn't free it. There is also a usage of std::shared_ptr here that is very questionable; SwFrameFormat should never be shared between different SwPageDesc. (regression from commit b802ab694a8a7357d4657f3e11b571144fa7c7bf) Change-Id: I44133bc5e6789a51ce064f1aa5ea8b325224365b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163854 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 5c4ae1b19c51dcd62dad8e1d3e8beb87a0311352) (cherry picked from commit 9179d7051872be45471b133caf44fec423144fce) diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 11bb347aa1fb..ddc7e659a5bb 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -151,9 +151,9 @@ class SW_DLLPUBLIC SwPageDesc final struct StashedPageDesc { -std::shared_ptr m_pStashedFirst; -std::shared_ptr m_pStashedLeft; -std::shared_ptr m_pStashedFirstLeft; +std::optional m_oStashedFirst; +std::optional m_oStashedLeft; +std::optional m_oStashedFirstLeft; }; mutable StashedPageDesc m_aStashedHeader; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index d9af7d346a89..3bedfd125219 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1558,21 +1558,21 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, { if (pStashedFormatSrc->GetDoc() != this) { -SwFrameFormat* pNewFormat = new SwFrameFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); +SwFrameFormat newFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); SfxItemSet aAttrSet(pStashedFormatSrc->GetAttrSet()); aAttrSet.ClearItem(RES_HEADER); aAttrSet.ClearItem(RES_FOOTER); -pNewFormat->DelDiffs( aAttrSet ); -pNewFormat->SetFormatAttr( aAttrSet ); +newFormat.DelDiffs(aAttrSet); +newFormat.SetFormatAttr(aAttrSet); if (bHeader) -CopyHeader(*pStashedFormatSrc, *pNewFormat); +CopyHeader(*pStashedFormatSrc, newFormat); else -
core.git: Branch 'distro/cib/libreoffice-6-4' - sw/inc sw/qa sw/source
sw/inc/crsrsh.hxx| 14 sw/inc/doc.hxx |1 sw/inc/undobj.hxx| 12 sw/qa/extras/odfimport/odfimport.cxx |4 sw/qa/extras/uiwriter/data/table-at-end-of-cell.fodt | 219 sw/qa/extras/uiwriter/uiwriter.cxx | 22 - sw/qa/extras/uiwriter/uiwriter2.cxx | 18 - sw/source/core/crsr/crsrsh.cxx | 321 +-- sw/source/core/docnode/ndtbl.cxx | 287 +++- sw/source/core/edit/eddel.cxx| 36 -- sw/source/core/edit/edglss.cxx | 14 sw/source/core/undo/undobj.cxx | 22 - sw/source/core/undo/unins.cxx|4 sw/source/core/undo/untblk.cxx |6 sw/source/uibase/wrtsh/move.cxx | 46 -- sw/source/uibase/wrtsh/select.cxx| 36 -- 16 files changed, 227 insertions(+), 835 deletions(-) New commits: commit 6eb71b1778d8bc44ec642f3e61096350e4c868dc Author: Michael Stahl AuthorDate: Mon Feb 26 13:58:18 2024 +0100 Commit: Michael Stahl CommitDate: Mon Feb 26 14:58:47 2024 +0100 sw: revert Select All improvements Revert "tdf#157129 sw: fix wrong cursor position after paste" This reverts commit 68310c73c1755d2e8a4d6f80084ef3d6b7a1d10e. Revert "tdf#156546 sw: fix infinite loop in SwUndoInsert::RedoImpl()" This reverts commit e43f09bec7bc1d7f367a9b6f6a8ec001a102645d. Revert "tdf#156267 sw: remove DdeBookmarks in SwDoc::DelTable()" This reverts commit 20c272631877d2c77bd0b14fee41acfb056aade7. Revert "tdf#155685 sw: ExtendedSelectAll with tables, group the Undo objects" This reverts commit 1f1078e0cbcc5879128d20e0748b0dd1583a471e. Revert "tdf#155685 sw: fix another ExtendedSelectAll Redo crash w table at end" This reverts commit 15e494724ab728962f133eb8d81c5fcd475b9197. Revert "cool#6580 sw: fix infinite loop when changing document language" This reverts commit a7a1f426374f865ef31f5c5162eac4c1c11efc6c. Revert "tdf#155685 sw: fix crash on undo of ExtendedSelectAll with table at end" This reverts commit a2b206ec80119000c581aa954632a1a9839408ba. Revert "tdf#155346 sw: fix crash from changing modal mode" This reverts commit 86d9b8f6f353f5d268f67f2c33681b8fa4f46ea7. Revert "tdf#154877 sw: generalise ExtendedSelectAll()" This reverts commit 9667e5ffd18d6167344e102b89a393bc981644ec. Revert "sw: SelectAll should copy section before table at start of document" This reverts commit 53c9990152ef19b0a8d07fc514cef0a73496514c. diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 26e6895e88cd..a0205ffe4d52 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -326,7 +326,7 @@ public: // only for usage in special cases allowed! void ExtendedSelectAll(bool bFootnotes = true); /// If ExtendedSelectAll() was called and selection didn't change since then. -::std::optional<::std::pair>> ExtendedSelectedAll() const; +bool ExtendedSelectedAll(); enum class StartsWith { None, Table, HiddenPara }; /// If document body starts with a table or starts/ends with hidden paragraph. StartsWith StartsWith_(); @@ -586,11 +586,8 @@ public: // fields etc. OUString GetSelText() const; -/// Check if Point of current cursor is placed within a table. -const SwTableNode* IsCursorInTable() const; -bool MoveOutOfTable(); -bool TrySelectOuterTable(); -bool MoveStartText(); +// Check of SPoint or Mark of current cursor are placed within a table. +inline const SwTableNode* IsCursorInTable() const; bool IsCursorInFootnote() const; @@ -904,6 +901,11 @@ inline bool SwCursorShell::IsMultiSelection() const return m_pCurrentCursor->GetNext() != m_pCurrentCursor; } +inline const SwTableNode* SwCursorShell::IsCursorInTable() const +{ +return m_pCurrentCursor->GetNode().FindTableNode(); +} + inline bool SwCursorShell::IsCursorPtAtEnd() const { return m_pCurrentCursor->End() == m_pCurrentCursor->GetPoint(); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 66ec563e7a14..83651fc8fcb2 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1189,7 +1189,6 @@ public: sal_uInt16 nCnt = 1, bool bBehind = true ); // Delete Columns/Rows in table. -void DelTable(SwTableNode * pTable); bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false ); void DeleteRow( const SwCursor& rCursor ); void DeleteCol( const SwCursor& rCursor ); diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 42b14f7859e5..71d9c511591d 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -21,7 +21,6 @@ #include #include -#include
core.git: Branch 'feature/cib_contract49' - sw/inc sw/source
sw/inc/pagedesc.hxx|6 +-- sw/source/core/doc/docfmt.cxx | 12 +++--- sw/source/core/layout/pagedesc.cxx | 74 ++--- 3 files changed, 46 insertions(+), 46 deletions(-) New commits: commit 9179d7051872be45471b133caf44fec423144fce Author: Michael Stahl AuthorDate: Fri Feb 23 17:18:04 2024 +0100 Commit: Michael Stahl CommitDate: Mon Feb 26 10:33:22 2024 +0100 tdf#147731 sw: fix memory leak in SwDoc::CopyPageDesc() Commit 963de9feb37105560fde14b44d992e47f341bb5b "sw: fix issue with copying stashed frame format" fixed the actual bug here, but introduced a new memory leak. This causes an assert in CppunitTest_uiwriter3: cppunittester: svl/source/items/itempool.cxx:779: void SfxItemPool::Remove(const SfxPoolItem&): Assertion `rItem.GetRefCount() && "RefCount == 0, Remove impossible"' failed. The assert happens only when this is backported to the libreoffice-7-6 branch, because commit ab7c81f55621d7b0d1468c63305163016dd78837 "ITEM: Get away from classic 'poolable' Item flag" removed the assert. The problem is that a SwFormatFrameSize inside a footer SwFrameFormat is leaked 4 times, because 4 SwFrameFormats are leaked; the leak is that SwDoc::CopyPageDesc() creates a new pNewFormat, passed it to StashFrameFormat(), which copies it but doesn't free it. There is also a usage of std::shared_ptr here that is very questionable; SwFrameFormat should never be shared between different SwPageDesc. (regression from commit b802ab694a8a7357d4657f3e11b571144fa7c7bf) Change-Id: I44133bc5e6789a51ce064f1aa5ea8b325224365b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163854 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 5c4ae1b19c51dcd62dad8e1d3e8beb87a0311352) diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 11bb347aa1fb..ddc7e659a5bb 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -151,9 +151,9 @@ class SW_DLLPUBLIC SwPageDesc final struct StashedPageDesc { -std::shared_ptr m_pStashedFirst; -std::shared_ptr m_pStashedLeft; -std::shared_ptr m_pStashedFirstLeft; +std::optional m_oStashedFirst; +std::optional m_oStashedLeft; +std::optional m_oStashedFirstLeft; }; mutable StashedPageDesc m_aStashedHeader; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 17eaf5418e61..9145c67ee539 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1556,21 +1556,21 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, { if (pStashedFormatSrc->GetDoc() != this) { -SwFrameFormat* pNewFormat = new SwFrameFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); +SwFrameFormat newFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); SfxItemSet aAttrSet(pStashedFormatSrc->GetAttrSet()); aAttrSet.ClearItem(RES_HEADER); aAttrSet.ClearItem(RES_FOOTER); -pNewFormat->DelDiffs( aAttrSet ); -pNewFormat->SetFormatAttr( aAttrSet ); +newFormat.DelDiffs(aAttrSet); +newFormat.SetFormatAttr(aAttrSet); if (bHeader) -CopyHeader(*pStashedFormatSrc, *pNewFormat); +CopyHeader(*pStashedFormatSrc, newFormat); else -CopyFooter(*pStashedFormatSrc, *pNewFormat); +CopyFooter(*pStashedFormatSrc, newFormat); -rDstDesc.StashFrameFormat(*pNewFormat, bHeader, bLeft, bFirst); +rDstDesc.StashFrameFormat(newFormat, bHeader, bLeft, bFirst); } else { diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index 40a7b5865766..5bc08706b80a 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -83,13 +83,13 @@ SwPageDesc::SwPageDesc( const SwPageDesc ) , m_FootnoteInfo( rCpy.GetFootnoteInfo() ) , m_pdList( nullptr ) { -m_aStashedHeader.m_pStashedFirst = rCpy.m_aStashedHeader.m_pStashedFirst; -m_aStashedHeader.m_pStashedLeft = rCpy.m_aStashedHeader.m_pStashedLeft; -m_aStashedHeader.m_pStashedFirstLeft = rCpy.m_aStashedHeader.m_pStashedFirstLeft; +m_aStashedHeader.m_oStashedFirst = rCpy.m_aStashedHeader.m_oStashedFirst; +m_aStashedHeader.m_oStashedLeft = rCpy.m_aStashedHeader.m_oStashedLeft; +m_aStashedHeader.m_oStashedFirstLeft = rCpy.m_aStashedHeader.m_oStashedFirstLeft; -m_aStashedFooter.m_pStashedFirst =
core.git: Branch 'libreoffice-24-2-1' - 2 commits - download.lst external/libxml2 filter/source helpcompiler/source xmlsecurity/source
download.lst| 14 +++--- external/libxml2/ExternalPackage_libxml2.mk |2 +- external/libxml2/libxml2-global-symbols.patch |8 +++- filter/source/xsltfilter/LibXSLTTransformer.cxx | 16 helpcompiler/source/HelpCompiler.cxx| 14 ++ xmlsecurity/source/xmlsec/saxhelper.cxx | 15 ++- 6 files changed, 59 insertions(+), 10 deletions(-) New commits: commit 9b82cdec8ea09e56f2b2189b73fbdd1c803f8210 Author: Michael Stahl AuthorDate: Thu Feb 22 11:57:37 2024 +0100 Commit: Christian Lohmaier CommitDate: Sun Feb 25 14:34:07 2024 +0100 libxml2: upgrade to release 2.12.5 Fixes CVE-2024-25062 Change-Id: I0e98fd919328e9633a602c4872de0b06eb972cc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163734 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 4c3ee61e3eda0cbfd812443f80af89aa3a24ac73) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163754 Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163790 Reviewed-by: Caolán McNamara Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/download.lst b/download.lst index b06f1c11e58f..b878f24e8068 100644 --- a/download.lst +++ b/download.lst @@ -424,8 +424,8 @@ XMLSEC_TARBALL := xmlsec1-1.3.2.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -LIBXML_SHA256SUM := 8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa -LIBXML_VERSION_MICRO := 3 +LIBXML_SHA256SUM := a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21 +LIBXML_VERSION_MICRO := 5 LIBXML_TARBALL := libxml2-2.12.$(LIBXML_VERSION_MICRO).tar.xz # three static lines # so that git cherry-pick commit cd074fc3d883b148418235009ef721b35b24deb9 Author: Caolán McNamara AuthorDate: Wed Jan 3 20:45:14 2024 + Commit: Christian Lohmaier CommitDate: Sun Feb 25 14:33:53 2024 +0100 upgrade libxml2, libxslt & liblangtag what I'm really after is some vexating not-reproducible oss-fuzz msan warnings when using libxml2 in the fodt2pdf fuzzer. So lets upgrade libxml2 to the latest, which requires bumping libxslt, and then requires a newer liblangtag because of no longer implicit includes that it depended on. xmlKeepBlanksDefaultValue and xmlSubstituteEntitiesDefault are deprecated, we should get around to updating those uses Change-Id: I8fda0dffda0a7ea65407d246a3121875cb8ad4a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161598 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 6875c975f80d8b813b1829a530162869a1e2d92e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163752 Reviewed-by: Michael Stahl Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163789 Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/download.lst b/download.lst index 20e5b5c417ee..b06f1c11e58f 100644 --- a/download.lst +++ b/download.lst @@ -399,8 +399,8 @@ LIBGPGERROR_TARBALL := libgpg-error-1.47.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -LIBLANGTAG_SHA256SUM := 1f12a20a02ec3a8d22e54dedb8b683a43c9c160bda1ba337bf1060607ae733bd -LIBLANGTAG_TARBALL := liblangtag-0.6.3.tar.bz2 +LIBLANGTAG_SHA256SUM := 5ed6bcd4ae3f3c05c912e62f216cd1a44123846147f729a49fb5668da51e030e +LIBLANGTAG_TARBALL := liblangtag-0.6.7.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts @@ -424,14 +424,14 @@ XMLSEC_TARBALL := xmlsec1-1.3.2.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -LIBXML_SHA256SUM := 737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7 -LIBXML_VERSION_MICRO := 4 -LIBXML_TARBALL := libxml2-2.11.$(LIBXML_VERSION_MICRO).tar.xz +LIBXML_SHA256SUM := 8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa +LIBXML_VERSION_MICRO := 3 +LIBXML_TARBALL := libxml2-2.12.$(LIBXML_VERSION_MICRO).tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -LIBXSLT_SHA256SUM := 1f32450425819a09acaff2ab7a5a7f8a2ec7956e505d7beeb45e843d0e1ecab1 -LIBXSLT_VERSION_MICRO := 38 +LIBXSLT_SHA256SUM := 2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0 +LIBXSLT_VERSION_MICRO := 39 LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.xz # three static lines # so that git cherry-pick diff --git a/external/libxml2/ExternalPackage_libxml2.mk b/external/libxml2/ExternalPackage_libxml2.mk index 3c399970cd5b..799044575f9a 100644 --- a/external/libxml2/ExternalPackage_libxml2.mk +++ b/external/libxml2/ExternalPackage_libxml2.mk @@ -21,7 +21,7 @@ else # COM=MSC $(eval $(call
core.git: Branch 'libreoffice-24-2-1' - comphelper/source package/source sc/CppunitTest_sc_filters_test.mk
comphelper/source/misc/storagehelper.cxx |1 + package/source/zippackage/ZipPackage.cxx |5 + sc/CppunitTest_sc_filters_test.mk|1 + 3 files changed, 7 insertions(+) New commits: commit 96861294836862f8a051a9d6dd390ab15c0460e4 Author: Michael Stahl AuthorDate: Wed Feb 21 18:01:41 2024 +0100 Commit: Christian Lohmaier CommitDate: Sun Feb 25 14:32:28 2024 +0100 tdf#159519 comphelper,package: do not store document without SHA256 The problem is that on Windows 7 the password-encrypted documents are stored unencrypted, without any error message. This is due to defensive programming in OStorageHelper::CreatePackageEncryptionData(), which happily continues if creating the SHA256 hash fails, which is the one required for storing anything newer than ODF 1.1. Also, the poorly named ZipPackage::GetEncryptionKey() should check for consistency, the expectation is that either there's no encryption key (empty sequence), or the expected one is in the sequence. Creating the SHA256 uses the crypto::NSSInitializer component, which is in xsec_xmlsec.dll, which is linked to libxmlsec-mscng.dll, which is linked to Win32 bcrypt.dll, which doesn't have BCryptKeyDerivation on Windows 7; to reproduce elsewhere, rm instdir/program/libxsec_xmlsec.so (regression from commit 26bf26272bf525b59b4a4ce18b3ce14c1febfd7b and (due to revert) commit bfd479abf0d1d8ce36c3b0dcc6c824216f88a95b) Change-Id: I0b22e20f6d4d0b1a12ed7d99fac7b5243910f9ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163708 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 58c31ded0264103769595a1b25739b0e8df571cd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163750 Reviewed-by: Xisco Fauli (cherry picked from commit 003f2ac9fcac9be5156adf280beaf4e2aa499ea5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163762 Reviewed-by: Ilmari Lauhakangas Reviewed-by: Hossein Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index c190d099ea00..1d504cb91725 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -390,6 +390,7 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData( catch ( uno::Exception& ) { TOOLS_WARN_EXCEPTION("comphelper", "Can not create SHA256 digest!" ); +throw; // tdf#159519 DO NOT RETURN SUCCESS } // MS_1252 encoding was used for SO60 document format password encoding, diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index c4de219f80de..0f3fa6ff7dba 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -1728,6 +1728,11 @@ uno::Sequence< sal_Int8 > ZipPackage::GetEncryptionKey() for ( const auto& rKey : std::as_const(m_aStorageEncryptionKeys) ) if ( rKey.Name == aNameToFind ) rKey.Value >>= aResult; + +if (!aResult.hasElements() && m_aStorageEncryptionKeys.hasElements()) +{ // tdf#159519 sanity check +throw uno::RuntimeException(THROW_WHERE "Expected key is missing!"); +} } else aResult = m_aEncryptionKey; diff --git a/sc/CppunitTest_sc_filters_test.mk b/sc/CppunitTest_sc_filters_test.mk index 67ef60664081..3dae5136e1e3 100644 --- a/sc/CppunitTest_sc_filters_test.mk +++ b/sc/CppunitTest_sc_filters_test.mk @@ -118,6 +118,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_filters_test,\ uui/util/uui \ vcl/vcl.common \ xmloff/util/xo \ +xmlsecurity/util/xsec_xmlsec \ )) $(eval $(call gb_CppunitTest_use_configuration,sc_filters_test))
core.git: Branch 'distro/collabora/co-24.04' - sw/inc sw/source
sw/inc/pagedesc.hxx|6 +-- sw/source/core/doc/docfmt.cxx | 12 +++--- sw/source/core/layout/pagedesc.cxx | 74 ++--- 3 files changed, 46 insertions(+), 46 deletions(-) New commits: commit 0b1bbcb8fb64e6db5ea3a0ff4c5739a5f1d19c07 Author: Michael Stahl AuthorDate: Fri Feb 23 17:18:04 2024 +0100 Commit: Tomaž Vajngerl CommitDate: Sat Feb 24 15:42:55 2024 +0100 tdf#147731 sw: fix memory leak in SwDoc::CopyPageDesc() Commit 963de9feb37105560fde14b44d992e47f341bb5b "sw: fix issue with copying stashed frame format" fixed the actual bug here, but introduced a new memory leak. This causes an assert in CppunitTest_uiwriter3: cppunittester: svl/source/items/itempool.cxx:779: void SfxItemPool::Remove(const SfxPoolItem&): Assertion `rItem.GetRefCount() && "RefCount == 0, Remove impossible"' failed. The assert happens only when this is backported to the libreoffice-7-6 branch, because commit ab7c81f55621d7b0d1468c63305163016dd78837 "ITEM: Get away from classic 'poolable' Item flag" removed the assert. The problem is that a SwFormatFrameSize inside a footer SwFrameFormat is leaked 4 times, because 4 SwFrameFormats are leaked; the leak is that SwDoc::CopyPageDesc() creates a new pNewFormat, passed it to StashFrameFormat(), which copies it but doesn't free it. There is also a usage of std::shared_ptr here that is very questionable; SwFrameFormat should never be shared between different SwPageDesc. (regression from commit b802ab694a8a7357d4657f3e11b571144fa7c7bf) Change-Id: I44133bc5e6789a51ce064f1aa5ea8b325224365b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163854 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 5c4ae1b19c51dcd62dad8e1d3e8beb87a0311352) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163883 Tested-by: Jenkins CollaboraOffice diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 11bb347aa1fb..ddc7e659a5bb 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -151,9 +151,9 @@ class SW_DLLPUBLIC SwPageDesc final struct StashedPageDesc { -std::shared_ptr m_pStashedFirst; -std::shared_ptr m_pStashedLeft; -std::shared_ptr m_pStashedFirstLeft; +std::optional m_oStashedFirst; +std::optional m_oStashedLeft; +std::optional m_oStashedFirstLeft; }; mutable StashedPageDesc m_aStashedHeader; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index d6c943dbcdc8..1c696bebb6a0 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1553,21 +1553,21 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, { if (pStashedFormatSrc->GetDoc() != this) { -SwFrameFormat* pNewFormat = new SwFrameFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); +SwFrameFormat newFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); SfxItemSet aAttrSet(pStashedFormatSrc->GetAttrSet()); aAttrSet.ClearItem(RES_HEADER); aAttrSet.ClearItem(RES_FOOTER); -pNewFormat->DelDiffs( aAttrSet ); -pNewFormat->SetFormatAttr( aAttrSet ); +newFormat.DelDiffs(aAttrSet); +newFormat.SetFormatAttr(aAttrSet); if (bHeader) -CopyHeader(*pStashedFormatSrc, *pNewFormat); +CopyHeader(*pStashedFormatSrc, newFormat); else -CopyFooter(*pStashedFormatSrc, *pNewFormat); +CopyFooter(*pStashedFormatSrc, newFormat); -rDstDesc.StashFrameFormat(*pNewFormat, bHeader, bLeft, bFirst); +rDstDesc.StashFrameFormat(newFormat, bHeader, bLeft, bFirst); } else { diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index 2b7882332789..f9679bb2a8e7 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -83,13 +83,13 @@ SwPageDesc::SwPageDesc( const SwPageDesc ) , m_FootnoteInfo( rCpy.GetFootnoteInfo() ) , m_pdList( nullptr ) { -m_aStashedHeader.m_pStashedFirst = rCpy.m_aStashedHeader.m_pStashedFirst; -m_aStashedHeader.m_pStashedLeft = rCpy.m_aStashedHeader.m_pStashedLeft; -m_aStashedHeader.m_pStashedFirstLeft = rCpy.m_aStashedHeader.m_pStashedFirstLeft; +m_aStashedHeader.m_oStashedFirst = rCpy.m_aStashedHeader.m_oStashedFirst; +m_aStashedHeader.m_oStashedLeft = rCpy.m_aStashedHeader.m_oStashedLeft; +
core.git: sw/inc sw/source
sw/inc/pagedesc.hxx|6 +-- sw/source/core/doc/docfmt.cxx | 12 +++--- sw/source/core/layout/pagedesc.cxx | 74 ++--- 3 files changed, 46 insertions(+), 46 deletions(-) New commits: commit 5c4ae1b19c51dcd62dad8e1d3e8beb87a0311352 Author: Michael Stahl AuthorDate: Fri Feb 23 17:18:04 2024 +0100 Commit: Tomaž Vajngerl CommitDate: Sat Feb 24 09:44:41 2024 +0100 tdf#147731 sw: fix memory leak in SwDoc::CopyPageDesc() Commit 963de9feb37105560fde14b44d992e47f341bb5b "sw: fix issue with copying stashed frame format" fixed the actual bug here, but introduced a new memory leak. This causes an assert in CppunitTest_uiwriter3: cppunittester: svl/source/items/itempool.cxx:779: void SfxItemPool::Remove(const SfxPoolItem&): Assertion `rItem.GetRefCount() && "RefCount == 0, Remove impossible"' failed. The assert happens only when this is backported to the libreoffice-7-6 branch, because commit ab7c81f55621d7b0d1468c63305163016dd78837 "ITEM: Get away from classic 'poolable' Item flag" removed the assert. The problem is that a SwFormatFrameSize inside a footer SwFrameFormat is leaked 4 times, because 4 SwFrameFormats are leaked; the leak is that SwDoc::CopyPageDesc() creates a new pNewFormat, passed it to StashFrameFormat(), which copies it but doesn't free it. There is also a usage of std::shared_ptr here that is very questionable; SwFrameFormat should never be shared between different SwPageDesc. (regression from commit b802ab694a8a7357d4657f3e11b571144fa7c7bf) Change-Id: I44133bc5e6789a51ce064f1aa5ea8b325224365b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163854 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 136117114b30..3ec919ce3c83 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -151,9 +151,9 @@ class SW_DLLPUBLIC SwPageDesc final struct StashedPageDesc { -std::shared_ptr m_pStashedFirst; -std::shared_ptr m_pStashedLeft; -std::shared_ptr m_pStashedFirstLeft; +std::optional m_oStashedFirst; +std::optional m_oStashedLeft; +std::optional m_oStashedFirstLeft; }; mutable StashedPageDesc m_aStashedHeader; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 19974139d125..66a61ebb02c6 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1559,21 +1559,21 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, { if (pStashedFormatSrc->GetDoc() != this) { -SwFrameFormat* pNewFormat = new SwFrameFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); +SwFrameFormat newFormat(GetAttrPool(), "CopyDesc", GetDfltFrameFormat()); SfxItemSet aAttrSet(pStashedFormatSrc->GetAttrSet()); aAttrSet.ClearItem(RES_HEADER); aAttrSet.ClearItem(RES_FOOTER); -pNewFormat->DelDiffs( aAttrSet ); -pNewFormat->SetFormatAttr( aAttrSet ); +newFormat.DelDiffs(aAttrSet); +newFormat.SetFormatAttr(aAttrSet); if (bHeader) -CopyHeader(*pStashedFormatSrc, *pNewFormat); +CopyHeader(*pStashedFormatSrc, newFormat); else -CopyFooter(*pStashedFormatSrc, *pNewFormat); +CopyFooter(*pStashedFormatSrc, newFormat); -rDstDesc.StashFrameFormat(*pNewFormat, bHeader, bLeft, bFirst); +rDstDesc.StashFrameFormat(newFormat, bHeader, bLeft, bFirst); } else { diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index 2b7882332789..f9679bb2a8e7 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -83,13 +83,13 @@ SwPageDesc::SwPageDesc( const SwPageDesc ) , m_FootnoteInfo( rCpy.GetFootnoteInfo() ) , m_pdList( nullptr ) { -m_aStashedHeader.m_pStashedFirst = rCpy.m_aStashedHeader.m_pStashedFirst; -m_aStashedHeader.m_pStashedLeft = rCpy.m_aStashedHeader.m_pStashedLeft; -m_aStashedHeader.m_pStashedFirstLeft = rCpy.m_aStashedHeader.m_pStashedFirstLeft; +m_aStashedHeader.m_oStashedFirst = rCpy.m_aStashedHeader.m_oStashedFirst; +m_aStashedHeader.m_oStashedLeft = rCpy.m_aStashedHeader.m_oStashedLeft; +m_aStashedHeader.m_oStashedFirstLeft = rCpy.m_aStashedHeader.m_oStashedFirstLeft; -m_aStashedFooter.m_pStashedFirst = rCpy.m_aStashedFooter.m_pStashedFirst; -m_aStashedFooter.m_pStashedLeft =
core.git: Branch 'libreoffice-7-6' - download.lst
download.lst |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit d0924d74add31eba6bcf436e7f8bc6f5f6fb2fd6 Author: Michael Stahl AuthorDate: Thu Feb 22 11:57:37 2024 +0100 Commit: Xisco Fauli CommitDate: Thu Feb 22 21:19:56 2024 +0100 libxml2: upgrade to release 2.12.5 Fixes CVE-2024-25062 Change-Id: I0e98fd919328e9633a602c4872de0b06eb972cc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163734 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 4c3ee61e3eda0cbfd812443f80af89aa3a24ac73) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163754 Reviewed-by: Xisco Fauli diff --git a/download.lst b/download.lst index 5d76eb5783a7..5743c6c951a3 100644 --- a/download.lst +++ b/download.lst @@ -344,8 +344,8 @@ XMLSEC_TARBALL := xmlsec1-1.2.37.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -LIBXML_SHA256SUM := 8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa -LIBXML_VERSION_MICRO := 3 +LIBXML_SHA256SUM := a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21 +LIBXML_VERSION_MICRO := 5 LIBXML_TARBALL := libxml2-2.12.$(LIBXML_VERSION_MICRO).tar.xz # three static lines # so that git cherry-pick
core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - 9 commits - distro-configs/LibreOfficeLinux.conf download.lst external/liblangtag external/libxml2 external/libxslt external/redland filter/so
distro-configs/LibreOfficeLinux.conf |1 download.lst | 14 +- external/liblangtag/UnpackedTarball_liblangtag.mk |2 - external/liblangtag/Wformat-overflow.patch| 17 external/liblangtag/langtag-valencia.patch.0 | 29 -- external/libxml2/ExternalPackage_libxml2.mk |2 - external/libxml2/ExternalProject_libxml2.mk |4 +-- external/libxml2/UnpackedTarball_libxml2.mk |1 external/libxml2/libxml2-XMLCALL-redefine.patch.0 | 11 external/libxml2/libxml2-global-symbols.patch | 14 +- external/libxml2/libxml2-icu-sym.patch.0 |2 - external/libxml2/libxml2-icu.patch.0 |2 - external/libxslt/ExternalPackage_libxslt.mk |2 - external/libxslt/README |2 - external/redland/UnpackedTarball_raptor.mk|1 external/redland/raptor/raptor-libxml2-11.patch.1 | 15 +++ filter/source/xsltfilter/LibXSLTTransformer.cxx | 16 helpcompiler/source/HelpCompiler.cxx | 14 ++ solenv/flatpak-manifest.in|7 +++-- xmlsecurity/source/xmlsec/saxhelper.cxx | 15 ++- 20 files changed, 103 insertions(+), 68 deletions(-) New commits: commit f16d1ea1c7da64022077a9c4544aa11768029a0e Author: Michael Stahl AuthorDate: Thu Feb 15 13:06:32 2024 +0100 Commit: Michael Stahl CommitDate: Thu Feb 22 21:08:01 2024 +0100 tdf#159502 remove --without-system-libxml from LibreOfficeLinux.conf configure.ac explicitly excludes libxml from --without-system-libs but this distro-config "helpfully" adds it explicitly, when the system already contains a usable libxml/libxslt anyway. Change-Id: I79d65d9ed9185277ffde8624efc152b290a6ffb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163438 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 6f6364e572a0570fb097fec098314bffadc5b474) diff --git a/distro-configs/LibreOfficeLinux.conf b/distro-configs/LibreOfficeLinux.conf index 00a70c75010b..607699b5c610 100644 --- a/distro-configs/LibreOfficeLinux.conf +++ b/distro-configs/LibreOfficeLinux.conf @@ -4,7 +4,6 @@ --without-system-poppler --without-system-openssl --without-system-libpng ---without-system-libxml --without-system-jpeg --without-system-jars --without-system-postgresql commit 830f4bfda35fe1acb1c208669f6a56c026b33f25 Author: Michael Stahl AuthorDate: Thu Feb 22 11:57:37 2024 +0100 Commit: Michael Stahl CommitDate: Thu Feb 22 21:08:01 2024 +0100 libxml2: upgrade to release 2.12.5 Fixes CVE-2024-25062 Change-Id: I0e98fd919328e9633a602c4872de0b06eb972cc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163734 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 4c3ee61e3eda0cbfd812443f80af89aa3a24ac73) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163753 Reviewed-by: Xisco Fauli (cherry picked from commit ca089311678ca6f84771c145178bf4153243ed45) diff --git a/download.lst b/download.lst index f3bef85ab8d1..4102d8231629 100644 --- a/download.lst +++ b/download.lst @@ -356,8 +356,8 @@ XMLSEC_TARBALL := xmlsec1-1.2.28.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -LIBXML_SHA256SUM := 8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa -LIBXML_VERSION_MICRO := 3 +LIBXML_SHA256SUM := a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21 +LIBXML_VERSION_MICRO := 5 LIBXML_TARBALL := libxml2-2.12.$(LIBXML_VERSION_MICRO).tar.xz # three static lines # so that git cherry-pick commit 7a300c9b0dcfccde72df684e305c8063351925a3 Author: Caolán McNamara AuthorDate: Wed Jan 3 20:45:14 2024 + Commit: Michael Stahl CommitDate: Thu Feb 22 21:08:01 2024 +0100 upgrade libxml2, libxslt & liblangtag what I'm really after is some vexating not-reproducible oss-fuzz msan warnings when using libxml2 in the fodt2pdf fuzzer. So lets upgrade libxml2 to the latest, which requires bumping libxslt, and then requires a newer liblangtag because of no longer implicit includes that it depended on. xmlKeepBlanksDefaultValue and xmlSubstituteEntitiesDefault are deprecated, we should get around to updating those uses Change-Id: I8fda0dffda0a7ea65407d246a3121875cb8ad4a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161598 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 6875c975f80d8b813b1829a530162869a1e2d92e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163751 Reviewed-by: Michael Stahl (cherry picked from commit 050a2db3964d5f02e2dd149cb7f76342457a6719) diff --git a/download.lst b/download.lst index 9b772a985dd5..f3bef85ab8d1 100644 --- a/download.lst +++