summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/win/salbmp.h4
-rw-r--r--vcl/win/gdi/salbmp.cxx12
2 files changed, 8 insertions, 8 deletions
diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h
index 80ddb38bfd9e..bb589cc4b2f8 100644
--- a/vcl/inc/win/salbmp.h
+++ b/vcl/inc/win/salbmp.h
@@ -42,8 +42,8 @@ private:
sal_uInt16 mnBitCount;
- std::unique_ptr<Gdiplus::Bitmap> ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlphaSource);
- std::unique_ptr<Gdiplus::Bitmap> ImplCreateGdiPlusBitmap();
+ std::shared_ptr<Gdiplus::Bitmap> ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlphaSource);
+ std::shared_ptr<Gdiplus::Bitmap> ImplCreateGdiPlusBitmap();
public:
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index 0d9dba981ae7..e807a2faef61 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -233,9 +233,9 @@ std::shared_ptr< Gdiplus::Bitmap > WinSalBitmap::ImplGetGdiPlusBitmap(const WinS
return aRetval;
}
-std::unique_ptr<Gdiplus::Bitmap> WinSalBitmap::ImplCreateGdiPlusBitmap()
+std::shared_ptr<Gdiplus::Bitmap> WinSalBitmap::ImplCreateGdiPlusBitmap()
{
- std::unique_ptr<Gdiplus::Bitmap> pRetval;
+ std::shared_ptr<Gdiplus::Bitmap> pRetval;
WinSalBitmap* pSalRGB = this;
std::unique_ptr<WinSalBitmap> pExtraWinSalRGB;
@@ -271,7 +271,7 @@ std::unique_ptr<Gdiplus::Bitmap> WinSalBitmap::ImplCreateGdiPlusBitmap()
const sal_uInt32 nW(pRGB->mnWidth);
const sal_uInt32 nH(pRGB->mnHeight);
- pRetval.reset(new Gdiplus::Bitmap(nW, nH, PixelFormat24bppRGB));
+ pRetval = std::make_shared<Gdiplus::Bitmap>(nW, nH, PixelFormat24bppRGB);
if ( pRetval->GetLastStatus() == Gdiplus::Ok )
{
@@ -315,9 +315,9 @@ std::unique_ptr<Gdiplus::Bitmap> WinSalBitmap::ImplCreateGdiPlusBitmap()
return pRetval;
}
-std::unique_ptr<Gdiplus::Bitmap> WinSalBitmap::ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlphaSource)
+std::shared_ptr<Gdiplus::Bitmap> WinSalBitmap::ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlphaSource)
{
- std::unique_ptr<Gdiplus::Bitmap> pRetval;
+ std::shared_ptr<Gdiplus::Bitmap> pRetval;
WinSalBitmap* pSalRGB = this;
std::unique_ptr<WinSalBitmap> pExtraWinSalRGB;
@@ -388,7 +388,7 @@ std::unique_ptr<Gdiplus::Bitmap> WinSalBitmap::ImplCreateGdiPlusBitmap(const Win
const sal_uInt32 nW(pRGB->mnWidth);
const sal_uInt32 nH(pRGB->mnHeight);
- pRetval.reset(new Gdiplus::Bitmap(nW, nH, PixelFormat32bppARGB));
+ pRetval = std::make_shared<Gdiplus::Bitmap>(nW, nH, PixelFormat32bppARGB);
if ( pRetval->GetLastStatus() == Gdiplus::Ok ) // 2nd place to secure with new Gdiplus::Bitmap
{