external/libxml2/0001-const-up-allowPCData.patch.1 | 26 +++++++++++++++++++++ external/libxml2/UnpackedTarball_libxml2.mk | 4 +++ sfx2/source/view/lokhelper.cxx | 6 ++-- 3 files changed, 33 insertions(+), 3 deletions(-)
New commits: commit c0a0dc0315671ffe16f9120e1b909d2f32544cb0 Author: Caolán McNamara <[email protected]> AuthorDate: Wed Jul 23 17:02:15 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Jul 24 17:39:09 2025 +0200 SfxLokHelper::getView(*) -> SfxLokHelper::getView(&) on inspection these ones are protected by a null check or a previous dereference. Change-Id: I9186c16ae3814be4654ad69a4fce5fadf2f928f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188284 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 9a0b9b293488..fc15e29c4478 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -519,7 +519,7 @@ void SfxLokHelper::notifyOtherViews(const SfxViewShell* pThisView, int nType, st if (aPayload.isEmpty()) { aPayload = lcl_generateJSON(pThisView, rKey, rPayload); - viewId = SfxLokHelper::getView(pThisView); + viewId = SfxLokHelper::getView(*pThisView); } pViewShell->libreOfficeKitViewCallbackWithViewId(nType, aPayload, viewId); @@ -550,7 +550,7 @@ void SfxLokHelper::notifyOtherViews(const SfxViewShell* pThisView, int nType, if (aPayload.isEmpty()) { aPayload = lcl_generateJSON(pThisView, rTree); - viewId = SfxLokHelper::getView(pThisView); + viewId = SfxLokHelper::getView(*pThisView); } pViewShell->libreOfficeKitViewCallbackWithViewId(nType, aPayload, viewId); @@ -1051,7 +1051,7 @@ void SfxLokHelper::notifyOtherViewsUpdatePerViewId(SfxViewShell const* pThisView if (DisableCallbacks::disabled() || !pThisView) return; - int viewId = SfxLokHelper::getView(pThisView); + int viewId = SfxLokHelper::getView(*pThisView); const ViewShellDocId nCurrentDocId = pThisView->GetDocId(); SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while (pViewShell) commit 0441427b484cc416bb70bba23d2f37dd69b603cc Author: Caolán McNamara <[email protected]> AuthorDate: Tue Jul 22 12:53:56 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Jul 24 17:38:59 2025 +0200 const up libxml2 Change-Id: Iba1ae303bd4cb7ba81f871968286ae890363508b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188275 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/external/libxml2/0001-const-up-allowPCData.patch.1 b/external/libxml2/0001-const-up-allowPCData.patch.1 new file mode 100644 index 000000000000..1009b787f96f --- /dev/null +++ b/external/libxml2/0001-const-up-allowPCData.patch.1 @@ -0,0 +1,26 @@ +From 408bd0e18e6ddba5d18e51d52da0f7b3ca1b4421 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <[email protected]> +Date: Thu, 24 Jul 2025 11:09:29 +0100 +Subject: [PATCH] const up allowPCData + +similar to htmlScriptAttributes +--- + HTMLparser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/HTMLparser.c b/HTMLparser.c +index 5386cfa7..afd085b5 100644 +--- a/HTMLparser.c ++++ b/HTMLparser.c +@@ -2143,7 +2143,7 @@ htmlEncodeEntities(unsigned char* out, int *outlen, + * into the html40ElementTable array but I don't want to risk any + * binary incompatibility + */ +-static const char *allowPCData[] = { ++static const char *const allowPCData[] = { + "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big", + "blockquote", "body", "button", "caption", "center", "cite", "code", + "dd", "del", "dfn", "div", "dt", "em", "font", "form", "h1", "h2", +-- +2.49.0 + diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk index c92e46992db3..9884b020a20a 100644 --- a/external/libxml2/UnpackedTarball_libxml2.mk +++ b/external/libxml2/UnpackedTarball_libxml2.mk @@ -15,12 +15,16 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2)) $(eval $(call gb_UnpackedTarball_set_patchlevel,libxml2,2)) +# 0001-const-up-allowPCData.patch effort to upstream at: +# https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/333 + $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\ $(if $(filter SOLARIS,$(OS)),external/libxml2/libxml2-global-symbols.patch) \ external/libxml2/libxml2-vc10.patch \ external/libxml2/libxml2-XMLCALL-redefine.patch.0 \ external/libxml2/makefile.msvc-entry-point.patch.0 \ external/libxml2/deprecated.patch.0 \ + external/libxml2/0001-const-up-allowPCData.patch.1 \ $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \ $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \ external/libxml2/libxml2-icu-sym.patch.0, \
