Kaydet (Commit) d0dbce79 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

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.
üst e5eab37d
......@@ -35,6 +35,7 @@
/** === end UNO includes === **/
#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
//........................................................................
namespace svt
......@@ -75,7 +76,7 @@ namespace svt
//------------------------------------------------------------------------------------------------------------------
Reference< XAccessibleContext > PanelTabBarPeer::CreateAccessibleContext()
{
::osl::SolarGuard aSolarGuard( GetMutex() );
SolarMutexGuard aSolarGuard;
if ( m_pTabBar == NULL )
throw DisposedException( ::rtl::OUString(), *this );
......@@ -91,7 +92,7 @@ namespace svt
void SAL_CALL PanelTabBarPeer::dispose() throw(RuntimeException)
{
{
::osl::SolarGuard aSolarGuard( GetMutex() );
SolarMutexGuard aSolarGuard;
m_pTabBar = NULL;
}
VCLXWindow::dispose();
......
......@@ -35,6 +35,7 @@
/** === end UNO includes === **/
#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
//......................................................................................................................
namespace svt
......@@ -75,7 +76,7 @@ namespace svt
//------------------------------------------------------------------------------------------------------------------
Reference< XAccessibleContext > ToolPanelDeckPeer::CreateAccessibleContext()
{
::osl::SolarGuard aSolarGuard( GetMutex() );
SolarMutexGuard aSolarGuard;
if ( m_pDeck == NULL )
throw DisposedException( ::rtl::OUString(), *this );
......@@ -89,7 +90,7 @@ namespace svt
void SAL_CALL ToolPanelDeckPeer::dispose() throw(RuntimeException)
{
{
::osl::SolarGuard aSolarGuard( GetMutex() );
SolarMutexGuard aSolarGuard;
m_pDeck = NULL;
}
VCLXWindow::dispose();
......
......@@ -39,6 +39,7 @@
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <vcl/vclevent.hxx>
#include <vcl/svapp.hxx>
//......................................................................................................................
namespace svt
......@@ -134,7 +135,7 @@ namespace svt
//------------------------------------------------------------------------------------------------------------------
Reference< XAccessibleContext > ToolPanelDrawerPeer::CreateAccessibleContext()
{
::osl::SolarGuard aSolarGuard( GetMutex() );
SolarMutexGuard aSolarGuard;
return new ToolPanelDrawerContext( *this );
}
......
......@@ -51,6 +51,8 @@
#include <com/sun/star/util/Color.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <vcl/svapp.hxx>
using ::rtl::OUString;
using namespace ::svt::table;
using namespace ::com::sun::star::uno;
......@@ -124,7 +126,7 @@ void SAL_CALL SVTXGridControl::removeSelectionListener(const ::com::sun::star::u
void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const Any& aValue) throw(RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
TableControl* pTable = (TableControl*)GetWindow();
switch( GetPropertyId( PropertyName ) )
......@@ -363,7 +365,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
const sal_uInt16 nPropId = GetPropertyId( PropertyName );
TableControl* pTable = (TableControl*)GetWindow();
......@@ -422,7 +424,7 @@ void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
}
void SAL_CALL SVTXGridControl::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
TableControl* pTable = (TableControl*)GetWindow();
if ( pTable )
{
......@@ -432,13 +434,13 @@ void SAL_CALL SVTXGridControl::setVisible( sal_Bool bVisible ) throw(::com::sun:
}
void SAL_CALL SVTXGridControl::setFocus() throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( GetWindow())
GetWindow()->GrabFocus();
}
void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
std::vector< Any > newRow;
Sequence< Any > rawRowData = Event.rowData;
......@@ -486,7 +488,7 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD
void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
TableControl* pTable = (TableControl*)GetWindow();
if(Event.index == -1)
......@@ -529,7 +531,7 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri
void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid::GridColumnEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
TableControl* pTable = (TableControl*)GetWindow();
if(Event.valueName == rtl::OUString::createFromAscii("ColumnResize"))
......@@ -578,7 +580,7 @@ void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid:
}
void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
TableControl* pTable = (TableControl*)GetWindow();
if(Event.valueName == rtl::OUString::createFromAscii("RowHeight"))
......@@ -819,7 +821,7 @@ void SAL_CALL SVTXGridControl::selectColumn(::sal_Int32 x) throw (::com::sun::st
}
void SVTXGridControl::dispose() throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::com::sun::star::lang::EventObject aObj;
aObj.Source = (::cppu::OWeakObject*)this;
......
This diff is collapsed.
......@@ -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:
......
......@@ -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();
......
......@@ -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();
......
......@@ -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,
......
......@@ -39,6 +39,7 @@
#include <osl/mutex.hxx>
#include <vcl/window.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
//......................................................................................................................
namespace toolkit
......@@ -69,13 +70,11 @@ namespace toolkit
//==================================================================================================================
struct WindowStyleSettings_Data
{
::osl::SolarMutex& rMutex;
VCLXWindow* pOwningWindow;
::cppu::OInterfaceContainerHelper aStyleChangeListeners;
WindowStyleSettings_Data( ::osl::SolarMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
:rMutex( i_rWindowMutex )
,pOwningWindow( &i_rOwningWindow )
WindowStyleSettings_Data( ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
: pOwningWindow( &i_rOwningWindow )
,aStyleChangeListeners( i_rListenerMutex )
{
}
......@@ -106,7 +105,6 @@ namespace toolkit
{
public:
StyleMethodGuard( WindowStyleSettings_Data& i_rData )
:m_aGuard( i_rData.rMutex )
{
if ( i_rData.pOwningWindow == NULL )
throw DisposedException();
......@@ -117,15 +115,15 @@ namespace toolkit
}
private:
::osl::SolarGuard m_aGuard;
SolarMutexGuard m_aGuard;
};
//==================================================================================================================
//= WindowStyleSettings
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
WindowStyleSettings::WindowStyleSettings( ::osl::SolarMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
:m_pData( new WindowStyleSettings_Data( i_rWindowMutex, i_rListenerMutex, i_rOwningWindow ) )
WindowStyleSettings::WindowStyleSettings(::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
:m_pData( new WindowStyleSettings_Data(i_rListenerMutex, i_rOwningWindow ) )
{
Window* pWindow = i_rOwningWindow.GetWindow();
if ( !pWindow )
......
......@@ -57,7 +57,7 @@ namespace toolkit
class WindowStyleSettings : public WindowStyleSettings_Base
{
public:
WindowStyleSettings( ::osl::SolarMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow );
WindowStyleSettings( ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow );
~WindowStyleSettings();
void dispose();
......
......@@ -37,6 +37,7 @@
#include <rtl/memory.h>
#include <rtl/uuid.h>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <tools/debug.hxx>
......@@ -77,21 +78,21 @@ IMPL_XTYPEPROVIDER_END
// ::com::sun::star::awt::XVclContainer
void VCLXContainer::addVclContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclContainerListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
GetContainerListeners().addInterface( rxListener );
}
void VCLXContainer::removeVclContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclContainerListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
GetContainerListeners().removeInterface( rxListener );
}
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > VCLXContainer::getWindows( ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
// Bei allen Childs das Container-Interface abfragen...
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > aSeq;
......@@ -119,7 +120,7 @@ void VCLXContainer::removeVclContainerListener( const ::com::sun::star::uno::Ref
// ::com::sun::star::awt::XVclContainerPeer
void VCLXContainer::enableDialogControl( sal_Bool bEnable ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
Window* pWindow = GetWindow();
if ( pWindow )
......@@ -135,7 +136,7 @@ void VCLXContainer::enableDialogControl( sal_Bool bEnable ) throw(::com::sun::st
void VCLXContainer::setTabOrder( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > >& Components, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Tabs, sal_Bool bGroupControl ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
sal_uInt32 nCount = Components.getLength();
DBG_ASSERT( nCount == (sal_uInt32)Tabs.getLength(), "setTabOrder: TabCount != ComponentCount" );
......@@ -180,7 +181,7 @@ void VCLXContainer::setTabOrder( const ::com::sun::star::uno::Sequence< ::com::s
void VCLXContainer::setGroup( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > >& Components ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
sal_uInt32 nCount = Components.getLength();
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > * pComps = Components.getConstArray();
......@@ -234,4 +235,4 @@ void VCLXContainer::setGroup( const ::com::sun::star::uno::Sequence< ::com::sun:
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -53,7 +53,7 @@
// ----------------------------------------------------
// class VCLXDevice
// ----------------------------------------------------
VCLXDevice::VCLXDevice() : mrMutex( Application::GetSolarMutex() )
VCLXDevice::VCLXDevice()
{
mpOutputDevice = NULL;
nFlags = 0;
......@@ -112,7 +112,7 @@ IMPL_XTYPEPROVIDER_END
// ::com::sun::star::awt::XDevice,
::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > VCLXDevice::createGraphics( ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > xRef;
......@@ -124,7 +124,7 @@ IMPL_XTYPEPROVIDER_END
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXDevice::createDevice( sal_Int32 nWidth, sal_Int32 nHeight ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > xRef;
if ( GetOutputDevice() )
......@@ -140,7 +140,7 @@ IMPL_XTYPEPROVIDER_END
::com::sun::star::awt::DeviceInfo VCLXDevice::getInfo() throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::com::sun::star::awt::DeviceInfo aInfo;
......@@ -191,7 +191,7 @@ IMPL_XTYPEPROVIDER_END
::com::sun::star::uno::Sequence< ::com::sun::star::awt::FontDescriptor > VCLXDevice::getFontDescriptors( ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::com::sun::star::uno::Sequence< ::com::sun::star::awt::FontDescriptor> aFonts;
if( mpOutputDevice )
......@@ -210,7 +210,7 @@ IMPL_XTYPEPROVIDER_END
::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > VCLXDevice::getFont( const ::com::sun::star::awt::FontDescriptor& rDescriptor ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > xRef;
if( mpOutputDevice )
......@@ -224,7 +224,7 @@ IMPL_XTYPEPROVIDER_END
::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap > VCLXDevice::createBitmap( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap > xBmp;
if( mpOutputDevice )
......@@ -240,7 +240,7 @@ IMPL_XTYPEPROVIDER_END
::com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayBitmap > VCLXDevice::createDisplayBitmap( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >& rxBitmap ) throw(::com::sun::star::uno::RuntimeException)
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
BitmapEx aBmp = VCLUnoHelper::GetBitmap( rxBitmap );
VCLXBitmap* pBmp = new VCLXBitmap;
......@@ -252,7 +252,7 @@ IMPL_XTYPEPROVIDER_END
VCLXVirtualDevice::~VCLXVirtualDevice()
{
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
DestroyOutputDevice();
}
......@@ -265,7 +265,7 @@ VCLXVirtualDevice::~VCLXVirtualDevice()
::com::sun::star::awt::Point SAL_CALL VCLXDevice::convertPointToLogic( const ::com::sun::star::awt::Point& aPoint, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
(void)aPoint;
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if (TargetUnit == com::sun::star::util::MeasureUnit::PERCENT )
{
// percentage not allowed here
......@@ -290,7 +290,7 @@ VCLXVirtualDevice::~VCLXVirtualDevice()
::com::sun::star::awt::Point SAL_CALL VCLXDevice::convertPointToPixel( const ::com::sun::star::awt::Point& aPoint, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
(void)aPoint;
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if (SourceUnit == com::sun::star::util::MeasureUnit::PERCENT ||
SourceUnit == com::sun::star::util::MeasureUnit::PIXEL )
{
......@@ -314,7 +314,7 @@ VCLXVirtualDevice::~VCLXVirtualDevice()
::com::sun::star::awt::Size SAL_CALL VCLXDevice::convertSizeToLogic( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
(void)aSize;
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if (TargetUnit == com::sun::star::util::MeasureUnit::PERCENT)
{
// percentage not allowed here
......@@ -339,7 +339,7 @@ VCLXVirtualDevice::~VCLXVirtualDevice()
::com::sun::star::awt::Size SAL_CALL VCLXDevice::convertSizeToPixel( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
(void)aSize;
osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if (SourceUnit == com::sun::star::util::MeasureUnit::PERCENT ||
SourceUnit == com::sun::star::util::MeasureUnit::PIXEL)
{
......
......@@ -80,11 +80,6 @@ VCLXDialog::~VCLXDialog()
DBG_DTOR( VCLXDialog, NULL );
}
osl::SolarMutex& VCLXDialog::GetMutexImpl()
{
return VCLXWindow::GetMutex();
}
Window* VCLXDialog::GetWindowImpl()
{
return VCLXWindow::GetWindow();
......@@ -102,7 +97,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXDialog, VCLXWindow, VCLXDialog_Base );
void SAL_CALL VCLXDialog::dispose() throw(::com::sun::star::uno::RuntimeException)
{
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::com::sun::star::lang::EventObject aDisposeEvent;
aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
......@@ -147,7 +142,7 @@ void SAL_CALL VCLXDialog::allocateArea( const css::awt::Rectangle &rArea )
void VCLXDialog::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
{
::osl::ClearableSolarGuard aGuard( GetMutex() );
SolarMutexClearableGuard aGuard;
switch ( _rVclWindowEvent.GetId() )
{
......@@ -162,7 +157,7 @@ void VCLXDialog::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
void SAL_CALL VCLXDialog::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any &Value ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( GetWindow() )
{
......@@ -179,7 +174,7 @@ void SAL_CALL VCLXDialog::setProperty( const ::rtl::OUString& PropertyName, cons
::com::sun::star::uno::Any SAL_CALL VCLXDialog::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::com::sun::star::uno::Any aReturn;
if ( GetWindow() )
......@@ -200,7 +195,7 @@ void SAL_CALL VCLXDialog::setProperty( const ::rtl::OUString& PropertyName, cons
void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
Window* pWindow = GetWindow();
if ( pWindow )
......@@ -209,7 +204,7 @@ void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star
void VCLXDialog::setHelpId( sal_Int32 id ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
Window* pWindow = GetWindow();
if ( pWindow )
......@@ -218,7 +213,7 @@ void VCLXDialog::setHelpId( sal_Int32 id ) throw(::com::sun::star::uno::RuntimeE
::rtl::OUString VCLXDialog::getTitle() throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
::rtl::OUString aTitle;
Window* pWindow = GetWindow();
......@@ -229,7 +224,7 @@ void VCLXDialog::setHelpId( sal_Int32 id ) throw(::com::sun::star::uno::RuntimeE
sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
sal_Int16 nRet = 0;
if ( GetWindow() )
......@@ -253,7 +248,7 @@ sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException)
void VCLXDialog::endDialog( sal_Int32 nResult ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( nResult == BUTTONID_HELP )
{
......
......@@ -54,7 +54,6 @@ private:
VCLXDialog& operator=( const VCLXDialog& ); // never implemented
protected:
osl::SolarMutex& GetMutexImpl();
Window* GetWindowImpl();
::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl();
......
......@@ -33,6 +33,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/debug.hxx>
#include <vcl/fixed.hxx>
#include <vcl/svapp.hxx>
#include "forward.hxx"
......@@ -63,7 +64,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXFixedLine, VCLXWindow );
void SAL_CALL VCLXFixedLine::dispose() throw(RuntimeException)
{
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
EventObject aDisposeEvent;
aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
......@@ -80,23 +81,14 @@ void SAL_CALL VCLXFixedLine::dispose() throw(RuntimeException)
void VCLXFixedLine::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
{
::osl::ClearableSolarGuard aGuard( GetMutex() );
/*
switch ( _rVclWindowEvent.GetId() )
{
default:
aGuard.clear();
*/
VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
/*
break;
}
*/
SolarMutexGuard aGuard;
VCLXWindow::ProcessWindowEvent( _rVclWindowEvent );
}
void SAL_CALL VCLXFixedLine::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( GetWindow() )
{
......@@ -113,7 +105,7 @@ void SAL_CALL VCLXFixedLine::setProperty( const ::rtl::OUString& PropertyName, c
Any SAL_CALL VCLXFixedLine::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
Any aReturn;
if ( GetWindow() )
......
......@@ -32,6 +32,7 @@
#include <toolkit/helper/convert.hxx>
#include <toolkit/helper/property.hxx>
#include <vcl/ctrl.hxx>
#include <vcl/svapp.hxx>
#include "forward.hxx"
......@@ -55,7 +56,7 @@ VCLXPlugin::~VCLXPlugin()
void SAL_CALL VCLXPlugin::dispose() throw(uno::RuntimeException)
{
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
lang::EventObject aDisposeEvent;
aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
......@@ -72,7 +73,7 @@ void VCLXPlugin::SetPlugin( ::Control *p )
awt::Size SAL_CALL VCLXPlugin::getMinimumSize()
throw(::com::sun::star::uno::RuntimeException)
{
::osl::ClearableSolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( mpPlugin )
return AWTSize( mpPlugin->GetSizePixel() );
return awt::Size();
......
......@@ -35,6 +35,7 @@
#include <toolkit/helper/property.hxx>
#include <tools/debug.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/svapp.hxx>
#include "forward.hxx"
......@@ -69,7 +70,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXScroller, VCLXWindow );
void SAL_CALL VCLXScroller::dispose() throw(RuntimeException)
{
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
EventObject aDisposeEvent;
aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
......@@ -154,7 +155,7 @@ void VCLXScroller::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
void SAL_CALL VCLXScroller::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( GetWindow() )
{
......@@ -173,7 +174,7 @@ void SAL_CALL VCLXScroller::setProperty( const ::rtl::OUString& PropertyName, co
Any SAL_CALL VCLXScroller::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
Any aReturn;
if ( GetWindow() )
......
......@@ -35,6 +35,7 @@
#include <tools/debug.hxx>
#include <vcl/spin.hxx>
#include <vcl/svapp.hxx>
namespace toolkit
{
......@@ -93,7 +94,7 @@ namespace toolkit
void SAL_CALL VCLXSpinButton::dispose( ) throw(RuntimeException)
{
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
EventObject aDisposeEvent;
aDisposeEvent.Source = *this;
......@@ -123,19 +124,18 @@ namespace toolkit
typedef long (SpinButton::*GetSpinButtonValue) (void) const;
//................................................................
void lcl_setSpinButtonValue( ::osl::SolarMutex& _rMutex, Window* _pWindow, SetSpinButtonValue _pSetter, sal_Int32 _nValue )
void lcl_setSpinButtonValue(Window* _pWindow, SetSpinButtonValue _pSetter, sal_Int32 _nValue )
{
::osl::SolarGuard aGuard( _rMutex );
SolarMutexGuard aGuard;
SpinButton* pSpinButton = static_cast< SpinButton* >( _pWindow );
if ( pSpinButton )
(pSpinButton->*_pSetter)( _nValue );
}
//................................................................
sal_Int32 lcl_getSpinButtonValue( ::osl::SolarMutex& _rMutex, const Window* _pWindow, GetSpinButtonValue _pGetter )
sal_Int32 lcl_getSpinButtonValue(const Window* _pWindow, GetSpinButtonValue _pGetter )
{
::osl::SolarGuard aGuard( _rMutex );
SolarMutexGuard aGuard;
sal_Int32 nValue = 0;
......@@ -149,13 +149,13 @@ namespace toolkit
//--------------------------------------------------------------------
void SAL_CALL VCLXSpinButton::setValue( sal_Int32 n ) throw (RuntimeException)
{
lcl_setSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::SetValue, n );
lcl_setSpinButtonValue( GetWindow(), &SpinButton::SetValue, n );
}
//--------------------------------------------------------------------
void SAL_CALL VCLXSpinButton::setValues( sal_Int32 minValue, sal_Int32 maxValue, sal_Int32 currentValue ) throw (RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
setMinimum( minValue );
setMaximum( maxValue );
......@@ -165,49 +165,49 @@ namespace toolkit
//--------------------------------------------------------------------
sal_Int32 SAL_CALL VCLXSpinButton::getValue( ) throw (RuntimeException)
{
return lcl_getSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::GetValue );
return lcl_getSpinButtonValue( GetWindow(), &SpinButton::GetValue );
}
//--------------------------------------------------------------------
void SAL_CALL VCLXSpinButton::setMinimum( sal_Int32 minValue ) throw (RuntimeException)
{
lcl_setSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::SetRangeMin, minValue );
lcl_setSpinButtonValue( GetWindow(), &SpinButton::SetRangeMin, minValue );
}
//--------------------------------------------------------------------
void SAL_CALL VCLXSpinButton::setMaximum( sal_Int32 maxValue ) throw (RuntimeException)
{
lcl_setSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::SetRangeMax, maxValue );
lcl_setSpinButtonValue( GetWindow(), &SpinButton::SetRangeMax, maxValue );
}
//--------------------------------------------------------------------
sal_Int32 SAL_CALL VCLXSpinButton::getMinimum( ) throw (RuntimeException)
{
return lcl_getSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::GetRangeMin );
return lcl_getSpinButtonValue( GetWindow(), &SpinButton::GetRangeMin );
}
//--------------------------------------------------------------------
sal_Int32 SAL_CALL VCLXSpinButton::getMaximum( ) throw (RuntimeException)
{
return lcl_getSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::GetRangeMax );
return lcl_getSpinButtonValue( GetWindow(), &SpinButton::GetRangeMax );
}
//--------------------------------------------------------------------
void SAL_CALL VCLXSpinButton::setSpinIncrement( sal_Int32 spinIncrement ) throw (RuntimeException)
{
lcl_setSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::SetValueStep, spinIncrement );
lcl_setSpinButtonValue( GetWindow(), &SpinButton::SetValueStep, spinIncrement );
}
//--------------------------------------------------------------------
sal_Int32 SAL_CALL VCLXSpinButton::getSpinIncrement( ) throw (RuntimeException)
{
return lcl_getSpinButtonValue( GetMutex(), GetWindow(), &SpinButton::GetValueStep );
return lcl_getSpinButtonValue( GetWindow(), &SpinButton::GetValueStep );
}
//--------------------------------------------------------------------
void SAL_CALL VCLXSpinButton::setOrientation( sal_Int32 orientation ) throw (NoSupportException, RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
lcl_modifyStyle( GetWindow(), WB_HSCROLL, orientation == ScrollBarOrientation::HORIZONTAL );
}
......@@ -223,7 +223,7 @@ namespace toolkit
//--------------------------------------------------------------------
void VCLXSpinButton::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
{
::osl::ClearableSolarGuard aGuard( GetMutex() );
SolarMutexClearableGuard aGuard;
Reference< XSpinValue > xKeepAlive( this );
SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() );
if ( !pSpinButton )
......@@ -255,7 +255,7 @@ namespace toolkit
//--------------------------------------------------------------------
void SAL_CALL VCLXSpinButton::setProperty( const ::rtl::OUString& PropertyName, const Any& Value ) throw(RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
sal_Int32 nValue = 0;
sal_Bool bIsLongValue = ( Value >>= nValue );
......@@ -305,7 +305,7 @@ namespace toolkit
//--------------------------------------------------------------------
Any SAL_CALL VCLXSpinButton::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
Any aReturn;
......
......@@ -34,6 +34,7 @@
#include <toolkit/helper/property.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/split.hxx>
#include <vcl/svapp.hxx>
#include "forward.hxx"
......@@ -107,7 +108,7 @@ VCLXSplitter::getChild( int i )
void SAL_CALL VCLXSplitter::dispose() throw(RuntimeException)
{
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
EventObject aDisposeEvent;
aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
......
......@@ -50,6 +50,7 @@
#include "postmac.h"
#endif
#include <vcl/svapp.hxx>
#include <vcl/syschild.hxx>
#include <vcl/sysdata.hxx>
......@@ -80,7 +81,7 @@ IMPL_XTYPEPROVIDER_END
::com::sun::star::uno::Any VCLXSystemDependentWindow::getWindowHandle( const ::com::sun::star::uno::Sequence< sal_Int8 >& /*ProcessId*/, sal_Int16 SystemType ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
// TODO, check the process id
::com::sun::star::uno::Any aRet;
......
......@@ -34,6 +34,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/svapp.hxx>
#include "forward.hxx"
......@@ -100,7 +101,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXTabControl, VCLXWindow, VCLXTabControl_Bas
void SAL_CALL VCLXTabControl::dispose( ) throw(uno::RuntimeException)
{
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
EventObject aDisposeEvent;
aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
......@@ -220,7 +221,7 @@ uno::Sequence< NamedValue > SAL_CALL VCLXTabControl::getTabProps( sal_Int32 ID )
// TODO: draw tab border here
void SAL_CALL VCLXTabControl::draw( sal_Int32 nX, sal_Int32 nY ) throw(uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
TabControl *pTabControl = getTabControl();
TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< USHORT >( getActiveTabID() ) );
......@@ -447,7 +448,7 @@ awt::Size SAL_CALL VCLXTabControl::getMinimumSize()
void VCLXTabControl::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
{
::osl::ClearableSolarGuard aGuard( GetMutex() );
SolarMutexClearableGuard aGuard;
TabControl* pTabControl = static_cast< TabControl* >( GetWindow() );
if ( !pTabControl )
return;
......
......@@ -33,6 +33,7 @@
#include <toolkit/helper/convert.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/svapp.hxx>
#if !defined (__GNUC__)
#define __PRETTY_FUNCTION__ __FUNCTION__
......@@ -66,7 +67,7 @@ VCLXTabPage::~VCLXTabPage()
void SAL_CALL VCLXTabPage::dispose() throw(uno::RuntimeException)
{
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
lang::EventObject aDisposeEvent;
aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this);
......@@ -135,7 +136,7 @@ void SAL_CALL VCLXTabPage::allocateArea( awt::Rectangle const& area )
awt::Size SAL_CALL VCLXTabPage::getMinimumSize()
throw(uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
return Bin::getMinimumSize();
}
......
......@@ -93,7 +93,7 @@ Sequence< Type > VCLXTopWindow_Base::getTypes() throw(RuntimeException)
::com::sun::star::uno::Any VCLXTopWindow_Base::getWindowHandle( const ::com::sun::star::uno::Sequence< sal_Int8 >& /*ProcessId*/, sal_Int16 SystemType ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
// TODO, check the process id
::com::sun::star::uno::Any aRet;
......@@ -134,21 +134,21 @@ Sequence< Type > VCLXTopWindow_Base::getTypes() throw(RuntimeException)
void VCLXTopWindow_Base::addTopWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTopWindowListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
GetTopWindowListenersImpl().addInterface( rxListener );
}
void VCLXTopWindow_Base::removeTopWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTopWindowListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
GetTopWindowListenersImpl().removeInterface( rxListener );
}
void VCLXTopWindow_Base::toFront( ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
Window* pWindow = GetWindowImpl();
if ( pWindow )
......@@ -161,7 +161,7 @@ void VCLXTopWindow_Base::toBack( ) throw(::com::sun::star::uno::RuntimeExceptio
void VCLXTopWindow_Base::setMenuBar( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar >& rxMenu ) throw(::com::sun::star::uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
SystemWindow* pWindow = (SystemWindow*) GetWindowImpl();
if ( pWindow )
......@@ -180,7 +180,7 @@ void VCLXTopWindow_Base::setMenuBar( const ::com::sun::star::uno::Reference< ::c
//--------------------------------------------------------------------
::sal_Bool SAL_CALL VCLXTopWindow_Base::getIsMaximized() throw (RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
const WorkWindow* pWindow = dynamic_cast< const WorkWindow* >( GetWindowImpl() );
if ( !pWindow )
......@@ -192,7 +192,7 @@ void VCLXTopWindow_Base::setMenuBar( const ::com::sun::star::uno::Reference< ::c
//--------------------------------------------------------------------
void SAL_CALL VCLXTopWindow_Base::setIsMaximized( ::sal_Bool _ismaximized ) throw (RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
WorkWindow* pWindow = dynamic_cast< WorkWindow* >( GetWindowImpl() );
if ( !pWindow )
......@@ -204,7 +204,7 @@ void SAL_CALL VCLXTopWindow_Base::setIsMaximized( ::sal_Bool _ismaximized ) thro
//--------------------------------------------------------------------
::sal_Bool SAL_CALL VCLXTopWindow_Base::getIsMinimized() throw (RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
const WorkWindow* pWindow = dynamic_cast< const WorkWindow* >( GetWindowImpl() );
if ( !pWindow )
......@@ -216,7 +216,7 @@ void SAL_CALL VCLXTopWindow_Base::setIsMaximized( ::sal_Bool _ismaximized ) thro
//--------------------------------------------------------------------
void SAL_CALL VCLXTopWindow_Base::setIsMinimized( ::sal_Bool _isMinimized ) throw (RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
WorkWindow* pWindow = dynamic_cast< WorkWindow* >( GetWindowImpl() );
if ( !pWindow )
......@@ -228,7 +228,7 @@ void SAL_CALL VCLXTopWindow_Base::setIsMinimized( ::sal_Bool _isMinimized ) thro
//--------------------------------------------------------------------
::sal_Int32 SAL_CALL VCLXTopWindow_Base::getDisplay() throw (RuntimeException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
const SystemWindow* pWindow = dynamic_cast< const SystemWindow* >( GetWindowImpl() );
if ( !pWindow )
......@@ -240,7 +240,7 @@ void SAL_CALL VCLXTopWindow_Base::setIsMinimized( ::sal_Bool _isMinimized ) thro
//--------------------------------------------------------------------
void SAL_CALL VCLXTopWindow_Base::setDisplay( ::sal_Int32 _display ) throw (RuntimeException, IndexOutOfBoundsException)
{
::osl::SolarGuard aGuard( GetMutexImpl() );
SolarMutexGuard aGuard;
if ( ( _display < 0 ) || ( _display >= (sal_Int32)Application::GetScreenCount() ) )
throw IndexOutOfBoundsException();
......@@ -270,11 +270,6 @@ VCLXTopWindow::~VCLXTopWindow()
{
}
osl::SolarMutex& VCLXTopWindow::GetMutexImpl()
{
return VCLXContainer::GetMutex();
}
Window* VCLXTopWindow::GetWindowImpl()
{
return VCLXContainer::GetWindow();
......
......@@ -33,6 +33,8 @@
#include "toolkit/helper/throbberimpl.hxx"
#include <tools/debug.hxx>
#include <vcl/svapp.hxx>
//........................................................................
namespace toolkit
{
......@@ -102,7 +104,7 @@ namespace toolkit
void SAL_CALL XSimpleAnimation::setProperty( const ::rtl::OUString& PropertyName, const uno::Any& Value )
throw( uno::RuntimeException )
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( GetWindow() )
{
......@@ -138,7 +140,7 @@ namespace toolkit
uno::Any SAL_CALL XSimpleAnimation::getProperty( const ::rtl::OUString& PropertyName )
throw( uno::RuntimeException )
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
uno::Any aReturn;
......
......@@ -37,6 +37,7 @@
#include <tools/debug.hxx>
#include <vcl/fixed.hxx>
#include <vcl/timer.hxx>
#include <vcl/svapp.hxx>
//........................................................................
namespace toolkit
......@@ -108,7 +109,7 @@ namespace toolkit
void SAL_CALL XThrobber::setProperty( const ::rtl::OUString& PropertyName, const uno::Any& Value )
throw( uno::RuntimeException )
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( GetWindow() )
{
......@@ -120,7 +121,7 @@ namespace toolkit
uno::Any SAL_CALL XThrobber::getProperty( const ::rtl::OUString& PropertyName )
throw( uno::RuntimeException )
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
uno::Any aReturn;
......@@ -135,7 +136,7 @@ namespace toolkit
void SAL_CALL XThrobber::InitImageList()
throw( uno::RuntimeException )
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
uno::Sequence< uno::Reference< graphic::XGraphic > > aImageList(12);
sal_uInt16 nIconIdStart = RID_TK_ICON_THROBBER_START;
......
......@@ -41,7 +41,6 @@ namespace toolkit
Throbber_Impl::Throbber_Impl( uno::Reference< VCLXWindow > xParent,
sal_Int32 nStepTime,
sal_Bool bRepeat )
:mrMutex( Application::GetSolarMutex() )
{
mxParent = xParent;
mbRepeat = bRepeat;
......@@ -60,7 +59,7 @@ namespace toolkit
//--------------------------------------------------------------------
void Throbber_Impl::start() throw ( uno::RuntimeException )
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
mnCurStep = 0;
maWaitTimer.Start();
......@@ -69,7 +68,7 @@ namespace toolkit
//--------------------------------------------------------------------
void Throbber_Impl::stop() throw ( uno::RuntimeException )
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
maWaitTimer.Stop();
}
......@@ -78,7 +77,7 @@ namespace toolkit
void Throbber_Impl::setImageList( const uno::Sequence< uno::Reference< graphic::XGraphic > >& rImageList )
throw ( uno::RuntimeException )
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
maImageList = rImageList;
......@@ -116,7 +115,7 @@ namespace toolkit
// -----------------------------------------------------------------------
IMPL_LINK( Throbber_Impl, TimeOutHdl, Throbber_Impl*, EMPTYARG )
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
FixedImage* pImage = static_cast< FixedImage* >( mxParent->GetWindow() );
......
......@@ -30,6 +30,7 @@
#include <toolkit/helper/property.hxx>
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
namespace layoutimpl
{
......@@ -61,7 +62,7 @@ uno::Any LocalizedString::queryInterface( uno::Type const& rType )
void LocalizedString::setText( OUString const& s )
throw(uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( Window *w = GetWindow() )
return w->SetText( s );
......@@ -70,7 +71,7 @@ void LocalizedString::setText( OUString const& s )
OUString LocalizedString::getText()
throw(uno::RuntimeException)
{
::osl::SolarGuard aGuard( GetMutex() );
SolarMutexGuard aGuard;
if ( Window *w = GetWindow() )
return w->GetText();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment