summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorJacek Wolszczak <shutdownrunner@gmail.com>2011-08-21 09:13:24 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-29 23:31:48 +0200
commitcaf0e31e2478884839456bd499fc943324121d77 (patch)
tree93389237f7bad4c827cad31a8396159d81d37f33 /accessibility
parent450bf77d29c3f2b23bea816be94a346645341cf7 (diff)
fdo#39425: Replace DBG_ASSERT macros with OSL_ equivalents in accessibility
Change-Id: I4f8fb4ffa8bcd5a503374040ada191ccf1f89013
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/extended/AccessibleBrowseBox.cxx8
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx2
-rw-r--r--accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx2
-rw-r--r--accessibility/source/extended/AccessibleGridControl.cxx6
-rw-r--r--accessibility/source/extended/AccessibleGridControlHeader.cxx2
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrlentry.cxx2
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx6
-rw-r--r--accessibility/source/extended/accessibletabbarbase.cxx6
-rw-r--r--accessibility/source/extended/accessibletablistboxtable.cxx4
-rw-r--r--accessibility/source/extended/listboxaccessible.cxx6
-rw-r--r--accessibility/source/standard/accessiblemenubasecomponent.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessiblemenubar.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx2
13 files changed, 27 insertions, 27 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx
index ad52e7ac3bf6..88782c7d6778 100644
--- a/accessibility/source/extended/AccessibleBrowseBox.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBox.cxx
@@ -82,7 +82,7 @@ void AccessibleBrowseBox::setCreator( const Reference< XAccessible >& _rxCreator
{
#if OSL_DEBUG_LEVEL > 0
Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator;
- DBG_ASSERT( !xCreator.is(), "accessibility/extended/AccessibleBrowseBox::setCreator: creator already set!" );
+ OSL_ENSURE( !xCreator.is(), "accessibility/extended/AccessibleBrowseBox::setCreator: creator already set!" );
#endif
m_pImpl->m_aCreator = _rxCreator;
}
@@ -224,7 +224,7 @@ OUString SAL_CALL AccessibleBrowseBox::getImplementationName()
Rectangle AccessibleBrowseBox::implGetBoundingBox()
{
Window* pParent = mpBrowseBox->GetAccessibleParentWindow();
- DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" );
+ OSL_ENSURE( pParent, "implGetBoundingBox - missing parent window" );
return mpBrowseBox->GetWindowExtentsRelative( pParent );
}
// -----------------------------------------------------------------------------
@@ -302,7 +302,7 @@ AccessibleBrowseBox::implGetFixedChild( sal_Int32 nChildIndex )
AccessibleBrowseBoxTable* AccessibleBrowseBox::createAccessibleTable()
{
Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator;
- DBG_ASSERT( xCreator.is(), "accessibility/extended/AccessibleBrowseBox::createAccessibleTable: my creator died - how this?" );
+ OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleBrowseBox::createAccessibleTable: my creator died - how this?" );
return new AccessibleBrowseBoxTable( xCreator, *mpBrowseBox );
}
// -----------------------------------------------------------------------------
@@ -357,7 +357,7 @@ Reference< XAccessibleContext > SAL_CALL AccessibleBrowseBoxAccess::getAccessibl
{
::osl::MutexGuard aGuard( m_aMutex );
- DBG_ASSERT( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ),
+ OSL_ENSURE( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ),
"accessibility/extended/AccessibleBrowseBoxAccess::getAccessibleContext: inconsistency!" );
// if the context died meanwhile (there is no listener, so it won't tell us explicitily when this happens),
diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx
index afce55effaf1..35a684deb2eb 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx
@@ -60,7 +60,7 @@ AccessibleBrowseBoxHeaderBar::AccessibleBrowseBoxHeaderBar(
{
DBG_CTOR( AccessibleBrowseBoxHeaderBar, NULL );
- DBG_ASSERT( isRowBar() || isColumnBar(),
+ OSL_ENSURE( isRowBar() || isColumnBar(),
"accessibility/extended/AccessibleBrowseBoxHeaderBar - invalid object type" );
}
diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
index e961b85042e3..72bc72f3e21a 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
@@ -153,7 +153,7 @@ namespace accessibility
sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getIndexAtPoint( const ::com::sun::star::awt::Point& _aPoint ) throw (RuntimeException)
{
//! TODO CTL bidi
- // DBG_ASSERT(0,"Need to be done by base class!");
+ // OSL_FAIL("Need to be done by base class!");
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getOslMutex() );
ensureIsAlive();
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx
index 1472a58fb14b..a1a5c2cb147a 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -236,7 +236,7 @@ OUString SAL_CALL AccessibleGridControl::getImplementationName()
Rectangle AccessibleGridControl::implGetBoundingBox()
{
Window* pParent = m_aTable.GetAccessibleParentWindow();
- DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" );
+ OSL_ENSURE( pParent, "implGetBoundingBox - missing parent window" );
return m_aTable.GetWindowExtentsRelative( pParent );
}
// -----------------------------------------------------------------------------
@@ -310,7 +310,7 @@ AccessibleGridControl::implGetFixedChild( sal_Int32 nChildIndex )
AccessibleGridControlTable* AccessibleGridControl::createAccessibleTable()
{
Reference< XAccessible > xCreator = (Reference< XAccessible >)m_pImpl->m_aCreator;
- DBG_ASSERT( xCreator.is(), "accessibility/extended/AccessibleGirdControl::createAccessibleTable: my creator died - how this?" );
+ OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleGirdControl::createAccessibleTable: my creator died - how this?" );
return new AccessibleGridControlTable( xCreator, m_aTable, TCTYPE_TABLE );
}
// ============================================================================
@@ -344,7 +344,7 @@ Reference< XAccessibleContext > SAL_CALL AccessibleGridControlAccess::getAccessi
{
::osl::MutexGuard aGuard( m_aMutex );
- DBG_ASSERT( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ),
+ OSL_ENSURE( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ),
"accessibility/extended/AccessibleGridControlAccess::getAccessibleContext: inconsistency!" );
// if the context died meanwhile (we're no listener, so it won't tell us explicitily when this happens),
diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx
index 4ddef9a3240b..205f7517d02e 100644
--- a/accessibility/source/extended/AccessibleGridControlHeader.cxx
+++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx
@@ -60,7 +60,7 @@ AccessibleGridControlHeader::AccessibleGridControlHeader(
::svt::table::AccessibleTableControlObjType eObjType):
AccessibleGridControlTableBase( rxParent, rTable, eObjType )
{
- DBG_ASSERT( isRowBar() || isColumnBar(),
+ OSL_ENSURE( isRowBar() || isColumnBar(),
"accessibility/extended/AccessibleGridControlHeaderBar - invalid object type" );
}
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index 610c2b94d6a5..7b8e46f2641c 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -105,7 +105,7 @@ throw(RuntimeException)
if ( _rSource.Source == m_xParent )
{
dispose();
- DBG_ASSERT( !m_xParent.is() && ( NULL == m_pIconCtrl ), "" );
+ OSL_ENSURE( !m_xParent.is() && ( NULL == m_pIconCtrl ), "" );
}
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 74b99ac0b49c..06c14f49561b 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -344,7 +344,7 @@ namespace accessibility
Reference< XAccessible > xParent = (Reference< XAccessible >)m_aParent;
if ( !xParent.is() )
{
- DBG_ASSERT( m_aEntryPath.size(), "AccessibleListBoxEntry::getAccessibleParent: invalid path!" );
+ OSL_ENSURE( m_aEntryPath.size(), "AccessibleListBoxEntry::getAccessibleParent: invalid path!" );
if ( 1 == m_aEntryPath.size() )
{ // we're a top level entry
// -> our parent is the tree listbox itself
@@ -360,7 +360,7 @@ namespace accessibility
// get the entry for this shortened access path
SvLBoxEntry* pParentEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
- DBG_ASSERT( pParentEntry, "AccessibleListBoxEntry::implGetParentAccessible: could not obtain a parent entry!" );
+ OSL_ENSURE( pParentEntry, "AccessibleListBoxEntry::implGetParentAccessible: could not obtain a parent entry!" );
if ( pParentEntry )
xParent = new AccessibleListBoxEntry( *getListBox(), pParentEntry, NULL );
@@ -387,7 +387,7 @@ namespace accessibility
{
::osl::MutexGuard aGuard( m_aMutex );
- DBG_ASSERT( !m_aEntryPath.empty(), "empty path" );
+ OSL_ENSURE( !m_aEntryPath.empty(), "empty path" );
return m_aEntryPath.empty() ? -1 : m_aEntryPath.back();
}
// -----------------------------------------------------------------------------
diff --git a/accessibility/source/extended/accessibletabbarbase.cxx b/accessibility/source/extended/accessibletabbarbase.cxx
index 6936967813e2..2ac4df15a7d4 100644
--- a/accessibility/source/extended/accessibletabbarbase.cxx
+++ b/accessibility/source/extended/accessibletabbarbase.cxx
@@ -46,11 +46,11 @@ AccessibleTabBarBase::~AccessibleTabBarBase()
IMPL_LINK( AccessibleTabBarBase, WindowEventListener, VclSimpleEvent*, pEvent )
{
VclWindowEvent* pWinEvent = dynamic_cast< VclWindowEvent* >( pEvent );
- DBG_ASSERT( pWinEvent, "AccessibleTabBarBase::WindowEventListener - unknown window event" );
+ OSL_ENSURE( pWinEvent, "AccessibleTabBarBase::WindowEventListener - unknown window event" );
if( pWinEvent )
{
Window* pEventWindow = pWinEvent->GetWindow();
- DBG_ASSERT( pEventWindow, "AccessibleTabBarBase::WindowEventListener: no window!" );
+ OSL_ENSURE( pEventWindow, "AccessibleTabBarBase::WindowEventListener: no window!" );
if( ( pWinEvent->GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) &&
( (sal_uInt16)(sal_IntPtr) pWinEvent->GetData() == TabBar::PAGE_NOT_FOUND ) &&
@@ -83,7 +83,7 @@ void AccessibleTabBarBase::disposing()
void AccessibleTabBarBase::SetTabBarPointer( TabBar* pTabBar )
{
- DBG_ASSERT( !m_pTabBar, "AccessibleTabBarBase::SetTabBarPointer - multiple call" );
+ OSL_ENSURE( !m_pTabBar, "AccessibleTabBarBase::SetTabBarPointer - multiple call" );
m_pTabBar = pTabBar;
if( m_pTabBar )
m_pTabBar->AddEventListener( LINK( this, AccessibleTabBarBase, WindowEventListener ) );
diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx
index e9fb4645a6a2..2954226f57a7 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -211,10 +211,10 @@ namespace accessibility
// -----------------------------------------------------------------------------
IMPL_LINK( AccessibleTabListBoxTable, WindowEventListener, VclSimpleEvent*, pEvent )
{
- DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
+ OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
if ( pEvent && pEvent->ISA( VclWindowEvent ) )
{
- DBG_ASSERT( ( (VclWindowEvent*)pEvent )->GetWindow() && m_pTabListBox, "no event window" );
+ OSL_ENSURE( ( (VclWindowEvent*)pEvent )->GetWindow() && m_pTabListBox, "no event window" );
ProcessWindowEvent( *(VclWindowEvent*)pEvent );
}
return 0;
diff --git a/accessibility/source/extended/listboxaccessible.cxx b/accessibility/source/extended/listboxaccessible.cxx
index 34990746e4f4..077ae5fd64ca 100644
--- a/accessibility/source/extended/listboxaccessible.cxx
+++ b/accessibility/source/extended/listboxaccessible.cxx
@@ -50,11 +50,11 @@ namespace accessibility
//--------------------------------------------------------------------
IMPL_LINK( ListBoxAccessibleBase, WindowEventListener, VclSimpleEvent*, pEvent )
{
- DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "ListBoxAccessibleBase::WindowEventListener: unexpected WindowEvent!" );
+ OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "ListBoxAccessibleBase::WindowEventListener: unexpected WindowEvent!" );
if ( pEvent && pEvent->ISA( VclWindowEvent ) )
{
- DBG_ASSERT( static_cast< VclWindowEvent* >( pEvent )->GetWindow() , "ListBoxAccessibleBase::WindowEventListener: no event window!" );
- DBG_ASSERT( static_cast< VclWindowEvent* >( pEvent )->GetWindow() == m_pWindow, "ListBoxAccessibleBase::WindowEventListener: where did this come from?" );
+ OSL_ENSURE( static_cast< VclWindowEvent* >( pEvent )->GetWindow() , "ListBoxAccessibleBase::WindowEventListener: no event window!" );
+ OSL_ENSURE( static_cast< VclWindowEvent* >( pEvent )->GetWindow() == m_pWindow, "ListBoxAccessibleBase::WindowEventListener: where did this come from?" );
ProcessWindowEvent( *static_cast< VclWindowEvent* >( pEvent ) );
}
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index 04c3137ada27..7213fc77a723 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -564,10 +564,10 @@ sal_Bool OAccessibleMenuBaseComponent::IsPopupMenuOpen()
IMPL_LINK( OAccessibleMenuBaseComponent, MenuEventListener, VclSimpleEvent*, pEvent )
{
- DBG_ASSERT( pEvent && pEvent->ISA( VclMenuEvent ), "OAccessibleMenuBaseComponent - Unknown MenuEvent!" );
+ OSL_ENSURE( pEvent && pEvent->ISA( VclMenuEvent ), "OAccessibleMenuBaseComponent - Unknown MenuEvent!" );
if ( pEvent && pEvent->ISA( VclMenuEvent ) )
{
- DBG_ASSERT( ((VclMenuEvent*)pEvent)->GetMenu(), "OAccessibleMenuBaseComponent - Menu?" );
+ OSL_ENSURE( ((VclMenuEvent*)pEvent)->GetMenu(), "OAccessibleMenuBaseComponent - Menu?" );
ProcessMenuEvent( *(VclMenuEvent*)pEvent );
}
return 0;
diff --git a/accessibility/source/standard/vclxaccessiblemenubar.cxx b/accessibility/source/standard/vclxaccessiblemenubar.cxx
index 9d2c51df4d2a..832f1bc21cb2 100644
--- a/accessibility/source/standard/vclxaccessiblemenubar.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenubar.cxx
@@ -80,10 +80,10 @@ sal_Bool VCLXAccessibleMenuBar::IsFocused()
IMPL_LINK( VCLXAccessibleMenuBar, WindowEventListener, VclSimpleEvent*, pEvent )
{
- DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "VCLXAccessibleMenuBar::WindowEventListener: unknown window event!" );
+ OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "VCLXAccessibleMenuBar::WindowEventListener: unknown window event!" );
if ( pEvent && pEvent->ISA( VclWindowEvent ) )
{
- DBG_ASSERT( ((VclWindowEvent*)pEvent)->GetWindow(), "VCLXAccessibleMenuBar::WindowEventListener: no window!" );
+ OSL_ENSURE( ((VclWindowEvent*)pEvent)->GetWindow(), "VCLXAccessibleMenuBar::WindowEventListener: no window!" );
if ( !((VclWindowEvent*)pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() || ( pEvent->GetId() == VCLEVENT_OBJECT_DYING ) )
{
ProcessWindowEvent( *(VclWindowEvent*)pEvent );
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 575d672fc7c4..f38911907826 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -84,7 +84,7 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In
m_pExternalLock = static_cast< VCLExternalSolarLock* >( getExternalLock( ) );
- DBG_ASSERT( m_pToolBox, "invalid toolbox" );
+ OSL_ENSURE( m_pToolBox, "invalid toolbox" );
m_nItemId = m_pToolBox->GetItemId( (sal_uInt16)m_nIndexInParent );
m_sOldName = GetText( true );
m_bIsChecked = m_pToolBox->IsItemChecked( m_nItemId );