summaryrefslogtreecommitdiff
path: root/basebmp/test
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:47:44 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:47:44 +0200
commit941020379b1ea1ec7c564c21e68ea1674cda7683 (patch)
tree40fcaf109d6d585bcdc0faf7ea6c0812b3cc9a39 /basebmp/test
parent0692507dcc62e94c7af88388961db1d7d12d6dbd (diff)
parent0d2916e03ea51529e15995830a1a8c36bd72e442 (diff)
Merge branch 'master' into feature/gnumake4
Conflicts: basebmp/prj/d.lst basebmp/test/basictest.cxx basebmp/test/makefile.mk basegfx/inc/basegfx/basegfxdllapi.h basegfx/inc/basegfx/tools/debugplotter.hxx basegfx/inc/basegfx/tuple/b2ituple.hxx basegfx/prj/d.lst basegfx/source/numeric/makefile.mk basegfx/source/polygon/makefile.mk basegfx/source/range/makefile.mk basegfx/source/raster/makefile.mk basegfx/source/tuple/makefile.mk basegfx/source/vector/makefile.mk basegfx/test/basegfx1d.cxx basegfx/test/makefile.mk basegfx/util/makefile.mk canvas/Library_canvasfactory.mk canvas/Module_canvas.mk canvas/prj/build.lst canvas/prj/d.lst canvas/source/cairo/cairo_canvashelper_texturefill.cxx canvas/source/cairo/makefile.mk canvas/source/tools/makefile.mk comphelper/qa/string/makefile.mk cppcanvas/Module_cppcanvas.mk cppcanvas/inc/cppcanvas/cppcanvasdllapi.h cppcanvas/prj/build.lst cppcanvas/prj/d.lst cppcanvas/source/mtfrenderer/makefile.mk cppcanvas/util/makefile.mk i18npool/source/search/makefile.mk regexp/Library_regexp.mk regexp/prj/d.lst sax/CppunitTest_sax.mk sax/Library_sax.mk sax/prj/d.lst sax/qa/cppunit/test_converter.cxx sax/source/expatwrap/attrlistimpl.hxx sax/util/makefile.mk svtools/Library_svt.mk tools/Executable_sspretty.mk ucbhelper/prj/d.lst ucbhelper/source/provider/configureucb.cxx ucbhelper/source/provider/provconf.cxx ucbhelper/util/makefile.mk unotools/Library_utl.mk unotools/Module_unotools.mk unotools/Package_inc.mk unotools/prj/build.lst vcl/Library_desktop_detector.mk vcl/Library_vcl.mk vcl/Library_vclplug_gtk.mk vcl/aqua/source/gdi/salprn.cxx vcl/inc/aqua/saldata.hxx vcl/unx/generic/gdi/salgdi3.cxx
Diffstat (limited to 'basebmp/test')
-rw-r--r--basebmp/test/basictest.cxx15
-rw-r--r--basebmp/test/bmpdemo.cxx34
-rw-r--r--basebmp/test/bmpmasktest.cxx30
-rw-r--r--basebmp/test/bmptest.cxx26
-rw-r--r--basebmp/test/cliptest.cxx27
-rw-r--r--basebmp/test/filltest.cxx24
-rw-r--r--basebmp/test/linetest.cxx21
-rw-r--r--basebmp/test/masktest.cxx26
-rw-r--r--basebmp/test/polytest.cxx53
-rw-r--r--basebmp/test/tools.cxx3
-rw-r--r--basebmp/test/tools.hxx3
11 files changed, 62 insertions, 200 deletions
diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx
index d7581a9139c7..1b409921d046 100644
--- a/basebmp/test/basictest.cxx
+++ b/basebmp/test/basictest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,13 +28,11 @@
// autogenerated file with codegen.pl
-#include "preextstl.h"
#include <sal/cppunit.h>
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
-#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/point/b2ipoint.hxx>
@@ -41,21 +40,12 @@
#include <basebmp/color.hxx>
#include <basebmp/scanlineformats.hxx>
#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/debug.hxx>
#include "tools.hxx"
-#include <iostream>
-#include <fstream>
-
using namespace ::basebmp;
namespace
{
-/*
- std::ofstream output("32bpp_test.dump");
- debugDump( mpDevice32bpp, output );
-*/
-
class BasicTest : public CppUnit::TestFixture
{
public:
@@ -296,8 +286,9 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-// -----------------------------------------------------------------------------
CPPUNIT_TEST_SUITE_REGISTRATION(BasicTest);
}
CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/bmpdemo.cxx b/basebmp/test/bmpdemo.cxx
index 99aa1bac2c5c..effce214bb2f 100644
--- a/basebmp/test/bmpdemo.cxx
+++ b/basebmp/test/bmpdemo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,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>
@@ -72,8 +74,6 @@
#include <boost/static_assert.hpp>
#include <algorithm>
-#include <iostream>
-#include <fstream>
using namespace ::com::sun::star;
@@ -973,7 +973,7 @@ class TestWindow : public Dialog
public:
TestWindow() : Dialog( (Window *) NULL )
{
- SetText( rtl::OUString::createFromAscii( "VIGRA test" ) );
+ SetText( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VIGRA test" )) );
SetSizePixel( Size( 1024, 1024 ) );
EnablePaint( true );
Show();
@@ -1077,11 +1077,9 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly,
- ::rtl::OUString::createFromAscii(
- "m0 0 h7 v7 h-7 z" ) );
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "m0 0 h7 v7 h-7 z" )) );
basegfx::tools::importFromSvgD( aPoly,
- ::rtl::OUString::createFromAscii(
- "m2 2 h3 v3 h-3 z" ) );
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "m2 2 h3 v3 h-3 z" )) );
pDevice->fillPolyPolygon(
aPoly,
@@ -1089,7 +1087,6 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
basebmp::DrawMode_PAINT );
}
-#if 0
{
basebmp::BitmapDeviceSharedPtr pMask( basebmp::createBitmapDevice( aTestSize,
false,
@@ -1101,8 +1098,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
pMask->drawLine( aPt111, aPt222, aCol333, basebmp::DrawMode_PAINT );
- ::rtl::OUString aSvg = ::rtl::OUString::createFromAscii(
- "m 0 0 h5 l5 5 v5 h-5 l-5-5 z" );
+ ::rtl::OUString aSvg( RTL_CONSTASCII_USTRINGPARAM( "m 0 0 h5 l5 5 v5 h-5 l-5-5 z" ));
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly, aSvg );
pMask->clear(basebmp::Color(0xFFFFFFFF));
@@ -1134,7 +1130,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));
@@ -1171,12 +1166,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);
@@ -1194,8 +1189,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
// Fill bitmap with generated content
{
- ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
- aBitmap );
+ Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
for( int y=0; y<aTestSize.getY(); ++y )
for( int x=0; x<aTestSize.getX(); ++x )
pWriteAccess->SetPixel(y,x,
@@ -1242,15 +1236,17 @@ void TestApp::Main()
// Create UCB.
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 );
+ aArgs[ 0 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL ));
+ aArgs[ 1 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE ));
+ ::ucbhelper::ContentBroker::initialize( xFactory, aArgs );
TestWindow pWindow;
pWindow.Execute();
// clean up UCB
- ::ucb::ContentBroker::deinitialize();
+ ::ucbhelper::ContentBroker::deinitialize();
}
TestApp aDemoApp;
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/bmpmasktest.cxx b/basebmp/test/bmpmasktest.cxx
index 29e261423a06..5ba477484903 100644
--- a/basebmp/test/bmpmasktest.cxx
+++ b/basebmp/test/bmpmasktest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,9 @@
// autogenerated file with codegen.pl
-#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
-#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2irange.hxx>
@@ -44,23 +43,12 @@
#include <basebmp/color.hxx>
#include <basebmp/scanlineformats.hxx>
#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/debug.hxx>
#include "tools.hxx"
-#include <iostream>
-#include <fstream>
-
using namespace ::basebmp;
namespace
{
-/*
- std::ofstream output("32bpp_test.dump");
- debugDump( rDevice, output );
- std::ofstream output2("32bpp_bmp.dump");
- debugDump( rBmp, output2 );
-*/
-
class BmpMaskTest : public CppUnit::TestFixture
{
private:
@@ -130,8 +118,7 @@ public:
true,
Format::THIRTYTWO_BIT_TC_MASK );
- ::rtl::OUString aSvg = ::rtl::OUString::createFromAscii(
- "m 0 0h5v10h5v-5h-10z" );
+ ::rtl::OUString aSvg( RTL_CONSTASCII_USTRINGPARAM( "m 0 0h5v10h5v-5h-10z" ));
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly, aSvg );
@@ -146,8 +133,8 @@ public:
aColWhite,
DrawMode_PAINT );
- aSvg = ::rtl::OUString::createFromAscii(
- "m 0 0 h6 v10 h-6z" );
+ aSvg = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "m 0 0 h6 v10 h-6z" ));
aPoly.clear();
basegfx::tools::importFromSvgD( aPoly, aSvg );
@@ -180,14 +167,7 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-// -----------------------------------------------------------------------------
CPPUNIT_TEST_SUITE_REGISTRATION(BmpMaskTest);
}
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-//NOADDITIONAL;
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/bmptest.cxx b/basebmp/test/bmptest.cxx
index 9d083980790b..7b3a2cbcb18f 100644
--- a/basebmp/test/bmptest.cxx
+++ b/basebmp/test/bmptest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,9 @@
// autogenerated file with codegen.pl
-#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
-#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2irange.hxx>
@@ -44,23 +43,12 @@
#include <basebmp/color.hxx>
#include <basebmp/scanlineformats.hxx>
#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/debug.hxx>
#include "tools.hxx"
-#include <iostream>
-#include <fstream>
-
using namespace ::basebmp;
namespace
{
-/*
- std::ofstream output("32bpp_test.dump");
- debugDump( rDevice, output );
- std::ofstream output2("32bpp_bmp.dump");
- debugDump( rBmp, output2 );
-*/
-
class BmpTest : public CppUnit::TestFixture
{
private:
@@ -169,8 +157,7 @@ public:
true,
Format::THIRTYTWO_BIT_TC_MASK );
- ::rtl::OUString aSvg = ::rtl::OUString::createFromAscii(
- "m 0 0h5v10h5v-5h-10z" );
+ ::rtl::OUString aSvg( RTL_CONSTASCII_USTRINGPARAM( "m 0 0h5v10h5v-5h-10z" ));
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly, aSvg );
@@ -207,14 +194,7 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-// -----------------------------------------------------------------------------
CPPUNIT_TEST_SUITE_REGISTRATION(BmpTest);
}
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-//NOADDITIONAL;
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/cliptest.cxx b/basebmp/test/cliptest.cxx
index b0f0b72f07e0..c41edf3e28a8 100644
--- a/basebmp/test/cliptest.cxx
+++ b/basebmp/test/cliptest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,9 @@
// autogenerated file with codegen.pl
-#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
-#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/point/b2ipoint.hxx>
@@ -45,21 +44,12 @@
#include <basebmp/color.hxx>
#include <basebmp/scanlineformats.hxx>
#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/debug.hxx>
#include "tools.hxx"
-#include <iostream>
-#include <fstream>
-
using namespace ::basebmp;
namespace
{
-/*
- std::ofstream output("32bpp_test.dump");
- debugDump( mpDevice32bpp, output );
-*/
-
class ClipTest : public CppUnit::TestFixture
{
private:
@@ -179,8 +169,7 @@ private:
true,
Format::EIGHT_BIT_GREY ));
- ::rtl::OUString aSvg = ::rtl::OUString::createFromAscii(
- "m 0 0h5v10h5v-5h-10z" );
+ ::rtl::OUString aSvg( RTL_CONSTASCII_USTRINGPARAM( "m 0 0h5v10h5v-5h-10z" ));
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly, aSvg );
@@ -220,8 +209,7 @@ public:
true,
Format::THIRTYTWO_BIT_TC_MASK );
- ::rtl::OUString aSvg = ::rtl::OUString::createFromAscii(
- "m 0 0 h5 l5 5 v5 h-5 l-5-5 z" );
+ ::rtl::OUString aSvg( RTL_CONSTASCII_USTRINGPARAM( "m 0 0 h5 l5 5 v5 h-5 l-5-5 z" ));
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly, aSvg );
mpClipMask->clear(Color(0));
@@ -274,14 +262,7 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-// -----------------------------------------------------------------------------
CPPUNIT_TEST_SUITE_REGISTRATION(ClipTest);
}
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-//NOADDITIONAL;
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/filltest.cxx b/basebmp/test/filltest.cxx
index d03e887dbcc5..d15fa1010050 100644
--- a/basebmp/test/filltest.cxx
+++ b/basebmp/test/filltest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,9 @@
// autogenerated file with codegen.pl
-#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
-#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2drange.hxx>
@@ -44,21 +43,12 @@
#include <basebmp/color.hxx>
#include <basebmp/scanlineformats.hxx>
#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/debug.hxx>
#include "tools.hxx"
-#include <iostream>
-#include <fstream>
-
using namespace ::basebmp;
namespace
{
-/*
- std::ofstream output("32bpp_test.dump");
- debugDump( mpDevice32bpp, output );
-*/
-
class FillTest : public CppUnit::TestFixture
{
private:
@@ -167,8 +157,7 @@ private:
CPPUNIT_ASSERT_MESSAGE("bottom-middle pixel set",
rDevice->getPixel(aPt4) == aCol);
- ::rtl::OUString aSvg = ::rtl::OUString::createFromAscii(
- "m 0 0l7 7h-1z" );
+ ::rtl::OUString aSvg( RTL_CONSTASCII_USTRINGPARAM( "m 0 0l7 7h-1z" ));
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly, aSvg );
@@ -268,14 +257,7 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-// -----------------------------------------------------------------------------
CPPUNIT_TEST_SUITE_REGISTRATION(FillTest);
}
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-//NOADDITIONAL;
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/linetest.cxx b/basebmp/test/linetest.cxx
index dbdbe57de0a7..cee66f4d709b 100644
--- a/basebmp/test/linetest.cxx
+++ b/basebmp/test/linetest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,9 @@
// autogenerated file with codegen.pl
-#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
-#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/point/b2ipoint.hxx>
@@ -39,21 +38,12 @@
#include <basebmp/color.hxx>
#include <basebmp/scanlineformats.hxx>
#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/debug.hxx>
#include "tools.hxx"
-#include <iostream>
-#include <fstream>
-
using namespace ::basebmp;
namespace
{
-/*
- std::ofstream output("32bpp_test.dump");
- debugDump( mpDevice32bpp, output );
-*/
-
class LineTest : public CppUnit::TestFixture
{
private:
@@ -216,14 +206,7 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-// -----------------------------------------------------------------------------
CPPUNIT_TEST_SUITE_REGISTRATION(LineTest);
}
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-//NOADDITIONAL;
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/masktest.cxx b/basebmp/test/masktest.cxx
index 63f357a314d0..239a069bf564 100644
--- a/basebmp/test/masktest.cxx
+++ b/basebmp/test/masktest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,9 @@
// autogenerated file with codegen.pl
-#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
-#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2irange.hxx>
@@ -44,23 +43,12 @@
#include <basebmp/color.hxx>
#include <basebmp/scanlineformats.hxx>
#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/debug.hxx>
#include "tools.hxx"
-#include <iostream>
-#include <fstream>
-
using namespace ::basebmp;
namespace
{
-/*
- std::ofstream output("32bpp_test.dump");
- debugDump( rDevice, output );
- std::ofstream output2("32bpp_bmp.dump");
- debugDump( rBmp, output2 );
-*/
-
class MaskTest : public CppUnit::TestFixture
{
private:
@@ -136,8 +124,7 @@ public:
true,
Format::EIGHT_BIT_GREY );
- ::rtl::OUString aSvg = ::rtl::OUString::createFromAscii(
- "m 0 0h5v10h5v-5h-10z" );
+ ::rtl::OUString aSvg( RTL_CONSTASCII_USTRINGPARAM( "m 0 0h5v10h5v-5h-10z" ));
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly, aSvg );
@@ -168,14 +155,7 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-// -----------------------------------------------------------------------------
CPPUNIT_TEST_SUITE_REGISTRATION(MaskTest);
}
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-//NOADDITIONAL;
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/polytest.cxx b/basebmp/test/polytest.cxx
index 2feef67774de..99aba1a06fc4 100644
--- a/basebmp/test/polytest.cxx
+++ b/basebmp/test/polytest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,9 @@
// autogenerated file with codegen.pl
-#include "preextstl.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
-#include "postextstl.h"
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/range/b2irange.hxx>
@@ -45,21 +44,12 @@
#include <basebmp/color.hxx>
#include <basebmp/scanlineformats.hxx>
#include <basebmp/bitmapdevice.hxx>
-#include <basebmp/debug.hxx>
#include "tools.hxx"
-#include <iostream>
-#include <fstream>
-
using namespace ::basebmp;
namespace
{
-/*
- std::ofstream output("32bpp_test.dump");
- debugDump( rDevice, output );
-*/
-
class PolyTest : public CppUnit::TestFixture
{
private:
@@ -76,8 +66,8 @@ private:
basegfx::tools::importFromSvgD(
aPoly,
- rtl::OUString::createFromAscii(
- "M2 2 l7 7 z" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "M2 2 l7 7 z" )) );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -91,8 +81,8 @@ private:
aPoly.clear();
basegfx::tools::importFromSvgD(
aPoly,
- rtl::OUString::createFromAscii(
- "M7 2 l-6 6 z" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "M7 2 l-6 6 z" )) );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -111,8 +101,8 @@ private:
basegfx::tools::importFromSvgD(
aPoly,
- rtl::OUString::createFromAscii(
- "M2 2 h1 l7 7 h-1 z" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "M2 2 h1 l7 7 h-1 z" )) );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -126,8 +116,8 @@ private:
aPoly.clear();
basegfx::tools::importFromSvgD(
aPoly,
- rtl::OUString::createFromAscii(
- "M7 2 h-1 l-6 6 h1 z" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "M7 2 h-1 l-6 6 h1 z" )) );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -141,8 +131,8 @@ private:
aPoly.clear();
basegfx::tools::importFromSvgD(
aPoly,
- rtl::OUString::createFromAscii(
- "M0 0 l7 7 h-1 l-5-7 z" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "M0 0 l7 7 h-1 l-5-7 z" )) );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -160,8 +150,8 @@ private:
::rtl::OUString aSvg;
basegfx::tools::importFromSvgD( aPoly,
- ::rtl::OUString::createFromAscii(
- "M0 0 h7 v7 h-7 z M2 2 v3 h3 v-3 z" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "M0 0 h7 v7 h-7 z M2 2 v3 h3 v-3 z" )) );
rDevice->fillPolyPolygon(
aPoly,
@@ -180,8 +170,8 @@ private:
::rtl::OUString aSvg;
basegfx::tools::importFromSvgD( aPoly,
- ::rtl::OUString::createFromAscii(
- "M0 0 h7 v7 h-7 z M2 2 v3 h3 v-3 z" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "M0 0 h7 v7 h-7 z M2 2 v3 h3 v-3 z" )) );
basegfx::B2DHomMatrix aMat;
aMat.translate(-3,-3);
aMat.rotate( 1.7 );
@@ -218,12 +208,12 @@ private:
::rtl::OUString aSvg;
basegfx::tools::importFromSvgD( aPoly,
- ::rtl::OUString::createFromAscii(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"M0 0 v2 l10 2 v-2 z"
"M10 6 v-2 l-10 2 v2 z"
"M1 0 h1 v10 h-1 z"
"M4 0 h1 v10 h-1 z"
- "M8 0 h1 v10 h-1 z" ) );
+ "M8 0 h1 v10 h-1 z" )) );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -288,14 +278,7 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-// -----------------------------------------------------------------------------
CPPUNIT_TEST_SUITE_REGISTRATION(PolyTest);
}
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-//NOADDITIONAL;
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/tools.cxx b/basebmp/test/tools.cxx
index dbc11395d715..ab7219ec32af 100644
--- a/basebmp/test/tools.cxx
+++ b/basebmp/test/tools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,5 @@ int countPixel( const BitmapDeviceSharedPtr& rDevice,
return count;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/test/tools.hxx b/basebmp/test/tools.hxx
index 254a988fc1bb..57668e55a741 100644
--- a/basebmp/test/tools.hxx
+++ b/basebmp/test/tools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,3 +30,5 @@
int countPixel( const basebmp::BitmapDeviceSharedPtr& rDevice,
basebmp::Color checkColor );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */