summaryrefslogtreecommitdiff
path: root/chart2
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 /chart2
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 'chart2')
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx4
-rw-r--r--chart2/source/controller/main/ChartTransferable.cxx7
-rw-r--r--chart2/source/controller/main/ChartTransferable.hxx2
3 files changed, 5 insertions, 8 deletions
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index ed0776d94c79..8d78185159d9 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -270,7 +270,7 @@ void ChartController::executeDispatch_Paste()
{
if ( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) )
{
- tools::SvRef<SotStorageStream> xStm;
+ tools::SvRef<SotTempStream> xStm;
if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) )
{
xStm->Seek( 0 );
@@ -288,7 +288,7 @@ void ChartController::executeDispatch_Paste()
else if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) )
{
// graphic exchange format (graphic manager bitmap format?)
- tools::SvRef<SotStorageStream> xStm;
+ tools::SvRef<SotTempStream> xStm;
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ))
ReadGraphic( *xStm, aGraphic );
}
diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx
index 67db8d3e4503..03e8eaef2509 100644
--- a/chart2/source/controller/main/ChartTransferable.cxx
+++ b/chart2/source/controller/main/ChartTransferable.cxx
@@ -105,7 +105,7 @@ bool ChartTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, c
return bResult;
}
-bool ChartTransferable::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
+bool ChartTransferable::WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
const datatransfer::DataFlavor& /* rFlavor */ )
{
// called from SetObject, put data into stream
@@ -141,10 +141,7 @@ bool ChartTransferable::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, voi
}
Reference< io::XOutputStream > xDocOut( new utl::OOutputStreamWrapper( *rxOStm ) );
- if ( SvxDrawingLayerExport( pMarkedObjModel, xDocOut ) )
- {
- rxOStm->Commit();
- }
+ SvxDrawingLayerExport( pMarkedObjModel, xDocOut );
bRet = ( rxOStm->GetError() == ERRCODE_NONE );
}
diff --git a/chart2/source/controller/main/ChartTransferable.hxx b/chart2/source/controller/main/ChartTransferable.hxx
index c825a0a6e7d8..34567dceb6a9 100644
--- a/chart2/source/controller/main/ChartTransferable.hxx
+++ b/chart2/source/controller/main/ChartTransferable.hxx
@@ -46,7 +46,7 @@ protected:
// implementation of TransferableHelper methods
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
- virtual bool WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
+ virtual bool WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
const css::datatransfer::DataFlavor& rFlavor ) override;
private: