// by default, use the background as determined by the style settings const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() );
SetBackground( Wallpaper( aWindowColor ) );
GetOutDev()->SetFillColor( aWindowColor );
if (!bHandled)
Control::KeyInput( rKEvt ); else
{
m_pImpl->commitCellEvent( AccessibleEventId::STATE_CHANGED,
Any( AccessibleStateType::FOCUSED ),
Any()
); // Huh? What the heck? Why do we unconditionally notify a STATE_CHANGE/FOCUSED after each and every // (handled) key stroke?
m_pImpl->commitTableEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
Any(),
Any()
); // ditto: Why do we notify this unconditionally? We should find the right place to notify the // ACTIVE_DESCENDANT_CHANGED event. // Also, we should check if STATE_CHANGED/FOCUSED is really necessary: finally, the children are // transient, aren't they?
}
}
// forward certain settings to the data window switch ( i_nStateChange )
{ case StateChangedType::ControlFocus:
m_pImpl->invalidateSelectedRows(); break;
case StateChangedType::ControlBackground: if ( IsControlBackground() )
getDataWindow().SetControlBackground( GetControlBackground() ); else
getDataWindow().SetControlBackground(); break;
case StateChangedType::ControlForeground: if ( IsControlForeground() )
getDataWindow().SetControlForeground( GetControlForeground() ); else
getDataWindow().SetControlForeground(); break;
case StateChangedType::ControlFont: if ( IsControlFont() )
getDataWindow().SetControlFont( GetControlFont() ); else
getDataWindow().SetControlFont(); break; default:;
}
}
void TableControl::SelectAllRows( boolconst i_select )
{ if ( i_select )
{ if ( !m_pImpl->markAllRowsAsSelected() ) // nothing to do return;
} else
{ if ( !m_pImpl->markAllRowsAsDeselected() ) // nothing to do return;
}
Invalidate(); // TODO: can't we do better than this, and invalidate only the rows which changed?
Select();
}
OUString TableControl::GetAccessibleObjectName( AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const
{
OUString aRetText; //Window* pWin; switch( eObjType )
{ case AccessibleTableControlObjType::GRIDCONTROL:
aRetText = "Grid control"; break; case AccessibleTableControlObjType::TABLE:
aRetText = "Grid control"; break; case AccessibleTableControlObjType::ROWHEADERBAR:
aRetText = "RowHeaderBar"; break; case AccessibleTableControlObjType::COLUMNHEADERBAR:
aRetText = "ColumnHeaderBar"; break; case AccessibleTableControlObjType::TABLECELL: //the name of the cell consists of column name and row name if defined //if the name is equal to cell content, it'll be read twice if(GetModel()->hasColumnHeaders())
{
aRetText = GetColumnName(_nCol) + " , ";
} if(GetModel()->hasRowHeaders())
{
aRetText += GetRowName(_nRow) + " , ";
} //aRetText = GetAccessibleCellText(_nRow, _nCol); break; case AccessibleTableControlObjType::ROWHEADERCELL:
aRetText = GetRowName(_nRow); break; case AccessibleTableControlObjType::COLUMNHEADERCELL:
aRetText = GetColumnName(_nCol); break; default:
OSL_FAIL("GridControl::GetAccessibleName: invalid enum!");
} return aRetText;
}
OUString TableControl::GetAccessibleObjectDescription( AccessibleTableControlObjType eObjType ) const
{
OUString aRetText; switch( eObjType )
{ case AccessibleTableControlObjType::GRIDCONTROL:
aRetText = "Grid control description"; break; case AccessibleTableControlObjType::TABLE:
aRetText = "TABLE description"; break; case AccessibleTableControlObjType::ROWHEADERBAR:
aRetText = "ROWHEADERBAR description"; break; case AccessibleTableControlObjType::COLUMNHEADERBAR:
aRetText = "COLUMNHEADERBAR description"; break; case AccessibleTableControlObjType::TABLECELL: // the description of the cell consists of column name and row name if defined // if the name is equal to cell content, it'll be read twice if ( GetModel()->hasColumnHeaders() )
{
aRetText = GetColumnName( GetCurrentColumn() ) + " , ";
} if ( GetModel()->hasRowHeaders() )
{
aRetText += GetRowName( GetCurrentRow() );
} break; case AccessibleTableControlObjType::ROWHEADERCELL:
aRetText = "ROWHEADERCELL description"; break; case AccessibleTableControlObjType::COLUMNHEADERCELL:
aRetText = "COLUMNHEADERCELL description"; break;
} return aRetText;
}
m_pImpl->commitTableEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), Any() ); // TODO: why do we notify this when the *selection* changed? Shouldn't we find a better place for this, // actually, when the active descendant, i.e. the current cell, *really* changed?
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.