diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2018-05-12 04:18:39 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2018-05-12 19:59:10 +0200 |
commit | 4ad07c563e50524f86c074ae50c5e82f504a3dcb (patch) | |
tree | 195c9ddbd7a253f1b2a45b36bed9ac35d95e7c35 /vcl | |
parent | 203e3099c17bf245f8fcd52c32c58d47bd241c2b (diff) |
Make SalLayout overrides final
We really don’t want anyone to subclass these classes and introduce new
text layout inconsistencies.
Change-Id: I38d046dc2fab602fd262dc43ac86b55fb0c59db2
Reviewed-on: https://gerrit.libreoffice.org/54153
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/sallayout.hxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index ef5be707d85c..62cda5832906 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -211,25 +211,25 @@ protected: Point maDrawBase; }; -class VCL_PLUGIN_PUBLIC MultiSalLayout : public SalLayout +class VCL_PLUGIN_PUBLIC MultiSalLayout final : public SalLayout { public: - virtual void DrawText( SalGraphics& ) const override; - virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const override; - virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const override; - virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const override; - virtual bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&, + void DrawText(SalGraphics&) const override; + sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const override; + DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const override; + void GetCaretPositions(int nArraySize, long* pCaretXArray) const override; + bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&, const PhysicalFontFace** pFallbackFont = nullptr) const override; - virtual bool GetOutline( SalGraphics&, basegfx::B2DPolyPolygonVector& ) const override; - virtual bool IsKashidaPosValid(int nCharPos) const override; + bool GetOutline(SalGraphics&, basegfx::B2DPolyPolygonVector&) const override; + bool IsKashidaPosValid(int nCharPos) const override; // used only by OutputDevice::ImplLayout, TODO: make friend explicit MultiSalLayout( std::unique_ptr<SalLayout> pBaseLayout ); void AddFallback( std::unique_ptr<SalLayout> pFallbackLayout, ImplLayoutRuns const &, const PhysicalFontFace* pFallbackFont ); - virtual bool LayoutText( ImplLayoutArgs& ) override; - virtual void AdjustLayout( ImplLayoutArgs& ) override; - virtual void InitFont() const override; + bool LayoutText(ImplLayoutArgs&) override; + void AdjustLayout(ImplLayoutArgs&) override; + void InitFont() const override; void SetIncomplete(bool bIncomplete); @@ -238,9 +238,9 @@ public: private: // dummy implementations - virtual void MoveGlyph( int, long ) override {} - virtual void DropGlyph( int ) override {} - virtual void Simplify( bool ) override {} + void MoveGlyph(int, long) override {} + void DropGlyph(int) override {} + void Simplify(bool) override {} MultiSalLayout( const MultiSalLayout& ) = delete; MultiSalLayout& operator=( const MultiSalLayout& ) = delete; @@ -319,16 +319,16 @@ public: bool IsKashidaPosValid(int nCharPos) const final override; // used by upper layers - virtual DeviceCoordinate GetTextWidth() const override; - virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const override; - virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const override; - virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const override; + DeviceCoordinate GetTextWidth() const final override; + DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const final override; + sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const final override; + void GetCaretPositions(int nArraySize, long* pCaretXArray) const final override; // used by display layers LogicalFontInstance& GetFont() const { return *mpFont; } - virtual bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&, - const PhysicalFontFace** pFallbackFont = nullptr) const override; + bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&, + const PhysicalFontFace** pFallbackFont = nullptr) const final override; protected: // for glyph+font+script fallback |