accessibility/source/extended/AccessibleBrowseBox.cxx            |    6 +-----
 accessibility/source/extended/AccessibleGridControl.cxx          |    7 ++-----
 accessibility/source/extended/AccessibleGridControlTable.cxx     |    2 +-
 accessibility/source/extended/AccessibleGridControlTableCell.cxx |    2 +-
 4 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 1425cbc50a9183477a12e413a0519867c0a589fa
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri May 3 08:31:26 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri May 3 15:01:33 2024 +0200

    WaE: C6011 Dereferencing NULL pointer warnings
    
    Change-Id: I8a15be14850b9fe48f80820f4308c35748497727
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167034
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx 
b/accessibility/source/extended/AccessibleBrowseBox.cxx
index 8408c0abe23a..705df2536cfe 100644
--- a/accessibility/source/extended/AccessibleBrowseBox.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBox.cxx
@@ -168,23 +168,19 @@ void SAL_CALL AccessibleBrowseBox::grabFocus()
 }
 
 // XServiceInfo
-
 OUString SAL_CALL AccessibleBrowseBox::getImplementationName()
 {
     return u"com.sun.star.comp.svtools.AccessibleBrowseBox"_ustr;
 }
 
-
 // internal virtual methods
-
 tools::Rectangle AccessibleBrowseBox::implGetBoundingBox()
 {
     vcl::Window* pParent = mpBrowseBox->GetAccessibleParentWindow();
-    OSL_ENSURE( pParent, "implGetBoundingBox - missing parent window" );
+    assert(pParent && "implGetBoundingBox - missing parent window");
     return mpBrowseBox->GetWindowExtentsRelative( *pParent );
 }
 
-
 AbsoluteScreenPixelRectangle AccessibleBrowseBox::implGetBoundingBoxOnScreen()
 {
     return mpBrowseBox->GetWindowExtentsAbsolute();
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx 
b/accessibility/source/extended/AccessibleGridControl.cxx
index b2577ea588b3..88af9f423d8e 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -178,27 +178,25 @@ void SAL_CALL AccessibleGridControl::grabFocus()
 }
 
 // XServiceInfo ---------------------------------------------------------------
-
 OUString SAL_CALL AccessibleGridControl::getImplementationName()
 {
     return u"com.sun.star.accessibility.AccessibleGridControl"_ustr;
 }
 
-
 // internal virtual methods ---------------------------------------------------
 
 tools::Rectangle AccessibleGridControl::implGetBoundingBox()
 {
     vcl::Window* pParent = m_aTable.GetAccessibleParentWindow();
-    OSL_ENSURE( pParent, "implGetBoundingBox - missing parent window" );
+    assert(pParent && "implGetBoundingBox - missing parent window");
     return m_aTable.GetWindowExtentsRelative( *pParent );
 }
 
-
 AbsoluteScreenPixelRectangle 
AccessibleGridControl::implGetBoundingBoxOnScreen()
 {
     return m_aTable.GetWindowExtentsAbsolute();
 }
+
 // internal helper methods ----------------------------------------------------
 
 css::uno::Reference< css::accessibility::XAccessible > 
AccessibleGridControl::implGetTable()
@@ -210,7 +208,6 @@ css::uno::Reference< css::accessibility::XAccessible > 
AccessibleGridControl::im
     return m_xTable;
 }
 
-
 css::uno::Reference< css::accessibility::XAccessible >
 AccessibleGridControl::implGetHeaderBar( AccessibleTableControlObjType 
eObjType )
 {
diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx 
b/accessibility/source/extended/AccessibleGridControlTable.cxx
index 1f1a0436951c..9ee3d4af4f56 100644
--- a/accessibility/source/extended/AccessibleGridControlTable.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTable.cxx
@@ -344,7 +344,7 @@ void AccessibleGridControlTable::commitEvent(sal_Int16 
nEventId, const css::uno:
 tools::Rectangle AccessibleGridControlTable::implGetBoundingBox()
 {
     vcl::Window* pParent = m_aTable.GetAccessibleParentWindow();
-    DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" );
+    assert(pParent && "implGetBoundingBox - missing parent window");
     tools::Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( *pParent ));
     tools::Rectangle aTableRect( m_aTable.calcTableRect() );
     tools::Long nX = aGridRect.Left() + aTableRect.Left();
diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx 
b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
index 63bb24304c71..86d3da7ddb32 100644
--- a/accessibility/source/extended/AccessibleGridControlTableCell.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
@@ -320,7 +320,7 @@ namespace accessibility
     tools::Rectangle AccessibleGridControlTableCell::implGetBoundingBox()
     {
         vcl::Window* pParent = m_aTable.GetAccessibleParentWindow();
-        DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" );
+        assert(pParent && "implGetBoundingBox - missing parent window");
         tools::Rectangle aGridRect = m_aTable.GetWindowExtentsRelative( 
*pParent );
         sal_Int64 nIndex = getAccessibleIndexInParent();
         tools::Rectangle aCellRect = 
m_aTable.calcCellRect(nIndex%m_aTable.GetColumnCount(), 
nIndex/m_aTable.GetColumnCount());

Reply via email to