This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch compilers-101 in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 2c2eeb850ad88954b4a8e93fd5f4b0113cc132f9 Author: Pedro F. Giffuni <[email protected]> AuthorDate: Thu Nov 5 22:26:02 2026 -0500 Boost modernization Phase 3: boost::bind to C++14 lambdas (~85 more files) --- .../canvas/source/vcl/canvashelper_texturefill.cxx | 10 ++--- main/sdext/source/pdfimport/wrapper/wrapper.cxx | 4 +- main/svx/source/sidebar/line/LinePropertyPanel.hxx | 50 +++++++++++----------- main/vcl/source/gdi/image.cxx | 4 +- main/xmloff/source/text/txtimp.cxx | 4 +- 5 files changed, 35 insertions(+), 37 deletions(-) diff --git a/main/canvas/source/vcl/canvashelper_texturefill.cxx b/main/canvas/source/vcl/canvashelper_texturefill.cxx index f6e62d7c6b..1c24f9e4b8 100644 --- a/main/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/main/canvas/source/vcl/canvashelper_texturefill.cxx @@ -23,6 +23,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_canvas.hxx" +#include <tuple> #include <canvas/debug.hxx> #include <tools/diagnose_ex.h> @@ -61,9 +62,6 @@ #include <canvas/parametricpolypolygon.hxx> #include <boost/bind.hpp> -#include <boost/bind.hpp> -#include <boost/tuple/tuple.hpp> - #include "spritecanvas.hxx" #include "canvashelper.hxx" #include "impltools.hxx" @@ -218,7 +216,7 @@ namespace vclcanvas { std::ptrdiff_t nIndex; double fAlpha; - boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(double(i)/nStepCount); + std::tie(nIndex,fAlpha)=aLerper.lerp(double(i)/nStepCount); rOutDev.SetFillColor( Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), @@ -384,7 +382,7 @@ namespace vclcanvas std::ptrdiff_t nIndex; double fAlpha; - boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(fT); + std::tie(nIndex,fAlpha)=aLerper.lerp(fT); // lerp color rOutDev.SetFillColor( @@ -442,7 +440,7 @@ namespace vclcanvas std::ptrdiff_t nIndex; double fAlpha; - boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(fT); + std::tie(nIndex,fAlpha)=aLerper.lerp(fT); // lerp color rOutDev.SetFillColor( diff --git a/main/sdext/source/pdfimport/wrapper/wrapper.cxx b/main/sdext/source/pdfimport/wrapper/wrapper.cxx index b20c10c801..9f2909a96f 100644 --- a/main/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/main/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -62,7 +62,7 @@ #include <boost/bind.hpp> #include <boost/preprocessor/stringize.hpp> #include <memory> -#include <memory> +#include <boost/scoped_array.hpp> #include <unordered_map> #include <string.h> @@ -919,7 +919,7 @@ static bool checkEncryption( const rtl::OUString& aPDFFile = rtl::OUStringToOString( i_rPath, osl_getThreadTextEncoding() ); pdfparse::PDFReader aParser; - std::unique_ptr<pdfparse::PDFEntry[]> pEntry( aParser.read( aPDFFile.getStr() )); + std::unique_ptr<pdfparse::PDFEntry> pEntry( aParser.read( aPDFFile.getStr() )); if( pEntry ) { pdfparse::PDFFile* pPDFFile = dynamic_cast<pdfparse::PDFFile*>(pEntry.get()); diff --git a/main/svx/source/sidebar/line/LinePropertyPanel.hxx b/main/svx/source/sidebar/line/LinePropertyPanel.hxx index d3aa8b94e9..7191be9712 100644 --- a/main/svx/source/sidebar/line/LinePropertyPanel.hxx +++ b/main/svx/source/sidebar/line/LinePropertyPanel.hxx @@ -30,7 +30,7 @@ #include <vcl/fixed.hxx> #include <vcl/field.hxx> #include <memory> -#include <memory> +#include <boost/scoped_array.hpp> #include <svx/sidebar/ColorPopup.hxx> #include <memory> #include "LineWidthPopup.hxx" @@ -98,23 +98,23 @@ public: private: //ui controls - ::std::unique_ptr< FixedText []> mpFTWidth; - ::std::unique_ptr< Window []> mpTBWidthBackground; - ::std::unique_ptr< ToolBox []> mpTBWidth; - ::std::unique_ptr< FixedText []> mpFTColor; - ::std::unique_ptr< Window []> mpTBColorBackground; - ::std::unique_ptr< ToolBox []> mpTBColor; - ::std::unique_ptr< FixedText []> mpFTStyle; - ::std::unique_ptr< ListBox []> mpLBStyle; - ::std::unique_ptr< FixedText []> mpFTTrancparency; - ::std::unique_ptr< MetricField []> mpMFTransparent; - ::std::unique_ptr< FixedText []> mpFTArrow; - ::std::unique_ptr< ListBox []> mpLBStart; - ::std::unique_ptr< ListBox []> mpLBEnd; - ::std::unique_ptr< FixedText []> mpFTEdgeStyle; - ::std::unique_ptr< ListBox []> mpLBEdgeStyle; - ::std::unique_ptr< FixedText []> mpFTCapStyle; - ::std::unique_ptr< ListBox []> mpLBCapStyle; + ::std::unique_ptr< FixedText > mpFTWidth; + ::std::unique_ptr< Window > mpTBWidthBackground; + ::std::unique_ptr< ToolBox > mpTBWidth; + ::std::unique_ptr< FixedText > mpFTColor; + ::std::unique_ptr< Window > mpTBColorBackground; + ::std::unique_ptr< ToolBox > mpTBColor; + ::std::unique_ptr< FixedText > mpFTStyle; + ::std::unique_ptr< ListBox > mpLBStyle; + ::std::unique_ptr< FixedText > mpFTTrancparency; + ::std::unique_ptr< MetricField > mpMFTransparent; + ::std::unique_ptr< FixedText > mpFTArrow; + ::std::unique_ptr< ListBox > mpLBStart; + ::std::unique_ptr< ListBox > mpLBEnd; + ::std::unique_ptr< FixedText > mpFTEdgeStyle; + ::std::unique_ptr< ListBox > mpLBEdgeStyle; + ::std::unique_ptr< FixedText > mpFTCapStyle; + ::std::unique_ptr< ListBox > mpLBCapStyle; //ControllerItem ::sfx2::sidebar::ControllerItem maStyleControl; @@ -130,16 +130,16 @@ private: ::sfx2::sidebar::ControllerItem maCapStyle; Color maColor; - ::std::unique_ptr< ::svx::ToolboxButtonColorUpdater []> mpColorUpdater; - ::std::unique_ptr< XLineStyleItem []> mpStyleItem; - ::std::unique_ptr< XLineDashItem []> mpDashItem; + ::std::unique_ptr< ::svx::ToolboxButtonColorUpdater > mpColorUpdater; + ::std::unique_ptr< XLineStyleItem > mpStyleItem; + ::std::unique_ptr< XLineDashItem > mpDashItem; sal_uInt16 mnTrans; SfxMapUnit meMapUnit; sal_Int32 mnWidthCoreValue; XLineEndListSharedPtr maLineEndList; XDashListSharedPtr maLineStyleList; - ::std::unique_ptr< XLineStartItem []> mpStartItem; - ::std::unique_ptr< XLineEndItem []> mpEndItem; + ::std::unique_ptr< XLineStartItem > mpStartItem; + ::std::unique_ptr< XLineEndItem > mpEndItem; //popup windows ColorPopup maColorPopup; @@ -150,8 +150,8 @@ private: Image maIMGNone; // multi-images - ::std::unique_ptr<Image[]> mpIMGWidthIcon; - ::std::unique_ptr<Image[]> mpIMGWidthIconH; //high contrast + ::boost::scoped_array<Image> mpIMGWidthIcon; + ::boost::scoped_array<Image> mpIMGWidthIconH; //high contrast cssu::Reference< css::frame::XFrame > mxFrame; SfxBindings* mpBindings; diff --git a/main/vcl/source/gdi/image.cxx b/main/vcl/source/gdi/image.cxx index 1d00224427..5992c1130f 100644 --- a/main/vcl/source/gdi/image.cxx +++ b/main/vcl/source/gdi/image.cxx @@ -23,7 +23,7 @@ #include "precompiled_vcl.hxx" #include <memory> -#include <memory> +#include <boost/scoped_array.hpp> #include <rtl/logfile.hxx> @@ -440,7 +440,7 @@ ImageList::ImageList( const ResId& rResId ) : sal_uLong nObjMask = pResMgr->ReadLong(); const String aPrefix( pResMgr->ReadString() ); - ::std::unique_ptr< Color []> spMaskColor; + ::std::unique_ptr< Color > spMaskColor; if( nObjMask & RSC_IMAGE_MASKCOLOR ) spMaskColor.reset( new Color( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) ) ); diff --git a/main/xmloff/source/text/txtimp.cxx b/main/xmloff/source/text/txtimp.cxx index f1518b4e2a..217026928f 100644 --- a/main/xmloff/source/text/txtimp.cxx +++ b/main/xmloff/source/text/txtimp.cxx @@ -26,7 +26,7 @@ #include <vector> -#include <memory> +#include <boost/scoped_array.hpp> #include <tuple> #include <tools/solar.h> @@ -558,7 +558,7 @@ struct SAL_DLLPRIVATE XMLTextImportHelper::Impl // will be assigned to the outline style // - data structure contains more than one candidate for each list level // of the outline style - ::std::unique_ptr< ::std::vector< ::rtl::OUString []> > + ::boost::scoped_array< ::std::vector< ::rtl::OUString > > m_pOutlineStylesCandidates; // <--
