diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-10-31 11:23:11 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-10-31 15:52:02 +0100 |
commit | b5e701d36ec16776e01597fd250dbde2e73fad3a (patch) | |
tree | c5f5fee0355dc6eca66dd4dcaca40a78e63dc6cf /editeng | |
parent | d4b63c4562ec4c612df675502fd35c7c88bc432d (diff) |
add o3tl::span ctor from std::vector
Makes code simpler, and std::span can be constructed from std::vector
too.
Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 4 | ||||
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 59d0d4d583c1..75463945c724 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3392,7 +3392,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po aTmpFont.SetPhysFont(*GetRefDevice()); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, nTextStart, nTextLen, &aTmpDXArray ); - pDXArray = o3tl::span(aTmpDXArray.data(), aTmpDXArray.size()); + pDXArray = aTmpDXArray; // add a meta file comment if we record to a metafile if( bMetafileValid ) @@ -3418,7 +3418,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po // crash when accessing 0 pointer in pDXArray aTmpFont.SetPhysFont(*GetRefDevice()); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, 0, aText.getLength(), &aTmpDXArray ); - pDXArray = o3tl::span(aTmpDXArray.data(), aTmpDXArray.size()); + pDXArray = aTmpDXArray; } tools::Long nTxtWidth = rTextPortion.GetSize().Width(); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index c5ee16f7760c..d3500c879378 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -977,7 +977,7 @@ void Outliner::PaintBullet(sal_Int32 nPara, const Point& rStartPos, const Point& aTextPos.AdjustY( -(aMetric.GetDescent()) ); } - DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), o3tl::span(aBuf.data(), aBuf.size()), + DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), aBuf, aSvxFont, nPara, bRightToLeftPara ? 1 : 0, nullptr, nullptr, false, false, true, nullptr, Color(), Color()); } else |