tools/source/stream/stream.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit edfb978cf6676be642a75e92bc468e99b881953f
Author:     Rene Engelhard <[email protected]>
AuthorDate: Mon Mar 2 23:06:34 2026 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Tue Mar 3 22:31:17 2026 +0100

    fix build with older boosts (e.g. 1.83)
    
    after af82f165caa17c6c4678705aa4084647a6825c2d
    
    Change-Id: I2ca4757695b1d01a287d7a4e8d48d22455431d12
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200864
    Reviewed-by: Stephan Bergmann <[email protected]>
    Tested-by: Jenkins

diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 1a65357f8cf7..a797b80851d6 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -41,7 +41,10 @@
 #include <comphelper/fileurl.hxx>
 #include <comphelper/scopeguard.hxx>
 
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 108600
 #include <boost/core/pointer_in_range.hpp>
+#endif
 
 #include <unicode/ucsdet.h>
 
@@ -1652,8 +1655,12 @@ std::size_t SvMemoryStream::PutData( const void* pData, 
std::size_t nCount )
         }
         else
         {
+#if BOOST_VERSION < 108600
+            const bool bSourceDataIsInsideBuffer = std::less_equal<sal_uInt8 
const *>()(pBuf, static_cast<sal_uInt8 const *>(pData)) && std::less<sal_uInt8 
const *>()(static_cast<sal_uInt8 const *>(pData), pBuf + nSize);
+#else
             const bool bSourceDataIsInsideBuffer = boost::pointer_in_range(
                 static_cast<sal_uInt8 const *>(pData), pBuf, pBuf + nSize);
+#endif
             std::ptrdiff_t const offset = bSourceDataIsInsideBuffer ? 
static_cast<const char*>(pData) - reinterpret_cast<const char*>(pBuf) : 0;
             tools::Long nNewResize;
             if( nSize && nSize > nResize )

Reply via email to