package/source/xstor/xstorage.cxx |    7 +++----
 package/source/xstor/xstorage.hxx |    4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit cd88ea52affff0902963f9c616d0d9984a6dd533
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Sep 11 09:01:59 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Sep 11 14:34:13 2024 +0200

    use more concrete UNO type in package
    
    Change-Id: I95283bf49b8966d73035dd718fbcfcbdcacc78c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173157
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/package/source/xstor/xstorage.cxx 
b/package/source/xstor/xstorage.cxx
index 3951a38fec66..e0550695e1dd 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -207,7 +207,7 @@ OStorage_Impl::OStorage_Impl(   uno::Reference< io::XStream 
> const & xStream,
     if ( m_nStorageMode & embed::ElementModes::WRITE )
     {
         m_pSwitchStream = new SwitchablePersistenceStream(xStream);
-        m_xStream = static_cast< io::XStream* >( m_pSwitchStream.get() );
+        m_xStream = m_pSwitchStream.get();
     }
     else
     {
@@ -378,7 +378,7 @@ void OStorage_Impl::OpenOwnPackage()
             uno::Sequence< uno::Any > aArguments( 2 );
             auto pArguments = aArguments.getArray();
             if ( m_nStorageMode & embed::ElementModes::WRITE )
-                pArguments[ 0 ] <<= m_xStream;
+                pArguments[ 0 ] <<= css::uno::Reference< css::io::XStream 
>(m_xStream);
             else
             {
                 SAL_WARN_IF( !m_xInputStream.is(), "package.xstor", "Input 
stream must be set for readonly access!" );
@@ -1715,8 +1715,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< 
container::XNameContain
 
     if ( m_xRelStorage->hasElements() )
     {
-        uno::Reference< embed::XTransactedObject > xTrans( m_xRelStorage, 
uno::UNO_QUERY_THROW );
-        xTrans->commit();
+        m_xRelStorage->commit();
     }
 
     if ( xNewPackageFolder.is() && xNewPackageFolder->hasByName( aRelsStorName 
) )
diff --git a/package/source/xstor/xstorage.hxx 
b/package/source/xstor/xstorage.hxx
index 93d5f8dd32ae..f6e9890c43a3 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -141,7 +141,7 @@ struct OStorage_Impl
 
     // valid only for root storage
     css::uno::Reference< css::io::XInputStream > m_xInputStream; // ??? may be 
stored in properties
-    css::uno::Reference< css::io::XStream > m_xStream; // ??? may be stored in 
properties
+    rtl::Reference< SwitchablePersistenceStream > m_xStream; // ??? may be 
stored in properties
     css::uno::Sequence< css::beans::PropertyValue > m_xProperties;
     bool m_bHasCommonEncryptionData;
     ::comphelper::SequenceAsHashMap m_aCommonEncryptionData;
@@ -162,7 +162,7 @@ struct OStorage_Impl
 
     // the _rels substorage that is handled in a special way in 
embed::StorageFormats::OFOPXML
     SotElement_Impl* m_pRelStorElement;
-    css::uno::Reference< css::embed::XStorage > m_xRelStorage;
+    rtl::Reference< OStorage > m_xRelStorage;
     css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > 
m_aRelInfo;
     css::uno::Reference< css::io::XInputStream > m_xNewRelInfoStream;
     sal_Int16 m_nRelInfoStatus;

Reply via email to