diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-09 08:45:51 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-13 09:37:12 +0200 |
commit | 26ec80f47df1b32c5e1ae8c96d597ef8c90fee86 (patch) | |
tree | 11b53e701f50ff170552054ef7d23136cd4710b6 /include/cppcanvas | |
parent | b5f5a386504e320b022f8609c9c36652ae2d3d18 (diff) |
loplugin:staticmethods
Change-Id: I33a8ca28b0c3bf1c31758d93238e74927bebde9c
Diffstat (limited to 'include/cppcanvas')
-rw-r--r-- | include/cppcanvas/basegfxfactory.hxx | 14 | ||||
-rw-r--r-- | include/cppcanvas/vclfactory.hxx | 24 |
2 files changed, 13 insertions, 25 deletions
diff --git a/include/cppcanvas/basegfxfactory.hxx b/include/cppcanvas/basegfxfactory.hxx index 115211461d8f..5341cd631ebc 100644 --- a/include/cppcanvas/basegfxfactory.hxx +++ b/include/cppcanvas/basegfxfactory.hxx @@ -53,29 +53,23 @@ namespace cppcanvas class CPPCANVAS_DLLPUBLIC BaseGfxFactory { public: - static BaseGfxFactory& getInstance(); - /** Create a polygon from a ::basegfx::B2DPolygon The created polygon initially has the same size in user coordinate space as the source polygon */ - PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolygon& rPoly ) const; + static PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolygon& rPoly ); /** Create an uninitialized bitmap with the given size */ - BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ) const; + static BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ); /** Create an uninitialized alpha bitmap with the given size */ - BitmapSharedPtr createAlphaBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ) const; + static BitmapSharedPtr createAlphaBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ); private: - friend struct InitInstance2; - - // singleton - BaseGfxFactory(); - + BaseGfxFactory() SAL_DELETED_FUNCTION; BaseGfxFactory(const BaseGfxFactory&) SAL_DELETED_FUNCTION; BaseGfxFactory& operator=( const BaseGfxFactory& ) SAL_DELETED_FUNCTION; }; diff --git a/include/cppcanvas/vclfactory.hxx b/include/cppcanvas/vclfactory.hxx index 4db42264f21d..ef0777f89a08 100644 --- a/include/cppcanvas/vclfactory.hxx +++ b/include/cppcanvas/vclfactory.hxx @@ -62,36 +62,30 @@ namespace cppcanvas class CPPCANVAS_DLLPUBLIC VCLFactory { public: - static VCLFactory& getInstance(); - - CanvasSharedPtr createCanvas( const ::com::sun::star::uno::Reference< + static CanvasSharedPtr createCanvas( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas >& xCanvas ); - BitmapCanvasSharedPtr createBitmapCanvas( const ::com::sun::star::uno::Reference< + static BitmapCanvasSharedPtr createBitmapCanvas( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas >& xCanvas ); - SpriteCanvasSharedPtr createSpriteCanvas( const vcl::Window& rVCLWindow ) const; - SpriteCanvasSharedPtr createSpriteCanvas( const ::com::sun::star::uno::Reference< - ::com::sun::star::rendering::XSpriteCanvas >& xCanvas ) const; + static SpriteCanvasSharedPtr createSpriteCanvas( const vcl::Window& rVCLWindow ); + static SpriteCanvasSharedPtr createSpriteCanvas( const ::com::sun::star::uno::Reference< + ::com::sun::star::rendering::XSpriteCanvas >& xCanvas ); /** Create a bitmap from a VCL Bitmap */ - BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::BitmapEx& rBmpEx ) const; + static BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::BitmapEx& rBmpEx ); /** Create a renderer object from a Metafile The created renderer initially draws the metafile one-by-one units large, in user coordinate space */ - RendererSharedPtr createRenderer( const CanvasSharedPtr& rCanvas, + static RendererSharedPtr createRenderer( const CanvasSharedPtr& rCanvas, const ::GDIMetaFile& rMtf, - const Renderer::Parameters& rParms ) const; + const Renderer::Parameters& rParms ); private: - friend struct InitInstance; - - // singleton - VCLFactory(); - + VCLFactory() SAL_DELETED_FUNCTION; VCLFactory(const VCLFactory&) SAL_DELETED_FUNCTION; VCLFactory& operator=( const VCLFactory& ) SAL_DELETED_FUNCTION; }; |