1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_TEXTMARKUPHELPER_HXX
20 #define INCLUDED_SW_SOURCE_CORE_ACCESS_TEXTMARKUPHELPER_HXX
22 #include <sal/types.h>
23 #include <com/sun/star/uno/Sequence.h>
25 namespace com::sun::star::accessibility
{
29 class SwAccessiblePortionData
;
31 class SwWrongList
; // #i108125#
34 class WrongListIteratorCounter
;
37 class SwTextMarkupHelper
40 SwTextMarkupHelper( const SwAccessiblePortionData
& rPortionData
,
41 const SwTextFrame
& rTextFrame
);
42 SwTextMarkupHelper( const SwAccessiblePortionData
& rPortionData
,
43 const SwWrongList
& rTextMarkupList
); // #i108125#
45 /// @throws css::lang::IllegalArgumentException
46 /// @throws css::uno::RuntimeException
47 sal_Int32
getTextMarkupCount( const sal_Int32 nTextMarkupType
);
49 /// @throws css::lang::IndexOutOfBoundsException
50 /// @throws css::lang::IllegalArgumentException
51 /// @throws css::uno::RuntimeException
52 css::accessibility::TextSegment
getTextMarkup(
53 const sal_Int32 nTextMarkupIndex
,
54 const sal_Int32 nTextMarkupType
);
56 /// @throws css::lang::IndexOutOfBoundsException
57 /// @throws css::lang::IllegalArgumentException
58 /// @throws css::uno::RuntimeException
59 css::uno::Sequence
< css::accessibility::TextSegment
>
60 getTextMarkupAtIndex( const sal_Int32 nCharIndex
,
61 const sal_Int32 nTextMarkupType
);
64 SwTextMarkupHelper( const SwTextMarkupHelper
& ) = delete;
65 SwTextMarkupHelper
& operator=( const SwTextMarkupHelper
& ) = delete;
67 std::unique_ptr
<sw::WrongListIteratorCounter
> getIterator(sal_Int32 nTextMarkupType
);
69 const SwAccessiblePortionData
& mrPortionData
;
71 SwTextFrame
const* m_pTextFrame
;
72 const SwWrongList
* mpTextMarkupList
;
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */