From 6217cfd414ee86b160313c0a71b7d62e1eb3db14 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Tue, 23 Oct 2018 14:01:24 +0200 Subject: Introduce OutputDevice type OUTDEV_PDF Originally I thought mpPDFWriter can be used to create PDF from any OutputDevice, but it's actually just set for the internal VirtualDevice of the PDF writer. So this gets rid of all the special mpPDFWriter and GetPDFWriter() handling and replaces it with checks for OUTDEV_PDF. But since ImplPDFWriter used to be a OUTDEV_VIRDEV, this also introduces OutputDevice::IsVirtual(), which now replaces most of the direct OUTDEV_VIRDEV checks. Change-Id: I11824143b6b8833ecc81119762448cbdf1145dbc Reviewed-on: https://gerrit.libreoffice.org/62257 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski --- svx/source/sdr/contact/objectcontactofobjlistpainter.cxx | 2 +- svx/source/sdr/contact/objectcontactofpageview.cxx | 2 +- svx/source/svdraw/sdrpaintwindow.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'svx') diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx index 2e89227ff93d..cd1c49457bfe 100644 --- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx +++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx @@ -138,7 +138,7 @@ bool ObjectContactOfObjListPainter::isOutputToRecordingMetaFile() const // pdf export? bool ObjectContactOfObjListPainter::isOutputToPDFFile() const { - return (nullptr != mrTargetOutputDevice.GetPDFWriter()); + return OUTDEV_PDF == mrTargetOutputDevice.GetOutDevType(); } OutputDevice* ObjectContactOfObjListPainter::TryToGetOutputDevice() const diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index e4b4b6ca1de9..6a2247bcd6c2 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -396,7 +396,7 @@ namespace sdr // pdf export? bool ObjectContactOfPageView::isOutputToPDFFile() const { - return (nullptr != mrPageWindow.GetPaintWindow().GetOutputDevice().GetPDFWriter()); + return OUTDEV_PDF == mrPageWindow.GetPaintWindow().GetOutputDevice().GetOutDevType(); } // gray display mode diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index 65dbfc8f156d..0eb8e5c0db29 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -284,7 +284,7 @@ void SdrPaintWindow::PreparePreRenderDevice() const bool bPrepareBufferedOutput( mrPaintView.IsBufferedOutputAllowed() && !OutputToPrinter() - && !OutputToVirtualDevice() + && !OutputIsVirtualDevice() && !OutputToRecordingMetaFile()); if(bPrepareBufferedOutput) -- cgit