This is an automated email from the ASF dual-hosted git repository. ardovm pushed a commit to branch AOO41Xjammy in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit c2751ac247c7039c13b92521bccea6a6603b547e Author: Arrigo Marchiori <ard...@yahoo.it> AuthorDate: Wed Jan 17 07:06:52 2024 +0100 Allow compilation with gcc 11 These edits may be needed to work around a GCC bug. See https://lists.apache.org/thread/gbfm2djykqk9ksqw22vobklf6d4lm0ly --- main/sfx2/source/doc/objstor.cxx | 4 +++- main/sot/source/sdstor/ucbstorage.cxx | 3 ++- main/svtools/source/misc/embedhlp.cxx | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main/sfx2/source/doc/objstor.cxx b/main/sfx2/source/doc/objstor.cxx index a93d226d9a..3bc5c9a5d9 100644 --- a/main/sfx2/source/doc/objstor.cxx +++ b/main/sfx2/source/doc/objstor.cxx @@ -2337,7 +2337,9 @@ sal_Bool SfxObjectShell::InsertFrom( SfxMedium& rMedium ) { aArgs.realloc ( ++nEnd ); aArgs[nEnd-1].Name = sInputStream; - aArgs[nEnd-1].Value <<= com::sun::star::uno::Reference < com::sun::star::io::XInputStream > ( new utl::OSeekableInputStreamWrapper ( *rMedium.GetInStream() ) ); + com::sun::star::uno::Reference < com::sun::star::io::XInputStream > temp; + temp = new utl::OSeekableInputStreamWrapper ( *rMedium.GetInStream() ); + aArgs[nEnd-1].Value <<= temp; } if ( !bHasBaseURL ) diff --git a/main/sot/source/sdstor/ucbstorage.cxx b/main/sot/source/sdstor/ucbstorage.cxx index 7104c3c844..e1ac36f7f1 100644 --- a/main/sot/source/sdstor/ucbstorage.cxx +++ b/main/sot/source/sdstor/ucbstorage.cxx @@ -1876,7 +1876,8 @@ void UCBStorage_Impl::Init() if ( !pStream->GetError() ) { ::utl::OInputStreamWrapper* pHelper = new ::utl::OInputStreamWrapper( *pStream ); - com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > xInputStream( pHelper ); + com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > xInputStream; + xInputStream = pHelper; // create a manifest reader object that will read in the manifest from the stream Reference < ::com::sun::star::packages::manifest::XManifestReader > xReader = diff --git a/main/svtools/source/misc/embedhlp.cxx b/main/svtools/source/misc/embedhlp.cxx index c08bb364ba..4d5fe9edd7 100644 --- a/main/svtools/source/misc/embedhlp.cxx +++ b/main/svtools/source/misc/embedhlp.cxx @@ -651,7 +651,8 @@ void EmbeddedObjectRef::SetGraphicStream( const uno::Reference< io::XInputStream if ( mpImp->pContainer ) { pGraphicStream->Seek( 0 ); - uno::Reference< io::XInputStream > xInSeekGrStream = new ::utl::OSeekableInputStreamWrapper( pGraphicStream ); + uno::Reference< io::XInputStream > xInSeekGrStream; + xInSeekGrStream = new ::utl::OSeekableInputStreamWrapper( pGraphicStream ); mpImp->pContainer->InsertGraphicStream( xInSeekGrStream, mpImp->aPersistName, rMediaType ); }