summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-27 07:51:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-27 07:51:51 +0200
commit9a741fcad458875a806295ddbd41b68d82ce9095 (patch)
tree9d8ed908f43b459e221aef8a7d1da4b043ebbe40 /sc
parent3c6e378fd81b2bfd8a35e12557a90fa40428920e (diff)
loplugin:unreffun: also warn about unused function templates
Change-Id: I4a6280f47ca3c4a77b4e42fe05d79ded7fc30ef1
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dociter.cxx16
-rw-r--r--sc/source/core/tool/compiler.cxx15
-rw-r--r--sc/source/core/tool/rangelst.cxx24
-rw-r--r--sc/source/core/tool/refupdat.cxx57
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx8
5 files changed, 0 insertions, 120 deletions
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 568e5f5d915f..d6799d203a72 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -74,22 +74,6 @@ void decBlock(std::pair<_Iter, size_t>& rPos)
rPos.second = rPos.first->size - 1;
}
-template<typename _Iter>
-void incPos(std::pair<_Iter, size_t>& rPos)
-{
- if (rPos.second + 1 < rPos.first->size)
- // Increment within the block.
- ++rPos.second;
- else
- incBlock(rPos);
-}
-
-template<typename _Iter>
-size_t toLogicalPos(const std::pair<_Iter, size_t>& rPos)
-{
- return rPos.first->position + rPos.second;
-}
-
}
void ScAttrArray_IterGetNumberFormat( sal_uLong& nFormat, const ScAttrArray*& rpArr,
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 304767acff95..2af538343666 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3986,21 +3986,6 @@ bool ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
return true;
}
-template< typename T, typename S >
-static S lcl_adjval( S& n, T pos, T max, bool bRel )
-{
- max++;
- if( bRel )
- n = sal::static_int_cast<S>( n + pos );
- if( n < 0 )
- n = sal::static_int_cast<S>( n + max );
- else if( n >= max )
- n = sal::static_int_cast<S>( n - max );
- if( bRel )
- n = sal::static_int_cast<S>( n - pos );
- return n;
-}
-
// reference of named range with relative references
void ScCompiler::SetRelNameReference()
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index e2e63fdef162..6e276bc8b713 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -581,30 +581,6 @@ bool handleOneRange( const ScRange& rDeleteRange, ScRange* p )
return false;
}
-/**
- * Check if the deleting range cuts the test range in the middle, to
- * separate it into exactly two pieces.
- *
- * Either
- * +--------+ +--+-+--+
- * | | | |x| |
- * +--------+ | |x| |
- * |xxxxxxxx| or | |x| |
- * +--------+ | |x| |
- * | | | |x| |
- * +--------+ +--+-+--+
- * where xxx is the deleted region.
- */
-template<typename X, typename Y>
-bool checkForTwoRangesCase2(
- X nDeleteX1, X nDeleteX2, Y nDeleteY1, Y nDeleteY2, X nX1, X nX2, Y nY1, Y nY2)
-{
- if (nY1 < nDeleteY1 && nDeleteY2 < nY2 && nDeleteX1 <= nX1 && nX2 <= nDeleteX2)
- return true;
-
- return false;
-}
-
bool handleTwoRanges( const ScRange& rDeleteRange, ScRange* p, std::vector<ScRange>& rNewRanges )
{
const ScAddress& rDelStart = rDeleteRange.aStart;
diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx
index 7cab89909de8..b8c21d7e3609 100644
--- a/sc/source/core/tool/refupdat.cxx
+++ b/sc/source/core/tool/refupdat.cxx
@@ -129,63 +129,6 @@ static void lcl_MoveItWrap( R& rRef, S nDelta, U nMask )
}
template< typename R, typename S, typename U >
-static bool lcl_MoveRefPart( R& rRef1Val, bool& rRef1Del, bool bDo1,
- R& rRef2Val, bool& rRef2Del, bool bDo2,
- U nStart, U nEnd, S nDelta, U nMask )
-{
- if ( nDelta )
- {
- bool bDel, bCut1, bCut2;
- bDel = bCut1 = bCut2 = false;
- S n;
- if (bDo1 && bDo2)
- {
- if ( nDelta < 0 )
- {
- n = nStart + nDelta;
- if ( n <= rRef1Val && rRef1Val < nStart
- && n <= rRef2Val && rRef2Val < nStart )
- bDel = true;
- }
- else
- {
- n = nEnd + nDelta;
- if ( nEnd < rRef1Val && rRef1Val <= n
- && nEnd < rRef2Val && rRef2Val <= n )
- bDel = true;
- }
- }
- if ( bDel )
- { // move deleted along
- rRef1Val = sal::static_int_cast<R>( rRef1Val + nDelta );
- rRef2Val = sal::static_int_cast<R>( rRef2Val + nDelta );
- }
- else
- {
- if (bDo1)
- {
- if ( rRef1Del )
- rRef1Val = sal::static_int_cast<R>( rRef1Val + nDelta );
- else
- bCut1 = lcl_MoveStart( rRef1Val, nStart, nDelta, nMask );
- }
- if (bDo2)
- {
- if ( rRef2Del )
- rRef2Val = sal::static_int_cast<R>( rRef2Val + nDelta );
- else
- bCut2 = lcl_MoveEnd( rRef2Val, nStart, nDelta, nMask );
- }
- }
- if ( bDel || (bCut1 && bCut2) )
- rRef1Del = rRef2Del = true;
- return bDel || bCut1 || bCut2 || rRef1Del || rRef2Del;
- }
- else
- return false;
-}
-
-template< typename R, typename S, typename U >
bool IsExpand( R n1, R n2, U nStart, S nD )
{ //! vor normalem Move...
return
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 7dd7847d1483..5cd73600141d 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -116,14 +116,6 @@ const sal_uInt16 BIFF12_CFRULE_ABOVEAVERAGE = 0x0004;
const sal_uInt16 BIFF12_CFRULE_BOTTOM = 0x0008;
const sal_uInt16 BIFF12_CFRULE_PERCENT = 0x0010;
-template< typename Type >
-void lclAppendProperty( ::std::vector< PropertyValue >& orProps, const OUString& rPropName, const Type& rValue )
-{
- orProps.push_back( PropertyValue() );
- orProps.back().Name = rPropName;
- orProps.back().Value <<= rValue;
-}
-
void SetCfvoData( ColorScaleRuleModelEntry* pEntry, const AttributeList& rAttribs )
{
OUString aType = rAttribs.getString( XML_type, OUString() );