diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-28 09:27:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-29 12:38:51 +0200 |
commit | 894b4911ffb96ff667fdeb3aec7922316ab7230a (patch) | |
tree | 3942ed8088c058b70bb79984b186c5156284abf4 /svtools | |
parent | 5b0ae3b59cd2cccfb72d991657366eb2a69bff49 (diff) |
pass DX array around using o3tl::span instead of pointer
so we get bounds checking in debug mode
Note that I cannot just pass around the std::vectors
involved because there is a place in editeng which
calls with a subset of a vector.
Change-Id: I5088a139593c27bf9cbe5d843ab4b0048ac6d508
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124330
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ruler.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index c4af43b1d267..d3d5af0e00de 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -79,7 +79,7 @@ SalLayoutGlyphs* lcl_GetRulerTextGlyphs(const vcl::RenderContext& rRenderContext // Calculate glyph items. std::unique_ptr<SalLayout> pLayout = rRenderContext.ImplLayout( - rText, 0, rText.getLength(), Point(0, 0), 0, nullptr, SalLayoutFlags::GlyphItemsOnly); + rText, 0, rText.getLength(), Point(0, 0), 0, {}, SalLayoutFlags::GlyphItemsOnly); if (!pLayout) return nullptr; @@ -339,7 +339,7 @@ void Ruler::ImplVDrawText(vcl::RenderContext& rRenderContext, tools::Long nX, to tools::Rectangle aRect; SalLayoutGlyphs* pTextLayout = lcl_GetRulerTextGlyphs(rRenderContext, rText, maTextGlyphs[rText]); - rRenderContext.GetTextBoundRect(aRect, rText, 0, 0, -1, 0, nullptr, pTextLayout); + rRenderContext.GetTextBoundRect(aRect, rText, 0, 0, -1, 0, {}, pTextLayout); tools::Long nShiftX = ( aRect.GetWidth() / 2 ) + aRect.Left(); tools::Long nShiftY = ( aRect.GetHeight() / 2 ) + aRect.Top(); |