diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-22 15:00:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-22 15:01:05 +0100 |
commit | 871426533f7afe31bc451fa6b407b83db8e52827 (patch) | |
tree | ed60cee61ebee91994eaffc9c9a3638836ed2ab4 /vcl | |
parent | 5a849bb5317ad73bb43b2b618b14bc0e8751fff6 (diff) |
just silence the auto_ptr deprecations in isolation
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/impimagetree.cxx | 7 | ||||
-rw-r--r-- | vcl/source/gdi/rendergraphicrasterizer.cxx | 14 |
2 files changed, 12 insertions, 9 deletions
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index b43611e34b04..48ef658facda 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -35,6 +35,7 @@ #include <utility> #include <vector> #include <boost/unordered_map.hpp> +#include <boost/shared_ptr.hpp> #include "com/sun/star/container/XNameAccess.hpp" #include "com/sun/star/io/XInputStream.hpp" @@ -82,7 +83,7 @@ rtl::OUString createPath( return b.makeStringAndClear(); } -std::auto_ptr< SvStream > wrapStream( +boost::shared_ptr< SvStream > wrapStream( css::uno::Reference< css::io::XInputStream > const & stream) { // This could use SvInputStream instead if that did not have a broken @@ -90,7 +91,7 @@ std::auto_ptr< SvStream > wrapStream( // (cf. "@@@" at tags/DEV300_m37/svtools/source/misc1/strmadpt.cxx@264807 // l. 593): OSL_ASSERT(stream.is()); - std::auto_ptr< SvStream > s(new SvMemoryStream); + boost::shared_ptr< SvStream > s(new SvMemoryStream); for (;;) { sal_Int32 const size = 2048; css::uno::Sequence< sal_Int8 > data(size); @@ -108,7 +109,7 @@ void loadFromStream( css::uno::Reference< css::io::XInputStream > const & stream, rtl::OUString const & path, BitmapEx & bitmap) { - std::auto_ptr< SvStream > s(wrapStream(stream)); + boost::shared_ptr< SvStream > s(wrapStream(stream)); if (path.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".png"))) { vcl::PNGReader aPNGReader( *s ); diff --git a/vcl/source/gdi/rendergraphicrasterizer.cxx b/vcl/source/gdi/rendergraphicrasterizer.cxx index 4c70d866245b..701457010d05 100644 --- a/vcl/source/gdi/rendergraphicrasterizer.cxx +++ b/vcl/source/gdi/rendergraphicrasterizer.cxx @@ -39,6 +39,8 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <boost/scoped_ptr.hpp> + #define VCL_SERVICENAME_RASTERIZER_SVG "com.sun.star.graphic.GraphicRasterizer_RSVG" using namespace com::sun::star; @@ -124,7 +126,7 @@ BitmapEx RenderGraphicRasterizer::GetReplacement() const Size RenderGraphicRasterizer::GetPrefSize() const { const Size aSizePixel( GetDefaultSizePixel() ); - std::auto_ptr< VirtualDevice > apCompVDev; + boost::scoped_ptr< VirtualDevice > xCompVDev; OutputDevice* pCompDev = NULL; #ifndef NO_GETAPPWINDOW @@ -133,8 +135,8 @@ Size RenderGraphicRasterizer::GetPrefSize() const if( !pCompDev ) { - apCompVDev.reset( new VirtualDevice ); - pCompDev = apCompVDev.get(); + xCompVDev.reset( new VirtualDevice ); + pCompDev = xCompVDev.get(); } return( pCompDev->PixelToLogic( aSizePixel, GetPrefMapMode() ) ); @@ -247,7 +249,7 @@ void RenderGraphicRasterizer::InitializeRasterizer() if( mxRasterizer.is() ) { - std::auto_ptr< VirtualDevice > apCompVDev; + boost::scoped_ptr< VirtualDevice > xCompVDev; OutputDevice* pCompDev = NULL; #ifndef NO_GETAPPWINDOW @@ -256,8 +258,8 @@ void RenderGraphicRasterizer::InitializeRasterizer() if( !pCompDev ) { - apCompVDev.reset( new VirtualDevice ); - pCompDev = apCompVDev.get(); + xCompVDev.reset( new VirtualDevice ); + pCompDev = xCompVDev.get(); } const Size aDPI( pCompDev->LogicToPixel( Size( 1, 1 ), MAP_INCH ) ); |