diff options
Diffstat (limited to 'cui/source/tabpages/autocdlg.cxx')
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 69f51472da7a..ca6f66834a74 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -795,23 +795,22 @@ bool OfaACorrCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol) void OfaACorrCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal_uInt16 nCol, SvButtonState eState) { - SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetItem(nCol + 1)); + SvLBoxButton& rItem = static_cast<SvLBoxButton&>(pEntry->GetItem(nCol + 1)); - DBG_ASSERT(pItem,"SetCheckButton:Item not found"); - if (pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) + if (rItem.GetType() == SV_ITEM_ID_LBOXBUTTON) { switch( eState ) { case SV_BUTTON_CHECKED: - pItem->SetStateChecked(); + rItem.SetStateChecked(); break; case SV_BUTTON_UNCHECKED: - pItem->SetStateUnchecked(); + rItem.SetStateUnchecked(); break; case SV_BUTTON_TRISTATE: - pItem->SetStateTristate(); + rItem.SetStateTristate(); break; } InvalidateEntry( pEntry ); @@ -821,12 +820,11 @@ void OfaACorrCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal_uIn SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvTreeListEntry* pEntry, sal_uInt16 nCol ) { SvButtonState eState = SV_BUTTON_UNCHECKED; - SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetItem(nCol + 1)); - DBG_ASSERT(pItem,"GetChButnState:Item not found"); + SvLBoxButton& rItem = static_cast<SvLBoxButton&>(pEntry->GetItem(nCol + 1)); - if (pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) + if (rItem.GetType() == SV_ITEM_ID_LBOXBUTTON) { - SvItemStateFlags nButtonFlags = pItem->GetButtonFlags(); + SvItemStateFlags nButtonFlags = rItem.GetButtonFlags(); eState = SvLBoxButtonData::ConvertToButtonState( nButtonFlags ); } |