diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-04-23 00:51:39 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-04-23 07:23:41 +1000 |
commit | 704e5abbe99b41859bb02d816ea1dc439180a5f6 (patch) | |
tree | bfc9053d99d806ecae0a1f619157aaa8aef02dd9 /vcl | |
parent | 1893ca5fd5fe66265af43473436b2943b35e1f2b (diff) |
Move bitmap functions in header, warn if calling GetBitmap() in Printer
Change-Id: Id2325822730d3d9167706c8c4118eaa3ca727195
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/print.cxx | 8 | ||||
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index b3daa804a7e6..5b571d9ea6ab 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -1844,4 +1844,12 @@ void Printer::DrawImage( const Point&, const Size&, const Image&, sal_uInt16 ) assert(false); } + +Bitmap Printer::GetBitmap( const Point& rSrcPt, const Size& rSize ) const +{ + SAL_WARN("vcl.gdi", "GetBitmap(): This should never be called on by a Printer instance"); + + return OutputDevice::GetBitmap( rSrcPt, rSize ); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 019fe99a5a68..68e13c742535 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -474,7 +474,7 @@ bool OutputDevice::TransformAndReduceBitmapExToTargetRange( aVisibleRange.transform(aMakeVisibleRangeRelative); } - // for pixel devices, do *not* limit size, else OutputDevice::ImplDrawAlpha + // for pixel devices, do *not* limit size, else OutputDevice::DrawAlphaBitmap // will create another, badly scaled bitmap to do the job. Nonetheless, do a // maximum clipping of something big (1600x1280x2). Add 1.0 to avoid rounding // errors in rough estimations @@ -880,8 +880,6 @@ void OutputDevice::DrawImage( const Point& rPos, const Size& rSize, Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const { - OSL_ENSURE(OUTDEV_PRINTER != GetOutDevType(), "OutputDevice::GetBitmap with sorce type OUTDEV_PRINTER should not be used (!)"); - Bitmap aBmp; long nX = ImplLogicXToDevicePixel( rSrcPt.X() ); long nY = ImplLogicYToDevicePixel( rSrcPt.Y() ); |