diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-22 18:34:06 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-24 11:52:43 +0200 |
commit | b85ff98383942360901b8242cf77366782400426 (patch) | |
tree | 7f895e035daaacdf0679dcb4236cdb188b70a034 /vcl/source/outdev/outdev.cxx | |
parent | 4b46826ec2219935ebcf86ed6e6db73910122e72 (diff) |
Change PDFWriterImpl into an OutputDevice
It actually changes it into a VirtualDevice and should just be a
refactoring. We get rid of the crude stuff in a follow up patch,
While at it unfriend PDFWriterImpl from OutputDevice.
Change-Id: Id43731ad076690292c30f9f3e05ff0dd58edc5e5
Reviewed-on: https://gerrit.libreoffice.org/62201
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/source/outdev/outdev.cxx')
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 2be0140182c6..98af9d0ba0ce 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -34,6 +34,8 @@ #include <outdevstatestack.hxx> #include <PhysicalFontCollection.hxx> +#include "../gdi/pdfwriter_impl.hxx" + #ifdef DISABLE_DYNLOADING // Linking all needed LO code into one .so/executable, these already // exist in the tools library, so put them in the anonymous namespace @@ -142,6 +144,8 @@ OutputDevice::~OutputDevice() void OutputDevice::dispose() { + mpPDFWriter.disposeAndClear(); + if ( GetUnoGraphicsList() ) { UnoWrapperBase* pWrapper = UnoWrapperBase::GetUnoWrapper( false ); @@ -758,4 +762,15 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, return bDrawn; } +vcl::PDFWriterImpl* OutputDevice::GetPDFWriter() const +{ + return static_cast<vcl::PDFWriterImpl*>(mpPDFWriter.get()); +} + +void OutputDevice::SetPDFWriter(vcl::PDFWriterImpl* pPDFWriter) +{ + mpPDFWriter = pPDFWriter; + ImplUpdateFontData(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |