[Libreoffice-commits] .: cppcanvas/inc cppcanvas/source

August Sodora augsod at kemper.freedesktop.org
Wed Dec 21 03:26:04 PST 2011


 cppcanvas/inc/cppcanvas/basegfxfactory.hxx    |    6 ---
 cppcanvas/source/inc/implrenderer.hxx         |    5 --
 cppcanvas/source/mtfrenderer/emfplus.cxx      |   28 --------------
 cppcanvas/source/mtfrenderer/implrenderer.cxx |   48 ------------------------
 cppcanvas/source/wrapper/basegfxfactory.cxx   |   50 --------------------------
 5 files changed, 137 deletions(-)

New commits:
commit 070eff8cf1ad7763b8b730336f11032893b77049
Author: August Sodora <augsod at gmail.com>
Date:   Wed Dec 21 00:22:06 2011 -0500

    callcatcher: Remove unused code

diff --git a/cppcanvas/inc/cppcanvas/basegfxfactory.hxx b/cppcanvas/inc/cppcanvas/basegfxfactory.hxx
index 5cb87aa..dbb8d12 100644
--- a/cppcanvas/inc/cppcanvas/basegfxfactory.hxx
+++ b/cppcanvas/inc/cppcanvas/basegfxfactory.hxx
@@ -75,7 +75,6 @@ namespace cppcanvas
             coordinate space as the source polygon
          */
         PolyPolygonSharedPtr    createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolygon& rPoly ) const;
-        PolyPolygonSharedPtr    createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolyPolygon& rPoly ) const;
 
         /** Create an uninitialized bitmap with the given size
          */
@@ -85,10 +84,6 @@ namespace cppcanvas
          */
         BitmapSharedPtr         createAlphaBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ) const;
 
-        /** Create a text portion with the given content string
-         */
-        TextSharedPtr           createText( const CanvasSharedPtr&, const ::rtl::OUString& ) const;
-
     private:
         friend struct InitInstance2;
 
@@ -100,7 +95,6 @@ namespace cppcanvas
         BaseGfxFactory(const BaseGfxFactory&);
         BaseGfxFactory& operator=( const BaseGfxFactory& );
     };
-
 }
 
 #endif /* _CPPCANVAS_BASEGFXFACTORY_HXX */
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx
index 3c1ec6d..edf69be 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -174,9 +174,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();
 
@@ -210,10 +207,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 91c9560..8ccb75b 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 65b9d21..8dde2f0 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -3074,54 +3074,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/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx
index bac25aa..d8dedb3 100644
--- a/cppcanvas/source/wrapper/basegfxfactory.cxx
+++ b/cppcanvas/source/wrapper/basegfxfactory.cxx
@@ -43,7 +43,6 @@
 #include "implbitmap.hxx"
 #include "impltext.hxx"
 
-
 using namespace ::com::sun::star;
 
 namespace cppcanvas
@@ -72,48 +71,6 @@ namespace cppcanvas
     {
     }
 
-    PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr&          rCanvas,
-                                                            const ::basegfx::B2DPolygon&    rPoly ) 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::xPolyPolygonFromB2DPolygon(
-                                               xCanvas->getDevice(),
-                                               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
     {
@@ -153,13 +110,6 @@ namespace cppcanvas
                                       xCanvas->getDevice()->createCompatibleAlphaBitmap(
                                           ::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: */


More information about the Libreoffice-commits mailing list