This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch symphony-vba in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 4a29e5e2e07604b9d3759fb9450fb93a0ae620c4 Author: Pedro Giffuni <[email protected]> AuthorDate: Sun Oct 25 16:50:11 2026 -0500 Fix GCC 15 build compatibility issues Build infrastructure fixes that can be cherry-picked independently: - Add include paths to sfx2 Library_sfx.mk for SDI compilation - Conditional Xrandr/Xinerama linking in VCL plug_gen (USE_XINERAMA) - Add acquire()/release() overrides to OInputStreamWrapper/OOutputStreamWrapper --- main/sfx2/Library_sfx.mk | 3 +++ main/unotools/inc/unotools/streamwrap.hxx | 32 ++++++++++++++---------- main/unotools/source/streaming/streamwrap.cxx | 36 +++++++++++++++++++++++++++ main/vcl/Library_vclplug_gen.mk | 4 +++ 4 files changed, 62 insertions(+), 13 deletions(-) diff --git a/main/sfx2/Library_sfx.mk b/main/sfx2/Library_sfx.mk index c9d3598f0a..2a4089a26d 100644 --- a/main/sfx2/Library_sfx.mk +++ b/main/sfx2/Library_sfx.mk @@ -289,6 +289,9 @@ $(eval $(call gb_SdiTarget_set_include,sfx2/sdi/sfxslots,\ -I$(SRCDIR)/sfx2/inc/sfx2 \ -I$(SRCDIR)/sfx2/inc \ -I$(SRCDIR)/sfx2/sdi \ + -I$(SRCDIR)/svl/inc \ + -I$(SRCDIR)/svtools/inc \ + -I$(SRCDIR)/tools/inc \ )) ifeq ($(OS),$(filter WNT MACOSX,$(OS))) diff --git a/main/unotools/inc/unotools/streamwrap.hxx b/main/unotools/inc/unotools/streamwrap.hxx index 2c43d5e771..97458b5f1a 100644 --- a/main/unotools/inc/unotools/streamwrap.hxx +++ b/main/unotools/inc/unotools/streamwrap.hxx @@ -62,6 +62,8 @@ public: OInputStreamWrapper(SvStream& _rStream); OInputStreamWrapper(SvStream* pStream, sal_Bool bOwner=sal_False); virtual ~OInputStreamWrapper(); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); // stario::XInputStream virtual sal_Int32 SAL_CALL readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead); @@ -85,19 +87,21 @@ typedef ::cppu::ImplHelper1 < ::com::sun::star::io::XSeekable /** helper class for wrapping an SvStream into an <type scope="com.sun.star.io">XInputStream</type> which is seekable (i.e. supports the <type scope="com.sun.star.io">XSeekable</type> interface). */ -class UNOTOOLS_DLLPUBLIC OSeekableInputStreamWrapper : public ::cppu::ImplInheritanceHelper1 < OInputStreamWrapper, com::sun::star::io::XSeekable > -{ -protected: - OSeekableInputStreamWrapper() {} -public: - OSeekableInputStreamWrapper(SvStream& _rStream); - OSeekableInputStreamWrapper(SvStream* _pStream, sal_Bool _bOwner = sal_False); - - // XSeekable - virtual void SAL_CALL seek( sal_Int64 _nLocation ); - virtual sal_Int64 SAL_CALL getPosition( ); - virtual sal_Int64 SAL_CALL getLength( ); -}; + class UNOTOOLS_DLLPUBLIC OSeekableInputStreamWrapper : public ::cppu::ImplInheritanceHelper1 < OInputStreamWrapper, com::sun::star::io::XSeekable > + { + protected: + OSeekableInputStreamWrapper() {} + public: + OSeekableInputStreamWrapper(SvStream& _rStream); + OSeekableInputStreamWrapper(SvStream* pStream, sal_Bool bOwner = sal_False); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XSeekable + virtual void SAL_CALL seek( sal_Int64 _nLocation ); + virtual sal_Int64 SAL_CALL getPosition( ); + virtual sal_Int64 SAL_CALL getLength( ); + }; //================================================================== //= OOutputStreamWrapper @@ -112,6 +116,8 @@ protected: public: OOutputStreamWrapper(SvStream& _rStream) :rStream(_rStream) { } + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); // stario::XOutputStream virtual void SAL_CALL writeBytes(const staruno::Sequence< sal_Int8 >& aData); diff --git a/main/unotools/source/streaming/streamwrap.cxx b/main/unotools/source/streaming/streamwrap.cxx index b9d332a369..b49e8aef00 100644 --- a/main/unotools/source/streaming/streamwrap.cxx +++ b/main/unotools/source/streaming/streamwrap.cxx @@ -65,6 +65,30 @@ OInputStreamWrapper::~OInputStreamWrapper() DBG_DTOR(OInputStreamWrapper,NULL); } +//------------------------------------------------------------------------------ +void SAL_CALL OInputStreamWrapper::acquire() throw() +{ + OWeakObject::acquire(); +} + +//------------------------------------------------------------------------------ +void SAL_CALL OInputStreamWrapper::release() throw() +{ + OWeakObject::release(); +} + +//------------------------------------------------------------------------------ +void SAL_CALL OSeekableInputStreamWrapper::acquire() throw() +{ + OInputStreamWrapper::acquire(); +} + +//------------------------------------------------------------------------------ +void SAL_CALL OSeekableInputStreamWrapper::release() throw() +{ + OInputStreamWrapper::release(); +} + //------------------------------------------------------------------------------ sal_Int32 SAL_CALL OInputStreamWrapper::readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) { @@ -252,6 +276,18 @@ void SAL_CALL OOutputStreamWrapper::closeOutput() { } +//------------------------------------------------------------------------------ +void SAL_CALL OOutputStreamWrapper::acquire() throw() +{ + OWeakObject::acquire(); +} + +//------------------------------------------------------------------------------ +void SAL_CALL OOutputStreamWrapper::release() throw() +{ + OWeakObject::release(); +} + //------------------------------------------------------------------------------ void OOutputStreamWrapper::checkError() const { diff --git a/main/vcl/Library_vclplug_gen.mk b/main/vcl/Library_vclplug_gen.mk index a79c0af1d4..c3dd22e5e5 100644 --- a/main/vcl/Library_vclplug_gen.mk +++ b/main/vcl/Library_vclplug_gen.mk @@ -194,14 +194,18 @@ $(eval $(call gb_Library_add_linked_libs,vclplug_gen,\ m \ pthread \ )) +ifneq ($(USE_XINERAMA),NO) $(eval $(call gb_Library_add_libs,vclplug_gen, \ -lXinerama -lXrandr \ )) endif +endif ifeq ($(OS),FREEBSD) +ifneq ($(USE_XINERAMA),NO) $(eval $(call gb_Library_add_libs,vclplug_gen, \ -lXinerama -lXrandr \ )) endif +endif # vim: set noet sw=4 ts=4:
