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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWCELL_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWCELL_HXX
23 #include "AccessibleCellBase.hxx"
27 namespace accessibility
29 class AccessibleTextHelper
;
32 class ScAccessiblePreviewCell
: public ScAccessibleCellBase
35 //===== internal ========================================================
36 ScAccessiblePreviewCell(
37 const ::com::sun::star::uno::Reference
<
38 ::com::sun::star::accessibility::XAccessible
>& rxParent
,
39 ScPreviewShell
* pViewShell
, /* const */ ScAddress
& rCellAddress
, sal_Int32 nIndex
);
42 virtual ~ScAccessiblePreviewCell();
44 using ScAccessibleCellBase::IsDefunc
;
47 using ScAccessibleCellBase::disposing
;
48 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
50 ///===== SfxListener =====================================================
52 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) SAL_OVERRIDE
;
54 //===== XAccessibleComponent ============================================
56 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
57 getAccessibleAtPoint( const ::com::sun::star::awt::Point
& aPoint
)
58 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
59 virtual void SAL_CALL
grabFocus() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
61 //===== XAccessibleContext ==============================================
63 // override to calculate this on demand
64 virtual sal_Int32 SAL_CALL
getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
66 getAccessibleChild( sal_Int32 i
)
67 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
68 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleStateSet
> SAL_CALL
71 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
73 //===== XServiceInfo ====================================================
75 virtual OUString SAL_CALL
getImplementationName()
76 throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
77 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
78 throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
80 ///===== XTypeProvider ===================================================
82 /** Returns a implementation id.
84 virtual ::com::sun::star::uno::Sequence
<sal_Int8
> SAL_CALL
86 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
89 virtual Rectangle
GetBoundingBoxOnScreen() const throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
90 virtual Rectangle
GetBoundingBox() const throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
93 ScPreviewShell
* mpViewShell
;
95 accessibility::AccessibleTextHelper
* mpTextHelper
;
98 const com::sun::star::uno::Reference
<
99 ::com::sun::star::accessibility::XAccessibleStateSet
>& rxParentStates
);
100 virtual bool IsEditable(
101 const com::sun::star::uno::Reference
<
102 ::com::sun::star::accessibility::XAccessibleStateSet
>& rxParentStates
) SAL_OVERRIDE
;
104 const com::sun::star::uno::Reference
<
105 ::com::sun::star::accessibility::XAccessibleStateSet
>& rxParentStates
);
107 void CreateTextHelper();
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */