137
137
#include < rtl/ustring.hxx>
138
138
#include < svtools/embedhlp.hxx>
139
139
#include < boost/scoped_array.hpp>
140
- #include < boost/scoped_ptr.hpp >
140
+ #include < memory >
141
141
142
142
using namespace ::com::sun::star ;
143
143
using namespace ::com::sun::star::drawing;
@@ -257,25 +257,25 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
257
257
258
258
if ( ::utl::LocalFileHelper::ConvertPhysicalNameToURL ( OUString (" d:\\ ashape.dbg" ), aURLStr ) )
259
259
{
260
- boost::scoped_ptr <SvStream> pOut (::utl::UcbStreamHelper::CreateStream ( aURLStr, StreamMode::WRITE ));
260
+ std::unique_ptr <SvStream> xOut (::utl::UcbStreamHelper::CreateStream ( aURLStr, StreamMode::WRITE ));
261
261
262
- if ( pOut )
262
+ if ( xOut )
263
263
{
264
- pOut ->Seek ( STREAM_SEEK_TO_END );
264
+ xOut ->Seek ( STREAM_SEEK_TO_END );
265
265
266
266
if ( IsProperty ( DFF_Prop_adjustValue ) || IsProperty ( DFF_Prop_pVertices ) )
267
267
{
268
- pOut ->WriteLine ( " " );
268
+ xOut ->WriteLine ( " " );
269
269
OString aString (" ShapeId: " + OString::number (nShapeId));
270
- pOut ->WriteLine (aString);
270
+ xOut ->WriteLine (aString);
271
271
}
272
272
for ( sal_uInt32 i = DFF_Prop_adjustValue; i <= DFF_Prop_adjust10Value; i++ )
273
273
{
274
274
if ( IsProperty ( i ) )
275
275
{
276
276
OString aString (" Prop_adjustValue" + OString::number ( ( i - DFF_Prop_adjustValue ) + 1 ) +
277
277
" :" + OString::number (GetPropertyValue (i)) );
278
- pOut ->WriteLine (aString);
278
+ xOut ->WriteLine (aString);
279
279
}
280
280
}
281
281
sal_Int32 i;
@@ -290,15 +290,15 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
290
290
sal_Int32 nLen = (sal_Int32)GetPropertyValue ( i );
291
291
if ( nLen )
292
292
{
293
- pOut ->WriteLine ( " " );
293
+ xOut ->WriteLine ( " " );
294
294
OStringBuffer aDesc (" Property:" + OString::number (i) +
295
295
" Size:" + OString::number (nLen));
296
- pOut ->WriteLine (aDesc.makeStringAndClear ());
296
+ xOut ->WriteLine (aDesc.makeStringAndClear ());
297
297
sal_Int16 nNumElem, nNumElemMem, nNumSize;
298
298
rIn >> nNumElem >> nNumElemMem >> nNumSize;
299
299
aDesc.append (" Entries: " + OString::number (nNumElem) +
300
300
" Size:" + OString::number (nNumSize));
301
- pOut ->WriteLine (aDesc.makeStringAndClear ());
301
+ xOut ->WriteLine (aDesc.makeStringAndClear ());
302
302
if ( nNumSize < 0 )
303
303
nNumSize = ( ( -nNumSize ) >> 2 );
304
304
if ( !nNumSize )
@@ -315,29 +315,29 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
315
315
sal_uInt8 nVal;
316
316
rIn >> nVal;
317
317
if ( ( nVal >> 4 ) > 9 )
318
- *pOut << (sal_uInt8)( ( nVal >> 4 ) + ' A' - 10 );
318
+ *xOut << (sal_uInt8)( ( nVal >> 4 ) + ' A' - 10 );
319
319
else
320
- *pOut << (sal_uInt8)( ( nVal >> 4 ) + ' 0' );
320
+ *xOut << (sal_uInt8)( ( nVal >> 4 ) + ' 0' );
321
321
322
322
if ( ( nVal & 0xf ) > 9 )
323
- *pOut << (sal_uInt8)( ( nVal & 0xf ) + ' A' - 10 );
323
+ *xOut << (sal_uInt8)( ( nVal & 0xf ) + ' A' - 10 );
324
324
else
325
- *pOut << (sal_uInt8)( ( nVal & 0xf ) + ' 0' );
325
+ *xOut << (sal_uInt8)( ( nVal & 0xf ) + ' 0' );
326
326
327
327
nLen--;
328
328
}
329
329
}
330
- *pOut << (char )( ' ' );
330
+ *xOut << (char )( ' ' );
331
331
}
332
- pOut ->WriteLine ( OString () );
332
+ xOut ->WriteLine ( OString () );
333
333
}
334
334
}
335
335
}
336
336
else
337
337
{
338
338
OString aString (" Property" + OString::number (i) +
339
339
" :" + OString::number (GetPropertyValue (i)));
340
- pOut ->WriteLine (aString);
340
+ xOut ->WriteLine (aString);
341
341
}
342
342
}
343
343
}
@@ -3084,15 +3084,15 @@ DffRecordHeader* DffRecordManager::GetRecordHeader( sal_uInt16 nRecId, DffSeekTo
3084
3084
3085
3085
3086
3086
bool CompareSvxMSDffShapeInfoById::operator () (
3087
- ::boost ::shared_ptr<SvxMSDffShapeInfo> const & lhs,
3088
- ::boost ::shared_ptr<SvxMSDffShapeInfo> const & rhs) const
3087
+ std ::shared_ptr<SvxMSDffShapeInfo> const & lhs,
3088
+ std ::shared_ptr<SvxMSDffShapeInfo> const & rhs) const
3089
3089
{
3090
3090
return lhs->nShapeId < rhs->nShapeId ;
3091
3091
}
3092
3092
3093
3093
bool CompareSvxMSDffShapeInfoByTxBxComp::operator () (
3094
- ::boost ::shared_ptr<SvxMSDffShapeInfo> const & lhs,
3095
- ::boost ::shared_ptr<SvxMSDffShapeInfo> const & rhs) const
3094
+ std ::shared_ptr<SvxMSDffShapeInfo> const & lhs,
3095
+ std ::shared_ptr<SvxMSDffShapeInfo> const & rhs) const
3096
3096
{
3097
3097
return lhs->nTxBxComp < rhs->nTxBxComp ;
3098
3098
}
@@ -5144,7 +5144,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
5144
5144
// the object with a frame, otherwise
5145
5145
if ( bTextFrame )
5146
5146
{
5147
- ::boost ::shared_ptr<SvxMSDffShapeInfo> const pTmpRec (
5147
+ std ::shared_ptr<SvxMSDffShapeInfo> const pTmpRec (
5148
5148
new SvxMSDffShapeInfo (0 , pImpRec->nShapeId ));
5149
5149
5150
5150
SvxMSDffShapeInfos_ById::const_iterator const it =
@@ -5707,7 +5707,7 @@ void SvxMSDffManager::CheckTxBxStoryChain()
5707
5707
mark = m_xShapeInfosByTxBxComp->begin ();
5708
5708
iter != m_xShapeInfosByTxBxComp->end (); ++iter)
5709
5709
{
5710
- boost ::shared_ptr<SvxMSDffShapeInfo> const pObj = *iter;
5710
+ std ::shared_ptr<SvxMSDffShapeInfo> const pObj = *iter;
5711
5711
if ( pObj->nTxBxComp )
5712
5712
{
5713
5713
// group change?
@@ -6136,7 +6136,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
6136
6136
{
6137
6137
aInfo.bReplaceByFly = true ;
6138
6138
}
6139
- m_xShapeInfosByTxBxComp->insert (::boost ::shared_ptr<SvxMSDffShapeInfo>(
6139
+ m_xShapeInfosByTxBxComp->insert (std ::shared_ptr<SvxMSDffShapeInfo>(
6140
6140
new SvxMSDffShapeInfo (aInfo)));
6141
6141
pShapeOrders->push_back ( new SvxMSDffShapeOrder ( aInfo.nShapeId ) );
6142
6142
}
@@ -6156,7 +6156,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
6156
6156
bool SvxMSDffManager::GetShape (sal_uLong nId, SdrObject*& rpShape,
6157
6157
SvxMSDffImportData& rData)
6158
6158
{
6159
- ::boost ::shared_ptr<SvxMSDffShapeInfo> const pTmpRec (
6159
+ std ::shared_ptr<SvxMSDffShapeInfo> const pTmpRec (
6160
6160
new SvxMSDffShapeInfo (0 , nId));
6161
6161
6162
6162
SvxMSDffShapeInfos_ById::const_iterator const it =
@@ -6333,18 +6333,18 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
6333
6333
rBLIPStream.SeekRel ( nSkip );
6334
6334
6335
6335
SvStream* pGrStream = &rBLIPStream;
6336
- boost::scoped_ptr <SvMemoryStream> pOut ;
6336
+ std::unique_ptr <SvMemoryStream> xOut ;
6337
6337
if ( bZCodecCompression )
6338
6338
{
6339
- pOut .reset (new SvMemoryStream ( 0x8000 , 0x4000 ));
6339
+ xOut .reset (new SvMemoryStream ( 0x8000 , 0x4000 ));
6340
6340
ZCodec aZCodec ( 0x8000 , 0x8000 );
6341
6341
aZCodec.BeginCompression ();
6342
- aZCodec.Decompress ( rBLIPStream, *pOut );
6342
+ aZCodec.Decompress ( rBLIPStream, *xOut );
6343
6343
aZCodec.EndCompression ();
6344
- pOut ->Seek ( STREAM_SEEK_TO_BEGIN );
6345
- pOut ->SetResizeOffset ( 0 ); // sj: #i102257# setting ResizeOffset of 0 prevents from seeking
6344
+ xOut ->Seek ( STREAM_SEEK_TO_BEGIN );
6345
+ xOut ->SetResizeOffset ( 0 ); // sj: #i102257# setting ResizeOffset of 0 prevents from seeking
6346
6346
// behind the stream end (allocating too much memory)
6347
- pGrStream = pOut .get ();
6347
+ pGrStream = xOut .get ();
6348
6348
}
6349
6349
6350
6350
#if OSL_DEBUG_LEVEL > 2
@@ -6376,24 +6376,24 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
6376
6376
6377
6377
SAL_INFO (" filter.ms" , " dumping " << aURLStr);
6378
6378
6379
- boost::scoped_ptr <SvStream> pDbgOut (::utl::UcbStreamHelper::CreateStream (aURLStr, StreamMode::TRUNC | StreamMode::WRITE));
6379
+ std::unique_ptr <SvStream> pDbgOut (::utl::UcbStreamHelper::CreateStream (aURLStr, StreamMode::TRUNC | StreamMode::WRITE));
6380
6380
6381
6381
if ( pDbgOut )
6382
6382
{
6383
6383
if ( bZCodecCompression )
6384
6384
{
6385
- pOut ->Seek ( STREAM_SEEK_TO_END );
6386
- pDbgOut->Write ( pOut ->GetData (), pOut ->Tell () );
6387
- pOut ->Seek ( STREAM_SEEK_TO_BEGIN );
6385
+ xOut ->Seek ( STREAM_SEEK_TO_END );
6386
+ pDbgOut->Write ( xOut ->GetData (), xOut ->Tell () );
6387
+ xOut ->Seek ( STREAM_SEEK_TO_BEGIN );
6388
6388
}
6389
6389
else
6390
6390
{
6391
6391
sal_Int32 nDbgLen = nLength - nSkip;
6392
6392
if ( nDbgLen )
6393
6393
{
6394
- boost ::scoped_array<sal_Char> pDat (new sal_Char[ nDbgLen ]);
6395
- pGrStream->Read ( pDat .get (), nDbgLen );
6396
- pDbgOut->Write ( pDat .get (), nDbgLen );
6394
+ std ::scoped_array<sal_Char> xDat (new sal_Char[ nDbgLen ]);
6395
+ pGrStream->Read ( xDat .get (), nDbgLen );
6396
+ pDbgOut->Write ( xDat .get (), nDbgLen );
6397
6397
pGrStream->SeekRel ( -nDbgLen );
6398
6398
}
6399
6399
}
@@ -6905,7 +6905,7 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
6905
6905
{
6906
6906
// TODO/MBA: check if (and when) storage and stream will be destroyed!
6907
6907
const SfxFilter* pFilter = 0 ;
6908
- ::boost::scoped_ptr <SvMemoryStream> xMemStream (new SvMemoryStream);
6908
+ std::unique_ptr <SvMemoryStream> xMemStream (new SvMemoryStream);
6909
6909
if ( pName )
6910
6910
{
6911
6911
// TODO/LATER: perhaps we need to retrieve VisArea and Metafile from the storage also
0 commit comments