diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-09-01 22:46:16 -0700 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-09-01 22:47:32 -0700 |
commit | 8c7345ab8961c75f839d59a6eab1efd9c9e4bdc8 (patch) | |
tree | db8744d29ba1ad75161435132e1eb33977f3acdf /vcl | |
parent | 893c6785a97d8a6cbc4beab12637fee76534787c (diff) |
unusedcode.easy: vcl::unotools cleanup
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/canvastools.hxx | 36 | ||||
-rw-r--r-- | vcl/source/helper/canvastools.cxx | 108 |
2 files changed, 0 insertions, 144 deletions
diff --git a/vcl/inc/vcl/canvastools.hxx b/vcl/inc/vcl/canvastools.hxx index ce6c7bcafe68..e2ceed90bb7e 100644 --- a/vcl/inc/vcl/canvastools.hxx +++ b/vcl/inc/vcl/canvastools.hxx @@ -104,24 +104,6 @@ namespace vcl const ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D >& rPoints ); - /** Create an VCL/Tools polyPolygon from a point sequence sequence - */ - ::PolyPolygon VCL_DLLPUBLIC polyPolygonFromPoint2DSequenceSequence( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& rPoints ); - - /** Create an VCL/Tools polygon from a bezier segment sequence - */ - ::Polygon VCL_DLLPUBLIC polygonFromBezier2DSequence( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::geometry::RealBezierSegment2D >& rPoints ); - - /** Create an VCL/Tools polyPolygon from a bezier segment sequence sequence - */ - ::PolyPolygon VCL_DLLPUBLIC polyPolygonFromBezier2DSequenceSequence( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& rPoints ); - // Bitmap conversions // =================================================================== @@ -147,14 +129,6 @@ namespace vcl // Color conversions (vcl/tools Color <-> canvas standard color space) // =================================================================== - /** Create a device-specific color sequence from VCL/Tools color - - Note that this method assumes a color space equivalent to - the one returned from createStandardColorSpace() - */ - ::com::sun::star::uno::Sequence< double > - VCL_DLLPUBLIC colorToStdColorSpaceSequence( const Color& rColor ); - /** Convert color to device color sequence @param rColor @@ -210,17 +184,12 @@ namespace vcl // geometry::Real ::com::sun::star::geometry::RealSize2D VCL_DLLPUBLIC size2DFromSize( const Size& ); - ::com::sun::star::geometry::RealPoint2D VCL_DLLPUBLIC point2DFromPoint( const Point& ); - ::com::sun::star::geometry::RealRectangle2D VCL_DLLPUBLIC rectangle2DFromRectangle( const Rectangle& ); Size VCL_DLLPUBLIC sizeFromRealSize2D( const ::com::sun::star::geometry::RealSize2D& ); Point VCL_DLLPUBLIC pointFromRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& ); - Rectangle VCL_DLLPUBLIC rectangleFromRealRectangle2D( const ::com::sun::star::geometry::RealRectangle2D& ); // geometry::Integer ::com::sun::star::geometry::IntegerSize2D VCL_DLLPUBLIC integerSize2DFromSize( const Size& ); - ::com::sun::star::geometry::IntegerPoint2D VCL_DLLPUBLIC integerPoint2DFromPoint( const Point& ); - ::com::sun::star::geometry::IntegerRectangle2D VCL_DLLPUBLIC integerRectangle2DFromRectangle( const Rectangle& ); Size VCL_DLLPUBLIC sizeFromIntegerSize2D( const ::com::sun::star::geometry::IntegerSize2D& ); Point VCL_DLLPUBLIC pointFromIntegerPoint2D( const ::com::sun::star::geometry::IntegerPoint2D& ); @@ -236,13 +205,8 @@ namespace vcl basegfx::B2DRange VCL_DLLPUBLIC b2DRectangleFromRectangle( const Rectangle& ); // basegfx::B2I - Size VCL_DLLPUBLIC sizeFromB2ISize( const ::basegfx::B2IVector& ); Point VCL_DLLPUBLIC pointFromB2IPoint( const ::basegfx::B2IPoint& ); Rectangle VCL_DLLPUBLIC rectangleFromB2IRectangle( const ::basegfx::B2IRange& ); - - basegfx::B2IVector VCL_DLLPUBLIC b2ISizeFromSize( const Size& ); - basegfx::B2IPoint VCL_DLLPUBLIC b2IPointFromPoint( const Point& ); - basegfx::B2IRange VCL_DLLPUBLIC b2IRectangleFromRectangle( const Rectangle& ); } } diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index 7b152938744b..158fba86527b 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -130,41 +130,6 @@ namespace vcl //--------------------------------------------------------------------------------------- - ::PolyPolygon polyPolygonFromPoint2DSequenceSequence( const uno::Sequence< uno::Sequence< geometry::RealPoint2D > >& points ) - { - RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::polyPolygonFromPoint2DSequenceSequence()" ); - - ::PolyPolygon aRes; - - int nCurrPoly; - for( nCurrPoly=0; nCurrPoly<points.getLength(); ++nCurrPoly ) - { - aRes.Insert( polygonFromPoint2DSequence( points[nCurrPoly] ) ); - } - - return aRes; - } - - //--------------------------------------------------------------------------------------- - - ::Polygon polygonFromBezier2DSequence( const uno::Sequence< geometry::RealBezierSegment2D >& curves ) - { - // #i79917# map to basegfx - const basegfx::B2DPolygon aB2DPolygon(basegfx::unotools::polygonFromBezier2DSequence(curves)); - return ::Polygon(aB2DPolygon); - } - - //--------------------------------------------------------------------------------------- - - ::PolyPolygon polyPolygonFromBezier2DSequenceSequence( const uno::Sequence< uno::Sequence< geometry::RealBezierSegment2D > >& curves ) - { - // #i79917# map to basegfx - const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::unotools::polyPolygonFromBezier2DSequenceSequence(curves)); - return ::PolyPolygon(aB2DPolyPolygon); - } - - //--------------------------------------------------------------------------------------- - uno::Reference< rendering::XBitmap > xBitmapFromBitmap( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/, const ::Bitmap& inputBitmap ) { @@ -450,18 +415,6 @@ namespace vcl rSize.Height() ); } - geometry::RealPoint2D point2DFromPoint( const Point& rPoint ) - { - return geometry::RealPoint2D( rPoint.X(), - rPoint.Y() ); - } - - geometry::RealRectangle2D rectangle2DFromRectangle( const Rectangle& rRect ) - { - return geometry::RealRectangle2D( rRect.Left(), rRect.Top(), - rRect.Right(), rRect.Bottom() ); - } - Size sizeFromRealSize2D( const geometry::RealSize2D& rSize ) { return Size( static_cast<long>(rSize.Width + .5), @@ -474,14 +427,6 @@ namespace vcl static_cast<long>(rPoint.Y + .5) ); } - Rectangle rectangleFromRealRectangle2D( const geometry::RealRectangle2D& rRect ) - { - return Rectangle( static_cast<long>(rRect.X1 + .5), - static_cast<long>(rRect.Y1 + .5), - static_cast<long>(rRect.X2 + .5), - static_cast<long>(rRect.Y2 + .5) ); - } - ::Size sizeFromB2DSize( const ::basegfx::B2DVector& rVec ) { return ::Size( FRound( rVec.getX() ), @@ -502,12 +447,6 @@ namespace vcl FRound( rRect.getMaxY() ) ); } - Size sizeFromB2ISize( const ::basegfx::B2IVector& rVec ) - { - return ::Size( rVec.getX(), - rVec.getY() ); - } - Point pointFromB2IPoint( const ::basegfx::B2IPoint& rPoint ) { return ::Point( rPoint.getX(), @@ -542,44 +481,12 @@ namespace vcl rRect.Bottom() ); } - basegfx::B2IVector b2ISizeFromSize( const Size& rSize ) - { - return ::basegfx::B2IVector( rSize.Width(), - rSize.Height() ); - } - - basegfx::B2IPoint b2IPointFromPoint( const Point& rPoint ) - { - return ::basegfx::B2IPoint( rPoint.X(), - rPoint.Y() ); - } - - basegfx::B2IRange b2IRectangleFromRectangle( const Rectangle& rRect ) - { - return ::basegfx::B2IRange( rRect.Left(), - rRect.Top(), - rRect.Right(), - rRect.Bottom() ); - } - geometry::IntegerSize2D integerSize2DFromSize( const Size& rSize ) { return geometry::IntegerSize2D( rSize.Width(), rSize.Height() ); } - geometry::IntegerPoint2D integerPoint2DFromPoint( const Point& rPoint ) - { - return geometry::IntegerPoint2D( rPoint.X(), - rPoint.Y() ); - } - - geometry::IntegerRectangle2D integerRectangle2DFromRectangle( const Rectangle& rRectangle ) - { - return geometry::IntegerRectangle2D( rRectangle.Left(), rRectangle.Top(), - rRectangle.Right(), rRectangle.Bottom() ); - } - Size sizeFromIntegerSize2D( const geometry::IntegerSize2D& rSize ) { return Size( rSize.Width, @@ -753,21 +660,6 @@ namespace vcl //--------------------------------------------------------------------------------------- - uno::Sequence< double > colorToStdColorSpaceSequence( const Color& rColor ) - { - uno::Sequence< double > aRet(4); - double* pRet = aRet.getArray(); - - pRet[0] = toDoubleColor(rColor.GetRed()); - pRet[1] = toDoubleColor(rColor.GetGreen()); - pRet[2] = toDoubleColor(rColor.GetBlue()); - - // VCL's notion of alpha is different from the rest of the world's - pRet[3] = 1.0 - toDoubleColor(rColor.GetTransparency()); - - return aRet; - } - Color stdColorSpaceSequenceToColor( const uno::Sequence< double >& rColor ) { ENSURE_ARG_OR_THROW( rColor.getLength() == 4, |