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 .
21 #ifndef _SC_ACCESSIBLEPREVIEWHEADERCELL_HXX
22 #define _SC_ACCESSIBLEPREVIEWHEADERCELL_HXX
24 #include "AccessibleContextBase.hxx"
25 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
26 #include <tools/gen.hxx>
28 #include "address.hxx"
29 #include <cppuhelper/implbase1.hxx>
32 class ScPreviewTableInfo
;
33 namespace accessibility
{
34 class AccessibleTextHelper
;
37 typedef cppu::ImplHelper1
< ::com::sun::star::accessibility::XAccessibleValue
>
38 ScAccessiblePreviewHeaderCellImpl
;
40 class ScAccessiblePreviewHeaderCell
:
41 public ScAccessibleContextBase
,
42 public ScAccessiblePreviewHeaderCellImpl
45 ScAccessiblePreviewHeaderCell( const ::com::sun::star::uno::Reference
<
46 ::com::sun::star::accessibility::XAccessible
>& rxParent
,
47 ScPreviewShell
* pViewShell
,
48 const ScAddress
& rCellPos
, sal_Bool bIsColHdr
, sal_Bool bIsRowHdr
,
52 virtual ~ScAccessiblePreviewHeaderCell();
54 using ScAccessibleContextBase::IsDefunc
;
57 using ScAccessibleContextBase::disposing
;
58 virtual void SAL_CALL
disposing();
60 //===== SfxListener =====================================================
62 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
64 ///===== XInterface =====================================================
66 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
67 ::com::sun::star::uno::Type
const & rType
)
68 throw (::com::sun::star::uno::RuntimeException
);
70 virtual void SAL_CALL
acquire() throw ();
72 virtual void SAL_CALL
release() throw ();
74 //===== XAccessibleValue ================================================
76 virtual ::com::sun::star::uno::Any SAL_CALL
getCurrentValue() throw (::com::sun::star::uno::RuntimeException
);
77 virtual sal_Bool SAL_CALL
setCurrentValue( const ::com::sun::star::uno::Any
& aNumber
)
78 throw (::com::sun::star::uno::RuntimeException
);
79 virtual ::com::sun::star::uno::Any SAL_CALL
getMaximumValue() throw (::com::sun::star::uno::RuntimeException
);
80 virtual ::com::sun::star::uno::Any SAL_CALL
getMinimumValue() throw (::com::sun::star::uno::RuntimeException
);
82 //===== XAccessibleComponent ============================================
84 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
85 getAccessibleAtPoint( const ::com::sun::star::awt::Point
& aPoint
)
86 throw (::com::sun::star::uno::RuntimeException
);
87 virtual void SAL_CALL
grabFocus() throw (::com::sun::star::uno::RuntimeException
);
89 //===== XAccessibleContext ==============================================
91 virtual sal_Int32 SAL_CALL
getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException
);
92 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
93 getAccessibleChild( sal_Int32 i
)
94 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
95 ::com::sun::star::uno::RuntimeException
);
96 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException
);
97 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleStateSet
> SAL_CALL
98 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException
);
100 //===== XServiceInfo ====================================================
102 virtual OUString SAL_CALL
getImplementationName()
103 throw(::com::sun::star::uno::RuntimeException
);
104 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
105 throw(::com::sun::star::uno::RuntimeException
);
107 ///===== XTypeProvider ===================================================
109 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
111 throw (::com::sun::star::uno::RuntimeException
);
113 /** Returns a implementation id.
115 virtual ::com::sun::star::uno::Sequence
<sal_Int8
> SAL_CALL
116 getImplementationId(void)
117 throw (::com::sun::star::uno::RuntimeException
);
120 virtual OUString SAL_CALL
createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException
);
121 virtual OUString SAL_CALL
createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException
);
123 virtual Rectangle
GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException
);
124 virtual Rectangle
GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException
);
127 ScPreviewShell
* mpViewShell
;
128 accessibility::AccessibleTextHelper
* mpTextHelper
;
131 sal_Bool mbColumnHeader
;
132 sal_Bool mbRowHeader
;
133 mutable ScPreviewTableInfo
* mpTableInfo
;
136 const com::sun::star::uno::Reference
<
137 ::com::sun::star::accessibility::XAccessibleStateSet
>& rxParentStates
);
139 void CreateTextHelper();
140 void FillTableInfo() const;
146 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */