external/libcmis/0001-Fix-boost-1.86-breakage.patch | 47 +++++++++++++++++ external/libcmis/UnpackedTarball_libcmis.mk | 2 external/libcmis/boost-1.86.0.patch.1 | 12 ---- sw/source/core/doc/docfld.cxx | 9 ++- wizards/com/sun/star/wizards/db/ColumnPropertySet.java | 7 ++ wizards/com/sun/star/wizards/db/TableDescriptor.java | 2 6 files changed, 62 insertions(+), 17 deletions(-)
New commits: commit d5c04238908c055dd5a04abc6d2b4a0430be8830 Author: Caolán McNamara <[email protected]> AuthorDate: Sun Sep 1 14:40:46 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun Sep 1 20:34:05 2024 +0200 use final upstream merged fix for this boost issue Change-Id: I33a347d3c0efc4a38389d525f3c9e5f41a957d47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172723 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/external/libcmis/0001-Fix-boost-1.86-breakage.patch b/external/libcmis/0001-Fix-boost-1.86-breakage.patch new file mode 100644 index 000000000000..ef398dfcc98b --- /dev/null +++ b/external/libcmis/0001-Fix-boost-1.86-breakage.patch @@ -0,0 +1,47 @@ +From dfcb642a491f7ec2ae52e3e83d31bb6cdf3670c2 Mon Sep 17 00:00:00 2001 +From: David Seifert <[email protected]> +Date: Sat, 31 Aug 2024 12:39:39 +0200 +Subject: [PATCH] Fix boost 1.86 breakage + +The fix does not break building against <1.86 since we're now accessing the +object representation of the return value. + +Fixes #67 +--- + src/libcmis/xml-utils.cxx | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/src/libcmis/xml-utils.cxx b/src/libcmis/xml-utils.cxx +index e487d17..cdf088f 100644 +--- a/src/libcmis/xml-utils.cxx ++++ b/src/libcmis/xml-utils.cxx +@@ -531,16 +531,22 @@ namespace libcmis + boost::uuids::detail::sha1 sha1; + sha1.process_bytes( str.c_str(), str.size() ); + +- unsigned int digest[5]; ++ // on boost < 1.86.0, digest_type is typedef'd as unsigned int[5] ++ // on boost >= 1.86.0, digest_type is typedef'd as unsigned char[20] ++ boost::uuids::detail::sha1::digest_type digest; + sha1.get_digest( digest ); + ++ // by using a pointer to unsigned char, we can read the ++ // object representation of either typedef. ++ const unsigned char* ptr = reinterpret_cast<const unsigned char*>( digest ); ++ + stringstream out; +- // Setup writing mode. Every number must produce eight ++ // Setup writing mode. Every number must produce two + // hexadecimal digits, including possible leading 0s, or we get + // less than 40 digits as result. + out << hex << setfill('0') << right; +- for ( int i = 0; i < 5; ++i ) +- out << setw(8) << digest[i]; ++ for ( int i = 0; i < sizeof( digest ); ++ptr, ++i ) ++ out << setw(2) << static_cast<int>( *ptr ); + return out.str(); + } + +-- +2.45.1 + diff --git a/external/libcmis/UnpackedTarball_libcmis.mk b/external/libcmis/UnpackedTarball_libcmis.mk index 69bb6dd4b5c3..e47c7f81ef63 100644 --- a/external/libcmis/UnpackedTarball_libcmis.mk +++ b/external/libcmis/UnpackedTarball_libcmis.mk @@ -25,7 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libcmis,\ external/libcmis/0001-cppcheck-operatorEqVarError-in-src-libcmis-http-sess.patch \ external/libcmis/0001-Take-into-account-m_CurlInitProtocolsFunction-in-cop.patch \ external/libcmis/initprotocols.patch.1 \ - external/libcmis/boost-1.86.0.patch.1 \ + external/libcmis/0001-Fix-boost-1.86-breakage.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libcmis/boost-1.86.0.patch.1 b/external/libcmis/boost-1.86.0.patch.1 deleted file mode 100644 index 74d6df54f832..000000000000 --- a/external/libcmis/boost-1.86.0.patch.1 +++ /dev/null @@ -1,12 +0,0 @@ ---- libcmis/src/libcmis/xml-utils.cxx 2024-08-22 12:06:16.595963754 +0200 -+++ libcmis/src/libcmis/xml-utils.cxx 2024-08-22 12:06:29.987877405 +0200 -@@ -536,7 +536,7 @@ - sha1.process_bytes( str.c_str(), str.size() ); - - unsigned int digest[5]; -- sha1.get_digest( digest ); -+ sha1.get_digest( reinterpret_cast<boost::uuids::detail::sha1::digest_type&>(digest) ); - - stringstream out; - // Setup writing mode. Every number must produce eight - commit 883d19101edd2794e972b3cbc4f70ee737fab4cd Author: Caolán McNamara <[email protected]> AuthorDate: Sun Sep 1 12:57:11 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun Sep 1 20:33:59 2024 +0200 cid#1607226 silence Overflowed constant Change-Id: I49bdb9916f7c54621e8853c6bb1e7957c9b552a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172722 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 1507211b8010..613a2e0fd98c 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -813,12 +813,17 @@ void SwDocUpdateField::InsDelFieldInFieldLst( bool bIns, const SwTextField& rFie { // look up via the pTextField pointer. It is a sorted list, but it's sorted by node // position. Until this is found, the search for the pointer is already done. - for (SetGetExpFields::size_type n = 0; n < m_pFieldSortList->size(); ++n) + SetGetExpFields::size_type n = 0; + while (n < m_pFieldSortList->size()) { if (&rField == (*m_pFieldSortList)[n]->GetPointer()) { m_pFieldSortList->erase_at(n); - n--; // one field can occur multiple times + // one field can occur multiple times + } + else + { + ++n; } } } commit 740c0a33816fc979e5facb731e2d23e9a8411c75 Author: Caolán McNamara <[email protected]> AuthorDate: Sun Sep 1 12:46:21 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun Sep 1 20:33:52 2024 +0200 cid#1607081 PA: Public Attribute Change-Id: I8b2e8bce03062ffe4c721ac3d3db64b6bd3f15eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172721 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java index 484dbf62fa9f..991d1f52ac1c 100644 --- a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java +++ b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java @@ -27,7 +27,7 @@ public class ColumnPropertySet { private TypeInspector oTypeInspector; - public XPropertySet xPropertySet; + private XPropertySet xPropertySet; private int nType; private String sTypeName = PropertyNames.EMPTY_STRING; @@ -37,6 +37,11 @@ public class ColumnPropertySet oTypeInspector = _oTypeInspector; } + public XPropertySet getPropertySet() + { + return xPropertySet; + } + private void assignPropertyValues(String _sNewName, PropertyValue[] _aNewColPropertyValues, boolean _bsetDefaultProperties) { try diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index fca26198922f..a2e71f07b70c 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -607,7 +607,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { ColumnPropertySet oPropertySet = new ColumnPropertySet(oTypeInspector, xColumnDataDescriptorFactory.createDataDescriptor()); oPropertySet.assignPropertyValues(_aNewPropertyValues, true); - ColumnDescriptor oColumnDescriptor = new ColumnDescriptor(oPropertySet.xPropertySet, sname); + ColumnDescriptor oColumnDescriptor = new ColumnDescriptor(oPropertySet.getPropertySet(), sname); this.columncontainer.add(oColumnDescriptor); return true; }
