[Libreoffice-commits] .: basebmp/source basebmp/test

Thorsten Behrens thorsten at kemper.freedesktop.org
Mon Oct 18 17:00:28 PDT 2010


 basebmp/source/bitmapdevice.cxx |   38 --------------------------------------
 basebmp/test/bmpdemo.cxx        |   11 +++++------
 2 files changed, 5 insertions(+), 44 deletions(-)

New commits:
commit 4900ba6128294f4f5c18c0f6720e03b77b34304e
Author: Povilas Kanapickas <povilas.kanapickas at gmail.com>
Date:   Tue Oct 19 01:57:34 2010 +0200

    Cleanse non-compiled code
    
    Removed if-deffed code from LibO libs, enabled if-deffed code again
    in test/playground files

diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index 30f95d5..2cb1447 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -1623,17 +1623,6 @@ struct StdMasks
     static const bool alphamask_polarity = true;
 };
 
-#if 0
-/** Clip and alpha masks for the generic renderer (of course, those
-    need to be generic, too)
- */
-struct MaskTraitsGeneric
-{
-    typedef PixelFormatTraits_GenericInteger   clipmask_format_traits;
-    typedef PixelFormatTraits_GenericInteger   alphamask_format_traits;
-};
-#endif
-
 //----------------------------------------------------------------------------------
 
 // Some compilers don't like the nested template wrap_accessor
@@ -2032,33 +2021,6 @@ BitmapDeviceSharedPtr cloneBitmapDevice( const basegfx::B2IVector&        rSize,
 /// Clone our device, with GenericImageAccessor to handle all formats
 BitmapDeviceSharedPtr BitmapDevice::getGenericRenderer() const
 {
-#if 0
-    // xxx TODO
-    typedef BitmapRenderer< PixelFormatTraits_GenericInteger::iterator_type,
-                            PixelFormatTraits_GenericInteger::raw_accessor_type,
-                            PixelFormatTraits_GenericInteger::accessor_selector,
-                            MaskTraitsGeneric >                        
-            Renderer;
-
-    if( !mpImpl->mpGenericRenderer )
-    {
-        mpImpl->mpGenericRenderer.reset(
-            new Renderer(
-                mpImpl->maBounds, 
-                isTopDown(), 
-                getScanlineFormat(), 
-                getScanlineStride(),
-                mpImpl->mpFirstScanline,
-                PixelFormatTraits_GenericInteger::iterator_type(),
-                GenericIntegerImageRawAccessor<Color>(
-                    const_cast<BitmapDevice*>(this)->shared_from_this()),
-                GenericIntegerImageAccessor<Color>(
-                    const_cast<BitmapDevice*>(this)->shared_from_this()),
-                getBuffer(), 
-                getPalette() ));
-    }
-#endif
-
     return mpImpl->mpGenericRenderer;
 }
 
diff --git a/basebmp/test/bmpdemo.cxx b/basebmp/test/bmpdemo.cxx
index c6f52d1..1d5bc40 100644
--- a/basebmp/test/bmpdemo.cxx
+++ b/basebmp/test/bmpdemo.cxx
@@ -58,6 +58,7 @@
 #include <basegfx/numeric/ftools.hxx>
 #include <basegfx/range/b2irange.hxx>
 #include <basegfx/vector/b2isize.hxx>
+#include <basegfx/vector/b2enums.hxx>
 #include <basegfx/point/b2ipoint.hxx>
 
 #include <basebmp/color.hxx>
@@ -1090,7 +1091,6 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
             basebmp::DrawMode_PAINT );
     }
 
-#if 0
     {
         basebmp::BitmapDeviceSharedPtr pMask( basebmp::createBitmapDevice( aTestSize,
                                                                            false,
@@ -1135,7 +1135,6 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
         const basegfx::B2IPoint aPt3(0,1001);
         pDevice->drawLine( aPt1, aPt3, aCol, basebmp::DrawMode_PAINT );
     }
-#endif
 
     {
         pDevice->clear(basebmp::Color(0));
@@ -1172,12 +1171,12 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
             aPoly.append( basegfx::B2DPoint(project( aP1 ) + aCenter) );
             aPoly.append( basegfx::B2DPoint(project( aP2 ) + aCenter) );
             pDevice->fillPolyPolygon( 
-                basegfx::tools::createAreaGeometryForPolygon(
+                basegfx::tools::createAreaGeometry(
                     aPoly,
 //                    std::max(1,n/30),
 //                    std::max(1,n/60),
                     std::max(1,n/30),
-                    basegfx::tools::B2DLINEJOIN_NONE),
+                    basegfx::B2DLINEJOIN_NONE),
                 aLineColor,
                 basebmp::DrawMode_PAINT);
             
@@ -1245,13 +1244,13 @@ void TestApp::Main()
     uno::Sequence< uno::Any > aArgs( 2 );
     aArgs[ 0 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL );
     aArgs[ 1 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE );
-    ::ucb::ContentBroker::initialize( xFactory, aArgs );
+    ::ucbhelper::ContentBroker::initialize( xFactory, aArgs );
 
     TestWindow pWindow;
     pWindow.Execute();
 
     // clean up UCB
-    ::ucb::ContentBroker::deinitialize();
+    ::ucbhelper::ContentBroker::deinitialize();
 }
 
 TestApp aDemoApp;


More information about the Libreoffice-commits mailing list