summaryrefslogtreecommitdiff
path: root/basebmp
diff options
context:
space:
mode:
Diffstat (limited to 'basebmp')
-rw-r--r--basebmp/source/debug.cxx2
-rw-r--r--basebmp/test/bmptest.cxx16
2 files changed, 17 insertions, 1 deletions
diff --git a/basebmp/source/debug.cxx b/basebmp/source/debug.cxx
index 4fe26f84af9a..765005811b48 100644
--- a/basebmp/source/debug.cxx
+++ b/basebmp/source/debug.cxx
@@ -81,7 +81,7 @@ namespace basebmp
#if OSL_DEBUG_LEVEL > 2
- SAL_DLLPUBLIC_EXPORT void debugDump( const BitmapDeviceSharedPtr& rDevice,
+ void debugDump( const BitmapDeviceSharedPtr& rDevice,
std::ostream& rOutputStream )
{
const basegfx::B2IVector aSize( rDevice->getSize() );
diff --git a/basebmp/test/bmptest.cxx b/basebmp/test/bmptest.cxx
index 571e32e776d0..376b24f4ff2e 100644
--- a/basebmp/test/bmptest.cxx
+++ b/basebmp/test/bmptest.cxx
@@ -89,6 +89,22 @@ private:
DrawMode_PAINT );
CPPUNIT_ASSERT_MESSAGE("number of rendered pixel is not 32",
countPixel( rDevice, aCol ) == 32);
+
+ BitmapDeviceSharedPtr pClone = subsetBitmapDevice(
+ rBmp, aSourceRect );
+
+ // two overlapping areas within the same memory block, check
+ // if we clobber the mem or properly detect the case
+ const basegfx::B2IBox aSourceOverlap(0,0,6,10);
+ const basegfx::B2IBox aDestOverlap(3,0,9,10);
+ rBmp->drawBitmap(
+ pClone,
+ aSourceOverlap,
+ aDestOverlap,
+ DrawMode_PAINT );
+ CPPUNIT_ASSERT_MESSAGE("clobbertest - number of set pixel is not 50",
+ countPixel( rBmp, aCol ) == 50);
+
}
void implTestBmpClip(const BitmapDeviceSharedPtr& rDevice,