diff options
Diffstat (limited to 'cui/source/tabpages')
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 153d9af05823..add6fb72f3cf 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -654,108 +654,6 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl, weld::Button&, void) } } -void OfaACorrCheckListBox::SetTabs() -{ - SvSimpleTable::SetTabs(); - SvLBoxTabFlags nAdjust = SvLBoxTabFlags::ADJUST_RIGHT|SvLBoxTabFlags::ADJUST_LEFT|SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE; - - if( aTabs.size() > 1 ) - { - SvLBoxTab* pTab = aTabs[1].get(); - pTab->nFlags &= ~nAdjust; - pTab->nFlags |= SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE; - } - if( aTabs.size() > 2 ) - { - SvLBoxTab* pTab = aTabs[2].get(); - pTab->nFlags &= ~nAdjust; - pTab->nFlags |= SvLBoxTabFlags::ADJUST_CENTER|SvLBoxTabFlags::FORCE; - } -} - -void OfaACorrCheckListBox::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, bool bChecked) -{ - if ( nPos < GetEntryCount() ) - SetCheckButtonState( - GetEntry(nPos), - nCol, - bChecked ? SvButtonState::Checked : SvButtonState::Unchecked ); -} - -bool OfaACorrCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol) -{ - return GetCheckButtonState( GetEntry(nPos), nCol ) == SvButtonState::Checked; -} - -void OfaACorrCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal_uInt16 nCol, SvButtonState eState) -{ - SvLBoxButton& rItem = static_cast<SvLBoxButton&>(pEntry->GetItem(nCol + 1)); - - if (rItem.GetType() == SvLBoxItemType::Button) - { - switch( eState ) - { - case SvButtonState::Checked: - rItem.SetStateChecked(); - break; - - case SvButtonState::Unchecked: - rItem.SetStateUnchecked(); - break; - - case SvButtonState::Tristate: - rItem.SetStateTristate(); - break; - } - InvalidateEntry( pEntry ); - } -} - -SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvTreeListEntry* pEntry, sal_uInt16 nCol ) -{ - SvButtonState eState = SvButtonState::Unchecked; - SvLBoxButton& rItem = static_cast<SvLBoxButton&>(pEntry->GetItem(nCol + 1)); - - if (rItem.GetType() == SvLBoxItemType::Button) - { - SvItemStateFlags nButtonFlags = rItem.GetButtonFlags(); - eState = SvLBoxButtonData::ConvertToButtonState( nButtonFlags ); - } - - return eState; -} - -void OfaACorrCheckListBox::HBarClick() -{ - // sorting is stopped by this override -} - -void OfaACorrCheckListBox::KeyInput( const KeyEvent& rKEvt ) -{ - if(!rKEvt.GetKeyCode().GetModifier() && - KEY_SPACE == rKEvt.GetKeyCode().GetCode()) - { - sal_uLong nSelPos = GetSelectedEntryPos(); - sal_uInt16 nCol = GetCurrentTabPos() - 1; - if ( nCol < 2 ) - { - CheckEntryPos( nSelPos, nCol, !IsChecked( nSelPos, nCol ) ); - CallImplEventListeners( VclEventId::CheckboxToggle, static_cast<void*>(GetEntry( nSelPos )) ); - } - else - { - sal_uInt16 nCheck = IsChecked(nSelPos, 1) ? 1 : 0; - if(IsChecked(nSelPos)) - nCheck += 2; - nCheck--; - nCheck &= 3; - CheckEntryPos(nSelPos, 1, 0 != (nCheck & 1)); - CheckEntryPos(nSelPos, 0, 0 != (nCheck & 2)); - } - } - else - SvSimpleTable::KeyInput(rKEvt); -} OfaAutocorrReplacePage::OfaAutocorrReplacePage(TabPageParent pParent, const SfxItemSet& rSet) |