From d4dc6b5cfdb02ad00a06ad32650948648abe010d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 2 Sep 2021 20:05:09 +0200 Subject: use std::vector for fetching DX array data because I'm trying to track down a related heap corruption, and that is much easier if the access to the array is checked by the std::vector debug runtime Change-Id: Ia665f5cebb7f14d88942e88b4b400ad3c28ef5d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121527 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/inc/sallayout.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vcl/inc') diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index 9d37b71d1a3e..b2bdcc2d4cb0 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -128,7 +128,7 @@ class MultiSalLayout final : public SalLayout public: void DrawText(SalGraphics&) const override; sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const override; - DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const override; + DeviceCoordinate FillDXArray(std::vector* pDXArray) const override; void GetCaretPositions(int nArraySize, tools::Long* pCaretXArray) const override; bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, const LogicalFontInstance** ppGlyphFont = nullptr, @@ -179,7 +179,7 @@ public: // used by upper layers DeviceCoordinate GetTextWidth() const final override; - DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const final override; + DeviceCoordinate FillDXArray(std::vector* pDXArray) const final override; sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const final override; void GetCaretPositions(int nArraySize, tools::Long* pCaretXArray) const final override; @@ -206,7 +206,7 @@ private: void Justify(DeviceCoordinate nNewWidth); void ApplyAsianKerning(const OUString& rStr); - void GetCharWidths(DeviceCoordinate* pCharWidths) const; + void GetCharWidths(std::vector& rCharWidths) const; void SetNeedFallback(ImplLayoutArgs&, sal_Int32, bool); -- cgit