SwXCellRange: Use UnoCursorPointer::get() instead of &*
Using &* can be problematic if the pointer is null. In this case I don’t think it matters, but using UnoCursorPointer::get() is probably easier to understand anyway. This also paves the way for a later compiler plugin to check for this. Change-Id: I01f77acc36cd1f96c6b438b9d6db005d0b08416a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211755 Tested-by: Jenkins Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
This commit is contained in:
@@ -3777,7 +3777,7 @@ sal_Int32 SwXCellRange::Impl::GetRowCount() const
|
||||
const SwUnoCursor* SwXCellRange::GetTableCursor() const
|
||||
{
|
||||
SwFrameFormat *const pFormat = m_pImpl->GetFrameFormat();
|
||||
return pFormat ? &(*m_pImpl->m_pTableCursor) : nullptr;
|
||||
return pFormat ? m_pImpl->m_pTableCursor.get() : nullptr;
|
||||
}
|
||||
|
||||
void SwXCellRange::Impl::Notify( const SfxHint& rHint )
|
||||
|
||||
Reference in New Issue
Block a user