summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2011-04-08 16:44:28 +0200
committerThorsten Behrens <tbehrens@novell.com>2011-04-08 16:47:25 +0200
commit09b546cf9c1d0d9f78066e70a0348c7678cdcb14 (patch)
treeea9fb80453a70202a8f8d4bff4710d92259ac5b1
parent55961e2dfdac4491aa8a56d86930e5999b7d523b (diff)
Fix overloaded-virtual warning in canvas
With enabled -Woverloaded-virtual gcc warning (see http://lists.freedesktop.org/archives/libreoffice/2011-March/009567.html), canvas exposed a nasty clash between WeakComponentImplHelper::disposing and XEventListener::disposing. Fixed by overriding *once* in baseclass, and then calling disambiguated, renamed methods.
-rw-r--r--canvas/inc/canvas/base/bufferedgraphicdevicebase.hxx11
-rw-r--r--canvas/inc/canvas/base/canvasbase.hxx7
-rw-r--r--canvas/inc/canvas/base/canvascustomspritebase.hxx4
-rw-r--r--canvas/inc/canvas/base/disambiguationhelper.hxx (renamed from canvas/inc/canvas/base/basemutexhelper.hxx)36
-rw-r--r--canvas/inc/canvas/base/graphicdevicebase.hxx9
-rw-r--r--canvas/inc/canvas/base/spritecanvasbase.hxx7
-rw-r--r--canvas/source/cairo/cairo_canvas.cxx4
-rw-r--r--canvas/source/cairo/cairo_canvas.hxx10
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.cxx4
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.hxx4
-rw-r--r--canvas/source/cairo/cairo_canvascustomsprite.cxx4
-rw-r--r--canvas/source/cairo/cairo_canvascustomsprite.hxx6
-rw-r--r--canvas/source/cairo/cairo_spritecanvas.cxx4
-rw-r--r--canvas/source/cairo/cairo_spritecanvas.hxx10
-rw-r--r--canvas/source/directx/dx_canvas.cxx8
-rw-r--r--canvas/source/directx/dx_canvas.hxx10
-rw-r--r--canvas/source/directx/dx_canvasbitmap.cxx4
-rw-r--r--canvas/source/directx/dx_canvasbitmap.hxx6
-rw-r--r--canvas/source/directx/dx_canvascustomsprite.cxx4
-rw-r--r--canvas/source/directx/dx_canvascustomsprite.hxx6
-rw-r--r--canvas/source/directx/dx_spritecanvas.cxx4
-rw-r--r--canvas/source/directx/dx_spritecanvas.hxx7
-rw-r--r--canvas/source/null/null_canvasbitmap.cxx4
-rw-r--r--canvas/source/null/null_canvasbitmap.hxx5
-rw-r--r--canvas/source/null/null_canvascustomsprite.cxx4
-rw-r--r--canvas/source/null/null_canvascustomsprite.hxx8
-rw-r--r--canvas/source/null/null_spritecanvas.cxx4
-rw-r--r--canvas/source/null/null_spritecanvas.hxx10
-rw-r--r--canvas/source/vcl/canvas.cxx4
-rw-r--r--canvas/source/vcl/canvas.hxx10
-rw-r--r--canvas/source/vcl/canvasbitmap.cxx6
-rw-r--r--canvas/source/vcl/canvasbitmap.hxx5
-rw-r--r--canvas/source/vcl/canvascustomsprite.cxx8
-rw-r--r--canvas/source/vcl/canvascustomsprite.hxx6
-rw-r--r--canvas/source/vcl/spritecanvas.cxx4
-rw-r--r--canvas/source/vcl/spritecanvas.hxx10
36 files changed, 114 insertions, 143 deletions
diff --git a/canvas/inc/canvas/base/bufferedgraphicdevicebase.hxx b/canvas/inc/canvas/base/bufferedgraphicdevicebase.hxx
index 9e31473ba589..9317c8230bc6 100644
--- a/canvas/inc/canvas/base/bufferedgraphicdevicebase.hxx
+++ b/canvas/inc/canvas/base/bufferedgraphicdevicebase.hxx
@@ -183,10 +183,7 @@ namespace canvas
return ::com::sun::star::uno::makeAny(mxWindow);
}
-#if defined __SUNPRO_CC
- using Base::disposing;
-#endif
- virtual void SAL_CALL disposing()
+ virtual void disposeThis()
{
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
@@ -197,7 +194,7 @@ namespace canvas
}
// pass on to base class
- BaseType::disposing();
+ BaseType::disposeThis();
}
::com::sun::star::awt::Rectangle transformBounds( const ::com::sun::star::awt::Rectangle& rBounds )
@@ -234,12 +231,14 @@ namespace canvas
}
// XWindowListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException)
+ virtual void SAL_CALL disposeEventSource( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException)
{
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
if( Source.Source == mxWindow )
mxWindow.clear();
+
+ BaseType::disposeEventSource(Source);
}
virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException)
diff --git a/canvas/inc/canvas/base/canvasbase.hxx b/canvas/inc/canvas/base/canvasbase.hxx
index 204355da93c3..7afcf9f8aea7 100644
--- a/canvas/inc/canvas/base/canvasbase.hxx
+++ b/canvas/inc/canvas/base/canvasbase.hxx
@@ -120,17 +120,14 @@ namespace canvas
{
}
-#if defined __SUNPRO_CC
- using Base::disposing;
-#endif
- virtual void SAL_CALL disposing()
+ virtual void disposeThis()
{
MutexType aGuard( BaseType::m_aMutex );
maCanvasHelper.disposing();
// pass on to base class
- BaseType::disposing();
+ BaseType::disposeThis();
}
// XCanvas
diff --git a/canvas/inc/canvas/base/canvascustomspritebase.hxx b/canvas/inc/canvas/base/canvascustomspritebase.hxx
index ec4477ab9cc9..a5c026a74311 100644
--- a/canvas/inc/canvas/base/canvascustomspritebase.hxx
+++ b/canvas/inc/canvas/base/canvascustomspritebase.hxx
@@ -103,14 +103,14 @@ namespace canvas
@derive when overriding this method in derived classes,
<em>always</em> call the base class' method!
*/
- virtual void SAL_CALL disposing()
+ virtual void disposeThis()
{
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
maSpriteHelper.disposing();
// pass on to base class
- BaseType::disposing();
+ BaseType::disposeThis();
}
// XCanvas: selectively override base's methods here, for opacity tracking
diff --git a/canvas/inc/canvas/base/basemutexhelper.hxx b/canvas/inc/canvas/base/disambiguationhelper.hxx
index c1c7eed8455e..b58ed29ea289 100644
--- a/canvas/inc/canvas/base/basemutexhelper.hxx
+++ b/canvas/inc/canvas/base/disambiguationhelper.hxx
@@ -26,30 +26,37 @@
*
************************************************************************/
-#ifndef INCLUDED_CANVAS_BASEMUTEXHELPER_HXX
-#define INCLUDED_CANVAS_BASEMUTEXHELPER_HXX
+#ifndef INCLUDED_CANVAS_DISAMBIGUATIONHELPER_HXX
+#define INCLUDED_CANVAS_DISAMBIGUATIONHELPER_HXX
#include <osl/mutex.hxx>
-/* Definition of the BaseMutexHelper class */
+/* Definition of the DisambiguationHelper class */
namespace canvas
{
- /** Base class, deriving from ::comphelper::OBaseMutex and
- initializing its own baseclass with m_aMutex.
+ /** Base class, initializing its own baseclass with m_aMutex.
This is necessary to make the CanvasBase, GraphicDeviceBase,
etc. classes freely combinable - letting them perform this
initialization would prohibit deriving e.g. CanvasBase from
GraphicDeviceBase.
+
+ On top of that, disambiguates XEventListener::disposing and
+ WeakComponentImplHelper::disposing.
+
+ Having two virtual methods with the same name, and not
+ overriding them in every derived class, will hide one of
+ them. Later trying to override the same method, will generate
+ a new vtable slot, and lead to very hard to spot errors.
*/
- template< class Base > class BaseMutexHelper : public Base
+ template< class Base > class DisambiguationHelper : public Base
{
public:
typedef Base BaseType;
- /** Construct BaseMutexHelper
+ /** Construct DisambiguationHelper
This method is the whole purpose of this template:
initializing a base class with the provided m_aMutex
@@ -57,16 +64,27 @@ namespace canvas
as they require the lifetime of the mutex to extend
theirs).
*/
- BaseMutexHelper() :
+ DisambiguationHelper() :
BaseType( m_aMutex )
{
}
+ virtual void SAL_CALL disposing()
+ { disposeThis(); }
+
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException)
+ { disposeEventSource(Source); }
+
+ virtual void disposeThis()
+ {}
+ virtual void disposeEventSource( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
+ {}
+
protected:
mutable ::osl::Mutex m_aMutex;
};
}
-#endif /* INCLUDED_CANVAS_BASEMUTEXHELPER_HXX */
+#endif /* INCLUDED_CANVAS_DISAMBIGUATIONHELPER_HXX */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/inc/canvas/base/graphicdevicebase.hxx b/canvas/inc/canvas/base/graphicdevicebase.hxx
index 62424e4cdabd..b8baee2417b9 100644
--- a/canvas/inc/canvas/base/graphicdevicebase.hxx
+++ b/canvas/inc/canvas/base/graphicdevicebase.hxx
@@ -95,7 +95,7 @@ namespace canvas
@tpl Mutex
Lock strategy to use. Defaults to using the
- BaseMutexHelper-provided lock. Everytime one of the methods is
+ DisambiguationHelper-provided lock. Everytime one of the methods is
entered, an object of type Mutex is created with m_aMutex as
the sole parameter, and destroyed again when the method scope
is left.
@@ -144,17 +144,14 @@ namespace canvas
_1)));
}
-#if defined __SUNPRO_CC
- using Base::disposing;
-#endif
- virtual void SAL_CALL disposing()
+ virtual void disposeThis()
{
MutexType aGuard( BaseType::m_aMutex );
maDeviceHelper.disposing();
// pass on to base class
- cppu::WeakComponentImplHelperBase::disposing();
+ BaseType::disposeThis();
}
// XGraphicDevice
diff --git a/canvas/inc/canvas/base/spritecanvasbase.hxx b/canvas/inc/canvas/base/spritecanvasbase.hxx
index 1cf255fe5579..47134abfc2d5 100644
--- a/canvas/inc/canvas/base/spritecanvasbase.hxx
+++ b/canvas/inc/canvas/base/spritecanvasbase.hxx
@@ -86,17 +86,14 @@ namespace canvas
{
}
-#if defined __SUNPRO_CC
- using Base::disposing;
-#endif
- virtual void SAL_CALL disposing()
+ virtual void disposeThis()
{
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
maRedrawManager.disposing();
// pass on to base class
- BaseType::disposing();
+ BaseType::disposeThis();
}
// XSpriteCanvas
diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index 9903dade4863..802006d59110 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -131,14 +131,14 @@ namespace cairocanvas
OSL_TRACE( "CairoCanvas destroyed" );
}
- void SAL_CALL Canvas::disposing()
+ void Canvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- CanvasBaseT::disposing();
+ CanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL Canvas::getServiceName( ) throw (uno::RuntimeException)
diff --git a/canvas/source/cairo/cairo_canvas.hxx b/canvas/source/cairo/cairo_canvas.hxx
index 02837d03f6b6..aec8713f8fe9 100644
--- a/canvas/source/cairo/cairo_canvas.hxx
+++ b/canvas/source/cairo/cairo_canvas.hxx
@@ -47,7 +47,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include <basegfx/vector/b2isize.hxx>
@@ -69,7 +69,7 @@ namespace cairocanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase_Base;
- typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
+ typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase_Base >,
DeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBase_Base;
@@ -122,12 +122,8 @@ namespace cairocanvas
/// For resource tracking
~Canvas();
-#if defined __SUNPRO_CC
- using CanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx
index 33ee53ffcf2a..63761b848af8 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -102,7 +102,7 @@ namespace cairocanvas
maCanvasHelper.clear();
}
- void SAL_CALL CanvasBitmap::disposing()
+ void CanvasBitmap::disposeThis()
{
mpSurfaceProvider.clear();
@@ -110,7 +110,7 @@ namespace cairocanvas
mpBufferSurface.reset();
// forward to parent
- CanvasBitmap_Base::disposing();
+ CanvasBitmap_Base::disposeThis();
}
SurfaceSharedPtr CanvasBitmap::getSurface()
diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx
index 532ce8d26b41..1626c9240ff6 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.hxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.hxx
@@ -58,7 +58,7 @@ namespace cairocanvas
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
class CanvasBitmapSpriteSurface_Base :
- public ::canvas::BaseMutexHelper<CanvasBitmapBase_Base>,
+ public ::canvas::DisambiguationHelper<CanvasBitmapBase_Base>,
public SurfaceProvider
{
};
@@ -87,7 +87,7 @@ namespace cairocanvas
bool bHasAlpha );
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.cxx b/canvas/source/cairo/cairo_canvascustomsprite.cxx
index b78bf44c3313..5c7852c41dec 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.cxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.cxx
@@ -78,7 +78,7 @@ namespace cairocanvas
maCanvasHelper.clear();
}
- void SAL_CALL CanvasCustomSprite::disposing()
+ void CanvasCustomSprite::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -86,7 +86,7 @@ namespace cairocanvas
mpBufferSurface.reset();
// forward to parent
- CanvasCustomSpriteBaseT::disposing();
+ CanvasCustomSpriteBaseT::disposeThis();
}
void CanvasCustomSprite::redraw( const CairoSharedPtr& pCairo,
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.hxx b/canvas/source/cairo/cairo_canvascustomsprite.hxx
index d9b525716690..52dac5233138 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.hxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.hxx
@@ -42,7 +42,7 @@
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/canvascustomspritebase.hxx>
#include "cairo_sprite.hxx"
@@ -76,7 +76,7 @@ namespace cairocanvas
remain a base class that provides implementation, not to
enforce any specific interface on its derivees.
*/
- class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
+ class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
public Sprite,
public SurfaceProvider
{
@@ -111,7 +111,7 @@ namespace cairocanvas
CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice );
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx
index a04c3e755eba..f55f861d3839 100644
--- a/canvas/source/cairo/cairo_spritecanvas.cxx
+++ b/canvas/source/cairo/cairo_spritecanvas.cxx
@@ -125,14 +125,14 @@ namespace cairocanvas
maArguments.realloc(0);
}
- void SAL_CALL SpriteCanvas::disposing()
+ void SpriteCanvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- SpriteCanvasBaseT::disposing();
+ SpriteCanvasBaseT::disposeThis();
}
::sal_Bool SAL_CALL SpriteCanvas::showBuffer( ::sal_Bool bUpdateAll ) throw (uno::RuntimeException)
diff --git a/canvas/source/cairo/cairo_spritecanvas.hxx b/canvas/source/cairo/cairo_spritecanvas.hxx
index 54cd3a181cec..b64fd1474c6e 100644
--- a/canvas/source/cairo/cairo_spritecanvas.hxx
+++ b/canvas/source/cairo/cairo_spritecanvas.hxx
@@ -45,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include <basegfx/vector/b2isize.hxx>
@@ -69,7 +69,7 @@ namespace cairocanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
- typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::BaseMutexHelper< WindowGraphicDeviceBase_Base >,
+ typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > SpriteCanvasBase_Base;
@@ -121,12 +121,8 @@ namespace cairocanvas
void initialize();
-#if defined __SUNPRO_CC
- using SpriteCanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index 956c115f5d9b..c29319b3974e 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -124,14 +124,14 @@ namespace dxcanvas
maArguments.realloc(0);
}
- void SAL_CALL Canvas::disposing()
+ void Canvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- CanvasBaseT::disposing();
+ CanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL Canvas::getServiceName( ) throw (uno::RuntimeException)
@@ -201,7 +201,7 @@ namespace dxcanvas
maArguments.realloc(0);
}
- void SAL_CALL BitmapCanvas::disposing()
+ void BitmapCanvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -209,7 +209,7 @@ namespace dxcanvas
mxComponentContext.clear();
// forward to parent
- BitmapCanvasBaseT::disposing();
+ BitmapCanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL BitmapCanvas::getServiceName( ) throw (uno::RuntimeException)
diff --git a/canvas/source/directx/dx_canvas.hxx b/canvas/source/directx/dx_canvas.hxx
index 760bd31aa244..32810ede36e5 100644
--- a/canvas/source/directx/dx_canvas.hxx
+++ b/canvas/source/directx/dx_canvas.hxx
@@ -45,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/integerbitmapbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/graphicdevicebase.hxx>
#include "dx_bitmapprovider.hxx"
@@ -63,7 +63,7 @@ namespace dxcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase1_Base;
- typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase1_Base >,
+ typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase1_Base >,
DeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBase1_Base;
@@ -92,7 +92,7 @@ namespace dxcanvas
void initialize();
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
@@ -120,7 +120,7 @@ namespace dxcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase2_Base;
- typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase2_Base >,
+ typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase2_Base >,
DeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBase2_Base;
@@ -149,7 +149,7 @@ namespace dxcanvas
void initialize();
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/directx/dx_canvasbitmap.cxx b/canvas/source/directx/dx_canvasbitmap.cxx
index ad8680d44db1..7ad5b18800de 100644
--- a/canvas/source/directx/dx_canvasbitmap.cxx
+++ b/canvas/source/directx/dx_canvasbitmap.cxx
@@ -60,13 +60,13 @@ namespace dxcanvas
maCanvasHelper.setTarget( mpBitmap );
}
- void SAL_CALL CanvasBitmap::disposing()
+ void CanvasBitmap::disposeThis()
{
mpBitmap.reset();
mpDevice.clear();
// forward to parent
- CanvasBitmap_Base::disposing();
+ CanvasBitmap_Base::disposeThis();
}
struct AlphaDIB
diff --git a/canvas/source/directx/dx_canvasbitmap.hxx b/canvas/source/directx/dx_canvasbitmap.hxx
index b64840ddaded..7a80e2b96796 100644
--- a/canvas/source/directx/dx_canvasbitmap.hxx
+++ b/canvas/source/directx/dx_canvasbitmap.hxx
@@ -42,7 +42,7 @@
#include <cppuhelper/compbase3.hxx>
#include <comphelper/uno3.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/integerbitmapbase.hxx>
#include "dx_bitmapprovider.hxx"
@@ -60,7 +60,7 @@ namespace dxcanvas
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
- typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
+ typedef ::canvas::IntegerBitmapBase< ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
BitmapCanvasHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBitmap_Base;
@@ -80,7 +80,7 @@ namespace dxcanvas
const DeviceRef& rDevice );
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/canvas/source/directx/dx_canvascustomsprite.cxx b/canvas/source/directx/dx_canvascustomsprite.cxx
index 73334b1698a5..138b2c36dc3c 100644
--- a/canvas/source/directx/dx_canvascustomsprite.cxx
+++ b/canvas/source/directx/dx_canvascustomsprite.cxx
@@ -83,7 +83,7 @@ namespace dxcanvas
maCanvasHelper.clear();
}
- void SAL_CALL CanvasCustomSprite::disposing()
+ void CanvasCustomSprite::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -91,7 +91,7 @@ namespace dxcanvas
mpSpriteCanvas.clear();
// forward to parent
- CanvasCustomSpriteBaseT::disposing();
+ CanvasCustomSpriteBaseT::disposeThis();
}
#define IMPLEMENTATION_NAME "DXCanvas.CanvasCustomSprite"
diff --git a/canvas/source/directx/dx_canvascustomsprite.hxx b/canvas/source/directx/dx_canvascustomsprite.hxx
index 38b9bd85b2e4..8e6c534683ce 100644
--- a/canvas/source/directx/dx_canvascustomsprite.hxx
+++ b/canvas/source/directx/dx_canvascustomsprite.hxx
@@ -42,7 +42,7 @@
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/canvascustomspritebase.hxx>
#include "dx_sprite.hxx"
@@ -75,7 +75,7 @@ namespace dxcanvas
remain a base class that provides implementation, not to
enforce any specific interface on its derivees.
*/
- class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
+ class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
public Sprite
{
};
@@ -111,7 +111,7 @@ namespace dxcanvas
const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy,
bool bShowSpriteBounds );
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/directx/dx_spritecanvas.cxx b/canvas/source/directx/dx_spritecanvas.cxx
index 2e2131b44c15..430f4639cb92 100644
--- a/canvas/source/directx/dx_spritecanvas.cxx
+++ b/canvas/source/directx/dx_spritecanvas.cxx
@@ -126,14 +126,14 @@ namespace dxcanvas
maArguments.realloc(0);
}
- void SAL_CALL SpriteCanvas::disposing()
+ void SpriteCanvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- SpriteCanvasBaseT::disposing();
+ SpriteCanvasBaseT::disposeThis();
}
::sal_Bool SAL_CALL SpriteCanvas::showBuffer( ::sal_Bool bUpdateAll ) throw (uno::RuntimeException)
diff --git a/canvas/source/directx/dx_spritecanvas.hxx b/canvas/source/directx/dx_spritecanvas.hxx
index ec6d3785d536..bd76ad60b6d1 100644
--- a/canvas/source/directx/dx_spritecanvas.hxx
+++ b/canvas/source/directx/dx_spritecanvas.hxx
@@ -45,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include "dx_bitmapprovider.hxx"
@@ -66,7 +66,8 @@ namespace dxcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
- typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::BaseMutexHelper< WindowGraphicDeviceBase_Base >,
+ typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper<
+ ::canvas::DisposingDisambiguate< WindowGraphicDeviceBase_Base > >,
SpriteDeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > SpriteCanvasBase_Base;
@@ -117,7 +118,7 @@ namespace dxcanvas
void initialize();
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/null/null_canvasbitmap.cxx b/canvas/source/null/null_canvasbitmap.cxx
index 473b5c6459d7..92ee7b8094f5 100644
--- a/canvas/source/null/null_canvasbitmap.cxx
+++ b/canvas/source/null/null_canvasbitmap.cxx
@@ -53,12 +53,12 @@ namespace nullcanvas
bHasAlpha );
}
- void SAL_CALL CanvasBitmap::disposing()
+ void CanvasBitmap::disposeThis()
{
mpDevice.clear();
// forward to parent
- CanvasBitmap_Base::disposing();
+ CanvasBitmap_Base::disposeThis();
}
#define IMPLEMENTATION_NAME "NullCanvas.CanvasBitmap"
diff --git a/canvas/source/null/null_canvasbitmap.hxx b/canvas/source/null/null_canvasbitmap.hxx
index 65f078dd3507..fa0577c8c02a 100644
--- a/canvas/source/null/null_canvasbitmap.hxx
+++ b/canvas/source/null/null_canvasbitmap.hxx
@@ -40,6 +40,7 @@
#include <boost/shared_ptr.hpp>
#include <canvas/base/integerbitmapbase.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include "null_canvashelper.hxx"
#include "null_spritecanvas.hxx"
@@ -53,7 +54,7 @@ namespace nullcanvas
typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo > CanvasBitmapBase_Base;
- typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
+ typedef ::canvas::IntegerBitmapBase< ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
CanvasHelper,
::osl::MutexGuard,
::cppu::OWeakObject > CanvasBitmap_Base;
@@ -75,7 +76,7 @@ namespace nullcanvas
bool bHasAlpha );
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/canvas/source/null/null_canvascustomsprite.cxx b/canvas/source/null/null_canvascustomsprite.cxx
index cef8535a5c33..36dbc9a69871 100644
--- a/canvas/source/null/null_canvascustomsprite.cxx
+++ b/canvas/source/null/null_canvascustomsprite.cxx
@@ -66,14 +66,14 @@ namespace nullcanvas
rRefDevice );
}
- void SAL_CALL CanvasCustomSprite::disposing()
+ void CanvasCustomSprite::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mpSpriteCanvas.clear();
// forward to parent
- CanvasCustomSpriteBaseT::disposing();
+ CanvasCustomSpriteBaseT::disposeThis();
}
void CanvasCustomSprite::redraw() const
diff --git a/canvas/source/null/null_canvascustomsprite.hxx b/canvas/source/null/null_canvascustomsprite.hxx
index 905f3513dc9e..17aa1f92d9a7 100644
--- a/canvas/source/null/null_canvascustomsprite.hxx
+++ b/canvas/source/null/null_canvascustomsprite.hxx
@@ -42,7 +42,7 @@
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/canvascustomspritebase.hxx>
#include "sprite.hxx"
@@ -75,8 +75,8 @@ namespace nullcanvas
remain a base class that provides implementation, not to
enforce any specific interface on its derivees.
*/
- class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
- public Sprite
+ class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
+ public Sprite
{
};
@@ -109,7 +109,7 @@ namespace nullcanvas
CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice );
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/null/null_spritecanvas.cxx b/canvas/source/null/null_spritecanvas.cxx
index 82b6144707eb..509e3656f8fa 100644
--- a/canvas/source/null/null_spritecanvas.cxx
+++ b/canvas/source/null/null_spritecanvas.cxx
@@ -100,14 +100,14 @@ namespace nullcanvas
maArguments.realloc(0);
}
- void SAL_CALL SpriteCanvas::disposing()
+ void SpriteCanvas::disposeThis()
{
::osl::MutexGuard aGuard( m_aMutex );
mxComponentContext.clear();
// forward to parent
- SpriteCanvasBaseT::disposing();
+ SpriteCanvasBaseT::disposeThis();
}
::sal_Bool SAL_CALL SpriteCanvas::showBuffer( ::sal_Bool bUpdateAll ) throw (uno::RuntimeException)
diff --git a/canvas/source/null/null_spritecanvas.hxx b/canvas/source/null/null_spritecanvas.hxx
index 67f14b80b062..165d73aa4db4 100644
--- a/canvas/source/null/null_spritecanvas.hxx
+++ b/canvas/source/null/null_spritecanvas.hxx
@@ -45,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include "null_spritecanvashelper.hxx"
@@ -63,7 +63,7 @@ namespace nullcanvas
::com::sun::star::awt::XWindowListener,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
- typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::BaseMutexHelper< WindowGraphicDeviceBase_Base >,
+ typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
DeviceHelper,
::osl::MutexGuard,
::cppu::OWeakObject > SpriteCanvasBase_Base;
@@ -114,12 +114,8 @@ namespace nullcanvas
void initialize();
-#if defined __SUNPRO_CC
- using SpriteCanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx
index 81ce996015c2..c3dd0c569f89 100644
--- a/canvas/source/vcl/canvas.cxx
+++ b/canvas/source/vcl/canvas.cxx
@@ -133,14 +133,14 @@ namespace vclcanvas
OSL_TRACE( "Canvas destroyed" );
}
- void SAL_CALL Canvas::disposing()
+ void Canvas::disposeThis()
{
SolarMutexGuard aGuard;
mxComponentContext.clear();
// forward to parent
- CanvasBaseT::disposing();
+ CanvasBaseT::disposeThis();
}
::rtl::OUString SAL_CALL Canvas::getServiceName( ) throw (::com::sun::star::uno::RuntimeException)
diff --git a/canvas/source/vcl/canvas.hxx b/canvas/source/vcl/canvas.hxx
index 555340970a8f..16d5c5abd5b3 100644
--- a/canvas/source/vcl/canvas.hxx
+++ b/canvas/source/vcl/canvas.hxx
@@ -43,7 +43,7 @@
#include <cppuhelper/compbase7.hxx>
#include <comphelper/uno3.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/integerbitmapbase.hxx>
#include <canvas/base/graphicdevicebase.hxx>
@@ -64,7 +64,7 @@ namespace vclcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase_Base;
- typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
+ typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase_Base >,
DeviceHelper,
tools::LocalGuard,
::cppu::OWeakObject > CanvasBase_Base;
@@ -96,12 +96,8 @@ namespace vclcanvas
/// For resource tracking
~Canvas();
-#if defined __SUNPRO_CC
- using CanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
diff --git a/canvas/source/vcl/canvasbitmap.cxx b/canvas/source/vcl/canvasbitmap.cxx
index 1f8840afc264..84f5a8db58c3 100644
--- a/canvas/source/vcl/canvasbitmap.cxx
+++ b/canvas/source/vcl/canvasbitmap.cxx
@@ -82,12 +82,6 @@ namespace vclcanvas
maCanvasHelper.init( rBitmap, rDevice, rOutDevProvider );
}
- void SAL_CALL CanvasBitmap::disposing()
- {
- // forward to base
- CanvasBitmap_Base::disposing();
- }
-
#define IMPLEMENTATION_NAME "VCLCanvas.CanvasBitmap"
#define SERVICE_NAME "com.sun.star.rendering.CanvasBitmap"
diff --git a/canvas/source/vcl/canvasbitmap.hxx b/canvas/source/vcl/canvasbitmap.hxx
index a8b20725c629..540b190b76a1 100644
--- a/canvas/source/vcl/canvasbitmap.hxx
+++ b/canvas/source/vcl/canvasbitmap.hxx
@@ -57,7 +57,7 @@ namespace vclcanvas
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
- typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
+ typedef ::canvas::IntegerBitmapBase< ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
CanvasBitmapHelper,
tools::LocalGuard,
::cppu::OWeakObject > CanvasBitmap_Base;
@@ -87,9 +87,6 @@ namespace vclcanvas
::com::sun::star::rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider );
- // overridden because of mpDevice
- virtual void SAL_CALL disposing();
-
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index 010422b6e093..2fcf6311485b 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -129,14 +129,6 @@ namespace vclcanvas
maCanvasHelper.clear();
}
- void SAL_CALL CanvasCustomSprite::disposing()
- {
- SolarMutexGuard aGuard;
-
- // forward to parent
- CanvasCustomSpriteBaseT::disposing();
- }
-
#define IMPLEMENTATION_NAME "VCLCanvas.CanvasCustomSprite"
#define SERVICE_NAME "com.sun.star.rendering.CanvasCustomSprite"
diff --git a/canvas/source/vcl/canvascustomsprite.hxx b/canvas/source/vcl/canvascustomsprite.hxx
index 1753f80194d9..6acaddafd545 100644
--- a/canvas/source/vcl/canvascustomsprite.hxx
+++ b/canvas/source/vcl/canvascustomsprite.hxx
@@ -41,7 +41,7 @@
#include <vcl/virdev.hxx>
#include <canvas/vclwrapper.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/spritesurface.hxx>
#include <canvas/base/canvascustomspritebase.hxx>
@@ -77,7 +77,7 @@ namespace vclcanvas
remain a base class that provides implementation, not to
enforce any specific interface on its derivees.
*/
- class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
+ class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
public Sprite
{
};
@@ -100,8 +100,6 @@ namespace vclcanvas
const OutDevProviderSharedPtr& rOutDevProvider,
bool bShowSpriteBounds );
- virtual void SAL_CALL disposing();
-
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base
// Classname Base doing refcount Base implementing the XComponent interface
diff --git a/canvas/source/vcl/spritecanvas.cxx b/canvas/source/vcl/spritecanvas.cxx
index b06bd1c77e9e..14c2446dcab7 100644
--- a/canvas/source/vcl/spritecanvas.cxx
+++ b/canvas/source/vcl/spritecanvas.cxx
@@ -129,14 +129,14 @@ namespace vclcanvas
}
- void SAL_CALL SpriteCanvas::disposing()
+ void SpriteCanvas::disposeThis()
{
SolarMutexGuard aGuard;
mxComponentContext.clear();
// forward to parent
- SpriteCanvasBaseT::disposing();
+ SpriteCanvasBaseT::disposeThis();
}
::sal_Bool SAL_CALL SpriteCanvas::showBuffer( ::sal_Bool bUpdateAll ) throw (uno::RuntimeException)
diff --git a/canvas/source/vcl/spritecanvas.hxx b/canvas/source/vcl/spritecanvas.hxx
index 15688fca0ee3..26500fc93552 100644
--- a/canvas/source/vcl/spritecanvas.hxx
+++ b/canvas/source/vcl/spritecanvas.hxx
@@ -45,7 +45,7 @@
#include <comphelper/uno3.hxx>
#include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/basemutexhelper.hxx>
+#include <canvas/base/disambiguationhelper.hxx>
#include <canvas/base/bufferedgraphicdevicebase.hxx>
#include "spritecanvashelper.hxx"
@@ -68,7 +68,7 @@ namespace vclcanvas
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
- typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::BaseMutexHelper< WindowGraphicDeviceBase_Base >,
+ typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
tools::LocalGuard,
::cppu::OWeakObject > SpriteCanvasBase_Base;
@@ -123,12 +123,8 @@ namespace vclcanvas
/// For resource tracking
~SpriteCanvas();
-#if defined __SUNPRO_CC
- using SpriteCanvasBaseT::disposing;
-#endif
-
/// Dispose all internal references
- virtual void SAL_CALL disposing();
+ virtual void disposeThis();
// Forwarding the XComponent implementation to the
// cppu::ImplHelper templated base