2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2013-03-20 18:29:12 +01:00
|
|
|
|
2013-11-05 02:17:53 +01:00
|
|
|
#ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCCELL_HXX
|
|
|
|
#define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCCELL_HXX
|
2010-02-02 15:11:26 +01:00
|
|
|
|
2002-04-11 12:42:31 +00:00
|
|
|
#include "acccontext.hxx"
|
2003-04-24 15:10:00 +00:00
|
|
|
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
|
2017-10-06 19:07:48 +03:00
|
|
|
#include "accselectionhelper.hxx"
|
2002-05-24 12:40:29 +00:00
|
|
|
|
2015-11-25 06:03:10 -05:00
|
|
|
class SwCellFrame;
|
2013-11-29 13:03:27 +00:00
|
|
|
class SwAccessibleTable;
|
2015-05-20 13:05:49 +02:00
|
|
|
class SwFrameFormat;
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2002-05-24 12:40:29 +00:00
|
|
|
class SwAccessibleCell : public SwAccessibleContext,
|
2016-01-11 13:01:53 +01:00
|
|
|
public css::accessibility::XAccessibleValue,
|
|
|
|
public css::accessibility::XAccessibleSelection,
|
2015-11-06 10:51:51 +02:00
|
|
|
public css::accessibility::XAccessibleExtendedAttributes
|
2002-04-11 12:42:31 +00:00
|
|
|
{
|
2013-11-29 13:03:27 +00:00
|
|
|
// Implementation for XAccessibleSelection interface
|
2017-01-23 09:12:12 +01:00
|
|
|
SwAccessibleSelectionHelper m_aSelectionHelper;
|
|
|
|
bool m_bIsSelected; // protected by base class mutex
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2014-04-25 14:00:35 +02:00
|
|
|
bool IsSelected();
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2016-04-22 10:08:07 +02:00
|
|
|
bool InvalidateMyCursorPos();
|
|
|
|
bool InvalidateChildrenCursorPos( const SwFrame *pFrame );
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2013-12-02 14:45:36 +01:00
|
|
|
rtl::Reference<SwAccessibleTable> m_pAccTable;
|
|
|
|
|
2002-04-11 12:42:31 +00:00
|
|
|
protected:
|
|
|
|
// Set states for getAccessibleStateSet.
|
2014-04-11 08:21:34 +02:00
|
|
|
// This derived class additionally sets SELECTABLE(1) and SELECTED(+)
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) override;
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2016-04-22 10:08:07 +02:00
|
|
|
virtual void InvalidateCursorPos_() override;
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SwAccessibleCell() override;
|
2002-04-11 12:42:31 +00:00
|
|
|
|
|
|
|
public:
|
2017-03-24 13:04:32 +01:00
|
|
|
SwAccessibleCell(std::shared_ptr<SwAccessibleMap> const& pInitMap,
|
|
|
|
const SwCellFrame *pCellFrame);
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool HasCursor() override; // required by map to remember that object
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2013-03-16 23:54:23 +01:00
|
|
|
// XAccessibleContext
|
2002-04-11 12:42:31 +00:00
|
|
|
|
|
|
|
/// Return this object's description.
|
2013-04-07 12:06:47 +02:00
|
|
|
virtual OUString SAL_CALL
|
2017-01-26 12:28:58 +01:00
|
|
|
getAccessibleDescription() override;
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2013-03-16 23:54:23 +01:00
|
|
|
// XServiceInfo
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2013-03-16 23:54:23 +01:00
|
|
|
// Returns an identifier for the implementation of this object.
|
2013-04-07 12:06:47 +02:00
|
|
|
virtual OUString SAL_CALL
|
2017-01-26 12:28:58 +01:00
|
|
|
getImplementationName() override;
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2013-03-16 23:54:23 +01:00
|
|
|
// Return whether the specified service is supported by this class.
|
2002-04-11 12:42:31 +00:00
|
|
|
virtual sal_Bool SAL_CALL
|
2017-01-26 12:28:58 +01:00
|
|
|
supportsService (const OUString& sServiceName) override;
|
2002-04-11 12:42:31 +00:00
|
|
|
|
2013-03-16 23:54:23 +01:00
|
|
|
// Returns a list of all supported services. In this case that is just
|
|
|
|
// the AccessibleContext service.
|
2015-11-06 10:51:51 +02:00
|
|
|
virtual css::uno::Sequence< OUString> SAL_CALL
|
2017-01-26 12:28:58 +01:00
|
|
|
getSupportedServiceNames() override;
|
2002-04-17 13:07:39 +00:00
|
|
|
|
2016-08-18 14:34:31 +02:00
|
|
|
virtual void Dispose(bool bRecursive, bool bCanSkipInvisible = true) override;
|
2002-04-17 13:07:39 +00:00
|
|
|
|
2015-11-25 06:03:10 -05:00
|
|
|
virtual void InvalidatePosOrSize( const SwRect& rFrame ) override;
|
2002-05-24 12:40:29 +00:00
|
|
|
|
2013-03-16 23:54:23 +01:00
|
|
|
// XInterface
|
2002-05-24 12:40:29 +00:00
|
|
|
|
|
|
|
// (XInterface methods need to be implemented to disambiguate
|
2017-01-07 08:59:09 +01:00
|
|
|
// between those inherited through SwAccessibleContext and
|
2002-05-24 12:40:29 +00:00
|
|
|
// XAccessibleValue).
|
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
|
2002-05-24 12:40:29 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL acquire( ) throw () override
|
2002-05-24 12:40:29 +00:00
|
|
|
{ SwAccessibleContext::acquire(); };
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL release( ) throw () override
|
2002-05-24 12:40:29 +00:00
|
|
|
{ SwAccessibleContext::release(); };
|
|
|
|
|
2013-03-16 23:54:23 +01:00
|
|
|
// XTypeProvider
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
|
|
|
|
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
|
2002-08-07 12:32:17 +00:00
|
|
|
|
2013-03-16 23:54:23 +01:00
|
|
|
// XAccessibleValue
|
2002-05-24 12:40:29 +00:00
|
|
|
|
2014-04-21 19:28:47 -04:00
|
|
|
// XAccessibleExtendedAttributes
|
2017-01-26 12:28:58 +01:00
|
|
|
css::uno::Any SAL_CALL getExtendedAttributes() override ;
|
2002-05-24 12:40:29 +00:00
|
|
|
private:
|
2015-05-20 13:05:49 +02:00
|
|
|
SwFrameFormat* GetTableBoxFormat() const;
|
2002-05-24 12:40:29 +00:00
|
|
|
|
|
|
|
public:
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Any SAL_CALL getCurrentValue( ) override;
|
2002-05-24 12:40:29 +00:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) override;
|
2002-05-24 12:40:29 +00:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Any SAL_CALL getMaximumValue( ) override;
|
2002-05-24 12:40:29 +00:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Any SAL_CALL getMinimumValue( ) override;
|
2014-04-21 19:28:47 -04:00
|
|
|
// XAccessibleComponent
|
2017-01-26 12:28:58 +01:00
|
|
|
sal_Int32 SAL_CALL getBackground() override;
|
2013-11-29 13:03:27 +00:00
|
|
|
|
2014-04-21 19:28:47 -04:00
|
|
|
// XAccessibleSelection
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) override;
|
|
|
|
|
|
|
|
virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) override;
|
|
|
|
virtual void SAL_CALL clearAccessibleSelection( ) override;
|
|
|
|
virtual void SAL_CALL selectAllAccessibleChildren( ) override;
|
|
|
|
virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) override;
|
2015-11-06 10:51:51 +02:00
|
|
|
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
|
2017-01-26 12:28:58 +01:00
|
|
|
sal_Int32 nSelectedChildIndex ) override;
|
2013-11-29 13:03:27 +00:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
|
2002-04-11 12:42:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|