summaryrefslogtreecommitdiff
path: root/package/source/xstor
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-09-11 09:01:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-09-11 14:34:13 +0200
commitcd88ea52affff0902963f9c616d0d9984a6dd533 (patch)
tree82cb9a58a48d00bbc42d5c59f2973a7bd68e6a09 /package/source/xstor
parent1bbf42240efe8f48a1a761faa6c8a03dc9b1b5a7 (diff)
use more concrete UNO type in package
Change-Id: I95283bf49b8966d73035dd718fbcfcbdcacc78c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173157 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'package/source/xstor')
-rw-r--r--package/source/xstor/xstorage.cxx7
-rw-r--r--package/source/xstor/xstorage.hxx4
2 files changed, 5 insertions, 6 deletions
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;