basctl/source/dlged/dlgedclip.cxx | 2 binaryurp/source/bridge.cxx | 2 chart2/qa/extras/chart2export.cxx | 4 chart2/source/controller/dialogs/tp_AxisPositions.cxx | 2 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx | 4 chart2/source/controller/main/ChartController_Window.cxx | 4 chart2/source/controller/main/ObjectHierarchy.cxx | 2 chart2/source/model/template/ChartTypeTemplate.cxx | 2 chart2/source/model/template/PieChartTypeTemplate.cxx | 4 chart2/source/tools/DataSeriesHelper.cxx | 4 chart2/source/tools/ReferenceSizeProvider.cxx | 4 chart2/source/view/charttypes/VSeriesPlotter.cxx | 4 chart2/source/view/main/ShapeFactory.cxx | 4 comphelper/source/misc/backupfilehelper.cxx | 2 comphelper/source/misc/mimeconfighelper.cxx | 12 +- configmgr/source/writemodfile.cxx | 4 connectivity/source/commontools/ConnectionWrapper.cxx | 4 connectivity/source/manager/mdrivermanager.cxx | 2 cppuhelper/source/propertysetmixin.cxx | 4 cppuhelper/source/servicemanager.cxx | 4 cui/source/customize/SvxConfigPageHelper.cxx | 6 - cui/source/customize/SvxNotebookbarConfigPage.cxx | 2 cui/source/customize/cfg.cxx | 18 +-- cui/source/dialogs/scriptdlg.cxx | 10 - cui/source/options/certpath.cxx | 2 cui/source/options/optlingu.cxx | 2 dbaccess/source/core/dataaccess/databasecontext.cxx | 2 dbaccess/source/core/dataaccess/datasource.cxx | 2 dbaccess/source/filter/xml/xmlExport.cxx | 2 dbaccess/source/ui/browser/exsrcbrw.cxx | 2 dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2 dbaccess/source/ui/misc/UITools.cxx | 2 desktop/source/app/check_ext_deps.cxx | 2 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 2 desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 2 desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 4 desktop/source/lib/init.cxx | 10 - desktop/source/migration/migration.cxx | 22 +-- editeng/source/accessibility/AccessibleEditableTextPara.cxx | 4 embeddedobj/source/commonembedding/embedobj.cxx | 2 embeddedobj/source/commonembedding/miscobj.cxx | 2 embeddedobj/source/commonembedding/xfactory.cxx | 4 embeddedobj/source/general/docholder.cxx | 2 embeddedobj/source/general/xcreator.cxx | 2 embeddedobj/source/msole/olecomponent.cxx | 6 - embeddedobj/source/msole/oleembed.cxx | 2 embeddedobj/source/msole/ownview.cxx | 4 embedserv/source/embed/docholder.cxx | 4 embedserv/source/embed/intercept.cxx | 2 extensions/qa/bibliography/bibliography.cxx | 2 extensions/source/bibliography/general.cxx | 2 extensions/source/ole/oleobjw.cxx | 2 extensions/source/propctrlr/formcomponenthandler.cxx | 6 - extensions/source/propctrlr/genericpropertyhandler.cxx | 2 extensions/source/propctrlr/propcontroller.cxx | 2 extensions/source/update/check/updatehdl.cxx | 2 filter/source/graphic/GraphicExportFilter.cxx | 2 filter/source/msfilter/eschesdo.cxx | 2 filter/source/pdf/pdfdialog.cxx | 2 filter/source/pdf/pdfexport.cxx | 4 filter/source/xsltdialog/xmlfiltertestdialog.cxx | 4 filter/source/xsltfilter/LibXSLTTransformer.cxx | 2 forms/source/component/ComboBox.cxx | 4 forms/source/component/FormComponent.cxx | 2 forms/source/component/ListBox.cxx | 2 fpicker/source/office/OfficeControlAccess.cxx | 4 framework/source/dispatch/dispatchdisabler.cxx | 2 framework/source/fwe/classes/addonsoptions.cxx | 2 framework/source/layoutmanager/layoutmanager.cxx | 4 framework/source/layoutmanager/toolbarlayoutmanager.cxx | 2 framework/source/uiconfiguration/moduleuicfgsupplier.cxx | 2 framework/source/uiconfiguration/windowstateconfiguration.cxx | 4 framework/source/uielement/comboboxtoolbarcontroller.cxx | 2 framework/source/uielement/complextoolbarcontroller.cxx | 2 framework/source/uielement/dropdownboxtoolbarcontroller.cxx | 2 framework/source/uielement/generictoolbarcontroller.cxx | 2 framework/source/uielement/menubarmanager.cxx | 2 framework/source/uielement/statusbarmanager.cxx | 2 framework/source/uielement/togglebuttontoolbarcontroller.cxx | 2 framework/source/uielement/toolbarmanager.cxx | 2 framework/source/uielement/toolbarsmenucontroller.cxx | 2 framework/source/uielement/uicommanddescription.cxx | 2 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 2 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx | 2 lingucomponent/source/spellcheck/spell/sspellimp.cxx | 4 lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 2 linguistic/source/convdiclist.cxx | 2 linguistic/source/lngprophelp.cxx | 4 linguistic/source/lngsvcmgr.cxx | 4 lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 2 oox/source/core/filterbase.cxx | 2 oox/source/core/xmlfilterbase.cxx | 2 oox/source/crypto/DocumentEncryption.cxx | 2 oox/source/docprop/ooxmldocpropimport.cxx | 4 oox/source/export/chartexport.cxx | 4 oox/source/export/drawingml.cxx | 56 +++++----- oox/source/export/shapes.cxx | 12 +- oox/source/helper/propertymap.cxx | 4 package/source/manifest/ManifestExport.cxx | 2 package/source/xstor/owriteablestream.cxx | 2 package/source/xstor/xfactory.cxx | 2 package/source/xstor/xstorage.cxx | 6 - package/source/zippackage/ZipPackage.cxx | 4 package/source/zippackage/ZipPackageStream.cxx | 2 package/source/zippackage/zipfileaccess.cxx | 2 pyuno/source/module/pyuno_adapter.cxx | 2 reportdesign/source/core/api/ReportDefinition.cxx | 2 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx | 2 reportdesign/source/ui/dlg/Navigator.cxx | 2 reportdesign/source/ui/inspection/GeometryHandler.cxx | 4 reportdesign/source/ui/report/ReportSection.cxx | 2 reportdesign/source/ui/report/ViewsWindow.cxx | 2 sax/source/tools/fastserializer.cxx | 2 sc/qa/unit/subsequent_filters_test3.cxx | 4 sc/source/core/data/dpobject.cxx | 2 sc/source/core/tool/addincol.cxx | 4 sc/source/core/tool/appoptio.cxx | 2 sc/source/filter/excel/excel.cxx | 2 sc/source/filter/excel/xechart.cxx | 2 sc/source/filter/excel/xepivotxml.cxx | 6 - sc/source/filter/oox/formulabase.cxx | 4 sc/source/filter/oox/workbookhelper.cxx | 4 sc/source/filter/xml/XMLCodeNameProvider.cxx | 2 sc/source/filter/xml/xmlimprt.cxx | 2 sc/source/ui/miscdlgs/optsolver.cxx | 6 - sc/source/ui/unoobj/appluno.cxx | 2 sc/source/ui/unoobj/chart2uno.cxx | 2 sc/source/ui/unoobj/chartuno.cxx | 2 sc/source/ui/unoobj/dapiuno.cxx | 2 sc/source/ui/unoobj/eventuno.cxx | 2 sc/source/ui/unoobj/funcuno.cxx | 2 sc/source/ui/unoobj/shapeuno.cxx | 2 sc/source/ui/vba/vbaworksheets.cxx | 2 sc/source/ui/view/dbfunc3.cxx | 2 sc/source/ui/view/tabvwshb.cxx | 2 scaddins/source/analysis/analysishelper.cxx | 4 sccomp/source/solver/CoinMPSolver.cxx | 4 sccomp/source/solver/LpsolveSolver.cxx | 6 - sccomp/source/solver/SwarmSolver.cxx | 4 sd/qa/unit/export-tests-ooxml1.cxx | 2 sd/qa/unit/export-tests-ooxml2.cxx | 4 sd/qa/unit/export-tests.cxx | 6 - sd/qa/unit/import-tests-smartart.cxx | 2 sd/qa/unit/import-tests.cxx | 8 - sd/qa/unit/import-tests2.cxx | 6 - sd/source/core/CustomAnimationPreset.cxx | 4 sd/source/core/TransitionPreset.cxx | 2 sd/source/filter/eppt/pptx-animations-nodectx.cxx | 2 sd/source/filter/eppt/pptx-epptooxml.cxx | 2 sd/source/filter/ppt/pptinanimations.cxx | 2 sd/source/filter/sdpptwrp.cxx | 2 sd/source/ui/dlg/tpaction.cxx | 2 sd/source/ui/framework/factories/ViewShellWrapper.cxx | 2 sd/source/ui/unoidl/SdUnoSlideView.cxx | 2 sd/source/ui/unoidl/unoobj.cxx | 2 sdext/source/minimizer/fileopendialog.cxx | 2 sdext/source/minimizer/impoptimizer.cxx | 2 sfx2/source/appl/appserv.cxx | 4 sfx2/source/appl/fileobj.cxx | 2 sfx2/source/bastyp/fltfnc.cxx | 6 - sfx2/source/commandpopup/CommandPopup.cxx | 2 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx | 2 sfx2/source/dialog/dinfdlg.cxx | 10 - sfx2/source/dialog/dockwin.cxx | 2 sfx2/source/dialog/filedlghelper.cxx | 2 sfx2/source/dialog/mailmodel.cxx | 2 sfx2/source/doc/docfac.cxx | 2 sfx2/source/doc/docfile.cxx | 2 sfx2/source/doc/doctemplates.cxx | 2 sfx2/source/doc/objserv.cxx | 2 sfx2/source/doc/objstor.cxx | 2 sfx2/source/doc/sfxbasemodel.cxx | 2 sfx2/source/doc/watermarkitem.cxx | 2 sfx2/source/doc/zoomitem.cxx | 2 sfx2/source/notebookbar/NotebookbarTabControl.cxx | 2 sfx2/source/notify/eventsupplier.cxx | 4 sfx2/source/sidebar/ResourceManager.cxx | 2 sfx2/source/view/sfxbasecontroller.cxx | 2 shell/source/cmdmail/cmdmailsuppl.cxx | 6 - starmath/source/unomodel.cxx | 2 stoc/source/defaultregistry/defaultregistry.cxx | 4 stoc/source/implementationregistration/implreg.cxx | 4 stoc/source/inspect/introspection.cxx | 2 svl/source/items/grabbagitem.cxx | 2 svl/source/numbers/zforlist.cxx | 2 svtools/source/dialogs/addresstemplate.cxx | 4 svtools/source/dialogs/colrdlg.cxx | 4 svtools/source/filter/SvFilterOptionsDialog.cxx | 4 svtools/source/misc/imagemgr.cxx | 2 svtools/source/uno/unoevent.cxx | 2 svx/qa/unit/customshapes.cxx | 8 - svx/qa/unit/gluepointTest.cxx | 4 svx/source/accessibility/lookupcolorname.cxx | 2 svx/source/core/graphichelper.cxx | 2 svx/source/customshapes/EnhancedCustomShape2d.cxx | 4 svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 2 svx/source/dialog/svxbmpnumvalueset.cxx | 2 svx/source/fmcomp/fmgridcl.cxx | 2 svx/source/fmcomp/gridcell.cxx | 8 - svx/source/form/databaselocationinput.cxx | 2 svx/source/form/fmexch.cxx | 2 svx/source/form/fmshimp.cxx | 2 svx/source/form/formcontroller.cxx | 10 - svx/source/gallery2/galbrws2.cxx | 2 svx/source/items/galleryitem.cxx | 2 svx/source/items/statusitem.cxx | 2 svx/source/items/viewlayoutitem.cxx | 2 svx/source/items/zoomslideritem.cxx | 2 svx/source/mnuctrls/smarttagmenu.cxx | 2 svx/source/smarttags/SmartTagMgr.cxx | 2 svx/source/svdraw/svdogrp.cxx | 2 svx/source/unogallery/unogalthemeprovider.cxx | 2 svx/source/xoutdev/xattr.cxx | 6 - svx/source/xoutdev/xattrbmp.cxx | 2 sw/qa/extras/globalfilter/globalfilter.cxx | 4 sw/qa/extras/htmlimport/htmlimport.cxx | 4 sw/qa/extras/odfexport/odfexport2.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx | 4 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 12 +- sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 2 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 2 sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 4 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 2 sw/qa/extras/rtfexport/rtfexport.cxx | 6 - sw/qa/extras/rtfexport/rtfexport2.cxx | 2 sw/qa/extras/rtfexport/rtfexport7.cxx | 4 sw/qa/extras/uiwriter/uiwriter.cxx | 2 sw/source/core/crsr/DropDownFormFieldButton.cxx | 2 sw/source/core/crsr/bookmark.cxx | 2 sw/source/core/edit/edfcol.cxx | 4 sw/source/core/fields/authfld.cxx | 2 sw/source/core/unocore/unochart.cxx | 8 - sw/source/core/unocore/unocrsrhelper.cxx | 2 sw/source/core/unocore/unoframe.cxx | 2 sw/source/core/unocore/unoidx.cxx | 2 sw/source/core/unocore/unoobj.cxx | 2 sw/source/filter/ww8/docxattributeoutput.cxx | 20 +-- sw/source/filter/ww8/docxexport.cxx | 22 +-- sw/source/filter/ww8/docxtablestyleexport.cxx | 2 sw/source/filter/ww8/rtfattributeoutput.cxx | 2 sw/source/filter/ww8/rtfexport.cxx | 2 sw/source/filter/ww8/wrtww8.cxx | 2 sw/source/filter/ww8/ww8par.cxx | 2 sw/source/filter/xml/xmlimp.cxx | 4 sw/source/ui/dbui/addresslistdialog.cxx | 2 sw/source/ui/dbui/dbinsdlg.cxx | 2 sw/source/ui/dbui/mmaddressblockpage.cxx | 6 - sw/source/ui/dbui/mmresultdialogs.cxx | 2 sw/source/ui/fldui/DropDownFormFieldDialog.cxx | 2 sw/source/ui/index/swuiidxmrk.cxx | 2 sw/source/uibase/dbui/dbtree.cxx | 2 sw/source/uibase/lingu/olmenu.cxx | 4 sw/source/uibase/misc/numberingtypelistbox.cxx | 2 sw/source/uibase/uno/unomailmerge.cxx | 2 test/source/sheet/xfunctiondescriptions.cxx | 2 toolkit/source/awt/vclxtoolkit.cxx | 4 toolkit/source/awt/vclxwindow1.cxx | 2 toolkit/source/controls/geometrycontrolmodel.cxx | 2 toolkit/source/controls/stdtabcontroller.cxx | 4 toolkit/source/controls/unocontrolmodel.cxx | 6 - ucb/source/cacher/cachedcontentresultset.cxx | 4 ucb/source/ucp/cmis/cmis_content.cxx | 2 ucb/source/ucp/file/filnot.cxx | 2 unotools/source/config/compatibility.cxx | 4 unotools/source/config/configitem.cxx | 2 unotools/source/config/eventcfg.cxx | 2 unotools/source/config/lingucfg.cxx | 2 unotools/source/config/moduleoptions.cxx | 2 unotools/source/ucbhelper/progresshandlerwrap.cxx | 2 vbahelper/source/vbahelper/vbashape.cxx | 2 vbahelper/source/vbahelper/vbashapes.cxx | 2 vcl/osx/OSXTransferable.cxx | 2 vcl/osx/printaccessoryview.mm | 4 vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx | 2 vcl/qt5/QtFilePicker.cxx | 2 vcl/source/filter/png/PngImageWriter.cxx | 2 vcl/source/gdi/print3.cxx | 2 vcl/source/graphic/UnoGraphicProvider.cxx | 2 vcl/source/window/NotebookBarAddonsMerger.cxx | 3 vcl/source/window/printdlg.cxx | 4 vcl/unx/gtk3/a11y/atktextattributes.cxx | 2 vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx | 4 vcl/win/dtrans/DOTransferable.cxx | 2 writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 2 writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 - writerfilter/source/dmapper/PropertyMap.cxx | 4 writerfilter/source/rtftok/rtfsdrimport.cxx | 2 writerperfect/qa/unit/WpftLoader.cxx | 2 writerperfect/source/writer/EPUBExportFilter.cxx | 2 xmloff/qa/unit/draw.cxx | 4 xmloff/source/chart/SchXMLExport.cxx | 8 - xmloff/source/chart/SchXMLPlotAreaContext.cxx | 2 xmloff/source/chart/SchXMLSeries2Context.cxx | 2 xmloff/source/core/SettingsExportHelper.cxx | 2 xmloff/source/draw/sdxmlexp.cxx | 2 xmloff/source/draw/shapeexport.cxx | 18 +-- xmloff/source/draw/ximpshap.cxx | 2 xmloff/source/forms/elementexport.cxx | 4 xmloff/source/forms/propertyexport.cxx | 2 xmloff/source/style/styleexp.cxx | 2 xmloff/source/style/xmltabe.cxx | 2 xmloff/source/text/XMLRedlineExport.cxx | 2 xmloff/source/text/XMLSectionExport.cxx | 4 xmloff/source/text/txtflde.cxx | 4 xmloff/source/text/txtfldi.cxx | 2 xmloff/source/text/txtparae.cxx | 4 xmloff/source/xforms/xformsimport.cxx | 2 xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 4 xmlsecurity/source/dialogs/certificatechooser.cxx | 2 xmlsecurity/source/helper/documentsignaturemanager.cxx | 2 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 2 314 files changed, 536 insertions(+), 537 deletions(-)
New commits: commit 0fa827dbb2147d1d3850b2181eb6ab6a02a04500 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Jan 27 15:42:54 2024 +0600 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Jan 27 12:43:48 2024 +0100 Drop std::as_const from css::uno::Sequence iterations Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/basctl/source/dlged/dlgedclip.cxx b/basctl/source/dlged/dlgedclip.cxx index 931f10afe507..264e42c835b4 100644 --- a/basctl/source/dlged/dlgedclip.cxx +++ b/basctl/source/dlged/dlgedclip.cxx @@ -90,7 +90,7 @@ sal_Bool SAL_CALL DlgEdTransferableImpl::isDataFlavorSupported( const DataFlavor { const SolarMutexGuard aGuard; - for ( auto const & i : std::as_const(m_SeqFlavors) ) + for (auto const& i : m_SeqFlavors) if ( compareDataFlavors( i, rFlavor ) ) return true; return false; diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 523bbbf14ac5..2bd3bcfb2f80 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -772,7 +772,7 @@ void Bridge::handleCommitChangeRequest( css::uno::Sequence< css::bridge::ProtocolProperty > s; [[maybe_unused]] bool ok = (mapBinaryToCppAny(inArguments[0]) >>= s); assert(ok); - for (const auto & pp : std::as_const(s)) { + for (const auto & pp : s) { if (pp.Name == "CurrentContext") { bCcMode = true; } else { diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 6958876b1d7d..81ed060e7acb 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -473,7 +473,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsGrabBag) const char* const testEmbeddedFileNames[] {"word/embeddings/Microsoft_Excel_Worksheet3.xlsx", "word/embeddings/Microsoft_Excel_Worksheet2.xlsx", "word/embeddings/Microsoft_Excel_Worksheet1.xlsx"}; - for(beans::PropertyValue const & prop : std::as_const(aGrabBag)) + for (beans::PropertyValue const& prop : aGrabBag) { if (prop.Name == "OOXEmbeddings") { @@ -1142,7 +1142,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, testEmbeddingsOleObjectGrabBag) CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty bool bEmbeddings = false; const char* const testEmbeddedFileNames[] = {"word/embeddings/oleObject1.bin"}; - for(beans::PropertyValue const & prop : std::as_const(aGrabBag)) + for (beans::PropertyValue const& prop : aGrabBag) { if (prop.Name == "OOXEmbeddings") { diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index 4e3e4bb75987..2e3988267c77 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -127,7 +127,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) m_xED_CrossesAtCategory->set_visible( m_bCrossingAxisIsCategoryAxis ); if (m_bCrossingAxisIsCategoryAxis) { - for( auto const & cat : std::as_const(m_aCategories) ) + for (auto const& cat : m_aCategories) m_xED_CrossesAtCategory->append_text(cat); } diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 3da0b398c893..2b194051a1f2 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -257,7 +257,7 @@ DataPointItemConverter::DataPointItemConverter( uno::Sequence<sal_Int32> deletedLegendEntriesSeq; // "DeletedLegendEntries" xSeries->getFastPropertyValue(PROP_DATASERIES_DELETED_LEGEND_ENTRIES) >>= deletedLegendEntriesSeq; - for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq)) + for (const auto& deletedLegendEntry : deletedLegendEntriesSeq) { if (nPointIndex == deletedLegendEntry) { @@ -580,7 +580,7 @@ bool DataPointItemConverter::ApplySpecialItem( // "DeletedLegendEntries" m_xSeries->getFastPropertyValue(PROP_DATASERIES_DELETED_LEGEND_ENTRIES) >>= deletedLegendEntriesSeq; std::vector<sal_Int32> deletedLegendEntries; - for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq)) + for (const auto& deletedLegendEntry : deletedLegendEntriesSeq) { if (bHideLegendEntry || m_nPointIndex != deletedLegendEntry) deletedLegendEntries.push_back(deletedLegendEntry); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 1b2b3654c201..0cb2a0ad234d 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1070,8 +1070,8 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) { if( bIsPoint ) { - auto aIt = std::find( std::as_const(aAttributedDataPointIndexList).begin(), std::as_const(aAttributedDataPointIndexList).end(), nPointIndex ); - if( aIt != std::as_const(aAttributedDataPointIndexList).end()) + auto aIt = std::find( aAttributedDataPointIndexList.begin(), aAttributedDataPointIndexList.end(), nPointIndex ); + if (aIt != aAttributedDataPointIndexList.end()) bSelectedPointIsFormatted = true; else bHasFormattedDataPointsOtherThanSelected = true; diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 44846850dcc8..f66efd82ea2c 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -230,7 +230,7 @@ void ObjectHierarchy::createAxesTree( std::vector< rtl::Reference< Axis > > aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram, /* bOnlyVisible = */ true ); if( !m_bOrderingForElementSelector ) { - for (const auto & rAxis : std::as_const(aAxes)) + for (const auto& rAxis : aAxes) rContainer.push_back( ObjectIdentifier::createClassifiedIdentifierForObject( rAxis, xChartDoc ) ); } diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 49c93766cd53..670391422a85 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -218,7 +218,7 @@ void ChartTypeTemplate::changeDiagram( const rtl::Reference< Diagram >& xDiagram aSeriesSeq = aData.Series; sal_Int32 nIndex = 0; - for( auto const & i : std::as_const(aSeriesSeq) ) + for (auto const& i : aSeriesSeq) for( auto const & j : i ) { if( nIndex >= nFormerSeriesCount ) diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index e4300dd01f7b..07e150bf64d3 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -446,7 +446,7 @@ void PieChartTypeTemplate::applyStyle2( { fOffsetToSet = 0.0; bSetOffset = true; - for( auto const & pointIndex : std::as_const(aAttributedDataPointIndexList) ) + for (auto const& pointIndex : aAttributedDataPointIndexList) { uno::Reference< beans::XPropertySet > xPointProp( xSeries->getDataPointByIndex( pointIndex )); @@ -471,7 +471,7 @@ void PieChartTypeTemplate::applyStyle2( xSeries->setPropertyValue( aOffsetPropName, uno::Any( fOffsetToSet )); // remove hard attributes from data points - for( auto const & pointIndex : std::as_const(aAttributedDataPointIndexList) ) + for (auto const& pointIndex : aAttributedDataPointIndexList) { uno::Reference< beans::XPropertyState > xPointState( xSeries->getDataPointByIndex( pointIndex ), uno::UNO_QUERY ); diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 136191f66ade..dba33728b5aa 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -601,8 +601,8 @@ bool hasDataLabelAtPoint( const rtl::Reference< DataSeries >& xSeries, sal_Int32 // "AttributedDataPoints" if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList ) { - auto aIt = std::find( std::as_const(aAttributedDataPointIndexList).begin(), std::as_const(aAttributedDataPointIndexList).end(), nPointIndex ); - if( aIt != std::as_const(aAttributedDataPointIndexList).end()) + auto aIt = std::find( aAttributedDataPointIndexList.begin(), aAttributedDataPointIndexList.end(), nPointIndex ); + if (aIt != aAttributedDataPointIndexList.end()) xProp = xSeries->getDataPointByIndex(nPointIndex); else xProp = xSeries; diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx index b1ca0b429a7b..e8d4c1d1415e 100644 --- a/chart2/source/tools/ReferenceSizeProvider.cxx +++ b/chart2/source/tools/ReferenceSizeProvider.cxx @@ -111,7 +111,7 @@ void ReferenceSizeProvider::setValuesAtAllDataSeries() // "AttributedDataPoints" if( elem->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= aPointIndexes ) { - for( sal_Int32 idx : std::as_const(aPointIndexes) ) + for (sal_Int32 idx : aPointIndexes) setValuesAtPropertySet( elem->getDataPointByIndex( idx ) ); } @@ -274,7 +274,7 @@ ReferenceSizeProvider::AutoResizeState ReferenceSizeProvider::getAutoResizeState // "AttributedDataPoints" if( elem->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS) >>= aPointIndexes ) { - for( sal_Int32 idx : std::as_const(aPointIndexes) ) + for (sal_Int32 idx : aPointIndexes) { getAutoResizeFromPropSet( elem->getDataPointByIndex( idx ), eResult ); diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 948d5ef33f1f..ef13248bf0a6 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -598,7 +598,7 @@ rtl::Reference<SvxShapeText> VSeriesPlotter::createDataLabel( const rtl::Referen } } - for( auto const & line : std::as_const(aTextList) ) + for (auto const& line : aTextList) { if( !line.isEmpty() ) { @@ -2803,7 +2803,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( for( sal_Int32 nIdx=0; nIdx<aCategoryNames.getLength(); ++nIdx ) { bool deletedLegendEntry = false; - for (const auto& deletedLegendEntryIdx : std::as_const(deletedLegendEntries)) + for (const auto& deletedLegendEntryIdx : deletedLegendEntries) { if (nIdx == deletedLegendEntryIdx) { diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index f9efceb676a5..228d4b2a1156 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -2227,7 +2227,7 @@ rtl::Reference<SvxShapeText> if( xFormattedString.hasElements() ) { OUString aLabel; - for( const auto & i : std::as_const(xFormattedString) ) + for (const auto& i : xFormattedString) aLabel += i->getString(); aLabel = ShapeFactory::getStackedString( aLabel, bStackCharacters ); @@ -2249,7 +2249,7 @@ rtl::Reference<SvxShapeText> } else { - for( const uno::Reference< chart2::XFormattedString >& rxFS : std::as_const(xFormattedString) ) + for (const uno::Reference<chart2::XFormattedString>& rxFS : xFormattedString) { xTextCursor->gotoEnd(false); xShape->insertString( xTextCursor, rxFS->getString(), false ); diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index 87e1035aa015..0649c9c13fa5 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -411,7 +411,7 @@ namespace e.Context, anyEx ); } - for (const uno::Sequence< uno::Reference< deployment::XPackage > > & xPackageList : std::as_const(xAllPackages)) + for (const uno::Sequence< uno::Reference< deployment::XPackage > > & xPackageList : xAllPackages) { for (const uno::Reference< deployment::XPackage > & xPackage : xPackageList) { diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index 317a6092af75..bedd714bab49 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -203,7 +203,7 @@ OUString MimeConfigurationHelper::GetDocServiceNameFromFilter( const OUString& a uno::Sequence< beans::PropertyValue > aFilterData; if ( aFilterAnyData >>= aFilterData ) { - for ( const auto & prop : std::as_const(aFilterData) ) + for (const auto& prop : aFilterData) if ( prop.Name == "DocumentService" ) prop.Value >>= aDocServiceName; } @@ -234,7 +234,7 @@ OUString MimeConfigurationHelper::GetDocServiceNameFromMediaType( const OUString uno::Sequence< beans::PropertyValue > aType; if ( xEnum->nextElement() >>= aType ) { - for ( const auto & prop : std::as_const(aType) ) + for (const auto& prop : aType) { OUString aFilterName; if ( prop.Name == "PreferredFilter" @@ -565,7 +565,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( { OUString aFilterName; - for ( const auto & prop : std::as_const(aMediaDescr) ) + for (const auto& prop : aMediaDescr) if ( prop.Name == "FilterName" ) prop.Value >>= aFilterName; @@ -584,7 +584,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( OUString aTypeName = xTypeDetection->queryTypeByDescriptor(aTempMD, bAllowDeepDetection); // get FilterName - for ( const auto & prop : std::as_const(aTempMD) ) + for (const auto& prop : aTempMD) if ( prop.Name == "FilterName" ) prop.Value >>= aFilterName; @@ -604,7 +604,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( if ( xNameAccess.is() && ( xNameAccess->getByName( aTypeName ) >>= aTypes ) ) { - for ( const auto & prop : std::as_const(aTypes) ) + for (const auto& prop : aTypes) { if ( prop.Name == "PreferredFilter" && ( prop.Value >>= aFilterName ) ) { @@ -628,7 +628,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( uno::Sequence< beans::NamedValue >& aObject ) { OUString aDocName; - for ( const auto & nv : std::as_const(aObject) ) + for (const auto& nv : aObject) if ( nv.Name == "ObjectDocumentServiceName" ) { nv.Value >>= aDocName; diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx index 09fe0949b0e9..3e7e281eb6aa 100644 --- a/configmgr/source/writemodfile.cxx +++ b/configmgr/source/writemodfile.cxx @@ -209,7 +209,7 @@ template< typename T > void writeListValue( if (i != 0) { handle.writeString(" "); } - writeValueContent_(handle, std::as_const(val)[i]); + writeValueContent_(handle, val[i]); } handle.writeString("</value>"); } @@ -220,7 +220,7 @@ template< typename T > void writeItemListValue( handle.writeString(">"); css::uno::Sequence< T > val; value >>= val; - for (const auto & i : std::as_const(val)) { + for (const auto & i : val) { handle.writeString("<it>"); writeValueContent_(handle, i); handle.writeString("</it>"); diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index df5ef04ee523..b8e45fb027e7 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -202,7 +202,7 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL auto [begin, end] = asNonConstRange(_rInfo); std::sort(begin,end,TPropertyValueLessFunctor()); - for (PropertyValue const & prop : std::as_const(_rInfo)) + for (PropertyValue const& prop : _rInfo) { // we only include strings an integer values OUString sValue; @@ -218,7 +218,7 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL Sequence< OUString> aSeq; if ( prop.Value >>= aSeq ) { - for(OUString const & s : std::as_const(aSeq)) + for (OUString const& s : aSeq) sha1.update(reinterpret_cast<unsigned char const*>(s.getStr()), s.getLength() * sizeof(sal_Unicode)); } } diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index ee80460621f5..5c5b4f60a017 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -343,7 +343,7 @@ void OSDBCDriverManager::initializeDriverPrecedence() // at the moment this is the first of all drivers we know // loop through the names in the precedence order - for ( const OUString& rDriverOrder : std::as_const(aDriverOrder) ) + for (const OUString& rDriverOrder : aDriverOrder) { if (aNoPrefDriversStart == m_aDriversBS.end()) break; diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx index 50a8be1f8436..c3c1ad0a66c8 100644 --- a/cppuhelper/source/propertysetmixin.cxx +++ b/cppuhelper/source/propertysetmixin.cxx @@ -176,7 +176,7 @@ void Data::initProperties( //XXX Special interpretation of getter/setter exceptions only // works if the specified exceptions are of the exact type, not // of a supertype: - for (const auto & ex : std::as_const(excs)) { + for (const auto & ex : excs) { if ( ex->getName() == "com.sun.star.beans.UnknownPropertyException" ) { bGetUnknown = true; @@ -184,7 +184,7 @@ void Data::initProperties( } } excs = attr->getSetExceptions(); - for (const auto & ex : std::as_const(excs)) { + for (const auto & ex : excs) { if ( ex->getName() == "com.sun.star.beans.UnknownPropertyException" ) { bSetUnknown = true; diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 7eccd274e7f4..cd981b8d1a87 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -1053,7 +1053,7 @@ void cppuhelper::ServiceManager::insert(css::uno::Any const & aElement) if (aElement >>= args) { std::vector< OUString > uris; css::uno::Reference< css::uno::XComponentContext > alienContext; - for (const auto & arg : std::as_const(args)) { + for (const auto & arg : args) { if (arg.Name == "uri") { OUString uri; if (!(arg.Value >>= uri)) { @@ -1097,7 +1097,7 @@ void cppuhelper::ServiceManager::remove(css::uno::Any const & aElement) css::uno::Sequence< css::beans::NamedValue > args; if (aElement >>= args) { std::vector< OUString > uris; - for (const auto & i : std::as_const(args)) { + for (const auto & i : args) { if (i.Name != "uri") { throw css::lang::IllegalArgumentException( "Bad argument " + i.Name, diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx index c14cb3560c9f..59a2cdb64017 100644 --- a/cui/source/customize/SvxConfigPageHelper.cxx +++ b/cui/source/customize/SvxConfigPageHelper.cxx @@ -248,7 +248,7 @@ OUString SvxConfigPageHelper::GetUIModuleName( if (a >>= aSeq) { - for (css::beans::PropertyValue const& rProp : std::as_const(aSeq)) + for (css::beans::PropertyValue const& rProp : aSeq) { if (rProp.Name == "ooSetupFactoryUIName") { @@ -282,7 +282,7 @@ bool SvxConfigPageHelper::GetMenuItemData( css::uno::Sequence<css::beans::PropertyValue> aProps; if (rItemContainer->getByIndex(nIndex) >>= aProps) { - for (css::beans::PropertyValue const& rProp : std::as_const(aProps)) + for (css::beans::PropertyValue const& rProp : aProps) { if (rProp.Name == ITEM_DESCRIPTOR_COMMANDURL) { @@ -325,7 +325,7 @@ bool SvxConfigPageHelper::GetToolbarItemData( css::uno::Sequence<css::beans::PropertyValue> aProps; if (rItemContainer->getByIndex(nIndex) >>= aProps) { - for (css::beans::PropertyValue const& rProp : std::as_const(aProps)) + for (css::beans::PropertyValue const& rProp : aProps) { if (rProp.Name == ITEM_DESCRIPTOR_COMMANDURL) { diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index f44bc70d3dc0..d41ecf389e59 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -217,7 +217,7 @@ void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId } OUString aLabel; - for (auto const& prop : std::as_const(aPropSeq)) + for (auto const& prop : aPropSeq) if (prop.Name == "Name") prop.Value >>= aLabel; diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index f8b452193c0a..ff5702121755 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -492,7 +492,7 @@ void SaveInData::LoadSubMenus( const uno::Reference< container::XIndexAccess >& if ( a >>= aPropSeq ) { OUString aMenuLabel; - for ( const beans::PropertyValue& prop : std::as_const(aPropSeq) ) + for (const beans::PropertyValue& prop : aPropSeq) { if ( bContextMenu ) { @@ -723,7 +723,7 @@ OUString ContextMenuSaveInData::GetUIName( const OUString& rResourceURL ) catch ( const css::uno::Exception& ) {} - for ( const auto& aProp : std::as_const(aProps) ) + for (const auto& aProp : aProps) { if ( aProp.Name == ITEM_DESCRIPTOR_UINAME ) { @@ -751,7 +751,7 @@ SvxEntries* ContextMenuSaveInData::GetEntries() catch ( const css::lang::IllegalArgumentException& ) {} - for ( const auto& aElement : std::as_const(aElementsInfo) ) + for (const auto& aElement : aElementsInfo) { OUString aUrl; for ( const auto& aElementProp : aElement ) @@ -799,7 +799,7 @@ SvxEntries* ContextMenuSaveInData::GetEntries() catch ( const css::lang::IllegalArgumentException& ) {} - for ( const auto& aElement : std::as_const(aParentElementsInfo) ) + for (const auto& aElement : aParentElementsInfo) { OUString aUrl; for ( const auto& aElementProp : aElement ) @@ -1203,7 +1203,7 @@ void SvxConfigPage::Reset( const SfxItemSet* ) DBG_UNHANDLED_EXCEPTION("cui.customize"); } - for ( uno::Reference < frame::XFrame > const & xf : std::as_const(aFrameList) ) + for (uno::Reference<frame::XFrame> const& xf : aFrameList) { if ( xf.is() && xf != m_xFrame ) { @@ -2001,7 +2001,7 @@ sal_Int32 ToolbarSaveInData::GetSystemStyle( const OUString& rResourceURL ) if ( a >>= aProps ) { - for ( beans::PropertyValue const & prop : std::as_const(aProps) ) + for (beans::PropertyValue const& prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_STYLE ) { @@ -2128,7 +2128,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) if ( a >>= aProps ) { - for ( beans::PropertyValue const & prop : std::as_const(aProps) ) + for (beans::PropertyValue const& prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_UINAME ) { @@ -2155,7 +2155,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL ) uno::Sequence< beans::PropertyValue > aPropSeq; if ( a >>= aPropSeq ) { - for ( beans::PropertyValue const & prop : std::as_const(aPropSeq) ) + for (beans::PropertyValue const& prop : aPropSeq) { if ( prop.Name == ITEM_DESCRIPTOR_LABEL ) { @@ -2657,7 +2657,7 @@ void ToolbarSaveInData::LoadToolbar( uno::Sequence< beans::PropertyValue > aPropSeq; if ( a >>= aPropSeq ) { - for ( beans::PropertyValue const & prop : std::as_const(aPropSeq) ) + for (beans::PropertyValue const& prop : aPropSeq) { if ( prop.Name == "Name" ) { diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 54cdc56d26e1..67bb456b7d61 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -147,7 +147,7 @@ void SvxScriptOrgDialog::Init( std::u16string_view language ) } Reference<XModel> xDocumentModel; - for ( const Reference< browse::XBrowseNode >& childNode : std::as_const(children) ) + for (const Reference<browse::XBrowseNode>& childNode : children) { bool app = false; OUString uiName = childNode->getName(); @@ -178,7 +178,7 @@ void SvxScriptOrgDialog::Init( std::u16string_view language ) } catch(const uno::Exception&) {} - for ( const beans::PropertyValue& prop : std::as_const(moduleDescr)) + for (const beans::PropertyValue& prop : moduleDescr) { if ( prop.Name == "ooSetupFactoryEmptyDocumentURL" ) { @@ -278,7 +278,7 @@ void SvxScriptOrgDialog::RequestSubEntries(const weld::TreeIter& rRootEntry, Ref // if we catch an exception in getChildNodes then no entries are added } - for ( const Reference< browse::XBrowseNode >& childNode : std::as_const(children) ) + for (const Reference<browse::XBrowseNode>& childNode : children) { OUString name( childNode->getName() ); if ( childNode->getType() != browse::BrowseNodeTypes::SCRIPT) @@ -751,7 +751,7 @@ void SvxScriptOrgDialog::createEntry(const weld::TreeIter& rEntry) if(extnPos>0) extn = nodeName.copy(extnPos); } - for( const Reference< browse::XBrowseNode >& n : std::as_const(childNodes) ) + for (const Reference<browse::XBrowseNode>& n : childNodes) { if (Concat2View(aNewName+extn) == n->getName()) { @@ -778,7 +778,7 @@ void SvxScriptOrgDialog::createEntry(const weld::TreeIter& rEntry) { OUString aUserSuppliedName = aNewDlg.GetObjectName(); bValid = true; - for( const Reference< browse::XBrowseNode >& n : std::as_const(childNodes) ) + for (const Reference<browse::XBrowseNode>& n : childNodes) { if (Concat2View(aUserSuppliedName+extn) == n->getName()) { diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index 91526e587cbd..5cccccf1995c 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -60,7 +60,7 @@ void CertPathDialog::Init() "thunderbird" }; - for (const auto& rNSSProfile : std::as_const(aProductList)) + for (const auto& rNSSProfile : aProductList) { if (rNSSProfile.Type == mozilla::MozillaProductType_Default) { diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index f95015c03025..4ec9bd987462 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -647,7 +647,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() : } Sequence< OUString > aCfgSvcs; - for(auto const & locale : std::as_const(aAllServiceLocales)) + for (auto const& locale : aAllServiceLocales) { LanguageType nLang = LanguageTag::convertToLanguageType( locale ); diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index a94560f1b0c4..79f0b210e4ea 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -453,7 +453,7 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl if (xSetInfo.is()) aProperties = xSetInfo->getProperties(); - for ( const Property& rProperty : std::as_const(aProperties) ) + for (const Property& rProperty : aProperties) { if ( ( ( rProperty.Attributes & PropertyAttribute::TRANSIENT) != 0 ) && ( ( rProperty.Attributes & PropertyAttribute::READONLY) == 0 ) diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 180ecff77766..fbb0ac1bd86b 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -798,7 +798,7 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any & if (!(rValue >>= aValues)) throw IllegalArgumentException(); - for ( auto const & checkName : std::as_const(aValues) ) + for (auto const& checkName : aValues) { if ( checkName.Name.isEmpty() ) throw IllegalArgumentException(); diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index cee5e04a04f4..13d0887b0caa 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -596,7 +596,7 @@ template< typename T > void ODBExport::exportDataSourceSettingsSequence( css::uno::Sequence<T> anySeq; bool bSuccess = in->Value >>= anySeq; assert(bSuccess); (void)bSuccess; - for (T const & i : std::as_const(anySeq) ) + for (T const& i : anySeq) { SvXMLElementExport aDataValue(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_VALUE, true, false); // (no whitespace inside the tag) diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index a34e67a241f2..dbad8365ffbf 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -158,7 +158,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const css::util::URL& aURL, con // set its properties if (xNewColProperties.is()) { - for (const css::beans::PropertyValue& rControlProp : std::as_const(aControlProps)) + for (const css::beans::PropertyValue& rControlProp : aControlProps) { try { diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 94cdee5a9f05..a2e6d009fc78 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -613,7 +613,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr // collect the names of the additional settings PropertyValueSet aInfos; - for (const PropertyValue& rAdditionalInfo : std::as_const(aAdditionalInfo)) + for (const PropertyValue& rAdditionalInfo : aAdditionalInfo) { if( rAdditionalInfo.Name == "JDBCDRV" ) { // compatibility diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index d08e1f076d26..a6474645b374 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -882,7 +882,7 @@ bool appendToFilter(const Reference<XConnection>& _xConnection, xProp->getPropertyValue(PROPERTY_TABLEFILTER) >>= aFilter; // first check if we have something like SCHEMA.% bool bHasToInsert = true; - for (const OUString& rItem : std::as_const(aFilter)) + for (const OUString& rItem : aFilter) { if(rItem.indexOf('%') != -1) { diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index 4a69a8cf79cc..58e2375c6537 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -261,7 +261,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext sal_Int32 const nMax = 2; #endif - for ( uno::Sequence< uno::Reference< deployment::XPackage > > const & xPackageList : std::as_const(xAllPackages) ) + for (uno::Sequence<uno::Reference<deployment::XPackage>> const& xPackageList : xAllPackages) { for ( sal_Int32 j = 0; (j<nMax) && (j < xPackageList.getLength()); ++j ) { diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index fd70b79822ca..c91ec4a0b132 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -363,7 +363,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & { std::vector< OUString > deps; deps.reserve(depExc.UnsatisfiedDependencies.getLength()); - for (auto const & i : std::as_const(depExc.UnsatisfiedDependencies)) + for (auto const& i : depExc.UnsatisfiedDependencies) { deps.push_back( dp_misc::Dependencies::getErrorText(i) ); } diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index e7f91f44abf0..7e8bb6a455eb 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -148,7 +148,7 @@ void Entry_Impl::checkDependencies() if ( e.Cause >>= depExc ) { OUStringBuffer aMissingDep( DpResId( RID_STR_ERROR_MISSING_DEPENDENCIES ) ); - for ( const auto& i : std::as_const(depExc.UnsatisfiedDependencies) ) + for (const auto& i : depExc.UnsatisfiedDependencies) { aMissingDep.append(" " + dp_misc::Dependencies::getErrorText(i)); diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index ac42a446c67c..8cf6623d9676 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -223,7 +223,7 @@ void TheExtensionManager::checkUpdates() e.Context, anyEx ); } - for ( auto const & i : std::as_const(xAllPackages) ) + for (auto const& i : xAllPackages) { uno::Reference< deployment::XPackage > xPackage = dp_misc::getExtensionWithHighestVersion(i); OSL_ASSERT(xPackage.is()); @@ -306,7 +306,7 @@ void TheExtensionManager::createPackageList() e.Context, anyEx ); } - for ( uno::Sequence< uno::Reference< deployment::XPackage > > const & xPackageList : std::as_const(xAllPackages) ) + for (uno::Sequence<uno::Reference<deployment::XPackage>> const& xPackageList : xAllPackages) { for ( uno::Reference< deployment::XPackage > const & xPackage : xPackageList ) { diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index cbaa66024596..52d5d4e91c23 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5933,9 +5933,9 @@ static char* getLanguages(const char* pCommand) boost::property_tree::ptree aTree; aTree.put("commandName", pCommand); boost::property_tree::ptree aValues; - for ( css::lang::Locale const & rLocale : std::as_const(aLocales) ) + for (css::lang::Locale const& rLocale : aLocales) addLocale(aValues, rLocale); - for ( css::lang::Locale const & rLocale : std::as_const(aGrammarLocales) ) + for (css::lang::Locale const& rLocale : aGrammarLocales) addLocale(aValues, rLocale); aTree.add_child("commandValues", aValues); std::stringstream aStream; @@ -7448,7 +7448,7 @@ static void preloadData() std::cerr << "Preloading dictionaries: "; css::uno::Reference<linguistic2::XSupportedLocales> xSpellLocales(xSpellChecker, css::uno::UNO_QUERY_THROW); uno::Sequence< css::lang::Locale > aLocales = xSpellLocales->getLocales(); - for (auto &it : std::as_const(aLocales)) + for (auto& it : aLocales) { std::cerr << LanguageTag::convertToBcp47(it) << " "; css::beans::PropertyValues aNone; @@ -7469,7 +7469,7 @@ static void preloadData() css::uno::Reference<linguistic2::XSupportedLocales> xThesLocales(xSpellChecker, css::uno::UNO_QUERY_THROW); aLocales = xThesLocales->getLocales(); std::cerr << "Preloading thesauri: "; - for (auto &it : std::as_const(aLocales)) + for (auto& it : aLocales) { std::cerr << LanguageTag::convertToBcp47(it) << " "; css::beans::PropertyValues aNone; @@ -7505,7 +7505,7 @@ static void preloadData() aLocales = xSpell->getLocales(); } - for (const auto& aLocale : std::as_const(aLocales)) + for (const auto& aLocale : aLocales) { //TODO: Add more types and cache more aggressively. For now this initializes the fontcache. using namespace ::com::sun::star::i18n::ScriptType; diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index b0728de61a7a..d6b52c806367 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -320,7 +320,7 @@ void MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigr supported_migration aSupportedMigration; aSupportedMigration.name = supportedVersion; aSupportedMigration.nPriority = nPriority; - for (OUString const & s : std::as_const(seqVersions)) + for (OUString const& s : seqVersions) aSupportedMigration.supported_versions.push_back(s.trim()); insertSorted( rAvailableMigrations, aSupportedMigration ); SAL_INFO( "desktop.migration", " available migration '" << aSupportedMigration.name << "'" ); @@ -347,31 +347,31 @@ migrations_vr MigrationImpl::readMigrationSteps(const OUString& rMigrationName) // read included files from current step description if (tmpAccess->getByName("IncludedFiles") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.includeFiles.push_back(rSeqEntry); } // excluded files... if (tmpAccess->getByName("ExcludedFiles") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.excludeFiles.push_back(rSeqEntry); } // included nodes... if (tmpAccess->getByName("IncludedNodes") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.includeConfig.push_back(rSeqEntry); } // excluded nodes... if (tmpAccess->getByName("ExcludedNodes") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.excludeConfig.push_back(rSeqEntry); } // excluded extensions... if (tmpAccess->getByName("ExcludedExtensions") >>= tmpSeq) { - for (const OUString& rSeqEntry : std::as_const(tmpSeq)) + for (const OUString& rSeqEntry : tmpSeq) tmpStep.excludeExtensions.push_back(rSeqEntry); } @@ -977,7 +977,7 @@ void MigrationImpl::compareOldAndNewConfig(const OUString& sParent, for (int n=0; n<nOldCount; ++n) { MigrationItem aMigrationItem; if (xIndexOld->getByIndex(n) >>= aProps) { - for(beans::PropertyValue const & prop : std::as_const(aProps)) { + for(beans::PropertyValue const & prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_COMMANDURL ) prop.Value >>= aMigrationItem.m_sCommandURL; else if ( prop.Name == ITEM_DESCRIPTOR_CONTAINER ) @@ -992,7 +992,7 @@ void MigrationImpl::compareOldAndNewConfig(const OUString& sParent, for (int n=0; n<nNewCount; ++n) { MigrationItem aMigrationItem; if (xIndexNew->getByIndex(n) >>= aProps) { - for(beans::PropertyValue const & prop : std::as_const(aProps)) { + for(beans::PropertyValue const & prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_COMMANDURL ) prop.Value >>= aMigrationItem.m_sCommandURL; else if ( prop.Name == ITEM_DESCRIPTOR_CONTAINER ) @@ -1059,7 +1059,7 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat uno::Sequence< beans::PropertyValue > aPropSeq; xTemp->getByIndex(i) >>= aPropSeq; - for (beans::PropertyValue const & prop : std::as_const(aPropSeq)) { + for (beans::PropertyValue const & prop : aPropSeq) { OUString sPropName = prop.Name; if ( sPropName == ITEM_DESCRIPTOR_COMMANDURL ) prop.Value >>= sCommandURL; @@ -1094,7 +1094,7 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat OUString sCmd; uno::Sequence< beans::PropertyValue > aTempPropSeq; xTemp->getByIndex(i) >>= aTempPropSeq; - for (beans::PropertyValue const & prop : std::as_const(aTempPropSeq)) { + for (beans::PropertyValue const & prop : aTempPropSeq) { if ( prop.Name == ITEM_DESCRIPTOR_COMMANDURL ) { prop.Value >>= sCmd; break; @@ -1154,7 +1154,7 @@ uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewToolbarSett if (newProp.Name == sModuleShortName) { uno::Sequence< beans::PropertyValue > lToolbarSettingsSeq; newProp.Value >>= lToolbarSettingsSeq; - for (auto const & prop : std::as_const(lToolbarSettingsSeq)) { + for (auto const & prop : lToolbarSettingsSeq) { if (prop.Name == sToolbarName) { prop.Value >>= xNewToolbarSettings; break; diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index a4d0ca950b92..e504d0fa29a7 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -2384,7 +2384,7 @@ namespace accessibility uno::Sequence< beans::PropertyValue > aOutSequence( aProperties.getLength() ); beans::PropertyValue* pOutSequence = aOutSequence.getArray(); sal_Int32 nOutLen = 0; - for (const beans::Property& rProperty : std::as_const(aProperties)) + for (const beans::Property& rProperty : aProperties) { // calling implementation functions: // _getPropertyState and _getPropertyValue (see below) to provide @@ -2470,7 +2470,7 @@ namespace accessibility uno::Sequence< beans::PropertyValue > aOutSequence( aProperties.getLength() ); beans::PropertyValue* pOutSequence = aOutSequence.getArray(); sal_Int32 nOutLen = 0; - for (const beans::Property& rProperty : std::as_const(aProperties)) + for (const beans::Property& rProperty : aProperties) { // calling 'regular' functions that will operate on the selection PropertyState eState = xPropSet->getPropertyState( rProperty.Name ); diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index ef627941921e..0b3843852e58 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -513,7 +513,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) StateChangeNotification_Impl( true, nOldState, nNewState,aGuard ); try { - for ( sal_Int32 state : std::as_const(aIntermediateStates) ) + for (sal_Int32 state : aIntermediateStates) SwitchStateTo_Impl( state ); SwitchStateTo_Impl( nNewState ); diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 3ccaafcdc286..f34a35a2c1ac 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -140,7 +140,7 @@ void OCommonEmbeddedObject::CommonInit_Impl( const uno::Sequence< beans::NamedVa throw uno::RuntimeException(); // something goes really wrong // verbs table - for ( auto const & verb : std::as_const(m_aObjectVerbs) ) + for (auto const& verb : m_aObjectVerbs) { if ( verb.VerbID == embed::EmbedVerbs::MS_OLEVERB_PRIMARY ) { diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 1460b31fd54b..cdc6d94b351b 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -275,7 +275,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // check if there is URL, URL must exist OUString aURL; - for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) ) + for (beans::PropertyValue const& prop : aTempMedDescr) if ( prop.Name == "URL" ) prop.Value >>= aURL; @@ -332,7 +332,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Sequence< beans::PropertyValue > aTempMedDescr( lArguments ); OUString aURL; - for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) ) + for (beans::PropertyValue const& prop : aTempMedDescr) if ( prop.Name == "URL" ) prop.Value >>= aURL; diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 824ee2c1d4c9..08ad9cfdd271 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -561,7 +561,7 @@ void DocumentHolder::FindConnectPoints( uno::Sequence< beans::PropertyValue > aProps; xMenu->getByIndex( nInd ) >>= aProps; OUString aCommand; - for ( beans::PropertyValue const & prop : std::as_const(aProps) ) + for (beans::PropertyValue const& prop : aProps) if ( prop.Name == "CommandURL" ) { prop.Value >>= aCommand; diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index c9151827a65f..bceaab63c752 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -349,7 +349,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // check if there is URL, URL must exist OUString aURL; - for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) ) + for (beans::PropertyValue const& prop : aTempMedDescr) if ( prop.Name == "URL" ) prop.Value >>= aURL; diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index f981a4304656..a38f59550c5e 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -248,7 +248,7 @@ bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium, if ( pBuf && !bAnyIsReady ) { - for ( auto const & supportedFormat : std::as_const(m_aSupportedGraphFormats) ) + for (auto const& supportedFormat : m_aSupportedGraphFormats) if ( aFlavor.MimeType.match( supportedFormat.MimeType ) && aFlavor.DataType == supportedFormat.DataType && aFlavor.DataType == cppu::UnoType<uno::Sequence< sal_Int8 >>::get() ) @@ -266,7 +266,7 @@ bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium, bool OleComponentNative_Impl::GraphicalFlavor( const datatransfer::DataFlavor& aFlavor ) { // Actually all the required graphical formats must be supported - for ( auto const & supportedFormat : std::as_const(m_aSupportedGraphFormats) ) + for (auto const& supportedFormat : m_aSupportedGraphFormats) if ( aFlavor.MimeType.match( supportedFormat.MimeType ) && aFlavor.DataType == supportedFormat.DataType ) return true; @@ -1559,7 +1559,7 @@ sal_Bool SAL_CALL OleComponent::isDataFlavorSupported( const datatransfer::DataF RetrieveObjectDataFlavors_Impl(); } - for ( auto const & supportedFormat : std::as_const(m_aDataFlavors) ) + for (auto const& supportedFormat : m_aDataFlavors) if ( supportedFormat.MimeType.equals( aFlavor.MimeType ) && supportedFormat.DataType == aFlavor.DataType ) return true; diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 2bc6cdb6066b..8379a78693f1 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -277,7 +277,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >& uno::Sequence< beans::PropertyValue > aFilterData; if ( aFilterAnyData >>= aFilterData ) { - for ( beans::PropertyValue const & prop : std::as_const(aFilterData) ) + for (beans::PropertyValue const& prop : aFilterData) if ( prop.Name == "DocumentService" ) prop.Value >>= aDocServiceName; } diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index 5576f8633cce..66dcab3b45fd 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -207,7 +207,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream( aTypeName = xTypeDetection->queryTypeByDescriptor( aArgs, true ); OUString aFilterName; - for ( beans::PropertyValue const & prop : std::as_const(aArgs) ) + for (beans::PropertyValue const& prop : aArgs) if ( prop.Name == "FilterName" ) prop.Value >>= aFilterName; @@ -219,7 +219,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream( if ( xNameAccess.is() && ( xNameAccess->getByName( aTypeName ) >>= aTypes ) ) { - for ( beans::PropertyValue const & prop : std::as_const(aTypes) ) + for (beans::PropertyValue const& prop : aTypes) { if ( prop.Name == "PreferredFilter" && ( prop.Value >>= aFilterName ) ) { diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 12300b856517..829db69b91d4 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -918,7 +918,7 @@ void DocumentHolder::setTitle(const OUString& aDocumentName) if(m_xDocument.is()) { aSeq = m_xDocument->getArgs(); - for(beans::PropertyValue const & prop : std::as_const(aSeq)) + for (beans::PropertyValue const& prop : aSeq) { if(prop.Name == "FilterName") { @@ -937,7 +937,7 @@ void DocumentHolder::setTitle(const OUString& aDocumentName) if(xNameAccess.is() && (xNameAccess->getByName(aFilterName) >>= aSeq)) { - for(beans::PropertyValue const & prop : std::as_const(aSeq)) + for (beans::PropertyValue const& prop : aSeq) if(prop.Name == "UIName") { prop.Value >>= m_aFilterName; diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx index 0f1566fd780d..d321bbfa476c 100644 --- a/embedserv/source/embed/intercept.cxx +++ b/embedserv/source/embed/intercept.cxx @@ -233,7 +233,7 @@ void Interceptor::generateFeatureStateEvent() } - for(uno::Reference<css::frame::XStatusListener> const & control : std::as_const(aSeq)) + for (uno::Reference<css::frame::XStatusListener> const& control : aSeq) control->statusChanged(aStateEvent); } } diff --git a/extensions/qa/bibliography/bibliography.cxx b/extensions/qa/bibliography/bibliography.cxx index af68ee95eb70..3919b787f3fe 100644 --- a/extensions/qa/bibliography/bibliography.cxx +++ b/extensions/qa/bibliography/bibliography.cxx @@ -39,7 +39,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBibliographyLoader) // Without the accompanying fix in place, this test would have failed, as the last column // (LOCAL_URL) had an empty field name: - for (const auto& rPair : std::as_const(aSeq)) + for (const auto& rPair : aSeq) { CPPUNIT_ASSERT(!rPair.Name.isEmpty()); } diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index cba844932134..92a4c6843ec1 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -851,7 +851,7 @@ bool BibGeneralPage::AddXControl(const OUString& rName, weld::ComboBox& rList) { css::uno::Sequence<OUString> aEntries; xPropSet->getPropertyValue("StringItemList") >>= aEntries; - for (const OUString& rString : std::as_const(aEntries)) + for (const OUString& rString : aEntries) rList.append_text(rString); sal_Int16 nSelection = -1; diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 85f410c54604..160b094acb64 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -1550,7 +1550,7 @@ TypeDescription IUnknownWrapper::getInterfaceMemberDescOfCurrentCall(std::u16str { TypeDescription ret; - for( auto const & rType : std::as_const(m_seqTypes) ) + for (auto const& rType : m_seqTypes) { TypeDescription _curDesc( rType ); _curDesc.makeComplete(); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index ef79ad923001..40514f8016dd 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -278,7 +278,7 @@ namespace pcr aResolvedStrings.reserve( aStrings.getLength() ); try { - for ( const OUString& rIdStr : std::as_const(aStrings) ) + for (const OUString& rIdStr : aStrings) { OUString aPureIdStr = rIdStr.copy( 1 ); if( xStringResourceResolver->hasEntryForId( aPureIdStr ) ) @@ -331,7 +331,7 @@ namespace pcr if( ! (_rValue >>= aFontPropertyValues) ) SAL_WARN("extensions.propctrlr", "setPropertyValue: unable to get property " << PROPERTY_ID_FONT); - for ( const NamedValue& fontPropertyValue : std::as_const(aFontPropertyValues) ) + for (const NamedValue& fontPropertyValue : aFontPropertyValues) m_xComponent->setPropertyValue( fontPropertyValue.Name, fontPropertyValue.Value ); } else @@ -444,7 +444,7 @@ namespace pcr aValue <<= aNewIdStrings; // Remove old ids from resource for all locales - for( const OUString& rIdStr : std::as_const(aOldIdStrings) ) + for (const OUString& rIdStr : aOldIdStrings) { OUString aPureIdStr = rIdStr.copy( 1 ); for ( const Locale& rLocale : aLocaleSeq ) diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index cf359bc152d8..322bc3405143 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -458,7 +458,7 @@ namespace pcr aProperties = xPSI->getProperties(); DBG_ASSERT( aProperties.hasElements(), "GenericPropertyHandler::getSupportedProperties: no properties!" ); - for ( auto const & property : std::as_const(aProperties) ) + for (auto const& property : aProperties) { switch ( property.Type.getTypeClass() ) { diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 836f5844e38d..296eb98d1129 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -1401,7 +1401,7 @@ namespace pcr if ( m_xModel.is() ) aHandlerFactories = m_xModel->getHandlerFactories(); - for ( auto const & handlerFactory : std::as_const(aHandlerFactories) ) + for (auto const& handlerFactory : aHandlerFactories) { if ( _rObjects.size() == 1 ) { // we're inspecting only one object -> one handler diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 299a4f215f49..a5c6429aee69 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -865,7 +865,7 @@ bool UpdateHandler::showWarning( const OUString &rWarningText, { uno::Sequence< uno::Reference< awt::XWindow > > xChildren = xMsgBoxCtrls->getWindows(); - for ( uno::Reference< awt::XWindow > const & child : std::as_const(xChildren) ) + for (uno::Reference<awt::XWindow> const& child : xChildren) { uno::Reference< awt::XVclWindowPeer > xMsgBoxCtrl( child, uno::UNO_QUERY ); if ( xMsgBoxCtrl.is() ) diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx index ee5843066ad5..224c4b2b0794 100644 --- a/filter/source/graphic/GraphicExportFilter.cxx +++ b/filter/source/graphic/GraphicExportFilter.cxx @@ -90,7 +90,7 @@ void GraphicExportFilter::gatherProperties( const uno::Sequence< beans::Property } } - for ( const beans::PropertyValue& rProp : std::as_const(maFilterDataSequence) ) + for (const beans::PropertyValue& rProp : maFilterDataSequence) { if ( rProp.Name == "PixelWidth" ) { diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 480b3dfe42f5..03346d727dc6 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -164,7 +164,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, if ( xPropInfo.is() && xPropInfo->hasPropertyByName( "InteropGrabBag" ) ) { xPropertySet->getPropertyValue( "InteropGrabBag" ) >>= aGrabBag; - for (const beans::PropertyValue& rProp : std::as_const(aGrabBag)) + for (const beans::PropertyValue& rProp : aGrabBag) { if (rProp.Name == "mso-edit-as") { diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx index c7dd241c2049..a5c9e8aaa007 100644 --- a/filter/source/pdf/pdfdialog.cxx +++ b/filter/source/pdf/pdfdialog.cxx @@ -138,7 +138,7 @@ void SAL_CALL PDFDialog::setPropertyValues( const Sequence< PropertyValue >& rPr { maMediaDescriptor = rProps; - for( const PropertyValue& rProp : std::as_const(maMediaDescriptor) ) + for (const PropertyValue& rProp : maMediaDescriptor) { if ( rProp.Name == "FilterData" ) { diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 9f7328c113f2..70474a7fd140 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -328,7 +328,7 @@ static OUString getMimetypeForDocument( const Reference< XComponentContext >& xC Sequence< beans::PropertyValue > aFilterData; xFilterFactory->getByName( aFilterName ) >>= aFilterData; - for ( const beans::PropertyValue& rProp : std::as_const(aFilterData) ) + for (const beans::PropertyValue& rProp : aFilterData) if ( rProp.Name == "Type" ) rProp.Value >>= aTypeName; @@ -341,7 +341,7 @@ static OUString getMimetypeForDocument( const Reference< XComponentContext >& xC Sequence< beans::PropertyValue > aTypeData; xTypeDetection->getByName( aTypeName ) >>= aTypeData; - for ( const beans::PropertyValue& rProp : std::as_const(aTypeData) ) + for (const beans::PropertyValue& rProp : aTypeData) if ( rProp.Name == "MediaType" ) rProp.Value >>= aDocMimetype; } diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 068132df6bad..e89ecc2d13d3 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -310,7 +310,7 @@ void XMLFilterTestDialog::onExportBrowse() int nFound = 0; - for( const PropertyValue& rValue : std::as_const(aValues) ) + for (const PropertyValue& rValue : aValues) { if ( rValue.Name == "Type" ) { @@ -348,7 +348,7 @@ void XMLFilterTestDialog::onExportBrowse() if( aAny >>= aValues2 ) { OUString aExtension; - for( const PropertyValue& rProp : std::as_const(aValues2) ) + for (const PropertyValue& rProp : aValues2) { if ( rProp.Name == "Extensions" ) { diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx index 44dcf41dcdc5..a037a2ccfeb9 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.cxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx @@ -521,7 +521,7 @@ namespace XSLT #endif m_parameters.clear(); - for (const Any& p : std::as_const(params)) + for (const Any& p : params) { NamedValue nv; p >>= nv; diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index eaeaf9f84a0b..c8e762c62d1d 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -413,7 +413,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>& m_aListSource.clear(); css::uno::Sequence<OUString> aListSource; _rxInStream >> aListSource; - for (const OUString& rToken : std::as_const(aListSource)) + for (const OUString& rToken : aListSource) m_aListSource += rToken; } @@ -763,7 +763,7 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) return true; bool bFound = false; - for (const OUString& rStringItem : std::as_const(aStringItemList)) + for (const OUString& rStringItem : aStringItemList) { if ( (bFound = rStringItem == sNewValue) ) break; diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index e18ca14628c1..a5ae6c07cec4 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -2368,7 +2368,7 @@ bool OBoundControlModel::impl_approveValueBinding_nolock( const Reference< XValu // < SYNCHRONIZED } - for ( auto const & type : std::as_const(aTypeCandidates) ) + for (auto const& type : aTypeCandidates) { if ( _rxBinding->supportsType( type ) ) return true; diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 79d6be399d6b..33d31180315c 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1416,7 +1416,7 @@ namespace frm ::std::set< sal_Int16 > aSelectionSet; // find the selection entries in our item list - for ( OUString const & selectEntry : std::as_const(aSelectEntries) ) + for (OUString const& selectEntry : aSelectEntries) { int idx = 0; for(const OUString& s : getStringItemList()) diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index 4b3cb5942760..6cde40fb48cd 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -500,7 +500,7 @@ namespace svt if ( aTemplateList.hasElements() ) { - for ( const OUString& s : std::as_const(aTemplateList) ) + for (const OUString& s : aTemplateList) pListbox->append_text( s ); } } @@ -606,7 +606,7 @@ namespace svt pComboBox->clear(); // add the new ones - for (auto const & item : std::as_const(aItems)) + for (auto const& item : aItems) { pComboBox->append_text(item); } diff --git a/framework/source/dispatch/dispatchdisabler.cxx b/framework/source/dispatch/dispatchdisabler.cxx index 2341d0dd6439..b09e6109459f 100644 --- a/framework/source/dispatch/dispatchdisabler.cxx +++ b/framework/source/dispatch/dispatchdisabler.cxx @@ -29,7 +29,7 @@ void SAL_CALL DispatchDisabler::initialize( const uno::Sequence< uno::Any >& aAr if( aArguments.hasElements() && ( aArguments[0] >>= aDisabledURLs ) ) { - for( OUString const & url : std::as_const(aDisabledURLs) ) + for (OUString const& url : aDisabledURLs) maDisabledURLs.insert(url); } } diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 7801fa5e8175..160155ccf8bb 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -1392,7 +1392,7 @@ void AddonsOptions_Impl::AppendPopupMenu( Sequence< PropertyValue >& rTargetPopu sal_uInt32 nIndex = aTargetSubMenuSeq.getLength(); aTargetSubMenuSeq.realloc( nIndex + aSourceSubMenuSeq.getLength() ); auto pTargetSubMenuSeq = aTargetSubMenuSeq.getArray(); - for ( Sequence<PropertyValue> const & rSeq : std::as_const(aSourceSubMenuSeq) ) + for (Sequence<PropertyValue> const& rSeq : aSourceSubMenuSeq) pTargetSubMenuSeq[nIndex++] = rSeq; rTargetPopupMenu.getArray()[ OFFSET_POPUPMENU_SUBMENU ].Value <<= aTargetSubMenuSeq; } diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index b915e3f82a26..bd122e6f683f 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -532,7 +532,7 @@ bool LayoutManager::readWindowStateData( const OUString& aName, UIElement& rElem if ( rPersistentWindowState->hasByName( aName ) && (rPersistentWindowState->getByName( aName ) >>= aWindowState) ) { bool bValue( false ); - for ( PropertyValue const & rProp : std::as_const(aWindowState) ) + for (PropertyValue const& rProp : aWindowState) { if ( rProp.Name == WINDOWSTATE_PROPERTY_DOCKED ) { @@ -2483,7 +2483,7 @@ void LayoutManager::implts_createMSCompatibleMenuBar( const OUString& aName ) uno::Sequence< beans::PropertyValue > aProps; xMenuIndex->getByIndex( nIndex ) >>= aProps; OUString aCommand; - for ( beans::PropertyValue const & rProp : std::as_const(aProps) ) + for (beans::PropertyValue const& rProp : aProps) { if (rProp.Name == "CommandURL") { diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 846b111d5825..fe14de710ed7 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -3130,7 +3130,7 @@ void ToolbarLayoutManager::implts_renumberRowColumnData( ui::DockingArea nDockedArea( ui::DockingArea_DOCKINGAREA_DEFAULT ); xPersistentWindowState->getByName( rWindowElementName ) >>= aPropValueSeq; - for ( beans::PropertyValue const & rProp : std::as_const(aPropValueSeq) ) + for (beans::PropertyValue const& rProp : aPropValueSeq) { if ( rProp.Name == WINDOWSTATE_PROPERTY_DOCKINGAREA ) rProp.Value >>= nDockedArea; diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index cdbd647c3108..2ab1a381f9e4 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -144,7 +144,7 @@ Reference< XUIConfigurationManager > SAL_CALL ModuleUIConfigurationManagerSuppli { Sequence< PropertyValue > lProps; m_xModuleMgr->getByName(sModuleIdentifier) >>= lProps; - for (PropertyValue const & rProp : std::as_const(lProps)) + for (PropertyValue const& rProp : lProps) { if ( rProp.Name == "ooSetupFactoryShortName" ) { diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index be600fae3c46..504ef4c97808 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -1287,12 +1287,12 @@ WindowStateConfiguration::WindowStateConfiguration( const Reference< XComponentC } Sequence< PropertyValue > aSeq; - for ( OUString const & aModuleIdentifier : std::as_const(aElementNames) ) + for (OUString const& aModuleIdentifier : aElementNames) { if ( xModuleManager->getByName( aModuleIdentifier ) >>= aSeq ) { OUString aWindowStateFileStr; - for ( PropertyValue const & rProp : std::as_const(aSeq) ) + for (PropertyValue const& rProp : aSeq) { if ( rProp.Name == "ooSetupFactoryWindowStateConfigRef" ) { diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 77d6e3e8c839..54285626ba70 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -245,7 +245,7 @@ void ComboboxToolbarController::executeControlCommand( const css::frame::Control m_pComboBox->clear(); rArg.Value >>= aList; - for (OUString const & rName : std::as_const(aList)) + for (OUString const& rName : aList) m_pComboBox->append_text(rName); // send notification diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index c3f9f191df0e..3938974c2a0f 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -175,7 +175,7 @@ void ComplexToolbarController::statusChanged( const FeatureStateEvent& Event ) { if (aControlCommand.Command == "SetQuickHelpText") { - for (NamedValue const & rArg : std::as_const(aControlCommand.Arguments)) + for (NamedValue const& rArg : aControlCommand.Arguments) { if (rArg.Name == "HelpText") { diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx index b3478a7b1edb..edce799e5055 100644 --- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx +++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx @@ -192,7 +192,7 @@ void DropdownToolbarController::executeControlCommand( const css::frame::Control m_pListBoxControl->clear(); rArg.Value >>= aList; - for (OUString const & rName : std::as_const(aList)) + for (OUString const& rName : aList) m_pListBoxControl->append_text(rName); m_pListBoxControl->set_active(0); diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 3c5923396cfc..204cbc7cb4d3 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -287,7 +287,7 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event ) { if (aControlCommand.Command == "SetQuickHelpText") { - for ( NamedValue const & rArg : std::as_const(aControlCommand.Arguments) ) + for (NamedValue const& rArg : aControlCommand.Arguments) { if (rArg.Name == "HelpText") { diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 1f2c25ba085a..770e6b166a1c 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1306,7 +1306,7 @@ void MenuBarManager::FillMenu( bool bShow = true; bool bEnabled = true; - for ( beans::PropertyValue const & rProp : std::as_const(aProps) ) + for (beans::PropertyValue const& rProp : aProps) { OUString aPropName = rProp.Name; if ( aPropName == "CommandURL" ) diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 3efb64c44bfd..be6840a1cc33 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -391,7 +391,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc { if ( rItemContainer->getByIndex( n ) >>= aProps ) { - for ( beans::PropertyValue const & prop : std::as_const(aProps) ) + for (beans::PropertyValue const& prop : aProps) { if ( prop.Name == "CommandURL" ) { diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index c17b08efeeb7..871460d847f1 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -113,7 +113,7 @@ void ToggleButtonToolbarController::executeControlCommand( const css::frame::Con m_aCurrentSelection.clear(); arg.Value >>= aList; - for ( OUString const & label : std::as_const(aList) ) + for (OUString const& label : aList) { m_aDropdownMenuList.push_back( DropdownMenuItem() ); m_aDropdownMenuList.back().mLabel = label; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 0ef5ea3c723e..85f6cc27682a 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1372,7 +1372,7 @@ void ToolBarManager::FillToolbarFromContainer( const Reference< XIndexAccess >& if ( rItemContainer->getByIndex( n ) >>= aProps ) { bool bIsVisible( true ); - for ( PropertyValue const & prop : std::as_const(aProps) ) + for (PropertyValue const& prop : aProps) { if ( prop.Name == ITEM_DESCRIPTOR_COMMANDURL ) prop.Value >>= aCommandURL; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 6717a6364529..3b7e76b25fd9 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -345,7 +345,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co if ( a >>= aWindowState ) { - for ( PropertyValue const & prop : std::as_const(aWindowState) ) + for (PropertyValue const& prop : aWindowState) { if ( prop.Name == WINDOWSTATE_PROPERTY_UINAME ) prop.Value >>= aUIName; diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index bbeb21851d2e..9e5e8a403783 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -614,7 +614,7 @@ void UICommandDescription::impl_fillElements(const char* _pName) if ( m_xModuleManager->getByName( aModuleIdentifier ) >>= aSeq ) { OUString aCommandStr; - for ( PropertyValue const & prop : std::as_const(aSeq) ) + for (PropertyValue const& prop : aSeq) { if ( prop.Name.equalsAscii(_pName) ) { diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index cb66c585e9fa..6892805423c9 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -126,7 +126,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales() uno::Sequence< OUString > aFormatList; aLinguCfg.GetSupportedDictionaryFormatsFor( "Hyphenators", "org.openoffice.lingu.LibHnjHyphenator", aFormatList ); - for (const auto& rFormat : std::as_const(aFormatList)) + for (const auto& rFormat : aFormatList) { std::vector< SvtLinguConfigDictionaryEntry > aTmpDic( aLinguCfg.GetActiveDictionariesByFormat( rFormat ) ); diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx index fe912cb6b341..ed8586dd50a5 100644 --- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx +++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx @@ -317,7 +317,7 @@ sal_Bool SAL_CALL LanguageToolGrammarChecker::hasLocale(const Locale& rLocale) if (!m_aSuppLocales.hasElements()) getLocales(); - for (auto const& suppLocale : std::as_const(m_aSuppLocales)) + for (auto const& suppLocale : m_aSuppLocales) if (rLocale == suppLocale) return true; diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 6f30702fce7d..89db2c613af2 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -121,7 +121,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() uno::Sequence< OUString > aFormatList; aLinguCfg.GetSupportedDictionaryFormatsFor( "SpellCheckers", "org.openoffice.lingu.MySpellSpellChecker", aFormatList ); - for (auto const& format : std::as_const(aFormatList)) + for (auto const& format : aFormatList) { std::vector< SvtLinguConfigDictionaryEntry > aTmpDic( aLinguCfg.GetActiveDictionariesByFormat(format) ); @@ -232,7 +232,7 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale) if (!m_aSuppLocales.hasElements()) getLocales(); - for (auto const& suppLocale : std::as_const(m_aSuppLocales)) + for (auto const& suppLocale : m_aSuppLocales) { if (rLocale == suppLocale) { diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index b8c74c938f29..6ae5ad0a76b7 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -108,7 +108,7 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales() uno::Sequence< OUString > aFormatList; aLinguCfg.GetSupportedDictionaryFormatsFor( "Thesauri", "org.openoffice.lingu.new.Thesaurus", aFormatList ); - for (const auto& rFormat : std::as_const(aFormatList)) + for (const auto& rFormat : aFormatList) { std::vector< SvtLinguConfigDictionaryEntry > aTmpDic( aLinguCfg.GetActiveDictionariesByFormat( rFormat ) ); diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 766b67a4cc37..a051fb71a4c0 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -358,7 +358,7 @@ ConvDicNameContainer & ConvDicList::GetNameContainer() // access list of text conversion dictionaries to activate SvtLinguOptions aOpt; SvtLinguConfig().GetOptions( aOpt ); - for (const OUString& rActiveConvDic : std::as_const(aOpt.aActiveConvDics)) + for (const OUString& rActiveConvDic : aOpt.aActiveConvDics) { uno::Reference< XConversionDictionary > xDic = mxNameContainer->GetByName( rActiveConvDic ); diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx index ee593f9f489f..b577a86baf1d 100644 --- a/linguistic/source/lngprophelp.cxx +++ b/linguistic/source/lngprophelp.cxx @@ -189,7 +189,7 @@ void PropertyChgHelper::AddAsPropListener() { if (xPropSet.is()) { - for (const OUString& rPropName : std::as_const(aPropNames)) + for (const OUString& rPropName : aPropNames) { if (!rPropName.isEmpty()) xPropSet->addPropertyChangeListener( rPropName, this ); @@ -201,7 +201,7 @@ void PropertyChgHelper::RemoveAsPropListener() { if (xPropSet.is()) { - for (const OUString& rPropName : std::as_const(aPropNames)) + for (const OUString& rPropName : aPropNames) { if (!rPropName.isEmpty()) xPropSet->removePropertyChangeListener( rPropName, this ); diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 850d4d813bfd..9452d0649a37 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -1592,7 +1592,7 @@ bool LngSvcMgr::SaveCfgSvcs( std::u16string_view rServiceName ) } OUString aNodeName( OUString::createFromAscii(pNodeName) ); - for (const lang::Locale& rLocale : std::as_const(aLocales)) + for (const lang::Locale& rLocale : aLocales) { uno::Sequence< OUString > aSvcImplNames = pDsp->GetServiceList( rLocale ); @@ -1627,7 +1627,7 @@ static uno::Sequence< OUString > GetLangSvcList( const uno::Any &rVal ) { rVal >>= aRes; #if OSL_DEBUG_LEVEL > 0 - for (const OUString& rSvcName : std::as_const(aRes)) + for (const OUString& rSvcName : aRes) { SAL_WARN_IF( rSvcName.isEmpty(), "linguistic", "service impl-name missing" ); } diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx index 50211fd929c7..a4f9671760d6 100644 --- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx +++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx @@ -227,7 +227,7 @@ OUString SAL_CALL LotusWordProImportFilter::detect( css::uno::Sequence< Property OUString sTypeName( "writer_LotusWordPro_Document" ); OUString sURL; uno::Reference < XInputStream > xInputStream; - for (const PropertyValue& rValue : std::as_const(Descriptor)) + for (const PropertyValue& rValue : Descriptor) { if ( rValue.Name == "TypeName" ) rValue.Value >>= sTypeName; diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx index ac2c1f5c7e0a..3f47283d0825 100644 --- a/oox/source/core/filterbase.cxx +++ b/oox/source/core/filterbase.cxx @@ -425,7 +425,7 @@ void SAL_CALL FilterBase::initialize( const Sequence< Any >& rArgs ) Sequence<css::beans::PropertyValue> aSeq; rArgs[0] >>= aSeq; - for (const auto& rVal : std::as_const(aSeq)) + for (const auto& rVal : aSeq) { if (rVal.Name == "UserData") { diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 2c0cfa9732eb..2e7ce9a75cbc 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -1152,7 +1152,7 @@ void XmlFilterBase::exportCustomFragments() uno::Sequence<beans::PropertyValue> propList; xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= propList; - for (const auto& rProp : std::as_const(propList)) + for (const auto& rProp : propList) { const OUString propName = rProp.Name; if (propName == "OOXCustomXml") diff --git a/oox/source/crypto/DocumentEncryption.cxx b/oox/source/crypto/DocumentEncryption.cxx index 6b88549299a1..dd0b4a3e42fb 100644 --- a/oox/source/crypto/DocumentEncryption.cxx +++ b/oox/source/crypto/DocumentEncryption.cxx @@ -82,7 +82,7 @@ bool DocumentEncryption::encrypt() Sequence<NamedValue> aStreams = mxPackageEncryption->encrypt(xInputStream); - for (const NamedValue & aStream : std::as_const(aStreams)) + for (const NamedValue& aStream : aStreams) { Reference<XOutputStream> xOutputStream(mrOleStorage.openOutputStream(aStream.Name), UNO_SET_THROW); BinaryXOutputStream aBinaryOutputStream(xOutputStream, true); diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx index f58476c5688f..23e754d6bbcf 100644 --- a/oox/source/docprop/ooxmldocpropimport.cxx +++ b/oox/source/docprop/ooxmldocpropimport.cxx @@ -176,9 +176,9 @@ void SAL_CALL DocumentPropertiesImport::importProperties( if( aCoreStreams.hasElements() ) aParser.parseStream( aCoreStreams[ 0 ], true ); - for( const auto& rExtStream : std::as_const(aExtStreams) ) + for (const auto& rExtStream : aExtStreams) aParser.parseStream( rExtStream, true ); - for( const auto& rCustomStream : std::as_const(aCustomStreams) ) + for (const auto& rCustomStream : aCustomStreams) aParser.parseStream( rCustomStream, true ); } diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index c80e8c1ba688..e980a4f18f35 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1348,7 +1348,7 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x { Sequence<sal_Int32> deletedLegendEntriesSeq; aSeriesProp.getProperty(deletedLegendEntriesSeq, PROP_DeletedLegendEntries); - for (const auto& deletedLegendEntry : std::as_const(deletedLegendEntriesSeq)) + for (const auto& deletedLegendEntry : deletedLegendEntriesSeq) { pFS->startElement(FSNS(XML_c, XML_legendEntry)); pFS->singleElement(FSNS(XML_c, XML_idx), XML_val, @@ -3960,7 +3960,7 @@ void ChartExport::exportDataLabels( ; } - for (const sal_Int32 nIdx : std::as_const(aAttrLabelIndices)) + for (const sal_Int32 nIdx : aAttrLabelIndices) { uno::Reference<beans::XPropertySet> xLabelPropSet = xSeries->getDataPointByIndex(nIdx); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index a3e5356c0523..9cd97d0b5f3e 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -449,7 +449,7 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet ) { Sequence< PropertyValue > aGrabBag; mAny >>= aGrabBag; - for( const auto& rProp : std::as_const(aGrabBag) ) + for (const auto& rProp : aGrabBag) { if( rProp.Name == "SpPrSolidFillSchemeClr" ) rProp.Value >>= sColorFillScheme; @@ -615,7 +615,7 @@ void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet ) { Sequence< PropertyValue > aGrabBag; mAny >>= aGrabBag; - for( const auto& rProp : std::as_const(aGrabBag) ) + for (const auto& rProp : aGrabBag) if( rProp.Name == "GradFillDefinition" ) rProp.Value >>= aGradientStops; else if( rProp.Name == "OriginalGradFill" ) @@ -696,7 +696,7 @@ void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGrad sal_Int16 nTransparency = 0; ::Color nRgbClr; Sequence< PropertyValue > aTransformations; - for( const auto& rProp : std::as_const(aGradientStop) ) + for (const auto& rProp : aGradientStop) { if( rProp.Name == "SchemeClr" ) rProp.Value >>= sSchemeClr; @@ -972,7 +972,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc Sequence<PropertyValue> aGrabBag; mAny >>= aGrabBag; - for (const auto& rProp : std::as_const(aGrabBag)) + for (const auto& rProp : aGrabBag) { if( rProp.Name == "SpPrLnSolidFillSchemeClr" ) rProp.Value >>= sColorFillScheme; @@ -987,7 +987,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc else if( rProp.Name == "EmuLineWidth" ) rProp.Value >>= nEmuLineWidth; } - for (const auto& rStyleProp : std::as_const(aStyleProperties)) + for (const auto& rStyleProp : aStyleProperties) { if( rStyleProp.Name == "Color" ) rStyleProp.Value >>= nStyleColor; @@ -3166,7 +3166,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS bool bHasBulletColor = false; awt::Size aGraphicSize; - for ( const PropertyValue& rPropValue : std::as_const(aPropertySequence) ) + for (const PropertyValue& rPropValue : aPropertySequence) { OUString aPropName( rPropValue.Name ); SAL_INFO("oox.shape", "pro name: " << aPropName); @@ -3320,7 +3320,7 @@ void DrawingML::WriteParagraphTabStops(const Reference<XPropertySet>& rXPropSet) if (aTabStops.getLength() > 0) mpFS->startElementNS(XML_a, XML_tabLst); - for (const css::style::TabStop& rTabStop : std::as_const(aTabStops)) + for (const css::style::TabStop& rTabStop : aTabStops) { OString sPosition = OString::number(GetPointFromCoordinate(rTabStop.Position)); OString sAlignment; @@ -3374,7 +3374,7 @@ sal_Int32 DrawingML::getBulletMarginIndentation (const Reference< XPropertySet > if (!aPropertySequence.hasElements()) return 0; - for ( const PropertyValue& rPropValue : std::as_const(aPropertySequence) ) + for (const PropertyValue& rPropValue : aPropertySequence) { OUString aPropName( rPropValue.Name ); SAL_INFO("oox.shape", "pro name: " << aPropName); @@ -3677,12 +3677,12 @@ bool DrawingML::IsFontworkShape(const css::uno::Reference<css::beans::XPropertyS { mAny >>= aCustomShapeGeometryProps; uno::Sequence<beans::PropertyValue> aTextPathSeq; - for (const auto& rProp : std::as_const(aCustomShapeGeometryProps)) + for (const auto& rProp : aCustomShapeGeometryProps) { if (rProp.Name == "TextPath") { rProp.Value >>= aTextPathSeq; - for (const auto& rTextPathItem : std::as_const(aTextPathSeq)) + for (const auto& rTextPathItem : aTextPathSeq) { if (rTextPathItem.Name == "TextPath") { @@ -3791,7 +3791,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo Sequence< PropertyValue > aProps; if ( mAny >>= aProps ) { - for ( const auto& rProp : std::as_const(aProps) ) + for (const auto& rProp : aProps) { if (rProp.Name == "TextPreRotateAngle") rProp.Value >>= nTextPreRotateAngle; @@ -3808,7 +3808,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo else if (rProp.Name == "TextPath") { rProp.Value >>= aTextPathSeq; - for (const auto& rTextPathItem : std::as_const(aTextPathSeq)) + for (const auto& rTextPathItem : aTextPathSeq) { if (rTextPathItem.Name == "ScaleX") rTextPathItem.Value >>= bScaleX; @@ -3865,7 +3865,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo { uno::Sequence<beans::PropertyValue> aGrabBag; rXPropSet->getPropertyValue("InteropGrabBag") >>= aGrabBag; - for (const auto& aProp : std::as_const(aGrabBag)) + for (const auto& aProp : aGrabBag) { if (aProp.Name == "Upright") { @@ -4665,7 +4665,7 @@ bool DrawingML::WriteCustomGeometry( uno::Sequence<awt::Size> aPathSize; bool bReplaceGeoWidth = false; bool bReplaceGeoHeight = false; - for (const beans::PropertyValue& rPathProp : std::as_const(aPathProp)) + for (const beans::PropertyValue& rPathProp : aPathProp) { if (rPathProp.Name == "Coordinates") rPathProp.Value >>= aPairs; @@ -4777,7 +4777,7 @@ bool DrawingML::WriteCustomGeometry( aPairs[0].Second.Value >>= nYMin; sal_Int32 nYMax = nYMin; - for (const auto& rPair : std::as_const(aPairs)) + for (const auto& rPair : aPairs) { sal_Int32 nX = GetCustomGeometryPointValue(rPair.First, aCustomShape2d, bReplaceGeoWidth, false); @@ -5497,7 +5497,7 @@ void DrawingML::WriteShapeStyle( const Reference< XPropertySet >& xPropSet ) Sequence< PropertyValue > aGrabBag; Sequence< PropertyValue > aFillRefProperties, aLnRefProperties, aEffectRefProperties; mAny >>= aGrabBag; - for( const auto& rProp : std::as_const(aGrabBag)) + for (const auto& rProp : aGrabBag) { if( rProp.Name == "StyleFillRef" ) rProp.Value >>= aFillRefProperties; @@ -5557,7 +5557,7 @@ void DrawingML::WriteShapeEffect( std::u16string_view sName, const Sequence< Pro // read tag attributes uno::Sequence< beans::PropertyValue > aOuterShdwProps; rEffectProp.Value >>= aOuterShdwProps; - for( const auto& rOuterShdwProp : std::as_const(aOuterShdwProps) ) -e ... etc. - the rest is truncated