summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-02 20:05:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-04 08:17:06 +0200
commitd4dc6b5cfdb02ad00a06ad32650948648abe010d (patch)
tree02446cd93e68aba9b78db6eb7fc902e782c6faf9 /vcl/inc
parent86fa9c907387e96c9c93f1e17239730271fedbfd (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/sallayout.hxx6
1 files changed, 3 insertions, 3 deletions
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<DeviceCoordinate>* 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<DeviceCoordinate>* 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<DeviceCoordinate>& rCharWidths) const;
void SetNeedFallback(ImplLayoutArgs&, sal_Int32, bool);