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 .
22 #include "AccessibleContextBase.hxx"
23 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
24 #include <tools/gen.hxx>
25 #include <address.hxx>
26 #include <cppuhelper/implbase1.hxx>
29 class ScPreviewTableInfo
;
30 namespace accessibility
{
31 class AccessibleTextHelper
;
34 typedef cppu::ImplHelper1
< css::accessibility::XAccessibleValue
>
35 ScAccessiblePreviewHeaderCellImpl
;
37 class ScAccessiblePreviewHeaderCell
:
38 public ScAccessibleContextBase
,
39 public ScAccessiblePreviewHeaderCellImpl
42 ScAccessiblePreviewHeaderCell( const css::uno::Reference
<css::accessibility::XAccessible
>& rxParent
,
43 ScPreviewShell
* pViewShell
,
44 const ScAddress
& rCellPos
, bool bIsColHdr
, bool bIsRowHdr
,
48 virtual ~ScAccessiblePreviewHeaderCell() override
;
50 using ScAccessibleContextBase::IsDefunc
;
53 using ScAccessibleContextBase::disposing
;
54 virtual void SAL_CALL
disposing() override
;
56 //===== SfxListener =====================================================
58 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
60 ///===== XInterface =====================================================
62 virtual css::uno::Any SAL_CALL
queryInterface(
63 css::uno::Type
const & rType
) override
;
65 virtual void SAL_CALL
acquire() noexcept override
;
67 virtual void SAL_CALL
release() noexcept override
;
69 //===== XAccessibleValue ================================================
71 virtual css::uno::Any SAL_CALL
getCurrentValue() override
;
72 virtual sal_Bool SAL_CALL
setCurrentValue( const css::uno::Any
& aNumber
) override
;
73 virtual css::uno::Any SAL_CALL
getMaximumValue() override
;
74 virtual css::uno::Any SAL_CALL
getMinimumValue() override
;
75 virtual css::uno::Any SAL_CALL
getMinimumIncrement() override
;
77 //===== XAccessibleComponent ============================================
79 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
80 getAccessibleAtPoint( const css::awt::Point
& aPoint
) override
;
81 virtual void SAL_CALL
grabFocus() override
;
83 //===== XAccessibleContext ==============================================
85 virtual sal_Int64 SAL_CALL
getAccessibleChildCount() override
;
86 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
87 getAccessibleChild( sal_Int64 i
) override
;
88 virtual sal_Int64 SAL_CALL
getAccessibleIndexInParent() override
;
89 virtual sal_Int64 SAL_CALL
getAccessibleStateSet() override
;
91 //===== XServiceInfo ====================================================
93 virtual OUString SAL_CALL
getImplementationName() override
;
94 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
96 ///===== XTypeProvider ===================================================
98 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
101 /** Returns an implementation id.
103 virtual css::uno::Sequence
<sal_Int8
> SAL_CALL
104 getImplementationId() override
;
107 virtual OUString
createAccessibleDescription() override
;
108 virtual OUString
createAccessibleName() override
;
110 virtual AbsoluteScreenPixelRectangle
GetBoundingBoxOnScreen() const override
;
111 virtual tools::Rectangle
GetBoundingBox() const override
;
114 ScPreviewShell
* mpViewShell
;
115 std::unique_ptr
<accessibility::AccessibleTextHelper
> mxTextHelper
;
120 mutable std::unique_ptr
<ScPreviewTableInfo
> mpTableInfo
;
122 bool IsDefunc(sal_Int64 nParentStates
);
124 void CreateTextHelper();
125 void FillTableInfo() const;
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */