[Libreoffice-commits] core.git: sc/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 5 06:04:28 UTC 2019
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 14 ++++++++------
sc/source/ui/inc/AccessibleSpreadsheet.hxx | 14 +++++---------
2 files changed, 13 insertions(+), 15 deletions(-)
New commits:
commit b5bf4bca0173edb2a91088ec70cc7c06f05186e0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Dec 4 10:08:29 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Dec 5 07:02:53 2019 +0100
inline some typedefs
Change-Id: Iff907f325352130c3af49c1f75b8e87cf7230110
Reviewed-on: https://gerrit.libreoffice.org/84449
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index e60629fa63c0..a25f33658367 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -123,7 +123,8 @@ ScMyAddress ScAccessibleSpreadsheet::CalcScAddressFromRangeList(ScRangeList *pMa
return ScMyAddress(0,0,maActiveCell.Tab());
}
-bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(const ScRange & rSrc, const ScRange & rDest, int nMax, VEC_MYADDR &vecRet, int &nSize)
+bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(const ScRange & rSrc, const ScRange & rDest, int nMax,
+ std::vector<ScMyAddress> &vecRet, int &nSize)
{
//Src Must be :Src > Dest
if (rDest.In(rSrc))
@@ -189,7 +190,8 @@ bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(const ScRange & rSrc, con
}
//In Src , Not in Dest
-bool ScAccessibleSpreadsheet::CalcScRangeListDifferenceMax(ScRangeList *pSrc,ScRangeList *pDest,int nMax,VEC_MYADDR &vecRet)
+bool ScAccessibleSpreadsheet::CalcScRangeListDifferenceMax(ScRangeList *pSrc, ScRangeList *pDest,
+ int nMax, std::vector<ScMyAddress> &vecRet)
{
if (pSrc == nullptr || pDest == nullptr)
{
@@ -607,7 +609,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
{
CommitFocusCell(aNewCell);
}
- VEC_MYADDR vecNew;
+ std::vector<ScMyAddress> vecNew;
if(CalcScRangeListDifferenceMax(mpMarkedRanges.get(), &m_LastMarkedRanges,10,vecNew))
{
aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_WITHIN;
@@ -1509,7 +1511,7 @@ void ScAccessibleSpreadsheet::NotifyRefMode()
}
else
{
- VEC_MYADDR vecCurSel;
+ std::vector<ScMyAddress> vecCurSel;
int nCurSize = (m_nMaxX - m_nMinX +1)*(m_nMaxY - m_nMinY +1) ;
vecCurSel.reserve(nCurSize);
for (sal_uInt16 x = m_nMinX ; x <= m_nMaxX ; ++x)
@@ -1521,10 +1523,10 @@ void ScAccessibleSpreadsheet::NotifyRefMode()
}
}
std::sort(vecCurSel.begin(), vecCurSel.end());
- VEC_MYADDR vecNew;
+ std::vector<ScMyAddress> vecNew;
std::set_difference(vecCurSel.begin(),vecCurSel.end(),
m_vecFormulaLastMyAddr.begin(),m_vecFormulaLastMyAddr.end(),
- std::back_insert_iterator<VEC_MYADDR>(vecNew));
+ std::back_insert_iterator(vecNew));
int nNewSize = vecNew.size();
if ( nNewSize > 10 )
{
diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
index fe6070a191cc..b812d53517c1 100644
--- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx
+++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
@@ -58,8 +58,6 @@ class ScAccessibleCell;
class ScAccessibleSpreadsheet final : public ScAccessibleTableBase
{
public:
- typedef std::vector<ScMyAddress> VEC_MYADDR;
-
ScAccessibleSpreadsheet(
ScAccessibleDocument* pAccDoc,
ScTabViewShell* pViewShell,
@@ -83,8 +81,8 @@ public:
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);
+ static bool CalcScRangeDifferenceMax(const ScRange & rSrc, const ScRange & rDest,int nMax,std::vector<ScMyAddress> &vecRet,int &nSize);
+ static bool CalcScRangeListDifferenceMax(ScRangeList *pSrc,ScRangeList *pDest,int nMax,std::vector<ScMyAddress> &vecRet);
private:
ScAccessibleSpreadsheet(
@@ -262,7 +260,7 @@ private:
bool m_bFormulaLastMode;
ScAddress m_aFormulaActiveCell;
MAP_ADDR_XACC m_mapFormulaSelectionSend;
- VEC_MYADDR m_vecFormulaLastMyAddr;
+ std::vector<ScMyAddress> m_vecFormulaLastMyAddr;
rtl::Reference<ScAccessibleCell> m_pAccFormulaCell;
sal_uInt16 m_nMinX;
sal_uInt16 m_nMaxX;
@@ -271,11 +269,9 @@ private:
ScRange m_aLastWithInMarkRange;
OUString m_strCurCellValue;
ScRangeList m_LastMarkedRanges;
- typedef std::vector<ScRange> VEC_RANGE;
- VEC_RANGE m_vecTempRange;
+ std::vector<ScRange> m_vecTempRange;
typedef std::pair<sal_uInt16,sal_uInt16> PAIR_COL;
- typedef std::vector<PAIR_COL> VEC_COL;
- VEC_COL m_vecTempCol;
+ std::vector<PAIR_COL> m_vecTempCol;
OUString m_strOldTabName;
};
More information about the Libreoffice-commits
mailing list