Skip to content

Commit 3744d85

Browse files
author
Caolán McNamara
committed
boost->std
Change-Id: I8371b942d915f777a29ca01cd0aed674db0ca853
1 parent 7a17c03 commit 3744d85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+397
-401
lines changed

basctl/inc/pch/precompiled_basctl.hxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
#include <com/sun/star/util/theMacroExpander.hpp>
9898
#include <comphelper/documentinfo.hxx>
9999
#include <comphelper/processfactory.hxx>
100-
#include <comphelper/scoped_disposing_ptr.hxx>
100+
#include <comphelper/unique_disposing_ptr.hxx>
101101
#include <comphelper/stl_types.hxx>
102102
#include <comphelper/string.hxx>
103103
#include <comphelper/types.hxx>

basctl/source/basicide/iderdll.cxx

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
1818
*/
1919

20-
#include <comphelper/scoped_disposing_ptr.hxx>
20+
#include <comphelper/unique_disposing_ptr.hxx>
2121
#include <comphelper/processfactory.hxx>
2222

2323
#include <iderdll.hxx>
@@ -48,7 +48,7 @@ namespace
4848
class Dll
4949
{
5050
Shell* m_pShell;
51-
boost::scoped_ptr<ExtraData> m_pExtraData;
51+
std::unique_ptr<ExtraData> m_xExtraData;
5252

5353
public:
5454
Dll ();
@@ -60,10 +60,10 @@ class Dll
6060

6161
// Holds a basctl::Dll and release it on exit, or dispose of the
6262
//default XComponent, whichever comes first
63-
class DllInstance : public comphelper::scoped_disposing_solar_mutex_reset_ptr<Dll>
63+
class DllInstance : public comphelper::unique_disposing_solar_mutex_reset_ptr<Dll>
6464
{
6565
public:
66-
DllInstance() : comphelper::scoped_disposing_solar_mutex_reset_ptr<Dll>(Reference<lang::XComponent>( frame::Desktop::create(comphelper::getProcessComponentContext()), UNO_QUERY_THROW), new Dll)
66+
DllInstance() : comphelper::unique_disposing_solar_mutex_reset_ptr<Dll>(Reference<lang::XComponent>( frame::Desktop::create(comphelper::getProcessComponentContext()), UNO_QUERY_THROW), new Dll)
6767
{ }
6868
};
6969

@@ -137,9 +137,9 @@ Dll::Dll () :
137137

138138
ExtraData* Dll::GetExtraData ()
139139
{
140-
if (!m_pExtraData)
141-
m_pExtraData.reset(new ExtraData);
142-
return m_pExtraData.get();
140+
if (!m_xExtraData)
141+
m_xExtraData.reset(new ExtraData);
142+
return m_xExtraData.get();
143143
}
144144

145145
} // namespace

cppcanvas/qa/extras/emfplus/emfplus.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ class Test : public UnoApiTest
5757
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
5858
CPPUNIT_ASSERT(pModel);
5959
SfxObjectShell* pShell = pModel->GetObjectShell();
60-
boost::shared_ptr<GDIMetaFile> pMetaFile = pShell->GetPreviewMetaFile();
60+
std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
6161
BitmapEx aResultBitmap;
62-
CPPUNIT_ASSERT(pMetaFile->CreateThumbnail(aResultBitmap));
62+
CPPUNIT_ASSERT(xMetaFile->CreateThumbnail(aResultBitmap));
6363
// If this is set, the metafile will be dumped as a PNG one for debug purposes.
6464
char* pEnv = getenv("CPPCANVAS_DEBUG_EMFPLUS_DUMP_TO");
6565
if (pEnv)

drawinglayer/inc/pch/precompiled_drawinglayer.hxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
#include <comphelper/broadcasthelper.hxx>
8181
#include <comphelper/processfactory.hxx>
8282
#include <comphelper/random.hxx>
83-
#include <comphelper/scoped_disposing_ptr.hxx>
83+
#include <comphelper/unique_disposing_ptr.hxx>
8484
#include <comphelper/string.hxx>
8585
#include <cppuhelper/factory.hxx>
8686
#include <cppuhelper/implbase2.hxx>

drawinglayer/source/primitive2d/textlayoutdevice.cxx

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
2525
#include <comphelper/processfactory.hxx>
26-
#include <comphelper/scoped_disposing_ptr.hxx>
26+
#include <comphelper/unique_disposing_ptr.hxx>
2727
#include <vcl/timer.hxx>
2828
#include <vcl/virdev.hxx>
2929
#include <vcl/font.hxx>
@@ -46,10 +46,10 @@ namespace
4646
//The ImpTimerRefDev itself, if the timeout ever gets hit, will call
4747
//reset on the scoped_timed_RefDev to release the ImpTimerRefDev early
4848
//if its unused for a few minutes
49-
class scoped_timed_RefDev : public comphelper::scoped_disposing_ptr<ImpTimedRefDev>
49+
class scoped_timed_RefDev : public comphelper::unique_disposing_ptr<ImpTimedRefDev>
5050
{
5151
public:
52-
scoped_timed_RefDev() : comphelper::scoped_disposing_ptr<ImpTimedRefDev>((::com::sun::star::uno::Reference<com::sun::star::lang::XComponent>(::comphelper::getProcessComponentContext(), ::com::sun::star::uno::UNO_QUERY_THROW)))
52+
scoped_timed_RefDev() : comphelper::unique_disposing_ptr<ImpTimedRefDev>((::com::sun::star::uno::Reference<com::sun::star::lang::XComponent>(::comphelper::getProcessComponentContext(), ::com::sun::star::uno::UNO_QUERY_THROW)))
5353
{
5454
}
5555
};

filter/source/msfilter/escherex.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2588,7 +2588,7 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape,
25882588
EnhancedCustomShape2d aCustoShape2d( pCustoShape );
25892589
try
25902590
{
2591-
::boost::shared_ptr< EnhancedCustomShape::ExpressionNode > aExpressNode(
2591+
std::shared_ptr< EnhancedCustomShape::ExpressionNode > aExpressNode(
25922592
EnhancedCustomShape::FunctionParser::parseFunction( sEquationSource[ i ], aCustoShape2d ) );
25932593
com::sun::star::drawing::EnhancedCustomShapeParameter aPara( aExpressNode->fillNode( rEquations, NULL, 0 ) );
25942594
if ( aPara.Type != com::sun::star::drawing::EnhancedCustomShapeParameterType::EQUATION )

filter/source/msfilter/msdffimp.cxx

+39-39
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
#include <rtl/ustring.hxx>
138138
#include <svtools/embedhlp.hxx>
139139
#include <boost/scoped_array.hpp>
140-
#include <boost/scoped_ptr.hpp>
140+
#include <memory>
141141

142142
using namespace ::com::sun::star ;
143143
using namespace ::com::sun::star::drawing;
@@ -257,25 +257,25 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
257257

258258
if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( OUString("d:\\ashape.dbg"), aURLStr ) )
259259
{
260-
boost::scoped_ptr<SvStream> pOut(::utl::UcbStreamHelper::CreateStream( aURLStr, StreamMode::WRITE ));
260+
std::unique_ptr<SvStream> xOut(::utl::UcbStreamHelper::CreateStream( aURLStr, StreamMode::WRITE ));
261261

262-
if( pOut )
262+
if( xOut )
263263
{
264-
pOut->Seek( STREAM_SEEK_TO_END );
264+
xOut->Seek( STREAM_SEEK_TO_END );
265265

266266
if ( IsProperty( DFF_Prop_adjustValue ) || IsProperty( DFF_Prop_pVertices ) )
267267
{
268-
pOut->WriteLine( "" );
268+
xOut->WriteLine( "" );
269269
OString aString("ShapeId: " + OString::number(nShapeId));
270-
pOut->WriteLine(aString);
270+
xOut->WriteLine(aString);
271271
}
272272
for ( sal_uInt32 i = DFF_Prop_adjustValue; i <= DFF_Prop_adjust10Value; i++ )
273273
{
274274
if ( IsProperty( i ) )
275275
{
276276
OString aString("Prop_adjustValue" + OString::number( ( i - DFF_Prop_adjustValue ) + 1 ) +
277277
":" + OString::number(GetPropertyValue(i)) );
278-
pOut->WriteLine(aString);
278+
xOut->WriteLine(aString);
279279
}
280280
}
281281
sal_Int32 i;
@@ -290,15 +290,15 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
290290
sal_Int32 nLen = (sal_Int32)GetPropertyValue( i );
291291
if ( nLen )
292292
{
293-
pOut->WriteLine( "" );
293+
xOut->WriteLine( "" );
294294
OStringBuffer aDesc("Property:" + OString::number(i) +
295295
" Size:" + OString::number(nLen));
296-
pOut->WriteLine(aDesc.makeStringAndClear());
296+
xOut->WriteLine(aDesc.makeStringAndClear());
297297
sal_Int16 nNumElem, nNumElemMem, nNumSize;
298298
rIn >> nNumElem >> nNumElemMem >> nNumSize;
299299
aDesc.append("Entries: " + OString::number(nNumElem) +
300300
" Size:" + OString::number(nNumSize));
301-
pOut->WriteLine(aDesc.makeStringAndClear());
301+
xOut->WriteLine(aDesc.makeStringAndClear());
302302
if ( nNumSize < 0 )
303303
nNumSize = ( ( -nNumSize ) >> 2 );
304304
if ( !nNumSize )
@@ -315,29 +315,29 @@ void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
315315
sal_uInt8 nVal;
316316
rIn >> nVal;
317317
if ( ( nVal >> 4 ) > 9 )
318-
*pOut << (sal_uInt8)( ( nVal >> 4 ) + 'A' - 10 );
318+
*xOut << (sal_uInt8)( ( nVal >> 4 ) + 'A' - 10 );
319319
else
320-
*pOut << (sal_uInt8)( ( nVal >> 4 ) + '0' );
320+
*xOut << (sal_uInt8)( ( nVal >> 4 ) + '0' );
321321

322322
if ( ( nVal & 0xf ) > 9 )
323-
*pOut << (sal_uInt8)( ( nVal & 0xf ) + 'A' - 10 );
323+
*xOut << (sal_uInt8)( ( nVal & 0xf ) + 'A' - 10 );
324324
else
325-
*pOut << (sal_uInt8)( ( nVal & 0xf ) + '0' );
325+
*xOut << (sal_uInt8)( ( nVal & 0xf ) + '0' );
326326

327327
nLen--;
328328
}
329329
}
330-
*pOut << (char)( ' ' );
330+
*xOut << (char)( ' ' );
331331
}
332-
pOut->WriteLine( OString() );
332+
xOut->WriteLine( OString() );
333333
}
334334
}
335335
}
336336
else
337337
{
338338
OString aString("Property" + OString::number(i) +
339339
":" + OString::number(GetPropertyValue(i)));
340-
pOut->WriteLine(aString);
340+
xOut->WriteLine(aString);
341341
}
342342
}
343343
}
@@ -3084,15 +3084,15 @@ DffRecordHeader* DffRecordManager::GetRecordHeader( sal_uInt16 nRecId, DffSeekTo
30843084

30853085

30863086
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
30893089
{
30903090
return lhs->nShapeId < rhs->nShapeId;
30913091
}
30923092

30933093
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
30963096
{
30973097
return lhs->nTxBxComp < rhs->nTxBxComp;
30983098
}
@@ -5144,7 +5144,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
51445144
// the object with a frame, otherwise
51455145
if( bTextFrame )
51465146
{
5147-
::boost::shared_ptr<SvxMSDffShapeInfo> const pTmpRec(
5147+
std::shared_ptr<SvxMSDffShapeInfo> const pTmpRec(
51485148
new SvxMSDffShapeInfo(0, pImpRec->nShapeId));
51495149

51505150
SvxMSDffShapeInfos_ById::const_iterator const it =
@@ -5707,7 +5707,7 @@ void SvxMSDffManager::CheckTxBxStoryChain()
57075707
mark = m_xShapeInfosByTxBxComp->begin();
57085708
iter != m_xShapeInfosByTxBxComp->end(); ++iter)
57095709
{
5710-
boost::shared_ptr<SvxMSDffShapeInfo> const pObj = *iter;
5710+
std::shared_ptr<SvxMSDffShapeInfo> const pObj = *iter;
57115711
if( pObj->nTxBxComp )
57125712
{
57135713
// group change?
@@ -6136,7 +6136,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
61366136
{
61376137
aInfo.bReplaceByFly = true;
61386138
}
6139-
m_xShapeInfosByTxBxComp->insert(::boost::shared_ptr<SvxMSDffShapeInfo>(
6139+
m_xShapeInfosByTxBxComp->insert(std::shared_ptr<SvxMSDffShapeInfo>(
61406140
new SvxMSDffShapeInfo(aInfo)));
61416141
pShapeOrders->push_back( new SvxMSDffShapeOrder( aInfo.nShapeId ) );
61426142
}
@@ -6156,7 +6156,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
61566156
bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape,
61576157
SvxMSDffImportData& rData)
61586158
{
6159-
::boost::shared_ptr<SvxMSDffShapeInfo> const pTmpRec(
6159+
std::shared_ptr<SvxMSDffShapeInfo> const pTmpRec(
61606160
new SvxMSDffShapeInfo(0, nId));
61616161

61626162
SvxMSDffShapeInfos_ById::const_iterator const it =
@@ -6333,18 +6333,18 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
63336333
rBLIPStream.SeekRel( nSkip );
63346334

63356335
SvStream* pGrStream = &rBLIPStream;
6336-
boost::scoped_ptr<SvMemoryStream> pOut;
6336+
std::unique_ptr<SvMemoryStream> xOut;
63376337
if( bZCodecCompression )
63386338
{
6339-
pOut.reset(new SvMemoryStream( 0x8000, 0x4000 ));
6339+
xOut.reset(new SvMemoryStream( 0x8000, 0x4000 ));
63406340
ZCodec aZCodec( 0x8000, 0x8000 );
63416341
aZCodec.BeginCompression();
6342-
aZCodec.Decompress( rBLIPStream, *pOut );
6342+
aZCodec.Decompress( rBLIPStream, *xOut );
63436343
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
63466346
// behind the stream end (allocating too much memory)
6347-
pGrStream = pOut.get();
6347+
pGrStream = xOut.get();
63486348
}
63496349

63506350
#if OSL_DEBUG_LEVEL > 2
@@ -6376,24 +6376,24 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
63766376

63776377
SAL_INFO("filter.ms", "dumping " << aURLStr);
63786378

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));
63806380

63816381
if( pDbgOut )
63826382
{
63836383
if ( bZCodecCompression )
63846384
{
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 );
63886388
}
63896389
else
63906390
{
63916391
sal_Int32 nDbgLen = nLength - nSkip;
63926392
if ( nDbgLen )
63936393
{
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 );
63976397
pGrStream->SeekRel( -nDbgLen );
63986398
}
63996399
}
@@ -6905,7 +6905,7 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
69056905
{
69066906
//TODO/MBA: check if (and when) storage and stream will be destroyed!
69076907
const SfxFilter* pFilter = 0;
6908-
::boost::scoped_ptr<SvMemoryStream> xMemStream (new SvMemoryStream);
6908+
std::unique_ptr<SvMemoryStream> xMemStream (new SvMemoryStream);
69096909
if ( pName )
69106910
{
69116911
// TODO/LATER: perhaps we need to retrieve VisArea and Metafile from the storage also

0 commit comments

Comments
 (0)