Drop std::as_const from css::uno::Sequence iterations

Obsoleted by commit 2484de6728 (Remove
non-const Sequence::begin()/end() in internal code, 2021-10-15) and
commit fb3c04bd19 (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.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2024-01-27 12:43:48 +01:00
parent db227dc7d0
commit 0fa827dbb2
314 changed files with 536 additions and 537 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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 {
+2 -2
View File
@@ -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")
{
@@ -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);
}
@@ -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);
@@ -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;
@@ -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 ) );
}
@@ -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 )
@@ -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 );
+2 -2
View File
@@ -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;
@@ -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 );
@@ -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)
{
+2 -2
View File
@@ -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 );
+1 -1
View File
@@ -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)
{
+6 -6
View File
@@ -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;
+2 -2
View File
@@ -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>");
@@ -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));
}
}
@@ -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;
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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,
+3 -3
View File
@@ -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)
{
@@ -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;
+9 -9
View File
@@ -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" )
{
+5 -5
View File
@@ -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())
{
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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 );
@@ -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 )
@@ -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();
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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
{
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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 )
{
@@ -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) );
}
@@ -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("\n"
+ dp_misc::Dependencies::getErrorText(i));
@@ -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 )
{
+5 -5
View File
@@ -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;
+11 -11
View File
@@ -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;
@@ -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 );
@@ -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 );
@@ -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 )
{
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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;
+1 -1
View File
@@ -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;
}
+2 -2
View File
@@ -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 ) )
{
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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);
}
}
+1 -1
View File
@@ -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());
}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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();
@@ -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 )
@@ -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() )
{
@@ -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
+1 -1
View File
@@ -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() )
@@ -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" )
{
+1 -1
View File
@@ -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")
{
+1 -1
View File
@@ -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" )
{
+2 -2
View File
@@ -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;
}
@@ -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" )
{
@@ -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;
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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())
@@ -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);
}
@@ -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);
}
}
@@ -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;
}
@@ -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")
{
@@ -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;
@@ -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" )
{
@@ -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" )
{
@@ -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
@@ -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")
{
@@ -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);
@@ -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")
{
@@ -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" )
@@ -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" )
{
@@ -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;
@@ -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;
@@ -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;
@@ -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) )
{
@@ -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 ) );
@@ -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;
@@ -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)
{
@@ -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 ) );
+1 -1
View File
@@ -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 );
+2 -2
View File
@@ -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 );
+2 -2
View File
@@ -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" );
}
@@ -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;
+1 -1
View File
@@ -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")
{
+1 -1
View File
@@ -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")
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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 );
}
+2 -2
View File
@@ -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);
+28 -28
View File
@@ -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) )
for (const auto& rOuterShdwProp : aOuterShdwProps)
{
if( rOuterShdwProp.Name == "algn" )
{
@@ -5822,7 +5822,7 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
mpFS->startElementNS(XML_a, XML_effectLst);
bool bGlowWritten = false;
for( const auto& rEffect : std::as_const(aEffects) )
for (const auto& rEffect : aEffects)
{
if (!bGlowWritten
&& (rEffect.Name == "innerShdw" || rEffect.Name == "outerShdw"
@@ -5913,7 +5913,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool
{
Sequence< PropertyValue > a3DEffectProps;
pShapeProp->Value >>= a3DEffectProps;
for( const auto& r3DEffectProp : std::as_const(a3DEffectProps) )
for (const auto& r3DEffectProp : a3DEffectProps)
{
if( r3DEffectProp.Name == "Camera" )
r3DEffectProp.Value >>= aEffectProps;
@@ -5930,7 +5930,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool
bool bCameraRotationPresent = false;
rtl::Reference<sax_fastparser::FastAttributeList> aCameraAttrList = FastSerializerHelper::createAttrList();
rtl::Reference<sax_fastparser::FastAttributeList> aCameraRotationAttrList = FastSerializerHelper::createAttrList();
for( const auto& rEffectProp : std::as_const(aEffectProps) )
for (const auto& rEffectProp : aEffectProps)
{
if( rEffectProp.Name == "prst" )
{
@@ -5970,7 +5970,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool
bool bLightRigRotationPresent = false;
rtl::Reference<sax_fastparser::FastAttributeList> aLightRigAttrList = FastSerializerHelper::createAttrList();
rtl::Reference<sax_fastparser::FastAttributeList> aLightRigRotationAttrList = FastSerializerHelper::createAttrList();
for( const auto& rLightRigProp : std::as_const(aLightRigProps) )
for (const auto& rLightRigProp : aLightRigProps)
{
if( rLightRigProp.Name == "rig" || rLightRigProp.Name == "dir" )
{
@@ -6042,7 +6042,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool
rtl::Reference<sax_fastparser::FastAttributeList> aBevelTAttrList = FastSerializerHelper::createAttrList();
rtl::Reference<sax_fastparser::FastAttributeList> aBevelBAttrList = FastSerializerHelper::createAttrList();
rtl::Reference<sax_fastparser::FastAttributeList> aShape3DAttrList = FastSerializerHelper::createAttrList();
for( const auto& rShape3DProp : std::as_const(aShape3DProps) )
for (const auto& rShape3DProp : aShape3DProps)
{
if( rShape3DProp.Name == "extrusionH" || rShape3DProp.Name == "contourW" || rShape3DProp.Name == "z" )
{
@@ -6088,7 +6088,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool
bBevelBPresent = true;
aBevelAttrList = aBevelBAttrList;
}
for( const auto& rBevelProp : std::as_const(aBevelProps) )
for (const auto& rBevelProp : aBevelProps)
{
if( rBevelProp.Name == "w" || rBevelProp.Name == "h" )
{
@@ -6126,7 +6126,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool
::Color nColor;
sal_Int32 nTransparency(0);
Sequence< PropertyValue > aColorTransformations;
for( const auto& rExtrusionColorProp : std::as_const(aExtrusionColorProps) )
for (const auto& rExtrusionColorProp : aExtrusionColorProps)
{
if( rExtrusionColorProp.Name == "schemeClr" )
rExtrusionColorProp.Value >>= sSchemeClr;
@@ -6152,7 +6152,7 @@ void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool
::Color nColor;
sal_Int32 nTransparency(0);
Sequence< PropertyValue > aColorTransformations;
for( const auto& rContourColorProp : std::as_const(aContourColorProps) )
for (const auto& rContourColorProp : aContourColorProps)
{
if( rContourColorProp.Name == "schemeClr" )
rContourColorProp.Value >>= sSchemeClr;
@@ -6195,7 +6195,7 @@ void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet
aEffect.Value >>= aAttrs;
rtl::Reference<sax_fastparser::FastAttributeList> aAttrList = FastSerializerHelper::createAttrList();
OString sRelId;
for( const auto& rAttr : std::as_const(aAttrs) )
for (const auto& rAttr : aAttrs)
{
sal_Int32 nToken = ArtisticEffectProperties::getEffectToken( rAttr.Name );
if( nToken != XML_none )
@@ -6210,7 +6210,7 @@ void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet
rAttr.Value >>= aGraphic;
Sequence< sal_Int8 > aGraphicData;
OUString sGraphicId;
for( const auto& rProp : std::as_const(aGraphic) )
for (const auto& rProp : aGraphic)
{
if( rProp.Name == "Id" )
rProp.Value >>= sGraphicId;
@@ -6276,7 +6276,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
// retrieve the doms from the GrabBag
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)
{
OUString propName = rProp.Name;
if (propName == "OOXData")
+6 -6
View File
@@ -778,7 +778,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
{
bHasGeometrySeq = true;
SAL_INFO("oox.shape", "got custom shape geometry sequence");
for (const PropertyValue& rProp : std::as_const(aGeometrySeq))
for (const PropertyValue& rProp : aGeometrySeq)
{
SAL_INFO("oox.shape", "geometry property: " << rProp.Name);
if (rProp.Name == "Type")
@@ -1156,7 +1156,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
uno::Sequence<beans::PropertyValue> grabBag;
rXPropSet->getPropertyValue("InteropGrabBag") >>= grabBag;
for (auto const& it : std::as_const(grabBag))
for (auto const& it : grabBag)
if (it.Name == "3DEffectProperties")
bHas3DEffectinShape = true;
@@ -2385,7 +2385,7 @@ void ShapeExport::WriteTableCellProperties(const Reference< XPropertySet>& xCell
if( !aTextVerticalValue &&
(xCellPropSet->getPropertyValue("CellInteropGrabBag") >>= aGrabBag) )
{
for (auto const& rIt : std::as_const(aGrabBag))
for (auto const& rIt : aGrabBag)
{
if (rIt.Name == "mso-tcPr-vert-value")
{
@@ -2697,19 +2697,19 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
OUString progID;
for (auto const& it : std::as_const(grabBag))
for (auto const& it : grabBag)
{
if (it.Name == "EmbeddedObjects")
{
uno::Sequence<beans::PropertyValue> objects;
it.Value >>= objects;
for (auto const& object : std::as_const(objects))
for (auto const& object : objects)
{
if (object.Name == entryName)
{
uno::Sequence<beans::PropertyValue> props;
object.Value >>= props;
for (auto const& prop : std::as_const(props))
for (auto const& prop : props)
{
if (prop.Name == "ProgID")
{
+2 -2
View File
@@ -391,7 +391,7 @@ static void lclDumpAnyValue( const Any& value)
Sequence< PropertyValue > aBulletPropSeq;
fprintf (stderr, "level %d\n", k);
if (xNumRule->getByIndex (k) >>= aBulletPropSeq) {
for (const PropertyValue& rProp : std::as_const(aBulletPropSeq)) {
for (const PropertyValue& rProp : aBulletPropSeq) {
fprintf(stderr, "%46s = ", USS (rProp.Name));
lclDumpAnyValue (rProp.Value);
}
@@ -820,7 +820,7 @@ static const char* lclDumpAnyValueCode( const Any& value, int level)
Sequence< PropertyValue > aBulletPropSeq;
fprintf (stderr, "level %d\n", k);
if (xNumRule->getByIndex (k) >>= aBulletPropSeq) {
for (const PropertyValue& rProp : std::as_const(aBulletPropSeq)) {
for (const PropertyValue& rProp : aBulletPropSeq) {
fprintf(stderr, "%46s = ", USS (rProp.Name));
lclDumpAnyValue (rProp.Value);
}
+1 -1
View File
@@ -223,7 +223,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > con
uno::Sequence< uno::Sequence < beans::NamedValue > > aKeyInfoSequence;
*pKeyInfoProperty >>= aKeyInfoSequence;
for (const uno::Sequence<beans::NamedValue>& rKeyInfoSequence : std::as_const(aKeyInfoSequence))
for (const uno::Sequence<beans::NamedValue>& rKeyInfoSequence : aKeyInfoSequence)
{
uno::Sequence < sal_Int8 > aPgpKeyID;
uno::Sequence < sal_Int8 > aPgpKeyPacket;
+1 -1
View File
@@ -340,7 +340,7 @@ bool OWriteStream_Impl::IsEncrypted()
}
bool bToBeEncr = false;
for ( const auto& rProp : std::as_const(m_aProps) )
for (const auto& rProp : m_aProps)
{
if ( rProp.Name == "Encrypted" )
{

Some files were not shown because too many files have changed in this diff Show More