summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/print.hxx4
-rw-r--r--vcl/source/gdi/print.cxx13
-rw-r--r--vcl/source/image/Image.cxx3
3 files changed, 2 insertions, 18 deletions
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index e92e13d60d82..bf5112a9b8ef 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -372,10 +372,6 @@ public:
virtual void CopyArea( const Point& rDestPt, const Point& rSrcPt,
const Size& rSrcSize, bool bWindowInvalidate = false ) override;
- virtual void DrawImage( const Point&, const Image&, DrawImageFlags ) override;
- virtual void DrawImage( const Point&, const Size&, const Image&, DrawImageFlags ) override;
-
-
// These 3 together are more modular PrintJob(), allowing printing more documents as one print job
// by repeated calls to ExecutePrintJob(). Used by mailmerge.
static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 725605348e32..8e07fd09770a 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1792,19 +1792,6 @@ void Printer::SetFontOrientation( LogicalFontInstance* const pFontEntry ) const
pFontEntry->mnOrientation = pFontEntry->mxFontMetric->GetOrientation();
}
-void Printer::DrawImage( const Point&, const Image&, DrawImageFlags )
-{
- SAL_WARN ("vcl.gdi", "DrawImage(): Images can't be drawn on any Printer instance");
- assert(false);
-}
-
-void Printer::DrawImage( const Point&, const Size&, const Image&, DrawImageFlags )
-{
- SAL_WARN ("vcl.gdi", "DrawImage(): Images can't be drawn on any Printer instance");
- 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");
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index dedc0cff72a2..607fed2b6f64 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -228,7 +228,8 @@ bool Image::operator==(const Image& rImage) const
void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle, const Size* pSize)
{
- if (mpImplData == nullptr || !mpImplData->mpBitmapEx || !pOutDev->IsDeviceOutputNecessary())
+ if (mpImplData == nullptr || !mpImplData->mpBitmapEx ||
+ (!pOutDev->IsDeviceOutputNecessary() && pOutDev->GetConnectMetaFile() == nullptr))
return;
const Point aSrcPos(0, 0);