/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
void BrowseBox::FillAccessibleStateSet(
sal_Int64& rStateSet,
AccessibleBrowseBoxObjType eObjType ) const
{ switch( eObjType )
{ case AccessibleBrowseBoxObjType::BrowseBox: case AccessibleBrowseBoxObjType::Table:
rStateSet |= AccessibleStateType::FOCUSABLE; if ( HasFocus() )
rStateSet |= AccessibleStateType::FOCUSED; if ( IsActive() )
rStateSet |= AccessibleStateType::ACTIVE; if ( GetUpdateMode() )
rStateSet |= AccessibleStateType::EDITABLE; if ( IsEnabled() )
{
rStateSet |= AccessibleStateType::ENABLED;
rStateSet |= AccessibleStateType::SENSITIVE;
} if ( IsReallyVisible() )
rStateSet |= AccessibleStateType::VISIBLE; if ( eObjType == AccessibleBrowseBoxObjType::Table )
rStateSet |= AccessibleStateType::MANAGES_DESCENDANTS;
break; case AccessibleBrowseBoxObjType::RowHeaderBar:
rStateSet |= AccessibleStateType::FOCUSABLE;
rStateSet |= AccessibleStateType::VISIBLE; if ( GetSelectRowCount() )
rStateSet |= AccessibleStateType::FOCUSED;
rStateSet |= AccessibleStateType::MANAGES_DESCENDANTS; break; case AccessibleBrowseBoxObjType::ColumnHeaderBar:
rStateSet |= AccessibleStateType::FOCUSABLE;
rStateSet |= AccessibleStateType::VISIBLE; if ( GetSelectColumnCount() )
rStateSet |= AccessibleStateType::FOCUSED;
rStateSet |= AccessibleStateType::MANAGES_DESCENDANTS; break; case AccessibleBrowseBoxObjType::TableCell:
{
sal_Int32 nRow = GetCurRow();
sal_uInt16 nColumn = GetCurColumnId(); if ( IsFieldVisible(nRow,nColumn) )
rStateSet |= AccessibleStateType::VISIBLE; if ( !IsFrozen( nColumn ) )
rStateSet |= AccessibleStateType::FOCUSABLE;
rStateSet |= AccessibleStateType::TRANSIENT;
} break; case AccessibleBrowseBoxObjType::RowHeaderCell: case AccessibleBrowseBoxObjType::ColumnHeaderCell: case AccessibleBrowseBoxObjType::CheckBoxCell:
OSL_FAIL("Illegal call here!"); break;
}
}
void BrowseBox::FillAccessibleStateSetForCell( sal_Int64& _rStateSet,
sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const
{ //! TODO check if the state is valid for table cells if ( IsCellVisible( _nRow, _nColumnPos ) )
_rStateSet |= AccessibleStateType::VISIBLE; if ( GetCurrRow() == _nRow && GetCurrColumn() == _nColumnPos )
_rStateSet |= AccessibleStateType::FOCUSED; else// only transient when column is not focused
_rStateSet |= AccessibleStateType::TRANSIENT;
}
void BrowseBox::GrabTableFocus()
{
GrabFocus();
}
OUString BrowseBox::GetCellText(sal_Int32, sal_uInt16 ) const
{
SAL_WARN("svtools", "This method has to be implemented by the derived classes! BUG!!"); return OUString();
}
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.