summaryrefslogtreecommitdiff
path: root/basebmp
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-27 02:22:20 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-10-27 08:15:20 +0000
commit1b4dff2c371d31c99f34324c3f6f31888bdc34d7 (patch)
tree29e68995824dccfe0c51dd2d922d183121f71051 /basebmp
parent60cf585a487966d1fe25ef2607ff601480be9cdd (diff)
loplugin:unusedmethods
Change-Id: If703da1323e38df1c5e84d97a7d467dc8e639421 Reviewed-on: https://gerrit.libreoffice.org/19618 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'basebmp')
-rw-r--r--basebmp/inc/accessor.hxx11
-rw-r--r--basebmp/inc/accessoradapters.hxx104
-rw-r--r--basebmp/inc/colorblendaccessoradapter.hxx19
-rw-r--r--basebmp/inc/colortraits.hxx12
-rw-r--r--basebmp/inc/compositeiterator.hxx24
-rw-r--r--basebmp/inc/endian.hxx4
-rw-r--r--basebmp/inc/genericcolorimageaccessor.hxx10
-rw-r--r--basebmp/inc/packedpixeliterator.hxx49
-rw-r--r--basebmp/inc/paletteimageaccessor.hxx15
-rw-r--r--basebmp/inc/pixeliterator.hxx45
-rw-r--r--basebmp/inc/tools.hxx11
11 files changed, 0 insertions, 304 deletions
diff --git a/basebmp/inc/accessor.hxx b/basebmp/inc/accessor.hxx
index 828d8feafdc7..1aaae4c978d7 100644
--- a/basebmp/inc/accessor.hxx
+++ b/basebmp/inc/accessor.hxx
@@ -57,11 +57,6 @@ public:
*i = vigra::detail::RequiresExplicitCast<value_type>::cast(value);
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- i[diff] = vigra::detail::RequiresExplicitCast<value_type>::cast(value);
- }
};
@@ -98,12 +93,6 @@ public:
i.set( vigra::detail::RequiresExplicitCast<value_type>::cast(value) );
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- i.set( vigra::detail::RequiresExplicitCast<value_type>::cast(value),
- diff );
- }
};
} // namespace basebmp
diff --git a/basebmp/inc/accessoradapters.hxx b/basebmp/inc/accessoradapters.hxx
index 86805653e935..109fe92e12f9 100644
--- a/basebmp/inc/accessoradapters.hxx
+++ b/basebmp/inc/accessoradapters.hxx
@@ -92,23 +92,11 @@ public:
{}
-
- WrappedAccessor const& getWrappedAccessor() const { return maAccessor; }
- WrappedAccessor& getWrappedAccessor() { return maAccessor; }
-
-
-
- value_type getter(typename GetterFunctor::argument_type v) const
- {
- return maGetterFunctor(v);
- }
typename SetterFunctor::result_type setter(argument_type v) const
{
return maSetterFunctor(v);
}
-
-
template< class Iterator >
value_type operator()(Iterator const& i) const
{
@@ -132,16 +120,6 @@ public:
i );
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- maAccessor.set(
- maSetterFunctor(
- vigra::detail::RequiresExplicitCast<argument_type>::cast(value) ),
- i,
- diff );
- }
-
};
@@ -203,19 +181,6 @@ public:
- WrappedAccessor const& getWrappedAccessor() const { return maAccessor; }
- WrappedAccessor& getWrappedAccessor() { return maAccessor; }
-
-
-
- static typename SetterFunctor::result_type setter(
- typename SetterFunctor::first_argument_type v1,
- argument_type v2 )
- {
- return maSetterFunctor(v1,v2);
- }
-
-
template< class Iterator >
value_type operator()(Iterator const& i) const
@@ -240,16 +205,6 @@ public:
i );
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- maAccessor.set(
- maFunctor(maAccessor(i,diff),
- vigra::detail::RequiresExplicitCast<argument_type>::cast(value)),
- i,
- diff );
- }
-
};
@@ -338,19 +293,6 @@ public:
WrappedAccessor1 const& get1stWrappedAccessor() const { return ma1stAccessor; }
WrappedAccessor1& get1stWrappedAccessor() { return ma1stAccessor; }
- WrappedAccessor2 const& get2ndWrappedAccessor() const { return ma2ndAccessor; }
- WrappedAccessor2& get2ndWrappedAccessor() { return ma2ndAccessor; }
-
-
-
- static typename Functor::result_type setter(
- typename Functor::first_argument_type v1,
- typename Functor::second_argument_type v2,
- argument_type v3 )
- {
- return maSetterFunctor(v1,v2,v3);
- }
-
template< class Iterator >
@@ -377,17 +319,6 @@ public:
i.first() );
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- ma1stAccessor.set(
- maFunctor(ma1stAccessor(i.first(), diff),
- ma2ndAccessor(i.second(),diff),
- vigra::detail::RequiresExplicitCast<argument_type>::cast(value)),
- i.first(),
- diff );
- }
-
};
@@ -459,13 +390,6 @@ public:
- WrappedAccessor1 const& get1stWrappedAccessor() const { return ma1stAccessor; }
- WrappedAccessor1& get1stWrappedAccessor() { return ma1stAccessor; }
-
- WrappedAccessor2 const& get2ndWrappedAccessor() const { return ma2ndAccessor; }
- WrappedAccessor2& get2ndWrappedAccessor() { return ma2ndAccessor; }
-
-
template< class Iterator >
value_type operator()(Iterator const& i) const
@@ -483,34 +407,6 @@ public:
- template< typename V, class Iterator >
- void set(V const& value, Iterator const& i) const
- {
- ma1stAccessor.set(
- vigra::detail::RequiresExplicitCast<typename WrappedAccessor1::value_type>::cast(
- value.first),
- i.first() );
- ma2ndAccessor.set(
- vigra::detail::RequiresExplicitCast<typename WrappedAccessor2::value_type>::cast(
- value.second),
- i.second() );
- }
-
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- ma1stAccessor.set(
- vigra::detail::RequiresExplicitCast<typename WrappedAccessor1::value_type>::cast(
- value.first),
- i.first(),
- diff );
- ma2ndAccessor.set(
- vigra::detail::RequiresExplicitCast<typename WrappedAccessor2::value_type>::cast(
- value.second),
- i.second(),
- diff );
- }
-
};
} // namespace basebmp
diff --git a/basebmp/inc/colorblendaccessoradapter.hxx b/basebmp/inc/colorblendaccessoradapter.hxx
index b9465fb4a584..767d55eb7491 100644
--- a/basebmp/inc/colorblendaccessoradapter.hxx
+++ b/basebmp/inc/colorblendaccessoradapter.hxx
@@ -86,14 +86,6 @@ public:
void setColor( color_type col ) { maBlendColor=col; }
- color_type getColor() { return maBlendColor; }
- void setGetterValue( value_type val ) { maGetterValue=val; }
- value_type getGetterValue() { return maGetterValue; }
-
-
-
- WrappedAccessor const& getWrappedAccessor() const { return maWrappee; }
- WrappedAccessor& getWrappedAccessor() { return maWrappee; }
@@ -122,17 +114,6 @@ public:
i );
}
- template< typename V, typename IteratorType, class Difference >
- void set(V const& value, IteratorType const& i, Difference const& diff) const
- {
- maWrappee.set(
- maFunctor(
- vigra::detail::RequiresExplicitCast<alpha_type>::cast(value),
- maWrappee(i,diff),
- maBlendColor),
- i,
- diff );
- }
};
} // namespace basebmp
diff --git a/basebmp/inc/colortraits.hxx b/basebmp/inc/colortraits.hxx
index 5a54645dc05a..cee85078fccb 100644
--- a/basebmp/inc/colortraits.hxx
+++ b/basebmp/inc/colortraits.hxx
@@ -113,21 +113,9 @@ template< typename ColorType > struct ColorTraits
IntegerBlendFunctor< ColorType, AlphaType, polarity >,
BlendFunctor< ColorType, AlphaType, polarity > > {};
- /// @return number of color channels
- static int numChannels() { return 1; }
-
/// Type of a color component (i.e. the type of an individual channel)
typedef ColorType component_type;
- static inline component_type toGreyscale( ColorType c )
- {
- return c;
- }
-
- static inline ColorType fromGreyscale( component_type c )
- {
- return c;
- }
};
} // namespace basebmp
diff --git a/basebmp/inc/compositeiterator.hxx b/basebmp/inc/compositeiterator.hxx
index 2db654aa093d..31d98ffd3e9c 100644
--- a/basebmp/inc/compositeiterator.hxx
+++ b/basebmp/inc/compositeiterator.hxx
@@ -209,30 +209,6 @@ namespace detail
return ret;
}
- value_type get() const
- {
- return value_type(pImpl->maIter1.get(),
- pImpl->maIter2.get());
- }
-
- value_type get(difference_type const & d) const
- {
- return value_type(pImpl->maIter1.get(d),
- pImpl->maIter2.get(d));
- }
-
- void set( value_type v ) const
- {
- pImpl->maIter1.set(v);
- pImpl->maIter2.set(v);
- }
-
- void set( value_type v, difference_type const & d ) const
- {
- pImpl->maIter1.set(v,d);
- pImpl->maIter2.set(v,d);
- }
-
CompositeIteratorBase& operator=(const CompositeIteratorBase& rNew)
{
this->pImpl->maIter1 = rNew.pImpl->maIter1;
diff --git a/basebmp/inc/endian.hxx b/basebmp/inc/endian.hxx
index a924f5a71a86..e3c25eb77178 100644
--- a/basebmp/inc/endian.hxx
+++ b/basebmp/inc/endian.hxx
@@ -35,11 +35,7 @@ template< typename T > inline T byteSwap( T );
}
// byteSwap<T> shall fail for any type T not in the list below
-BASEBMP_BYTE_SWAP(sal_Int8,)
-BASEBMP_BYTE_SWAP(sal_uInt8,)
-BASEBMP_BYTE_SWAP(sal_Int16,OSL_SWAPWORD)
BASEBMP_BYTE_SWAP(sal_uInt16,OSL_SWAPWORD)
-BASEBMP_BYTE_SWAP(sal_Int32,OSL_SWAPDWORD)
BASEBMP_BYTE_SWAP(sal_uInt32,OSL_SWAPDWORD)
#undef BASEBMP_BYTE_SWAP
diff --git a/basebmp/inc/genericcolorimageaccessor.hxx b/basebmp/inc/genericcolorimageaccessor.hxx
index 3db0fde8adf9..346da7cd6b88 100644
--- a/basebmp/inc/genericcolorimageaccessor.hxx
+++ b/basebmp/inc/genericcolorimageaccessor.hxx
@@ -58,16 +58,6 @@ namespace basebmp
{ return mpDevice->getPixel( basegfx::B2IPoint( i[diff]->x,
i[diff]->y ) ); }
- template< typename Iterator >
- void set(Color const& value, Iterator const& i) const
- { return mpDevice->setPixel( basegfx::B2IPoint( i->x,i->y ),
- value, meDrawMode ); }
-
- template< class Iterator, class Difference >
- void set(value_type const& value, Iterator const& i, Difference const& diff) const
- { return mpDevice->setPixel( basegfx::B2IPoint( i[diff]->x,
- i[diff]->y ),
- value, meDrawMode ); }
};
}
diff --git a/basebmp/inc/packedpixeliterator.hxx b/basebmp/inc/packedpixeliterator.hxx
index b7bcac09487b..776a45e8e8f9 100644
--- a/basebmp/inc/packedpixeliterator.hxx
+++ b/basebmp/inc/packedpixeliterator.hxx
@@ -211,22 +211,12 @@ public:
return unsigned_cast<value_type>(*y() & mask_) >> shift_;
}
- value_type get(difference_type d) const
- {
- return unsigned_cast<value_type>(*y(d) & mask_) >> shift_;
- }
-
void set( value_type v ) const
{
const value_type pixel_value( (v << shift_) & mask_ );
*y() = (*y() & ~mask_) | pixel_value;
}
- void set( value_type v, difference_type d ) const
- {
- const value_type pixel_value( (v << shift_) & mask_ );
- *y(d) = (*y(d) & ~mask_) | pixel_value;
- }
};
template< typename Valuetype,
@@ -445,13 +435,6 @@ public:
MsbFirst>(remainder_);
}
- value_type get(difference_type d) const
- {
- PackedPixelRowIterator tmp(*this);
- tmp += d;
- return tmp.get();
- }
-
void set( value_type v ) const
{
const value_type pixel_value(
@@ -460,13 +443,6 @@ public:
& mask_ );
*data_ = (*data_ & ~mask_) | pixel_value;
}
-
- void set( value_type v, difference_type d ) const
- {
- PackedPixelRowIterator tmp(*this);
- tmp += d;
- tmp.set(v);
- }
};
/** 2D image iterator for packed pixel formats
@@ -513,11 +489,6 @@ private:
return y() + (x / num_intraword_positions);
}
- pointer current(int dx, int dy) const
- {
- return y(dy) + ((x+dx)/num_intraword_positions);
- }
-
bool equal(PackedPixelIterator const & rhs) const
{
return (x == rhs.x) && (y == rhs.y);
@@ -601,15 +572,6 @@ public:
>> get_shift<num_intraword_positions, bits_per_pixel, MsbFirst>(remainder));
}
- value_type get(difference_type const & d) const
- {
- const int remainder( x(d.x) % num_intraword_positions );
-
- return (unsigned_cast<value_type>(*current(d.x,d.y) &
- get_mask<value_type, bits_per_pixel, MsbFirst>(remainder))
- >> get_shift<num_intraword_positions, bits_per_pixel, MsbFirst>(remainder));
- }
-
void set( value_type v ) const
{
const int remainder( x % num_intraword_positions );
@@ -622,17 +584,6 @@ public:
*p = (*p & ~mask) | pixel_value;
}
- void set( value_type v, difference_type const & d ) const
- {
- const int remainder( (x + d.x) % num_intraword_positions );
- const int mask( get_mask<value_type, bits_per_pixel, MsbFirst>(remainder) );
- const value_type pixel_value(
- (v <<
- get_shift<num_intraword_positions, bits_per_pixel, MsbFirst>(remainder))
- & mask );
- pointer p = current(d.x,d.y);
- *p = (*p & ~mask) | pixel_value;
- }
};
diff --git a/basebmp/inc/paletteimageaccessor.hxx b/basebmp/inc/paletteimageaccessor.hxx
index 85d54885cf69..d62fb462dde7 100644
--- a/basebmp/inc/paletteimageaccessor.hxx
+++ b/basebmp/inc/paletteimageaccessor.hxx
@@ -88,11 +88,6 @@ public:
- Accessor const& getWrappedAccessor() const { return maAccessor; }
- Accessor& getWrappedAccessor() { return maAccessor; }
-
-
-
data_type lookup(value_type const& v) const
{
// TODO(P3): use table-based/octree approach here!
@@ -143,16 +138,6 @@ public:
vigra::detail::RequiresExplicitCast<value_type>::cast(value) ),
i );
}
-
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- maAccessor.set(
- lookup(
- vigra::detail::RequiresExplicitCast<value_type>::cast(value) ),
- i,
- diff );
- }
};
} // namespace basebmp
diff --git a/basebmp/inc/pixeliterator.hxx b/basebmp/inc/pixeliterator.hxx
index d38af98ca668..7f80c974503f 100644
--- a/basebmp/inc/pixeliterator.hxx
+++ b/basebmp/inc/pixeliterator.hxx
@@ -154,26 +154,6 @@ public:
return y - rhs.y;
}
- value_type get() const
- {
- return *y();
- }
-
- value_type get(difference_type d) const
- {
- return *y(d);
- }
-
- void set( value_type v ) const
- {
- *y() = v;
- }
-
- void set( value_type v, difference_type d ) const
- {
- *y(d) = v;
- }
-
reference operator*() const
{
return *y();
@@ -224,11 +204,6 @@ private:
return y() + x;
}
- pointer current(int dx, int dy) const
- {
- return y(dy) + x+dx;
- }
-
public:
PixelIterator() :
x(0),
@@ -296,26 +271,6 @@ public:
return column_iterator(y,x);
}
- value_type get() const
- {
- return *current();
- }
-
- value_type get(difference_type const & d) const
- {
- return *current(d.y, d.x);
- }
-
- void set( value_type v ) const
- {
- *current() = v;
- }
-
- void set( value_type v, difference_type const & d ) const
- {
- *current(d.y,d.x) = v;
- }
-
reference operator*() const
{
return *current();
diff --git a/basebmp/inc/tools.hxx b/basebmp/inc/tools.hxx
index c562a305aaed..e61d1ca27bba 100644
--- a/basebmp/inc/tools.hxx
+++ b/basebmp/inc/tools.hxx
@@ -59,17 +59,6 @@ namespace basebmp
template< class Iterator, class Accessor >
inline vigra::pair<Iterator,Accessor>
- srcIter(Iterator const& begin,
- Accessor const& accessor,
- const basegfx::B2IPoint& rPt)
- {
- return vigra::pair<Iterator,Accessor>(
- begin + vigra::Diff2D(rPt.getX(),rPt.getY()),
- accessor);
- }
-
- template< class Iterator, class Accessor >
- inline vigra::pair<Iterator,Accessor>
destIter(Iterator const& begin,
Accessor const& accessor,
const basegfx::B2IPoint& rPt)