diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-04 10:04:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-05 07:02:17 +0100 |
commit | b24c50d3e2104408bd77a27155de1241b9d17116 (patch) | |
tree | 296b9799604bc22158638f83ebac3f94df77d55f /sc | |
parent | 9d0c1c51cefbe27c43afe1b6bec9abac8811907f (diff) |
clean up members in ScAccessibleSpreadsheet
re-arrange them so the private/public sections are continuous.
And make a bunch of public fields private, no-one seems to be touching
them outside the class.
Change-Id: I6378793fb01bc884961d19627a46f2a1e7eda79c
Reviewed-on: https://gerrit.libreoffice.org/84448
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/inc/AccessibleSpreadsheet.hxx | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx index 5bcccacf8fbc..fe6070a191cc 100644 --- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx +++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx @@ -55,10 +55,11 @@ class ScAccessibleCell; This base class provides an implementation of the <code>AccessibleTable</code> service. */ -class ScAccessibleSpreadsheet final - : public ScAccessibleTableBase +class ScAccessibleSpreadsheet final : public ScAccessibleTableBase { public: + typedef std::vector<ScMyAddress> VEC_MYADDR; + ScAccessibleSpreadsheet( ScAccessibleDocument* pAccDoc, ScTabViewShell* pViewShell, @@ -76,6 +77,14 @@ public: void BoundingBoxChanged(); void VisAreaChanged(); + void FireFirstCellFocus(); + + css::uno::Reference < css::accessibility::XAccessible > GetActiveCell(); + bool IsScAddrFormulaSel (const ScAddress &addr) const; + bool IsFormulaMode(); + ScMyAddress CalcScAddressFromRangeList(ScRangeList *pMarkedRanges,sal_Int32 nSelectedChildIndex); + static bool CalcScRangeDifferenceMax(const ScRange & rSrc, const ScRange & rDest,int nMax,VEC_MYADDR &vecRet,int &nSize); + static bool CalcScRangeListDifferenceMax(ScRangeList *pSrc,ScRangeList *pDest,int nMax,VEC_MYADDR &vecRet); private: ScAccessibleSpreadsheet( @@ -200,7 +209,9 @@ private: virtual void SAL_CALL addAccessibleEventListener( const css::uno::Reference<css::accessibility::XAccessibleEventListener>& xListener) override; + //===== XAccessibleTableSelection ============================================ + virtual sal_Bool SAL_CALL selectRow( sal_Int32 row ) override; virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column ) override; virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row ) override; @@ -212,17 +223,6 @@ private: /// Return the object's current bounding box relative to the parent object. virtual tools::Rectangle GetBoundingBox() const override; - ScTabViewShell* mpViewShell; - std::unique_ptr<ScRangeList> mpMarkedRanges; - ScAccessibleDocument* mpAccDoc; - rtl::Reference<ScAccessibleCell> mpAccCell; - ScSplitPos meSplitPos; - ScAddress maActiveCell; - SCTAB mnTab; - bool const mbIsSpreadsheet; - bool mbDelIns; - bool mbIsFocusSend; - bool IsDefunc( const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates); bool IsEditable(); @@ -232,16 +232,32 @@ private: void SelectCell(sal_Int32 nRow, sal_Int32 nCol, bool bDeselect); static ScDocument* GetDocument(ScTabViewShell* pViewShell); - typedef std::vector<ScMyAddress> VEC_MYADDR; + void RemoveSelection(const ScMarkData &refScMarkData); + void CommitFocusCell(const ScAddress &aNewCell); + + sal_Int32 GetRowAll() const { return m_nMaxY - m_nMinY + 1 ; } + sal_uInt16 GetColAll() const { return m_nMaxX - m_nMinX + 1; } + void NotifyRefMode(); + void RemoveFormulaSelection(bool bRemoveAll = false); + bool CheckChildIndex(sal_Int32) const; + ScAddress GetChildIndexAddress(sal_Int32) const; + sal_Int32 GetAccessibleIndexFormula( sal_Int32 nRow, sal_Int32 nColumn ); + bool GetFormulaCurrentFocusCell(ScAddress &addr); + + ScTabViewShell* mpViewShell; + std::unique_ptr<ScRangeList> mpMarkedRanges; + ScAccessibleDocument* mpAccDoc; + rtl::Reference<ScAccessibleCell> mpAccCell; + ScSplitPos meSplitPos; + ScAddress maActiveCell; + SCTAB mnTab; + bool const mbIsSpreadsheet; + bool mbDelIns; + bool mbIsFocusSend; typedef std::map<ScMyAddress,css::uno::Reference< css::accessibility::XAccessible > > MAP_ADDR_XACC; MAP_ADDR_XACC m_mapSelectionSend; - void RemoveSelection(const ScMarkData &refScMarkData); - void CommitFocusCell(const ScAddress &aNewCell); -public: - void FireFirstCellFocus(); -private: bool m_bFormulaMode; bool m_bFormulaLastMode; ScAddress m_aFormulaActiveCell; @@ -252,16 +268,6 @@ private: sal_uInt16 m_nMaxX; sal_Int32 m_nMinY; sal_Int32 m_nMaxY; - - sal_Int32 GetRowAll() const { return m_nMaxY - m_nMinY + 1 ; } - sal_uInt16 GetColAll() const { return m_nMaxX - m_nMinX + 1; } - void NotifyRefMode(); - void RemoveFormulaSelection(bool bRemoveAll = false); - bool CheckChildIndex(sal_Int32) const; - ScAddress GetChildIndexAddress(sal_Int32) const; - sal_Int32 GetAccessibleIndexFormula( sal_Int32 nRow, sal_Int32 nColumn ); - bool GetFormulaCurrentFocusCell(ScAddress &addr); -public: ScRange m_aLastWithInMarkRange; OUString m_strCurCellValue; ScRangeList m_LastMarkedRanges; @@ -271,13 +277,6 @@ public: typedef std::vector<PAIR_COL> VEC_COL; VEC_COL m_vecTempCol; OUString m_strOldTabName; - - css::uno::Reference < css::accessibility::XAccessible > GetActiveCell(); - bool IsScAddrFormulaSel (const ScAddress &addr) const; - bool IsFormulaMode(); - ScMyAddress CalcScAddressFromRangeList(ScRangeList *pMarkedRanges,sal_Int32 nSelectedChildIndex); - static bool CalcScRangeDifferenceMax(const ScRange & rSrc, const ScRange & rDest,int nMax,VEC_MYADDR &vecRet,int &nSize); - static bool CalcScRangeListDifferenceMax(ScRangeList *pSrc,ScRangeList *pDest,int nMax,VEC_MYADDR &vecRet); }; #endif |