diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-12 12:21:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-13 19:38:08 +0000 |
commit | 47d3e82e4f2c0c06231c952a0cc2456b712da0cc (patch) | |
tree | 0f5d4aa62edb85d7c13bb6430aadfa9635c9e3ef | |
parent | libfreehand: FHTransform defined as a struct but declared as a class (diff) | |
download | core-47d3e82e4f2c0c06231c952a0cc2456b712da0cc.tar.gz core-47d3e82e4f2c0c06231c952a0cc2456b712da0cc.zip |
boost->std
Change-Id: I9b4f884c6313a53fea543ea6f93175205351ad14
Reviewed-on: https://gerrit.libreoffice.org/18517
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
23 files changed, 78 insertions, 88 deletions
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index 41a32feed7e4..961f07b05463 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -375,9 +375,9 @@ namespace damaged( basegfx::B2IBox( rDamagePoint, aEnd ) ); } - static boost::shared_ptr<BitmapRenderer> getCompatibleBitmap( const BitmapDeviceSharedPtr& bmp ) + static std::shared_ptr<BitmapRenderer> getCompatibleBitmap( const BitmapDeviceSharedPtr& bmp ) { - return boost::dynamic_pointer_cast< BitmapRenderer >( bmp ); + return std::dynamic_pointer_cast< BitmapRenderer >( bmp ); } virtual bool isCompatibleBitmap( const BitmapDeviceSharedPtr& bmp ) const SAL_OVERRIDE @@ -387,9 +387,9 @@ namespace return getCompatibleBitmap(bmp).get() != NULL; } - boost::shared_ptr<mask_bitmap_type> getCompatibleClipMask( const BitmapDeviceSharedPtr& bmp ) const + std::shared_ptr<mask_bitmap_type> getCompatibleClipMask( const BitmapDeviceSharedPtr& bmp ) const { - boost::shared_ptr<mask_bitmap_type> pMask( boost::dynamic_pointer_cast<mask_bitmap_type>( bmp )); + std::shared_ptr<mask_bitmap_type> pMask( std::dynamic_pointer_cast<mask_bitmap_type>( bmp )); if( !pMask ) return pMask; @@ -404,12 +404,12 @@ namespace { // TODO(P1): dynamic_cast usually called twice for // compatible formats - return boost::dynamic_pointer_cast<mask_bitmap_type>( bmp ).get() != NULL; + return std::dynamic_pointer_cast<mask_bitmap_type>( bmp ).get() != NULL; } - static boost::shared_ptr<alphamask_bitmap_type> getCompatibleAlphaMask( const BitmapDeviceSharedPtr& bmp ) + static std::shared_ptr<alphamask_bitmap_type> getCompatibleAlphaMask( const BitmapDeviceSharedPtr& bmp ) { - return boost::dynamic_pointer_cast<alphamask_bitmap_type>( bmp ); + return std::dynamic_pointer_cast<alphamask_bitmap_type>( bmp ); } virtual void clear_i( Color fillColor, @@ -445,7 +445,7 @@ namespace DrawMode drawMode, const BitmapDeviceSharedPtr& rClip ) SAL_OVERRIDE { - boost::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rClip) ); + std::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rClip) ); OSL_ASSERT( pMask ); const vigra::Diff2D offset(rPt.getX(), @@ -562,7 +562,7 @@ namespace composite_iterator_type getMaskedIter( const BitmapDeviceSharedPtr& rClip ) const { - boost::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rClip) ); + std::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rClip) ); OSL_ASSERT( pMask ); return composite_iterator_type( maBegin, @@ -713,7 +713,7 @@ namespace const Iterator& begin, const RawAcc& acc) { - boost::shared_ptr<BitmapRenderer> pSrcBmp( getCompatibleBitmap(rSrcBitmap) ); + std::shared_ptr<BitmapRenderer> pSrcBmp( getCompatibleBitmap(rSrcBitmap) ); OSL_ASSERT( pSrcBmp ); scaleImage( @@ -867,8 +867,8 @@ namespace const basegfx::B2IBox& rSrcRect, const basegfx::B2IPoint& rDstPoint ) SAL_OVERRIDE { - boost::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rAlphaMask) ); - boost::shared_ptr<alphamask_bitmap_type> pAlpha( getCompatibleAlphaMask(rAlphaMask) ); + std::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rAlphaMask) ); + std::shared_ptr<alphamask_bitmap_type> pAlpha( getCompatibleAlphaMask(rAlphaMask) ); if( pAlpha ) { @@ -917,8 +917,8 @@ namespace const basegfx::B2IPoint& rDstPoint, const BitmapDeviceSharedPtr& rClip ) SAL_OVERRIDE { - boost::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rAlphaMask) ); - boost::shared_ptr<alphamask_bitmap_type> pAlpha( getCompatibleAlphaMask(rAlphaMask) ); + std::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rAlphaMask) ); + std::shared_ptr<alphamask_bitmap_type> pAlpha( getCompatibleAlphaMask(rAlphaMask) ); if( pAlpha ) { @@ -935,7 +935,7 @@ namespace } else if( pMask ) { - boost::shared_ptr<mask_bitmap_type> pClipMask( getCompatibleClipMask(rClip) ); + std::shared_ptr<mask_bitmap_type> pClipMask( getCompatibleClipMask(rClip) ); OSL_ASSERT( pClipMask ); // setup a ((iter,mask),clipMask) composite composite @@ -982,8 +982,8 @@ namespace const Iterator& begin, const Acc& acc) { - boost::shared_ptr<BitmapRenderer> pSrcBmp( getCompatibleBitmap(rSrcBitmap) ); - boost::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rMask) ); + std::shared_ptr<BitmapRenderer> pSrcBmp( getCompatibleBitmap(rSrcBitmap) ); + std::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rMask) ); OSL_ASSERT( pMask && pSrcBmp ); scaleImage( @@ -1829,7 +1829,7 @@ PaletteMemorySharedVector createStandardPalette( if( pPal || nNumEntries <= 0 ) return pPal; - boost::shared_ptr< std::vector<Color> > pLocalPal( + std::shared_ptr< std::vector<Color> > pLocalPal( new std::vector<Color>(nNumEntries) ); const sal_Int32 nIncrement( 0x00FFFFFF/nNumEntries ); diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx index 7241e1e3970f..98d6d16ae40b 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.hxx +++ b/canvas/source/cairo/cairo_canvasbitmap.hxx @@ -30,8 +30,6 @@ #include <basegfx/vector/b2isize.hxx> -#include <boost/shared_ptr.hpp> - #include <canvas/base/basemutexhelper.hxx> #include <canvas/base/integerbitmapbase.hxx> diff --git a/include/basebmp/bitmapdevice.hxx b/include/basebmp/bitmapdevice.hxx index 7668f9cab19c..924d505a9e75 100644 --- a/include/basebmp/bitmapdevice.hxx +++ b/include/basebmp/bitmapdevice.hxx @@ -25,9 +25,7 @@ #include <basebmp/scanlineformats.hxx> #include <basebmp/basebmpdllapi.h> -#include <boost/shared_ptr.hpp> #include <boost/shared_array.hpp> -#include <boost/enable_shared_from_this.hpp> #include <boost/noncopyable.hpp> #include <memory> #include <vector> @@ -47,10 +45,10 @@ namespace basebmp // Temporary. Use like the tools color object class Color; -typedef boost::shared_ptr< class BitmapDevice > BitmapDeviceSharedPtr; -typedef boost::shared_ptr< struct IBitmapDeviceDamageTracker > IBitmapDeviceDamageTrackerSharedPtr; +typedef std::shared_ptr< class BitmapDevice > BitmapDeviceSharedPtr; +typedef std::shared_ptr< struct IBitmapDeviceDamageTracker > IBitmapDeviceDamageTrackerSharedPtr; typedef boost::shared_array< sal_uInt8 > RawMemorySharedArray; -typedef boost::shared_ptr< const std::vector<Color> > PaletteMemorySharedVector; +typedef std::shared_ptr< const std::vector<Color> > PaletteMemorySharedVector; struct ImplBitmapDevice; @@ -76,7 +74,7 @@ protected: works best when given as an eight bit grey bitmap. Everything else is accepted, but potentially slow. */ -class BASEBMP_DLLPUBLIC BitmapDevice : public boost::enable_shared_from_this<BitmapDevice>, +class BASEBMP_DLLPUBLIC BitmapDevice : public std::enable_shared_from_this<BitmapDevice>, private boost::noncopyable { public: diff --git a/include/vcl/cairo.hxx b/include/vcl/cairo.hxx index 13983a84d63f..7ca45efba74f 100644 --- a/include/vcl/cairo.hxx +++ b/include/vcl/cairo.hxx @@ -21,8 +21,8 @@ #define INCLUDED_VCL_CAIRO_HXX #include <sal/config.h> -#include <boost/shared_ptr.hpp> #include <vcl/vclptr.hxx> +#include <memory> typedef struct _cairo_surface cairo_surface_t; typedef struct _cairo cairo_t; @@ -31,8 +31,8 @@ class VirtualDevice; namespace cairo { - typedef boost::shared_ptr<cairo_surface_t> CairoSurfaceSharedPtr; - typedef boost::shared_ptr<cairo_t> CairoSharedPtr; + typedef std::shared_ptr<cairo_surface_t> CairoSurfaceSharedPtr; + typedef std::shared_ptr<cairo_t> CairoSharedPtr; /** Cairo surface interface @@ -47,7 +47,7 @@ namespace cairo { // Query methods virtual CairoSharedPtr getCairo() const = 0; virtual CairoSurfaceSharedPtr getCairoSurface() const = 0; - virtual boost::shared_ptr<Surface> getSimilar(int cairo_content_type, int width, int height) const = 0; + virtual std::shared_ptr<Surface> getSimilar(int cairo_content_type, int width, int height) const = 0; /// factory for VirDev on this surface virtual VclPtr<VirtualDevice> createVirtualDevice() const = 0; @@ -60,7 +60,7 @@ namespace cairo { virtual void flush() const = 0; }; - typedef boost::shared_ptr<Surface> SurfaceSharedPtr; + typedef std::shared_ptr<Surface> SurfaceSharedPtr; } #endif diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 74fab27e3635..ecc503829051 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -279,7 +279,7 @@ private: OUString fragmentShader; OString preamble; }; - std::map<ProgramKey, boost::shared_ptr<OpenGLProgram> > maPrograms; + std::map<ProgramKey, std::shared_ptr<OpenGLProgram> > maPrograms; OpenGLProgram* mpCurrentProgram; #ifdef DBG_UTIL std::set<SalGraphicsImpl*> maParents; diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 40831462789f..d96864db5114 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -56,8 +56,6 @@ #include <tblrwcl.hxx> #include <unochart.hxx> #include <o3tl/numeric.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> #include <calbck.hxx> #include <docary.hxx> @@ -249,7 +247,7 @@ typedef o3tl::sorted_vector<_CpyTabFrm> _CpyTabFrms; struct _CpyPara { - boost::shared_ptr< std::vector< std::vector< sal_uLong > > > pWidths; + std::shared_ptr< std::vector< std::vector< sal_uLong > > > pWidths; SwDoc* pDoc; SwTableNode* pTableNd; _CpyTabFrms& rTabFrmArr; @@ -1736,7 +1734,7 @@ static void lcl_CalcNewWidths(const FndLines_t& rFndLines, _CpyPara& rPara) const size_t nLineCount = rFndLines.size(); if( nLineCount ) { - rPara.pWidths = boost::shared_ptr< std::vector< std::vector< sal_uLong > > > + rPara.pWidths = std::shared_ptr< std::vector< std::vector< sal_uLong > > > ( new std::vector< std::vector< sal_uLong > >( nLineCount )); // First we collect information about the left/right borders of all // selected cells @@ -3385,7 +3383,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, const SwFormatFrmSize& rSz = GetFrameFormat()->GetFrmSize(); const SvxLRSpaceItem& rLR = GetFrameFormat()->GetLRSpace(); - boost::scoped_ptr<_FndBox> xFndBox; // for insertion/deletion + std::unique_ptr<_FndBox> xFndBox; // for insertion/deletion SwTableSortBoxes aTmpLst; // for Undo bool bBigger, bRet = false, @@ -4120,7 +4118,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, while( pBaseLine->GetUpper() ) pBaseLine = pBaseLine->GetUpper()->GetUpper(); - boost::scoped_ptr<_FndBox> xFndBox; // for insertion/deletion + std::unique_ptr<_FndBox> xFndBox; // for insertion/deletion SwTableSortBoxes aTmpLst; // for Undo bool bBigger, bRet = false, diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 24cd281b3bf8..b30d5718bd15 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -65,7 +65,6 @@ #include <swcss1.hxx> #include <swhtml.hxx> #include <numrule.hxx> -#include <boost/shared_ptr.hpp> #include <vcl/graphicfilter.hxx> #include <tools/urlobj.hxx> diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 7ca574f651e2..498d3af13bc4 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -204,7 +204,7 @@ class HTMLTableCell HTMLTableCnts *pContents; // cell content SvxBrushItem *pBGBrush; // cell background // !!!ATTENTION!!!!! - ::boost::shared_ptr<SvxBoxItem> m_pBoxItem; + std::shared_ptr<SvxBoxItem> m_pBoxItem; sal_uInt32 nNumFormat; sal_uInt16 nRowSpan; // cell ROWSPAN @@ -228,7 +228,7 @@ public: // Fill a not empty cell void Set( HTMLTableCnts *pCnts, sal_uInt16 nRSpan, sal_uInt16 nCSpan, sal_Int16 eVertOri, SvxBrushItem *pBGBrush, - ::boost::shared_ptr<SvxBoxItem> const& rBoxItem, + std::shared_ptr<SvxBoxItem> const& rBoxItem, bool bHasNumFormat, sal_uInt32 nNumFormat, bool bHasValue, double nValue, bool bNoWrap, bool bCovered ); @@ -249,7 +249,7 @@ public: inline void SetWidth( sal_uInt16 nWidth, bool bRelWidth ); const SvxBrushItem *GetBGBrush() const { return pBGBrush; } - ::boost::shared_ptr<SvxBoxItem> GetBoxItem() const { return m_pBoxItem; } + std::shared_ptr<SvxBoxItem> GetBoxItem() const { return m_pBoxItem; } inline bool GetNumFormat( sal_uInt32& rNumFormat ) const; inline bool GetValue( double& rValue ) const; @@ -548,7 +548,7 @@ public: void InsertCell( HTMLTableCnts *pCnts, sal_uInt16 nRowSpan, sal_uInt16 nColSpan, sal_uInt16 nWidth, bool bRelWidth, sal_uInt16 nHeight, sal_Int16 eVertOri, SvxBrushItem *pBGBrush, - boost::shared_ptr<SvxBoxItem> const& rBoxItem, + std::shared_ptr<SvxBoxItem> const& rBoxItem, bool bHasNumFormat, sal_uInt32 nNumFormat, bool bHasValue, double nValue, bool bNoWrap ); @@ -704,7 +704,7 @@ HTMLTableCell::~HTMLTableCell() void HTMLTableCell::Set( HTMLTableCnts *pCnts, sal_uInt16 nRSpan, sal_uInt16 nCSpan, sal_Int16 eVert, SvxBrushItem *pBrush, - ::boost::shared_ptr<SvxBoxItem> const& rBoxItem, + std::shared_ptr<SvxBoxItem> const& rBoxItem, bool bHasNF, sal_uInt32 nNF, bool bHasV, double nVal, bool bNWrap, bool bCovered ) { @@ -1333,7 +1333,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox, SwFrameFormat *pFrameFormat = 0; // frame::Frame-Format sal_Int16 eVOri = text::VertOrientation::NONE; const SvxBrushItem *pBGBrushItem = 0; // Hintergrund - boost::shared_ptr<SvxBoxItem> pBoxItem; + std::shared_ptr<SvxBoxItem> pBoxItem; bool bTopLine = false, bBottomLine = false, bLastBottomLine = false; bool bReUsable = false; // Format nochmals verwendbar? sal_uInt16 nEmptyRows = 0; @@ -2060,7 +2060,7 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts, sal_uInt16 nRowSpan, sal_uInt16 nColSpan, sal_uInt16 nCellWidth, bool bRelWidth, sal_uInt16 nCellHeight, sal_Int16 eVertOrient, SvxBrushItem *pBGBrushItem, - boost::shared_ptr<SvxBoxItem> const& rBoxItem, + std::shared_ptr<SvxBoxItem> const& rBoxItem, bool bHasNumFormat, sal_uInt32 nNumFormat, bool bHasValue, double nValue, bool bNoWrap ) { @@ -3067,7 +3067,7 @@ class _CellSaveStruct : public _SectionSaveStruct OUString aStyle, aId, aClass, aLang, aDir; OUString aBGImage; Color aBGColor; - boost::shared_ptr<SvxBoxItem> m_pBoxItem; + std::shared_ptr<SvxBoxItem> m_pBoxItem; HTMLTableCnts* pCnts; // Liste aller Inhalte HTMLTableCnts* pCurrCnts; // der aktuelle Inhalt oder 0 diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx index 8c9466b1c568..1fc1efa205e1 100644 --- a/sw/source/filter/ww8/WW8Sttbf.hxx +++ b/sw/source/filter/ww8/WW8Sttbf.hxx @@ -20,8 +20,8 @@ #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8STTBF_HXX #define INCLUDED_SW_SOURCE_FILTER_WW8_WW8STTBF_HXX +#include <memory> #include <vector> -#include <boost/shared_ptr.hpp> #include <boost/shared_array.hpp> #include <tools/solar.h> #include <rtl/ustring.hxx> @@ -55,7 +55,7 @@ typedef ::std::vector<OUString> StringVector_t; template <class T> class WW8Sttb : public WW8Struct { - typedef ::boost::shared_ptr< void > ExtraPointer_t; + typedef std::shared_ptr< void > ExtraPointer_t; typedef ::std::vector< ExtraPointer_t > ExtrasVector_t; bool bDoubleByteCharacters; StringVector_t m_Strings; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 29fde60af4b1..06454cff01a5 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -21,9 +21,9 @@ #define INCLUDED_SW_SOURCE_FILTER_WW8_WW8TABLEINFO_HXX #include <string> #include <map> +#include <memory> #include <set> #include <functional> -#include <boost/shared_ptr.hpp> #include <unordered_map> #include <vector> #include <sal/types.h> @@ -41,13 +41,13 @@ const unsigned int MAXTABLECELLS = 63; class WW8TableNodeInfo; typedef ::std::vector<const SwTableBox *> TableBoxVector; -typedef boost::shared_ptr<TableBoxVector> TableBoxVectorPtr; +typedef std::shared_ptr<TableBoxVector> TableBoxVectorPtr; typedef ::std::vector<sal_uInt32> GridCols; -typedef boost::shared_ptr<GridCols> GridColsPtr; +typedef std::shared_ptr<GridCols> GridColsPtr; typedef ::std::vector<sal_Int32> RowSpans; -typedef boost::shared_ptr<RowSpans> RowSpansPtr; +typedef std::shared_ptr<RowSpans> RowSpansPtr; typedef ::std::vector<sal_uInt32> Widths; -typedef boost::shared_ptr<Widths> WidthsPtr; +typedef std::shared_ptr<Widths> WidthsPtr; class WW8TableNodeInfoInner { @@ -67,7 +67,7 @@ class WW8TableNodeInfoInner SwRect maRect; public: - typedef boost::shared_ptr<WW8TableNodeInfoInner> Pointer_t; + typedef std::shared_ptr<WW8TableNodeInfoInner> Pointer_t; explicit WW8TableNodeInfoInner(WW8TableNodeInfo * pParent); ~WW8TableNodeInfoInner(); @@ -177,7 +177,7 @@ private: const SwNode * mpNextNode; public: - typedef boost::shared_ptr<WW8TableNodeInfo> Pointer_t; + typedef std::shared_ptr<WW8TableNodeInfo> Pointer_t; WW8TableNodeInfo(WW8TableInfo * pParent, const SwNode * pTextNode); virtual ~WW8TableNodeInfo(); @@ -232,13 +232,13 @@ struct hashTable class WW8TableCellGridRow { - boost::shared_ptr<CellInfoMultiSet> m_pCellInfos; + std::shared_ptr<CellInfoMultiSet> m_pCellInfos; TableBoxVectorPtr m_pTableBoxVector; WidthsPtr m_pWidths; RowSpansPtr m_pRowSpans; public: - typedef boost::shared_ptr<WW8TableCellGridRow> Pointer_t; + typedef std::shared_ptr<WW8TableCellGridRow> Pointer_t; WW8TableCellGridRow(); ~WW8TableCellGridRow(); @@ -270,7 +270,7 @@ class WW8TableCellGrid CellInfoMultiSet::const_iterator getCellsEnd(long nTop); public: - typedef ::boost::shared_ptr<WW8TableCellGrid> Pointer_t; + typedef std::shared_ptr<WW8TableCellGrid> Pointer_t; WW8TableCellGrid(); ~WW8TableCellGrid(); @@ -336,7 +336,7 @@ class WW8TableInfo bool bCreate = true); public: - typedef boost::shared_ptr<WW8TableInfo> Pointer_t; + typedef std::shared_ptr<WW8TableInfo> Pointer_t; WW8TableInfo(); virtual ~WW8TableInfo(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index d3ccb5a0c791..58ae8c6ca9a3 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -450,7 +450,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT { // write the paragraph properties + the run, already in the correct order m_pSerializer->mergeTopMarks(Tag_StartParagraph_2); - std::vector< boost::shared_ptr <sw::Frame> > aFramePrTextbox; + std::vector< std::shared_ptr <sw::Frame> > aFramePrTextbox; // Write the anchored frame if any // Word can't handle nested text boxes, so write them on the same level. ++m_nTextFrameLevel; @@ -526,7 +526,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT } else { - ::boost::shared_ptr<sw::Frame> pFramePr; + std::shared_ptr<sw::Frame> pFramePr; pFramePr.reset(new sw::Frame(aFrame)); aFramePrTextbox.push_back(pFramePr); } @@ -585,7 +585,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT // Write framePr if(!aFramePrTextbox.empty()) { - for (std::vector< boost::shared_ptr<sw::Frame> > ::iterator it = aFramePrTextbox.begin() ; it != aFramePrTextbox.end(); ++it) + for (std::vector< std::shared_ptr<sw::Frame> > ::iterator it = aFramePrTextbox.begin() ; it != aFramePrTextbox.end(); ++it) { DocxTableExportContext aTableExportContext; pushToTableExportContext(aTableExportContext); diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 6479726f0e64..cc68dcb12fad 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -896,7 +896,7 @@ private: PageMargins m_pageMargins; - boost::shared_ptr<DocxTableStyleExport> m_pTableStyleExport; + std::shared_ptr<DocxTableStyleExport> m_pTableStyleExport; // flag to check if auto spacing was set in original file bool m_bParaBeforeAutoSpacing,m_bParaAfterAutoSpacing; // store hardcoded value which was set during import. diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx index c1e4427dda47..8acf8a68726d 100644 --- a/sw/source/filter/ww8/escher.hxx +++ b/sw/source/filter/ww8/escher.hxx @@ -84,7 +84,7 @@ private: virtual SvStream* ImplQueryPictureStream() SAL_OVERRIDE; private: - boost::shared_ptr< SvStream > mxPicStrm; + std::shared_ptr< SvStream > mxPicStrm; }; class SwBasicEscherEx : public EscherEx diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 9894af6de708..da762b77a132 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1737,7 +1737,7 @@ bool WW8_WrPlcSepx::WriteKFText( WW8Export& rWrt ) for ( size_t i = 0; i < aSects.size(); ++i ) { - ::boost::shared_ptr<WW8_PdAttrDesc> const pAttrDesc(new WW8_PdAttrDesc); + std::shared_ptr<WW8_PdAttrDesc> const pAttrDesc(new WW8_PdAttrDesc); m_SectionAttributes.push_back(pAttrDesc); WW8_SepInfo& rSepInfo = aSects[i]; diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 5f63e60e0e03..4fbc1cb74242 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -237,7 +237,7 @@ public: class WW8_WrPlcSepx : public MSWordSections { std::vector<WW8_CP> aCps; - ::std::vector< ::boost::shared_ptr<WW8_PdAttrDesc> > m_SectionAttributes; + ::std::vector< std::shared_ptr<WW8_PdAttrDesc> > m_SectionAttributes; // hack to prevent adding sections in endnotes bool m_bHeaderFooterWritten; WW8_WrPlc0* pTextPos; // Position of the headers/footers @@ -462,7 +462,7 @@ public: std::stack< sal_Int32 > m_aCurrentCharPropStarts; ///< To remember the position in a run. WW8_WrtBookmarks* m_pBkmks; WW8_WrtRedlineAuthor* m_pRedlAuthors; - boost::shared_ptr<NfKeywordTable> m_pKeyMap; + std::shared_ptr<NfKeywordTable> m_pKeyMap; SvxMSExportOLEObjects* m_pOLEExp; SwMSConvertControls* m_pOCXExp; WW8OleMap m_aOleMap; // To remember all already exported ole objects diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 7187bfe1e6a7..197d161af9c5 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1258,9 +1258,9 @@ private: SwMSDffManager* m_pMSDffManager; std::vector<OUString>* m_pAtnNames; - boost::shared_ptr< std::map<sal_uInt32, int> > m_pAtnIndexes; - boost::shared_ptr<WW8PLCFspecial> m_pAtnStarts; - boost::shared_ptr<WW8PLCFspecial> m_pAtnEnds; + std::shared_ptr< std::map<sal_uInt32, int> > m_pAtnIndexes; + std::shared_ptr<WW8PLCFspecial> m_pAtnStarts; + std::shared_ptr<WW8PLCFspecial> m_pAtnEnds; sw::util::AuthorInfos m_aAuthorInfos; OUString m_sBaseURL; @@ -1363,7 +1363,7 @@ private: int m_nIdctHint; bool m_bBidi; bool m_bReadTable; - boost::shared_ptr<SwPaM> m_pTableEndPaM; + std::shared_ptr<SwPaM> m_pTableEndPaM; // Indicate that currently on loading a TOC, managed by Read_F_TOX() and End_Field() bool m_bLoadingTOXCache; int m_nEmbeddedTOXLevel; diff --git a/sw/source/ui/vba/vbalisthelper.hxx b/sw/source/ui/vba/vbalisthelper.hxx index 24f2bf56125d..88a773ec340c 100644 --- a/sw/source/ui/vba/vbalisthelper.hxx +++ b/sw/source/ui/vba/vbalisthelper.hxx @@ -13,10 +13,9 @@ #include <com/sun/star/container/XIndexReplace.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/text/XTextDocument.hpp> -#include <boost/shared_ptr.hpp> class SwVbaListHelper; -typedef ::boost::shared_ptr< SwVbaListHelper > SwVbaListHelperRef; +typedef std::shared_ptr< SwVbaListHelper > SwVbaListHelperRef; class SwVbaListHelper { diff --git a/sw/source/uibase/inc/FrameControlsManager.hxx b/sw/source/uibase/inc/FrameControlsManager.hxx index e87124b64be5..0d9c726955c8 100644 --- a/sw/source/uibase/inc/FrameControlsManager.hxx +++ b/sw/source/uibase/inc/FrameControlsManager.hxx @@ -12,16 +12,16 @@ #include <viewsh.hxx> #include <FrameControl.hxx> -#include <boost/shared_ptr.hpp> #include <tools/gen.hxx> #include <map> +#include <memory> #include <vector> class SwPageFrm; class SwEditWin; -typedef boost::shared_ptr< SwFrameControl > SwFrameControlPtr; +typedef std::shared_ptr< SwFrameControl > SwFrameControlPtr; typedef std::map<const SwFrm*, SwFrameControlPtr> SwFrameControlPtrMap; diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx index df1da591c45d..c6808fe5d43e 100644 --- a/sw/source/uibase/uiview/formatclipboard.cxx +++ b/sw/source/uibase/uiview/formatclipboard.cxx @@ -35,7 +35,6 @@ #include <editeng/frmdiritem.hxx> #include <fmtpdsc.hxx> #include <fmtrowsplt.hxx> -#include <boost/scoped_ptr.hpp> namespace { @@ -413,7 +412,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP rWrtShell.EndAction(); } -typedef boost::shared_ptr< SfxPoolItem > SfxPoolItemSharedPtr; +typedef std::shared_ptr< SfxPoolItem > SfxPoolItemSharedPtr; typedef std::vector< SfxPoolItemSharedPtr > ItemVector; // collect all PoolItems from the applied styles static void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSet ) @@ -510,7 +509,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo if ( m_pItemSet_ParAttr && m_pItemSet_ParAttr->Count() != 0 && !bNoParagraphFormats ) { // temporary SfxItemSet - boost::scoped_ptr<SfxItemSet> pTemplateItemSet(lcl_CreateEmptyItemSet( + std::unique_ptr<SfxItemSet> pTemplateItemSet(lcl_CreateEmptyItemSet( nSelectionType, *m_pItemSet_ParAttr->GetPool())); // no need to verify the existence of pTemplateItemSet as we // know that here the selection type is SEL_TXT @@ -543,7 +542,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo else { // temporary SfxItemSet - boost::scoped_ptr<SfxItemSet> pTemplateItemSet(lcl_CreateEmptyItemSet( + std::unique_ptr<SfxItemSet> pTemplateItemSet(lcl_CreateEmptyItemSet( nSelectionType, *m_pItemSet_TextAttr->GetPool(), true )); if(pTemplateItemSet) diff --git a/vcl/README.lifecycle b/vcl/README.lifecycle index 6b5cbd6e8df4..4bf17fb96cb5 100644 --- a/vcl/README.lifecycle +++ b/vcl/README.lifecycle @@ -11,7 +11,7 @@ or: pDialog->Execute(...); delete pDialog; or: - boost::shared_ptr<Dialog> xDialog(new pDialog()); // old + std::shared_ptr<Dialog> xDialog(new pDialog()); // old xDialog->Execute(...); // depending who shared the ptr this would be freed sometime @@ -118,7 +118,7 @@ or: - delete pDialog; + pDialog.disposeAndClear(); // done manually - replaces a delete or: -- boost::shared_ptr<Dialog> xDialog(new Dialog(...)); +- std::shared_ptr<Dialog> xDialog(new Dialog(...)); + ScopedVclPtrInstance<Dialog> xDialog(...); xDialog->Execute(...); + // depending how shared_ptr was shared perhaps diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index 95441c3ed775..3231043a882f 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -321,7 +321,7 @@ void SvpSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode { sal_uInt32 nEntries = 1U << nBitCount; - boost::shared_ptr< std::vector<basebmp::Color> > pPal( + std::shared_ptr< std::vector<basebmp::Color> > pPal( new std::vector<basebmp::Color>( nEntries, basebmp::Color(COL_WHITE))); const sal_uInt32 nColors = std::min( diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 91573eb5c3c0..181d5ab38be3 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -14,7 +14,6 @@ #include <vcl/syschild.hxx> #include <vcl/sysdata.hxx> -#include <boost/make_shared.hpp> #include <vcl/pngwrite.hxx> #include <vcl/bmpacc.hxx> #include <vcl/graph.hxx> @@ -1641,16 +1640,16 @@ OpenGLProgram* OpenGLContext::GetProgram( const OUString& rVertexShader, const O ProgramKey aKey( rVertexShader, rFragmentShader, preamble ); - std::map< ProgramKey, boost::shared_ptr<OpenGLProgram> >::iterator + std::map< ProgramKey, std::shared_ptr<OpenGLProgram> >::iterator it = maPrograms.find( aKey ); if( it != maPrograms.end() ) return it->second.get(); - boost::shared_ptr<OpenGLProgram> pProgram = boost::make_shared<OpenGLProgram>(); + std::shared_ptr<OpenGLProgram> pProgram = std::make_shared<OpenGLProgram>(); if( !pProgram->Load( rVertexShader, rFragmentShader, preamble ) ) return NULL; - maPrograms.insert(std::pair<ProgramKey, boost::shared_ptr<OpenGLProgram> >(aKey, pProgram)); + maPrograms.insert(std::pair<ProgramKey, std::shared_ptr<OpenGLProgram> >(aKey, pProgram)); return pProgram.get(); } diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx index 5be944f87e42..7cb5b5b39b40 100644 --- a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx +++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx @@ -64,7 +64,7 @@ namespace cairo { void clear() { mpDisplay=NULL; mhDrawable=0; } }; - typedef boost::shared_ptr<X11Pixmap> X11PixmapSharedPtr; + typedef std::shared_ptr<X11Pixmap> X11PixmapSharedPtr; class X11Surface : public Surface { |