diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-02-17 14:06:34 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-02-17 15:48:23 +0000 |
commit | eed2695cd5d63bdaf8b02c5cbf3a7e4017e18173 (patch) | |
tree | 2934c56233fd071eb25e23f8738ba7fe6347a02c /cppcanvas/source | |
parent | bb61f56d71b699dfbe422bac37a3151767e6a40f (diff) |
Removed unused code from cppcanvas
Diffstat (limited to 'cppcanvas/source')
-rw-r--r-- | cppcanvas/source/inc/implrenderer.hxx | 5 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 28 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 48 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/mtftools.cxx | 62 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/mtftools.hxx | 56 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/transparencygroupaction.cxx | 19 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/transparencygroupaction.hxx | 28 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/basegfxfactory.cxx | 31 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implsprite.cxx | 5 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implsprite.hxx | 4 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implspritecanvas.cxx | 9 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implspritecanvas.hxx | 6 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/vclfactory.cxx | 4 |
13 files changed, 0 insertions, 305 deletions
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 9c270e822a99..c93c83c50d06 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -184,9 +184,6 @@ static float GetSwapFloat( SvStream& rSt ) ImplRenderer( const CanvasSharedPtr& rCanvas, const GDIMetaFile& rMtf, const Parameters& rParms ); - ImplRenderer( const CanvasSharedPtr& rCanvas, - const BitmapEx& rBmpEx, - const Parameters& rParms ); virtual ~ImplRenderer(); @@ -220,10 +217,8 @@ static float GetSwapFloat( SvStream& rSt ) void ReadRectangle (SvStream& s, float& x, float& y, float &width, float& height, sal_uInt32 flags = 0); void ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 flags = 0); void MapToDevice (double &x, double &y); - ::basegfx::B2DPoint Map (::basegfx::B2DPoint& p); ::basegfx::B2DPoint Map (double ix, double iy); ::basegfx::B2DSize MapSize (double iwidth, double iheight); - ::basegfx::B2DRange MapRectangle (double ix, double iy, double iwidth, double iheight); private: // default: disabled copy/assignment diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 91c95607a055..8ccb75bfdad1 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -825,11 +825,6 @@ namespace cppcanvas y = 100*nMmY*y/nPixY; } - ::basegfx::B2DPoint ImplRenderer::Map (::basegfx::B2DPoint& p) - { - return Map (p.getX (), p.getY ()); - } - ::basegfx::B2DPoint ImplRenderer::Map (double ix, double iy) { double x, y; @@ -863,29 +858,6 @@ namespace cppcanvas return ::basegfx::B2DSize (w, h); } - ::basegfx::B2DRange ImplRenderer::MapRectangle (double ix, double iy, double iwidth, double iheight) - { - double x, y, w, h; - - x = ix*aWorldTransform.eM11 + iy*aWorldTransform.eM21 + aWorldTransform.eDx; - y = ix*aWorldTransform.eM12 + iy*aWorldTransform.eM22 + aWorldTransform.eDy; - w = iwidth*aWorldTransform.eM11 + iheight*aWorldTransform.eM21; - h = iwidth*aWorldTransform.eM12 + iheight*aWorldTransform.eM22; - - MapToDevice (x, y); - MapToDevice (w, h); - - x -= nFrameLeft; - y -= nFrameTop; - - x *= aBaseTransform.eM11; - y *= aBaseTransform.eM22; - w *= aBaseTransform.eM11; - h *= aBaseTransform.eM22; - - return ::basegfx::B2DRange (x, y, x + w, y + h); - } - #define COLOR(x) \ ::vcl::unotools::colorToDoubleSequence( ::Color (0xff - (x >> 24), \ (x >> 16) & 0xff, \ diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 80cd70bae29b..28476618f473 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -3077,54 +3077,6 @@ namespace cppcanvas ); } - ImplRenderer::ImplRenderer( const CanvasSharedPtr& rCanvas, - const BitmapEx& rBmpEx, - const Parameters& rParams ) : - CanvasGraphicHelper( rCanvas ), - maActions() - { - // TODO(F3): property modification parameters are - // currently ignored for Bitmaps - (void)rParams; - - RTL_LOGFILE_CONTEXT( aLog, "::cppcanvas::internal::ImplRenderer::ImplRenderer(bitmap)" ); - - OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(), - "ImplRenderer::ImplRenderer(): Invalid canvas" ); - OSL_ENSURE( rCanvas->getUNOCanvas()->getDevice().is(), - "ImplRenderer::ImplRenderer(): Invalid graphic device" ); - - // make sure canvas and graphic device are valid; action - // creation don't check that every time - if( rCanvas.get() == NULL || - !rCanvas->getUNOCanvas().is() || - !rCanvas->getUNOCanvas()->getDevice().is() ) - { - // leave actions empty - return; - } - - OutDevState aState; - - const Size aBmpSize( rBmpEx.GetSizePixel() ); - - // Setup local state, such that the bitmap renders itself - // into a one-by-one square for identity view and render - // transformations - aState.transform.scale( 1.0 / aBmpSize.Width(), - 1.0 / aBmpSize.Height() ); - - // create a single action for the provided BitmapEx - maActions.push_back( - MtfAction( - BitmapActionFactory::createBitmapAction( - rBmpEx, - ::basegfx::B2DPoint(), - rCanvas, - aState), - 0 ) ); - } - ImplRenderer::~ImplRenderer() { } diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx index 7cfe15e8cc10..3b929a861725 100644 --- a/cppcanvas/source/mtfrenderer/mtftools.cxx +++ b/cppcanvas/source/mtfrenderer/mtftools.cxx @@ -239,68 +239,6 @@ namespace cppcanvas return false; } - bool modifyClip( rendering::RenderState& o_rRenderState, - const struct ::cppcanvas::internal::OutDevState& rOutdevState, - const CanvasSharedPtr& rCanvas, - const ::Point& rOffset, - const ::basegfx::B2DVector* pScaling, - const double* pRotation ) - { - return modifyClip( o_rRenderState, - rOutdevState, - rCanvas, - ::basegfx::B2DPoint( rOffset.X(), - rOffset.Y() ), - pScaling, - pRotation ); - } - - bool modifyClip( rendering::RenderState& o_rRenderState, - const struct ::cppcanvas::internal::OutDevState& rOutdevState, - const CanvasSharedPtr& rCanvas, - const ::basegfx::B2DHomMatrix& rTransform ) - { - if( !rTransform.isIdentity() || - !rTransform.isInvertible() ) - return false; // nothing to do - - ::basegfx::B2DPolyPolygon aLocalClip; - - if( rOutdevState.clip.count() ) - { - aLocalClip = rOutdevState.clip; - } - else if( !rOutdevState.clipRect.IsEmpty() ) - { - const ::Rectangle aLocalClipRect( rOutdevState.clipRect ); - - aLocalClip = ::basegfx::B2DPolyPolygon( - ::basegfx::tools::createPolygonFromRect( - ::basegfx::B2DRectangle( - aLocalClipRect.Left(), - aLocalClipRect.Top(), - aLocalClipRect.Right(), - aLocalClipRect.Bottom() ) ) ); - } - else - { - // empty clip, nothing to do - return false; - } - - // invert transformation and modify - ::basegfx::B2DHomMatrix aLocalTransform( rTransform ); - aLocalTransform.invert(); - - aLocalClip.transform( aLocalTransform ); - - o_rRenderState.Clip = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( - rCanvas->getUNOCanvas()->getDevice(), - aLocalClip ); - - return true; - } - // create overline/underline/strikeout line info struct TextLineInfo createTextLineInfo( const ::VirtualDevice& rVDev, const ::cppcanvas::internal::OutDevState& rState ) diff --git a/cppcanvas/source/mtfrenderer/mtftools.hxx b/cppcanvas/source/mtfrenderer/mtftools.hxx index 8d466f1d9e7e..bfe5bc5218de 100644 --- a/cppcanvas/source/mtfrenderer/mtftools.hxx +++ b/cppcanvas/source/mtfrenderer/mtftools.hxx @@ -143,66 +143,10 @@ namespace cppcanvas bool modifyClip( ::com::sun::star::rendering::RenderState& o_rRenderState, const struct ::cppcanvas::internal::OutDevState& rOutdevState, const CanvasSharedPtr& rCanvas, - const ::Point& rOffset, - const ::basegfx::B2DVector* pScaling, - const double* pRotation ); - - /** This method modifies the clip, to cancel the given - transformation. - - As the clip is relative to the render state - transformation, offsetting or scaling the render state - must modify the clip, to keep it at the same position - relative to the primitive at hand - - @param o_rRenderState - Render state to change the clip in - - @param rOutdevState - Input state. Is used to retrieve the original clip from - - @param rOffset - The clip is offsetted by the negative of this value. - - @param pScaling - The clip is inversely scaled by this value (if given) - - @param pRotation - The clip is inversely rotated by this value (if given) - - @return true, if the clip has changed, false if not - */ - bool modifyClip( ::com::sun::star::rendering::RenderState& o_rRenderState, - const struct ::cppcanvas::internal::OutDevState& rOutdevState, - const CanvasSharedPtr& rCanvas, const ::basegfx::B2DPoint& rOffset, const ::basegfx::B2DVector* pScaling, const double* pRotation ); - /** This method modifies the clip, to cancel the given - transformation. - - As the clip is relative to the render state - transformation, transforming the render state further must - modify the clip, to keep it at the same position relative - to the primitive at hand - - @param o_rRenderState - Render state to change the clip in - - @param rOutdevState - Input state. Is used to retrieve the original clip from - - @param rTransform - The clip is transformed by the inverse of this value. - - @return true, if the clip has changed, false if not - */ - bool modifyClip( ::com::sun::star::rendering::RenderState& o_rRenderState, - const struct ::cppcanvas::internal::OutDevState& rOutdevState, - const CanvasSharedPtr& rCanvas, - const ::basegfx::B2DHomMatrix& rTransform ); - struct TextLineInfo { TextLineInfo( const double& rLineHeight, diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx index 24bd98b091f3..ec80e8f43897 100644 --- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx +++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx @@ -558,25 +558,6 @@ namespace cppcanvas SAL_WNODEPRECATED_DECLARATIONS_PUSH ActionSharedPtr TransparencyGroupActionFactory::createTransparencyGroupAction( MtfAutoPtr& rGroupMtf, - const Renderer::Parameters& rParms, - const ::basegfx::B2DPoint& rDstPoint, - const ::basegfx::B2DVector& rDstSize, - double nAlpha, - const CanvasSharedPtr& rCanvas, - const OutDevState& rState ) - { - return ActionSharedPtr( new TransparencyGroupAction(rGroupMtf, - rParms, - rDstPoint, - rDstSize, - nAlpha, - rCanvas, - rState ) ); - } - SAL_WNODEPRECATED_DECLARATIONS_POP - - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ActionSharedPtr TransparencyGroupActionFactory::createTransparencyGroupAction( MtfAutoPtr& rGroupMtf, GradientAutoPtr& rAlphaGradient, const Renderer::Parameters& rParms, const ::basegfx::B2DPoint& rDstPoint, diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx index dd629011cfa2..8f37aaeb0227 100644 --- a/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx +++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.hxx @@ -75,34 +75,6 @@ namespace cppcanvas @param rGroupMtf Metafile that groups all actions to be rendered - transparent - - @param rParms - Render parameters - - @param rDstPoint - Left, top edge of destination, in current state - coordinate system - - @param rDstSize - Size of the transparency group object, in current - state coordinate system. - - @param nAlpha - Alpha value, must be in the range [0,1] - */ - static ActionSharedPtr createTransparencyGroupAction( MtfAutoPtr& rGroupMtf, - const Renderer::Parameters& rParms, - const ::basegfx::B2DPoint& rDstPoint, - const ::basegfx::B2DVector& rDstSize, - double nAlpha, - const CanvasSharedPtr& rCanvas, - const OutDevState& rState ); - - /** Create new transparency group action. - - @param rGroupMtf - Metafile that groups all actions to be rendered transparent. @param rAlphaGradient diff --git a/cppcanvas/source/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx index bac25aa1d9d4..28f9dcf45319 100644 --- a/cppcanvas/source/wrapper/basegfxfactory.cxx +++ b/cppcanvas/source/wrapper/basegfxfactory.cxx @@ -68,10 +68,6 @@ namespace cppcanvas { } - BaseGfxFactory::~BaseGfxFactory() - { - } - PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr& rCanvas, const ::basegfx::B2DPolygon& rPoly ) const { @@ -93,27 +89,6 @@ namespace cppcanvas rPoly) ) ); } - PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr& rCanvas, - const ::basegfx::B2DPolyPolygon& rPolyPoly ) const - { - OSL_ENSURE( rCanvas.get() != NULL && - rCanvas->getUNOCanvas().is(), - "BaseGfxFactory::createPolyPolygon(): Invalid canvas" ); - - if( rCanvas.get() == NULL ) - return PolyPolygonSharedPtr(); - - uno::Reference< rendering::XCanvas > xCanvas( rCanvas->getUNOCanvas() ); - if( !xCanvas.is() ) - return PolyPolygonSharedPtr(); - - return PolyPolygonSharedPtr( - new internal::ImplPolyPolygon( rCanvas, - ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( - xCanvas->getDevice(), - rPolyPoly) ) ); - } - BitmapSharedPtr BaseGfxFactory::createBitmap( const CanvasSharedPtr& rCanvas, const ::basegfx::B2ISize& rSize ) const { @@ -154,12 +129,6 @@ namespace cppcanvas ::basegfx::unotools::integerSize2DFromB2ISize(rSize) ) ) ); } - TextSharedPtr BaseGfxFactory::createText( const CanvasSharedPtr& rCanvas, const ::rtl::OUString& rText ) const - { - return TextSharedPtr( new internal::ImplText( rCanvas, - rText ) ); - } - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppcanvas/source/wrapper/implsprite.cxx b/cppcanvas/source/wrapper/implsprite.cxx index fda0c035f357..9e6ce32a6e34 100644 --- a/cppcanvas/source/wrapper/implsprite.cxx +++ b/cppcanvas/source/wrapper/implsprite.cxx @@ -226,11 +226,6 @@ namespace cppcanvas { return mxSprite; } - - uno::Reference< rendering::XGraphicDevice > ImplSprite::getGraphicDevice() const - { - return mxGraphicDevice; - } } } diff --git a/cppcanvas/source/wrapper/implsprite.hxx b/cppcanvas/source/wrapper/implsprite.hxx index 1397791d1f82..d75cd7c470c3 100644 --- a/cppcanvas/source/wrapper/implsprite.hxx +++ b/cppcanvas/source/wrapper/implsprite.hxx @@ -74,10 +74,6 @@ namespace cppcanvas virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite > getUNOSprite() const; - ::com::sun::star::uno::Reference< - ::com::sun::star::rendering::XGraphicDevice > - getGraphicDevice() const; - private: // default: disabled copy/assignment ImplSprite(const ImplSprite&); diff --git a/cppcanvas/source/wrapper/implspritecanvas.cxx b/cppcanvas/source/wrapper/implspritecanvas.cxx index 991c4ccaf10f..3358dc090a50 100644 --- a/cppcanvas/source/wrapper/implspritecanvas.cxx +++ b/cppcanvas/source/wrapper/implspritecanvas.cxx @@ -135,15 +135,6 @@ namespace cppcanvas mpTransformArbiter ) ); } - SpriteSharedPtr ImplSpriteCanvas::createSpriteFromBitmaps( const uno::Sequence< uno::Reference< rendering::XBitmap > >& rAnimationBitmaps, - sal_Int8 nInterpolationMode ) - { - return SpriteSharedPtr( new internal::ImplSprite( mxSpriteCanvas, - mxSpriteCanvas->createSpriteFromBitmaps( rAnimationBitmaps, - nInterpolationMode ), - mpTransformArbiter ) ); - } - CanvasSharedPtr ImplSpriteCanvas::clone() const { return SpriteCanvasSharedPtr( new ImplSpriteCanvas( *this ) ); diff --git a/cppcanvas/source/wrapper/implspritecanvas.hxx b/cppcanvas/source/wrapper/implspritecanvas.hxx index d308b313b7dd..5981a9d7607a 100644 --- a/cppcanvas/source/wrapper/implspritecanvas.hxx +++ b/cppcanvas/source/wrapper/implspritecanvas.hxx @@ -61,12 +61,6 @@ namespace cppcanvas virtual CustomSpriteSharedPtr createCustomSprite( const ::basegfx::B2DSize& ) const; virtual SpriteSharedPtr createClonedSprite( const SpriteSharedPtr& ) const; - SpriteSharedPtr createSpriteFromBitmaps( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< - ::com::sun::star::rendering::XBitmap > >& animationBitmaps, - sal_Int8 interpolationMode ); - virtual CanvasSharedPtr clone() const; virtual ::com::sun::star::uno::Reference< diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx index 05139691a43a..7a01fa25386f 100644 --- a/cppcanvas/source/wrapper/vclfactory.cxx +++ b/cppcanvas/source/wrapper/vclfactory.cxx @@ -69,10 +69,6 @@ namespace cppcanvas { } - VCLFactory::~VCLFactory() - { - } - BitmapCanvasSharedPtr VCLFactory::createCanvas( const uno::Reference< rendering::XBitmapCanvas >& xCanvas ) { return BitmapCanvasSharedPtr( |