diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 09:46:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 16:45:13 +0000 |
commit | c7258cfccdf9f4c5235da1b135801f957a5b0ec1 (patch) | |
tree | d5af5085ad1327afe2d41045ea452e017fea1fb6 /vcl/source/gdi/impimagetree.cxx | |
parent | O[U]StringBuffer::appendUninitialized unit tests (diff) | |
download | core-c7258cfccdf9f4c5235da1b135801f957a5b0ec1.tar.gz core-c7258cfccdf9f4c5235da1b135801f957a5b0ec1.zip |
shared_ptr<T>(new T(args)) -> make_shared<T>(args)
and boost:make_shared->std::make_shared
Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
Diffstat (limited to 'vcl/source/gdi/impimagetree.cxx')
-rw-r--r-- | vcl/source/gdi/impimagetree.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index aca1962fc54d..576bb8c60ce9 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -21,8 +21,6 @@ #include "sal/config.h" -#include <boost/shared_ptr.hpp> - #include "com/sun/star/container/XNameAccess.hpp" #include "com/sun/star/io/XInputStream.hpp" #include "com/sun/star/lang/Locale.hpp" @@ -56,14 +54,14 @@ static OUString createPath(OUString const & name, sal_Int32 pos, OUString const return name.copy(0, pos + 1) + locale + name.copy(pos); } -static boost::shared_ptr< SvStream > wrapStream(css::uno::Reference< css::io::XInputStream > const & stream) +static std::shared_ptr<SvStream> wrapStream(css::uno::Reference< css::io::XInputStream > const & stream) { // This could use SvInputStream instead if that did not have a broken // SeekPos implementation for an XInputStream that is not also XSeekable // (cf. "@@@" at tags/DEV300_m37/svtools/source/misc1/strmadpt.cxx@264807 // l. 593): OSL_ASSERT(stream.is()); - boost::shared_ptr< SvStream > s(new SvMemoryStream); + std::shared_ptr<SvStream> s(std::make_shared<SvMemoryStream>()); for (;;) { sal_Int32 const size = 2048; @@ -77,17 +75,17 @@ static boost::shared_ptr< SvStream > wrapStream(css::uno::Reference< css::io::XI return s; } -static void loadImageFromStream(boost::shared_ptr< SvStream > pStream, OUString const & rPath, BitmapEx & rBitmap) +static void loadImageFromStream(std::shared_ptr<SvStream> xStream, OUString const & rPath, BitmapEx & rBitmap) { if (rPath.endsWith(".png")) { - vcl::PNGReader aPNGReader( *pStream ); + vcl::PNGReader aPNGReader(*xStream); aPNGReader.SetIgnoreGammaChunk( true ); rBitmap = aPNGReader.Read(); } else { - ReadDIBBitmapEx(rBitmap, *pStream); + ReadDIBBitmapEx(rBitmap, *xStream); } } @@ -288,12 +286,12 @@ void ImplImageTree::loadImageLinks() } } -void ImplImageTree::parseLinkFile(boost::shared_ptr< SvStream > pStream) +void ImplImageTree::parseLinkFile(std::shared_ptr<SvStream> xStream) { OString aLine; OUString aLink, aOriginal; int nLineNo = 0; - while ( pStream->ReadLine( aLine ) ) + while (xStream->ReadLine(aLine)) { ++nLineNo; if ( aLine.isEmpty() ) |