summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2020-12-21 16:28:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-22 07:41:48 +0100
commitdb9f13986fc7ef3d4b44d71459c58e9ea0ae8bcb (patch)
tree5cea6356782106abd471e77aefcf43e20e68069a /svx
parent0eeb310d9ed8654ac4c96c444ebad49a567ad618 (diff)
split SotStorageStream into two classes
since it has two completely different paths of control Change-Id: I89b739d318d52245208a4bda1230f69d19f3ae0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/gallery2/gallerybinaryengine.cxx7
-rw-r--r--svx/source/gallery2/galmisc.cxx4
-rw-r--r--svx/source/gallery2/galtheme.cxx6
3 files changed, 8 insertions, 9 deletions
diff --git a/svx/source/gallery2/gallerybinaryengine.cxx b/svx/source/gallery2/gallerybinaryengine.cxx
index 8b7715eeb9ac..8f0fa9fcb240 100644
--- a/svx/source/gallery2/gallerybinaryengine.cxx
+++ b/svx/source/gallery2/gallerybinaryengine.cxx
@@ -334,7 +334,7 @@ SgaObjectSvDraw GalleryBinaryEngine::insertModel(const FmFormModel& rModel,
}
bool GalleryBinaryEngine::readModelStream(const GalleryObject* pObject,
- tools::SvRef<SotStorageStream> const& rxModelStream)
+ tools::SvRef<SotTempStream> const& rxModelStream)
{
const INetURLObject aURL(ImplGetURL(pObject));
tools::SvRef<SotStorage> xSotStorage(GetSvDrawStorage());
@@ -366,8 +366,7 @@ bool GalleryBinaryEngine::readModelStream(const GalleryObject* pObject,
uno::Reference<io::XOutputStream> xDocOut(
new utl::OOutputStreamWrapper(*rxModelStream));
- if (SvxDrawingLayerExport(aModel.GetModel(), xDocOut))
- rxModelStream->Commit();
+ SvxDrawingLayerExport(aModel.GetModel(), xDocOut);
}
}
@@ -382,7 +381,7 @@ bool GalleryBinaryEngine::readModelStream(const GalleryObject* pObject,
}
SgaObjectSvDraw
-GalleryBinaryEngine::insertModelStream(const tools::SvRef<SotStorageStream>& rxModelStream,
+GalleryBinaryEngine::insertModelStream(const tools::SvRef<SotTempStream>& rxModelStream,
const INetURLObject& rUserURL)
{
INetURLObject aURL(implCreateUniqueURL(SgaObjKind::SvDraw, rUserURL));
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index df089a47aff2..a3613424f041 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -396,7 +396,7 @@ void GalleryTransferable::InitData( bool bLazy )
if( !mxModelStream.is() )
{
- mxModelStream = new SotStorageStream( "" );
+ mxModelStream = new SotTempStream( "" );
mxModelStream->SetBufferSize( 16348 );
if (!mpTheme || !mpTheme->GetModelStream(mnObjectPos, mxModelStream))
@@ -502,7 +502,7 @@ bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, cons
return bRet;
}
-bool GalleryTransferable::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject,
+bool GalleryTransferable::WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject,
sal_uInt32, const datatransfer::DataFlavor& )
{
bool bRet = false;
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 2dad05a061af..e9ca797a3e8d 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -453,7 +453,7 @@ bool GalleryTheme::InsertModel(const FmFormModel& rModel, sal_uInt32 nInsertPos)
return bRet;
}
-bool GalleryTheme::GetModelStream(sal_uInt32 nPos, tools::SvRef<SotStorageStream> const & rxModelStream)
+bool GalleryTheme::GetModelStream(sal_uInt32 nPos, tools::SvRef<SotTempStream> const & rxModelStream)
{
const GalleryObject* pObject = maGalleryObjectCollection.getForPosition( nPos );
bool bRet = false;
@@ -466,7 +466,7 @@ bool GalleryTheme::GetModelStream(sal_uInt32 nPos, tools::SvRef<SotStorageStream
return bRet;
}
-bool GalleryTheme::InsertModelStream(const tools::SvRef<SotStorageStream>& rxModelStream, sal_uInt32 nInsertPos)
+bool GalleryTheme::InsertModelStream(const tools::SvRef<SotTempStream>& rxModelStream, sal_uInt32 nInsertPos)
{
bool bRet = false;
@@ -539,7 +539,7 @@ bool GalleryTheme::InsertTransferable(const uno::Reference< datatransfer::XTrans
if( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
{
- tools::SvRef<SotStorageStream> xModelStm;
+ tools::SvRef<SotTempStream> xModelStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xModelStm ) )
bRet = InsertModelStream( xModelStm, nInsertPos );