diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-12-30 16:11:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-30 21:02:51 +0100 |
commit | a08b519ef1fe4dc3ffd6ab8884068b5db38e1100 (patch) | |
tree | f629bbf25628bbdc2be6c37c90992094f9bb94e5 /svl/source | |
parent | 85aae7580a7cdebc42202c4ee242e076cda7132f (diff) |
simplify OutlineToImpressFinalizer, no need to use SvLockBytes
Change-Id: Iaf83db0631ca0041915ccb61335cf2fc2a2142f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/items/lckbitem.cxx | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx index 87165ae50756..425e07fbb734 100644 --- a/svl/source/items/lckbitem.cxx +++ b/svl/source/items/lckbitem.cxx @@ -39,7 +39,7 @@ SfxLockBytesItem::~SfxLockBytesItem() bool SfxLockBytesItem::operator==( const SfxPoolItem& rItem ) const { - return SfxPoolItem::operator==(rItem) && static_cast<const SfxLockBytesItem&>(rItem)._xVal == _xVal; + return SfxPoolItem::operator==(rItem) && static_cast<const SfxLockBytesItem&>(rItem).mxVal == mxVal; } SfxLockBytesItem* SfxLockBytesItem::Clone(SfxItemPool *) const @@ -50,52 +50,19 @@ SfxLockBytesItem* SfxLockBytesItem::Clone(SfxItemPool *) const // virtual bool SfxLockBytesItem::PutValue( const css::uno::Any& rVal, sal_uInt8 ) { - css::uno::Sequence< sal_Int8 > aSeq; - if ( rVal >>= aSeq ) + if ( rVal >>= mxVal ) { - if ( aSeq.hasElements() ) - { - SvMemoryStream* pStream = new SvMemoryStream(); - pStream->WriteBytes( aSeq.getConstArray(), aSeq.getLength() ); - pStream->Seek(0); - - _xVal = new SvLockBytes( pStream, true ); - } - else - _xVal = nullptr; - return true; } - OSL_FAIL( "SfxLockBytesItem::PutValue - Wrong type!" ); + assert( false && "SfxLockBytesItem::PutValue - Wrong type!" ); return true; } // virtual bool SfxLockBytesItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const { - if ( _xVal.is() ) - { - sal_uInt32 nLen; - SvLockBytesStat aStat; - - if ( _xVal->Stat( &aStat ) == ERRCODE_NONE ) - nLen = aStat.nSize; - else - return false; - - std::size_t nRead = 0; - css::uno::Sequence< sal_Int8 > aSeq( nLen ); - - _xVal->ReadAt( 0, aSeq.getArray(), nLen, &nRead ); - rVal <<= aSeq; - } - else - { - css::uno::Sequence< sal_Int8 > aSeq( 0 ); - rVal <<= aSeq; - } - + rVal <<= mxVal; return true; } |