mirror of
https://github.com/LibreOffice/core.git
synced 2025-08-15 20:47:46 +00:00
loplugin:makeshared (clang-cl)
Change-Id: Ie28438633d9d81d756013772c573f02a756478d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100096 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@ -71,7 +71,7 @@ namespace dxcanvas
|
||||
PixelFormat24bppRGB);
|
||||
}
|
||||
|
||||
mpGraphics.reset( tools::createGraphicsFromBitmap(mpBitmap) );
|
||||
mpGraphics = tools::createGraphicsFromBitmap(mpBitmap);
|
||||
}
|
||||
|
||||
BitmapSharedPtr DXBitmap::getBitmap() const
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <sal/log.hxx>
|
||||
|
||||
@ -57,7 +58,7 @@ namespace dxcanvas
|
||||
{
|
||||
GraphicsSharedPtr mpGraphics;
|
||||
public:
|
||||
explicit GraphicsProviderImpl( Gdiplus::Graphics* pGraphics ) : mpGraphics( pGraphics ) {}
|
||||
explicit GraphicsProviderImpl( GraphicsSharedPtr && pGraphics ) : mpGraphics( std::move(pGraphics) ) {}
|
||||
virtual GraphicsSharedPtr getGraphics() override { return mpGraphics; }
|
||||
};
|
||||
|
||||
@ -106,7 +107,7 @@ namespace dxcanvas
|
||||
maCanvasHelper.setDevice( *this );
|
||||
maCanvasHelper.setTarget(
|
||||
std::make_shared<GraphicsProviderImpl>(
|
||||
Gdiplus::Graphics::FromHDC(pSysData->hDC)));
|
||||
GraphicsSharedPtr(Gdiplus::Graphics::FromHDC(pSysData->hDC))));
|
||||
|
||||
maArguments.realloc(0);
|
||||
}
|
||||
|
@ -132,9 +132,9 @@ namespace dxcanvas::tools
|
||||
return pRet;
|
||||
}
|
||||
|
||||
Gdiplus::Graphics* createGraphicsFromBitmap(const BitmapSharedPtr& rBitmap)
|
||||
GraphicsSharedPtr createGraphicsFromBitmap(const BitmapSharedPtr& rBitmap)
|
||||
{
|
||||
Gdiplus::Graphics* pRet = Gdiplus::Graphics::FromImage(rBitmap.get());
|
||||
GraphicsSharedPtr pRet(Gdiplus::Graphics::FromImage(rBitmap.get()));
|
||||
if( pRet )
|
||||
setupGraphics( *pRet );
|
||||
return pRet;
|
||||
|
@ -62,7 +62,7 @@ namespace dxcanvas::tools
|
||||
polyPolygonFromXPolyPolygon2D( const css::uno::Reference< css::rendering::XPolyPolygon2D >& );
|
||||
|
||||
Gdiplus::Graphics* createGraphicsFromHDC(HDC);
|
||||
Gdiplus::Graphics* createGraphicsFromBitmap(const BitmapSharedPtr&);
|
||||
GraphicsSharedPtr createGraphicsFromBitmap(const BitmapSharedPtr&);
|
||||
|
||||
void setupGraphics( Gdiplus::Graphics& rGraphics );
|
||||
|
||||
|
@ -228,7 +228,7 @@ namespace dxcanvas
|
||||
maSize.getY(),
|
||||
PixelFormat32bppARGB
|
||||
);
|
||||
mpGraphics.reset( tools::createGraphicsFromBitmap(mpGDIPlusBitmap) );
|
||||
mpGraphics = tools::createGraphicsFromBitmap(mpGDIPlusBitmap);
|
||||
|
||||
// create the colorbuffer object, which is basically a simple
|
||||
// wrapper around the directx surface. the colorbuffer is the
|
||||
|
Reference in New Issue
Block a user