Allow compilation with gcc 11

These edits may be needed to work around a GCC bug.
See https://lists.apache.org/thread/gbfm2djykqk9ksqw22vobklf6d4lm0ly
diff --git a/main/sfx2/source/doc/objstor.cxx b/main/sfx2/source/doc/objstor.cxx
index a93d226..3bc5c9a 100644
--- a/main/sfx2/source/doc/objstor.cxx
+++ b/main/sfx2/source/doc/objstor.cxx
@@ -2337,7 +2337,9 @@
         {
             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 7104c3c..e1ac36f 100644
--- a/main/sot/source/sdstor/ucbstorage.cxx
+++ b/main/sot/source/sdstor/ucbstorage.cxx
@@ -1876,7 +1876,8 @@
                         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 c08bb36..4d5fe9e 100644
--- a/main/svtools/source/misc/embedhlp.cxx
+++ b/main/svtools/source/misc/embedhlp.cxx
@@ -651,7 +651,8 @@
 		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 );
 		}