diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-22 09:43:40 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-22 09:44:01 +0200 |
commit | 046dc22ce15d363ee28d8ad1710c16e76e75a139 (patch) | |
tree | b4bbf9bb50f683ffa2fb9796f4c5b78c877cd5cc /sc/inc | |
parent | ec533b46ef174037e6cfadceb5fb38cbe805e2d2 (diff) |
Avoid reserved identifiers
Change-Id: I782784f34975d708fdf179d098ce6654aad7a976
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/fstalgorithm.hxx | 74 | ||||
-rw-r--r-- | sc/inc/matrixoperators.hxx | 6 | ||||
-rw-r--r-- | sc/inc/mtvcellfunc.hxx | 96 | ||||
-rw-r--r-- | sc/inc/mtvfunctions.hxx | 270 | ||||
-rw-r--r-- | sc/inc/sharedformula.hxx | 6 | ||||
-rw-r--r-- | sc/inc/stlalgorithm.hxx | 12 |
6 files changed, 232 insertions, 232 deletions
diff --git a/sc/inc/fstalgorithm.hxx b/sc/inc/fstalgorithm.hxx index aae070c97980..73a4c5c3d64a 100644 --- a/sc/inc/fstalgorithm.hxx +++ b/sc/inc/fstalgorithm.hxx @@ -15,28 +15,28 @@ namespace sc { -template<typename _Key, typename _Span> +template<typename Key, typename Span> void buildSpan( - std::vector<_Span>& rSpans, - typename mdds::flat_segment_tree<_Key,bool>::const_iterator it, - typename mdds::flat_segment_tree<_Key,bool>::const_iterator itEnd, const _Key* pStart ) + std::vector<Span>& rSpans, + typename mdds::flat_segment_tree<Key,bool>::const_iterator it, + typename mdds::flat_segment_tree<Key,bool>::const_iterator itEnd, const Key* pStart ) { - _Key nLastPos = it->first; + Key nLastPos = it->first; bool bLastVal = it->second; for (++it; it != itEnd; ++it) { - _Key nThisPos = it->first; + Key nThisPos = it->first; bool bThisVal = it->second; if (bLastVal) { - _Key nIndex1 = nLastPos; - _Key nIndex2 = nThisPos-1; + Key nIndex1 = nLastPos; + Key nIndex2 = nThisPos-1; if (!pStart || *pStart < nIndex1) - rSpans.push_back(_Span(nIndex1, nIndex2)); + rSpans.push_back(Span(nIndex1, nIndex2)); else if (*pStart <= nIndex2) - rSpans.push_back(_Span(*pStart, nIndex2)); + rSpans.push_back(Span(*pStart, nIndex2)); } nLastPos = nThisPos; @@ -44,28 +44,28 @@ void buildSpan( } } -template<typename _Key, typename _Val, typename _Span> +template<typename Key, typename Val, typename Span> void buildSpanWithValue( - std::vector<_Span>& rSpans, - typename mdds::flat_segment_tree<_Key,_Val>::const_iterator it, - typename mdds::flat_segment_tree<_Key,_Val>::const_iterator itEnd, const _Key* pStart ) + std::vector<Span>& rSpans, + typename mdds::flat_segment_tree<Key,Val>::const_iterator it, + typename mdds::flat_segment_tree<Key,Val>::const_iterator itEnd, const Key* pStart ) { - _Key nLastPos = it->first; - _Val nLastVal = it->second; + Key nLastPos = it->first; + Val nLastVal = it->second; for (++it; it != itEnd; ++it) { - _Key nThisPos = it->first; - _Val nThisVal = it->second; + Key nThisPos = it->first; + Val nThisVal = it->second; if (nLastVal) { - _Key nIndex1 = nLastPos; - _Key nIndex2 = nThisPos-1; + Key nIndex1 = nLastPos; + Key nIndex2 = nThisPos-1; if (!pStart || *pStart < nIndex1) - rSpans.push_back(_Span(nIndex1, nIndex2, nLastVal)); + rSpans.push_back(Span(nIndex1, nIndex2, nLastVal)); else if (*pStart <= nIndex2) - rSpans.push_back(_Span(*pStart, nIndex2, nLastVal)); + rSpans.push_back(Span(*pStart, nIndex2, nLastVal)); } nLastPos = nThisPos; @@ -78,15 +78,15 @@ void buildSpanWithValue( * an array of ranges that corresponds with the segments that have a 'true' * value. */ -template<typename _Key, typename _Span> -std::vector<_Span> toSpanArray( const mdds::flat_segment_tree<_Key,bool>& rTree ) +template<typename Key, typename Span> +std::vector<Span> toSpanArray( const mdds::flat_segment_tree<Key,bool>& rTree ) { - typedef mdds::flat_segment_tree<_Key,bool> FstType; + typedef mdds::flat_segment_tree<Key,bool> FstType; - std::vector<_Span> aSpans; + std::vector<Span> aSpans; typename FstType::const_iterator it = rTree.begin(), itEnd = rTree.end(); - buildSpan<_Key,_Span>(aSpans, it, itEnd, nullptr); + buildSpan<Key,Span>(aSpans, it, itEnd, nullptr); return aSpans; } @@ -97,24 +97,24 @@ std::vector<_Span> toSpanArray( const mdds::flat_segment_tree<_Key,bool>& rTree * The span type must support a constructor that takes a start key, an end * key and a value in this order. */ -template<typename _Key, typename _Val, typename _Span> -std::vector<_Span> toSpanArrayWithValue( const mdds::flat_segment_tree<_Key,_Val>& rTree ) +template<typename Key, typename Val, typename Span> +std::vector<Span> toSpanArrayWithValue( const mdds::flat_segment_tree<Key,Val>& rTree ) { - typedef mdds::flat_segment_tree<_Key,_Val> FstType; + typedef mdds::flat_segment_tree<Key,Val> FstType; - std::vector<_Span> aSpans; + std::vector<Span> aSpans; typename FstType::const_iterator it = rTree.begin(), itEnd = rTree.end(); - buildSpanWithValue<_Key,_Val,_Span>(aSpans, it, itEnd, nullptr); + buildSpanWithValue<Key,Val,Span>(aSpans, it, itEnd, nullptr); return aSpans; } -template<typename _Key, typename _Span> -std::vector<_Span> toSpanArray( const mdds::flat_segment_tree<_Key,bool>& rTree, _Key nStartPos ) +template<typename Key, typename Span> +std::vector<Span> toSpanArray( const mdds::flat_segment_tree<Key,bool>& rTree, Key nStartPos ) { - typedef mdds::flat_segment_tree<_Key,bool> FstType; + typedef mdds::flat_segment_tree<Key,bool> FstType; - std::vector<_Span> aSpans; + std::vector<Span> aSpans; if (!rTree.is_tree_valid()) return aSpans; @@ -127,7 +127,7 @@ std::vector<_Span> toSpanArray( const mdds::flat_segment_tree<_Key,bool>& rTree, return aSpans; typename FstType::const_iterator it = r.first, itEnd = rTree.end(); - buildSpan<_Key,_Span>(aSpans, it, itEnd, &nStartPos); + buildSpan<Key,Span>(aSpans, it, itEnd, &nStartPos); return aSpans; } diff --git a/sc/inc/matrixoperators.hxx b/sc/inc/matrixoperators.hxx index f3e5facf93c9..25ecf63331f6 100644 --- a/sc/inc/matrixoperators.hxx +++ b/sc/inc/matrixoperators.hxx @@ -17,11 +17,11 @@ namespace op { template<typename T> -struct _Op +struct Op_ { const double mInitVal; const T maOp; - _Op(double InitVal, T aOp): + Op_(double InitVal, T aOp): mInitVal(InitVal), maOp(aOp) { } @@ -31,7 +31,7 @@ struct _Op } }; -using Op = _Op<std::function<void(double&, double)>>; +using Op = Op_<std::function<void(double&, double)>>; struct Sum { diff --git a/sc/inc/mtvcellfunc.hxx b/sc/inc/mtvcellfunc.hxx index d0fd9a1cd734..db72fd4a3278 100644 --- a/sc/inc/mtvcellfunc.hxx +++ b/sc/inc/mtvcellfunc.hxx @@ -15,156 +15,156 @@ namespace sc { -template<typename _Func> -void ProcessFormula(CellStoreType& rStore, _Func& rFunc) +template<typename Func> +void ProcessFormula(CellStoreType& rStore, Func& rFunc) { FuncElseNoOp<size_t> aElse; - ProcessElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse); + ProcessElements1<CellStoreType, formula_block, Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse); } -template<typename _FuncElem> +template<typename FuncElem> typename CellStoreType::iterator ProcessFormula( - const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem) + const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, FuncElem& rFuncElem) { FuncElseNoOp<size_t> aElse; return ProcessElements1< - CellStoreType, formula_block, _FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse); + CellStoreType, formula_block, FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse); } -template<typename _FuncElem, typename _FuncElse> +template<typename FuncElem, typename FuncElse> typename CellStoreType::iterator ProcessFormula( - const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem, _FuncElse& rFuncElse) + const CellStoreType::iterator& it, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, FuncElem& rFuncElem, FuncElse& rFuncElse) { return ProcessElements1< - CellStoreType, formula_block, _FuncElem, _FuncElse>(it, rStore, nRow1, nRow2, rFuncElem, rFuncElse); + CellStoreType, formula_block, FuncElem, FuncElse>(it, rStore, nRow1, nRow2, rFuncElem, rFuncElse); } -template<typename _Func> +template<typename Func> CellStoreType::iterator -ProcessEditText(const CellStoreType::iterator& itPos, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _Func& rFunc) +ProcessEditText(const CellStoreType::iterator& itPos, CellStoreType& rStore, SCROW nRow1, SCROW nRow2, Func& rFunc) { FuncElseNoOp<size_t> aElse; - return ProcessElements1<CellStoreType, edittext_block, _Func, FuncElseNoOp<size_t> >( + return ProcessElements1<CellStoreType, edittext_block, Func, FuncElseNoOp<size_t> >( itPos, rStore, nRow1, nRow2, rFunc, aElse); } -template<typename _Func> +template<typename Func> void ParseFormula( - const CellStoreType& rStore, _Func& rFunc) + const CellStoreType& rStore, Func& rFunc) { FuncElseNoOp<size_t> aElse; - ParseElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse); + ParseElements1<CellStoreType, formula_block, Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse); } -template<typename _Func> +template<typename Func> typename CellStoreType::const_iterator ParseFormula( const CellStoreType::const_iterator& itPos, const CellStoreType& rStore, - SCROW nStart, SCROW nEnd, _Func& rFunc) + SCROW nStart, SCROW nEnd, Func& rFunc) { FuncElseNoOp<size_t> aElse; - return ParseElements1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t> >( + return ParseElements1<CellStoreType, formula_block, Func, FuncElseNoOp<size_t> >( itPos, rStore, nStart, nEnd, rFunc, aElse); } -template<typename _FuncElem, typename _FuncElse> +template<typename FuncElem, typename FuncElse> typename CellStoreType::const_iterator ParseAll( const typename CellStoreType::const_iterator& itPos, const CellStoreType& rCells, - SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem, _FuncElse& rFuncElse) + SCROW nRow1, SCROW nRow2, FuncElem& rFuncElem, FuncElse& rFuncElse) { return ParseElements4<CellStoreType, numeric_block, string_block, edittext_block, formula_block, - _FuncElem, _FuncElse>( + FuncElem, FuncElse>( itPos, rCells, nRow1, nRow2, rFuncElem, rFuncElse); } -template<typename _Func> +template<typename Func> typename CellStoreType::const_iterator ParseAllNonEmpty( const typename CellStoreType::const_iterator& itPos, const CellStoreType& rCells, - SCROW nRow1, SCROW nRow2, _Func& rFunc) + SCROW nRow1, SCROW nRow2, Func& rFunc) { FuncElseNoOp<size_t> aElse; return ParseElements4<CellStoreType, numeric_block, string_block, edittext_block, formula_block, - _Func, FuncElseNoOp<size_t> >( + Func, FuncElseNoOp<size_t> >( itPos, rCells, nRow1, nRow2, rFunc, aElse); } -template<typename _Func> +template<typename Func> typename CellStoreType::const_iterator ParseFormulaNumeric( const CellStoreType::const_iterator& itPos, const CellStoreType& rCells, - SCROW nRow1, SCROW nRow2, _Func& rFunc) + SCROW nRow1, SCROW nRow2, Func& rFunc) { FuncElseNoOp<size_t> aElse; return ParseElements2<CellStoreType, - numeric_block, formula_block, _Func, FuncElseNoOp<size_t> >( + numeric_block, formula_block, Func, FuncElseNoOp<size_t> >( itPos, rCells, nRow1, nRow2, rFunc, aElse); } -template<typename _Func> -void ProcessFormulaEditText(CellStoreType& rStore, _Func& rFunc) +template<typename Func> +void ProcessFormulaEditText(CellStoreType& rStore, Func& rFunc) { FuncElseNoOp<size_t> aElse; - ProcessElements2<CellStoreType, edittext_block, formula_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse); + ProcessElements2<CellStoreType, edittext_block, formula_block, Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse); } -template<typename _Func> +template<typename Func> std::pair<CellStoreType::const_iterator, size_t> -FindFormula(const CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _Func& rFunc) +FindFormula(const CellStoreType& rStore, SCROW nRow1, SCROW nRow2, Func& rFunc) { typedef std::pair<size_t,bool> ElseRetType; FuncElseNoOp<size_t, ElseRetType> aElse; - return FindElement1<CellStoreType, formula_block, _Func, FuncElseNoOp<size_t, ElseRetType> >(rStore, nRow1, nRow2, rFunc, aElse); + return FindElement1<CellStoreType, formula_block, Func, FuncElseNoOp<size_t, ElseRetType> >(rStore, nRow1, nRow2, rFunc, aElse); } -template<typename _Func> +template<typename Func> std::pair<CellStoreType::const_iterator, size_t> -FindFormulaEditText(const CellStoreType& rStore, SCROW nRow1, SCROW nRow2, _Func& rFunc) +FindFormulaEditText(const CellStoreType& rStore, SCROW nRow1, SCROW nRow2, Func& rFunc) { - return FindElement2<CellStoreType, edittext_block, formula_block, _Func, _Func>(rStore, nRow1, nRow2, rFunc, rFunc); + return FindElement2<CellStoreType, edittext_block, formula_block, Func, Func>(rStore, nRow1, nRow2, rFunc, rFunc); } -template<typename _Func> -void ProcessNote(CellNoteStoreType& rStore, _Func& rFunc) +template<typename Func> +void ProcessNote(CellNoteStoreType& rStore, Func& rFunc) { FuncElseNoOp<size_t> aElse; - ProcessElements1<CellNoteStoreType, cellnote_block, _Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse); + ProcessElements1<CellNoteStoreType, cellnote_block, Func, FuncElseNoOp<size_t> >(rStore, rFunc, aElse); } -template<typename _Func> +template<typename Func> typename CellNoteStoreType::const_iterator ParseNote( const CellNoteStoreType::const_iterator& itPos, const CellNoteStoreType& rStore, - SCROW nStart, SCROW nEnd, _Func& rFunc) + SCROW nStart, SCROW nEnd, Func& rFunc) { FuncElseNoOp<size_t> aElse; - return ParseElements1<CellNoteStoreType, cellnote_block, _Func, FuncElseNoOp<size_t> >( + return ParseElements1<CellNoteStoreType, cellnote_block, Func, FuncElseNoOp<size_t> >( itPos, rStore, nStart, nEnd, rFunc, aElse); } -template<typename _FuncElem> +template<typename FuncElem> typename CellNoteStoreType::iterator ProcessNote( - const CellNoteStoreType::iterator& it, CellNoteStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem) + const CellNoteStoreType::iterator& it, CellNoteStoreType& rStore, SCROW nRow1, SCROW nRow2, FuncElem& rFuncElem) { FuncElseNoOp<size_t> aElse; return ProcessElements1< - CellNoteStoreType, cellnote_block, _FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse); + CellNoteStoreType, cellnote_block, FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse); } -template<typename _FuncElem> +template<typename FuncElem> typename BroadcasterStoreType::iterator ProcessBroadcaster( - const BroadcasterStoreType::iterator& it, BroadcasterStoreType& rStore, SCROW nRow1, SCROW nRow2, _FuncElem& rFuncElem) + const BroadcasterStoreType::iterator& it, BroadcasterStoreType& rStore, SCROW nRow1, SCROW nRow2, FuncElem& rFuncElem) { FuncElseNoOp<size_t> aElse; return ProcessElements1< - BroadcasterStoreType, broadcaster_block, _FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse); + BroadcasterStoreType, broadcaster_block, FuncElem, FuncElseNoOp<size_t> >(it, rStore, nRow1, nRow2, rFuncElem, aElse); } } diff --git a/sc/inc/mtvfunctions.hxx b/sc/inc/mtvfunctions.hxx index 028e73c96aae..f9052edfb27c 100644 --- a/sc/inc/mtvfunctions.hxx +++ b/sc/inc/mtvfunctions.hxx @@ -15,12 +15,12 @@ namespace sc { -template<typename _SizeT, typename _Ret = bool> +template<typename SizeT, typename Ret = bool> struct FuncElseNoOp { - _Ret operator() (mdds::mtv::element_t, _SizeT, _SizeT) const + Ret operator() (mdds::mtv::element_t, SizeT, SizeT) const { - return _Ret(); + return Ret(); } }; @@ -28,19 +28,19 @@ struct FuncElseNoOp * Generic algorithm to parse blocks of multi_type_vector either partially * or fully. */ -template<typename _StoreT, typename _Func> -typename _StoreT::const_iterator +template<typename StoreT, typename Func> +typename StoreT::const_iterator ParseBlock( - const typename _StoreT::const_iterator& itPos, const _StoreT& rStore, _Func& rFunc, - typename _StoreT::size_type nStart, typename _StoreT::size_type nEnd) + const typename StoreT::const_iterator& itPos, const StoreT& rStore, Func& rFunc, + typename StoreT::size_type nStart, typename StoreT::size_type nEnd) { - typedef std::pair<typename _StoreT::const_iterator, typename _StoreT::size_type> PositionType; + typedef std::pair<typename StoreT::const_iterator, typename StoreT::size_type> PositionType; PositionType aPos = rStore.position(itPos, nStart); - typename _StoreT::const_iterator it = aPos.first; - typename _StoreT::size_type nOffset = aPos.second; - typename _StoreT::size_type nDataSize = 0; - typename _StoreT::size_type nTopRow = nStart; + typename StoreT::const_iterator it = aPos.first; + typename StoreT::size_type nOffset = aPos.second; + typename StoreT::size_type nDataSize = 0; + typename StoreT::size_type nTopRow = nStart; for (; it != rStore.end() && nTopRow <= nEnd; ++it, nOffset = 0, nTopRow += nDataSize) { @@ -66,17 +66,17 @@ ParseBlock( * Non-const variant of the above function. TODO: Find a way to merge these * two in an elegant way. */ -template<typename _StoreT, typename _Func> -typename _StoreT::iterator -ProcessBlock(const typename _StoreT::iterator& itPos, _StoreT& rStore, _Func& rFunc, typename _StoreT::size_type nStart, typename _StoreT::size_type nEnd) +template<typename StoreT, typename Func> +typename StoreT::iterator +ProcessBlock(const typename StoreT::iterator& itPos, StoreT& rStore, Func& rFunc, typename StoreT::size_type nStart, typename StoreT::size_type nEnd) { - typedef std::pair<typename _StoreT::iterator, typename _StoreT::size_type> PositionType; + typedef std::pair<typename StoreT::iterator, typename StoreT::size_type> PositionType; PositionType aPos = rStore.position(itPos, nStart); - typename _StoreT::iterator it = aPos.first; - typename _StoreT::size_type nOffset = aPos.second; - typename _StoreT::size_type nDataSize = 0; - typename _StoreT::size_type nCurRow = nStart; + typename StoreT::iterator it = aPos.first; + typename StoreT::size_type nOffset = aPos.second; + typename StoreT::size_type nDataSize = 0; + typename StoreT::size_type nCurRow = nStart; for (; it != rStore.end() && nCurRow <= nEnd; ++it, nOffset = 0, nCurRow += nDataSize) { @@ -98,39 +98,39 @@ ProcessBlock(const typename _StoreT::iterator& itPos, _StoreT& rStore, _Func& rF return it; } -template<typename _BlkT, typename _ItrT, typename _NodeT, typename _FuncElem> -void EachElem(_NodeT& rNode, size_t nOffset, size_t nDataSize, _FuncElem& rFuncElem) +template<typename BlkT, typename ItrT, typename NodeT, typename FuncElem> +void EachElem(NodeT& rNode, size_t nOffset, size_t nDataSize, FuncElem& rFuncElem) { - _ItrT it = _BlkT::begin(*rNode.data); + ItrT it = BlkT::begin(*rNode.data); std::advance(it, nOffset); - _ItrT itEnd = it; + ItrT itEnd = it; std::advance(itEnd, nDataSize); size_t nRow = rNode.position + nOffset; for (; it != itEnd; ++it, ++nRow) rFuncElem(nRow, *it); } -template<typename _BlkT, typename _ItrT, typename _NodeT, typename _FuncElem> -void EachElem(_NodeT& rNode, _FuncElem& rFuncElem) +template<typename BlkT, typename ItrT, typename NodeT, typename FuncElem> +void EachElem(NodeT& rNode, FuncElem& rFuncElem) { - _ItrT it = _BlkT::begin(*rNode.data); - _ItrT itEnd = _BlkT::end(*rNode.data); + ItrT it = BlkT::begin(*rNode.data); + ItrT itEnd = BlkT::end(*rNode.data); size_t nRow = rNode.position; for (; it != itEnd; ++it, ++nRow) rFuncElem(nRow, *it); } -template<typename _BlkT, typename _StoreT, typename _FuncElem> -std::pair<typename _StoreT::const_iterator, size_t> +template<typename BlkT, typename StoreT, typename FuncElem> +std::pair<typename StoreT::const_iterator, size_t> CheckElem( - const _StoreT& rStore, const typename _StoreT::const_iterator& it, size_t nOffset, size_t nDataSize, - _FuncElem& rFuncElem) + const StoreT& rStore, const typename StoreT::const_iterator& it, size_t nOffset, size_t nDataSize, + FuncElem& rFuncElem) { - typedef std::pair<typename _StoreT::const_iterator, size_t> PositionType; + typedef std::pair<typename StoreT::const_iterator, size_t> PositionType; - typename _BlkT::const_iterator itData = _BlkT::begin(*it->data); + typename BlkT::const_iterator itData = BlkT::begin(*it->data); std::advance(itData, nOffset); - typename _BlkT::const_iterator itDataEnd = itData; + typename BlkT::const_iterator itDataEnd = itData; std::advance(itDataEnd, nDataSize); size_t nTopRow = it->position + nOffset; size_t nRow = nTopRow; @@ -143,38 +143,38 @@ CheckElem( return PositionType(rStore.end(), 0); } -template<typename _StoreT, typename _BlkT, typename _FuncElem, typename _FuncElse> -void ParseElements1(const _StoreT& rStore, _FuncElem& rFuncElem, _FuncElse& rFuncElse) +template<typename StoreT, typename BlkT, typename FuncElem, typename FuncElse> +void ParseElements1(const StoreT& rStore, FuncElem& rFuncElem, FuncElse& rFuncElse) { - typename _StoreT::size_type nTopRow = 0, nDataSize = 0; - typename _StoreT::const_iterator it = rStore.begin(), itEnd = rStore.end(); + typename StoreT::size_type nTopRow = 0, nDataSize = 0; + typename StoreT::const_iterator it = rStore.begin(), itEnd = rStore.end(); for (; it != itEnd; ++it, nTopRow += nDataSize) { nDataSize = it->size; - if (it->type != _BlkT::block_type) + if (it->type != BlkT::block_type) { rFuncElse(it->type, nTopRow, nDataSize); continue; } - EachElem<_BlkT, typename _BlkT::const_iterator>(*it, rFuncElem); + EachElem<BlkT, typename BlkT::const_iterator>(*it, rFuncElem); } } -template<typename _StoreT, typename _BlkT, typename _FuncElem, typename _FuncElse> -typename _StoreT::const_iterator +template<typename StoreT, typename BlkT, typename FuncElem, typename FuncElse> +typename StoreT::const_iterator ParseElements1( - const typename _StoreT::const_iterator& itPos, const _StoreT& rStore, - typename _StoreT::size_type nStart, typename _StoreT::size_type nEnd, - _FuncElem& rFuncElem, _FuncElse& rFuncElse) + const typename StoreT::const_iterator& itPos, const StoreT& rStore, + typename StoreT::size_type nStart, typename StoreT::size_type nEnd, + FuncElem& rFuncElem, FuncElse& rFuncElse) { - typedef std::pair<typename _StoreT::const_iterator, typename _StoreT::size_type> PositionType; + typedef std::pair<typename StoreT::const_iterator, typename StoreT::size_type> PositionType; PositionType aPos = rStore.position(itPos, nStart); - typename _StoreT::const_iterator it = aPos.first; - typename _StoreT::size_type nOffset = aPos.second; - typename _StoreT::size_type nDataSize = 0; - typename _StoreT::size_type nTopRow = nStart; + typename StoreT::const_iterator it = aPos.first; + typename StoreT::size_type nOffset = aPos.second; + typename StoreT::size_type nDataSize = 0; + typename StoreT::size_type nTopRow = nStart; for (; it != rStore.end() && nTopRow <= nEnd; ++it, nOffset = 0, nTopRow += nDataSize) { @@ -187,8 +187,8 @@ ParseElements1( bLastBlock = true; } - if (it->type == _BlkT::block_type) - EachElem<_BlkT, typename _BlkT::const_iterator>(*it, nOffset, nDataSize, rFuncElem); + if (it->type == BlkT::block_type) + EachElem<BlkT, typename BlkT::const_iterator>(*it, nOffset, nDataSize, rFuncElem); else rFuncElse(it->type, nTopRow, nDataSize); @@ -199,19 +199,19 @@ ParseElements1( return it; }; -template<typename _StoreT, typename _Blk1, typename _Blk2, typename _FuncElem, typename _FuncElse> -typename _StoreT::const_iterator +template<typename StoreT, typename Blk1, typename Blk2, typename FuncElem, typename FuncElse> +typename StoreT::const_iterator ParseElements2( - const typename _StoreT::const_iterator& itPos, const _StoreT& rStore, typename _StoreT::size_type nStart, typename _StoreT::size_type nEnd, - _FuncElem& rFuncElem, _FuncElse& rFuncElse) + const typename StoreT::const_iterator& itPos, const StoreT& rStore, typename StoreT::size_type nStart, typename StoreT::size_type nEnd, + FuncElem& rFuncElem, FuncElse& rFuncElse) { - typedef std::pair<typename _StoreT::const_iterator, typename _StoreT::size_type> PositionType; + typedef std::pair<typename StoreT::const_iterator, typename StoreT::size_type> PositionType; PositionType aPos = rStore.position(itPos, nStart); - typename _StoreT::const_iterator it = aPos.first; - typename _StoreT::size_type nOffset = aPos.second; - typename _StoreT::size_type nDataSize = 0; - typename _StoreT::size_type nTopRow = nStart; + typename StoreT::const_iterator it = aPos.first; + typename StoreT::size_type nOffset = aPos.second; + typename StoreT::size_type nDataSize = 0; + typename StoreT::size_type nTopRow = nStart; for (; it != rStore.end() && nTopRow <= nEnd; ++it, nOffset = 0, nTopRow += nDataSize) { @@ -226,11 +226,11 @@ ParseElements2( switch (it->type) { - case _Blk1::block_type: - EachElem<_Blk1, typename _Blk1::const_iterator>(*it, nOffset, nDataSize, rFuncElem); + case Blk1::block_type: + EachElem<Blk1, typename Blk1::const_iterator>(*it, nOffset, nDataSize, rFuncElem); break; - case _Blk2::block_type: - EachElem<_Blk2, typename _Blk2::const_iterator>(*it, nOffset, nDataSize, rFuncElem); + case Blk2::block_type: + EachElem<Blk2, typename Blk2::const_iterator>(*it, nOffset, nDataSize, rFuncElem); break; default: rFuncElse(it->type, nTopRow, nDataSize); @@ -243,19 +243,19 @@ ParseElements2( return it; } -template<typename _StoreT, typename _Blk1, typename _Blk2, typename _Blk3, typename _Blk4, typename _FuncElem, typename _FuncElse> -typename _StoreT::const_iterator +template<typename StoreT, typename Blk1, typename Blk2, typename Blk3, typename Blk4, typename FuncElem, typename FuncElse> +typename StoreT::const_iterator ParseElements4( - const typename _StoreT::const_iterator& itPos, const _StoreT& rStore, typename _StoreT::size_type nStart, typename _StoreT::size_type nEnd, - _FuncElem& rFuncElem, _FuncElse& rFuncElse) + const typename StoreT::const_iterator& itPos, const StoreT& rStore, typename StoreT::size_type nStart, typename StoreT::size_type nEnd, + FuncElem& rFuncElem, FuncElse& rFuncElse) { - typedef std::pair<typename _StoreT::const_iterator, typename _StoreT::size_type> PositionType; + typedef std::pair<typename StoreT::const_iterator, typename StoreT::size_type> PositionType; PositionType aPos = rStore.position(itPos, nStart); - typename _StoreT::const_iterator it = aPos.first; - typename _StoreT::size_type nOffset = aPos.second; - typename _StoreT::size_type nDataSize = 0; - typename _StoreT::size_type nTopRow = nStart; + typename StoreT::const_iterator it = aPos.first; + typename StoreT::size_type nOffset = aPos.second; + typename StoreT::size_type nDataSize = 0; + typename StoreT::size_type nTopRow = nStart; for (; it != rStore.end() && nTopRow <= nEnd; ++it, nOffset = 0, nTopRow += nDataSize) { @@ -270,17 +270,17 @@ ParseElements4( switch (it->type) { - case _Blk1::block_type: - EachElem<_Blk1, typename _Blk1::const_iterator>(*it, nOffset, nDataSize, rFuncElem); + case Blk1::block_type: + EachElem<Blk1, typename Blk1::const_iterator>(*it, nOffset, nDataSize, rFuncElem); break; - case _Blk2::block_type: - EachElem<_Blk2, typename _Blk2::const_iterator>(*it, nOffset, nDataSize, rFuncElem); + case Blk2::block_type: + EachElem<Blk2, typename Blk2::const_iterator>(*it, nOffset, nDataSize, rFuncElem); break; - case _Blk3::block_type: - EachElem<_Blk3, typename _Blk3::const_iterator>(*it, nOffset, nDataSize, rFuncElem); + case Blk3::block_type: + EachElem<Blk3, typename Blk3::const_iterator>(*it, nOffset, nDataSize, rFuncElem); break; - case _Blk4::block_type: - EachElem<_Blk4, typename _Blk4::const_iterator>(*it, nOffset, nDataSize, rFuncElem); + case Blk4::block_type: + EachElem<Blk4, typename Blk4::const_iterator>(*it, nOffset, nDataSize, rFuncElem); break; default: rFuncElse(it->type, nTopRow, nDataSize); @@ -293,41 +293,41 @@ ParseElements4( return it; } -template<typename _StoreT, typename _BlkT, typename _FuncElem, typename _FuncElse> -void ProcessElements1(_StoreT& rStore, _FuncElem& rFuncElem, _FuncElse& rFuncElse) +template<typename StoreT, typename BlkT, typename FuncElem, typename FuncElse> +void ProcessElements1(StoreT& rStore, FuncElem& rFuncElem, FuncElse& rFuncElse) { - typename _StoreT::size_type nTopRow = 0, nDataSize = 0; - typename _StoreT::iterator it = rStore.begin(), itEnd = rStore.end(); + typename StoreT::size_type nTopRow = 0, nDataSize = 0; + typename StoreT::iterator it = rStore.begin(), itEnd = rStore.end(); for (; it != itEnd; ++it, nTopRow += nDataSize) { nDataSize = it->size; - if (it->type != _BlkT::block_type) + if (it->type != BlkT::block_type) { rFuncElse(it->type, nTopRow, nDataSize); continue; } - EachElem<_BlkT, typename _BlkT::iterator>(*it, rFuncElem); + EachElem<BlkT, typename BlkT::iterator>(*it, rFuncElem); } } /** * This variant specifies start and end positions. */ -template<typename _StoreT, typename _BlkT, typename _FuncElem, typename _FuncElse> -typename _StoreT::iterator +template<typename StoreT, typename BlkT, typename FuncElem, typename FuncElse> +typename StoreT::iterator ProcessElements1( - const typename _StoreT::iterator& itPos, _StoreT& rStore, - typename _StoreT::size_type nStart, typename _StoreT::size_type nEnd, - _FuncElem& rFuncElem, _FuncElse& rFuncElse) + const typename StoreT::iterator& itPos, StoreT& rStore, + typename StoreT::size_type nStart, typename StoreT::size_type nEnd, + FuncElem& rFuncElem, FuncElse& rFuncElse) { - typedef std::pair<typename _StoreT::iterator, typename _StoreT::size_type> PositionType; + typedef std::pair<typename StoreT::iterator, typename StoreT::size_type> PositionType; PositionType aPos = rStore.position(itPos, nStart); - typename _StoreT::iterator it = aPos.first; - typename _StoreT::size_type nOffset = aPos.second; - typename _StoreT::size_type nDataSize = 0; - typename _StoreT::size_type nTopRow = nStart; + typename StoreT::iterator it = aPos.first; + typename StoreT::size_type nOffset = aPos.second; + typename StoreT::size_type nDataSize = 0; + typename StoreT::size_type nTopRow = nStart; for (; it != rStore.end() && nTopRow <= nEnd; ++it, nOffset = 0, nTopRow += nDataSize) { @@ -340,8 +340,8 @@ ProcessElements1( bLastBlock = true; } - if (it->type == _BlkT::block_type) - EachElem<_BlkT, typename _BlkT::iterator>(*it, nOffset, nDataSize, rFuncElem); + if (it->type == BlkT::block_type) + EachElem<BlkT, typename BlkT::iterator>(*it, nOffset, nDataSize, rFuncElem); else rFuncElse(it->type, nTopRow, nDataSize); @@ -352,21 +352,21 @@ ProcessElements1( return it; }; -template<typename _StoreT, typename _Blk1, typename _Blk2, typename _FuncElem, typename _FuncElse> -void ProcessElements2(_StoreT& rStore, _FuncElem& rFuncElem, _FuncElse& rFuncElse) +template<typename StoreT, typename Blk1, typename Blk2, typename FuncElem, typename FuncElse> +void ProcessElements2(StoreT& rStore, FuncElem& rFuncElem, FuncElse& rFuncElse) { - typename _StoreT::size_type nTopRow = 0, nDataSize = 0; - typename _StoreT::iterator it = rStore.begin(), itEnd = rStore.end(); + typename StoreT::size_type nTopRow = 0, nDataSize = 0; + typename StoreT::iterator it = rStore.begin(), itEnd = rStore.end(); for (; it != itEnd; ++it, nTopRow += nDataSize) { nDataSize = it->size; switch (it->type) { - case _Blk1::block_type: - EachElem<_Blk1, typename _Blk1::iterator>(*it, rFuncElem); + case Blk1::block_type: + EachElem<Blk1, typename Blk1::iterator>(*it, rFuncElem); break; - case _Blk2::block_type: - EachElem<_Blk2, typename _Blk2::iterator>(*it, rFuncElem); + case Blk2::block_type: + EachElem<Blk2, typename Blk2::iterator>(*it, rFuncElem); break; default: rFuncElse(it->type, nTopRow, nDataSize); @@ -374,20 +374,20 @@ void ProcessElements2(_StoreT& rStore, _FuncElem& rFuncElem, _FuncElse& rFuncEls } } -template<typename _StoreT, typename _Blk1, typename _FuncElem, typename _FuncElse> -std::pair<typename _StoreT::const_iterator, typename _StoreT::size_type> +template<typename StoreT, typename Blk1, typename FuncElem, typename FuncElse> +std::pair<typename StoreT::const_iterator, typename StoreT::size_type> FindElement1( - const _StoreT& rStore, typename _StoreT::size_type nStart, typename _StoreT::size_type nEnd, - _FuncElem& rFuncElem, _FuncElse& rFuncElse) + const StoreT& rStore, typename StoreT::size_type nStart, typename StoreT::size_type nEnd, + FuncElem& rFuncElem, FuncElse& rFuncElse) { - typedef std::pair<typename _StoreT::const_iterator, typename _StoreT::size_type> PositionType; - typedef std::pair<typename _StoreT::size_type, bool> ElseRetType; + typedef std::pair<typename StoreT::const_iterator, typename StoreT::size_type> PositionType; + typedef std::pair<typename StoreT::size_type, bool> ElseRetType; PositionType aPos = rStore.position(nStart); - typename _StoreT::const_iterator it = aPos.first; - typename _StoreT::size_type nOffset = aPos.second; - typename _StoreT::size_type nDataSize = 0; - typename _StoreT::size_type nTopRow = nStart; + typename StoreT::const_iterator it = aPos.first; + typename StoreT::size_type nOffset = aPos.second; + typename StoreT::size_type nDataSize = 0; + typename StoreT::size_type nTopRow = nStart; for (; it != rStore.end() && nTopRow <= nEnd; ++it, nOffset = 0, nTopRow += nDataSize) { @@ -402,9 +402,9 @@ FindElement1( switch (it->type) { - case _Blk1::block_type: + case Blk1::block_type: { - PositionType aRet = CheckElem<_Blk1>(rStore, it, nOffset, nDataSize, rFuncElem); + PositionType aRet = CheckElem<Blk1>(rStore, it, nOffset, nDataSize, rFuncElem); if (aRet.first != rStore.end()) return aRet; } @@ -424,20 +424,20 @@ FindElement1( return PositionType(rStore.end(), 0); } -template<typename _StoreT, typename _Blk1, typename _Blk2, typename _FuncElem, typename _FuncElse> -std::pair<typename _StoreT::const_iterator, typename _StoreT::size_type> +template<typename StoreT, typename Blk1, typename Blk2, typename FuncElem, typename FuncElse> +std::pair<typename StoreT::const_iterator, typename StoreT::size_type> FindElement2( - const _StoreT& rStore, typename _StoreT::size_type nStart, typename _StoreT::size_type nEnd, - _FuncElem& rFuncElem, _FuncElse& rFuncElse) + const StoreT& rStore, typename StoreT::size_type nStart, typename StoreT::size_type nEnd, + FuncElem& rFuncElem, FuncElse& rFuncElse) { - typedef std::pair<typename _StoreT::const_iterator, typename _StoreT::size_type> PositionType; - typedef std::pair<typename _StoreT::size_type, bool> ElseRetType; + typedef std::pair<typename StoreT::const_iterator, typename StoreT::size_type> PositionType; + typedef std::pair<typename StoreT::size_type, bool> ElseRetType; PositionType aPos = rStore.position(nStart); - typename _StoreT::const_iterator it = aPos.first; - typename _StoreT::size_type nOffset = aPos.second; - typename _StoreT::size_type nDataSize = 0; - typename _StoreT::size_type nTopRow = nStart; + typename StoreT::const_iterator it = aPos.first; + typename StoreT::size_type nOffset = aPos.second; + typename StoreT::size_type nDataSize = 0; + typename StoreT::size_type nTopRow = nStart; for (; it != rStore.end() && nTopRow <= nEnd; ++it, nOffset = 0, nTopRow += nDataSize) { @@ -452,16 +452,16 @@ FindElement2( switch (it->type) { - case _Blk1::block_type: + case Blk1::block_type: { - PositionType aRet = CheckElem<_Blk1>(rStore, it, nOffset, nDataSize, rFuncElem); + PositionType aRet = CheckElem<Blk1>(rStore, it, nOffset, nDataSize, rFuncElem); if (aRet.first != rStore.end()) return aRet; } break; - case _Blk2::block_type: + case Blk2::block_type: { - PositionType aRet = CheckElem<_Blk2>(rStore, it, nOffset, nDataSize, rFuncElem); + PositionType aRet = CheckElem<Blk2>(rStore, it, nOffset, nDataSize, rFuncElem); if (aRet.first != rStore.end()) return aRet; } diff --git a/sc/inc/sharedformula.hxx b/sc/inc/sharedformula.hxx index b3d761585a35..f4c8ab018532 100644 --- a/sc/inc/sharedformula.hxx +++ b/sc/inc/sharedformula.hxx @@ -29,10 +29,10 @@ public: * Group formula cells stored in the passed container. The formula cells * in the container are assumed to be all <b>non-shared</b>. */ - template<typename _Iter> - static void groupFormulaCells(const _Iter& itBeg, const _Iter& itEnd) + template<typename Iter> + static void groupFormulaCells(const Iter& itBeg, const Iter& itEnd) { - _Iter it = itBeg; + Iter it = itBeg; ScFormulaCell* pPrev = *it; ScFormulaCell* pCur = nullptr; for (++it; it != itEnd; ++it, pPrev = pCur) diff --git a/sc/inc/stlalgorithm.hxx b/sc/inc/stlalgorithm.hxx index 7cc5eebafece..678f30676c9c 100644 --- a/sc/inc/stlalgorithm.hxx +++ b/sc/inc/stlalgorithm.hxx @@ -21,7 +21,7 @@ namespace sc { * Custom allocator for STL container to ensure that the base address of * allocated storage is aligned to a specified boundary. */ -template<typename T, size_t _Alignment> +template<typename T, size_t Alignment> class AlignedAllocator { public: @@ -36,17 +36,17 @@ public: typedef T& reference; typedef const T& const_reference; - template<typename _Type2> + template<typename Type2> struct rebind { - typedef AlignedAllocator<_Type2,_Alignment> other; + typedef AlignedAllocator<Type2,Alignment> other; }; AlignedAllocator() {} ~AlignedAllocator() {} - template<typename _Type2> - AlignedAllocator(const AlignedAllocator<_Type2,_Alignment>&) {} + template<typename Type2> + AlignedAllocator(const AlignedAllocator<Type2,Alignment>&) {} static void construct(T* p, const value_type& val) { new(p) value_type(val); } static void destroy(T* p) @@ -65,7 +65,7 @@ public: static pointer allocate(size_type n) { - return static_cast<pointer>(rtl_allocateAlignedMemory(_Alignment, n*sizeof(value_type))); + return static_cast<pointer>(rtl_allocateAlignedMemory(Alignment, n*sizeof(value_type))); } static void deallocate(pointer p, size_type) |