diff options
Diffstat (limited to 'chart2/source/controller/inc/AccessibleChartView.hxx')
-rw-r--r-- | chart2/source/controller/inc/AccessibleChartView.hxx | 50 |
1 files changed, 21 insertions, 29 deletions
diff --git a/chart2/source/controller/inc/AccessibleChartView.hxx b/chart2/source/controller/inc/AccessibleChartView.hxx index 814666e34016..9a973f80843a 100644 --- a/chart2/source/controller/inc/AccessibleChartView.hxx +++ b/chart2/source/controller/inc/AccessibleChartView.hxx @@ -19,6 +19,7 @@ #pragma once #include "AccessibleBase.hxx" +#include "ChartWindow.hxx" #include <cppuhelper/implbase.hxx> #include <cppuhelper/weakref.hxx> #include <com/sun/star/lang/XInitialization.hpp> @@ -27,9 +28,6 @@ #include <memory> namespace com::sun::star::accessibility { class XAccessible; } -namespace com::sun::star::awt { class XWindow; } -namespace com::sun::star::frame { class XModel; } -namespace com::sun::star::view { class XSelectionSupplier; } namespace accessibility { @@ -38,37 +36,32 @@ class IAccessibleViewForwarder; namespace chart { +class ChartView; -namespace impl -{ -typedef ::cppu::ImplInheritanceHelper< - ::chart::AccessibleBase, - css::lang::XInitialization, - css::view::XSelectionChangeListener > - AccessibleChartView_Base; -} - -class AccessibleChartView : - public impl::AccessibleChartView_Base +class AccessibleChartView final + : public cppu::ImplInheritanceHelper<chart::AccessibleBase, css::view::XSelectionChangeListener> { public: - AccessibleChartView(SdrView* pView ); + AccessibleChartView( SdrView* pView ); virtual ~AccessibleChartView() override; AccessibleChartView() = delete; - // ____ WeakComponentHelper (called from XComponent::dispose()) ____ - using AccessibleBase::disposing; + virtual void SAL_CALL disposing() override; - // ____ lang::XInitialization ____ // 0: view::XSelectionSupplier offers notifications for selection changes and access to the selection itself // 1: frame::XModel representing the chart model - offers access to object data // 2: lang::XInterface representing the normal chart view - offers access to some extra object data // 3: accessibility::XAccessible representing the parent accessible - // 4: awt::XWindow representing the view's window (is a vcl Window) + // 4: ChartWindow representing the view's window // all arguments are only valid until next initialization - don't keep them longer - virtual void SAL_CALL initialize( - const css::uno::Sequence< css::uno::Any >& aArguments ) override; + void initialize( ChartController& rChartController, + const rtl::Reference<::chart::ChartModel>& xChartModel, + const rtl::Reference<::chart::ChartView>& xChartView, + const css::uno::Reference< css::accessibility::XAccessible >& xParent, + ChartWindow* pNewChartWindow); + // used to disconnect from view + void initialize(); // ____ view::XSelectionChangeListener ____ virtual void SAL_CALL selectionChanged( const css::lang::EventObject& aEvent ) override; @@ -79,13 +72,12 @@ public: // ________ XAccessibleContext ________ virtual OUString SAL_CALL getAccessibleDescription() override; virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override; + virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override; virtual OUString SAL_CALL getAccessibleName() override; virtual sal_Int16 SAL_CALL getAccessibleRole() override; - // ________ XAccessibleComponent ________ - virtual css::awt::Rectangle SAL_CALL getBounds() override; - virtual css::awt::Point SAL_CALL getLocationOnScreen() override; + // OAccessible + virtual css::awt::Rectangle implGetBounds() override; protected: // ________ AccessibleChartElement ________ @@ -101,10 +93,10 @@ private: // methods css::awt::Rectangle GetWindowPosSize() const; private: // members - css::uno::WeakReference< css::view::XSelectionSupplier > m_xSelectionSupplier; - css::uno::WeakReference< css::frame::XModel > m_xChartModel; - css::uno::WeakReference< css::uno::XInterface > m_xChartView; - css::uno::WeakReference< css::awt::XWindow > m_xWindow; + unotools::WeakReference< ::chart::ChartController > m_xChartController; + unotools::WeakReference< ::chart::ChartModel > m_xChartModel; + unotools::WeakReference< ChartView > m_xChartView; + VclPtr<ChartWindow> m_pChartWindow; css::uno::WeakReference< css::accessibility::XAccessible > m_xParent; std::shared_ptr< ObjectHierarchy > m_spObjectHierarchy; |