summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2010-10-13 01:47:23 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-10-25 19:55:36 -0500
commit18a9a87a805b94ad8f7b8a67d63a8568bfd295e7 (patch)
tree5114eb2cabf9872df50dfb0ca8fd23c7378cd4f0 /vcl
parentb450a32890184a18ed176dbf717e944190cbe643 (diff)
use SolarMutexGuard to guard the SolarMutex
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/components/dtranscomp.cxx6
-rw-r--r--vcl/source/control/edit.cxx10
-rw-r--r--vcl/source/gdi/bmpconv.cxx2
-rw-r--r--vcl/source/helper/canvasbitmap.cxx54
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx2
-rw-r--r--vcl/unx/source/dtrans/X11_selection.cxx2
6 files changed, 38 insertions, 38 deletions
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index 8ba57df9e22a..84609aae7bbf 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -272,7 +272,7 @@ Reference< XInterface > ClipboardFactory::createInstance() throw()
Reference< XInterface > ClipboardFactory::createInstanceWithArguments( const Sequence< Any >& arguments ) throw()
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
Reference< XInterface > xResult = ImplGetSVData()->mpDefInst->CreateClipboard( arguments );
return xResult;
}
@@ -410,7 +410,7 @@ OUString SAL_CALL DragSource_getImplementationName()
Reference< XInterface > SAL_CALL DragSource_createInstance( const Reference< XMultiServiceFactory >& )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
Reference< XInterface > xResult = ImplGetSVData()->mpDefInst->CreateDragSource();
return xResult;
}
@@ -525,7 +525,7 @@ OUString SAL_CALL DropTarget_getImplementationName()
Reference< XInterface > SAL_CALL DropTarget_createInstance( const Reference< XMultiServiceFactory >& )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
Reference< XInterface > xResult = ImplGetSVData()->mpDefInst->CreateDropTarget();
return xResult;
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 7ef7e49f0be0..39d572c5f107 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2939,7 +2939,7 @@ void Edit::DeletePopupMenu( PopupMenu* pMenu )
// ::com::sun::star::datatransfer::dnd::XDragGestureListener
void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& rDGE ) throw (::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aVclGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aVclGuard;
if ( !IsTracking() && maSelection.Len() &&
!(GetStyle() & WB_PASSWORD) && (!mpDDInfo || mpDDInfo->bStarterOfDD == FALSE) ) // Kein Mehrfach D&D
@@ -2977,7 +2977,7 @@ void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::Dra
// ::com::sun::star::datatransfer::dnd::XDragSourceListener
void Edit::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourceDropEvent& rDSDE ) throw (::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aVclGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aVclGuard;
if ( rDSDE.DropSuccess && ( rDSDE.DropAction & datatransfer::dnd::DNDConstants::ACTION_MOVE ) )
{
@@ -3003,7 +3003,7 @@ void Edit::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourceDro
// ::com::sun::star::datatransfer::dnd::XDropTargetListener
void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aVclGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aVclGuard;
BOOL bChanges = FALSE;
if ( !mbReadOnly && mpDDInfo )
@@ -3063,14 +3063,14 @@ void Edit::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragE
void Edit::dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& ) throw (::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aVclGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aVclGuard;
ImplHideDDCursor();
}
void Edit::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException)
{
- vos::OGuard aVclGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aVclGuard;
Point aMousePos( rDTDE.LocationX, rDTDE.LocationY );
diff --git a/vcl/source/gdi/bmpconv.cxx b/vcl/source/gdi/bmpconv.cxx
index 0a51cc18e786..bd683ce62ee8 100644
--- a/vcl/source/gdi/bmpconv.cxx
+++ b/vcl/source/gdi/bmpconv.cxx
@@ -150,7 +150,7 @@ Any SAL_CALL BmpConverter::invoke(
Sequence< sal_Int8 > aDIB = xBM->getDIB();
// call into vcl not thread safe
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
SvMemoryStream aStream( aDIB.getArray(), aDIB.getLength(), STREAM_READ | STREAM_WRITE );
Bitmap aBM;
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index fb094f8565ab..3589bf6e9165 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -446,20 +446,20 @@ VclCanvasBitmap::~VclCanvasBitmap()
// XBitmap
geometry::IntegerSize2D SAL_CALL VclCanvasBitmap::getSize() throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return integerSize2DFromSize( m_aBitmap.GetSizePixel() );
}
::sal_Bool SAL_CALL VclCanvasBitmap::hasAlpha() throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return m_aBmpEx.IsTransparent();
}
uno::Reference< rendering::XBitmap > SAL_CALL VclCanvasBitmap::getScaledBitmap( const geometry::RealSize2D& newSize,
sal_Bool beFast ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
BitmapEx aNewBmp( m_aBitmap );
aNewBmp.Scale( sizeFromRealSize2D( newSize ), beFast ? BMP_SCALE_FAST : BMP_SCALE_INTERPOLATE );
@@ -472,7 +472,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
rendering::VolatileContentDestroyedException,
uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
bitmapLayout = getMemoryLayout();
@@ -577,7 +577,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::Integer
rendering::VolatileContentDestroyedException,
uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
bitmapLayout = getMemoryLayout();
@@ -643,7 +643,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::Integer
uno::Reference< rendering::XBitmapPalette > SAL_CALL VclCanvasBitmap::getPalette() throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
uno::Reference< XBitmapPalette > aRet;
if( m_bPalette )
@@ -654,7 +654,7 @@ uno::Reference< rendering::XBitmapPalette > SAL_CALL VclCanvasBitmap::getPalette
rendering::IntegerBitmapLayout SAL_CALL VclCanvasBitmap::getMemoryLayout() throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
rendering::IntegerBitmapLayout aLayout( m_aLayout );
@@ -671,7 +671,7 @@ rendering::IntegerBitmapLayout SAL_CALL VclCanvasBitmap::getMemoryLayout() throw
sal_Int32 SAL_CALL VclCanvasBitmap::getNumberOfEntries() throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if( !m_pBmpAcc )
return 0;
@@ -681,7 +681,7 @@ sal_Int32 SAL_CALL VclCanvasBitmap::getNumberOfEntries() throw (uno::RuntimeExce
sal_Bool SAL_CALL VclCanvasBitmap::getIndex( uno::Sequence< double >& o_entry, sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const USHORT nCount( m_pBmpAcc ?
(m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 );
@@ -702,7 +702,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::getIndex( uno::Sequence< double >& o_entry, s
sal_Bool SAL_CALL VclCanvasBitmap::setIndex( const uno::Sequence< double >&, sal_Bool, sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, lang::IllegalArgumentException, uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const USHORT nCount( m_pBmpAcc ?
(m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 );
@@ -741,7 +741,7 @@ sal_Int8 SAL_CALL VclCanvasBitmap::getType( ) throw (uno::RuntimeException)
uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::getComponentTags( ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return m_aComponentTags;
}
@@ -767,7 +767,7 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertColorSpace( const uno::
uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertToRGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
@@ -816,7 +816,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertToRGB( const
uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
@@ -869,7 +869,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToARGB( con
uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToPARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
@@ -922,7 +922,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToPARGB( co
uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromRGB( const uno::Sequence<rendering::RGBColor>& rgbColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( rgbColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
@@ -962,7 +962,7 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromRGB( const uno::Seq
uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromARGB( const uno::Sequence<rendering::ARGBColor>& rgbColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( rgbColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
@@ -1002,7 +1002,7 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromARGB( const uno::Se
uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromPARGB( const uno::Sequence<rendering::ARGBColor>& rgbColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( rgbColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
@@ -1044,19 +1044,19 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromPARGB( const uno::S
sal_Int32 SAL_CALL VclCanvasBitmap::getBitsPerPixel( ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return m_nBitsPerOutputPixel;
}
uno::Sequence< ::sal_Int32 > SAL_CALL VclCanvasBitmap::getComponentBitCounts( ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return m_aComponentBitCounts;
}
sal_Int8 SAL_CALL VclCanvasBitmap::getEndianness( ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return m_nEndianness;
}
@@ -1065,7 +1065,7 @@ uno::Sequence<double> SAL_CALL VclCanvasBitmap::convertFromIntegerColorSpace( co
{
if( dynamic_cast<VclCanvasBitmap*>(targetColorSpace.get()) )
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
@@ -1144,7 +1144,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertToIntegerColorSpace
uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToRGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const BYTE* pIn( reinterpret_cast<const BYTE*>(deviceColor.getConstArray()) );
const sal_Size nLen( deviceColor.getLength() );
@@ -1199,7 +1199,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToRGB
uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const BYTE* pIn( reinterpret_cast<const BYTE*>(deviceColor.getConstArray()) );
const sal_Size nLen( deviceColor.getLength() );
@@ -1257,7 +1257,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToAR
uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToPARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const BYTE* pIn( reinterpret_cast<const BYTE*>(deviceColor.getConstArray()) );
const sal_Size nLen( deviceColor.getLength() );
@@ -1316,7 +1316,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToPA
uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( const uno::Sequence<rendering::RGBColor>& rgbColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( rgbColor.getLength() );
const sal_Int32 nNumBytes((nLen*m_nBitsPerOutputPixel+7)/8);
@@ -1365,7 +1365,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con
uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( const uno::Sequence<rendering::ARGBColor>& rgbColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( rgbColor.getLength() );
const sal_Int32 nNumBytes((nLen*m_nBitsPerOutputPixel+7)/8);
@@ -1414,7 +1414,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co
uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( const uno::Sequence<rendering::ARGBColor>& rgbColor ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
const sal_Size nLen( rgbColor.getLength() );
const sal_Int32 nNumBytes((nLen*m_nBitsPerOutputPixel+7)/8);
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 273d4d9e1ced..d851a4da9565 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -77,7 +77,7 @@ extern "C" {
static gint
atk_wrapper_focus_idle_handler (gpointer data)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
focus_notify_handler = 0;
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index 6f45c4413a3f..707928c9c6a8 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -3848,7 +3848,7 @@ void SelectionManager::shutdown() throw()
aGuard.clear();
while (osl_isThreadRunning(m_aThread))
{
- vos::OGuard guard2(Application::GetSolarMutex());
+ SolarMutexGuard guard2;
Application::Reschedule();
}
osl_joinWithThread( m_aThread );