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 /include/vcl/outdev.hxx | |
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 'include/vcl/outdev.hxx')
-rw-r--r-- | include/vcl/outdev.hxx | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 72d5ae57dca9..4980757a4b1a 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -328,7 +328,6 @@ class VCL_DLLPUBLIC OutputDevice : public virtual VclReferenceBase friend class VirtualDevice; friend class vcl::Window; friend class WorkWindow; - friend class vcl::PDFWriterImpl; friend void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight ); private: @@ -347,7 +346,7 @@ private: std::unique_ptr<OutDevStateStack> mpOutDevStateStack; std::unique_ptr<ImplOutDevData> mpOutDevData; std::vector< VCLXGraphics* >* mpUnoGraphicsList; - vcl::PDFWriterImpl* mpPDFWriter; + VclPtr<OutputDevice> mpPDFWriter; vcl::ExtOutDevData* mpExtOutDevData; // TEMP TEMP TEMP @@ -550,7 +549,7 @@ public: */ bool SupportsOperation( OutDevSupportType ) const; - vcl::PDFWriterImpl* GetPDFWriter() const { return mpPDFWriter; } + vcl::PDFWriterImpl* GetPDFWriter() const; void SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; } vcl::ExtOutDevData* GetExtOutDevData() const { return mpExtOutDevData; } @@ -1181,12 +1180,13 @@ public: vcl::TextLayoutCache const* = nullptr) const; std::shared_ptr<vcl::TextLayoutCache> CreateTextLayoutCache(OUString const&) const; -private: - SAL_DLLPRIVATE void ImplInitTextColor(); - +protected: SAL_DLLPRIVATE void ImplInitTextLineSize(); SAL_DLLPRIVATE void ImplInitAboveTextLineSize(); - + static + SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout ); +private: + SAL_DLLPRIVATE void ImplInitTextColor(); SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines); SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& ); @@ -1202,8 +1202,6 @@ private: SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth ); - static - SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout ); ///@} @@ -1289,12 +1287,15 @@ public: SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists ); protected: + SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const; + SAL_DLLPRIVATE long GetEmphasisAscent() const { return mnEmphasisAscent; } + SAL_DLLPRIVATE long GetEmphasisDescent() const { return mnEmphasisDescent; } + SAL_DLLPRIVATE void SetPDFWriter(vcl::PDFWriterImpl* pPDFWriter); virtual void InitFont() const; virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const; virtual long GetFontExtLeading() const; - private: typedef void ( OutputDevice::* FontUpdateHandler_t )( bool ); @@ -1809,8 +1810,6 @@ public: SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate( long nWidth ) const; -private: - /** Convert a logical X coordinate to a device pixel's X coordinate. To get the device's X coordinate, it must calculate the mapping offset |