summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-11-03 20:25:04 -0700
committerJoseph Powers <jpowers27@cox.net>2011-11-03 20:46:00 -0700
commitd0d62edf3f398e9ddb2fd0f1f5fbe1dd0393ff47 (patch)
tree2b3ce98e224f70fc2ee8783420ca506afb6a3d3f
parentremove some unneeded dependencies (diff)
downloadcore-d0d62edf3f398e9ddb2fd0f1f5fbe1dd0393ff47.tar.gz
core-d0d62edf3f398e9ddb2fd0f1f5fbe1dd0393ff47.zip
Cleanup basebmp a little
I removed 2 unused headers. I also stopped delivering a lot of headers that no one outside of basebmp cared about. I also removed the unused methods: basebmp::BitmapDevice::getPaletteEntryCount() const basebmp::BitmapDevice::getPixelData(basegfx::B2IPoint const&)
-rw-r--r--basebmp/Package_inc.mk31
-rw-r--r--basebmp/inc/basebmp/bitmapdevice.hxx16
-rw-r--r--basebmp/inc/basebmp/debug.hxx2
-rw-r--r--basebmp/inc/basebmp/linerenderer.hxx184
-rw-r--r--basebmp/inc/basebmp/truecolormaskaccessor.hxx293
-rw-r--r--basebmp/source/bitmapdevice.cxx21
-rw-r--r--unusedcode.easy2
-rw-r--r--vcl/Library_vclplug_gtk3.mk1
-rw-r--r--vcl/Library_vclplug_svp.mk3
-rw-r--r--vcl/headless/svpgdi.cxx1
-rw-r--r--vcl/headless/svpprn.cxx3
-rw-r--r--vcl/headless/svppspgraphics.cxx200
-rw-r--r--vcl/headless/svptext.cxx1
-rw-r--r--vcl/inc/headless/svpprn.hxx2
-rw-r--r--vcl/inc/headless/svppspgraphics.hxx43
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx7
16 files changed, 5 insertions, 805 deletions
diff --git a/basebmp/Package_inc.mk b/basebmp/Package_inc.mk
index 5619a30b2fdb..b1298e9251b4 100644
--- a/basebmp/Package_inc.mk
+++ b/basebmp/Package_inc.mk
@@ -2,7 +2,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -27,40 +27,11 @@
#*************************************************************************
$(eval $(call gb_Package_Package,basebmp_inc,$(SRCDIR)/basebmp/inc))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/accessor.hxx,basebmp/accessor.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/accessoradapters.hxx,basebmp/accessoradapters.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/accessorfunctors.hxx,basebmp/accessorfunctors.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/accessortraits.hxx,basebmp/accessortraits.hxx))
$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/bitmapdevice.hxx,basebmp/bitmapdevice.hxx))
$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/basebmpdllapi.h,basebmp/basebmpdllapi.h))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/clippedlinerenderer.hxx,basebmp/clippedlinerenderer.hxx))
$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/color.hxx,basebmp/color.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/colorblendaccessoradapter.hxx,basebmp/colorblendaccessoradapter.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/colormisc.hxx,basebmp/colormisc.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/colortraits.hxx,basebmp/colortraits.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/compositeiterator.hxx,basebmp/compositeiterator.hxx))
$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/debug.hxx,basebmp/debug.hxx))
$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/drawmodes.hxx,basebmp/drawmodes.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/endian.hxx,basebmp/endian.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/fillimage.hxx,basebmp/fillimage.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/genericcolorimageaccessor.hxx,basebmp/genericcolorimageaccessor.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/greylevelformats.hxx,basebmp/greylevelformats.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/iteratortraits.hxx,basebmp/iteratortraits.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/linerenderer.hxx,basebmp/linerenderer.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/metafunctions.hxx,basebmp/metafunctions.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/nonstandarditerator.hxx,basebmp/nonstandarditerator.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/packedpixeliterator.hxx,basebmp/packedpixeliterator.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/paletteformats.hxx,basebmp/paletteformats.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/paletteimageaccessor.hxx,basebmp/paletteimageaccessor.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/pixelformatadapters.hxx,basebmp/pixelformatadapters.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/pixeliterator.hxx,basebmp/pixeliterator.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/polypolygonrenderer.hxx,basebmp/polypolygonrenderer.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/rgb24pixelformats.hxx,basebmp/rgb24pixelformats.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/rgbmaskpixelformats.hxx,basebmp/rgbmaskpixelformats.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/scaleimage.hxx,basebmp/scaleimage.hxx))
$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/scanlineformats.hxx,basebmp/scanlineformats.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/stridedarrayiterator.hxx,basebmp/stridedarrayiterator.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/tools.hxx,basebmp/tools.hxx))
-$(eval $(call gb_Package_add_file,basebmp_inc,inc/basebmp/truecolormaskaccessor.hxx,basebmp/truecolormaskaccessor.hxx))
# vim: set noet sw=4 ts=4:
diff --git a/basebmp/inc/basebmp/bitmapdevice.hxx b/basebmp/inc/basebmp/bitmapdevice.hxx
index f97ec4fc8778..62b459bfc7eb 100644
--- a/basebmp/inc/basebmp/bitmapdevice.hxx
+++ b/basebmp/inc/basebmp/bitmapdevice.hxx
@@ -140,12 +140,6 @@ public:
*/
PaletteMemorySharedVector getPalette() const;
- /** Query number of palette entries.
-
- This is just a frontend for getPalette->size()
- */
- sal_Int32 getPaletteEntryCount() const;
-
/** Clear whole device with given color
This method works like a fill with the given color value,
@@ -192,14 +186,6 @@ public:
*/
Color getPixel( const basegfx::B2IPoint& rPt );
- /** Get underlying pixel data value at given position
-
- This method returns the raw pixel data. In the case of
- paletted bitmaps, this is the palette index, not the final
- color value.
- */
- sal_uInt32 getPixelData( const basegfx::B2IPoint& rPt );
-
/** Draw a line
@param rPt1
@@ -584,8 +570,6 @@ private:
virtual Color getPixel_i( const basegfx::B2IPoint& rPt ) = 0;
- virtual sal_uInt32 getPixelData_i( const basegfx::B2IPoint& rPt ) = 0;
-
virtual void drawLine_i( const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
const basegfx::B2IBox& rBounds,
diff --git a/basebmp/inc/basebmp/debug.hxx b/basebmp/inc/basebmp/debug.hxx
index e9481ac3d112..0193af7e1498 100644
--- a/basebmp/inc/basebmp/debug.hxx
+++ b/basebmp/inc/basebmp/debug.hxx
@@ -44,6 +44,8 @@ namespace basebmp
@param rOutputStream
Stream to write output to.
+
+ Used in vcl/headless/svpgdi.cxx when OSL_DEBUG_LEVEL > 2
*/
void BASEBMP_DLLPUBLIC debugDump( const boost::shared_ptr< BitmapDevice >& rDevice,
::std::ostream& rOutputStream );
diff --git a/basebmp/inc/basebmp/linerenderer.hxx b/basebmp/inc/basebmp/linerenderer.hxx
deleted file mode 100644
index 5e3d4df30b88..000000000000
--- a/basebmp/inc/basebmp/linerenderer.hxx
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_BASEBMP_LINERENDERER_HXX
-#define INCLUDED_BASEBMP_LINERENDERER_HXX
-
-#include <basegfx/point/b2ipoint.hxx>
-
-#include <vigra/diff2d.hxx>
-#include <vigra/iteratortraits.hxx>
-
-
-/* Scan-converting lines */
-
-namespace basebmp
-{
-
-/** Render line with Bresenham
-
- This function renders the line given by rPt1 and rPt2 using the
- Bresenham algorithm with the specified color value. Make sure rPt1
- and rPt1 are valid coordinates in the image given by begin and
- end, since no clipping takes place.
-
- @param aPt1
- Start point of the line
-
- @param aPt2
- End point of the line
-
- @param color
- Color value to render the line with
-
- @param begin
- left-top image iterator
-
- @param end
- right-bottom image iterator
-
- @param acc
- Image accessor
-
- @param bRoundTowardsPt2
- Rounding mode to use. Giving false here results in line pixel tend
- towards pt1, i.e. when a pixel exactly hits the middle between two
- pixel, the pixel closer to pt1 will be chosen. Giving true here
- makes renderClippedLine() choose pt2 in those cases.
- */
-template< class Iterator, class Accessor >
-void renderLine( const basegfx::B2IPoint& rPt1,
- const basegfx::B2IPoint& rPt2,
- typename Accessor::value_type color,
- Iterator begin,
- Accessor acc,
- bool bRoundTowardsPt2=false )
-{
- // code inspired by Paul Heckbert's Digital Line Drawing
- // (Graphics Gems, Academic Press 1990)
- const sal_Int32 x1 = rPt1.getX();
- const sal_Int32 x2 = rPt2.getX();
- const sal_Int32 y1 = rPt1.getY();
- const sal_Int32 y2 = rPt2.getY();
-
- // TODO(E1): This might overflow
- sal_Int32 adx = x2 - x1;
- int sx = 1;
- if( adx < 0 )
- {
- adx *= -1;
- sx = -1;
- }
-
- // TODO(E1): This might overflow
- sal_Int32 ady = y2 - y1;
- int sy = 1;
- if( ady < 0 )
- {
- ady *= -1;
- sy = -1;
- }
-
- // TODO(P3): handle horizontal and vertical lines specially
- sal_Int32 xs = x1;
- sal_Int32 ys = y1;
- if( adx >= ady )
- {
- // semi-horizontal line
- sal_Int32 rem = 2*ady - adx - !bRoundTowardsPt2;
- adx *= 2;
- ady *= 2;
-
- Iterator currIter( begin + vigra::Diff2D(0,ys) );
- typename vigra::IteratorTraits<Iterator>::row_iterator
- rowIter( currIter.rowIterator() + xs );
- while(true)
- {
- acc.set(color, rowIter);
-
- if( xs == x2 )
- return;
-
- if( rem >= 0 )
- {
- ys += sy;
- xs += sx;
- currIter.y += sy;
- rowIter = currIter.rowIterator() + xs;
- rem -= adx;
- }
- else
- {
- xs += sx;
- rowIter += sx;
- }
-
- rem += ady;
- }
- }
- else
- {
- // semi-vertical line
- sal_Int32 rem = 2*adx - ady - !bRoundTowardsPt2;
- adx *= 2;
- ady *= 2;
-
- Iterator currIter( begin + vigra::Diff2D(xs,0) );
- typename vigra::IteratorTraits<Iterator>::column_iterator
- colIter( currIter.columnIterator() + ys );
- while(true)
- {
- acc.set(color, colIter);
-
- if( ys == y2 )
- return;
-
- if( rem >= 0 )
- {
- xs += sx;
- ys += sy;
- currIter.x += sx;
- colIter = currIter.columnIterator() + ys;
- rem -= ady;
- }
- else
- {
- ys += sy;
- colIter += sy;
- }
-
- rem += adx;
- }
- }
-}
-
-} // namespace basebmp
-
-#endif /* INCLUDED_BASEBMP_LINERENDERER_HXX */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/inc/basebmp/truecolormaskaccessor.hxx b/basebmp/inc/basebmp/truecolormaskaccessor.hxx
deleted file mode 100644
index 79693a7b0ebb..000000000000
--- a/basebmp/inc/basebmp/truecolormaskaccessor.hxx
+++ /dev/null
@@ -1,293 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_BASEBMP_TRUECOLORMASKACCESSOR_HXX
-#define INCLUDED_BASEBMP_TRUECOLORMASKACCESSOR_HXX
-
-#include <basebmp/colortraits.hxx>
-#include <basebmp/accessortraits.hxx>
-#include <basebmp/metafunctions.hxx>
-#include <basebmp/endian.hxx>
-
-#include <vigra/numerictraits.hxx>
-#include <vigra/metaprogramming.hxx>
-
-namespace basebmp
-{
-
-namespace
-{
- /// Shift left for positive shift value, and right otherwise
- template< typename T > inline T shiftLeft( T v, int shift )
- {
- return shift > 0 ? v << shift : v >> (-shift);
- }
-
- /// Shift right for positive shift value, and left otherwise
- template< typename T > inline T shiftRight( T v, int shift )
- {
- return shift > 0 ? v >> shift : v << (-shift);
- }
-}
-
-/** Access true color data, which is pixel-packed into a POD.
-
- @tpl Accessor
- Wrapped accessor, used to access the actual pixel values
-
- @tpl ColorType
- Underlying color type, to convert the pixel values into
-
- @tpl RedMask
- Bitmask, to access the red bits in the data type
-
- @tpl GreenMask
- Bitmask, to access the green bits in the data type
-
- @tpl BlueMask
- Bitmask, to access the blue bits in the data type
-
- @tpl SwapBytes
- When true, the final pixel values will be byte-swapped before
- passed to/from the iterator.
- */
-template< class Accessor,
- typename ColorType,
- int RedMask,
- int GreenMask,
- int BlueMask,
- bool SwapBytes > class TrueColorMaskAccessor
-{
-public:
- typedef typename Accessor::value_type data_type;
- typedef ColorType value_type;
- typedef typename make_unsigned<data_type>::type unsigned_data_type;
- typedef typename ColorTraits<ColorType>::component_type component_type;
-
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-// making all members public, if no member template friends
-private:
- template<class A, typename C, int R, int G, int B, bool S> friend class TrueColorMaskAccessor;
-#endif
-
- Accessor maAccessor;
-
-public:
- // calc corrective shifts for all three channels in advance
- enum {
- red_shift = numberOfTrailingZeros<RedMask>::value,
- green_shift = numberOfTrailingZeros<GreenMask>::value,
- blue_shift = numberOfTrailingZeros<BlueMask>::value,
-
- red_bits = bitcount<RedMask>::value,
- green_bits = bitcount<GreenMask>::value,
- blue_bits = bitcount<BlueMask>::value
- };
-
- // -------------------------------------------------------
-
- TrueColorMaskAccessor() :
- maAccessor()
- {}
-
- template< class A > explicit
- TrueColorMaskAccessor( TrueColorMaskAccessor< A,
- ColorType,
- RedMask,
- GreenMask,
- BlueMask,
- SwapBytes > const& rSrc ) :
- maAccessor( rSrc.maAccessor )
- {}
-
- template< class T > explicit TrueColorMaskAccessor( T accessor ) :
- maAccessor(accessor)
- {}
-
- // -------------------------------------------------------
-
- Accessor const& getWrappedAccessor() const { return maAccessor; }
- Accessor& getWrappedAccessor() { return maAccessor; }
-
- // -------------------------------------------------------
-
- value_type toValue( unsigned_data_type v ) const
- {
- v = SwapBytes ? byteSwap(v) : v;
-
- const unsigned_data_type red (v & RedMask);
- const unsigned_data_type green(v & GreenMask);
- const unsigned_data_type blue (v & BlueMask);
-
- value_type res( (shiftRight(red,
- red_shift-8*sizeof(component_type)+red_bits)) |
- (shiftRight(red,
- red_shift-8*sizeof(component_type)+2*red_bits)),
-
- (shiftRight(green,
- green_shift-8*sizeof(component_type)+green_bits)) |
- (shiftRight(green,
- green_shift-8*sizeof(component_type)+2*green_bits)),
-
- (shiftRight(blue,
- blue_shift-8*sizeof(component_type)+blue_bits)) |
- (shiftRight(blue,
- blue_shift-8*sizeof(component_type)+2*blue_bits)) );
- return res;
- }
-
- data_type toPacked( value_type v ) const
- {
- const unsigned_data_type red (v.getRed());
- const unsigned_data_type green(v.getGreen());
- const unsigned_data_type blue (v.getBlue());
-
- unsigned_data_type res(
- (shiftLeft(red,
- red_shift-8*sizeof(component_type)+red_bits) & RedMask) |
- (shiftLeft(green,
- green_shift-8*sizeof(component_type)+green_bits) & GreenMask) |
- (shiftLeft(blue,
- blue_shift-8*sizeof(component_type)+blue_bits) & BlueMask) );
-
- return SwapBytes ? byteSwap(res) : res;
- }
-
- // -------------------------------------------------------
-
- template< class Iterator >
- value_type operator()(Iterator const& i) const
- {
- return toValue(
- unsigned_cast<data_type>( maAccessor(i)) );
- }
-
- template< class Iterator, class Difference >
- value_type operator()(Iterator const& i, Difference const& diff) const
- {
- return toValue(
- unsigned_cast<data_type>( maAccessor(i,diff)) );
- }
-
- // -------------------------------------------------------
-
- template< typename V, class Iterator >
- void set(V const& value, Iterator const& i) const
- {
- maAccessor.set(
- toPacked(
- 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(
- toPacked(
- vigra::detail::RequiresExplicitCast<value_type>::cast(
- value)),
- i,
- diff );
- }
-};
-
-//-----------------------------------------------------------------------------
-
-/** Convert Color to packed true color value for TrueColorMaskAccessor
- */
-template< class Accessor > struct ColorConvert
-{
- typename Accessor::data_type operator()( const Accessor& acc,
- typename Accessor::value_type v )
- {
- return acc.toPacked(v);
- }
-};
-
-//-----------------------------------------------------------------------------
-
-// partial specialization for TrueColorMaskAccessor
-template< class Accessor,
- typename ColorType,
- int RedMask,
- int GreenMask,
- int BlueMask,
- bool SwapBytes > struct AccessorTraits<
- TrueColorMaskAccessor< Accessor,
- ColorType,
- RedMask,
- GreenMask,
- BlueMask,
- SwapBytes > >
-{
- /// value type of described accessor
- typedef typename TrueColorMaskAccessor< Accessor,
- ColorType,
- RedMask,
- GreenMask,
- BlueMask,
- SwapBytes >::value_type value_type;
-
- /// Retrieve stand-alone color lookup function for given Accessor type
- typedef ColorConvert< TrueColorMaskAccessor< Accessor,
- ColorType,
- RedMask,
- GreenMask,
- BlueMask,
- SwapBytes > > color_lookup;
-
- /// Retrieve raw pixel data accessor for given Accessor type
- typedef Accessor raw_accessor;
-
- /** accessor for XOR setter access is disabled, since the results
- * are usually completely unintended - you'll usually want to
- * wrap an xor_accessor with a TrueColorMaskAccessor, not the
- * other way around.
- */
- typedef vigra::VigraFalseType xor_accessor;
-
- /** accessor for masked setter access is disabled, since the
- * results are usually completely unintended - you'll usually
- * want to wrap a masked_accessor with a TrueColorMaskAccessor,
- * not the other way around.
- */
- template< class MaskAccessor,
- class Iterator,
- class MaskIterator > struct masked_accessor
- {
- typedef vigra::VigraFalseType type;
- };
-};
-
-} // namespace basebmp
-
-#endif /* INCLUDED_BASEBMP_TRUECOLORMASKACCESSOR_HXX */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index c307a4ac55e2..958b8755d49e 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -452,14 +452,6 @@ namespace
return maAccessor(pixel);
}
- virtual sal_uInt32 getPixelData_i( const basegfx::B2IPoint& rPt )
- {
- const DestIterator pixel( maBegin +
- vigra::Diff2D(rPt.getX(),
- rPt.getY()) );
- return maToUInt32Converter(maRawAccessor(pixel));
- }
-
template< typename Iterator, typename Col, typename RawAcc >
void implRenderLine2( const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
@@ -1143,11 +1135,6 @@ PaletteMemorySharedVector BitmapDevice::getPalette() const
return mpImpl->mpPalette;
}
-sal_Int32 BitmapDevice::getPaletteEntryCount() const
-{
- return mpImpl->mpPalette ? mpImpl->mpPalette->size() : 0;
-}
-
void BitmapDevice::clear( Color fillColor )
{
clear_i( fillColor, mpImpl->maBounds );
@@ -1189,14 +1176,6 @@ Color BitmapDevice::getPixel( const basegfx::B2IPoint& rPt )
return Color();
}
-sal_uInt32 BitmapDevice::getPixelData( const basegfx::B2IPoint& rPt )
-{
- if( mpImpl->maBounds.isInside(rPt) )
- return getPixelData_i(rPt);
-
- return 0;
-}
-
void BitmapDevice::drawLine( const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
Color lineColor,
diff --git a/unusedcode.easy b/unusedcode.easy
index df42230057f3..a22c390cfa45 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1351,8 +1351,6 @@ _ZSortFlys_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(_ZSor
avmedia::priv::MediaWindowBaseImpl::getStopTime() const
avmedia::priv::MediaWindowBaseImpl::setRate(double)
avmedia::priv::MediaWindowBaseImpl::setStopTime(double)
-basebmp::BitmapDevice::getPaletteEntryCount() const
-basebmp::BitmapDevice::getPixelData(basegfx::B2IPoint const&)
basebmp::debugDump(boost::shared_ptr<basebmp::BitmapDevice> const&, std::basic_ostream<char, std::char_traits<char> >&)
basegfx::B1DRange::B1DRange(basegfx::B1IRange const&)
basegfx::B2DCubicBezier::B2DCubicBezier(basegfx::B2DPoint const&, basegfx::B2DPoint const&)
diff --git a/vcl/Library_vclplug_gtk3.mk b/vcl/Library_vclplug_gtk3.mk
index d328e81c1a67..946a624fc9fd 100644
--- a/vcl/Library_vclplug_gtk3.mk
+++ b/vcl/Library_vclplug_gtk3.mk
@@ -112,7 +112,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gtk3,\
vcl/headless/svpelement \
vcl/headless/svpframe \
vcl/headless/svpprn \
- vcl/headless/svppspgraphics \
vcl/headless/svptext \
vcl/headless/svpvd \
))
diff --git a/vcl/Library_vclplug_svp.mk b/vcl/Library_vclplug_svp.mk
index cfc5ead9f461..5feac24117c9 100644
--- a/vcl/Library_vclplug_svp.mk
+++ b/vcl/Library_vclplug_svp.mk
@@ -2,7 +2,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -82,7 +82,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_svp,\
vcl/headless/svpinst \
vcl/headless/svpdata \
vcl/headless/svpprn \
- vcl/headless/svppspgraphics \
vcl/headless/svptext \
vcl/headless/svpvd \
))
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index decd04d4f40f..bfd8d1a97b7b 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -46,7 +46,6 @@
#include <sys/stat.h>
#endif
-#include "headless/svppspgraphics.hxx"
#include <region.h>
#include <stdio.h>
diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx
index ff779f2662d1..533499e13919 100644
--- a/vcl/headless/svpprn.cxx
+++ b/vcl/headless/svpprn.cxx
@@ -39,7 +39,6 @@
#include "saldatabasic.hxx"
#include "headless/svpprn.hxx"
-#include "headless/svppspgraphics.hxx"
#include "headless/svpinst.hxx"
using namespace psp;
@@ -292,7 +291,7 @@ void SvpSalInstance::PostPrintersChanged()
GenPspGraphics *SvpSalInstance::CreatePrintGraphics()
{
- return new SvpPspGraphics();
+ return new GenPspGraphics();
}
sal_Bool SvpSalInfoPrinter::Setup( SalFrame*, ImplJobSetup* )
diff --git a/vcl/headless/svppspgraphics.cxx b/vcl/headless/svppspgraphics.cxx
deleted file mode 100644
index 56e08991d4fb..000000000000
--- a/vcl/headless/svppspgraphics.cxx
+++ /dev/null
@@ -1,200 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include "basegfx/vector/b2ivector.hxx"
-#include "basegfx/point/b2ipoint.hxx"
-
-#include "basebmp/color.hxx"
-
-#include "vcl/jobdata.hxx"
-#include "vcl/printerinfomanager.hxx"
-#include "vcl/bmpacc.hxx"
-#include "vcl/svapp.hxx"
-#include "vcl/sysdata.hxx"
-
-#include "salprn.hxx"
-#include "salbmp.hxx"
-#include "impfont.hxx"
-#include "outfont.hxx"
-#include "fontsubset.hxx"
-#include "generic/printergfx.hxx"
-#include "headless/svppspgraphics.hxx"
-#include "headless/svpbmp.hxx"
-#include "generic/glyphcache.hxx"
-#include "region.h"
-
-using namespace psp;
-using namespace basebmp;
-using namespace basegfx;
-using ::rtl::OUString;
-using ::rtl::OString;
-
-// FIXME: this is presumed un-necessary the generic/ BitmapBuffer code should work just as well - surely
-
-#ifdef USE_SVP_BITMAP
-// ----- Implementation of PrinterBmp by means of SalBitmap/BitmapBuffer ---------------
-
-class SalPrinterBmp : public psp::PrinterBmp
-{
- private:
- SalPrinterBmp ();
-
- BitmapDeviceSharedPtr m_aBitmap;
- public:
-
- SalPrinterBmp (const BitmapDeviceSharedPtr& rDevice);
- virtual ~SalPrinterBmp ();
- virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const;
- virtual sal_uInt32 GetPaletteEntryCount () const;
- virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const;
- virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const;
- virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const;
- virtual sal_uInt32 GetWidth () const;
- virtual sal_uInt32 GetHeight() const;
- virtual sal_uInt32 GetDepth () const;
-
- static sal_uInt32 getRGBFromColor( const basebmp::Color& rCol )
- {
- return ((rCol.getBlue()) & 0x000000ff)
- | ((rCol.getGreen() << 8) & 0x0000ff00)
- | ((rCol.getRed() << 16) & 0x00ff0000);
- }
-};
-
-SalPrinterBmp::SalPrinterBmp(const BitmapDeviceSharedPtr& rDevice) :
- m_aBitmap( rDevice )
-{
-}
-
-SalPrinterBmp::~SalPrinterBmp ()
-{
-}
-
-sal_uInt32
-SalPrinterBmp::GetWidth () const
-{
- return m_aBitmap.get() ? m_aBitmap->getSize().getX() : 0;
-}
-
-sal_uInt32
-SalPrinterBmp::GetHeight () const
-{
- return m_aBitmap.get() ? m_aBitmap->getSize().getY() : 0;
-}
-
-sal_uInt32
-SalPrinterBmp::GetDepth () const
-{
- return m_aBitmap.get() ?
- SvpElement::getBitCountFromScanlineFormat( m_aBitmap->getScanlineFormat() )
- : 0;
-}
-
-
-sal_uInt32
-SalPrinterBmp::GetPaletteEntryCount () const
-{
- return m_aBitmap.get() ? m_aBitmap->getPaletteEntryCount() : 0;
-}
-
-sal_uInt32
-SalPrinterBmp::GetPaletteColor (sal_uInt32 nIdx) const
-{
- sal_uInt32 nCol = 0;
- if( m_aBitmap.get() && nIdx < static_cast<sal_uInt32>(m_aBitmap->getPaletteEntryCount()) )
- {
- const basebmp::Color& rColor = (*m_aBitmap->getPalette().get())[ nIdx ];
- nCol = getRGBFromColor( rColor );
- }
- return nCol;
-}
-
-sal_uInt32
-SalPrinterBmp::GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const
-{
- sal_uInt32 nCol = 0;
- if( m_aBitmap.get() )
- nCol = getRGBFromColor( m_aBitmap->getPixel( B2IPoint( nColumn, nRow ) ) );
- return nCol;
-}
-
-sal_uInt8
-SalPrinterBmp::GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const
-{
- sal_uInt8 nGray = 0;
- if( m_aBitmap.get() )
- {
- // TODO: don't use tools color
- basebmp::Color aCol = m_aBitmap->getPixel( B2IPoint( nColumn, nRow ) );
- ::Color aColor( aCol.getRed(), aCol.getGreen(), aCol.getBlue() );
- nGray = aColor.GetLuminance();
- }
- return nGray;
-}
-
-sal_uInt8
-SalPrinterBmp::GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const
-{
- sal_uInt8 nIdx = 0;
- if( m_aBitmap.get() )
- nIdx = static_cast<sal_uInt8>(m_aBitmap->getPixelData( B2IPoint( nColumn, nRow ) ));
- return nIdx;
-}
-
-void SvpPspGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap )
-{
- Rectangle aSrc (Point(pPosAry->mnSrcX, pPosAry->mnSrcY),
- Size(pPosAry->mnSrcWidth, pPosAry->mnSrcHeight));
- Rectangle aDst (Point(pPosAry->mnDestX, pPosAry->mnDestY),
- Size(pPosAry->mnDestWidth, pPosAry->mnDestHeight));
-
- const SvpSalBitmap* pBmp = dynamic_cast<const SvpSalBitmap*>(&rSalBitmap);
- if( pBmp )
- {
- SalPrinterBmp aBmp(pBmp->getBitmap());
- m_pPrinterGfx->DrawBitmap(aDst, aSrc, aBmp);
- }
-}
-
-#endif
-
-SvpPspGraphics::~SvpPspGraphics()
-{
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index ff649a1ce454..79b87f1b54bc 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -45,7 +45,6 @@
#include "generic/glyphcache.hxx"
#include "headless/svpgdi.hxx"
#include "headless/svpbmp.hxx"
-#include "headless/svppspgraphics.hxx"
using namespace basegfx;
using namespace basebmp;
diff --git a/vcl/inc/headless/svpprn.hxx b/vcl/inc/headless/svpprn.hxx
index e4ab5bd8b5fd..ebb776695c48 100644
--- a/vcl/inc/headless/svpprn.hxx
+++ b/vcl/inc/headless/svpprn.hxx
@@ -36,8 +36,6 @@
#include "vclpluginapi.h"
-class SvpPspGraphics;
-
class SvpSalInfoPrinter : public PspSalInfoPrinter
{
public:
diff --git a/vcl/inc/headless/svppspgraphics.hxx b/vcl/inc/headless/svppspgraphics.hxx
deleted file mode 100644
index ad487687d839..000000000000
--- a/vcl/inc/headless/svppspgraphics.hxx
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SVP_PSPGRAPHICS_HXX
-#define _SVP_PSPGRAPHICS_HXX
-
-#include "generic/genpspgraphics.h"
-
-class SvpPspGraphics : public GenPspGraphics
-{
-public:
- SvpPspGraphics() {}
- virtual ~SvpPspGraphics();
-};
-
-#endif // _SVP_PSPGRAPHICS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 2323103b694f..8068b22c2050 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -39,7 +39,6 @@
#include <unx/gtk/atkbridge.hxx>
#include <headless/svpvd.hxx>
#include <headless/svpbmp.hxx>
-#include <headless/svppspgraphics.hxx>
#include <vcl/apptypes.hxx>
#include <generic/genpspgraphics.h>
#include <rtl/strbuf.hxx>
@@ -604,19 +603,13 @@ bool GtkInstance::AnyInput( sal_uInt16 nType )
bRet |= (nType & nShift) && m_nAnyInput[i] > 0;
nShift <<= 1;
}
-// fprintf( stderr, "AnyInput 0x%x => %s\n",
-// nType, bRet ? "true" : "false" );
return bRet;
}
}
GenPspGraphics *GtkInstance::CreatePrintGraphics()
{
-#if GTK_CHECK_VERSION(3,0,0)
- return new SvpPspGraphics();
-#else
return new GenPspGraphics();
-#endif
}
#if GTK_CHECK_VERSION(3,0,0)