/* -*- 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 .
*/ #pragma once
class SwAccessibleParagraph; class SwViewShell; class SwFrame; class SwTextFrame; class SwPageFrame; class SwAccessibleContext; class SwAccessibleEventList_Impl; class SwAccessibleEventMap_Impl; class SdrObject; namespace accessibility { class AccessibleShape; } class SwAccessibleShapeMap_Impl; struct SwAccessibleEvent_Impl; class SwAccessibleSelectedParas_Impl; class SwRect; class MapMode; class SwAccPreviewData; class SwFEShell; class Fraction; struct PreviewPage; namespace vcl { class Window; } namespace com::sun::star::accessibility { class XAccessible; }
enumclass AccessibleStates
{
NONE = 0x0000, // real states for events
EDITABLE = 0x0001,
OPAQUE = 0x0002, // pseudo states for events
TEXT_ATTRIBUTE_CHANGED = 0x0200,
TEXT_SELECTION_CHANGED = 0x0100,
CARET = 0x0080,
RELATION_FROM = 0x0040,
RELATION_TO = 0x0020,
}; namespace o3tl
{ template<> struct typed_flags<AccessibleStates> : is_typed_flags<AccessibleStates, 0x3e3> {};
}
using SwAccessibleContextMap
= std::unordered_map<const SwFrame*, unotools::WeakReference<SwAccessibleContext>>;
class SwAccessibleMap final : public ::accessibility::IAccessibleViewForwarder, public ::accessibility::IAccessibleParent
, public std::enable_shared_from_this<SwAccessibleMap>
{
::osl::Mutex maEventMutex;
SwAccessibleContextMap maFrameMap;
std::unique_ptr<SwAccessibleShapeMap_Impl> mpShapeMap;
// The shape list is filled if an accessible shape is destroyed. It // simply keeps a reference to the accessible shape's XShape. These // references are destroyed within the EndAction when firing events. // There are two reason for this. First of all, a new accessible shape // for the XShape might be created soon. It's then cheaper if the XShape // still exists. The other reason are situations where an accessible shape // is destroyed within an SwFrameFormat::SwClientNotify. In this case, destroying // the XShape at the same time (indirectly by destroying the accessible // shape) leads to an assert, because a client of the Modify is destroyed // within a Modify call.
std::vector<css::uno::Reference<css::drawing::XShape>> mvShapes;
// Para Container for InvalidateCursorPosition
o3tl::sorted_vector<SwAccessibleParagraph*> m_setParaAdd;
o3tl::sorted_vector<SwAccessibleParagraph*> m_setParaRemove;
// #i27301 data structure to keep information about // accessible paragraph, which have a selection.
std::unique_ptr<SwAccessibleSelectedParas_Impl> mpSelectedParas;
SwViewShell& m_rViewShell; /// for page preview: store preview data, VisArea, and mapping of /// preview-to-display coordinates
std::unique_ptr<SwAccPreviewData> mpPreview;
// Dispose frame and its children if bRecursive is set void A11yDispose( const SwFrame* pFrame, const SdrObject* pObj,
vcl::Window* pWindow, bool bRecursive = false, bool bCanSkipInvisible = true );
// Invalidate state of whole tree. If an action is open, this call // is processed when the last action ends. void InvalidateEditableStates( const SwFrame* _pFrame );
// additional Core/Pixel conversions for internal use; also works // for preview
Point PixelToCore (const Point& rPoint) const;
tools::Rectangle CoreToPixel (const SwRect& rRect) const;
// is there a known accessibility impl cached for the frame bool Contains(const SwFrame *pFrame) const;
private: /** get mapping mode for LogicToPixel and PixelToLogic conversions
Replacement method <PreviewAdjust(..)> by new method <GetMapMode>. Method returns mapping mode of current output device and adjusts it, if the shell is in page/print preview. Necessary, because <PreviewAdjust(..)> changes mapping mode at current output device for mapping logic document positions to page preview window positions and vice versa and doesn't take care to recover its changes.
@param _rPoint input parameter - constant reference to point to determine the mapping mode adjustments for page/print preview.
@return mapping mode, which is determined by the method
*/
MapMode GetMapMode(const Point& _rPoint) const; public: virtualbool IsDocumentSelAll() override;
};
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.