/* -*- 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 . */ #include #include #include #include namespace accessibility { using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; AccessibleBrowseBoxHeaderCell::AccessibleBrowseBoxHeaderCell(sal_Int32 _nColumnRowId, const Reference< XAccessible >& rxParent, vcl::IAccessibleTableProvider& rBrowseBox, const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, AccessibleBrowseBoxObjType eObjType) : BrowseBoxAccessibleElement(rxParent, rBrowseBox, _xFocusWindow, eObjType, rBrowseBox.GetAccessibleObjectName( eObjType ,_nColumnRowId), rBrowseBox.GetAccessibleObjectDescription( eObjType ,_nColumnRowId)) , m_nColumnRowId(_nColumnRowId) { } /** Return a bitset of states of the current object. */ sal_Int64 AccessibleBrowseBoxHeaderCell::implCreateStateSet() { SolarMethodGuard aGuard( getMutex() ); sal_Int64 nStateSet = 0; if( isAlive() ) { // SHOWING done with mxParent if( implIsShowing() ) nStateSet |= AccessibleStateType::SHOWING; mpBrowseBox->FillAccessibleStateSet( nStateSet, getType() ); nStateSet |= AccessibleStateType::VISIBLE; nStateSet |= AccessibleStateType::FOCUSABLE; nStateSet |= AccessibleStateType::TRANSIENT; nStateSet |= AccessibleStateType::SELECTABLE; bool bSelected = isRowBarCell() ? mpBrowseBox->IsRowSelected(m_nColumnRowId) : mpBrowseBox->IsColumnSelected(m_nColumnRowId); if ( bSelected ) nStateSet |= AccessibleStateType::SELECTED; } else nStateSet |= AccessibleStateType::DEFUNC; return nStateSet; } /** @return The count of visible children. */ sal_Int64 SAL_CALL AccessibleBrowseBoxHeaderCell::getAccessibleChildCount() { return 0; } /** @return The XAccessible interface of the specified child. */ Reference SAL_CALL AccessibleBrowseBoxHeaderCell::getAccessibleChild( sal_Int64 ) { throw IndexOutOfBoundsException(); } /** Grabs the focus to the column header. */ void SAL_CALL AccessibleBrowseBoxHeaderCell::grabFocus() { SolarMethodGuard aGuard(getMutex()); ensureIsAlive(); if ( isRowBarCell() ) mpBrowseBox->SelectRow(m_nColumnRowId); else mpBrowseBox->SelectColumn(static_cast(m_nColumnRowId)); //!!! } /** @return The name of this class. */ OUString SAL_CALL AccessibleBrowseBoxHeaderCell::getImplementationName() { return u"com.sun.star.comp.svtools.AccessibleBrowseBoxHeaderCell"_ustr; } namespace { tools::Rectangle getRectangle(vcl::IAccessibleTableProvider* _pBrowseBox,sal_Int32 _nRowColIndex, bool _bOnScreen,bool _bRowBar) { sal_Int32 nRow = 0; sal_uInt16 nCol = static_cast(_nRowColIndex); if ( _bRowBar ) { nRow = _nRowColIndex + 1; nCol = 0; } tools::Rectangle aRet(_pBrowseBox->GetFieldRectPixel( nRow , nCol, true, _bOnScreen)); return tools::Rectangle(aRet.TopLeft() - Point(0,aRet.GetHeight()),aRet.GetSize()); } } tools::Rectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBox() { return getRectangle(mpBrowseBox,m_nColumnRowId,false,isRowBarCell()); } AbsoluteScreenPixelRectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBoxOnScreen() { return AbsoluteScreenPixelRectangle(getRectangle(mpBrowseBox,m_nColumnRowId,true,isRowBarCell())); } sal_Int64 SAL_CALL AccessibleBrowseBoxHeaderCell::getAccessibleIndexInParent() { ::osl::MutexGuard aGuard( getMutex() ); ensureIsAlive(); sal_Int64 nIndex = m_nColumnRowId; if ( mpBrowseBox->HasRowHeader() ) --nIndex; return nIndex; } } // namespace accessibility /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /collabora/lov-5.1'>distro/collabora/lov-5.1 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2021-03-25Fix editing mistake for iOS buildTor Lillqvist
2021-03-25tdf#124173: Enable thesauruses in the iOS appTor Lillqvist
2021-03-17tdf#124909: Use the myspell dictionary for Swiss German on iOSTor Lillqvist
2020-08-19Remove BuildVersion also from Android and iOS version ini filesStephan Bergmann
2020-06-22Use xcrun python3 to find the python3 also on Macs with older XcodeTor Lillqvist
2020-03-26Add share/fingerprint to the iOS appTor Lillqvist
2020-02-17Move the "registry" directory to be under "share" on iOS, tooTor Lillqvist
2020-02-16GBUILD_TRACE, support for finding out where the build time is spentLuboš Luňák
2019-10-07Use correct directory for some data files on iOS: share/filter, not filterTor Lillqvist
2019-08-30tdf#126966: The share/palette folder was missing from the iOS appTor Lillqvist
2019-04-12tdf#124449: We need also share/gallery for the iOS appTor Lillqvist
2019-03-25Just include all fonts from instdir/share/fonts in the iOS appTor Lillqvist
2019-03-20tdf#124168: The share/template folder is needed in the iOS appTor Lillqvist
2019-03-11We need share/theme_definitions in the iOS appTor Lillqvist
2019-02-28Current ICU version is 63Tor Lillqvist
2018-11-27Prepare to bundle the Liberation fonts with the iOS appTor Lillqvist
2018-11-27Fill buildid in versionrc for iOS with the git HEAD hashTor Lillqvist
2018-11-12We need share/liblangtag, tooTor Lillqvist
2018-11-09Do put a BRAND_SHARE_RESOURCE_SUBDIR setting into fundamentalrc for iOSTor Lillqvist
2018-11-09Alignment (whitespace) cleanupTor Lillqvist
2018-11-06The image zipfiles should be in share/config, it seemsTor Lillqvist
2018-10-12Avoid superfluous directory levelTor Lillqvist
2018-09-28Start on the iOS unit test appTor Lillqvist
2018-09-14Return share/config/soffice.cfg as it was, as I think the code expectsTor Lillqvist
2018-09-05Don't copy files into the source directory, use workdirTor Lillqvist
2018-09-05Put the lib names one per line to match what ld's -filelist expectsTor Lillqvist
2018-09-05Run bin/ios-all-static-libs and put its output in a fileTor Lillqvist
2018-07-17Use $(ICU_MAJOR) instead of hard coded (Upgrade to ICU 62.1)Eike Rathke
2018-06-07We use ICU 61 nowTor Lillqvist
2018-03-03iOS, moved resources from share to direct.jan Iversen
2018-03-03iOS, updated resource paths.jan Iversen
2018-03-03iOS, made example.odt local to iosjan Iversen
2018-02-05iOS, add tango theme to avoid vcl problem.jan Iversen
2018-02-05iOS, allow x86 release buildsjan Iversen
2018-02-04iOS, simplified lib ref and copy to devicejan Iversen
2018-01-25iOS, corrected directory creation.jan Iversen
2018-01-20iOS, remove double [bootstrap]jan Iversen
2018-01-18iOS, directory creation as part of setupjan Iversen
2018-01-18iOS, avoid racing conflict in dependenciesjan Iversen
2018-01-14iOS, typojan Iversen
2018-01-14iOS, static library depeneds on setupjan Iversen
2018-01-13iOS, Correct BRAND_* in rcjan Iversen
2018-01-12iOS, add .py dependency to native-code.hjan Iversen
2018-01-10iOS, corrected path in LOjan Iversen
2018-01-10iOS, catch library changes in makejan Iversen
2018-01-04iOS added BRAND_* to fundamentalrcjan Iversen
2017-11-25iOS, remove app xcconfigjan Iversen
2017-11-24iOS .mk naming conventions.jan Iversen
2017-11-23iOS, do not use different C compilersjan Iversen