2010-10-27 12:53:26 +01: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 .
|
|
|
|
*/
|
2002-04-18 16:54:21 +00:00
|
|
|
|
2013-10-23 22:38:46 +02:00
|
|
|
#ifndef INCLUDED_SD_SOURCE_UI_INC_ACCESSIBLEDRAWDOCUMENTVIEW_HXX
|
|
|
|
#define INCLUDED_SD_SOURCE_UI_INC_ACCESSIBLEDRAWDOCUMENTVIEW_HXX
|
2002-04-18 16:54:21 +00:00
|
|
|
|
|
|
|
#include "AccessibleDocumentViewBase.hxx"
|
|
|
|
|
2013-11-28 12:09:19 +00:00
|
|
|
#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
|
|
|
|
|
2002-04-18 16:54:21 +00:00
|
|
|
namespace accessibility {
|
|
|
|
|
2002-04-22 07:32:27 +00:00
|
|
|
/** This class makes draw documents in the general view modes
|
|
|
|
accessible. It passes all shapes on the current draw page to a
|
|
|
|
children manager and additionally creates a new shape that
|
|
|
|
represents the actual draw page.
|
|
|
|
|
|
|
|
Please see the documentation of the base class for further
|
|
|
|
explanations of the individual methods.
|
2002-04-18 16:54:21 +00:00
|
|
|
*/
|
2002-05-08 09:01:33 +00:00
|
|
|
class AccessibleDrawDocumentView :
|
|
|
|
public AccessibleDocumentViewBase
|
2015-10-28 12:01:32 +02:00
|
|
|
,public css::accessibility::XAccessibleGroupPosition
|
2002-04-18 16:54:21 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
//===== internal ========================================================
|
2002-04-22 07:32:27 +00:00
|
|
|
|
2004-01-20 10:26:45 +00:00
|
|
|
AccessibleDrawDocumentView (::sd::Window* pSdWindow,
|
|
|
|
::sd::ViewShell* pViewShell,
|
2015-10-28 12:01:32 +02:00
|
|
|
const css::uno::Reference<css::frame::XController>& rxController,
|
|
|
|
const css::uno::Reference<css::accessibility::XAccessible>& rxParent);
|
2002-04-18 16:54:21 +00:00
|
|
|
|
2015-04-14 12:44:47 +02:00
|
|
|
virtual ~AccessibleDrawDocumentView();
|
2002-04-18 16:54:21 +00:00
|
|
|
|
2002-04-22 07:32:27 +00:00
|
|
|
/** Complete the initialization begun in the constructor.
|
|
|
|
*/
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Init() override;
|
2002-04-22 07:32:27 +00:00
|
|
|
|
2002-04-18 16:54:21 +00:00
|
|
|
//===== IAccessibleViewForwarderListener ================================
|
2002-04-22 07:32:27 +00:00
|
|
|
|
2002-04-18 16:54:21 +00:00
|
|
|
virtual void ViewForwarderChanged (ChangeType aChangeType,
|
2015-10-12 16:04:04 +02:00
|
|
|
const IAccessibleViewForwarder* pViewForwarder) override;
|
2002-04-18 16:54:21 +00:00
|
|
|
|
|
|
|
//===== XAccessibleContext ==============================================
|
|
|
|
|
|
|
|
virtual sal_Int32 SAL_CALL
|
2015-04-14 12:44:47 +02:00
|
|
|
getAccessibleChildCount()
|
2015-10-28 12:01:32 +02:00
|
|
|
throw (css::uno::RuntimeException, std::exception) override;
|
2002-04-18 16:54:21 +00:00
|
|
|
|
2015-10-28 12:01:32 +02:00
|
|
|
virtual css::uno::Reference< css::accessibility::XAccessible> SAL_CALL
|
2007-04-25 13:40:31 +00:00
|
|
|
getAccessibleChild (sal_Int32 nIndex)
|
2015-10-28 12:01:32 +02:00
|
|
|
throw (css::uno::RuntimeException,
|
|
|
|
css::lang::IndexOutOfBoundsException, std::exception) override;
|
2002-04-18 16:54:21 +00:00
|
|
|
|
2013-11-28 12:09:19 +00:00
|
|
|
virtual OUString SAL_CALL
|
2015-04-14 12:44:47 +02:00
|
|
|
getAccessibleName()
|
2015-10-28 12:01:32 +02:00
|
|
|
throw (css::uno::RuntimeException, std::exception) override;
|
2002-04-18 16:54:21 +00:00
|
|
|
|
|
|
|
//===== lang::XEventListener ============================================
|
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2015-10-28 12:01:32 +02:00
|
|
|
disposing (const css::lang::EventObject& rEventObject)
|
|
|
|
throw (css::uno::RuntimeException, std::exception) override;
|
2002-04-18 16:54:21 +00:00
|
|
|
|
|
|
|
//===== XPropertyChangeListener =========================================
|
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2015-10-28 12:01:32 +02:00
|
|
|
propertyChange (const css::beans::PropertyChangeEvent& rEventObject)
|
|
|
|
throw (css::uno::RuntimeException, std::exception) override;
|
2013-11-28 12:09:19 +00:00
|
|
|
//===== XInterface ======================================================
|
|
|
|
|
2015-10-28 12:01:32 +02:00
|
|
|
virtual css::uno::Any SAL_CALL
|
|
|
|
queryInterface (const css::uno::Type & rType)
|
|
|
|
throw (css::uno::RuntimeException, std::exception) override;
|
2013-11-28 12:09:19 +00:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2015-04-14 12:44:47 +02:00
|
|
|
acquire()
|
2015-10-12 16:04:04 +02:00
|
|
|
throw () override;
|
2013-11-28 12:09:19 +00:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2015-04-14 12:44:47 +02:00
|
|
|
release()
|
2015-10-12 16:04:04 +02:00
|
|
|
throw () override;
|
2013-11-28 12:09:19 +00:00
|
|
|
|
|
|
|
//===== XAccessibleGroupPosition =========================================
|
2015-10-28 12:01:32 +02:00
|
|
|
virtual css::uno::Sequence< sal_Int32 > SAL_CALL
|
|
|
|
getGroupPosition( const css::uno::Any& rAny )
|
|
|
|
throw (css::uno::RuntimeException,
|
|
|
|
css::lang::IndexOutOfBoundsException, std::exception) override;
|
|
|
|
virtual OUString SAL_CALL getObjectLink( const css::uno::Any& accoject )
|
|
|
|
throw (css::uno::RuntimeException,
|
2015-10-12 16:04:04 +02:00
|
|
|
std::exception) override;
|
2002-04-18 16:54:21 +00:00
|
|
|
|
2002-05-08 09:01:33 +00:00
|
|
|
protected:
|
|
|
|
|
2002-06-28 13:46:44 +00:00
|
|
|
//===== XServiceInfo ====================================================
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
virtual OUString SAL_CALL
|
2015-04-14 12:44:47 +02:00
|
|
|
getImplementationName()
|
2015-10-28 12:01:32 +02:00
|
|
|
throw (css::uno::RuntimeException, std::exception) override;
|
2002-06-28 13:46:44 +00:00
|
|
|
|
2015-10-28 12:01:32 +02:00
|
|
|
virtual css::uno::Sequence< OUString> SAL_CALL
|
2015-04-14 12:44:47 +02:00
|
|
|
getSupportedServiceNames()
|
2015-10-28 12:01:32 +02:00
|
|
|
throw (css::uno::RuntimeException, std::exception) override;
|
2002-06-28 13:46:44 +00:00
|
|
|
|
2014-02-16 22:51:15 +01:00
|
|
|
virtual bool
|
2002-05-08 09:01:33 +00:00
|
|
|
implIsSelected( sal_Int32 nAccessibleChildIndex )
|
2015-10-28 12:01:32 +02:00
|
|
|
throw (css::uno::RuntimeException) override;
|
2002-05-08 09:01:33 +00:00
|
|
|
|
2002-05-17 15:13:13 +00:00
|
|
|
/** Select or deselect the specified child or all children if the given
|
|
|
|
index has the special value ACCESSIBLE_SELECTION_CHILD_ALL.
|
|
|
|
Selecting or deselecting a child sets or resets the
|
2015-09-30 12:15:36 +02:00
|
|
|
<const>SELECTED</const> state and selects or deselects the UNO shape
|
2014-06-29 13:10:56 +02:00
|
|
|
being made accessible by the child.
|
2002-05-17 15:13:13 +00:00
|
|
|
@param nAccessibleChildIndex
|
|
|
|
Index of the child to select or deselect. If the parameter has
|
|
|
|
the value ACCESSIBLE_SELECTION_CHILD_ALL then all children are
|
|
|
|
selected or deslected.
|
|
|
|
@param bSelect
|
|
|
|
Indicates whether to select or deselect the specified child
|
|
|
|
reps. children.
|
|
|
|
*/
|
2002-05-08 09:01:33 +00:00
|
|
|
virtual void
|
2014-07-03 11:51:01 +02:00
|
|
|
implSelect( sal_Int32 nAccessibleChildIndex, bool bSelect )
|
2015-10-28 12:01:32 +02:00
|
|
|
throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException) override;
|
2013-11-28 12:09:19 +00:00
|
|
|
private:
|
|
|
|
::sd::ViewShell* mpSdViewSh;
|
2002-04-18 16:54:21 +00:00
|
|
|
|
|
|
|
protected:
|
2002-04-22 07:32:27 +00:00
|
|
|
/** This object manages the shapes of the represented draw page. It is
|
|
|
|
responsible to determine the visible shapes and create on demand the
|
|
|
|
accessible objects representing them.
|
|
|
|
*/
|
2002-04-18 16:54:21 +00:00
|
|
|
ChildrenManager* mpChildrenManager;
|
|
|
|
|
2002-06-12 11:45:46 +00:00
|
|
|
// This method is called from the component helper base class while
|
|
|
|
// disposing.
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL disposing() override;
|
2002-06-12 11:45:46 +00:00
|
|
|
|
2002-04-22 07:32:27 +00:00
|
|
|
/** Create a shape the represents the page as seen on the screen.
|
2002-04-18 16:54:21 +00:00
|
|
|
*/
|
2015-04-14 12:44:47 +02:00
|
|
|
rtl::Reference<AccessiblePageShape> CreateDrawPageShape();
|
2002-04-18 16:54:21 +00:00
|
|
|
|
2002-04-22 07:32:27 +00:00
|
|
|
/// Create an accessible name that contains the current view mode.
|
2013-04-07 12:06:47 +02:00
|
|
|
virtual OUString
|
2002-04-18 16:54:21 +00:00
|
|
|
CreateAccessibleName ()
|
2015-10-28 12:01:32 +02:00
|
|
|
throw (css::uno::RuntimeException, std::exception) override;
|
2002-04-18 16:54:21 +00:00
|
|
|
|
2002-06-07 07:06:48 +00:00
|
|
|
/** Create an accessible description that contains the current
|
|
|
|
view mode.
|
|
|
|
*/
|
2013-04-07 12:06:47 +02:00
|
|
|
virtual OUString
|
2002-04-18 16:54:21 +00:00
|
|
|
CreateAccessibleDescription ()
|
2015-10-28 12:01:32 +02:00
|
|
|
throw (css::uno::RuntimeException, std::exception) override;
|
2002-06-07 07:06:48 +00:00
|
|
|
|
|
|
|
/** Make sure that the currently focused shape sends a FOCUSED state
|
|
|
|
change event indicating that it has (regained) the focus.
|
|
|
|
*/
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Activated() override;
|
2002-06-07 07:06:48 +00:00
|
|
|
|
|
|
|
/** Make sure that the currently focused shape sends a FOCUSED state
|
|
|
|
change event indicating that it has lost the focus.
|
|
|
|
*/
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Deactivated() override;
|
2008-12-13 09:31:00 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void impl_dispose() override;
|
2009-09-18 15:39:21 +00:00
|
|
|
|
2013-11-28 12:09:19 +00:00
|
|
|
//===== XAccessibleGetAccFromXShape ============================================
|
2015-10-28 12:01:32 +02:00
|
|
|
css::uno::Sequence< css::uno::Any >
|
|
|
|
SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType)
|
|
|
|
throw ( css::uno::RuntimeException, std::exception ) override;
|
|
|
|
css::uno::Reference< css::accessibility::XAccessible >
|
2013-11-28 12:09:19 +00:00
|
|
|
GetSelAccContextInTable();
|
|
|
|
|
2009-09-18 15:39:21 +00:00
|
|
|
private:
|
2015-04-14 12:44:47 +02:00
|
|
|
void UpdateAccessibleName();
|
2002-04-18 16:54:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end of namespace accessibility
|
|
|
|
|
|
|
|
#endif
|
2010-10-27 12:53:26 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|