diff options
30 files changed, 62 insertions, 60 deletions
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 7dc992a8c360..fd116745e7a8 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -270,7 +270,7 @@ namespace cairocanvas if (maLogicalAdvancements.hasElements()) { - rOutDev.DrawTextArray( rOutpos, maText.Text, { aOffsets.data(), aOffsets.size() }, + rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets, ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ); } diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index e7623219c798..cd50cb4878ed 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -206,14 +206,14 @@ namespace dxcanvas { // create the DXArray const sal_Int32 nLen( rLogicalAdvancements.getLength() ); - std::unique_ptr<sal_Int32[]> pDXArray( std::make_unique<sal_Int32[]>(nLen) ); + std::vector<sal_Int32> DXArray( nLen ); for( sal_Int32 i=0; i<nLen; ++i ) - pDXArray[i] = basegfx::fround( rLogicalAdvancements[i] ); + DXArray[i] = basegfx::fround( rLogicalAdvancements[i] ); // draw the String xVirtualDevice->DrawTextArray( aEmptyPoint, aText, - o3tl::span( pDXArray.get(), nLen ), + DXArray, rText.StartPosition, rText.Length, bIsRTL ? SalLayoutFlags::BiDiRtl : SalLayoutFlags::NONE); diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx index b3c79bd4f6e8..9835cea5b237 100644 --- a/canvas/source/opengl/ogl_canvashelper.cxx +++ b/canvas/source/opengl/ogl_canvashelper.cxx @@ -740,7 +740,7 @@ namespace oglcanvas rTxt.StartPosition, rTxt.Length, 0, - { aDXArray.data(), aDXArray.size() } ); + aDXArray); } else { diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index b5c2ffce5154..efc772228390 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -129,7 +129,7 @@ namespace vclcanvas maText.StartPosition, maText.Length, 0, - {aOffsets.data(), aOffsets.size()})) + aOffsets)) { aOutlineSequence.reserve(aOutlines.size()); sal_Int32 nIndex (0); @@ -343,7 +343,7 @@ namespace vclcanvas rOutDev.DrawTextArray( rOutpos, maText.Text, - { aOffsets.data(), aOffsets.size() }, + aOffsets, ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ); } diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 730fc11b1845..3fb31a79ee73 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -1008,7 +1008,7 @@ namespace cppcanvas::internal aStrikeoutText.makeStringAndClear(), 0/*nStartPos*/, nLen, - { aStrikeoutCharWidths.data(), aStrikeoutCharWidths.size() }, + aStrikeoutCharWidths, rParms.mrVDev, rParms.mrCanvas, rState, @@ -2474,7 +2474,7 @@ namespace cppcanvas::internal sText, pAct->GetIndex(), nLen, - { pAct->GetDXArray().data(), pAct->GetDXArray().size() }, + pAct->GetDXArray(), rFactoryParms, bSubsettableActions ); } @@ -2582,7 +2582,7 @@ namespace cppcanvas::internal sText, pAct->GetIndex(), nLen, - { aDXArray.data(), aDXArray.size() }, + aDXArray, rFactoryParms, bSubsettableActions ); } diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index c63c92a5b851..091dde1c456c 100644 --- a/cppcanvas/source/mtfrenderer/textaction.cxx +++ b/cppcanvas/source/mtfrenderer/textaction.cxx @@ -191,7 +191,7 @@ namespace cppcanvas::internal rVDev.GetTextArray( rText, &aCharWidths, nStartPos, nLen ); - return setupDXArray( { aCharWidths.data(), aCharWidths.size() }, nLen, rState ); + return setupDXArray( aCharWidths, nLen, rState ); } ::basegfx::B2DPoint adaptStartPoint( const ::basegfx::B2DPoint& rStartPoint, diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 102effd7fde1..38a14e927005 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -239,7 +239,7 @@ void TextLayouterDevice::getTextOutlines(basegfx::B2DPolyPolygonVector& rB2DPoly } mrDevice.GetTextOutlines(rB2DPolyPolyVector, rText, nIndex, nIndex, nLength, 0, - { aIntegerDXArray.data(), aIntegerDXArray.size() }); + aIntegerDXArray); } else { diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 796a9dbe8b75..831972d187ab 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -311,9 +311,7 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( if (!aTransformedDXArray.empty()) { - mpOutputDevice->DrawTextArray( - aStartPoint, aText, { aTransformedDXArray.data(), aTransformedDXArray.size() }, - nPos, nLen); + mpOutputDevice->DrawTextArray(aStartPoint, aText, aTransformedDXArray, nPos, nLen); } else { diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 59d0d4d583c1..75463945c724 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3392,7 +3392,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po aTmpFont.SetPhysFont(*GetRefDevice()); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, nTextStart, nTextLen, &aTmpDXArray ); - pDXArray = o3tl::span(aTmpDXArray.data(), aTmpDXArray.size()); + pDXArray = aTmpDXArray; // add a meta file comment if we record to a metafile if( bMetafileValid ) @@ -3418,7 +3418,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po // crash when accessing 0 pointer in pDXArray aTmpFont.SetPhysFont(*GetRefDevice()); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, 0, aText.getLength(), &aTmpDXArray ); - pDXArray = o3tl::span(aTmpDXArray.data(), aTmpDXArray.size()); + pDXArray = aTmpDXArray; } tools::Long nTxtWidth = rTextPortion.GetSize().Width(); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index c5ee16f7760c..d3500c879378 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -977,7 +977,7 @@ void Outliner::PaintBullet(sal_Int32 nPara, const Point& rStartPos, const Point& aTextPos.AdjustY( -(aMetric.GetDescent()) ); } - DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), o3tl::span(aBuf.data(), aBuf.size()), + DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), aBuf, aSvxFont, nPara, bRightToLeftPara ? 1 : 0, nullptr, nullptr, false, false, true, nullptr, Color(), Color()); } else diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 0d62f4f9a373..4a3242c65451 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -1890,7 +1890,7 @@ namespace emfio pVDev->SetMapMode(MapMode(MapUnit::Map100thMM)); pVDev->SetFont( maLatestFont ); pVDev->GetTextArray( rText, &aMyDXArray, 0, rText.getLength()); - pDX = { aMyDXArray.data(), aMyDXArray.size() }; + pDX = aMyDXArray; } mpGDIMetaFile->AddAction( new MetaTextArrayAction( rPosition, rText, pDX, 0, rText.getLength() ) ); } diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index c8295a790a38..07afb5f440a1 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -3809,7 +3809,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { vcl::Font aFont = ImplSetCorrectFontHeight(); maAttributeWriter.SetFontAttr( aFont ); - ImplWriteText( pA->GetPoint(), aText, { pA->GetDXArray().data(), pA->GetDXArray().size() }, 0 ); + ImplWriteText( pA->GetPoint(), aText, pA->GetDXArray(), 0 ); } else { diff --git a/include/o3tl/span.hxx b/include/o3tl/span.hxx index 087d1f9d69c3..cfe4c1ffa3a3 100644 --- a/include/o3tl/span.hxx +++ b/include/o3tl/span.hxx @@ -26,6 +26,7 @@ namespace o3tl { using std::span; } #include <cstddef> #include <iterator> #include <type_traits> +#include <vector> namespace o3tl { @@ -58,6 +59,10 @@ public: 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()) {} diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index a3464b814333..eaf23409bd7a 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -386,14 +386,14 @@ public: void Add( XmlStyleFamily nFamily, const css::uno::Reference< css::beans::XPropertySet > & rPropSet, - const o3tl::span<XMLPropertyState> aAddStates = {}, bool bDontSeek = false ); + o3tl::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<XMLPropertyState> aAddStates = {} ) const; + const o3tl::span<const XMLPropertyState> aAddStates = {} ) const; static SvXMLExportPropertyMapper *CreateShapeExtPropMapper( SvXMLExport& rExport ); diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index b54b8017132b..b3e9d76d0fca 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -2146,7 +2146,7 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co } if (bPaint) - mpDev->DrawTextArray(aDrawTextPos, aShort, {aDX.data(), aDX.size()}); + mpDev->DrawTextArray(aDrawTextPos, aShort, aDX); } else { diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx index 5bb43fcc422a..28cf18d94ebf 100644 --- a/sfx2/source/doc/SfxRedactionHelper.cxx +++ b/sfx2/source/doc/SfxRedactionHelper.cxx @@ -141,11 +141,9 @@ tools::Rectangle ImplCalcActionBounds(const MetaAction& rAct, const OutputDevice { // #105987# ImplLayout takes everything in logical coordinates std::unique_ptr<SalLayout> pSalLayout1 = rOut.ImplLayout( - aString, 0, nStrStartPos, rTextAct.GetPoint(), 0, - { rTextAct.GetDXArray().data(), rTextAct.GetDXArray().size() }); + aString, 0, nStrStartPos, rTextAct.GetPoint(), 0, rTextAct.GetDXArray()); std::unique_ptr<SalLayout> pSalLayout2 = rOut.ImplLayout( - aString, 0, nStrEndPos, rTextAct.GetPoint(), 0, - { rTextAct.GetDXArray().data(), rTextAct.GetDXArray().size() }); + aString, 0, nStrEndPos, rTextAct.GetPoint(), 0, rTextAct.GetDXArray()); if (pSalLayout2) { tools::Rectangle aBoundRect2(rOut.ImplGetTextBoundRect(*pSalLayout2)); diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index c68a35483728..e5756f8ef37d 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -372,7 +372,7 @@ static void GetTextAreaOutline( pVirDev->SetFont( aFont ); } FWCharacterData aCharacterData; - if ( pVirDev->GetTextOutlines( aCharacterData.vOutlines, rText, 0, 0, -1, nWidth, { aDXArry.data(), aDXArry.size() } ) ) + if ( pVirDev->GetTextOutlines( aCharacterData.vOutlines, rText, 0, 0, -1, nWidth, aDXArry ) ) { rParagraph.vCharacters.push_back( aCharacterData ); } diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index bfa88bf306b1..b23ba26a5d34 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -1114,7 +1114,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) rInf.GetFrame()->SwitchHorizontalToVertical( aTextOriginPos ); rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), - { aKernArray.data(), aKernArray.size() }, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); + aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); return; } @@ -1200,20 +1200,20 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) { aKernArray[0] = rInf.GetWidth() + nSpaceAdd; rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), - { aKernArray.data(), aKernArray.size() }, sal_Int32(rInf.GetIdx()), 1); + aKernArray, sal_Int32(rInf.GetIdx()), 1); } else { aKernArray[sal_Int32(rInf.GetLen()) - 2] += nSpaceAdd; rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), - { aKernArray.data(), aKernArray.size() }, sal_Int32(rInf.GetIdx()), + aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); } } else { rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), - { aKernArray.data(), aKernArray.size() }, sal_Int32(rInf.GetIdx()), + aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); } } @@ -1230,7 +1230,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) } rInf.GetOut().DrawTextArray(aTextOriginPos, - rInf.GetText(), { aKernArray.data(), aKernArray.size() }, + rInf.GetText(), aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); } @@ -1247,7 +1247,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) aKernArray[i] += nGridAddSum; } rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), - { aKernArray.data(), aKernArray.size() }, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); + aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); } return; } @@ -1401,18 +1401,18 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) aKernArray[0] = rInf.GetWidth() + nSpaceAdd; rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), - { aKernArray.data(), aKernArray.size() }, sal_Int32(rInf.GetIdx()), 1 ); + aKernArray, sal_Int32(rInf.GetIdx()), 1 ); } else { aKernArray[ sal_Int32(rInf.GetLen()) - 2 ] += nSpaceAdd; rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), - { aKernArray.data(), aKernArray.size() }, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); + aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); } } else rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), - { aKernArray.data(), aKernArray.size() }, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); + aKernArray, sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen())); } else { @@ -1651,9 +1651,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) rInf.GetFrame()->SwitchHorizontalToVertical( aTextOriginPos ); rInf.GetOut().DrawTextArray( aTextOriginPos, rInf.GetText(), - { aKernArray.data(), aKernArray.size() }, sal_Int32(rInf.GetIdx()), 1 ); + aKernArray, sal_Int32(rInf.GetIdx()), 1 ); if( bBullet ) - rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, { aKernArray.data(), aKernArray.size() }, + rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, aKernArray, rInf.GetIdx() ? 1 : 0, 1 ); } else @@ -1842,7 +1842,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) : sal_Int32(rInf.GetIdx()); aGlyphsKey = SwTextGlyphsKey{ &rInf.GetOut(), *pStr, nTmpIdx, nLen }; pGlyphs = GetCachedSalLayoutGlyphs(aGlyphsKey); - rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, { aKernArray.data(), aKernArray.size() }, + rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, aKernArray, nTmpIdx , nLen, SalLayoutFlags::NONE, pGlyphs ); if (bBullet) { @@ -1880,7 +1880,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) aKernArray [ i - 1 ] -= nAdd; } } - rInf.GetOut().DrawTextArray( aTextOriginPos, aBulletOverlay, { aKernArray.data(), aKernArray.size() }, + rInf.GetOut().DrawTextArray( aTextOriginPos, aBulletOverlay, aKernArray, nTmpIdx , nLen ); pTmpFont->SetColor( aPreviousColor ); diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 6ecd0772616f..124ccddc95e1 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -211,7 +211,7 @@ void SwXMLTextParagraphExport::_collectTextEmbeddedAutoStyles( lcl_addAspect( rObjRef, aStates, GetAutoFramePropMapper()->getPropertySetMapper() ); - Add( XmlStyleFamily::TEXT_FRAME, rPropSet, { aStates.data(), aStates.size() } ); + Add( XmlStyleFamily::TEXT_FRAME, rPropSet, aStates ); } void SwXMLTextParagraphExport::_exportTextEmbedded( @@ -276,7 +276,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( GetAutoFramePropMapper()->getPropertySetMapper() ); const OUString sAutoStyle = Find( XmlStyleFamily::TEXT_FRAME, - rPropSet, sStyle, { aStates.data(), aStates.size() } ); + rPropSet, sStyle, aStates ); aStates.clear(); if( !sAutoStyle.isEmpty() ) diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index 00321b4236a4..0475bf525999 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -470,7 +470,7 @@ void VCLXGraphics::drawTextArray( sal_Int32 x, sal_Int32 y, const OUString& rTex { aDXA[i] = rLongs[i]; } - mpOutputDevice->DrawTextArray( Point( x, y ), rText, o3tl::span(aDXA.data(), aDXA.size()) ); + mpOutputDevice->DrawTextArray( Point( x, y ), rText, aDXA ); } } diff --git a/vcl/source/control/calendar.cxx b/vcl/source/control/calendar.cxx index 1ce0c72b0687..7554d0d99a08 100644 --- a/vcl/source/control/calendar.cxx +++ b/vcl/source/control/calendar.cxx @@ -707,7 +707,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext) std::vector<sal_Int32> aTmp; for (int k=0; k<6; ++k) aTmp.push_back(mnDayOfWeekAry[k+1]); - rRenderContext.DrawTextArray(Point(nDayX + mnDayOfWeekAry[0], nDayY), maDayOfWeekText, {aTmp.data(), aTmp.size()}); + rRenderContext.DrawTextArray(Point(nDayX + mnDayOfWeekAry[0], nDayY), maDayOfWeekText, aTmp); // display days sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth(); diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx index f692071a8d92..ced4d9be1a9e 100644 --- a/vcl/source/filter/eps/eps.cxx +++ b/vcl/source/filter/eps/eps.cxx @@ -768,7 +768,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() ); Point aPoint( pA->GetPoint() ); - ImplText( aUniStr, aPoint, { pA->GetDXArray().data(), pA->GetDXArray().size() }, 0, rVDev ); + ImplText( aUniStr, aPoint, pA->GetDXArray(), 0, rVDev ); } break; diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index f77e2aad2001..84a18beb63fe 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -881,7 +881,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, o else { nNormWidth = maVDev->GetTextArray( rText, &aOwnArray ); - pDX = { aOwnArray.data(), aOwnArray.size() }; + pDX = aOwnArray; } if( nLen > 1 ) @@ -893,7 +893,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, o if (!pDXArray.empty()) { aOwnArray.insert(aOwnArray.begin(), pDXArray.begin(), pDXArray.end()); - pDX = { aOwnArray.data(), aOwnArray.size() }; + pDX = aOwnArray; } const double fFactor = static_cast<double>(nWidth) / nNormWidth; @@ -1371,7 +1371,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) ); ImplCheckTextAttr(); - ImplWriteTextRecord( pA->GetPoint(), aText, { pA->GetDXArray().data(), pA->GetDXArray().size() }, 0 ); + ImplWriteTextRecord( pA->GetPoint(), aText, pA->GetDXArray(), 0 ); } break; diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 339479b2b42c..6abd9f95d490 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -1185,8 +1185,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) OUString aTemp = pA->GetText().copy( pA->GetIndex(), std::min<sal_Int32>(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) ); aSrcLineInfo = LineInfo(); SetAllAttr(); - if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, { pA->GetDXArray().data(), pA->GetDXArray().size() } ) ) - WMFRecord_ExtTextOut( pA->GetPoint(), aTemp, { pA->GetDXArray().data(), pA->GetDXArray().size() } ); + if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, pA->GetDXArray() ) ) + WMFRecord_ExtTextOut( pA->GetPoint(), aTemp, pA->GetDXArray() ); } break; @@ -1211,8 +1211,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) aDXAry.clear(); aSrcLineInfo = LineInfo(); SetAllAttr(); - if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, { aDXAry.data(), aDXAry.size() } ) ) - WMFRecord_ExtTextOut( pA->GetPoint(), aTemp, { aDXAry.data(), aDXAry.size() } ); + if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, aDXAry ) ) + WMFRecord_ExtTextOut( pA->GetPoint(), aTemp, aDXAry ); } } break; diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 28cd535a1eb6..86e020b92dac 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -1463,7 +1463,7 @@ tools::Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, tools::R tools::Rectangle aRect; // hdu said base = index aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(), - 0, { pAct->GetDXArray().data(), pAct->GetDXArray().size() } ); + 0, pAct->GetDXArray() ); Point aPt( pAct->GetPoint() ); aRect.Move( aPt.X(), aPt.Y() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 0135afd9d626..25d51f276056 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -638,7 +638,7 @@ MetaTextArrayAction::~MetaTextArrayAction() void MetaTextArrayAction::Execute( OutputDevice* pOut ) { - pOut->DrawTextArray( maStartPt, maStr, { maDXAry.data(), maDXAry.size() }, mnIndex, mnLen ); + pOut->DrawTextArray( maStartPt, maStr, maDXAry, mnIndex, mnLen ); } rtl::Reference<MetaAction> MetaTextArrayAction::Clone() const diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 8bce2a37ba8c..8d1cc7310da3 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -809,7 +809,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa case MetaActionType::TEXTARRAY: { const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction); - m_rOuterFace.DrawTextArray( pA->GetPoint(), pA->GetText(), { pA->GetDXArray().data(), pA->GetDXArray().size() }, pA->GetIndex(), pA->GetLen() ); + m_rOuterFace.DrawTextArray( pA->GetPoint(), pA->GetText(), pA->GetDXArray(), pA->GetIndex(), pA->GetLen() ); } break; diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx index 0f63c969931d..416c68343f47 100644 --- a/vcl/source/gdi/textlayout.cxx +++ b/vcl/source/gdi/textlayout.cxx @@ -209,7 +209,7 @@ namespace vcl std::vector<sal_Int32> aCharWidths; tools::Long nTextWidth = GetTextArray( _rText, &aCharWidths, _nStartIndex, _nLength ); - m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, { aCharWidths.data(), aCharWidths.size() }, _nStartIndex, _nLength ); + m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, aCharWidths, _nStartIndex, _nLength ); m_aCompleteTextRect.Union( tools::Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) ); } diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index a372439a4bb9..f747c04798fe 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -1193,7 +1193,7 @@ tools::Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic // #105987# ImplLayout takes everything in logical coordinates std::unique_ptr<SalLayout> pSalLayout = rOut.ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen(), rTextAct.GetPoint(), - 0, { rTextAct.GetDXArray().data(), rTextAct.GetDXArray().size() } ); + 0, rTextAct.GetDXArray()); if( pSalLayout ) { tools::Rectangle aBoundRect( rOut.ImplGetTextBoundRect( *pSalLayout ) ); diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index b444635af77e..c6c8dca09f60 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -510,7 +510,8 @@ void FieldParamExporter::ExportParameter(const OUString& sKey, const OUString& s void XMLTextParagraphExport::Add( XmlStyleFamily nFamily, const Reference < XPropertySet > & rPropSet, - const o3tl::span<XMLPropertyState> aAddStates, bool bDontSeek ) + const o3tl::span<const XMLPropertyState> aAddStates, + bool bDontSeek ) { rtl::Reference < SvXMLExportPropertyMapper > xPropMapper; switch( nFamily ) @@ -734,7 +735,7 @@ OUString XMLTextParagraphExport::Find( XmlStyleFamily nFamily, const Reference < XPropertySet > & rPropSet, const OUString& rParent, - const o3tl::span<XMLPropertyState> aAddStates) const + const o3tl::span<const XMLPropertyState> aAddStates) const { OUString sName( rParent ); rtl::Reference < SvXMLExportPropertyMapper > xPropMapper; |