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/font.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/font.cxx')
-rw-r--r-- | vcl/source/outdev/font.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index e3b7f1a2acaa..981e087e8330 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -542,7 +542,7 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists ) if (mxFontCollection && mxFontCollection != pSVData->maGDIData.mxScreenFontList) mxFontCollection->Clear(); - if( mpPDFWriter ) + if( GetPDFWriter() ) { mxFontCollection.reset(); mxFontCache.reset(); @@ -579,7 +579,7 @@ void OutputDevice::ImplRefreshFontData( const bool bNewFontLists ) // we need a graphics if ( AcquireGraphics() ) { - if( mpPDFWriter ) + if( GetPDFWriter() ) { mxFontCollection = pSVData->maGDIData.mxScreenFontList->Clone(); mxFontCache.reset(new ImplFontCache); @@ -1005,12 +1005,19 @@ void OutputDevice::InitFont() const mbInitFont = false; } +const LogicalFontInstance* OutputDevice::GetFontInstance() const +{ + if (ImplNewFont()) + InitFont(); + return mpFontInstance.get(); +} + bool OutputDevice::ImplNewFont() const { DBG_TESTSOLARMUTEX(); // get correct font list on the PDF writer if necessary - if( mpPDFWriter ) + if( GetPDFWriter() ) { const ImplSVData* pSVData = ImplGetSVData(); if( mxFontCollection == pSVData->maGDIData.mxScreenFontList |