[Libreoffice-commits] .: svtools/source toolkit/inc toolkit/source

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Mon Nov 1 10:34:24 PDT 2010


 svtools/source/toolpanel/paneltabbarpeer.cxx     |    5 
 svtools/source/toolpanel/toolpaneldeckpeer.cxx   |    5 
 svtools/source/toolpanel/toolpaneldrawerpeer.cxx |    3 
 svtools/source/uno/svtxgridcontrol.cxx           |   24 -
 svtools/source/uno/treecontrolpeer.cxx           |   67 +-
 svtools/source/uno/unoiface.cxx                  |  166 +++---
 toolkit/inc/toolkit/awt/vclxdevice.hxx           |    2 
 toolkit/inc/toolkit/awt/vclxgraphics.hxx         |    4 
 toolkit/inc/toolkit/awt/vclxtopwindow.hxx        |    2 
 toolkit/inc/toolkit/helper/throbberimpl.hxx      |    3 
 toolkit/source/awt/stylesettings.cxx             |   14 
 toolkit/source/awt/stylesettings.hxx             |    2 
 toolkit/source/awt/vclxcontainer.cxx             |   14 
 toolkit/source/awt/vclxdevice.cxx                |   26 -
 toolkit/source/awt/vclxdialog.cxx                |   23 
 toolkit/source/awt/vclxdialog.hxx                |    1 
 toolkit/source/awt/vclxfixedline.cxx             |   22 
 toolkit/source/awt/vclxgraphics.cxx              |   60 +-
 toolkit/source/awt/vclxplugin.cxx                |    9 
 toolkit/source/awt/vclxscroller.cxx              |    7 
 toolkit/source/awt/vclxspinbutton.cxx            |   38 -
 toolkit/source/awt/vclxsplitter.cxx              |    3 
 toolkit/source/awt/vclxsystemdependentwindow.cxx |    3 
 toolkit/source/awt/vclxtabcontrol.cxx            |    7 
 toolkit/source/awt/vclxtabpage.cxx               |    5 
 toolkit/source/awt/vclxtopwindow.cxx             |   27 -
 toolkit/source/awt/vclxwindow.cxx                |  137 ++---
 toolkit/source/awt/vclxwindows.cxx               |  552 +++++++++++------------
 toolkit/source/awt/xsimpleanimation.cxx          |    6 
 toolkit/source/awt/xthrobber.cxx                 |    7 
 toolkit/source/helper/throbberimpl.cxx           |    9 
 toolkit/source/layout/core/localized-string.cxx  |    5 
 32 files changed, 619 insertions(+), 639 deletions(-)

New commits:
commit bf5898758c60f1e2c35d99fb720a2b57ceaefd46
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Nov 1 00:22:41 2010 -0500

    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.

diff --git a/svtools/source/toolpanel/paneltabbarpeer.cxx b/svtools/source/toolpanel/paneltabbarpeer.cxx
index 9da8cce..5d65a72 100644
--- a/svtools/source/toolpanel/paneltabbarpeer.cxx
+++ b/svtools/source/toolpanel/paneltabbarpeer.cxx
@@ -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();
diff --git a/svtools/source/toolpanel/toolpaneldeckpeer.cxx b/svtools/source/toolpanel/toolpaneldeckpeer.cxx
index 00b3034..c6f239f 100644
--- a/svtools/source/toolpanel/toolpaneldeckpeer.cxx
+++ b/svtools/source/toolpanel/toolpaneldeckpeer.cxx
@@ -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();
diff --git a/svtools/source/toolpanel/toolpaneldrawerpeer.cxx b/svtools/source/toolpanel/toolpaneldrawerpeer.cxx
index 5f08e3e..6c25027 100644
--- a/svtools/source/toolpanel/toolpaneldrawerpeer.cxx
+++ b/svtools/source/toolpanel/toolpaneldrawerpeer.cxx
@@ -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 );
     }
 
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index bf3ec22..1806d38 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -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;
@@ -68,7 +70,7 @@ SVTXGridControl::SVTXGridControl()
     m_xDataModel(0),
     m_xColumnModel(0),
     m_bHasColumnHeaders(false),
-    m_bHasRowHeaders(false), 
+    m_bHasRowHeaders(false),
     m_bVScroll(false),
     m_bHScroll(false),
     m_bUpdate(false),
@@ -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"))
@@ -795,7 +797,7 @@ void SAL_CALL SVTXGridControl::selectRow(::sal_Int32 index) throw (::com::sun::s
                 return;
         }
         else if(eSelMode == SINGLE_SELECTION)
-        {	
+        {
             if(!selectedRows.empty())
             {
                 if(!isSelectedIndex(index))
@@ -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;
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 96a5e0a..c9df6a9 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -43,6 +43,7 @@
 
 #include <rtl/ref.hxx>
 #include <vcl/graph.hxx>
+#include <vcl/svapp.hxx>
 #include <svtools/svtreebx.hxx>
 
 #include <map>
@@ -487,7 +488,7 @@ UnoTreeListBoxImpl& TreeControlPeer::getTreeListBoxOrThrow() const throw (Runtim
 
 void TreeControlPeer::ChangeNodesSelection( const Any& rSelection, bool bSelect, bool bSetSelection ) throw( RuntimeException, IllegalArgumentException )
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
 
@@ -549,7 +550,7 @@ void TreeControlPeer::ChangeNodesSelection( const Any& rSelection, bool bSelect,
 
 sal_Bool SAL_CALL TreeControlPeer::select( const Any& rSelection ) throw (IllegalArgumentException, RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     ChangeNodesSelection( rSelection, true, true );
     return sal_True;
 }
@@ -558,7 +559,7 @@ sal_Bool SAL_CALL TreeControlPeer::select( const Any& rSelection ) throw (Illega
 
 Any SAL_CALL TreeControlPeer::getSelection() throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
 
@@ -625,7 +626,7 @@ void SAL_CALL TreeControlPeer::removeSelection( const Any& rSelection ) throw (I
 
 void SAL_CALL TreeControlPeer::clearSelection() throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     getTreeListBoxOrThrow().SelectAll( FALSE );
 }
 
@@ -633,7 +634,7 @@ void SAL_CALL TreeControlPeer::clearSelection() throw (RuntimeException)
 
 sal_Int32 SAL_CALL TreeControlPeer::getSelectionCount() throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     return getTreeListBoxOrThrow().GetSelectionCount();
 }
 
@@ -679,7 +680,7 @@ Any SAL_CALL TreeSelectionEnumeration::nextElement() throw (NoSuchElementExcepti
 
 Reference< XEnumeration > SAL_CALL TreeControlPeer::createSelectionEnumeration() throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     
@@ -703,7 +704,7 @@ Reference< XEnumeration > SAL_CALL TreeControlPeer::createSelectionEnumeration()
 
 Reference< XEnumeration > SAL_CALL TreeControlPeer::createReverseSelectionEnumeration() throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     
@@ -729,7 +730,7 @@ Reference< XEnumeration > SAL_CALL TreeControlPeer::createReverseSelectionEnumer
 
 OUString SAL_CALL TreeControlPeer::getDefaultExpandedGraphicURL() throw (::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     return msDefaultExpandedGraphicURL;
 }
 
@@ -737,7 +738,7 @@ OUString SAL_CALL TreeControlPeer::getDefaultExpandedGraphicURL() throw (::com::
 
 void SAL_CALL TreeControlPeer::setDefaultExpandedGraphicURL( const ::rtl::OUString& sDefaultExpandedGraphicURL ) throw (::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     if( msDefaultExpandedGraphicURL != sDefaultExpandedGraphicURL )
     {
         if( sDefaultExpandedGraphicURL.getLength() )
@@ -767,7 +768,7 @@ void SAL_CALL TreeControlPeer::setDefaultExpandedGraphicURL( const ::rtl::OUStri
 
 OUString SAL_CALL TreeControlPeer::getDefaultCollapsedGraphicURL() throw (::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     return msDefaultCollapsedGraphicURL;
 }
 
@@ -775,7 +776,7 @@ OUString SAL_CALL TreeControlPeer::getDefaultCollapsedGraphicURL() throw (::com:
 
 void SAL_CALL TreeControlPeer::setDefaultCollapsedGraphicURL( const ::rtl::OUString& sDefaultCollapsedGraphicURL ) throw (::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     if( msDefaultCollapsedGraphicURL != sDefaultCollapsedGraphicURL )
     {
         if( sDefaultCollapsedGraphicURL.getLength() )
@@ -805,7 +806,7 @@ void SAL_CALL TreeControlPeer::setDefaultCollapsedGraphicURL( const ::rtl::OUStr
 
 sal_Bool SAL_CALL TreeControlPeer::isNodeExpanded( const Reference< XTreeNode >& xNode ) throw (RuntimeException, IllegalArgumentException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     UnoTreeListEntry* pEntry = getEntry( xNode );
@@ -816,7 +817,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeExpanded( const Reference< XTreeNode >&
 
 sal_Bool SAL_CALL TreeControlPeer::isNodeCollapsed( const Reference< XTreeNode >& xNode ) throw (RuntimeException, IllegalArgumentException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     return !isNodeExpanded( xNode );
 }
 
@@ -824,7 +825,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeCollapsed( const Reference< XTreeNode >
 
 void SAL_CALL TreeControlPeer::makeNodeVisible( const Reference< XTreeNode >& xNode ) throw (RuntimeException, ExpandVetoException, IllegalArgumentException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     UnoTreeListEntry* pEntry = getEntry( xNode );
@@ -836,7 +837,7 @@ void SAL_CALL TreeControlPeer::makeNodeVisible( const Reference< XTreeNode >& xN
 
 sal_Bool SAL_CALL TreeControlPeer::isNodeVisible( const Reference< XTreeNode >& xNode ) throw (RuntimeException, IllegalArgumentException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     UnoTreeListEntry* pEntry = getEntry( xNode );
@@ -847,7 +848,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeVisible( const Reference< XTreeNode >&
 
 void SAL_CALL TreeControlPeer::expandNode( const Reference< XTreeNode >& xNode ) throw (RuntimeException, ExpandVetoException, IllegalArgumentException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     UnoTreeListEntry* pEntry = getEntry( xNode );
@@ -859,7 +860,7 @@ void SAL_CALL TreeControlPeer::expandNode( const Reference< XTreeNode >& xNode )
 
 void SAL_CALL TreeControlPeer::collapseNode( const Reference< XTreeNode >& xNode ) throw (RuntimeException, ExpandVetoException, IllegalArgumentException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     UnoTreeListEntry* pEntry = getEntry( xNode );
@@ -885,7 +886,7 @@ void SAL_CALL TreeControlPeer::removeTreeExpansionListener( const Reference< XTr
 
 Reference< XTreeNode > SAL_CALL TreeControlPeer::getNodeForLocation( sal_Int32 x, sal_Int32 y ) throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
 
@@ -903,7 +904,7 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getNodeForLocation( sal_Int32 x
 
 Reference< XTreeNode > SAL_CALL TreeControlPeer::getClosestNodeForLocation( sal_Int32 x, sal_Int32 y ) throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
 
@@ -921,7 +922,7 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getClosestNodeForLocation( sal_
 
 awt::Rectangle SAL_CALL TreeControlPeer::getNodeRect( const Reference< XTreeNode >& i_Node ) throw (IllegalArgumentException, RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     UnoTreeListEntry* pEntry = getEntry( i_Node, true );
@@ -934,7 +935,7 @@ awt::Rectangle SAL_CALL TreeControlPeer::getNodeRect( const Reference< XTreeNode
 
 sal_Bool SAL_CALL TreeControlPeer::isEditing(  ) throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     return rTree.IsEditingActive() ? sal_True : sal_False;
@@ -944,7 +945,7 @@ sal_Bool SAL_CALL TreeControlPeer::isEditing(  ) throw (RuntimeException)
 
 sal_Bool SAL_CALL TreeControlPeer::stopEditing() throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     if( rTree.IsEditingActive() )
@@ -962,7 +963,7 @@ sal_Bool SAL_CALL TreeControlPeer::stopEditing() throw (RuntimeException)
 
 void SAL_CALL TreeControlPeer::cancelEditing(  ) throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     rTree.EndEditing(FALSE);
@@ -972,7 +973,7 @@ void SAL_CALL TreeControlPeer::cancelEditing(  ) throw (RuntimeException)
 
 void SAL_CALL TreeControlPeer::startEditingAtNode( const Reference< XTreeNode >& xNode ) throw (IllegalArgumentException, RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     UnoTreeListEntry* pEntry = getEntry( xNode );
@@ -1042,7 +1043,7 @@ bool TreeControlPeer::onEditedEntry( UnoTreeListEntry* pEntry, const XubString&
 
 void SAL_CALL TreeControlPeer::treeNodesChanged( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent ) throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mnEditLock != 0 )
         return;
@@ -1052,7 +1053,7 @@ void SAL_CALL TreeControlPeer::treeNodesChanged( const ::com::sun::star::awt::tr
 
 void SAL_CALL TreeControlPeer::treeNodesInserted( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent ) throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mnEditLock != 0 )
         return;
@@ -1062,7 +1063,7 @@ void SAL_CALL TreeControlPeer::treeNodesInserted( const ::com::sun::star::awt::t
 
 void SAL_CALL TreeControlPeer::treeNodesRemoved( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent ) throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mnEditLock != 0 )
         return;
@@ -1072,7 +1073,7 @@ void SAL_CALL TreeControlPeer::treeNodesRemoved( const ::com::sun::star::awt::tr
 
 void SAL_CALL TreeControlPeer::treeStructureChanged( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent ) throw (RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mnEditLock != 0 )
         return;
@@ -1242,7 +1243,7 @@ OUString TreeControlPeer::getEntryString( const Any& rValue )
 void SAL_CALL TreeControlPeer::disposing( const ::com::sun::star::lang::EventObject& ) throw(::com::sun::star::uno::RuntimeException)
 {
     // model is disposed, so we clear our tree
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
     rTree.Clear();
     mxDataModel.clear();
@@ -1282,7 +1283,7 @@ void TreeControlPeer::onChangeDataModel( UnoTreeListBoxImpl& rTree, const Refere
 
 ::com::sun::star::awt::Size TreeControlPeer::getMinimumSize() throw(RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Size aSz;
 /* todo
@@ -1300,7 +1301,7 @@ void TreeControlPeer::onChangeDataModel( UnoTreeListBoxImpl& rTree, const Refere
 
 ::com::sun::star::awt::Size TreeControlPeer::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Size aSz = rNewSize;
 /* todo
@@ -1317,7 +1318,7 @@ void TreeControlPeer::onChangeDataModel( UnoTreeListBoxImpl& rTree, const Refere
 
 void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& aValue) throw(RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
 
@@ -1420,7 +1421,7 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An
 
 Any TreeControlPeer::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     const sal_uInt16 nPropId = GetPropertyId( PropertyName );
     if( (nPropId >= BASEPROPERTY_TREE_START) && (nPropId <= BASEPROPERTY_TREE_END) )
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 74a3912..932a94e 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -226,7 +226,7 @@ void VCLXMultiLineEdit::removeTextListener( const ::com::sun::star::uno::Referen
 
 void VCLXMultiLineEdit::setText( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     MultiLineEdit* pEdit = (MultiLineEdit*)GetWindow();
     if ( pEdit )
@@ -243,7 +243,7 @@ void VCLXMultiLineEdit::setText( const ::rtl::OUString& aText ) throw(::com::sun
 
 void VCLXMultiLineEdit::insertText( const ::com::sun::star::awt::Selection& rSel, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     MultiLineEdit* pEdit = (MultiLineEdit*)GetWindow();
     if ( pEdit )
@@ -255,7 +255,7 @@ void VCLXMultiLineEdit::insertText( const ::com::sun::star::awt::Selection& rSel
 
 ::rtl::OUString VCLXMultiLineEdit::getText() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::rtl::OUString aText;
     MultiLineEdit* pEdit = (MultiLineEdit*)GetWindow();
@@ -266,7 +266,7 @@ void VCLXMultiLineEdit::insertText( const ::com::sun::star::awt::Selection& rSel
 
 ::rtl::OUString VCLXMultiLineEdit::getSelectedText() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::rtl::OUString aText;
     MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow();
@@ -278,7 +278,7 @@ void VCLXMultiLineEdit::insertText( const ::com::sun::star::awt::Selection& rSel
 
 void VCLXMultiLineEdit::setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow();
     if ( pMultiLineEdit )
@@ -289,7 +289,7 @@ void VCLXMultiLineEdit::setSelection( const ::com::sun::star::awt::Selection& aS
 
 ::com::sun::star::awt::Selection VCLXMultiLineEdit::getSelection() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Selection aSel;
     MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow();
@@ -303,7 +303,7 @@ void VCLXMultiLineEdit::setSelection( const ::com::sun::star::awt::Selection& aS
 
 sal_Bool VCLXMultiLineEdit::isEditable() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow();
     return ( pMultiLineEdit && !pMultiLineEdit->IsReadOnly() && pMultiLineEdit->IsEnabled() ) ? sal_True : sal_False;
@@ -311,7 +311,7 @@ sal_Bool VCLXMultiLineEdit::isEditable() throw(::com::sun::star::uno::RuntimeExc
 
 void VCLXMultiLineEdit::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow();
     if ( pMultiLineEdit )
@@ -320,7 +320,7 @@ void VCLXMultiLineEdit::setEditable( sal_Bool bEditable ) throw(::com::sun::star
 
 void VCLXMultiLineEdit::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow();
     if ( pMultiLineEdit )
@@ -329,7 +329,7 @@ void VCLXMultiLineEdit::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::
 
 sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow();
     return pMultiLineEdit ? (sal_Int16)pMultiLineEdit->GetMaxTextLen() : (sal_Int16)0;
@@ -337,7 +337,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim
 
 ::rtl::OUString VCLXMultiLineEdit::getTextLines() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::rtl::OUString aText;
     MultiLineEdit* pEdit = (MultiLineEdit*)GetWindow();
@@ -348,7 +348,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim
 
 ::com::sun::star::awt::Size VCLXMultiLineEdit::getMinimumSize() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Size aSz;
     MultiLineEdit* pEdit = (MultiLineEdit*) GetWindow();
@@ -364,7 +364,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim
 
 ::com::sun::star::awt::Size VCLXMultiLineEdit::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Size aSz = rNewSize;
     MultiLineEdit* pEdit = (MultiLineEdit*) GetWindow();
@@ -375,7 +375,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim
 
 ::com::sun::star::awt::Size VCLXMultiLineEdit::getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Size aSz;
     MultiLineEdit* pEdit = (MultiLineEdit*) GetWindow();
@@ -386,7 +386,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim
 
 void VCLXMultiLineEdit::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     nCols = nLines = 0;
     MultiLineEdit* pEdit = (MultiLineEdit*) GetWindow();
@@ -423,7 +423,7 @@ void VCLXMultiLineEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEven
 
 void VCLXMultiLineEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     MultiLineEdit* pMultiLineEdit = (MultiLineEdit*)GetWindow();
     if ( pMultiLineEdit )
@@ -479,7 +479,7 @@ void VCLXMultiLineEdit::setProperty( const ::rtl::OUString& PropertyName, const
 
 ::com::sun::star::uno::Any VCLXMultiLineEdit::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::uno::Any aProp;
     MultiLineEdit* pMultiLineEdit = (MultiLineEdit*)GetWindow();
@@ -523,7 +523,7 @@ void VCLXMultiLineEdit::setProperty( const ::rtl::OUString& PropertyName, const
 
 void SAL_CALL VCLXMultiLineEdit::setFocus(  ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     // don't grab the focus if we already have it. Reason is that the only thing which the edit
     // does is forwarding the focus to it's text window. This text window then does a "select all".
@@ -578,7 +578,7 @@ IMPL_XTYPEPROVIDER_END
 
 void SAL_CALL VCLXFileControl::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FileControl* pControl = (FileControl*)GetWindow();
     if ( pControl )
@@ -628,7 +628,7 @@ void VCLXFileControl::removeTextListener( const ::com::sun::star::uno::Reference
 
 void VCLXFileControl::setText( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     Window* pWindow = GetWindow();
     if ( pWindow )
@@ -643,7 +643,7 @@ void VCLXFileControl::setText( const ::rtl::OUString& aText ) throw(::com::sun::
 
 void VCLXFileControl::insertText( const ::com::sun::star::awt::Selection& rSel, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FileControl* pFileControl = (FileControl*) GetWindow();
     if ( pFileControl )
@@ -655,7 +655,7 @@ void VCLXFileControl::insertText( const ::com::sun::star::awt::Selection& rSel,
 
 ::rtl::OUString VCLXFileControl::getText() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::rtl::OUString aText;
     Window* pWindow = GetWindow();
@@ -666,7 +666,7 @@ void VCLXFileControl::insertText( const ::com::sun::star::awt::Selection& rSel,
 
 ::rtl::OUString VCLXFileControl::getSelectedText() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::rtl::OUString aText;
     FileControl* pFileControl = (FileControl*) GetWindow();
@@ -678,7 +678,7 @@ void VCLXFileControl::insertText( const ::com::sun::star::awt::Selection& rSel,
 
 void VCLXFileControl::setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FileControl* pFileControl = (FileControl*) GetWindow();
     if ( pFileControl )
@@ -687,7 +687,7 @@ void VCLXFileControl::setSelection( const ::com::sun::star::awt::Selection& aSel
 
 ::com::sun::star::awt::Selection VCLXFileControl::getSelection() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Selection aSel;
     FileControl* pFileControl = (FileControl*) GetWindow();
@@ -701,7 +701,7 @@ void VCLXFileControl::setSelection( const ::com::sun::star::awt::Selection& aSel
 
 sal_Bool VCLXFileControl::isEditable() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FileControl* pFileControl = (FileControl*) GetWindow();
     return ( pFileControl && !pFileControl->GetEdit().IsReadOnly() && pFileControl->GetEdit().IsEnabled() ) ? sal_True : sal_False;
@@ -709,7 +709,7 @@ sal_Bool VCLXFileControl::isEditable() throw(::com::sun::star::uno::RuntimeExcep
 
 void VCLXFileControl::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FileControl* pFileControl = (FileControl*) GetWindow();
     if ( pFileControl )
@@ -718,7 +718,7 @@ void VCLXFileControl::setEditable( sal_Bool bEditable ) throw(::com::sun::star::
 
 void VCLXFileControl::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FileControl* pFileControl = (FileControl*) GetWindow();
     if ( pFileControl )
@@ -727,7 +727,7 @@ void VCLXFileControl::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::un
 
 sal_Int16 VCLXFileControl::getMaxTextLen() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FileControl* pFileControl = (FileControl*) GetWindow();
     return pFileControl ? pFileControl->GetEdit().GetMaxTextLen() : 0;
@@ -745,7 +745,7 @@ IMPL_LINK( VCLXFileControl, ModifyHdl, Edit*, EMPTYARG )
 
 ::com::sun::star::awt::Size VCLXFileControl::getMinimumSize() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Size aSz;
     FileControl* pControl = (FileControl*) GetWindow();
@@ -767,7 +767,7 @@ IMPL_LINK( VCLXFileControl, ModifyHdl, Edit*, EMPTYARG )
 
 ::com::sun::star::awt::Size VCLXFileControl::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Size aSz =rNewSize;
     FileControl* pControl = (FileControl*) GetWindow();
@@ -782,7 +782,7 @@ IMPL_LINK( VCLXFileControl, ModifyHdl, Edit*, EMPTYARG )
 
 ::com::sun::star::awt::Size VCLXFileControl::getMinimumSize( sal_Int16 nCols, sal_Int16 ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::Size aSz;
     FileControl* pControl = (FileControl*) GetWindow();
@@ -796,7 +796,7 @@ IMPL_LINK( VCLXFileControl, ModifyHdl, Edit*, EMPTYARG )
 
 void VCLXFileControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     nCols = 0;
     nLines = 1;
@@ -847,7 +847,7 @@ void SVTXFormattedField::SetWindow( Window* _pWindow )
 // --------------------------------------------------------------------------------------
 void SVTXFormattedField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -972,7 +972,7 @@ void SVTXFormattedField::setProperty( const ::rtl::OUString& PropertyName, const
 // --------------------------------------------------------------------------------------
 ::com::sun::star::uno::Any SVTXFormattedField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::uno::Any aReturn;
 
@@ -1433,7 +1433,7 @@ void SVTXRoadmap::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
     {
         case VCLEVENT_ROADMAP_ITEMSELECTED:
         {
-            ::osl::SolarGuard aGuard( GetMutex() );
+            SolarMutexGuard aGuard;
             ::svt::ORoadmap* pField = GetRoadmap();
             if ( pField )
             {
@@ -1455,7 +1455,7 @@ void SVTXRoadmap::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
 
 void SVTXRoadmap::propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     ::svt::ORoadmap* pField = GetRoadmap();
     if ( pField )
     {
@@ -1524,7 +1524,7 @@ RMItemData SVTXRoadmap::GetRMItemData( const ::com::sun::star::container::Contai
 
 void SVTXRoadmap::elementInserted( const ::com::sun::star::container::ContainerEvent& _rEvent )throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     ::svt::ORoadmap* pField = GetRoadmap();
     if ( pField )
     {
@@ -1537,7 +1537,7 @@ void SVTXRoadmap::elementInserted( const ::com::sun::star::container::ContainerE
 
 void SVTXRoadmap::elementRemoved( const ::com::sun::star::container::ContainerEvent& _rEvent )throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     ::svt::ORoadmap* pField = GetRoadmap();
     if ( pField )
     {
@@ -1551,7 +1551,7 @@ void SVTXRoadmap::elementRemoved( const ::com::sun::star::container::ContainerEv
 
 void SVTXRoadmap::elementReplaced( const ::com::sun::star::container::ContainerEvent& _rEvent )throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
     ::svt::ORoadmap* pField = GetRoadmap();
     if ( pField )
     {
@@ -1567,7 +1567,7 @@ void SVTXRoadmap::elementReplaced( const ::com::sun::star::container::ContainerE
 // --------------------------------------------------------------------------------------
 void SVTXRoadmap::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::svt::ORoadmap* pField = GetRoadmap();
     if ( pField )
@@ -1622,7 +1622,7 @@ void SVTXRoadmap::setProperty( const ::rtl::OUString& PropertyName, const ::com:
 // --------------------------------------------------------------------------------------
 ::com::sun::star::uno::Any SVTXRoadmap::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::uno::Any aReturn;
 
@@ -1696,7 +1696,7 @@ IMPL_XTYPEPROVIDER_END
 
 void SVTXNumericField::setValue( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1705,7 +1705,7 @@ void SVTXNumericField::setValue( double Value ) throw(::com::sun::star::uno::Run
 
 double SVTXNumericField::getValue() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetValue() : 0;
@@ -1713,7 +1713,7 @@ double SVTXNumericField::getValue() throw(::com::sun::star::uno::RuntimeExceptio
 
 void SVTXNumericField::setMin( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1722,7 +1722,7 @@ void SVTXNumericField::setMin( double Value ) throw(::com::sun::star::uno::Runti
 
 double SVTXNumericField::getMin() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetMinValue() : 0;
@@ -1730,7 +1730,7 @@ double SVTXNumericField::getMin() throw(::com::sun::star::uno::RuntimeException)
 
 void SVTXNumericField::setMax( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1739,7 +1739,7 @@ void SVTXNumericField::setMax( double Value ) throw(::com::sun::star::uno::Runti
 
 double SVTXNumericField::getMax() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetMaxValue() : 0;
@@ -1747,7 +1747,7 @@ double SVTXNumericField::getMax() throw(::com::sun::star::uno::RuntimeException)
 
 void SVTXNumericField::setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1756,7 +1756,7 @@ void SVTXNumericField::setFirst( double Value ) throw(::com::sun::star::uno::Run
 
 double SVTXNumericField::getFirst() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetSpinFirst() : 0;
@@ -1764,7 +1764,7 @@ double SVTXNumericField::getFirst() throw(::com::sun::star::uno::RuntimeExceptio
 
 void SVTXNumericField::setLast( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1773,7 +1773,7 @@ void SVTXNumericField::setLast( double Value ) throw(::com::sun::star::uno::Runt
 
 double SVTXNumericField::getLast() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetSpinLast() : 0;
@@ -1781,7 +1781,7 @@ double SVTXNumericField::getLast() throw(::com::sun::star::uno::RuntimeException
 
 void SVTXNumericField::setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1790,7 +1790,7 @@ void SVTXNumericField::setSpinSize( double Value ) throw(::com::sun::star::uno::
 
 double SVTXNumericField::getSpinSize() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetSpinSize() : 0;
@@ -1798,7 +1798,7 @@ double SVTXNumericField::getSpinSize() throw(::com::sun::star::uno::RuntimeExcep
 
 void SVTXNumericField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1807,7 +1807,7 @@ void SVTXNumericField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::sta
 
 sal_Int16 SVTXNumericField::getDecimalDigits() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetDecimalDigits() : 0;
@@ -1815,7 +1815,7 @@ sal_Int16 SVTXNumericField::getDecimalDigits() throw(::com::sun::star::uno::Runt
 
 void SVTXNumericField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1824,7 +1824,7 @@ void SVTXNumericField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::sta
 
 sal_Bool SVTXNumericField::isStrictFormat() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->IsStrictFormat() : sal_False;
@@ -1862,7 +1862,7 @@ IMPL_XTYPEPROVIDER_END
 
 void SVTXCurrencyField::setValue( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1871,7 +1871,7 @@ void SVTXCurrencyField::setValue( double Value ) throw(::com::sun::star::uno::Ru
 
 double SVTXCurrencyField::getValue() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetValue() : 0;
@@ -1879,7 +1879,7 @@ double SVTXCurrencyField::getValue() throw(::com::sun::star::uno::RuntimeExcepti
 
 void SVTXCurrencyField::setMin( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1888,7 +1888,7 @@ void SVTXCurrencyField::setMin( double Value ) throw(::com::sun::star::uno::Runt
 
 double SVTXCurrencyField::getMin() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetMinValue() : 0;
@@ -1896,7 +1896,7 @@ double SVTXCurrencyField::getMin() throw(::com::sun::star::uno::RuntimeException
 
 void SVTXCurrencyField::setMax( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1905,7 +1905,7 @@ void SVTXCurrencyField::setMax( double Value ) throw(::com::sun::star::uno::Runt
 
 double SVTXCurrencyField::getMax() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetMaxValue() : 0;
@@ -1913,7 +1913,7 @@ double SVTXCurrencyField::getMax() throw(::com::sun::star::uno::RuntimeException
 
 void SVTXCurrencyField::setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1922,7 +1922,7 @@ void SVTXCurrencyField::setFirst( double Value ) throw(::com::sun::star::uno::Ru
 
 double SVTXCurrencyField::getFirst() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetSpinFirst() : 0;
@@ -1930,7 +1930,7 @@ double SVTXCurrencyField::getFirst() throw(::com::sun::star::uno::RuntimeExcepti
 
 void SVTXCurrencyField::setLast( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1939,7 +1939,7 @@ void SVTXCurrencyField::setLast( double Value ) throw(::com::sun::star::uno::Run
 
 double SVTXCurrencyField::getLast() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetSpinLast() : 0;
@@ -1947,7 +1947,7 @@ double SVTXCurrencyField::getLast() throw(::com::sun::star::uno::RuntimeExceptio
 
 void SVTXCurrencyField::setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1956,7 +1956,7 @@ void SVTXCurrencyField::setSpinSize( double Value ) throw(::com::sun::star::uno:
 
 double SVTXCurrencyField::getSpinSize() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetSpinSize() : 0;
@@ -1964,7 +1964,7 @@ double SVTXCurrencyField::getSpinSize() throw(::com::sun::star::uno::RuntimeExce
 
 void SVTXCurrencyField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1973,7 +1973,7 @@ void SVTXCurrencyField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::st
 
 sal_Int16 SVTXCurrencyField::getDecimalDigits() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->GetDecimalDigits() : 0;
@@ -1981,7 +1981,7 @@ sal_Int16 SVTXCurrencyField::getDecimalDigits() throw(::com::sun::star::uno::Run
 
 void SVTXCurrencyField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     if ( pField )
@@ -1990,7 +1990,7 @@ void SVTXCurrencyField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::st
 
 sal_Bool SVTXCurrencyField::isStrictFormat() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     FormattedField* pField = GetFormattedField();
     return pField ? pField->IsStrictFormat() : sal_False;
@@ -1998,7 +1998,7 @@ sal_Bool SVTXCurrencyField::isStrictFormat() throw(::com::sun::star::uno::Runtim
 
 void SVTXCurrencyField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::uno::Any aReturn;
 
@@ -2038,7 +2038,7 @@ void SVTXCurrencyField::setProperty( const ::rtl::OUString& PropertyName, const
 
 ::com::sun::star::uno::Any SVTXCurrencyField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::uno::Any aReturn;
 
@@ -2159,7 +2159,7 @@ IMPL_XTYPEPROVIDER_END
 // ::com::sun::star::awt::XProgressBar
 void VCLXProgressBar::setForegroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     Window* pWindow = GetWindow();
     if ( pWindow )
@@ -2171,7 +2171,7 @@ void VCLXProgressBar::setForegroundColor( sal_Int32 nColor ) throw(::com::sun::s
 
 void VCLXProgressBar::setBackgroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     Window* pWindow = GetWindow();
     if ( pWindow )
@@ -2185,7 +2185,7 @@ void VCLXProgressBar::setBackgroundColor( sal_Int32 nColor ) throw(::com::sun::s
 
 void VCLXProgressBar::setValue( sal_Int32 nValue ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     m_nValue = nValue;
     ImplUpdateValue();
@@ -2193,7 +2193,7 @@ void VCLXProgressBar::setValue( sal_Int32 nValue ) throw(::com::sun::star::uno::
 
 void VCLXProgressBar::setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(::com::sun::star::uno::RuntimeException )
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if ( nMin < nMax )
     {
@@ -2213,7 +2213,7 @@ void VCLXProgressBar::setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(::com::su
 
 sal_Int32 VCLXProgressBar::getValue() throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     return m_nValue;
 }
@@ -2221,7 +2221,7 @@ sal_Int32 VCLXProgressBar::getValue() throw(::com::sun::star::uno::RuntimeExcept
 // ::com::sun::star::awt::VclWindowPeer
 void VCLXProgressBar::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ProgressBar* pProgressBar = (ProgressBar*)GetWindow();
     if ( pProgressBar )
@@ -2279,7 +2279,7 @@ void VCLXProgressBar::setProperty( const ::rtl::OUString& PropertyName, const ::
 
 ::com::sun::star::uno::Any VCLXProgressBar::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException)
 {
-    ::osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::uno::Any aProp;
     ProgressBar* pProgressBar = (ProgressBar*)GetWindow();
diff --git a/toolkit/inc/toolkit/awt/vclxdevice.hxx b/toolkit/inc/toolkit/awt/vclxdevice.hxx
index d47c883..aca44ed 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 2572484..ffbe999 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 2792b40..076ea92 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 42f104c..1dbbde0 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,
diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx
index 077ddbc..9e74947 100644
--- a/toolkit/source/awt/stylesettings.cxx
+++ b/toolkit/source/awt/stylesettings.cxx
@@ -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 )
diff --git a/toolkit/source/awt/stylesettings.hxx b/toolkit/source/awt/stylesettings.hxx
index f9a1dff..b79969f 100644
--- a/toolkit/source/awt/stylesettings.hxx
+++ b/toolkit/source/awt/stylesettings.hxx
@@ -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();
diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx
index a21234e..935ae1b 100644
--- a/toolkit/source/awt/vclxcontainer.cxx
+++ b/toolkit/source/awt/vclxcontainer.cxx
@@ -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: */
diff --git a/toolkit/source/awt/vclxdevice.cxx b/toolkit/source/awt/vclxdevice.cxx
index 4faed3b..661d237 100644
--- a/toolkit/source/awt/vclxdevice.cxx
+++ b/toolkit/source/awt/vclxdevice.cxx
@@ -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)
     {
diff --git a/toolkit/source/awt/vclxdialog.cxx b/toolkit/source/awt/vclxdialog.cxx
index 89d7a6a..2e70e3b 100644
--- a/toolkit/source/awt/vclxdialog.cxx
+++ b/toolkit/source/awt/vclxdialog.cxx
@@ -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 )
     {
diff --git a/toolkit/source/awt/vclxdialog.hxx b/toolkit/source/awt/vclxdialog.hxx
index a01abdf..8a01c57 100644
--- a/toolkit/source/awt/vclxdialog.hxx
+++ b/toolkit/source/awt/vclxdialog.hxx
@@ -54,7 +54,6 @@ private:
     VCLXDialog& operator=( const VCLXDialog& ); // never implemented
 
 protected:
-    osl::SolarMutex& GetMutexImpl();
     Window* GetWindowImpl();
     ::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl();
 
diff --git a/toolkit/source/awt/vclxfixedline.cxx b/toolkit/source/awt/vclxfixedline.cxx
index ad0f044..495ccb8 100644
--- a/toolkit/source/awt/vclxfixedline.cxx
+++ b/toolkit/source/awt/vclxfixedline.cxx
@@ -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() )
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 4f7e3a0..dc3dc87 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -65,7 +65,7 @@ IMPL_XTYPEPROVIDER_START( VCLXGraphics )
     getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics>* ) NULL )
 IMPL_XTYPEPROVIDER_END
 
-VCLXGraphics::VCLXGraphics() : mrMutex( Application::GetSolarMutex() )
+VCLXGraphics::VCLXGraphics()
 {
     mpOutputDevice = NULL;
     mpClipRegion = NULL;
@@ -142,7 +142,7 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags )
 
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXGraphics::getDevice() throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( !mxDevice.is() && mpOutputDevice )
     {
@@ -155,7 +155,7 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags )
 
 ::com::sun::star::awt::SimpleFontMetric VCLXGraphics::getFontMetric() throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     ::com::sun::star::awt::SimpleFontMetric aM;
     if( mpOutputDevice )
@@ -168,56 +168,56 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags )
 
 void VCLXGraphics::setFont( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& rxFont ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     maFont = VCLUnoHelper::CreateFont( rxFont );
 }
 
 void VCLXGraphics::selectFont( const ::com::sun::star::awt::FontDescriptor& rDescription ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     maFont = VCLUnoHelper::CreateFont( rDescription, Font() );
 }
 
 void VCLXGraphics::setTextColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     maTextColor = Color( (sal_uInt32)nColor );
 }
 
 void VCLXGraphics::setTextFillColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     maTextFillColor = Color( (sal_uInt32)nColor );
 }
 
 void VCLXGraphics::setLineColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     maLineColor = Color( (sal_uInt32)nColor );
 }
 
 void VCLXGraphics::setFillColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     maFillColor = Color( (sal_uInt32)nColor );
 }
 
 void VCLXGraphics::setRasterOp( ::com::sun::star::awt::RasterOperation eROP ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     meRasterOp = (RasterOp)eROP;
 }
 
 void VCLXGraphics::setClipRegion( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XRegion >& rxRegion ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     delete mpClipRegion;
     if ( rxRegion.is() )
@@ -228,7 +228,7 @@ void VCLXGraphics::setClipRegion( const ::com::sun::star::uno::Reference< ::com:
 
 void VCLXGraphics::intersectClipRegion( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XRegion >& rxRegion ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if ( rxRegion.is() )
     {
@@ -242,7 +242,7 @@ void VCLXGraphics::intersectClipRegion( const ::com::sun::star::uno::Reference<
 
 void VCLXGraphics::push(  ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
 
     if( mpOutputDevice )
@@ -251,7 +251,7 @@ void VCLXGraphics::push(  ) throw(::com::sun::star::uno::RuntimeException)
 
 void VCLXGraphics::pop(  ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
 
     if( mpOutputDevice )
@@ -260,7 +260,7 @@ void VCLXGraphics::pop(  ) throw(::com::sun::star::uno::RuntimeException)
 
 void VCLXGraphics::copy( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >& rxSource, sal_Int32 nSourceX, sal_Int32 nSourceY, sal_Int32 nSourceWidth, sal_Int32 nSourceHeight, sal_Int32 nDestX, sal_Int32 nDestY, sal_Int32 nDestWidth, sal_Int32 nDestHeight ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if ( mpOutputDevice )
     {
@@ -277,7 +277,7 @@ void VCLXGraphics::copy( const ::com::sun::star::uno::Reference< ::com::sun::sta
 
 void VCLXGraphics::draw( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayBitmap >& rxBitmapHandle, sal_Int32 nSourceX, sal_Int32 nSourceY, sal_Int32 nSourceWidth, sal_Int32 nSourceHeight, sal_Int32 nDestX, sal_Int32 nDestY, sal_Int32 nDestWidth, sal_Int32 nDestHeight ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -309,7 +309,7 @@ void VCLXGraphics::draw( const ::com::sun::star::uno::Reference< ::com::sun::sta
 
 void VCLXGraphics::drawPixel( sal_Int32 x, sal_Int32 y ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -320,7 +320,7 @@ void VCLXGraphics::drawPixel( sal_Int32 x, sal_Int32 y ) throw(::com::sun::star:
 
 void VCLXGraphics::drawLine( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -331,7 +331,7 @@ void VCLXGraphics::drawLine( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32
 
 void VCLXGraphics::drawRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -342,7 +342,7 @@ void VCLXGraphics::drawRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int3
 
 void VCLXGraphics::drawRoundedRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 nHorzRound, sal_Int32 nVertRound ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -353,7 +353,7 @@ void VCLXGraphics::drawRoundedRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, s
 
 void VCLXGraphics::drawPolyLine( const ::com::sun::star::uno::Sequence< sal_Int32 >& DataX, const ::com::sun::star::uno::Sequence< sal_Int32 >& DataY ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -364,7 +364,7 @@ void VCLXGraphics::drawPolyLine( const ::com::sun::star::uno::Sequence< sal_Int3
 
 void VCLXGraphics::drawPolygon( const ::com::sun::star::uno::Sequence< sal_Int32 >& DataX, const ::com::sun::star::uno::Sequence< sal_Int32 >& DataY ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -375,7 +375,7 @@ void VCLXGraphics::drawPolygon( const ::com::sun::star::uno::Sequence< sal_Int32
 
 void VCLXGraphics::drawPolyPolygon( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int32 > >& DataX, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int32 > >& DataY ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -391,7 +391,7 @@ void VCLXGraphics::drawPolyPolygon( const ::com::sun::star::uno::Sequence< ::com
 
 void VCLXGraphics::drawEllipse( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -402,7 +402,7 @@ void VCLXGraphics::drawEllipse( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_I
 
 void VCLXGraphics::drawArc( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -413,7 +413,7 @@ void VCLXGraphics::drawArc( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32
 
 void VCLXGraphics::drawPie( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -424,7 +424,7 @@ void VCLXGraphics::drawPie( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32
 
 void VCLXGraphics::drawChord( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -435,7 +435,7 @@ void VCLXGraphics::drawChord( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int
 
 void VCLXGraphics::drawGradient( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 height, const ::com::sun::star::awt::Gradient& rGradient ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -454,7 +454,7 @@ void VCLXGraphics::drawGradient( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_
 
 void VCLXGraphics::drawText( sal_Int32 x, sal_Int32 y, const ::rtl::OUString& rText ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
@@ -465,7 +465,7 @@ void VCLXGraphics::drawText( sal_Int32 x, sal_Int32 y, const ::rtl::OUString& rT
 
 void VCLXGraphics::drawTextArray( sal_Int32 x, sal_Int32 y, const ::rtl::OUString& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rLongs ) throw(::com::sun::star::uno::RuntimeException)
 {
-    osl::SolarGuard aGuard( GetMutex() );
+    SolarMutexGuard aGuard;
 
     if( mpOutputDevice )
     {
diff --git a/toolkit/source/awt/vclxplugin.cxx b/toolkit/source/awt/vclxplugin.cxx
index c48d1de..5910923 100644
--- a/toolkit/source/awt/vclxplugin.cxx
+++ b/toolkit/source/awt/vclxplugin.cxx
@@ -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,12 +56,12 @@ 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);
     }
-    
+
     VCLXWindow::dispose();
 }
 
@@ -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();
diff --git a/toolkit/source/awt/vclxscroller.cxx b/toolkit/source/awt/vclxscroller.cxx
index 1655116..91af599 100644
--- a/toolkit/source/awt/vclxscroller.cxx
+++ b/toolkit/source/awt/vclxscroller.cxx
@@ -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() )
diff --git a/toolkit/source/awt/vclxspinbutton.cxx b/toolkit/source/awt/vclxspinbutton.cxx
index 9c81294..297845c 100644
--- a/toolkit/source/awt/vclxspinbutton.cxx
+++ b/toolkit/source/awt/vclxspinbutton.cxx
@@ -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;
 
diff --git a/toolkit/source/awt/vclxsplitter.cxx b/toolkit/source/awt/vclxsplitter.cxx
index bbd2dac..787f1a1 100644
--- a/toolkit/source/awt/vclxsplitter.cxx
+++ b/toolkit/source/awt/vclxsplitter.cxx
@@ -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);
diff --git a/toolkit/source/awt/vclxsystemdependentwindow.cxx b/toolkit/source/awt/vclxsystemdependentwindow.cxx
index a7155fd..15b8e87 100644
--- a/toolkit/source/awt/vclxsystemdependentwindow.cxx
+++ b/toolkit/source/awt/vclxsystemdependentwindow.cxx
@@ -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;
diff --git a/toolkit/source/awt/vclxtabcontrol.cxx b/toolkit/source/awt/vclxtabcontrol.cxx
index ab5c617..f29b488 100644
--- a/toolkit/source/awt/vclxtabcontrol.cxx
+++ b/toolkit/source/awt/vclxtabcontrol.cxx
@@ -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;
diff --git a/toolkit/source/awt/vclxtabpage.cxx b/toolkit/source/awt/vclxtabpage.cxx
index 7286b7d..42d4d68 100644
--- a/toolkit/source/awt/vclxtabpage.cxx
+++ b/toolkit/source/awt/vclxtabpage.cxx
@@ -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();
 }
diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx
index 746163c..a8d5ff1 100644
--- a/toolkit/source/awt/vclxtopwindow.cxx
+++ b/toolkit/source/awt/vclxtopwindow.cxx
@@ -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 );
 }
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list