diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-11 13:27:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-11 21:53:13 +0200 |
commit | 6d1b241ab7b2edf3f3eef26f4cc514c22849caf5 (patch) | |
tree | 3c8c3b278b5fe084434b0bee682575d4a41c0adb /editeng | |
parent | 432e34fd1e0309038d0765f2497b7925c16a8ed2 (diff) |
Drop o3tl::span, can use C++20 std::span directly now
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/outleeng.hxx | 4 | ||||
-rw-r--r-- | editeng/inc/pch/precompiled_editeng.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 10 | ||||
-rw-r--r-- | editeng/source/items/svxfont.cxx | 24 | ||||
-rw-r--r-- | editeng/source/outliner/outleeng.cxx | 2 | ||||
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 4 | ||||
-rw-r--r-- | editeng/source/uno/unoipset.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 4 |
9 files changed, 27 insertions, 27 deletions
diff --git a/editeng/inc/outleeng.hxx b/editeng/inc/outleeng.hxx index fb452a460864..36194c3d0f6f 100644 --- a/editeng/inc/outleeng.hxx +++ b/editeng/inc/outleeng.hxx @@ -46,8 +46,8 @@ public: virtual void ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph ) override; virtual void DrawingText( const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, - sal_Int32 nTextLen, o3tl::span<const sal_Int32> pDXArray, - o3tl::span<const sal_Bool> pKashidaArray, const SvxFont& rFont, + sal_Int32 nTextLen, std::span<const sal_Int32> pDXArray, + std::span<const sal_Bool> pKashidaArray, const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx index 3f5d71018ac5..5a89fbe7cace 100644 --- a/editeng/inc/pch/precompiled_editeng.hxx +++ b/editeng/inc/pch/precompiled_editeng.hxx @@ -47,6 +47,7 @@ #include <optional> #include <ostream> #include <set> +#include <span> #include <stddef.h> #include <string.h> #include <string> @@ -214,7 +215,6 @@ #include <o3tl/cow_wrapper.hxx> #include <o3tl/safeint.hxx> #include <o3tl/sorted_vector.hxx> -#include <o3tl/span.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> #include <o3tl/underlyingenumvalue.hxx> diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 9e6696cd5546..0dd24c941069 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2495,7 +2495,7 @@ css::uno::Reference< css::datatransfer::XTransferable > // ====================== Virtual Methods ======================== void EditEngine::DrawingText( const Point&, const OUString&, sal_Int32, sal_Int32, - o3tl::span<const sal_Int32>, o3tl::span<const sal_Bool>, + std::span<const sal_Int32>, std::span<const sal_Bool>, const SvxFont&, sal_Int32 /*nPara*/, sal_uInt8 /*nRightToLeft*/, const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, const css::lang::Locale*, const Color&, const Color&) diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 0052fb5e720d..e02959bb2e07 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -145,7 +145,7 @@ static void lcl_DrawRedLines( OutputDevice& rOutDev, const Point& rPoint, size_t nIndex, size_t nMaxEnd, - o3tl::span<const sal_Int32> pDXArray, + std::span<const sal_Int32> pDXArray, WrongList const * pWrongs, Degree10 nOrientation, const Point& rOrigin, @@ -3458,8 +3458,8 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po OUString aText; sal_Int32 nTextStart = 0; sal_Int32 nTextLen = 0; - o3tl::span<const sal_Int32> pDXArray; - o3tl::span<const sal_Bool> pKashidaArray; + std::span<const sal_Int32> pDXArray; + std::span<const sal_Bool> pKashidaArray; KernArray aTmpDXArray; if ( rTextPortion.GetKind() == PortionKind::TEXT ) @@ -3467,12 +3467,12 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po aText = pPortion->GetNode()->GetString(); nTextStart = nIndex; nTextLen = rTextPortion.GetLen(); - pDXArray = o3tl::span(pLine->GetCharPosArray().data() + (nIndex - pLine->GetStart()), + pDXArray = std::span(pLine->GetCharPosArray().data() + (nIndex - pLine->GetStart()), pLine->GetCharPosArray().size() - (nIndex - pLine->GetStart())); if (!pLine->GetKashidaArray().empty()) { - pKashidaArray = o3tl::span(pLine->GetKashidaArray().data() + (nIndex - pLine->GetStart()), + pKashidaArray = std::span(pLine->GetKashidaArray().data() + (nIndex - pLine->GetStart()), pLine->GetKashidaArray().size() - (nIndex - pLine->GetStart())); } diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 0d7e1f659b7b..876bc06868f8 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -524,8 +524,8 @@ Size SvxFont::GetTextSize(const OutputDevice& rOut, const OUString &rTxt, } static void DrawTextArray( OutputDevice* pOut, const Point& rStartPt, const OUString& rStr, - o3tl::span<const sal_Int32> pDXAry, - o3tl::span<const sal_Bool> pKashidaAry, + std::span<const sal_Int32> pDXAry, + std::span<const sal_Bool> pKashidaAry, sal_Int32 nIndex, sal_Int32 nLen ) { const SalLayoutGlyphs* layoutGlyphs = SalLayoutGlyphsCache::self()->GetLayoutGlyphs(pOut, rStr, nIndex, nLen); @@ -535,8 +535,8 @@ static void DrawTextArray( OutputDevice* pOut, const Point& rStartPt, const OUSt void SvxFont::QuickDrawText( OutputDevice *pOut, const Point &rPos, const OUString &rTxt, const sal_Int32 nIdx, const sal_Int32 nLen, - o3tl::span<const sal_Int32> pDXArray, - o3tl::span<const sal_Bool> pKashidaArray) const + std::span<const sal_Int32> pDXArray, + std::span<const sal_Bool> pKashidaArray) const { // Font has to be selected in OutputDevice... @@ -774,12 +774,12 @@ protected: Point aPos; Point aSpacePos; short nKern; - o3tl::span<const sal_Int32> pDXArray; - o3tl::span<const sal_Bool> pKashidaArray; + std::span<const sal_Int32> pDXArray; + std::span<const sal_Bool> pKashidaArray; public: SvxDoDrawCapital( SvxFont *pFnt, OutputDevice *_pOut, const OUString &_rTxt, - o3tl::span<const sal_Int32> _pDXArray, - o3tl::span<const sal_Bool> _pKashidaArray, + std::span<const sal_Int32> _pDXArray, + std::span<const sal_Bool> _pKashidaArray, const sal_Int32 _nIdx, const sal_Int32 _nLen, const Point &rPos, const short nKrn ) : SvxDoCapitals( _rTxt, _nIdx, _nLen ), @@ -870,8 +870,8 @@ void SvxDoDrawCapital::Do( const OUString &_rTxt, const sal_Int32 nSpanIdx, aDXArray.push_back(pDXArray[nStartOffset + i] - nStartX); auto aKashidaArray = !pKashidaArray.empty() ? - o3tl::span<const sal_Bool>(pKashidaArray.data() + nStartOffset, nSpanLen) : - o3tl::span<const sal_Bool>(); + std::span<const sal_Bool>(pKashidaArray.data() + nStartOffset, nSpanLen) : + std::span<const sal_Bool>(); DrawTextArray(pOut, aStartPos, _rTxt, aDXArray, aKashidaArray, nSpanIdx, nSpanLen); // in this case we leave aPos at the start and use the DXArray to find the start @@ -893,8 +893,8 @@ void SvxDoDrawCapital::Do( const OUString &_rTxt, const sal_Int32 nSpanIdx, void SvxFont::DrawCapital( OutputDevice *pOut, const Point &rPos, const OUString &rTxt, - o3tl::span<const sal_Int32> pDXArray, - o3tl::span<const sal_Bool> pKashidaArray, + std::span<const sal_Int32> pDXArray, + std::span<const sal_Bool> pKashidaArray, const sal_Int32 nIdx, const sal_Int32 nLen ) const { SvxDoDrawCapital aDo(const_cast<SvxFont *>(this), pOut, diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index 2ab56a16c02d..1136ef37b9e2 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -151,7 +151,7 @@ OUString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const } void OutlinerEditEng::DrawingText( const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, sal_Int32 nTextLen, - o3tl::span<const sal_Int32> pDXArray, o3tl::span<const sal_Bool> pKashidaArray, + std::span<const sal_Int32> pDXArray, std::span<const sal_Bool> pKashidaArray, const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 5af4573bf659..1ff61216e0b6 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -1649,8 +1649,8 @@ void Outliner::StripPortions() } void Outliner::DrawingText( const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, - sal_Int32 nTextLen, o3tl::span<const sal_Int32> pDXArray, - o3tl::span<const sal_Bool> pKashidaArray, const SvxFont& rFont, + sal_Int32 nTextLen, std::span<const sal_Int32> pDXArray, + std::span<const sal_Bool> pKashidaArray, const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index 5ac72ee1ca6a..4a4dd9f5e505 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -31,7 +31,7 @@ using namespace ::com::sun::star; -SvxItemPropertySet::SvxItemPropertySet( o3tl::span<const SfxItemPropertyMapEntry> pMap, SfxItemPool& rItemPool ) +SvxItemPropertySet::SvxItemPropertySet( std::span<const SfxItemPropertyMapEntry> pMap, SfxItemPool& rItemPool ) : m_aPropertyMap( pMap ), mrItemPool( rItemPool ) { diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index be92bb4d89d3..99635d7d490a 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -79,7 +79,7 @@ const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() return &aTextCursorSvxPropertySet; } -o3tl::span<const SfxItemPropertyMapEntry> ImplGetSvxTextPortionPropertyMap() +std::span<const SfxItemPropertyMapEntry> ImplGetSvxTextPortionPropertyMap() { // Propertymap for an Outliner Text static const SfxItemPropertyMapEntry aSvxTextPortionPropertyMap[] = @@ -107,7 +107,7 @@ static const SfxItemPropertySet* ImplGetSvxTextPortionSfxPropertySet() return &aSvxTextPortionSfxPropertySet; } -o3tl::span<const SfxItemPropertyMapEntry> ImplGetSvxUnoOutlinerTextCursorPropertyMap() +std::span<const SfxItemPropertyMapEntry> ImplGetSvxUnoOutlinerTextCursorPropertyMap() { // Propertymap for an Outliner Text static const SfxItemPropertyMapEntry aSvxUnoOutlinerTextCursorPropertyMap[] = |