diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-11-01 00:22:41 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-11-01 12:24:32 -0500 |
commit | d0dbce798b47bb9e728f59f5f93fff8215876ab5 (patch) | |
tree | 330400341bba219061c17e9be210408729ef9c87 /toolkit/inc | |
parent | e5eab37d6fa6d49790d44e15b5908f0a735a629a (diff) |
remove a confusing use of GetMutex() when a SolarMutexGuard is really meant
VCLXDevice, VCLXGraphics and derived class use a mutex that is really
a reference to the SolarMutex. They declare a function GetMutex() to
access tis reference to the SolarMutex, and the implementation
use
osl::SolarGuard aGuard(GetMutex())
to take a guad on the solar mutex.
This is confusing because some other class in that framework also implement
a GetMutex() function, but which this time return a regular Mutex.
Since this particular use of GetMutex() is to get the SolarMutex, and
invariably this is then used to take a Guard on the SolarMutex,
all these uses are replaced by a SolarMutexGuard object, which encapsulate
that behavior.
Diffstat (limited to 'toolkit/inc')
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxdevice.hxx | 2 | ||||
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxgraphics.hxx | 4 | ||||
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxtopwindow.hxx | 2 | ||||
-rw-r--r-- | toolkit/inc/toolkit/helper/throbberimpl.hxx | 3 |
4 files changed, 0 insertions, 11 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxdevice.hxx b/toolkit/inc/toolkit/awt/vclxdevice.hxx index 5cee7501ac34..d7d144edff98 100644 --- a/toolkit/inc/toolkit/awt/vclxdevice.hxx +++ b/toolkit/inc/toolkit/awt/vclxdevice.hxx @@ -58,7 +58,6 @@ class TOOLKIT_DLLPUBLIC VCLXDevice : public ::com::sun::star::awt::XDevice, friend class VCLXGraphics; private: - ::osl::SolarMutex& mrMutex; // Reference to SolarMutex OutputDevice* mpOutputDevice; public: @@ -66,7 +65,6 @@ public: sal_uInt32 nFlags; protected: - ::osl::SolarMutex& GetMutex() { return mrMutex; } void DestroyOutputDevice(); public: diff --git a/toolkit/inc/toolkit/awt/vclxgraphics.hxx b/toolkit/inc/toolkit/awt/vclxgraphics.hxx index 22266f3aa7fc..1feea0be2e0b 100644 --- a/toolkit/inc/toolkit/awt/vclxgraphics.hxx +++ b/toolkit/inc/toolkit/awt/vclxgraphics.hxx @@ -61,7 +61,6 @@ class VCLXGraphics : public ::com::sun::star::awt::XGraphics, public ::cppu::OWeakObject { private: - osl::SolarMutex& mrMutex; // Reference to SolarMutex ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; // nur um bei getDevice() immer das gleiche zurueckzugeben OutputDevice* mpOutputDevice; @@ -73,9 +72,6 @@ private: RasterOp meRasterOp; Region* mpClipRegion; -protected: - osl::SolarMutex& GetMutex() { return mrMutex; } - public: VCLXGraphics(); ~VCLXGraphics(); diff --git a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx index 5c49313c1aed..76bdf0b8dceb 100644 --- a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx @@ -55,7 +55,6 @@ protected: bool isSystemDependentWindowPeer() const { return m_bWHWND; } - virtual ::osl::SolarMutex& GetMutexImpl() = 0; virtual Window* GetWindowImpl() = 0; virtual ::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl() = 0; @@ -96,7 +95,6 @@ class VCLXTopWindow: public VCLXTopWindow_Base, public VCLXContainer { protected: - virtual osl::SolarMutex& GetMutexImpl(); virtual Window* GetWindowImpl(); virtual ::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl(); diff --git a/toolkit/inc/toolkit/helper/throbberimpl.hxx b/toolkit/inc/toolkit/helper/throbberimpl.hxx index eab9eb76aa53..0388b0735113 100644 --- a/toolkit/inc/toolkit/helper/throbberimpl.hxx +++ b/toolkit/inc/toolkit/helper/throbberimpl.hxx @@ -44,7 +44,6 @@ namespace toolkit class Throbber_Impl { private: - osl::SolarMutex& mrMutex; // Reference to SolarMutex ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList; ::com::sun::star::uno::Reference< VCLXWindow > mxParent; @@ -56,8 +55,6 @@ namespace toolkit DECL_LINK( TimeOutHdl, Throbber_Impl* ); - osl::SolarMutex& GetMutex() { return mrMutex; } - public: Throbber_Impl( ::com::sun::star::uno::Reference< VCLXWindow > xParent, sal_Int32 nStepTime, |