LibreOffice Module accessibility (master) 1
textwindowaccessibility.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
23#include <svl/lstner.hxx>
24#include <vcl/textdata.hxx>
25#include <vcl/texteng.hxx>
26#include <vcl/textview.hxx>
27#include <vcl/window.hxx>
28#include <com/sun/star/uno/Reference.hxx>
29#include <com/sun/star/accessibility/AccessibleScrollType.hpp>
30#include <com/sun/star/accessibility/XAccessible.hpp>
31#include <com/sun/star/accessibility/XAccessibleContext.hpp>
32#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
33#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
34#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
35#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
36#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
41#include <rtl/ref.hxx>
42
44#include <queue>
45#include <memory>
46#include <unordered_map>
47
48class TextEngine;
49class TextView;
50
51namespace accessibility
52{
53
54class Document;
55
57{
58public:
60 m_rListener(rListener), m_pNotifier(nullptr) {}
61
63
64 // Not thread safe:
65 void startListening(::SfxBroadcaster & rNotifier);
66
67 // Not thread safe:
68 void endListening();
69
70private:
73};
74
76{
77public:
79 m_aListener(rListener), m_pNotifier(nullptr) {}
80
82
83 // Not thread safe:
84 void startListening(vcl::Window & rNotifier);
85
86 // Not thread safe:
87 void endListening();
88
89private:
92};
93
95{
96public:
97 ParagraphInfo(::sal_Int32 nHeight): m_nHeight(nHeight) {}
98
99 css::uno::WeakReference< css::accessibility::XAccessible > const &
100 getParagraph() const { return m_xParagraph; }
101
102 ::sal_Int32 getHeight() const { return m_nHeight; }
103
105 css::uno::Reference< css::accessibility::XAccessible > const &
106 rParagraph) { m_xParagraph = rParagraph; }
107
108 void changeHeight(::sal_Int32 nHeight) { m_nHeight = nHeight; }
109
110private:
111 css::uno::WeakReference< css::accessibility::XAccessible >
113 ::sal_Int32 m_nHeight;
114};
115
116typedef std::vector< ParagraphInfo > Paragraphs;
117
119 css::accessibility::XAccessible,
120 css::accessibility::XAccessibleContext,
121 css::accessibility::XAccessibleComponent,
122 css::accessibility::XAccessibleEditableText,
123 css::accessibility::XAccessibleMultiLineText,
124 css::accessibility::XAccessibleTextAttributes,
125 css::accessibility::XAccessibleEventBroadcaster > ParagraphBase;
126
127// The Paragraph's number is the absolute position within the text engine (from
128// 0 to N - 1), whereas the Paragraph's index is the position within the text
129// view/accessible parent (from 0 to M - 1). Paragraphs outside the currently
130// visible range have an index of -1.
131class Paragraph final:
133{
134public:
136 Paragraphs::size_type nNumber);
137
138 // Not thread-safe.
139 Paragraphs::size_type getNumber() const { return m_nNumber; }
140
141 // Not thread-safe.
142 void numberChanged(bool bIncremented);
143
144 // Not thread-safe.
145 void textChanged();
146
147 // Thread-safe.
148 void notifyEvent(::sal_Int16 nEventId, css::uno::Any const & rOldValue,
149 css::uno::Any const & rNewValue);
150
151private:
152 // OCommonAccessibleText
153 virtual void implGetParagraphBoundary( const OUString& rText,
154 css::i18n::Boundary& rBoundary,
155 ::sal_Int32 nIndex ) override;
156 virtual void implGetLineBoundary( const OUString& rText,
157 css::i18n::Boundary& rBoundary,
158 ::sal_Int32 nIndex ) override;
159
160 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
161 SAL_CALL getAccessibleContext() override;
162
163 virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
164
165 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
166 getAccessibleChild(sal_Int64 i) override;
167
168 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
169 getAccessibleParent() override;
170
171 virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
172
173 virtual ::sal_Int16 SAL_CALL getAccessibleRole() override;
174
175 virtual OUString SAL_CALL getAccessibleDescription() override;
176
177 virtual OUString SAL_CALL getAccessibleName() override;
178
179 virtual
180 css::uno::Reference< css::accessibility::XAccessibleRelationSet >
181 SAL_CALL getAccessibleRelationSet() override;
182
183 virtual sal_Int64 SAL_CALL getAccessibleStateSet() override;
184
185 virtual css::lang::Locale SAL_CALL getLocale() override;
186
187 virtual sal_Bool SAL_CALL containsPoint(css::awt::Point const & rPoint) override;
188
189 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
190 getAccessibleAtPoint(css::awt::Point const & rPoint) override;
191
192 virtual css::awt::Rectangle SAL_CALL getBounds() override;
193
194 virtual css::awt::Point SAL_CALL getLocation() override;
195
196 virtual css::awt::Point SAL_CALL getLocationOnScreen() override;
197
198 virtual css::awt::Size SAL_CALL getSize() override;
199
200 virtual void SAL_CALL grabFocus() override;
201
202 virtual sal_Int32 SAL_CALL getForeground() override;
203
204 virtual sal_Int32 SAL_CALL getBackground() override;
205
206 virtual ::sal_Int32 SAL_CALL getCaretPosition() override;
207
208 virtual sal_Bool SAL_CALL setCaretPosition(::sal_Int32 nIndex) override;
209
210 virtual ::sal_Unicode SAL_CALL getCharacter(::sal_Int32 nIndex) override;
211
212 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
213 getCharacterAttributes(::sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) override;
214
215 virtual css::awt::Rectangle SAL_CALL
216 getCharacterBounds(::sal_Int32 nIndex) override;
217
218 virtual ::sal_Int32 SAL_CALL getCharacterCount() override;
219
220 virtual ::sal_Int32 SAL_CALL
221 getIndexAtPoint(css::awt::Point const & rPoint) override;
222
223 virtual OUString SAL_CALL getSelectedText() override;
224
225 virtual ::sal_Int32 SAL_CALL getSelectionStart() override;
226
227 virtual ::sal_Int32 SAL_CALL getSelectionEnd() override;
228
229 virtual sal_Bool SAL_CALL setSelection(::sal_Int32 nStartIndex,
230 ::sal_Int32 nEndIndex) override;
231
232 virtual sal_Bool SAL_CALL scrollSubstringTo( sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override;
233
234 virtual OUString SAL_CALL getText() override;
235
236 virtual OUString SAL_CALL getTextRange(::sal_Int32 nStartIndex,
237 ::sal_Int32 nEndIndex) override;
238
239 virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
240 virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
241 virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
242
243 virtual sal_Bool SAL_CALL copyText(::sal_Int32 nStartIndex,
244 ::sal_Int32 nEndIndex) override;
245
246 virtual sal_Bool SAL_CALL cutText(::sal_Int32 nStartIndex,
247 ::sal_Int32 nEndIndex) override;
248
249 virtual sal_Bool SAL_CALL pasteText(::sal_Int32 nIndex) override;
250
251 virtual sal_Bool SAL_CALL deleteText(::sal_Int32 nStartIndex,
252 ::sal_Int32 nEndIndex) override;
253
254 virtual sal_Bool SAL_CALL insertText(OUString const & rText,
255 ::sal_Int32 nIndex) override;
256
257 virtual sal_Bool SAL_CALL replaceText(
258 ::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
259 OUString const & rReplacement) override;
260
261 virtual sal_Bool SAL_CALL setAttributes(
262 ::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
263 css::uno::Sequence< css::beans::PropertyValue > const &
264 rAttributeSet) override;
265
266 virtual sal_Bool SAL_CALL setText(OUString const & rText) override;
267
268 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
269 getDefaultAttributes(const css::uno::Sequence< OUString >& RequestedAttributes) override;
270
271 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
272 getRunAttributes(::sal_Int32 Index, const css::uno::Sequence< OUString >& RequestedAttributes) override;
273
274 virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) override;
275
276 virtual css::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) override;
277
278 virtual css::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( ) override;
279
280 virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( ) override;
281
282 virtual void SAL_CALL addAccessibleEventListener(
283 css::uno::Reference<
284 css::accessibility::XAccessibleEventListener > const & rListener) override;
285
286 virtual void SAL_CALL removeAccessibleEventListener(
287 css::uno::Reference<
288 css::accessibility::XAccessibleEventListener > const & rListener) override;
289
290 virtual void SAL_CALL disposing() override;
291
292 virtual OUString implGetText() override;
293
294 virtual css::lang::Locale implGetLocale() override;
295
296 virtual void implGetSelection(::sal_Int32 & rStartIndex,
297 ::sal_Int32 & rEndIndex) override;
298
299 // Throws css::lang::DisposedException:
300 void checkDisposed();
301
303 Paragraphs::size_type m_nNumber;
304
306 sal_uInt32 m_nClientId;
307
309};
310
311
312typedef std::unordered_map< OUString,
313 css::beans::PropertyValue > tPropValMap;
314
315class Document final : public ::VCLXAccessibleComponent, public ::SfxListener
316{
317public:
318 Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine,
319 ::TextView & rView);
320
321 const css::uno::Reference< css::accessibility::XAccessible >&
322 getAccessible() const { return m_xAccessible; }
323
324 // Must be called only after init has been called.
325 css::lang::Locale retrieveLocale();
326
327 // Must be called only after init has been called.
328 // To make it possible for this method to be (indirectly) called from
329 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
330 // still zero), pass a "Paragraph const *" instead of a
331 // "::rtl::Reference< Paragraph > const &".
332 ::sal_Int32 retrieveParagraphIndex(Paragraph const * pParagraph);
333
334 // Must be called only after init has been called.
335 // To make it possible for this method to be (indirectly) called from
336 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
337 // still zero), pass a "Paragraph const *" instead of a
338 // "::rtl::Reference< Paragraph > const &".
339 ::sal_Int64 retrieveParagraphState(Paragraph const * pParagraph);
340
341 // Must be called only after init has been called.
342 // To make it possible for this method to be (indirectly) called from
343 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
344 // still zero), pass a "Paragraph const &" instead of a
345 // "::rtl::Reference< Paragraph > const &".
346 css::awt::Rectangle
347 retrieveParagraphBounds(Paragraph const * pParagraph, bool bAbsolute);
348
349 // Must be called only after init has been called.
350 // To make it possible for this method to be (indirectly) called from
351 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
352 // still zero), pass a "Paragraph const &" instead of a
353 // "::rtl::Reference< Paragraph > const &".
354 OUString retrieveParagraphText(Paragraph const * pParagraph);
355
356 // Must be called only after init has been called.
357 // To make it possible for this method to be (indirectly) called from
358 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
359 // still zero), pass a "Paragraph const &" instead of a
360 // "::rtl::Reference< Paragraph > const &".
361 void retrieveParagraphSelection(Paragraph const * pParagraph,
362 ::sal_Int32 * pBegin, ::sal_Int32 * pEnd);
363
364 // Must be called only after init has been called.
365 // To make it possible for this method to be (indirectly) called from
366 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
367 // still zero), pass a "Paragraph const *" instead of a
368 // "::rtl::Reference< Paragraph > const &".
369 ::sal_Int32 retrieveParagraphCaretPosition(Paragraph const * pParagraph);
370
371 // Must be called only after init has been called.
372 // To make it possible for this method to be (indirectly) called from
373 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
374 // still zero), pass a "Paragraph const &" instead of a
375 // "::rtl::Reference< Paragraph > const &".
376 // Throws css::lang::IndexOutOfBoundsException.
377 css::awt::Rectangle
378 retrieveCharacterBounds(Paragraph const * pParagraph,
379 ::sal_Int32 nIndex);
380
381 // Must be called only after init has been called.
382 // To make it possible for this method to be (indirectly) called from
383 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
384 // still zero), pass a "Paragraph const &" instead of a
385 // "::rtl::Reference< Paragraph > const &".
386 ::sal_Int32 retrieveCharacterIndex(Paragraph const * pParagraph,
387 css::awt::Point const & rPoint);
388
389 // Must be called only after init has been called.
390 // To make it possible for this method to be (indirectly) called from
391 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
392 // still zero), pass a "Paragraph const &" instead of a
393 // "::rtl::Reference< Paragraph > const &".
394 // Throws css::lang::IndexOutOfBoundsException.
395 css::uno::Sequence< css::beans::PropertyValue > retrieveCharacterAttributes(
396 Paragraph const * pParagraph, ::sal_Int32 nIndex,
397 const css::uno::Sequence< OUString >& aRequestedAttributes);
398
399 // Must be called only after init has been called.
400 // To make it possible for this method to be (indirectly) called from
401 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
402 // still zero), pass a "Paragraph const &" instead of a
403 // "::rtl::Reference< Paragraph > const &".
404 // Throws css::lang::IndexOutOfBoundsException.
405 css::uno::Sequence< css::beans::PropertyValue > retrieveRunAttributes(
406 Paragraph const * pParagraph, ::sal_Int32 Index,
407 const css::uno::Sequence< OUString >& RequestedAttributes);
408
409 // Must be called only after init has been called.
410 // To make it possible for this method to be (indirectly) called from
411 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
412 // still zero), pass a "Paragraph const &" instead of a
413 // "::rtl::Reference< Paragraph > const &".
414 void changeParagraphText(Paragraph const * pParagraph,
415 OUString const & rText);
416
417 // Must be called only after init has been called.
418 // To make it possible for this method to be (indirectly) called from
419 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
420 // still zero), pass a "Paragraph const &" instead of a
421 // "::rtl::Reference< Paragraph > const &".
422 // Throws css::lang::IndexOutOfBoundsException.
423 void changeParagraphText(Paragraph const * pParagraph, ::sal_Int32 nBegin,
424 ::sal_Int32 nEnd, bool bCut, bool bPaste,
425 OUString const & rText);
426
427 // Must be called only after init has been called.
428 // To make it possible for this method to be (indirectly) called from
429 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
430 // still zero), pass a "Paragraph const &" instead of a
431 // "::rtl::Reference< Paragraph > const &".
432 // Throws css::lang::IndexOutOfBoundsException.
433 void copyParagraphText(Paragraph const * pParagraph,
434 ::sal_Int32 nBegin, ::sal_Int32 nEnd);
435
436 // Must be called only after init has been called.
437 // To make it possible for this method to be (indirectly) called from
438 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
439 // still zero), pass a "Paragraph const &" instead of a
440 // "::rtl::Reference< Paragraph > const &".
441 // Throws css::lang::IndexOutOfBoundsException.
443 Paragraph const * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd,
444 css::uno::Sequence< css::beans::PropertyValue > const &
445 rAttributeSet);
446
447 // Must be called only after init has been called.
448 // To make it possible for this method to be (indirectly) called from
449 // within Paragraph's constructor (i.e., when the Paragraph's ref count is
450 // still zero), pass a "Paragraph const &" instead of a
451 // "::rtl::Reference< Paragraph > const &".
452 // Throws css::lang::IndexOutOfBoundsException.
453 void changeParagraphSelection(Paragraph const * pParagraph,
454 ::sal_Int32 nBegin, ::sal_Int32 nEnd);
455
456 css::i18n::Boundary
457 retrieveParagraphLineBoundary( Paragraph const * pParagraph,
458 ::sal_Int32 nIndex, ::sal_Int32 *pLineNo);
459
460 css::i18n::Boundary
461 retrieveParagraphBoundaryOfLine( Paragraph const * pParagraph,
462 ::sal_Int32 nIndex );
463
464 sal_Int32 retrieveParagraphLineWithCursor( Paragraph const * pParagraph );
465
466 css::uno::Reference< css::accessibility::XAccessibleRelationSet >
467 retrieveParagraphRelationSet( Paragraph const * pParagraph );
468
469private:
470 virtual sal_Int64 SAL_CALL getAccessibleChildCount() override;
471
472 virtual css::uno::Reference< css::accessibility::XAccessible >
473 SAL_CALL getAccessibleChild(sal_Int64 i) override;
474
475 virtual ::sal_Int16 SAL_CALL getAccessibleRole() override;
476
477 virtual css::uno::Reference< css::accessibility::XAccessible >
478 SAL_CALL getAccessibleAtPoint(css::awt::Point const & rPoint) override;
479
480 virtual void FillAccessibleStateSet( sal_Int64& rStateSet ) override;
481 virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) override;
482
483 // ??? Will be called with both the external (Solar) and internal mutex
484 // locked:
485 virtual void SAL_CALL disposing() override;
486
487 // ??? Will be called with the external (Solar) mutex locked.
488 // init will already have been called.
489 virtual void Notify(::SfxBroadcaster & rBC, ::SfxHint const & rHint) override;
490
491 // Assuming that this will only be called with the external (Solar) mutex
492 // locked.
493 // init will already have been called.
494 DECL_LINK(WindowEventHandler, VclWindowEvent&, void);
495
496 // Must be called with both the external (Solar) and internal mutex
497 // locked.
498 void init();
499
500 // Must be called with both the external (Solar) and internal mutex
501 // locked, and after init has been called:
502 static ::rtl::Reference< Paragraph >
503 getParagraph(Paragraphs::iterator const & rIt);
504
505 // Must be called with both the external (Solar) and internal mutex
506 // locked, and after init has been called.
507 // Throws css::uno::RuntimeException.
508 css::uno::Reference< css::accessibility::XAccessible >
509 getAccessibleChild(Paragraphs::iterator const & rIt);
510
511 // Must be called with both the external (Solar) and internal mutex
512 // locked, and after init has been called:
514
515 // Must be called with both the external (Solar) and internal mutex
516 // locked, and after init has been called:
518 Paragraphs::iterator const & rOldVisibleBegin,
519 Paragraphs::iterator const & rOldVisibleEnd,
520 Paragraphs::iterator const & rInserted);
521
522 // Must be called with both the external (Solar) and internal mutex
523 // locked, and after init has been called:
524 void changeParagraphText(::sal_uInt32 nNumber, ::sal_uInt16 nBegin, ::sal_uInt16 nEnd,
525 bool bCut, bool bPaste,
526 OUString const & rText);
527
528 void
530
532
533 void sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId);
534
535 void disposeParagraphs();
536
537 static css::uno::Any mapFontColor(::Color const & rColor);
538
539 static ::Color mapFontColor(css::uno::Any const & rColor);
540
541 static css::uno::Any mapFontWeight(::FontWeight nWeight);
542
543 static ::FontWeight mapFontWeight(css::uno::Any const & rWeight);
544
546 Paragraph const * pParagraph, ::sal_Int32 Index,
547 const css::uno::Sequence< OUString >& RequestedAttributes,
548 tPropValMap& rRunAttrSeq);
549
550 css::uno::Reference< css::accessibility::XAccessible > m_xAccessible;
553
556
557 // All the following members have valid values only after calling init:
558
559 std::unique_ptr< Paragraphs > m_xParagraphs;
560
561 // m_nViewOffset is from the start of the document (0) to the start of the
562 // current view, and m_nViewHeight is the height of the view:
563 ::sal_Int32 m_nViewOffset;
564 ::sal_Int32 m_nViewHeight;
565
566 // m_aVisibleBegin points to the first Paragraph that is (partially)
567 // contained in the view, and m_aVisibleEnd points past the last Paragraph
568 // that is (partially) contained. If no Paragraphs are (partially) in the
569 // view, both m_aVisibleBegin and m_aVisibleEnd are set to
570 // m_xParagraphs->end(). These values are only changed by
571 // determineVisibleRange.
572 Paragraphs::iterator m_aVisibleBegin;
573 Paragraphs::iterator m_aVisibleEnd;
574
575 // m_nVisibleBeginOffset is from m_nViewOffset back to the start of the
576 // Paragraph pointed to by m_aVisibleBegin (and always has a non-negative
577 // value). If m_aVisibleBegin == m_xParagraphs->end(),
578 // m_nVisibleBeginOffset is set to 0. These values are only changed by
579 // determineVisibleRange.
581
582 // If no selection has yet been set, all the following four variables are
583 // set to -1. m_nSelectionLastPara/Pos is also the cursor position.
588
589 Paragraphs::iterator m_aFocused;
590
591 std::queue< ::TextHint > m_aParagraphNotifications;
593};
594
595}
596
597
598/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
css::uno::Sequence< css::beans::PropertyValue > retrieveCharacterAttributes(Paragraph const *pParagraph, ::sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes)
void notifyVisibleRangeChanges(Paragraphs::iterator const &rOldVisibleBegin, Paragraphs::iterator const &rOldVisibleEnd, Paragraphs::iterator const &rInserted)
void copyParagraphText(Paragraph const *pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd)
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(css::awt::Point const &rPoint) override
css::awt::Rectangle retrieveParagraphBounds(Paragraph const *pParagraph, bool bAbsolute)
virtual void Notify(::SfxBroadcaster &rBC, ::SfxHint const &rHint) override
void retrieveParagraphSelection(Paragraph const *pParagraph, ::sal_Int32 *pBegin, ::sal_Int32 *pEnd)
void retrieveRunAttributesImpl(Paragraph const *pParagraph, ::sal_Int32 Index, const css::uno::Sequence< OUString > &RequestedAttributes, tPropValMap &rRunAttrSeq)
static css::uno::Any mapFontColor(::Color const &rColor)
::sal_Int32 retrieveCharacterIndex(Paragraph const *pParagraph, css::awt::Point const &rPoint)
Paragraphs::iterator m_aVisibleBegin
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual ::sal_Int16 SAL_CALL getAccessibleRole() override
::sal_Int64 retrieveParagraphState(Paragraph const *pParagraph)
void changeParagraphText(Paragraph const *pParagraph, OUString const &rText)
::sal_Int32 retrieveParagraphIndex(Paragraph const *pParagraph)
css::i18n::Boundary retrieveParagraphLineBoundary(Paragraph const *pParagraph, ::sal_Int32 nIndex, ::sal_Int32 *pLineNo)
virtual void SAL_CALL disposing() override
void changeParagraphSelection(Paragraph const *pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd)
virtual void FillAccessibleRelationSet(utl::AccessibleRelationSetHelper &rRelationSet) override
sal_Int32 retrieveParagraphLineWithCursor(Paragraph const *pParagraph)
const css::uno::Reference< css::accessibility::XAccessible > & getAccessible() const
void changeParagraphAttributes(Paragraph const *pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd, css::uno::Sequence< css::beans::PropertyValue > const &rAttributeSet)
static css::uno::Any mapFontWeight(::FontWeight nWeight)
void sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId)
Paragraphs::iterator m_aVisibleEnd
css::uno::Sequence< css::beans::PropertyValue > retrieveRunAttributes(Paragraph const *pParagraph, ::sal_Int32 Index, const css::uno::Sequence< OUString > &RequestedAttributes)
virtual void FillAccessibleStateSet(sal_Int64 &rStateSet) override
DECL_LINK(WindowEventHandler, VclWindowEvent &, void)
css::awt::Rectangle retrieveCharacterBounds(Paragraph const *pParagraph, ::sal_Int32 nIndex)
::sal_Int32 retrieveParagraphCaretPosition(Paragraph const *pParagraph)
Document(::VCLXWindow *pVclXWindow, ::TextEngine &rEngine, ::TextView &rView)
static ::rtl::Reference< Paragraph > getParagraph(Paragraphs::iterator const &rIt)
std::unique_ptr< Paragraphs > m_xParagraphs
css::uno::Reference< css::accessibility::XAccessible > m_xAccessible
css::i18n::Boundary retrieveParagraphBoundaryOfLine(Paragraph const *pParagraph, ::sal_Int32 nIndex)
css::uno::Reference< css::accessibility::XAccessibleRelationSet > retrieveParagraphRelationSet(Paragraph const *pParagraph)
OUString retrieveParagraphText(Paragraph const *pParagraph)
std::queue< ::TextHint > m_aParagraphNotifications
void setParagraph(css::uno::Reference< css::accessibility::XAccessible > const &rParagraph)
css::uno::WeakReference< css::accessibility::XAccessible > const & getParagraph() const
void changeHeight(::sal_Int32 nHeight)
css::uno::WeakReference< css::accessibility::XAccessible > m_xParagraph
virtual sal_Bool SAL_CALL deleteText(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex) override
virtual sal_Bool SAL_CALL scrollSubstringTo(sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual sal_Bool SAL_CALL copyText(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex) override
virtual css::lang::Locale implGetLocale() override
virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual ::sal_Int32 SAL_CALL getSelectionEnd() override
virtual ::sal_Unicode SAL_CALL getCharacter(::sal_Int32 nIndex) override
void numberChanged(bool bIncremented)
virtual OUString implGetText() override
virtual css::awt::Rectangle SAL_CALL getBounds() override
virtual sal_Bool SAL_CALL setCaretPosition(::sal_Int32 nIndex) override
virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
virtual ::sal_Int32 SAL_CALL getCaretPosition() override
virtual void SAL_CALL addAccessibleEventListener(css::uno::Reference< css::accessibility::XAccessibleEventListener > const &rListener) override
virtual css::lang::Locale SAL_CALL getLocale() override
virtual void implGetLineBoundary(const OUString &rText, css::i18n::Boundary &rBoundary, ::sal_Int32 nIndex) override
Paragraphs::size_type getNumber() const
virtual void SAL_CALL grabFocus() override
virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Bool SAL_CALL setText(OUString const &rText) override
sal_uInt32 m_nClientId
client id in the AccessibleEventNotifier queue
virtual sal_Bool SAL_CALL replaceText(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex, OUString const &rReplacement) override
virtual ::sal_Int32 SAL_CALL getIndexAtPoint(css::awt::Point const &rPoint) override
virtual void implGetParagraphBoundary(const OUString &rText, css::i18n::Boundary &rBoundary, ::sal_Int32 nIndex) override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual sal_Bool SAL_CALL containsPoint(css::awt::Point const &rPoint) override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
virtual css::awt::Size SAL_CALL getSize() override
virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes(::sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes) override
virtual sal_Bool SAL_CALL setAttributes(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex, css::uno::Sequence< css::beans::PropertyValue > const &rAttributeSet) override
virtual void implGetSelection(::sal_Int32 &rStartIndex, ::sal_Int32 &rEndIndex) override
virtual css::awt::Rectangle SAL_CALL getCharacterBounds(::sal_Int32 nIndex) override
virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex(::sal_Int32 nIndex) override
virtual ::sal_Int32 SAL_CALL getCharacterCount() override
virtual sal_Bool SAL_CALL cutText(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex) override
virtual css::awt::Point SAL_CALL getLocation() override
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
virtual OUString SAL_CALL getText() override
virtual sal_Bool SAL_CALL insertText(OUString const &rText, ::sal_Int32 nIndex) override
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getDefaultAttributes(const css::uno::Sequence< OUString > &RequestedAttributes) override
virtual sal_Bool SAL_CALL pasteText(::sal_Int32 nIndex) override
virtual ::sal_Int32 SAL_CALL getSelectionStart() override
virtual sal_Int32 SAL_CALL getForeground() override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual OUString SAL_CALL getAccessibleName() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(css::awt::Point const &rPoint) override
virtual void SAL_CALL removeAccessibleEventListener(css::uno::Reference< css::accessibility::XAccessibleEventListener > const &rListener) override
::rtl::Reference< Document > m_xDocument
virtual OUString SAL_CALL getTextRange(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex) override
virtual ::sal_Int16 SAL_CALL getAccessibleRole() override
virtual css::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret() override
virtual OUString SAL_CALL getSelectedText() override
virtual sal_Bool SAL_CALL setSelection(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex) override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getRunAttributes(::sal_Int32 Index, const css::uno::Sequence< OUString > &RequestedAttributes) override
virtual css::accessibility::TextSegment SAL_CALL getTextAtLineNumber(::sal_Int32 nLineNo) override
void notifyEvent(::sal_Int16 nEventId, css::uno::Any const &rOldValue, css::uno::Any const &rNewValue)
Paragraph(::rtl::Reference< Document > xDocument, Paragraphs::size_type nNumber)
virtual void SAL_CALL disposing() override
void startListening(::SfxBroadcaster &rNotifier)
SfxListenerGuard(::SfxListener &rListener)
WindowListenerGuard(::Link< VclWindowEvent &, void > const &rListener)
void startListening(vcl::Window &rNotifier)
::Link< VclWindowEvent &, void > m_aListener
std::vector< ParagraphInfo > Paragraphs
::cppu::WeakAggComponentImplHelper7< css::accessibility::XAccessible, css::accessibility::XAccessibleContext, css::accessibility::XAccessibleComponent, css::accessibility::XAccessibleEditableText, css::accessibility::XAccessibleMultiLineText, css::accessibility::XAccessibleTextAttributes, css::accessibility::XAccessibleEventBroadcaster > ParagraphBase
std::unordered_map< OUString, css::beans::PropertyValue > tPropValMap
FontWeight
unsigned char sal_Bool