diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-13 02:47:36 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 19:55:33 -0500 |
commit | f4f4a8ed4f56035cc9f536d00f62a552af974cf0 (patch) | |
tree | e247bfb2431e1413704de1286952e8e5d6eb1bfd /svx/source/table/tablemodel.cxx | |
parent | 3a81649a55a49705d907a6ee72c92e26d2d4f2ee (diff) |
use SolarMutexGuard to guard the SolarMutex
Diffstat (limited to 'svx/source/table/tablemodel.cxx')
-rw-r--r-- | svx/source/table/tablemodel.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index a73dc88a9dda..af99e593d0e4 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -316,7 +316,7 @@ void TableModel::UndoRemoveColumns( sal_Int32 nIndex, ColumnVector& aCols, CellV Reference< XCellCursor > SAL_CALL TableModel::createCursor() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return createCursorByRange( Reference< XCellRange >( this ) ); } @@ -324,7 +324,7 @@ Reference< XCellCursor > SAL_CALL TableModel::createCursor() throw (RuntimeExcep Reference< XCellCursor > SAL_CALL TableModel::createCursorByRange( const Reference< XCellRange >& Range ) throw (IllegalArgumentException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ICellRange* pRange = dynamic_cast< ICellRange* >( Range.get() ); if( (pRange == 0) || (pRange->getTable().get() != this) ) @@ -338,7 +338,7 @@ Reference< XCellCursor > SAL_CALL TableModel::createCursorByRange( const Referen sal_Int32 SAL_CALL TableModel::getRowCount() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return getRowCountImpl(); } @@ -346,7 +346,7 @@ sal_Int32 SAL_CALL TableModel::getRowCount() throw (RuntimeException) sal_Int32 SAL_CALL TableModel::getColumnCount() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return getColumnCountImpl(); } @@ -356,7 +356,7 @@ sal_Int32 SAL_CALL TableModel::getColumnCount() throw (RuntimeException) void TableModel::dispose() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; TableModelBase::dispose(); } @@ -380,7 +380,7 @@ void SAL_CALL TableModel::removeEventListener( const Reference< XEventListener > sal_Bool SAL_CALL TableModel::isModified( ) throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return mbModified; } @@ -389,7 +389,7 @@ sal_Bool SAL_CALL TableModel::isModified( ) throw (RuntimeException) void SAL_CALL TableModel::setModified( sal_Bool bModified ) throw (PropertyVetoException, RuntimeException) { { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; mbModified = bModified; } if( bModified ) @@ -418,7 +418,7 @@ void SAL_CALL TableModel::removeModifyListener( const Reference< XModifyListener Reference< XTableColumns > SAL_CALL TableModel::getColumns() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !mxTableColumns.is() ) mxTableColumns.set( new TableColumns( this ) ); @@ -429,7 +429,7 @@ Reference< XTableColumns > SAL_CALL TableModel::getColumns() throw (RuntimeExcep Reference< XTableRows > SAL_CALL TableModel::getRows() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !mxTableRows.is() ) mxTableRows.set( new TableRows( this ) ); @@ -442,7 +442,7 @@ Reference< XTableRows > SAL_CALL TableModel::getRows() throw (RuntimeException) Reference< XCell > SAL_CALL TableModel::getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw ( IndexOutOfBoundsException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; CellRef xCell( getCell( nColumn, nRow ) ); if( xCell.is() ) @@ -455,7 +455,7 @@ Reference< XCell > SAL_CALL TableModel::getCellByPosition( sal_Int32 nColumn, sa Reference< XCellRange > SAL_CALL TableModel::getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw (IndexOutOfBoundsException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (nLeft >= 0) && (nTop >= 0) && (nRight >= nLeft) && (nBottom >= nTop) && (nRight < getColumnCountImpl()) && (nBottom < getRowCountImpl() ) ) { @@ -593,14 +593,14 @@ void TableModel::disposing() void TableModel::lockBroadcasts() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ++mnNotifyLock; } // ----------------------------------------------------------------------------- void TableModel::unlockBroadcasts() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; --mnNotifyLock; if( mnNotifyLock <= 0 ) { |