diff options
23 files changed, 29 insertions, 28 deletions
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index b603d3479852..2e8dda3c0d2d 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -291,7 +291,7 @@ public: SvStream& rStream, sal_uInt16 nFormat, sal_uInt16 * pDeterminedFormat, GraphicFilterImportFlags nImportFlags, - css::uno::Sequence< css::beans::PropertyValue >* pFilterData, + const css::uno::Sequence< css::beans::PropertyValue >* pFilterData, WmfExternal const *pExtHeader = nullptr ); // Setting sizeLimit limits how much will be read from the stream. diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx index 5769ad579666..00db5396da64 100644 --- a/unoxml/source/dom/saxbuilder.cxx +++ b/unoxml/source/dom/saxbuilder.cxx @@ -253,7 +253,7 @@ namespace DOM if (xAttribs.is()) { setElementFastAttributes(aElement, xAttribs); - Sequence< css::xml::Attribute > unknownAttribs = xAttribs->getUnknownAttributes(); + const Sequence< css::xml::Attribute > unknownAttribs = xAttribs->getUnknownAttributes(); for ( const auto& rUnknownAttrib : unknownAttribs ) { const OUString& rAttrValue = rUnknownAttrib.Value; diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 4b074d151984..7f31daafd5c2 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -883,7 +883,7 @@ UUIInteractionHelper::getInteractionHandlerList( uno::Reference< container::XNameAccess > xNameAccess( xInterface, uno::UNO_QUERY_THROW ); - uno::Sequence< OUString > aElems = xNameAccess->getElementNames(); + const uno::Sequence< OUString > aElems = xNameAccess->getElementNames(); if ( aElems.hasElements() ) { diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx index c48f3cd2c029..a97725ef1ca3 100644 --- a/uui/source/passwordcontainer.cxx +++ b/uui/source/passwordcontainer.cxx @@ -360,7 +360,7 @@ PasswordContainerInteractionHandler::handleInteractionRequest( if ( aAnyRequest >>= aURLAuthenticationRequest ) aURL = aURLAuthenticationRequest.URL; - uno::Sequence< uno::Reference< task::XInteractionContinuation > > + const uno::Sequence< uno::Reference< task::XInteractionContinuation > > rContinuations = rRequest->getContinuations(); uno::Reference< ucb::XInteractionSupplyAuthentication > diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index c29c9782b3c9..96acd3af6034 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -233,7 +233,7 @@ ScVbaUserForm::nestedSearch( const OUString& aPropertyName, uno::Reference< awt: uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName ); if ( !xControl.is() ) { - uno::Sequence< uno::Reference< awt::XControl > > aControls = xContainer->getControls(); + const uno::Sequence< uno::Reference< awt::XControl > > aControls = xContainer->getControls(); for ( const auto& rCtrl : aControls ) { diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index 2dd9cdbda000..f49d48370c9e 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -178,7 +178,7 @@ sal_Int32 ScVbaShape::getAutoShapeType(const css::uno::Reference< drawing::XShap uno::Sequence< beans::PropertyValue > aGeoPropSeq; if ( aGeoPropSet >>= aGeoPropSeq ) { - for( const auto& rProp : aGeoPropSeq ) + for( const auto& rProp : std::as_const(aGeoPropSeq) ) { if( rProp.Name == "Type" ) { diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index d993d443ea5e..7c9ca3f22cd9 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -145,7 +145,7 @@ ScVbaShapes::getShapesByArrayIndices( const uno::Any& Index ) uno::Sequence< uno::Any > sIndices; aConverted >>= sIndices; XNamedObjectCollectionHelper< drawing::XShape >::XNamedVec aShapes; - for( const auto& rIndex : sIndices ) + for( const auto& rIndex : std::as_const(sIndices) ) { uno::Reference< drawing::XShape > xShape; if ( rIndex.getValueTypeClass() == uno::TypeClass_STRING ) diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx index f499c2db53dd..602ee21569ee 100644 --- a/vcl/qt5/Qt5FilePicker.cxx +++ b/vcl/qt5/Qt5FilePicker.cxx @@ -415,7 +415,7 @@ void Qt5FilePicker::handleSetListValue(QComboBox* pWidget, sal_Int16 nControlAct { Sequence<OUString> aStringList; rValue >>= aStringList; - for (auto const& sItem : aStringList) + for (auto const& sItem : std::as_const(aStringList)) pWidget->addItem(toQString(sItem)); break; } diff --git a/vcl/qt5/Qt5Transferable.cxx b/vcl/qt5/Qt5Transferable.cxx index 10a139093041..e3c5bfa42a1a 100644 --- a/vcl/qt5/Qt5Transferable.cxx +++ b/vcl/qt5/Qt5Transferable.cxx @@ -249,7 +249,7 @@ QStringList Qt5MimeData::formats() const if (!m_aMimeTypeList.isEmpty()) return m_aMimeTypeList; - css::uno::Sequence<css::datatransfer::DataFlavor> aFormats + const css::uno::Sequence<css::datatransfer::DataFlavor> aFormats = m_aContents->getTransferDataFlavors(); QStringList aList; bool bHaveUTF16 = false; diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index 4fbecf3fc47e..24f202e3e636 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -71,7 +71,7 @@ void loadFromSvg(SvStream& rStream, const OUString& sPath, BitmapEx& rBitmapEx, uno::Sequence<sal_Int8> aData(aBuffer.data(), nSize + 1); uno::Reference<io::XInputStream> aInputStream(new comphelper::SequenceInputStream(aData)); - Primitive2DSequence aPrimitiveSequence = xSvgParser->getDecomposition(aInputStream, sPath); + const Primitive2DSequence aPrimitiveSequence = xSvgParser->getDecomposition(aInputStream, sPath); if (!aPrimitiveSequence.hasElements()) return; diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index e2cf35d510c7..0ed0a431e235 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -158,7 +158,7 @@ void FilterConfigCache::ImplInit() if ( xTypeAccess.is() && xFilterAccess.is() ) { - Sequence< OUString > lAllFilter = xFilterAccess->getElementNames(); + const Sequence< OUString > lAllFilter = xFilterAccess->getElementNames(); for ( const OUString& sInternalFilterName : lAllFilter ) { diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index cb9b5768f047..901c9407e36f 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1440,7 +1440,7 @@ void GraphicFilter::preload() ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, SvStream& rIStream, sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat, GraphicFilterImportFlags nImportFlags, - css::uno::Sequence< css::beans::PropertyValue >* pFilterData, + const css::uno::Sequence< css::beans::PropertyValue >* pFilterData, WmfExternal const *pExtHeader ) { OUString aFilterName; @@ -2077,7 +2077,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r css::uno::Sequence< css::beans::PropertyValue > aAdditionalChunkSequence; if ( rPropVal.Value >>= aAdditionalChunkSequence ) { - for ( const auto& rAdditionalChunk : aAdditionalChunkSequence ) + for ( const auto& rAdditionalChunk : std::as_const(aAdditionalChunkSequence) ) { if ( rAdditionalChunk.Name.getLength() == 4 ) { diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx index f04ddd0ffa37..f8b9edb7c50c 100644 --- a/vcl/source/gdi/configsettings.cxx +++ b/vcl/source/gdi/configsettings.cxx @@ -86,7 +86,7 @@ void SettingsConfigItem::getValues() { m_aSettings.clear(); - Sequence< OUString > aNames( GetNodeNames( OUString() ) ); + const Sequence< OUString > aNames( GetNodeNames( OUString() ) ); for( const auto& aKeyName : aNames ) { diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index eefe65573270..b3c3f9ead130 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1516,7 +1516,7 @@ void PrinterController::setUIOptions( const css::uno::Sequence< css::beans::Prop OUString aPropName; vcl::ImplPrinterControllerData::ControlDependency aDep; css::uno::Sequence< sal_Bool > aChoicesDisabled; - for( const css::beans::PropertyValue& rEntry : aOptProp ) + for( const css::beans::PropertyValue& rEntry : std::as_const(aOptProp) ) { if ( rEntry.Name == "Property" ) { diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx index 49334eb51837..7f6a343b0050 100644 --- a/vcl/source/graphic/GraphicObject.cxx +++ b/vcl/source/graphic/GraphicObject.cxx @@ -83,7 +83,8 @@ void SearchForGraphics(uno::Reference<uno::XInterface> const & xInterface, Reference<XNameContainer> xContainer(xInterface, UNO_QUERY); if (xContainer.is()) { - for (OUString const & rName : xContainer->getElementNames()) + const css::uno::Sequence<OUString> aElementNames = xContainer->getElementNames(); + for (OUString const & rName : aElementNames) { uno::Reference<XInterface> xInnerInterface; xContainer->getByName(rName) >>= xInnerInterface; diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index 2ab3b2f38b99..c5919770402c 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -341,7 +341,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co sal_uInt16 nExtWidth = 0; sal_uInt16 nExtHeight = 0; sal_uInt16 nExtMapMode = 0; - for( const auto& rProp : aFilterData ) + for( const auto& rProp : std::as_const(aFilterData) ) { const OUString aName( rProp.Name ); const uno::Any aValue( rProp.Value ); @@ -562,7 +562,7 @@ void ImplApplyBitmapResolution( ::Graphic& rGraphic, sal_Int32 nImageResolution, ImplApplyBitmapScaling( rGraphic, nDestPixelWidth, nDestPixelHeight ); } -void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyValue >& rFilterData ) +void ImplApplyFilterData( ::Graphic& rGraphic, const uno::Sequence< beans::PropertyValue >& rFilterData ) { /* this method applies following attributes to the graphic, in the first step the cropping area (logical size in 100thmm) is applied, in the second step the resolution diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx index d4a88f7513f6..714f16a72dbc 100644 --- a/vcl/source/uitest/uno/uiobject_uno.cxx +++ b/vcl/source/uitest/uno/uiobject_uno.cxx @@ -115,7 +115,7 @@ void SAL_CALL UIObjectUnoObj::executeAction(const OUString& rAction, const css:: SolarMutexGuard aGuard; StringMap aMap; - for (const auto& rPropVal : mPropValues) + for (const auto& rPropVal : std::as_const(mPropValues)) { OUString aVal; if (!(rPropVal.Value >>= aVal)) diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index df1a8c7bac8c..fda6c7bbbd2d 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1364,7 +1364,7 @@ void PrintDialog::setupOptionalUI() sal_Int64 nMinValue = 0, nMaxValue = 0; OUString aGroupingHint; - for( const beans::PropertyValue& rEntry : aOptProp ) + for( const beans::PropertyValue& rEntry : std::as_const(aOptProp) ) { if ( rEntry.Name == "ID" ) { @@ -1586,7 +1586,7 @@ void PrintDialog::setupOptionalUI() continue; // iterate options - for( const auto& rChoice : aChoices ) + for( const auto& rChoice : std::as_const(aChoices) ) { pList->InsertEntry( rChoice ); } diff --git a/vcl/unx/generic/dtrans/config.cxx b/vcl/unx/generic/dtrans/config.cxx index 2e65e4f42d64..f2926ef9ec78 100644 --- a/vcl/unx/generic/dtrans/config.cxx +++ b/vcl/unx/generic/dtrans/config.cxx @@ -71,7 +71,7 @@ DtransX11ConfigItem::DtransX11ConfigItem() : m_nSelectionTimeout( 3 ) { Sequence<OUString> aKeys { SELECTION_PROPERTY }; - Sequence< Any > aValues = GetProperties( aKeys ); + const Sequence< Any > aValues = GetProperties( aKeys ); #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "found %" SAL_PRIdINT32 " properties for %s\n", aValues.getLength(), SELECTION_PROPERTY ); #endif diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx index 6f3a7c5075e0..0ba7fd561862 100644 --- a/vcl/unx/gtk/a11y/atktextattributes.cxx +++ b/vcl/unx/gtk/a11y/atktextattributes.cxx @@ -925,7 +925,7 @@ TabStopList2String( const uno::Any& rAny, bool default_tabs ) { sal_Unicode lastFillChar = ' '; - for( const auto& rTabStop : theTabStops ) + for( const auto& rTabStop : std::as_const(theTabStops) ) { bool is_default_tab = (style::TabAlign_DEFAULT == rTabStop.Alignment); diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index a6d8ab7d1e76..e9b16217882b 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -1150,7 +1150,7 @@ void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nContr { Sequence< OUString > aStringList; rValue >>= aStringList; - for (const auto& rString : aStringList) + for (const auto& rString : std::as_const(aStringList)) { ComboBoxAppendText(pWidget, rString); if (!bVersionWidthUnset) @@ -1920,7 +1920,7 @@ void SalGtkFilePicker::SetFilters() { // it's a filter group css::uno::Sequence< css::beans::StringPair > aSubFilters; filter.getSubFilters( aSubFilters ); - for( const auto& rSubFilter : aSubFilters ) + for( const auto& rSubFilter : std::as_const(aSubFilters) ) aAllFormats.insert(rSubFilter.Second); } else diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx index 695b778b59ad..e5e17a5ec9e1 100644 --- a/vcl/unx/gtk/salprn-gtk.cxx +++ b/vcl/unx/gtk/salprn-gtk.cxx @@ -432,7 +432,7 @@ GtkPrintDialog::impl_initCustomTab() if (!aOptProp.hasElements()) continue; - for (const beans::PropertyValue& rEntry : aOptProp) + for (const beans::PropertyValue& rEntry : std::as_const(aOptProp)) { if ( rEntry.Name == "Text" ) { @@ -608,7 +608,7 @@ GtkPrintDialog::impl_initCustomTab() { pWidget = lcl_combo_box_text_new(); - for (const auto& rChoice : aChoices) + for (const auto& rChoice : std::as_const(aChoices)) { lcl_combo_box_text_append(pWidget, OUStringToOString(rChoice, RTL_TEXTENCODING_UTF8).getStr()); diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index f9d0fb965914..78381da7c155 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1220,7 +1220,7 @@ public: bHasLoadedAll = true; css::uno::Reference<css::container::XNameAccess> xRef(ImageTree::get().getNameAccess()); - css::uno::Sequence< OUString > aAllIcons = xRef->getElementNames(); + const css::uno::Sequence< OUString > aAllIcons = xRef->getElementNames(); for (const auto& rIcon : aAllIcons) { |