accessibility/inc/pch/precompiled_acc.hxx | 2 basctl/inc/pch/precompiled_basctl.hxx | 2 bin/find-can-be-private-symbols.functions.results | 6 - bin/find-unneeded-includes | 1 canvas/source/cairo/cairo_textlayout.cxx | 2 canvas/source/directx/dx_textlayout_drawhelper.cxx | 2 canvas/source/opengl/ogl_canvashelper.cxx | 2 canvas/source/vcl/textlayout.cxx | 4 chart2/inc/pch/precompiled_chartcontroller.hxx | 2 chart2/inc/pch/precompiled_chartcore.hxx | 2 comphelper/source/misc/simplefileaccessinteraction.cxx | 2 comphelper/source/misc/stillreadwriteinteraction.cxx | 2 comphelper/source/property/propertysetinfo.cxx | 4 config_host/config_global.h.in | 3 configure.ac | 16 -- cppcanvas/source/inc/implrenderer.hxx | 4 cppcanvas/source/mtfrenderer/implrenderer.cxx | 2 cppcanvas/source/mtfrenderer/textaction.cxx | 4 cppcanvas/source/mtfrenderer/textaction.hxx | 7 - cui/inc/pch/precompiled_cui.hxx | 2 dbaccess/inc/pch/precompiled_dbu.hxx | 2 editeng/inc/outleeng.hxx | 4 editeng/inc/pch/precompiled_editeng.hxx | 2 editeng/source/editeng/editeng.cxx | 2 editeng/source/editeng/impedit3.cxx | 10 - editeng/source/items/svxfont.cxx | 24 ++-- editeng/source/outliner/outleeng.cxx | 2 editeng/source/outliner/outliner.cxx | 4 editeng/source/uno/unoipset.cxx | 2 editeng/source/uno/unotext.cxx | 4 filter/source/config/cache/basecontainer.cxx | 2 filter/source/config/cache/cacheitem.cxx | 4 filter/source/config/cache/cacheitem.hxx | 6 - filter/source/config/cache/filtercache.cxx | 4 filter/source/config/cache/filtercache.hxx | 4 framework/inc/pch/precompiled_fwk.hxx | 2 include/comphelper/propertysetinfo.hxx | 6 - include/editeng/editeng.hxx | 6 - include/editeng/outliner.hxx | 12 +- include/editeng/svxfont.hxx | 13 +- include/editeng/unoipset.hxx | 2 include/editeng/unotext.hxx | 6 - include/o3tl/span.hxx | 100 ----------------- include/sfx2/dispatch.hxx | 4 include/svl/itemprop.hxx | 10 - include/svx/sdr/properties/defaultproperties.hxx | 4 include/svx/unoprov.hxx | 4 include/svx/unoshape.hxx | 12 +- include/ucbhelper/interceptedinteraction.hxx | 6 - include/vcl/kernarray.hxx | 6 - include/vcl/metaact.hxx | 4 include/vcl/outdev.hxx | 12 +- include/vcl/pdfwriter.hxx | 2 include/xmloff/txtparae.hxx | 6 - linguistic/source/lngopt.cxx | 2 o3tl/CppunitTest_o3tl_tests.mk | 1 o3tl/qa/test-span.cxx | 60 ---------- oox/inc/pch/precompiled_oox.hxx | 2 reportdesign/inc/pch/precompiled_rpt.hxx | 2 reportdesign/inc/pch/precompiled_rptui.hxx | 2 sc/inc/optuno.hxx | 2 sc/inc/pch/precompiled_sc.hxx | 2 sc/source/ui/unoobj/PivotTableDataProvider.cxx | 2 sc/source/ui/unoobj/PivotTableDataSequence.cxx | 2 sc/source/ui/unoobj/afmtuno.cxx | 4 sc/source/ui/unoobj/appluno.cxx | 2 sc/source/ui/unoobj/cellsuno.cxx | 2 sc/source/ui/unoobj/chart2uno.cxx | 4 sc/source/ui/unoobj/condformatuno.cxx | 12 +- sc/source/ui/unoobj/confuno.cxx | 2 sc/source/ui/unoobj/dapiuno.cxx | 6 - sc/source/ui/unoobj/datauno.cxx | 6 - sc/source/ui/unoobj/defltuno.cxx | 2 sc/source/ui/unoobj/docuno.cxx | 6 - sc/source/ui/unoobj/fmtuno.cxx | 2 sc/source/ui/unoobj/linkuno.cxx | 2 sc/source/ui/unoobj/nameuno.cxx | 4 sc/source/ui/unoobj/optuno.cxx | 2 sc/source/ui/unoobj/shapeuno.cxx | 2 sc/source/ui/unoobj/srchuno.cxx | 2 sc/source/ui/unoobj/targuno.cxx | 2 sc/source/ui/unoobj/tokenuno.cxx | 2 sc/source/ui/unoobj/viewuno.cxx | 2 sd/inc/pch/precompiled_sd.hxx | 2 sd/inc/pch/precompiled_sdui.hxx | 2 sd/inc/sdmod.hxx | 6 - sd/source/ui/inc/DrawDocShell.hxx | 9 + sd/source/ui/slideshow/slideshow.cxx | 2 sd/source/ui/unoidl/unoobj.cxx | 16 +- sd/source/ui/unoidl/unoobj.hxx | 2 sd/source/ui/unoidl/unosrch.cxx | 2 sfx2/source/control/dispatch.cxx | 4 sfx2/source/doc/iframe.cxx | 2 slideshow/inc/pch/precompiled_slideshow.hxx | 2 solenv/clang-format/excludelist | 2 solenv/vs/LibreOffice.natvis | 6 - starmath/inc/pch/precompiled_sm.hxx | 2 svl/source/items/itemprop.cxx | 6 - svl/source/numbers/numfmuno.cxx | 4 svtools/inc/pch/precompiled_svt.hxx | 2 svx/inc/getallcharpropids.hxx | 4 svx/inc/pch/precompiled_svx.hxx | 2 svx/inc/pch/precompiled_svxcore.hxx | 2 svx/inc/sdr/properties/attributeproperties.hxx | 2 svx/inc/sdr/properties/captionproperties.hxx | 2 svx/inc/sdr/properties/cellproperties.hxx | 2 svx/inc/sdr/properties/circleproperties.hxx | 2 svx/inc/sdr/properties/connectorproperties.hxx | 2 svx/inc/sdr/properties/customshapeproperties.hxx | 2 svx/inc/sdr/properties/e3dproperties.hxx | 2 svx/inc/sdr/properties/graphicproperties.hxx | 2 svx/inc/sdr/properties/measureproperties.hxx | 2 svx/inc/sdr/properties/rectangleproperties.hxx | 2 svx/inc/sdr/properties/textproperties.hxx | 2 svx/source/sdr/properties/attributeproperties.cxx | 2 svx/source/sdr/properties/captionproperties.cxx | 2 svx/source/sdr/properties/circleproperties.cxx | 2 svx/source/sdr/properties/connectorproperties.cxx | 2 svx/source/sdr/properties/customshapeproperties.cxx | 2 svx/source/sdr/properties/defaultproperties.cxx | 2 svx/source/sdr/properties/e3dproperties.cxx | 2 svx/source/sdr/properties/graphicproperties.cxx | 2 svx/source/sdr/properties/measureproperties.cxx | 2 svx/source/sdr/properties/rectangleproperties.cxx | 2 svx/source/sdr/properties/textproperties.cxx | 2 svx/source/svdraw/svdedtv1.cxx | 2 svx/source/svdraw/svdotextdecomposition.cxx | 4 svx/source/table/cell.cxx | 2 svx/source/unodraw/unoprov.cxx | 56 ++++----- svx/source/unodraw/unoshap2.cxx | 2 svx/source/unodraw/unoshap4.cxx | 2 svx/source/unodraw/unoshape.cxx | 4 sw/inc/pch/precompiled_msword.hxx | 2 sw/inc/pch/precompiled_swui.hxx | 2 sw/inc/pch/precompiled_vbaswobj.hxx | 2 sw/inc/unocrsrhelper.hxx | 2 sw/inc/unodraw.hxx | 2 sw/inc/unomap.hxx | 67 +++++------ sw/source/core/access/accpara.cxx | 2 sw/source/core/unocore/unomap.cxx | 4 sw/source/core/unocore/unomap1.cxx | 60 +++++----- sw/source/core/unocore/unoobj.cxx | 6 - sw/source/filter/xml/xmlitemm.cxx | 8 - sw/source/filter/xml/xmlitmap.hxx | 14 +- ucbhelper/source/client/interceptedinteraction.cxx | 2 vbahelper/inc/pch/precompiled_msforms.hxx | 2 vcl/inc/pdf/pdfwriter_impl.hxx | 2 vcl/source/filter/eps/eps.cxx | 4 vcl/source/gdi/metaact.cxx | 2 vcl/source/gdi/pdfwriter.cxx | 2 vcl/source/gdi/pdfwriter_impl.cxx | 2 vcl/source/outdev/text.cxx | 10 - xmloff/source/text/txtflde.cxx | 2 xmloff/source/text/txtparae.cxx | 4 154 files changed, 368 insertions(+), 537 deletions(-)
New commits: commit 6d1b241ab7b2edf3f3eef26f4cc514c22849caf5 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Oct 11 13:27:51 2023 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Oct 11 21:53:13 2023 +0200 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 <sberg...@redhat.com> diff --git a/accessibility/inc/pch/precompiled_acc.hxx b/accessibility/inc/pch/precompiled_acc.hxx index 5b3bbb51d3f7..5045b2bf4fab 100644 --- a/accessibility/inc/pch/precompiled_acc.hxx +++ b/accessibility/inc/pch/precompiled_acc.hxx @@ -44,6 +44,7 @@ #include <numeric> #include <optional> #include <ostream> +#include <span> #include <stddef.h> #include <string.h> #include <string> @@ -296,7 +297,6 @@ #include <o3tl/cow_wrapper.hxx> #include <o3tl/deleter.hxx> #include <o3tl/safeint.hxx> -#include <o3tl/span.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> #include <o3tl/underlyingenumvalue.hxx> diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx index ef9638df608d..d41ed13289ae 100644 --- a/basctl/inc/pch/precompiled_basctl.hxx +++ b/basctl/inc/pch/precompiled_basctl.hxx @@ -47,6 +47,7 @@ #include <numeric> #include <optional> #include <ostream> +#include <span> #include <stddef.h> #include <stdexcept> #include <string.h> @@ -410,7 +411,6 @@ #include <o3tl/hash_combine.hxx> #include <o3tl/safeint.hxx> #include <o3tl/sorted_vector.hxx> -#include <o3tl/span.hxx> #include <o3tl/string_view.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> diff --git a/bin/find-can-be-private-symbols.functions.results b/bin/find-can-be-private-symbols.functions.results index ad4714f21af9..bce1550fd63c 100644 --- a/bin/find-can-be-private-symbols.functions.results +++ b/bin/find-can-be-private-symbols.functions.results @@ -2414,7 +2414,7 @@ OpenGLZone::relaxWatchdogTimings() Outliner::Collapse(Paragraph const*) Outliner::DepthChangedHdl(Paragraph*, ParaFlag) Outliner::DrawingTab(Point const&, long, rtl::OUString const&, SvxFont const&, int, unsigned char, bool, bool, Color const&, Color const&) -Outliner::DrawingText(Point const&, rtl::OUString const&, int, int, o3tl::span<int const>, SvxFont const&, int, unsigned char, std::vector<EEngineData::WrongSpellClass, std::allocator<EEngineData::WrongSpellClass> > const*, SvxFieldData const*, bool, bool, bool, com::sun::star::lang::Locale const*, Color const&, Color const&) +Outliner::DrawingText(Point const&, rtl::OUString const&, int, int, std::span<int const>, SvxFont const&, int, unsigned char, std::vector<EEngineData::WrongSpellClass, std::allocator<EEngineData::WrongSpellClass> > const*, SvxFieldData const*, bool, bool, bool, com::sun::star::lang::Locale const*, Color const&, Color const&) Outliner::Expand(Paragraph const*) Outliner::GetBulletsNumberingStatus(int, int) const Outliner::GetDocPos(Point const&) const @@ -10425,7 +10425,7 @@ SvxFont::DrawCapital(OutputDevice*, Point const&, rtl::OUString const&, int, int SvxFont::GetCapitalSize(OutputDevice const*, rtl::OUString const&, int, int) const SvxFont::GetPhysTxtSize(OutputDevice const*) SvxFont::GetPhysTxtSize(OutputDevice const*, rtl::OUString const&, int, int) const -SvxFont::QuickDrawText(OutputDevice*, Point const&, rtl::OUString const&, int, int, o3tl::span<int const>) const +SvxFont::QuickDrawText(OutputDevice*, Point const&, rtl::OUString const&, int, int, std::span<int const>) const SvxFont::QuickGetTextSize(OutputDevice const*, rtl::OUString const&, int, int, std::vector<int, std::allocator<int> >*) const SvxFont::SetNonAutoEscapement(short, OutputDevice const*) SvxFont::SetPhysFont(OutputDevice&) const @@ -23049,7 +23049,7 @@ vcl::PDFWriter::DrawPolygon(tools::Polygon const&) vcl::PDFWriter::DrawRect(tools::Rectangle const&) vcl::PDFWriter::DrawRect(tools::Rectangle const&, unsigned long, unsigned long) vcl::PDFWriter::DrawStretchText(Point const&, unsigned long, rtl::OUString const&, int, int) -vcl::PDFWriter::DrawTextArray(Point const&, rtl::OUString const&, o3tl::span<int const>, int, int) +vcl::PDFWriter::DrawTextArray(Point const&, rtl::OUString const&, std::span<int const>, int, int) vcl::PDFWriter::DrawTextLine(Point const&, long, FontStrikeout, FontLineStyle, FontLineStyle) vcl::PDFWriter::DrawTransparent(tools::PolyPolygon const&, unsigned short) vcl::PDFWriter::DrawWallpaper(tools::Rectangle const&, Wallpaper const&) diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index d538a90e32af..a6cfebde0c10 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -76,7 +76,6 @@ def ignoreRemoval(include, toAdd, absFileName, moduleRules, noexclude): o3tl = { "o3tl/typed_flags_set.hxx" : "namespace o3tl { template <typename T> struct typed_flags; }", "o3tl/deleter.hxx" : "namespace o3tl { template <typename T> struct default_delete; }", - "o3tl/span.hxx" : "namespace o3tl { template <typename T> class span; }", } for k, v, in o3tl.items(): if include == k and v in toAdd: diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 31ef31fa7a49..8ecd0e025976 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -279,7 +279,7 @@ namespace cairocanvas if (maLogicalAdvancements.hasElements()) { KernArray aOffsets(setupTextOffsets(maLogicalAdvancements, viewState, renderState)); - o3tl::span<const sal_Bool> aKashidaArray(maKashidaPositions.getConstArray(), maKashidaPositions.getLength()); + std::span<const sal_Bool> aKashidaArray(maKashidaPositions.getConstArray(), maKashidaPositions.getLength()); rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets, aKashidaArray, ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index fa86cea7bd41..3a01af375ab1 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -214,7 +214,7 @@ namespace dxcanvas for( sal_Int32 i=0; i<nLen; ++i ) DXArray.push_back(basegfx::fround(rLogicalAdvancements[i])); - o3tl::span<const sal_Bool> aKashidaArray(rKashidaPositions.getConstArray(), rKashidaPositions.getLength()); + std::span<const sal_Bool> aKashidaArray(rKashidaPositions.getConstArray(), rKashidaPositions.getLength()); // draw the String xVirtualDevice->DrawTextArray( aEmptyPoint, diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx index 606764a361b1..47d46a9dfb9b 100644 --- a/canvas/source/opengl/ogl_canvashelper.cxx +++ b/canvas/source/opengl/ogl_canvashelper.cxx @@ -736,7 +736,7 @@ namespace oglcanvas aDXArray.set(i, basegfx::fround(aLogicalAdvancements[i])); uno::Sequence<sal_Bool> aKashidaPositions=xLayoutetText->queryKashidaPositions(); - o3tl::span<const sal_Bool> aKashidaArray(aKashidaPositions.getConstArray(), aKashidaPositions.getLength()); + std::span<const sal_Bool> aKashidaArray(aKashidaPositions.getConstArray(), aKashidaPositions.getLength()); // get the glyphs pVDev->GetTextOutlines(rAct.maPolyPolys, diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index d6474e744c32..25318ee1fbce 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -121,7 +121,7 @@ namespace vclcanvas rendering::CompositeOperation::SOURCE); KernArray aOffsets(setupTextOffsets(maLogicalAdvancements, aViewState, aRenderState)); - o3tl::span<const sal_Bool> aKashidaArray(maKashidaPositions.getArray(), maKashidaPositions.getLength()); + std::span<const sal_Bool> aKashidaArray(maKashidaPositions.getArray(), maKashidaPositions.getLength()); std::vector< uno::Reference< rendering::XPolyPolygon2D> > aOutlineSequence; ::basegfx::B2DPolyPolygonVector aOutlines; @@ -360,7 +360,7 @@ namespace vclcanvas { // TODO(P2): cache that KernArray aOffsets(setupTextOffsets(maLogicalAdvancements, viewState, renderState)); - o3tl::span<const sal_Bool> aKashidaArray(maKashidaPositions.getConstArray(), maKashidaPositions.getLength()); + std::span<const sal_Bool> aKashidaArray(maKashidaPositions.getConstArray(), maKashidaPositions.getLength()); // TODO(F3): ensure correct length and termination for DX // array (last entry _must_ contain the overall width) diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx index 44efa881f26c..960c99bd1f8d 100644 --- a/chart2/inc/pch/precompiled_chartcontroller.hxx +++ b/chart2/inc/pch/precompiled_chartcontroller.hxx @@ -46,6 +46,7 @@ #include <optional> #include <ostream> #include <set> +#include <span> #include <stddef.h> #include <stdexcept> #include <string.h> @@ -350,7 +351,6 @@ #include <o3tl/hash_combine.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/chart2/inc/pch/precompiled_chartcore.hxx b/chart2/inc/pch/precompiled_chartcore.hxx index 1f32fd818a0a..9e7d56b2f7eb 100644 --- a/chart2/inc/pch/precompiled_chartcore.hxx +++ b/chart2/inc/pch/precompiled_chartcore.hxx @@ -37,6 +37,7 @@ #include <optional> #include <ostream> #include <set> +#include <span> #include <string_view> #include <type_traits> #include <unordered_map> @@ -195,7 +196,6 @@ #include <libxml/xmlwriter.h> #include <o3tl/cow_wrapper.hxx> #include <o3tl/safeint.hxx> -#include <o3tl/span.hxx> #include <o3tl/string_view.hxx> #include <o3tl/typed_flags_set.hxx> #include <officecfg/Office/Compatibility.hxx> diff --git a/comphelper/source/misc/simplefileaccessinteraction.cxx b/comphelper/source/misc/simplefileaccessinteraction.cxx index f7a4f0eab237..15029a1230e0 100644 --- a/comphelper/source/misc/simplefileaccessinteraction.cxx +++ b/comphelper/source/misc/simplefileaccessinteraction.cxx @@ -29,7 +29,7 @@ const sal_Int32 HANDLE_CERTIFICATEREQUEST = 3; /// Will handle com::sun::star::ucb::AuthenticationRequest const sal_Int32 HANDLE_AUTHENTICATIONREQUEST = 4; -static o3tl::span<const ::ucbhelper::InterceptedInteraction::InterceptedRequest> getInterceptions() +static std::span<const ::ucbhelper::InterceptedInteraction::InterceptedRequest> getInterceptions() { static const ::ucbhelper::InterceptedInteraction::InterceptedRequest lInterceptions[]{ { //intercept standard IO error exception (local file and WebDAV) diff --git a/comphelper/source/misc/stillreadwriteinteraction.cxx b/comphelper/source/misc/stillreadwriteinteraction.cxx index a6d1db057745..191b751f978d 100644 --- a/comphelper/source/misc/stillreadwriteinteraction.cxx +++ b/comphelper/source/misc/stillreadwriteinteraction.cxx @@ -39,7 +39,7 @@ const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1; const sal_Int32 HANDLE_AUTHENTICATIONREQUESTEXCEPTION = 2; const sal_Int32 HANDLE_CERTIFICATEVALIDATIONREQUESTEXCEPTION = 3; -static o3tl::span<const ::ucbhelper::InterceptedInteraction::InterceptedRequest> getInterceptions() +static std::span<const ::ucbhelper::InterceptedInteraction::InterceptedRequest> getInterceptions() { static const ::ucbhelper::InterceptedInteraction::InterceptedRequest lInterceptions[] { { diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index 206129c5f595..d288ae21263f 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -32,7 +32,7 @@ PropertySetInfo::PropertySetInfo() noexcept { } -PropertySetInfo::PropertySetInfo( o3tl::span<const PropertyMapEntry> pMap ) noexcept +PropertySetInfo::PropertySetInfo( std::span<const PropertyMapEntry> pMap ) noexcept { maPropertyMap.reserve(pMap.size()); for (const auto & rEntry : pMap) @@ -51,7 +51,7 @@ PropertySetInfo::~PropertySetInfo() noexcept { } -void PropertySetInfo::add( o3tl::span<PropertyMapEntry const> pMap ) noexcept +void PropertySetInfo::add( std::span<PropertyMapEntry const> pMap ) noexcept { maPropertyMap.reserve(maPropertyMap.size() + pMap.size()); for (const auto & rEntry : pMap) diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in index 895ec6116fc7..dce52798a1fe 100644 --- a/config_host/config_global.h.in +++ b/config_host/config_global.h.in @@ -24,9 +24,6 @@ Any change in this header will cause a rebuild of almost everything. // constexpr", and <https://wg21.link/P1143R2> "Adding the constinit keyword": #define HAVE_CPP_CONSTINIT_SORTED_VECTOR 0 -// Useable C++2a <span>: -#define HAVE_CPP_SPAN 0 - /* "CWG motion 23: P1825R0 'Merged wording for P0527R1 and P1155R3' (DR)" in <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/n4829.html> "N4829 Editors' Report -- Programming Languages -- C++" marks diff --git a/configure.ac b/configure.ac index e1153831be3f..f04904541cdc 100644 --- a/configure.ac +++ b/configure.ac @@ -7724,22 +7724,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([ CXXFLAGS=$save_CXXFLAGS AC_LANG_POP([C++]) -AC_MSG_CHECKING([whether $CXX_BASE supports C++2a <span> with unsigned size_type]) -AC_LANG_PUSH([C++]) -save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include <span> - #include <type_traits> - // Don't check size_type directly, as it was called index_type before P1872R0: - void f(std::span<int> s) { static_assert(std::is_unsigned_v<decltype(s.size())>); }; - ])], [ - AC_DEFINE([HAVE_CPP_SPAN],[1]) - AC_MSG_RESULT([yes]) - ], [AC_MSG_RESULT([no])]) -CXXFLAGS=$save_CXXFLAGS -AC_LANG_POP([C++]) - AC_MSG_CHECKING([whether $CXX_BASE implements C++ DR P1155R3]) AC_LANG_PUSH([C++]) save_CXXFLAGS=$CXXFLAGS diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 1cd4fd91d72e..1f367280598f 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -22,7 +22,6 @@ #include <sal/config.h> #include <sal/types.h> -#include <o3tl/span.hxx> #include <tools/stream.hxx> #include <utility> #include <vcl/metaactiontypes.hxx> @@ -36,6 +35,7 @@ #include <osl/diagnose.h> #include <memory> +#include <span> #include <vector> class GDIMetaFile; @@ -195,7 +195,7 @@ namespace cppcanvas::internal int nIndex, int nLength, KernArraySpan pCharWidths, - o3tl::span<const sal_Bool> pKashidaArray, + std::span<const sal_Bool> pKashidaArray, const ActionFactoryParameters& rParms, bool bSubsettable ); diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index e898d739d216..6bd99840f0a8 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -847,7 +847,7 @@ namespace cppcanvas::internal int nIndex, int nLength, KernArraySpan pCharWidths, - o3tl::span<const sal_Bool> pKashidaArray, + std::span<const sal_Bool> pKashidaArray, const ActionFactoryParameters& rParms, bool bSubsettableActions ) { diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index fb75f661fcad..2f2148c44dbd 100644 --- a/cppcanvas/source/mtfrenderer/textaction.cxx +++ b/cppcanvas/source/mtfrenderer/textaction.cxx @@ -1985,7 +1985,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, KernArraySpan pDXArray, - o3tl::span<const sal_Bool> pKashidaArray, + std::span<const sal_Bool> pKashidaArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, @@ -2116,7 +2116,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, KernArraySpan pDXArray, - o3tl::span<const sal_Bool> pKashidaArray, + std::span<const sal_Bool> pKashidaArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, diff --git a/cppcanvas/source/mtfrenderer/textaction.hxx b/cppcanvas/source/mtfrenderer/textaction.hxx index bc399f0f8502..9f7349caccc9 100644 --- a/cppcanvas/source/mtfrenderer/textaction.hxx +++ b/cppcanvas/source/mtfrenderer/textaction.hxx @@ -19,10 +19,13 @@ #pragma once +#include <sal/config.h> + +#include <span> + #include <action.hxx> #include <cppcanvas/canvas.hxx> #include <cppcanvas/renderer.hxx> -#include <o3tl/span.hxx> class VirtualDevice; class Point; @@ -69,7 +72,7 @@ namespace cppcanvas::internal sal_Int32 nStartPos, sal_Int32 nLen, KernArraySpan pDXArray, - o3tl::span<const sal_Bool> pKashidaArray, + std::span<const sal_Bool> pKashidaArray, VirtualDevice& rVDev, const CanvasSharedPtr& rCanvas, const OutDevState& rState, diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx index b4827b0a8e2b..067318ee9790 100644 --- a/cui/inc/pch/precompiled_cui.hxx +++ b/cui/inc/pch/precompiled_cui.hxx @@ -47,6 +47,7 @@ #include <optional> #include <ostream> #include <set> +#include <span> #include <stddef.h> #include <stdexcept> #include <string.h> @@ -322,7 +323,6 @@ #include <o3tl/hash_combine.hxx> #include <o3tl/safeint.hxx> #include <o3tl/sorted_vector.hxx> -#include <o3tl/span.hxx> #include <o3tl/string_view.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> diff --git a/dbaccess/inc/pch/precompiled_dbu.hxx b/dbaccess/inc/pch/precompiled_dbu.hxx index fccd7b67d7e3..15a42d978df7 100644 --- a/dbaccess/inc/pch/precompiled_dbu.hxx +++ b/dbaccess/inc/pch/precompiled_dbu.hxx @@ -36,6 +36,7 @@ #include <new> #include <optional> #include <ostream> +#include <span> #include <string_view> #include <type_traits> #include <unordered_map> @@ -192,7 +193,6 @@ #include <cppuhelper/weak.hxx> #include <cppuhelper/weakref.hxx> #include <o3tl/safeint.hxx> -#include <o3tl/span.hxx> #include <o3tl/typed_flags_set.hxx> #include <salhelper/simplereferenceobject.hxx> #include <sfx2/dllapi.h> 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[] = diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index 86b6677ffa1d..fe05d7f5ba2b 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -347,7 +347,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL BaseContainer::crea // search the key names of all items, where its properties match // the given ones in its minimum FilterCache* pCache = impl_getWorkingCache(aLock); - lKeys = pCache->getMatchingItemsByProps(m_eType, o3tl::span<const css::beans::NamedValue>( lProperties.getConstArray(), lProperties.getLength() )); + lKeys = pCache->getMatchingItemsByProps(m_eType, std::span<const css::beans::NamedValue>( lProperties.getConstArray(), lProperties.getLength() )); } catch(const css::uno::Exception&) { diff --git a/filter/source/config/cache/cacheitem.cxx b/filter/source/config/cache/cacheitem.cxx index 595d3891aa7d..dddb7d464286 100644 --- a/filter/source/config/cache/cacheitem.cxx +++ b/filter/source/config/cache/cacheitem.cxx @@ -263,7 +263,7 @@ static bool isSubSet(const css::uno::Any& aSubSet, } -bool CacheItem::haveProps(o3tl::span< const css::beans::NamedValue > lProps) const +bool CacheItem::haveProps(std::span< const css::beans::NamedValue > lProps) const { for (auto const& prop : lProps) { @@ -288,7 +288,7 @@ bool CacheItem::haveProps(o3tl::span< const css::beans::NamedValue > lProps) con } -bool CacheItem::dontHaveProps(o3tl::span< const css::beans::NamedValue > lProps) const +bool CacheItem::dontHaveProps(std::span< const css::beans::NamedValue > lProps) const { for (auto const& prop : lProps) { diff --git a/filter/source/config/cache/cacheitem.hxx b/filter/source/config/cache/cacheitem.hxx index b20bf72c805c..9ed263442150 100644 --- a/filter/source/config/cache/cacheitem.hxx +++ b/filter/source/config/cache/cacheitem.hxx @@ -19,12 +19,12 @@ #pragma once +#include <span> #include <unordered_map> #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/beans/PropertyValue.hpp> #include <vector> #include <comphelper/sequenceashashmap.hxx> -#include <o3tl/span.hxx> namespace filter::config { @@ -74,7 +74,7 @@ class CacheItem : public ::comphelper::SequenceAsHashMap @return sal_True if all given properties exists at this item; sal_False otherwise. */ - bool haveProps(o3tl::span< const css::beans::NamedValue > lProps) const; + bool haveProps(std::span< const css::beans::NamedValue > lProps) const; /** @short check, if the given properties don't exist @@ -90,7 +90,7 @@ class CacheItem : public ::comphelper::SequenceAsHashMap @return sal_False if at least on property exists at this item(!); sal_True otherwise. */ - bool dontHaveProps(o3tl::span< const css::beans::NamedValue > lProps) const; + bool dontHaveProps(std::span< const css::beans::NamedValue > lProps) const; /** @short because we know two UIName properties diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 534195893744..714d051458c1 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -245,8 +245,8 @@ bool FilterCache::isFillState(FilterCache::EFillState eState) const std::vector<OUString> FilterCache::getMatchingItemsByProps( EItemType eType , - o3tl::span< const css::beans::NamedValue > lIProps, - o3tl::span< const css::beans::NamedValue > lEProps) const + std::span< const css::beans::NamedValue > lIProps, + std::span< const css::beans::NamedValue > lEProps) const { // SAFE -> std::unique_lock aGuard(m_aMutex); diff --git a/filter/source/config/cache/filtercache.hxx b/filter/source/config/cache/filtercache.hxx index a48e3df62767..abfa712895d1 100644 --- a/filter/source/config/cache/filtercache.hxx +++ b/filter/source/config/cache/filtercache.hxx @@ -365,8 +365,8 @@ class FilterCache any longer, because any operation before damage it. */ std::vector<OUString> getMatchingItemsByProps( EItemType eType, - o3tl::span< const css::beans::NamedValue > lIProps, - o3tl::span< const css::beans::NamedValue > lEProps = {}) const; + std::span< const css::beans::NamedValue > lIProps, + std::span< const css::beans::NamedValue > lEProps = {}) const; /** @short indicates if the requested sub container diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx index 21bf74fae766..36f1c78981af 100644 --- a/framework/inc/pch/precompiled_fwk.hxx +++ b/framework/inc/pch/precompiled_fwk.hxx @@ -45,6 +45,7 @@ #include <numeric> #include <optional> #include <ostream> +#include <span> #include <stddef.h> #include <string.h> #include <string> @@ -250,7 +251,6 @@ #include <i18nlangtag/languagetag.hxx> #include <o3tl/cow_wrapper.hxx> #include <o3tl/safeint.hxx> -#include <o3tl/span.hxx> #include <o3tl/string_view.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> diff --git a/include/comphelper/propertysetinfo.hxx b/include/comphelper/propertysetinfo.hxx index ee26d86982e4..632165826a02 100644 --- a/include/comphelper/propertysetinfo.hxx +++ b/include/comphelper/propertysetinfo.hxx @@ -25,8 +25,8 @@ #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <cppuhelper/implbase.hxx> #include <comphelper/comphelperdllapi.h> -#include <o3tl/span.hxx> #include <o3tl/typed_flags_set.hxx> +#include <span> #include <unordered_map> #include <utility> @@ -90,7 +90,7 @@ class COMPHELPER_DLLPUBLIC PropertySetInfo final { public: PropertySetInfo() noexcept; - PropertySetInfo( o3tl::span<const PropertyMapEntry> pMap ) noexcept; + PropertySetInfo( std::span<const PropertyMapEntry> pMap ) noexcept; virtual ~PropertySetInfo() noexcept override; /** returns a stl map with all PropertyMapEntry pointer.<p> @@ -101,7 +101,7 @@ public: /** adds an array of PropertyMapEntry to this instance.<p> The end is marked with a PropertyMapEntry where mpName equals NULL</p> */ - void add( o3tl::span<PropertyMapEntry const> pMap ) noexcept; + void add( std::span<PropertyMapEntry const> pMap ) noexcept; /** removes an already added PropertyMapEntry which string in mpName equals to aName */ void remove( const OUString& aName ) noexcept; diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 61d8e88bc593..38880d90706f 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -21,6 +21,7 @@ #define INCLUDED_EDITENG_EDITENG_HXX #include <memory> +#include <span> #include <vector> #include <optional> @@ -29,7 +30,6 @@ #include <com/sun/star/i18n/WordType.hpp> #include <com/sun/star/i18n/CharacterIteratorMode.hpp> -#include <o3tl/span.hxx> #include <svl/typedwhich.hxx> #include <editeng/editdata.hxx> #include <editeng/editstat.hxx> @@ -507,8 +507,8 @@ public: 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, + 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, diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 71ffd00a73e4..33bb6fae90de 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -404,8 +404,8 @@ public: sal_Int32 mnTextLen; sal_Int32 mnPara; const SvxFont& mrFont; - o3tl::span<const sal_Int32> mpDXArray; - o3tl::span<const sal_Bool> mpKashidaArray; + std::span<const sal_Int32> mpDXArray; + std::span<const sal_Bool> mpKashidaArray; const EEngineData::WrongSpellVector* mpWrongSpellVector; const SvxFieldData* mpFieldData; @@ -431,8 +431,8 @@ public: sal_Int32 nTxtLen, const SvxFont& rFnt, sal_Int32 nPar, - o3tl::span<const sal_Int32> pDXArr, - o3tl::span<const sal_Bool> pKashidaArr, + std::span<const sal_Int32> pDXArr, + std::span<const sal_Bool> pKashidaArr, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, const css::lang::Locale* pLocale, @@ -828,8 +828,8 @@ public: 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, + 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, diff --git a/include/editeng/svxfont.hxx b/include/editeng/svxfont.hxx index 4e290d4cdea6..a86e2097f80a 100644 --- a/include/editeng/svxfont.hxx +++ b/include/editeng/svxfont.hxx @@ -19,8 +19,11 @@ #ifndef INCLUDED_EDITENG_SVXFONT_HXX #define INCLUDED_EDITENG_SVXFONT_HXX +#include <sal/config.h> + +#include <span> + #include <editeng/svxenum.hxx> -#include <o3tl/span.hxx> #include <tools/long.hxx> #include <vcl/font.hxx> #include <editeng/editengdllapi.h> @@ -79,8 +82,8 @@ public: Size GetCapitalSize( const OutputDevice *pOut, const OUString &rTxt, KernArray* pDXAry, const sal_Int32 nIdx, const sal_Int32 nLen) const; void 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; Size GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt, @@ -93,8 +96,8 @@ public: void QuickDrawText( OutputDevice *pOut, const Point &rPos, const OUString &rTxt, const sal_Int32 nIdx = 0, const sal_Int32 nLen = SAL_MAX_INT32, - 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; Size QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt, const sal_Int32 nIdx, const sal_Int32 nLen, diff --git a/include/editeng/unoipset.hxx b/include/editeng/unoipset.hxx index 412fc9be2298..87a6f29c10a4 100644 --- a/include/editeng/unoipset.hxx +++ b/include/editeng/unoipset.hxx @@ -36,7 +36,7 @@ class EDITENG_DLLPUBLIC SvxItemPropertySet SfxItemPool& mrItemPool; public: - SvxItemPropertySet( o3tl::span<const SfxItemPropertyMapEntry> pMap, SfxItemPool& rPool ); + SvxItemPropertySet( std::span<const SfxItemPropertyMapEntry> pMap, SfxItemPool& rPool ); ~SvxItemPropertySet(); SvxItemPropertySet& operator=( SvxItemPropertySet const & ) = delete; // MSVC2015 workaround diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx index a8e2a335c82b..b585f18dad4c 100644 --- a/include/editeng/unotext.hxx +++ b/include/editeng/unotext.hxx @@ -21,6 +21,7 @@ #define INCLUDED_EDITENG_UNOTEXT_HXX #include <memory> +#include <span> #include <com/sun/star/text/XTextRange.hpp> #include <com/sun/star/text/XTextContent.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> @@ -46,7 +47,6 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/weakagg.hxx> #include <osl/diagnose.hxx> -#include <o3tl/span.hxx> #include <mutex> #include <comphelper/servicehelper.hxx> #include <svl/itemset.hxx> @@ -677,9 +677,9 @@ public: }; EDITENG_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet(); -o3tl::span<const SfxItemPropertyMapEntry> ImplGetSvxUnoOutlinerTextCursorPropertyMap(); +std::span<const SfxItemPropertyMapEntry> ImplGetSvxUnoOutlinerTextCursorPropertyMap(); const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet(); -o3tl::span<const SfxItemPropertyMapEntry> ImplGetSvxTextPortionPropertyMap(); +std::span<const SfxItemPropertyMapEntry> ImplGetSvxTextPortionPropertyMap(); #endif diff --git a/include/o3tl/span.hxx b/include/o3tl/span.hxx deleted file mode 100644 index cfe4c1ffa3a3..000000000000 --- a/include/o3tl/span.hxx +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_O3TL_SPAN_HXX -#define INCLUDED_O3TL_SPAN_HXX - -#include <sal/config.h> - -#include <config_global.h> - -#if HAVE_CPP_SPAN - -#include <span> - -namespace o3tl { using std::span; } - -#else - -#include <cassert> -#include <cstddef> -#include <iterator> -#include <type_traits> -#include <vector> - -namespace o3tl { - -/** A barebones approximation of C++20 <span>. -*/ -template<typename T> -class span { -public: - using value_type = T; - using pointer = value_type *; - using const_pointer = value_type const *; - using reference = value_type &; - using const_reference = value_type const &; - using const_iterator = const_pointer; - using iterator = pointer; - using const_reverse_iterator = std::reverse_iterator<const_iterator>; - using reverse_iterator = std::reverse_iterator<iterator>; - using size_type = std::size_t; - using difference_type = std::ptrdiff_t; - - constexpr span() noexcept : data_(nullptr), size_(0) {} - - template<std::size_t N> - constexpr span (T (&a)[N]) noexcept : data_(a), size_(N) {} - - constexpr span (T *a, size_type len) noexcept - : data_(a), size_(len) - { - // not terribly sure about this, might need to strengthen it - assert(a != nullptr || len == 0); - } - - template<typename T2> - constexpr span(const std::vector<T2>& vec) - : data_(vec.data()), size_(vec.size()) {} - - /** for assigning from span<T> to span<const T> */ - constexpr span (const span<typename std::remove_const<T>::type>& other) noexcept - : data_(other.data()), size_(other.size()) {} - - constexpr bool empty() const noexcept { return size_ == 0; } - - constexpr iterator begin() const noexcept { return data_; } - constexpr iterator end() const noexcept { return begin() + size(); } - - reverse_iterator rbegin() const noexcept - { return reverse_iterator(end()); } - reverse_iterator rend() const noexcept - { return reverse_iterator(begin()); } - - constexpr size_type size() const noexcept { return size_; } - - constexpr reference operator [](size_type pos) const { - assert(pos < size()); - return data_[pos]; - } - - constexpr pointer data() const noexcept { return data_; } - -private: - pointer data_; - size_type size_; -}; - -} // namespace o3tl - -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx index 9b3fed6d5f23..cfa94a318d5f 100644 --- a/include/sfx2/dispatch.hxx +++ b/include/sfx2/dispatch.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SFX2_DISPATCH_HXX #include <memory> +#include <span> #include <sal/config.h> #include <rtl/ref.hxx> #include <sfx2/dllapi.h> @@ -28,7 +29,6 @@ #include <sfx2/bindings.hxx> #include <o3tl/typed_flags_set.hxx> -#include <o3tl/span.hxx> #include <boost/property_tree/ptree_fwd.hpp> #include <initializer_list> @@ -147,7 +147,7 @@ public: void Lock( bool bLock ); bool IsLocked() const; void SetSlotFilter( SfxSlotFilterState nEnable = SfxSlotFilterState::DISABLED, - o3tl::span<sal_uInt16 const> pSIDs = o3tl::span<sal_uInt16 const>()); + std::span<sal_uInt16 const> pSIDs = std::span<sal_uInt16 const>()); void HideUI( bool bHide = true ); ToolbarId GetObjectBarId( sal_uInt16 nPos ) const; diff --git a/include/svl/itemprop.hxx b/include/svl/itemprop.hxx index 7160e7de7110..219b04e69a20 100644 --- a/include/svl/itemprop.hxx +++ b/include/svl/itemprop.hxx @@ -26,7 +26,7 @@ #include <svl/itemset.hxx> #include <svl/svldllapi.h> #include <o3tl/sorted_vector.hxx> -#include <o3tl/span.hxx> +#include <span> #include <string_view> #include <utility> @@ -81,7 +81,7 @@ class SVL_DLLPUBLIC SfxItemPropertyMap o3tl::sorted_vector< const SfxItemPropertyMapEntry*, SfxItemPropertyMapCompare > m_aMap; mutable css::uno::Sequence< css::beans::Property > m_aPropSeq; public: - SfxItemPropertyMap( o3tl::span<const SfxItemPropertyMapEntry> pEntries ); + SfxItemPropertyMap( std::span<const SfxItemPropertyMapEntry> pEntries ); SfxItemPropertyMap( const SfxItemPropertyMap& rSource ); ~SfxItemPropertyMap(); @@ -100,7 +100,7 @@ class SVL_DLLPUBLIC SfxItemPropertySet final mutable css::uno::Reference<css::beans::XPropertySetInfo> m_xInfo; public: - SfxItemPropertySet( o3tl::span<const SfxItemPropertyMapEntry> pMap ) : + SfxItemPropertySet( std::span<const SfxItemPropertyMapEntry> pMap ) : m_aMap(pMap) {} ~SfxItemPropertySet(); @@ -151,7 +151,7 @@ class SVL_DLLPUBLIC SfxItemPropertySetInfo final : public SfxItemPropertySetInfo public: SfxItemPropertySetInfo(const SfxItemPropertyMap &rMap ); - SfxItemPropertySetInfo(o3tl::span<const SfxItemPropertyMapEntry> pEntries ); + SfxItemPropertySetInfo(std::span<const SfxItemPropertyMapEntry> pEntries ); virtual ~SfxItemPropertySetInfo() override; virtual css::uno::Sequence< css::beans::Property > SAL_CALL @@ -180,7 +180,7 @@ class SVL_DLLPUBLIC SfxExtItemPropertySetInfo final : public SfxExtItemPropertyS { public: SfxExtItemPropertySetInfo( - o3tl::span<const SfxItemPropertyMapEntry> pMap, + std::span<const SfxItemPropertyMapEntry> pMap, const css::uno::Sequence<css::beans::Property>& rPropSeq ); virtual ~SfxExtItemPropertySetInfo() override; diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx index bae37df2753a..bec1fbe27320 100644 --- a/include/svx/sdr/properties/defaultproperties.hxx +++ b/include/svx/sdr/properties/defaultproperties.hxx @@ -23,11 +23,11 @@ #include <sal/config.h> #include <optional> +#include <span> #include <svx/sdr/properties/properties.hxx> #include <svx/svxdllapi.h> #include <svl/itemset.hxx> -#include <o3tl/span.hxx> struct _xmlTextWriter; typedef struct _xmlTextWriter* xmlTextWriterPtr; @@ -57,7 +57,7 @@ namespace sdr::properties // Internally react on ItemSet changes. The given span contains changed items. // If nDeletedWhich is not 0, it indicates a deleted item. - virtual void ItemSetChanged(o3tl::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich); + virtual void ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich); // check if SfxItemSet exists bool HasSfxItemSet() const { return bool(mxItemSet); } diff --git a/include/svx/unoprov.hxx b/include/svx/unoprov.hxx index fd7fa350e65a..1a825dbd612a 100644 --- a/include/svx/unoprov.hxx +++ b/include/svx/unoprov.hxx @@ -81,12 +81,12 @@ public: class SVXCORE_DLLPUBLIC SvxUnoPropertyMapProvider { - o3tl::span<SfxItemPropertyMapEntry const> aMapArr[SVXMAP_END]; + std::span<SfxItemPropertyMapEntry const> aMapArr[SVXMAP_END]; std::unique_ptr<SvxItemPropertySet> aSetArr[SVXMAP_END]; public: SvxUnoPropertyMapProvider(); ~SvxUnoPropertyMapProvider(); - o3tl::span<const SfxItemPropertyMapEntry> GetMap(sal_uInt16 nPropertyId); + std::span<const SfxItemPropertyMapEntry> GetMap(sal_uInt16 nPropertyId); const SvxItemPropertySet* GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool); }; diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index 3c8fa07bd99e..7c37015d74bd 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -131,7 +131,7 @@ protected: /** called from the XActionLockable interface methods on final unlock */ virtual void unlock(); - o3tl::span<const SfxItemPropertyMapEntry> getPropertyMapEntries() const { return maPropMapEntries; } + std::span<const SfxItemPropertyMapEntry> getPropertyMapEntries() const { return maPropMapEntries; } void updateShapeKind(); void endSetPropertyValues(); @@ -158,7 +158,7 @@ public: /// @throws css::uno::RuntimeException SvxShape( SdrObject* pObj ); /// @throws css::uno::RuntimeException - SvxShape( SdrObject* pObject, o3tl::span<const SfxItemPropertyMapEntry> pEntries, const SvxItemPropertySet* pPropertySet ); + SvxShape( SdrObject* pObject, std::span<const SfxItemPropertyMapEntry> pEntries, const SvxItemPropertySet* pPropertySet ); virtual ~SvxShape() noexcept override; // Internals @@ -323,7 +323,7 @@ private: css::uno::WeakReference< css::container::XIndexContainer > mxGluePoints; const SvxItemPropertySet* mpPropSet; SvxItemPropertySetUsrAnys maUrsAnys; - o3tl::span<const SfxItemPropertyMapEntry> maPropMapEntries; + std::span<const SfxItemPropertyMapEntry> maPropMapEntries; rtl::Reference< SdrObject > mxSdrObject; /** used from the XActionLockable interface */ sal_uInt16 mnLockCount; @@ -347,7 +347,7 @@ protected: public: SvxShapeText(SdrObject* pObj); - SvxShapeText(SdrObject* pObject, o3tl::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet); + SvxShapeText(SdrObject* pObject, std::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet); virtual ~SvxShapeText() noexcept override; virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override; @@ -402,7 +402,7 @@ class SVXCORE_DLLPUBLIC SvxShapeGroupAnyD : public SvxShape, public css::drawing::XShapes { public: - SvxShapeGroupAnyD( SdrObject* pObject, o3tl::span<const SfxItemPropertyMapEntry> pEntries, const SvxItemPropertySet* pPropertySet ); + SvxShapeGroupAnyD( SdrObject* pObject, std::span<const SfxItemPropertyMapEntry> pEntries, const SvxItemPropertySet* pPropertySet ); virtual ~SvxShapeGroupAnyD() noexcept override; virtual void SAL_CALL acquire() noexcept override @@ -601,7 +601,7 @@ protected: SvGlobalName GetClassName_Impl(OUString& rHexCLSID); public: SvxOle2Shape(SdrObject* pObj, OUString referer); - SvxOle2Shape(SdrObject* pObject, OUString referer, o3tl::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet); + SvxOle2Shape(SdrObject* pObject, OUString referer, std::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet); virtual ~SvxOle2Shape() noexcept override; bool createObject( const SvGlobalName &aClassName ); diff --git a/include/ucbhelper/interceptedinteraction.hxx b/include/ucbhelper/interceptedinteraction.hxx index 15000deb81d5..3c343b38b748 100644 --- a/include/ucbhelper/interceptedinteraction.hxx +++ b/include/ucbhelper/interceptedinteraction.hxx @@ -20,13 +20,13 @@ #ifndef INCLUDED_UCBHELPER_INTERCEPTEDINTERACTION_HXX #define INCLUDED_UCBHELPER_INTERCEPTEDINTERACTION_HXX +#include <span> #include <vector> #include <com/sun/star/task/XInteractionHandler.hpp> #include <cppuhelper/implbase.hxx> #include <ucbhelper/ucbhelperdllapi.h> -#include <o3tl/span.hxx> namespace com::sun::star::task { class XInteractionRequest; } @@ -130,7 +130,7 @@ class UCBHELPER_DLLPUBLIC InterceptedInteraction : public InterceptedInteraction /** @short these list contains the requests, which should be intercepted. */ - o3tl::span< const InterceptedRequest > m_lInterceptions; + std::span< const InterceptedRequest > m_lInterceptions; // native interface @@ -150,7 +150,7 @@ class UCBHELPER_DLLPUBLIC InterceptedInteraction : public InterceptedInteraction @param lInterceptions the list of intercepted requests. */ - InterceptedInteraction(o3tl::span< const InterceptedRequest > m_lInterceptions); + InterceptedInteraction(std::span< const InterceptedRequest > m_lInterceptions); /** @short initialize a new instance with the interaction handler, diff --git a/include/vcl/kernarray.hxx b/include/vcl/kernarray.hxx index 576ca1d4b229..2e8939b542b5 100644 --- a/include/vcl/kernarray.hxx +++ b/include/vcl/kernarray.hxx @@ -9,15 +9,15 @@ #pragma once #include <sal/config.h> -#include <o3tl/span.hxx> #include <cmath> +#include <span> #include <vector> class KernArraySpan final { private: int m_nSubUnitFactor; - o3tl::span<const sal_Int32> m_DXArray; + std::span<const sal_Int32> m_DXArray; public: KernArraySpan() @@ -25,7 +25,7 @@ public: { } - KernArraySpan(o3tl::span<const sal_Int32> DXArray, int nSubUnitFactor = 1) + KernArraySpan(std::span<const sal_Int32> DXArray, int nSubUnitFactor = 1) : m_nSubUnitFactor(nSubUnitFactor) , m_DXArray(DXArray) { diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index 3f2e85dff6b4..8f64669ac26c 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -24,7 +24,6 @@ #include <config_options.h> -#include <o3tl/span.hxx> #include <rtl/ref.hxx> #include <salhelper/simplereferenceobject.hxx> #include <tools/poly.hxx> @@ -46,6 +45,7 @@ #include <basegfx/utils/bgradient.hxx> #include <memory> +#include <span> class OutputDevice; class SvStream; @@ -525,7 +525,7 @@ public: sal_Int32 nLen ); MetaTextArrayAction( const Point& rStartPt, OUString aStr, KernArraySpan pDXAry, - o3tl::span<const sal_Bool> pKashidaAry, + std::span<const sal_Bool> pKashidaAry, sal_Int32 nIndex, sal_Int32 nLen ); diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 9b9a80af0fc9..4a6d217c2cb6 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -21,7 +21,6 @@ #include <sal/config.h> -#include <o3tl/span.hxx> #include <tools/gen.hxx> #include <tools/ref.hxx> #include <tools/solar.h> @@ -67,6 +66,7 @@ #include <memory> #include <optional> +#include <span> #include <string_view> #include <vector> @@ -958,7 +958,7 @@ public: bool GetTextBoundRect( tools::Rectangle& rRect, const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1, sal_uLong nLayoutWidth = 0, KernArraySpan aDXArray = KernArraySpan(), - o3tl::span<const sal_Bool> pKashidaArray = {}, + std::span<const sal_Bool> pKashidaArray = {}, const SalLayoutGlyphs* pGlyphs = nullptr ) const; tools::Rectangle ImplGetTextBoundRect( const SalLayout& ) const; @@ -970,13 +970,13 @@ public: const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1, sal_uLong nLayoutWidth = 0, KernArraySpan aDXArray = KernArraySpan(), - o3tl::span<const sal_Bool> pKashidaArray = {} ) const; + std::span<const sal_Bool> pKashidaArray = {} ) const; bool GetTextOutlines( basegfx::B2DPolyPolygonVector &rVector, const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex = 0, sal_Int32 nLen = -1, sal_uLong nLayoutWidth = 0, KernArraySpan aDXArray = KernArraySpan(), - o3tl::span<const sal_Bool> pKashidaArray = {} ) const; + std::span<const sal_Bool> pKashidaArray = {} ) const; OUString GetEllipsisString( const OUString& rStr, tools::Long nMaxWidth, @@ -1037,7 +1037,7 @@ public: void DrawTextArray( const Point& rStartPt, const OUString& rStr, KernArraySpan aKernArray, - o3tl::span<const sal_Bool> pKashidaAry, + std::span<const sal_Bool> pKashidaAry, sal_Int32 nIndex, sal_Int32 nLen, SalLayoutFlags flags = SalLayoutFlags::NONE, @@ -1226,7 +1226,7 @@ public: ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen, const Point& rLogicPos = Point(0,0), tools::Long nLogicWidth=0, KernArraySpan aKernArray = KernArraySpan(), - o3tl::span<const sal_Bool> pKashidaArray={}, + std::span<const sal_Bool> pKashidaArray={}, SalLayoutFlags flags = SalLayoutFlags::NONE, vcl::text::TextLayoutCache const* = nullptr, const SalLayoutGlyphs* pGlyphs = nullptr) const; diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index f9bbf608e319..acc491efdfa9 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -787,7 +787,7 @@ The following structure describes the permissions used in PDF security FontLineStyle eOverline ); void DrawTextArray( const Point& rStartPt, const OUString& rStr, KernArraySpan aKernArray, - o3tl::span<const sal_Bool> pKashidaAry, + std::span<const sal_Bool> pKashidaAry, sal_Int32 nIndex, sal_Int32 nLen ); void DrawStretchText( const Point& rStartPt, sal_Int32 nWidth, diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index af23376d1160..021d265363b7 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -31,8 +31,8 @@ #include <xmloff/SinglePropertySetInfoCache.hxx> #include <xmloff/XMLTextListAutoStylePool.hxx> #include <o3tl/sorted_vector.hxx> -#include <o3tl/span.hxx> #include <memory> +#include <span> #include <vector> class XMLTextListsHelper; @@ -395,14 +395,14 @@ public: void Add( XmlStyleFamily nFamily, const css::uno::Reference< css::beans::XPropertySet > & rPropSet, - o3tl::span<const XMLPropertyState> aAddStates = {}, bool bDontSeek = false ); + std::span<const XMLPropertyState> aAddStates = {}, bool bDontSeek = false ); /// find style name for specified family and parent OUString Find( XmlStyleFamily nFamily, const css::uno::Reference< css::beans::XPropertySet > & rPropSet, const OUString& rParent, - const o3tl::span<const XMLPropertyState> aAddStates = {} ) const; + const std::span<const XMLPropertyState> aAddStates = {} ) const; static SvXMLExportPropertyMapper *CreateShapeExtPropMapper( SvXMLExport& rExport ); diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx index d46dfbb52bbd..88264126f377 100644 --- a/linguistic/source/lngopt.cxx +++ b/linguistic/source/lngopt.cxx @@ -138,7 +138,7 @@ OUString LinguOptions::GetName( sal_Int32 nWID ) //! map must be sorted by first entry in alphabetical increasing order. -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetLinguProps() +static std::span<const SfxItemPropertyMapEntry> lcl_GetLinguProps() { static const SfxItemPropertyMapEntry aLinguProps[] = { diff --git a/o3tl/CppunitTest_o3tl_tests.mk b/o3tl/CppunitTest_o3tl_tests.mk index 1cbb1c86bd91..4f7ab02b1da1 100644 --- a/o3tl/CppunitTest_o3tl_tests.mk +++ b/o3tl/CppunitTest_o3tl_tests.mk @@ -32,7 +32,6 @@ $(eval $(call gb_CppunitTest_add_exception_objects,o3tl_tests,\ o3tl/qa/test-lru_map \ o3tl/qa/test-safeint \ o3tl/qa/test-sorted_vector \ - o3tl/qa/test-span \ o3tl/qa/test-string_view \ o3tl/qa/test-temporary \ o3tl/qa/test-typed_flags \ diff --git a/o3tl/qa/test-span.cxx b/o3tl/qa/test-span.cxx deleted file mode 100644 index 26eedfc21938..000000000000 --- a/o3tl/qa/test-span.cxx +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include <sal/config.h> - -#include <cstddef> -#include <utility> - -#include <cppunit/TestAssert.h> -#include <cppunit/TestFixture.h> -#include <cppunit/extensions/HelperMacros.h> - -#include <o3tl/span.hxx> - -namespace { - -class Test: public CppUnit::TestFixture { -private: - CPPUNIT_TEST_SUITE(Test); - CPPUNIT_TEST(testOperations); - CPPUNIT_TEST_SUITE_END(); - - - void testOperations() { - int const some_data[] { 1, 2, 3 }; - o3tl::span<int const> v(some_data); - - CPPUNIT_ASSERT_EQUAL(1, *v.begin()); - CPPUNIT_ASSERT_EQUAL( - o3tl::span<int>::difference_type(3), v.end() - v.begin()); - CPPUNIT_ASSERT_EQUAL(3, *v.rbegin()); - CPPUNIT_ASSERT_EQUAL( - o3tl::span<int>::difference_type(3), v.rend() - v.rbegin()); - CPPUNIT_ASSERT_EQUAL(std::size_t(3), v.size()); - CPPUNIT_ASSERT(!v.empty()); - CPPUNIT_ASSERT_EQUAL(2, v[1]); - CPPUNIT_ASSERT_EQUAL(1, *v.data()); - { - int const d1[] { 1, 2 }; - int const d2[] { 3, 4, 5, 6 }; - o3tl::span<int const> v1( d1 ); - o3tl::span<int const> v2( d2 ); - std::swap(v1, v2); - CPPUNIT_ASSERT_EQUAL(std::size_t(4), v1.size()); - CPPUNIT_ASSERT_EQUAL(std::size_t(2), v2.size()); - } - } -}; - -CPPUNIT_TEST_SUITE_REGISTRATION(Test); - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/oox/inc/pch/precompiled_oox.hxx b/oox/inc/pch/precompiled_oox.hxx index b9324feedb72..e66bae708243 100644 --- a/oox/inc/pch/precompiled_oox.hxx +++ b/oox/inc/pch/precompiled_oox.hxx @@ -41,6 +41,7 @@ #include <optional> #include <ostream> #include <set> +#include <span> #include <stack> #include <string.h> #include <string_view> @@ -231,7 +232,6 @@ #include <i18nlangtag/lang.h> #include <o3tl/cow_wrapper.hxx> #include <o3tl/safeint.hxx> -#include <o3tl/span.hxx> #include <o3tl/string_view.hxx> #include <o3tl/typed_flags_set.hxx> #include <o3tl/unit_conversion.hxx> diff --git a/reportdesign/inc/pch/precompiled_rpt.hxx b/reportdesign/inc/pch/precompiled_rpt.hxx index e590409ae968..f680e55fff5a 100644 --- a/reportdesign/inc/pch/precompiled_rpt.hxx +++ b/reportdesign/inc/pch/precompiled_rpt.hxx @@ -44,6 +44,7 @@ #include <numeric> #include <optional> #include <ostream> +#include <span> #include <sstream> #include <stddef.h> #include <stdexcept> @@ -251,7 +252,6 @@ #include <i18nlangtag/lang.h> #include <o3tl/cow_wrapper.hxx> #include <o3tl/safeint.hxx> -#include <o3tl/span.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> #include <o3tl/underlyingenumvalue.hxx> diff --git a/reportdesign/inc/pch/precompiled_rptui.hxx b/reportdesign/inc/pch/precompiled_rptui.hxx index f581e4dd0658..cae7143cb082 100644 --- a/reportdesign/inc/pch/precompiled_rptui.hxx +++ b/reportdesign/inc/pch/precompiled_rptui.hxx @@ -46,6 +46,7 @@ #include <numeric> #include <optional> #include <ostream> +#include <span> #include <sstream> #include <stddef.h> #include <stdexcept> @@ -356,7 +357,6 @@ #include <o3tl/intcmp.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/sc/inc/optuno.hxx b/sc/inc/optuno.hxx index 433dc7ec1898..72050044e363 100644 --- a/sc/inc/optuno.hxx +++ b/sc/inc/optuno.hxx @@ -39,7 +39,7 @@ class ScDocOptionsHelper { public: - static o3tl::span<const SfxItemPropertyMapEntry> GetPropertyMap(); + static std::span<const SfxItemPropertyMapEntry> GetPropertyMap(); static bool setPropertyValue( ScDocOptions& rOptions, const SfxItemPropertyMap& rPropMap, diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index f2f14653ab09..df9c3c3322aa 100644 --- a/sc/inc/pch/precompiled_sc.hxx +++ b/sc/inc/pch/precompiled_sc.hxx @@ -47,6 +47,7 @@ #include <optional> #include <ostream> #include <set> +#include <span> #include <sstream> #include <stddef.h> #include <stdexcept> @@ -344,7 +345,6 @@ #include <o3tl/enumarray.hxx> #include <o3tl/safeint.hxx> #include <o3tl/sorted_vector.hxx> -#include <o3tl/span.hxx> #include <o3tl/string_view.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx index 97b9a09d6d36..e3c800128b0b 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -61,7 +61,7 @@ constexpr OUStringLiteral constIdCategories(u"categories"); constexpr OUStringLiteral constIdLabel(u"label"); constexpr OUStringLiteral constIdData(u"data"); -o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataProviderPropertyMap() +std::span<const SfxItemPropertyMapEntry> lcl_GetDataProviderPropertyMap() { static const SfxItemPropertyMapEntry aDataProviderPropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/PivotTableDataSequence.cxx b/sc/source/ui/unoobj/PivotTableDataSequence.cxx index d1a3c278c6fc..dc81d03978e0 100644 --- a/sc/source/ui/unoobj/PivotTableDataSequence.cxx +++ b/sc/source/ui/unoobj/PivotTableDataSequence.cxx @@ -28,7 +28,7 @@ namespace sc SC_SIMPLE_SERVICE_INFO( PivotTableDataSequence, "PivotTableDataSequence", "com.sun.star.chart2.data.DataSequence") -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataSequencePropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetDataSequencePropertyMap() { static const SfxItemPropertyMapEntry aDataSequencePropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index cc4fd1fe53ce..7fbf1ba74639 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -48,7 +48,7 @@ using namespace ::com::sun::star; // AutoFormat map only for PropertySetInfo without Which-IDs -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetAutoFormatMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetAutoFormatMap() { static const SfxItemPropertyMapEntry aAutoFormatMap_Impl[] = { @@ -65,7 +65,7 @@ static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetAutoFormatMap() //! number format (String/Language) ??? (in XNumberFormat only ReadOnly) //! table::TableBorder ??!? -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetAutoFieldMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetAutoFieldMap() { static const SfxItemPropertyMapEntry aAutoFieldMap_Impl[] = { diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 9cfa82e4afc7..5365b3474611 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -52,7 +52,7 @@ using namespace com::sun::star; // everything without Which-ID, map only for PropertySetInfo -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetSettingsPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetSettingsPropertyMap() { static const SfxItemPropertyMapEntry aSettingsPropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 956e13436de6..7dde419b369d 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -790,7 +790,7 @@ static const SfxItemPropertySet* lcl_GetSheetPropertySet() return &aSheetPropertySet; } -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetEditPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetEditPropertyMap() { static const SfxItemPropertyMapEntry aEditPropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 7fb711b53ac6..e20a473f06ef 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -80,7 +80,7 @@ using ::std::shared_ptr; namespace { -o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataProviderPropertyMap() +std::span<const SfxItemPropertyMapEntry> lcl_GetDataProviderPropertyMap() { static const SfxItemPropertyMapEntry aDataProviderPropertyMap_Impl[] = { @@ -90,7 +90,7 @@ o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataProviderPropertyMap() return aDataProviderPropertyMap_Impl; } -o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataSequencePropertyMap() +std::span<const SfxItemPropertyMapEntry> lcl_GetDataSequencePropertyMap() { static const SfxItemPropertyMapEntry aDataSequencePropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index ff94ba224d60..945752a3c561 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -46,7 +46,7 @@ enum CondFormatProperties CondFormat_Range }; -o3tl::span<const SfxItemPropertyMapEntry> getCondFormatPropset() +std::span<const SfxItemPropertyMapEntry> getCondFormatPropset() { static const SfxItemPropertyMapEntry aCondFormatPropertyMap_Impl[] = { @@ -64,7 +64,7 @@ enum ConditionEntryProperties Operator }; -o3tl::span<const SfxItemPropertyMapEntry> getConditionEntryrPropSet() +std::span<const SfxItemPropertyMapEntry> getConditionEntryrPropSet() { static const SfxItemPropertyMapEntry aConditionEntryPropertyMap_Impl[] = { @@ -117,7 +117,7 @@ enum ColorScaleProperties ColorScaleEntries }; -o3tl::span<const SfxItemPropertyMapEntry> getColorScalePropSet() +std::span<const SfxItemPropertyMapEntry> getColorScalePropSet() { static const SfxItemPropertyMapEntry aColorScalePropertyMap_Impl[] = { @@ -156,7 +156,7 @@ enum DataBarProperties MaximumLength }; -o3tl::span<const SfxItemPropertyMapEntry> getDataBarPropSet() +std::span<const SfxItemPropertyMapEntry> getDataBarPropSet() { static const SfxItemPropertyMapEntry aDataBarPropertyMap_Impl[] = { @@ -212,7 +212,7 @@ enum IconSetProperties IconSetEntries }; -o3tl::span<const SfxItemPropertyMapEntry> getIconSetPropSet() +std::span<const SfxItemPropertyMapEntry> getIconSetPropSet() { static const SfxItemPropertyMapEntry aIconSetPropertyMap_Impl[] = { @@ -274,7 +274,7 @@ enum DateProperties DateType }; -o3tl::span<const SfxItemPropertyMapEntry> getCondDatePropSet() +std::span<const SfxItemPropertyMapEntry> getCondDatePropSet() { static const SfxItemPropertyMapEntry aCondDatePropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index 87236a3fcc4d..575b7fc8ff08 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -47,7 +47,7 @@ using namespace com::sun::star; constexpr OUStringLiteral SCSAVEVERSION = u"SaveVersionOnClose"; -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetConfigPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetConfigPropertyMap() { static const SfxItemPropertyMapEntry aConfigPropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index bc46bcf93786..5b06bf4c1840 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -102,7 +102,7 @@ using ::com::sun::star::table::CellRangeAddress; namespace { -o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataPilotDescriptorBaseMap() +std::span<const SfxItemPropertyMapEntry> lcl_GetDataPilotDescriptorBaseMap() { static const SfxItemPropertyMapEntry aDataPilotDescriptorBaseMap_Impl[] = { @@ -120,7 +120,7 @@ o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataPilotDescriptorBaseMap() return aDataPilotDescriptorBaseMap_Impl; } -o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataPilotFieldMap() +std::span<const SfxItemPropertyMapEntry> lcl_GetDataPilotFieldMap() { using namespace ::com::sun::star::beans::PropertyAttribute; static const SfxItemPropertyMapEntry aDataPilotFieldMap_Impl[] = @@ -148,7 +148,7 @@ o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataPilotFieldMap() return aDataPilotFieldMap_Impl; } -o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataPilotItemMap() +std::span<const SfxItemPropertyMapEntry> lcl_GetDataPilotItemMap() { static const SfxItemPropertyMapEntry aDataPilotItemMap_Impl[] = { diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 71b28feb35dd..1bbd661a4f8b 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -70,7 +70,7 @@ using namespace css::sheet; // everything without Which-ID, map only for PropertySetInfo -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetSubTotalPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetSubTotalPropertyMap() { // some old property names are for 5.2 compatibility @@ -92,7 +92,7 @@ static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetSubTotalPropertyMap() return aSubTotalPropertyMap_Impl; } -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetFilterPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetFilterPropertyMap() { static const SfxItemPropertyMapEntry aFilterPropertyMap_Impl[] = { @@ -109,7 +109,7 @@ static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetFilterPropertyMap() return aFilterPropertyMap_Impl; } -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDBRangePropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetDBRangePropertyMap() { static const SfxItemPropertyMapEntry aDBRangePropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx index af267fb4aecb..516fc8c6c768 100644 --- a/sc/source/ui/unoobj/defltuno.cxx +++ b/sc/source/ui/unoobj/defltuno.cxx @@ -36,7 +36,7 @@ class SvxFontItem; using namespace ::com::sun::star; -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDocDefaultsMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetDocDefaultsMap() { static const SfxItemPropertyMapEntry aDocDefaultsMap_Impl[] = { diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index d720630a8a38..9ef2e5971528 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -142,7 +142,7 @@ constexpr OUStringLiteral SC_UNO_VBAGLOBNAME = u"VBAGlobalConstantName"; // no Which-ID here, map only for PropertySetInfo //! rename this, those are no longer only options -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDocOptPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetDocOptPropertyMap() { static const SfxItemPropertyMapEntry aDocOptPropertyMap_Impl[] = { @@ -197,7 +197,7 @@ static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDocOptPropertyMap() //! StandardDecimals as property and from NumberFormatter ???????? -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetColumnsPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetColumnsPropertyMap() { static const SfxItemPropertyMapEntry aColumnsPropertyMap_Impl[] = { @@ -210,7 +210,7 @@ static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetColumnsPropertyMap() return aColumnsPropertyMap_Impl; } -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetRowsPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetRowsPropertyMap() { static const SfxItemPropertyMapEntry aRowsPropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index d380b95f2314..1b9185591739 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -44,7 +44,7 @@ using namespace ::formula; // map only for PropertySetInfo -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetValidatePropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetValidatePropertyMap() { static const SfxItemPropertyMapEntry aValidatePropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index 8ee0910c3d13..b8c6a9c7e35e 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -53,7 +53,7 @@ using ::com::sun::star::uno::RuntimeException; using ::std::vector; // used for sheet- and area link: -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetSheetLinkMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetSheetLinkMap() { static const SfxItemPropertyMapEntry aSheetLinkMap_Impl[] = { diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 6e02ab723b62..39973ba74cad 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -48,7 +48,7 @@ using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetNamedRangeMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetNamedRangeMap() { static const SfxItemPropertyMapEntry aNamedRangeMap_Impl[] = { @@ -60,7 +60,7 @@ static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetNamedRangeMap() return aNamedRangeMap_Impl; } -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetNamedRangesMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetNamedRangesMap() { static const SfxItemPropertyMapEntry aNamedRangesMap_Impl[] = { diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx index c9ccc8878065..09e17add09b8 100644 --- a/sc/source/ui/unoobj/optuno.cxx +++ b/sc/source/ui/unoobj/optuno.cxx @@ -29,7 +29,7 @@ using namespace com::sun::star; -o3tl::span<const SfxItemPropertyMapEntry> ScDocOptionsHelper::GetPropertyMap() +std::span<const SfxItemPropertyMapEntry> ScDocOptionsHelper::GetPropertyMap() { static const SfxItemPropertyMapEntry aMap[] = { diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 49eb4220fa6c..f14be95c65c9 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -49,7 +49,7 @@ using namespace ::com::sun::star; -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetShapeMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetShapeMap() { static const SfxItemPropertyMapEntry aShapeMap_Impl[] = { diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx index 036f6c89817b..e06fe501df6e 100644 --- a/sc/source/ui/unoobj/srchuno.cxx +++ b/sc/source/ui/unoobj/srchuno.cxx @@ -32,7 +32,7 @@ using namespace com::sun::star; // SfxItemPropertyMapEntry only for GetPropertySetInfo -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetSearchPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetSearchPropertyMap() { static const SfxItemPropertyMapEntry aSearchPropertyMap_Impl[] = { diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx index 54f517e50bc7..f3b4888ae535 100644 --- a/sc/source/ui/unoobj/targuno.cxx +++ b/sc/source/ui/unoobj/targuno.cxx @@ -49,7 +49,7 @@ const TranslateId aTypeResIds[SC_LINKTARGETTYPE_COUNT] = SCSTR_CONTENT_DBAREA // SC_LINKTARGETTYPE_DBAREA }; -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetLinkTargetMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetLinkTargetMap() { static const SfxItemPropertyMapEntry aLinkTargetMap_Impl[] = { diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index 32570f3914db..90b0a87e30f9 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -46,7 +46,7 @@ using namespace ::formula; using namespace ::com::sun::star; -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetFormulaParserMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetFormulaParserMap() { static const SfxItemPropertyMapEntry aFormulaParserMap_Impl[] = { diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index e4bd505a5e09..e139b4a59ec6 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -80,7 +80,7 @@ using namespace com::sun::star; // no Which-ID here, Map only for PropertySetInfo -static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetViewOptPropertyMap() +static std::span<const SfxItemPropertyMapEntry> lcl_GetViewOptPropertyMap() { static const SfxItemPropertyMapEntry aViewOptPropertyMap_Impl[] = { diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index b4110da7f641..44aba021a613 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -43,6 +43,7 @@ #include <optional> #include <ostream> #include <set> +#include <span> #include <stddef.h> #include <string_view> #include <type_traits> @@ -354,7 +355,6 @@ #include <o3tl/deleter.hxx> #include <o3tl/safeint.hxx> #include <o3tl/sorted_vector.hxx> -#include <o3tl/span.hxx> #include <o3tl/string_view.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx index 32614ba525a1..b74e188d61d5 100644 --- a/sd/inc/pch/precompiled_sdui.hxx +++ b/sd/inc/pch/precompiled_sdui.hxx @@ -47,6 +47,7 @@ #include <optional> #include <ostream> #include <set> +#include <span> #include <stddef.h> #include <stdexcept> #include <string.h> @@ -384,7 +385,6 @@ #include <o3tl/hash_combine.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/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 4fca79b04b13..e1a2c51b6446 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -31,9 +31,9 @@ #include <sfx2/module.hxx> #include <sal/types.h> #include <vcl/virdev.hxx> -#include <o3tl/span.hxx> #include <map> #include <memory> +#include <span> #include <string_view> class SdOptions; @@ -59,13 +59,13 @@ enum class SdOptionStreamMode struct SdExtPropertySetInfoCacheCompare { - bool operator()(const o3tl::span<SfxItemPropertyMapEntry const>& lhs, const o3tl::span<SfxItemPropertyMapEntry const>& rhs) const + bool operator()(const std::span<SfxItemPropertyMapEntry const>& lhs, const std::span<SfxItemPropertyMapEntry const>& rhs) const { return lhs.data() < rhs.data(); } }; typedef std::map< - o3tl::span<SfxItemPropertyMapEntry const>, + std::span<SfxItemPropertyMapEntry const>, css::uno::Reference<css::beans::XPropertySetInfo>, SdExtPropertySetInfoCacheCompare > SdExtPropertySetInfoCache; typedef std::map< SdrObjKind, css::uno::Sequence< css::uno::Type> > SdTypesCache; diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 4b21acae84f0..b53debc7dcbe 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -19,7 +19,10 @@ #pragma once -#include <o3tl/span.hxx> +#include <sal/config.h> + +#include <span> + #include <sfx2/docfac.hxx> #include <sfx2/objsh.hxx> #include <svl/style.hxx> @@ -145,7 +148,7 @@ public: */ bool CheckPageName(weld::Window* pWin, OUString& rName ); - void SetSlotFilter(bool bEnable = false, o3tl::span<sal_uInt16 const> pSIDs = o3tl::span<sal_uInt16 const>()) { mbFilterEnable = bEnable; mpFilterSIDs = pSIDs; } + void SetSlotFilter(bool bEnable = false, std::span<sal_uInt16 const> pSIDs = std::span<sal_uInt16 const>()) { mbFilterEnable = bEnable; mpFilterSIDs = pSIDs; } void ApplySlotFilter() const; SfxStyleFamily GetStyleFamily() const { return mnStyleFamily; } @@ -214,7 +217,7 @@ private: std::unique_ptr<FontList> mpFontList; DocumentType meDocType; SfxStyleFamily mnStyleFamily; - o3tl::span<sal_uInt16 const> + std::span<sal_uInt16 const> mpFilterSIDs; bool mbFilterEnable; bool mbSdDataObj; diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 52df32b41954..52f66d5afdea 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -104,7 +104,7 @@ namespace { }; } -static o3tl::span<const SfxItemPropertyMapEntry> ImplGetPresentationPropertyMap() +static std::span<const SfxItemPropertyMapEntry> ImplGetPresentationPropertyMap() { // NOTE: First member must be sorted static const SfxItemPropertyMapEntry aPresentationPropertyMap_Impl[] = diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 2f463f101a4a..114b60f02475 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -129,7 +129,7 @@ using ::com::sun::star::drawing::XShape; { u"NavigationOrder"_ustr, WID_NAVORDER, cppu::UnoType<sal_Int32>::get(), 0, 0},\ { u"PlaceholderText"_ustr, WID_PLACEHOLDERTEXT, cppu::UnoType<OUString>::get(), 0, 0},\ - static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetImpress_SdXShapePropertyGraphicMap_Impl() + static std::span<const SfxItemPropertyMapEntry> lcl_GetImpress_SdXShapePropertyGraphicMap_Impl() { static const SfxItemPropertyMapEntry aImpress_SdXShapePropertyGraphicMap_Impl[] = { @@ -139,7 +139,7 @@ using ::com::sun::star::drawing::XShape; return aImpress_SdXShapePropertyGraphicMap_Impl; } - static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetImpress_SdXShapePropertySimpleMap_Impl() + static std::span<const SfxItemPropertyMapEntry> lcl_GetImpress_SdXShapePropertySimpleMap_Impl() { static const SfxItemPropertyMapEntry aImpress_SdXShapePropertySimpleMap_Impl[] = { @@ -154,7 +154,7 @@ using ::com::sun::star::drawing::XShape; { u"" UNO_NAME_OBJ_STYLE ""_ustr, WID_STYLE, cppu::UnoType<style::XStyle>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0},\ { u"NavigationOrder"_ustr, WID_NAVORDER, cppu::UnoType<sal_Int32>::get(), 0, 0},\ - static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDraw_SdXShapePropertySimpleMap_Impl() + static std::span<const SfxItemPropertyMapEntry> lcl_GetDraw_SdXShapePropertySimpleMap_Impl() { static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyMap_Impl[] = { @@ -162,7 +162,7 @@ using ::com::sun::star::drawing::XShape; }; return aDraw_SdXShapePropertyMap_Impl; } - static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDraw_SdXShapePropertyGraphicMap_Impl() + static std::span<const SfxItemPropertyMapEntry> lcl_GetDraw_SdXShapePropertyGraphicMap_Impl() { static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyGraphicMap_Impl[] = { @@ -171,9 +171,9 @@ using ::com::sun::star::drawing::XShape; }; return aDraw_SdXShapePropertyGraphicMap_Impl; } - static o3tl::span<const SfxItemPropertyMapEntry> lcl_ImplGetShapePropertyMap( bool bImpress, bool bGraphicObj ) + static std::span<const SfxItemPropertyMapEntry> lcl_ImplGetShapePropertyMap( bool bImpress, bool bGraphicObj ) { - o3tl::span<const SfxItemPropertyMapEntry> pRet; + std::span<const SfxItemPropertyMapEntry> pRet; if( bImpress ) { if( bGraphicObj ) @@ -222,7 +222,7 @@ using ::com::sun::star::drawing::XShape; } return pRet; } - static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetEmpty_SdXShapePropertyMap_Impl() + static std::span<const SfxItemPropertyMapEntry> lcl_GetEmpty_SdXShapePropertyMap_Impl() { return {}; } @@ -378,7 +378,7 @@ uno::Any SAL_CALL SdXShape::getPropertyDefault( const OUString& aPropertyName ) //XPropertySet css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL SdXShape::getPropertySetInfo() { - o3tl::span<SfxItemPropertyMapEntry const> nObjId = mpShape->getPropertyMapEntries(); + std::span<SfxItemPropertyMapEntry const> nObjId = mpShape->getPropertyMapEntries(); css::uno::Reference<css::beans::XPropertySetInfo> pInfo; SdExtPropertySetInfoCache& rCache = (mpModel && mpModel->IsImpressDocument()) ? diff --git a/sd/source/ui/unoidl/unoobj.hxx b/sd/source/ui/unoidl/unoobj.hxx index 407f5491a15a..7c78bc520dcd 100644 --- a/sd/source/ui/unoidl/unoobj.hxx +++ b/sd/source/ui/unoidl/unoobj.hxx @@ -38,7 +38,7 @@ class SdXShape : public SvxShapeMaster, private: SvxShape* mpShape; const SvxItemPropertySet* mpPropSet; - o3tl::span<const SfxItemPropertyMapEntry> mpMap; + std::span<const SfxItemPropertyMapEntry> mpMap; SdXImpressDocument* mpModel; /// @throws css::lang::IllegalArgumentException diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx index 5a071f1fde4f..6f93ed4c61c9 100644 --- a/sd/source/ui/unoidl/unosrch.cxx +++ b/sd/source/ui/unoidl/unosrch.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star; #define WID_SEARCH_CASE 1 #define WID_SEARCH_WORDS 2 -static o3tl::span<const SfxItemPropertyMapEntry> ImplGetSearchPropertyMap() +static std::span<const SfxItemPropertyMapEntry> ImplGetSearchPropertyMap() { static const SfxItemPropertyMapEntry aSearchPropertyMap_Impl[] = { diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index c047f854a810..6a492bffda7e 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -132,7 +132,7 @@ struct SfxDispatcher_Impl SfxSlotFilterState nFilterEnabling; // 1==filter enabled slots, // 2==ReadOnlyDoc overturned - o3tl::span<sal_uInt16 const> + std::span<sal_uInt16 const> pFilterSIDs; // sorted Array of SIDs SfxDisableFlags nDisableFlags; bool bFlushed; @@ -1463,7 +1463,7 @@ void SfxDispatcher::FlushImpl() pDisp->SetSlotFilter(); */ void SfxDispatcher::SetSlotFilter(SfxSlotFilterState nEnable, - o3tl::span<sal_uInt16 const> pSIDs) + std::span<sal_uInt16 const> pSIDs) { #ifdef DBG_UTIL // Check Array diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index 0569fcd3dc61..3b57a717dc4f 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -133,7 +133,7 @@ IFrameWindow_Impl::IFrameWindow_Impl( vcl::Window *pParent, bool bHasBorder ) #define WID_FRAME_MARGIN_WIDTH 7 #define WID_FRAME_MARGIN_HEIGHT 8 -o3tl::span<const SfxItemPropertyMapEntry> lcl_GetIFramePropertyMap_Impl() +std::span<const SfxItemPropertyMapEntry> lcl_GetIFramePropertyMap_Impl() { static const SfxItemPropertyMapEntry aIFramePropertyMap_Impl[] = { diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx index 234c3c09c839..ef4e988c96b3 100644 --- a/slideshow/inc/pch/precompiled_slideshow.hxx +++ b/slideshow/inc/pch/precompiled_slideshow.hxx @@ -45,6 +45,7 @@ #include <numeric> #include <optional> #include <ostream> +#include <span> #include <stddef.h> #include <stdexcept> #include <string.h> @@ -259,7 +260,6 @@ #include <i18nlangtag/lang.h> #include <o3tl/cow_wrapper.hxx> ... etc. - the rest is truncated