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>
This commit is contained in:
@@ -211,25 +211,25 @@ protected:
|
|||||||
Point maDrawBase;
|
Point maDrawBase;
|
||||||
};
|
};
|
||||||
|
|
||||||
class VCL_PLUGIN_PUBLIC MultiSalLayout : public SalLayout
|
class VCL_PLUGIN_PUBLIC MultiSalLayout final : public SalLayout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void DrawText( SalGraphics& ) const override;
|
void DrawText(SalGraphics&) const override;
|
||||||
virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const override;
|
sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const override;
|
||||||
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const override;
|
DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const override;
|
||||||
virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const override;
|
void GetCaretPositions(int nArraySize, long* pCaretXArray) const override;
|
||||||
virtual bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&,
|
bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&,
|
||||||
const PhysicalFontFace** pFallbackFont = nullptr) const override;
|
const PhysicalFontFace** pFallbackFont = nullptr) const override;
|
||||||
virtual bool GetOutline( SalGraphics&, basegfx::B2DPolyPolygonVector& ) const override;
|
bool GetOutline(SalGraphics&, basegfx::B2DPolyPolygonVector&) const override;
|
||||||
virtual bool IsKashidaPosValid(int nCharPos) const override;
|
bool IsKashidaPosValid(int nCharPos) const override;
|
||||||
|
|
||||||
// used only by OutputDevice::ImplLayout, TODO: make friend
|
// used only by OutputDevice::ImplLayout, TODO: make friend
|
||||||
explicit MultiSalLayout( std::unique_ptr<SalLayout> pBaseLayout );
|
explicit MultiSalLayout( std::unique_ptr<SalLayout> pBaseLayout );
|
||||||
void AddFallback( std::unique_ptr<SalLayout> pFallbackLayout,
|
void AddFallback( std::unique_ptr<SalLayout> pFallbackLayout,
|
||||||
ImplLayoutRuns const &, const PhysicalFontFace* pFallbackFont );
|
ImplLayoutRuns const &, const PhysicalFontFace* pFallbackFont );
|
||||||
virtual bool LayoutText( ImplLayoutArgs& ) override;
|
bool LayoutText(ImplLayoutArgs&) override;
|
||||||
virtual void AdjustLayout( ImplLayoutArgs& ) override;
|
void AdjustLayout(ImplLayoutArgs&) override;
|
||||||
virtual void InitFont() const override;
|
void InitFont() const override;
|
||||||
|
|
||||||
void SetIncomplete(bool bIncomplete);
|
void SetIncomplete(bool bIncomplete);
|
||||||
|
|
||||||
@@ -238,9 +238,9 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// dummy implementations
|
// dummy implementations
|
||||||
virtual void MoveGlyph( int, long ) override {}
|
void MoveGlyph(int, long) override {}
|
||||||
virtual void DropGlyph( int ) override {}
|
void DropGlyph(int) override {}
|
||||||
virtual void Simplify( bool ) override {}
|
void Simplify(bool) override {}
|
||||||
|
|
||||||
MultiSalLayout( const MultiSalLayout& ) = delete;
|
MultiSalLayout( const MultiSalLayout& ) = delete;
|
||||||
MultiSalLayout& operator=( const MultiSalLayout& ) = delete;
|
MultiSalLayout& operator=( const MultiSalLayout& ) = delete;
|
||||||
@@ -319,16 +319,16 @@ public:
|
|||||||
bool IsKashidaPosValid(int nCharPos) const final override;
|
bool IsKashidaPosValid(int nCharPos) const final override;
|
||||||
|
|
||||||
// used by upper layers
|
// used by upper layers
|
||||||
virtual DeviceCoordinate GetTextWidth() const override;
|
DeviceCoordinate GetTextWidth() const final override;
|
||||||
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const override;
|
DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const final override;
|
||||||
virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const override;
|
sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const final override;
|
||||||
virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const override;
|
void GetCaretPositions(int nArraySize, long* pCaretXArray) const final override;
|
||||||
|
|
||||||
// used by display layers
|
// used by display layers
|
||||||
LogicalFontInstance& GetFont() const { return *mpFont; }
|
LogicalFontInstance& GetFont() const { return *mpFont; }
|
||||||
|
|
||||||
virtual bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&,
|
bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int&,
|
||||||
const PhysicalFontFace** pFallbackFont = nullptr) const override;
|
const PhysicalFontFace** pFallbackFont = nullptr) const final override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// for glyph+font+script fallback
|
// for glyph+font+script fallback
|
||||||
|
Reference in New Issue
Block a user