[Libreoffice-commits] core.git: basctl/source basic/source canvas/source comphelper/source configmgr/source connectivity/source cppcanvas/source cui/source dbaccess/source extensions/source forms/source fpicker/source reportdesign/source scripting/source sc/source sfx2/source slideshow/source svtools/source svx/source toolkit/source ucb/source uui/source xmloff/source
Noel Grandin
noel.grandin at collabora.co.uk
Thu Jul 6 06:37:30 UTC 2017
basctl/source/basicide/documentenumeration.cxx | 11 +--
basic/source/basmgr/basmgr.cxx | 18 ++----
basic/source/uno/namecont.cxx | 14 +---
canvas/source/cairo/cairo_textlayout.cxx | 4 -
canvas/source/vcl/textlayout.cxx | 4 -
comphelper/source/misc/namedvaluecollection.cxx | 24 +++-----
comphelper/source/property/opropertybag.cxx | 24 ++++----
configmgr/source/update.cxx | 4 -
connectivity/source/commontools/dbtools.cxx | 4 -
connectivity/source/commontools/dbtools2.cxx | 4 -
connectivity/source/drivers/hsqldb/HDriver.cxx | 7 --
connectivity/source/drivers/jdbc/JConnection.cxx | 11 +--
cppcanvas/source/mtfrenderer/textaction.cxx | 4 -
cui/source/customize/macropg.cxx | 4 -
cui/source/dialogs/hangulhanjadlg.cxx | 6 --
dbaccess/source/core/api/definitioncolumn.cxx | 7 --
dbaccess/source/core/api/resultset.cxx | 9 +--
dbaccess/source/core/dataaccess/connection.cxx | 7 --
dbaccess/source/core/dataaccess/databasecontext.cxx | 10 +--
dbaccess/source/core/dataaccess/databasedocument.cxx | 14 ++--
dbaccess/source/core/dataaccess/databaseregistrations.cxx | 15 +----
dbaccess/source/core/dataaccess/datasource.cxx | 35 ++++-------
dbaccess/source/core/misc/ContainerMediator.cxx | 10 +--
dbaccess/source/core/misc/DatabaseDataProvider.cxx | 4 -
dbaccess/source/core/recovery/dbdocrecovery.cxx | 6 --
dbaccess/source/ext/macromigration/migrationengine.cxx | 33 ++++-------
dbaccess/source/ui/browser/unodatbr.cxx | 4 -
dbaccess/source/ui/control/tabletree.cxx | 8 --
dbaccess/source/ui/dlg/adtabdlg.cxx | 6 --
dbaccess/source/ui/misc/UITools.cxx | 8 +-
dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 4 -
dbaccess/source/ui/misc/dsmeta.cxx | 9 +--
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 7 --
dbaccess/source/ui/querydesign/TableFieldDescription.cxx | 4 -
dbaccess/source/ui/querydesign/querycontroller.cxx | 4 -
extensions/source/bibliography/formcontrolcontainer.cxx | 4 -
extensions/source/dbpilots/commonpagesdbp.cxx | 8 +-
extensions/source/propctrlr/cellbindinghelper.cxx | 4 -
extensions/source/propctrlr/genericpropertyhandler.cxx | 11 +--
extensions/source/propctrlr/listselectiondlg.cxx | 12 +---
extensions/source/propctrlr/propcontroller.cxx | 13 +---
forms/source/component/DatabaseForm.cxx | 15 ++---
forms/source/component/Edit.cxx | 16 +----
forms/source/component/FormComponent.cxx | 16 +----
forms/source/component/ListBox.cxx | 42 ++++++--------
forms/source/misc/componenttools.cxx | 4 -
fpicker/source/office/OfficeControlAccess.cxx | 9 ---
reportdesign/source/core/api/ReportDefinition.cxx | 3 -
reportdesign/source/ui/inspection/GeometryHandler.cxx | 6 --
sc/source/ui/unoobj/cellvaluebinding.cxx | 6 --
scripting/source/dlgprov/dlgprov.cxx | 6 --
sfx2/source/appl/shutdowniconaqua.mm | 6 --
sfx2/source/appl/shutdowniconw32.cxx | 6 --
sfx2/source/dialog/backingwindow.cxx | 6 --
sfx2/source/dialog/filtergrouping.cxx | 12 ++--
sfx2/source/doc/sfxbasemodel.cxx | 4 -
sfx2/source/doc/sfxmodelfactory.cxx | 4 -
slideshow/source/engine/slideshowimpl.cxx | 4 -
svtools/source/uno/svtxgridcontrol.cxx | 9 +--
svx/source/form/databaselocationinput.cxx | 7 --
svx/source/form/filtnav.cxx | 9 +--
svx/source/form/fmvwimp.cxx | 10 +--
svx/source/form/formcontroller.cxx | 12 +---
svx/source/form/formcontrolling.cxx | 4 -
toolkit/source/awt/vclxwindows.cxx | 6 --
toolkit/source/controls/controlmodelcontainerbase.cxx | 6 --
toolkit/source/controls/formattedcontrol.cxx | 9 +--
toolkit/source/controls/geometrycontrolmodel.cxx | 8 +-
toolkit/source/controls/unocontrol.cxx | 7 --
toolkit/source/controls/unocontrols.cxx | 12 ++--
ucb/source/ucp/ext/ucpext_content.cxx | 4 -
ucb/source/ucp/ext/ucpext_datasupplier.cxx | 9 +--
uui/source/iahndl.cxx | 14 +---
xmloff/source/forms/elementexport.cxx | 15 ++---
xmloff/source/forms/formcellbinding.cxx | 4 -
xmloff/source/forms/gridcolumnproptranslator.cxx | 8 +-
xmloff/source/xforms/xformsexport.cxx | 9 +--
xmloff/source/xforms/xformsimport.cxx | 20 ++----
78 files changed, 285 insertions(+), 461 deletions(-)
New commits:
commit ab9b38a4064141705aa3a3de9a5d73b465ad3af3
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Jul 5 13:27:30 2017 +0200
use more begin()/end() for Sequence
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
diff --git a/basctl/source/basicide/documentenumeration.cxx b/basctl/source/basicide/documentenumeration.cxx
index 224189d5e678..70894659b6c5 100644
--- a/basctl/source/basicide/documentenumeration.cxx
+++ b/basctl/source/basicide/documentenumeration.cxx
@@ -107,17 +107,14 @@ namespace basctl { namespace docs {
// ensure we don't encounter some models multiple times
std::set< Reference< XModel >, ::comphelper::OInterfaceCompare< XModel > > aEncounteredModels;
- for ( const Reference< XFrame >* pFrame = _rFrames.getConstArray();
- pFrame != _rFrames.getConstArray() + _rFrames.getLength();
- ++pFrame
- )
+ for ( auto const & rFrame : _rFrames )
{
try
{
- OSL_ENSURE( pFrame->is(), "lcl_getDocuments_nothrow: illegal frame!" );
- if ( !pFrame->is() )
+ OSL_ENSURE( rFrame.is(), "lcl_getDocuments_nothrow: illegal frame!" );
+ if ( !rFrame.is() )
continue;
- Reference< XController > xController( (*pFrame)->getController() );
+ Reference< XController > xController( rFrame->getController() );
if ( !xController.is() )
continue;
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 762ac7a70ef3..464c10489b46 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1432,31 +1432,27 @@ bool BasicManager::LegacyPsswdBinaryLimitExceeded( std::vector< OUString >& _out
uno::Reference< script::XLibraryContainerPassword > xPassword( GetScriptLibraryContainer(), uno::UNO_QUERY_THROW );
uno::Sequence< OUString > aNames( xScripts->getElementNames() );
- const OUString* pNames = aNames.getConstArray();
- const OUString* pNamesEnd = aNames.getConstArray() + aNames.getLength();
- for ( ; pNames != pNamesEnd; ++pNames )
+ for ( auto const & scriptElementName : aNames )
{
- if( !xPassword->isLibraryPasswordProtected( *pNames ) )
+ if( !xPassword->isLibraryPasswordProtected( scriptElementName ) )
continue;
- StarBASIC* pBasicLib = GetLib( *pNames );
+ StarBASIC* pBasicLib = GetLib( scriptElementName );
if ( !pBasicLib )
continue;
- uno::Reference< container::XNameAccess > xScriptLibrary( xScripts->getByName( *pNames ), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xScriptLibrary( xScripts->getByName( scriptElementName ), uno::UNO_QUERY_THROW );
uno::Sequence< OUString > aElementNames( xScriptLibrary->getElementNames() );
sal_Int32 nLen = aElementNames.getLength();
std::vector< OUString > aBigModules( nLen );
sal_Int32 nBigModules = 0;
- const OUString* pElementNames = aElementNames.getConstArray();
- const OUString* pElementNamesEnd = aElementNames.getConstArray() + aElementNames.getLength();
- for ( ; pElementNames != pElementNamesEnd; ++pElementNames )
+ for ( auto const & libraryElementName : aElementNames )
{
- SbModule* pMod = pBasicLib->FindModule( *pElementNames );
+ SbModule* pMod = pBasicLib->FindModule( libraryElementName );
if ( pMod && pMod->ExceedsLegacyModuleSize() )
- aBigModules[ nBigModules++ ] = *pElementNames;
+ aBigModules[ nBigModules++ ] = libraryElementName;
}
if ( nBigModules )
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index a76d47a23723..4a31ce5b2709 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -2014,22 +2014,16 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
{
// remove
const Sequence< OUString > aRemoveNames( xSourceLibrariesStor->getElementNames() );
- for ( const OUString* pRemoveName = aRemoveNames.getConstArray();
- pRemoveName != aRemoveNames.getConstArray() + aRemoveNames.getLength();
- ++pRemoveName
- )
+ for ( auto const & removeName : aRemoveNames )
{
- xSourceLibrariesStor->removeElement( *pRemoveName );
+ xSourceLibrariesStor->removeElement( removeName );
}
// copy
const Sequence< OUString > aCopyNames( xTargetLibrariesStor->getElementNames() );
- for ( const OUString* pCopyName = aCopyNames.getConstArray();
- pCopyName != aCopyNames.getConstArray() + aCopyNames.getLength();
- ++pCopyName
- )
+ for ( auto const & copyName : aCopyNames )
{
- xTargetLibrariesStor->copyElementTo( *pCopyName, xSourceLibrariesStor, *pCopyName );
+ xTargetLibrariesStor->copyElementTo( copyName, xSourceLibrariesStor, copyName );
}
}
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 3b6356c6cd51..09371f862a04 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -553,8 +553,8 @@ namespace cairocanvas
renderState);
// fill integer offsets
- std::transform( inputOffsets.getConstArray(),
- inputOffsets.getConstArray()+inputOffsets.getLength(),
+ std::transform( inputOffsets.begin(),
+ inputOffsets.end(),
outputOffsets,
OffsetTransformer( aMatrix ) );
}
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 1a52371029a4..b6fcd5ffd5ad 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -411,8 +411,8 @@ namespace vclcanvas
renderState);
// fill integer offsets
- std::transform( inputOffsets.getConstArray(),
- inputOffsets.getConstArray()+inputOffsets.getLength(),
+ std::transform( inputOffsets.begin(),
+ inputOffsets.end(),
outputOffsets,
OffsetTransformer( aMatrix ) );
}
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index a6f732937b4e..9c03be3fd861 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -192,21 +192,19 @@ namespace comphelper
PropertyValue aPropertyValue;
NamedValue aNamedValue;
- const Any* pArgument = _rArguments.getConstArray();
- const Any* pArgumentEnd = _rArguments.getConstArray() + _rArguments.getLength();
- for ( ; pArgument != pArgumentEnd; ++pArgument )
+ for ( auto const & argument : _rArguments )
{
- if ( *pArgument >>= aPropertyValue )
+ if ( argument >>= aPropertyValue )
m_pImpl->aValues[ aPropertyValue.Name ] = aPropertyValue.Value;
- else if ( *pArgument >>= aNamedValue )
+ else if ( argument >>= aNamedValue )
m_pImpl->aValues[ aNamedValue.Name ] = aNamedValue.Value;
else
{
SAL_WARN_IF(
- pArgument->hasValue(), "comphelper",
+ argument.hasValue(), "comphelper",
("NamedValueCollection::impl_assign: encountered a value"
" type which I cannot handle: "
- + pArgument->getValueTypeName()));
+ + argument.getValueTypeName()));
}
}
}
@@ -219,10 +217,8 @@ namespace comphelper
m_pImpl->aValues.swap( aEmpty );
}
- const PropertyValue* pArgument = _rArguments.getConstArray();
- const PropertyValue* pArgumentEnd = _rArguments.getConstArray() + _rArguments.getLength();
- for ( ; pArgument != pArgumentEnd; ++pArgument )
- m_pImpl->aValues[ pArgument->Name ] = pArgument->Value;
+ for ( auto const & argument : _rArguments )
+ m_pImpl->aValues[ argument.Name ] = argument.Value;
}
@@ -233,10 +229,8 @@ namespace comphelper
m_pImpl->aValues.swap( aEmpty );
}
- const NamedValue* pArgument = _rArguments.getConstArray();
- const NamedValue* pArgumentEnd = _rArguments.getConstArray() + _rArguments.getLength();
- for ( ; pArgument != pArgumentEnd; ++pArgument )
- m_pImpl->aValues[ pArgument->Name ] = pArgument->Value;
+ for ( auto const & argument : _rArguments )
+ m_pImpl->aValues[ argument.Name ] = argument.Value;
}
diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx
index 740de1ca2df4..84e1e7527ff7 100644
--- a/comphelper/source/property/opropertybag.cxx
+++ b/comphelper/source/property/opropertybag.cxx
@@ -87,8 +87,8 @@ namespace comphelper
&& (_rArguments[2] >>= AutomaticAddition))
{
std::copy(
- aTypes.getConstArray(),
- aTypes.getConstArray() + aTypes.getLength(),
+ aTypes.begin(),
+ aTypes.end(),
std::insert_iterator< TypeBag >( m_aAllowedTypes, m_aAllowedTypes.begin() )
);
m_bAutoAddProperties = AutomaticAddition;
@@ -98,8 +98,8 @@ namespace comphelper
if ( aArguments.get_ensureType( "AllowedTypes", aTypes ) )
std::copy(
- aTypes.getConstArray(),
- aTypes.getConstArray() + aTypes.getLength(),
+ aTypes.begin(),
+ aTypes.end(),
std::insert_iterator< TypeBag >( m_aAllowedTypes, m_aAllowedTypes.begin() )
);
@@ -388,8 +388,8 @@ namespace comphelper
// their names
Sequence< OUString > aNames( aProperties.getLength() );
std::transform(
- aProperties.getConstArray(),
- aProperties.getConstArray() + aProperties.getLength(),
+ aProperties.begin(),
+ aProperties.end(),
aNames.getArray(),
TransformPropertyToName< Property >()
);
@@ -437,16 +437,16 @@ namespace comphelper
// sort (the XMultiPropertySet interface requires this)
Sequence< PropertyValue > aProperties( _rProps );
std::sort(
- aProperties.getArray(),
- aProperties.getArray() + aProperties.getLength(),
+ aProperties.begin(),
+ aProperties.end(),
ComparePropertyValueByName()
);
// a sequence of names
Sequence< OUString > aNames( aProperties.getLength() );
std::transform(
- aProperties.getConstArray(),
- aProperties.getConstArray() + aProperties.getLength(),
+ aProperties.begin(),
+ aProperties.end(),
aNames.getArray(),
TransformPropertyToName< PropertyValue >()
);
@@ -490,8 +490,8 @@ namespace comphelper
// a sequence of values
Sequence< Any > aValues( aProperties.getLength() );
std::transform(
- aProperties.getConstArray(),
- aProperties.getConstArray() + aProperties.getLength(),
+ aProperties.begin(),
+ aProperties.end(),
aValues.getArray(),
ExtractPropertyValue()
);
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index a830dd616f73..e084a920e614 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -51,9 +51,7 @@ namespace {
std::set< OUString > seqToSet(
css::uno::Sequence< OUString > const & sequence)
{
- return std::set< OUString >(
- sequence.getConstArray(),
- sequence.getConstArray() + sequence.getLength());
+ return std::set< OUString >( sequence.begin(), sequence.end() );
}
class Service:
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 24eee42a4cf2..109217552183 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1375,8 +1375,8 @@ OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString&
{
std::set< OUString > aUsedNames;
std::copy(
- _rNames.getConstArray(),
- _rNames.getConstArray() + _rNames.getLength(),
+ _rNames.begin(),
+ _rNames.end(),
std::insert_iterator< std::set< OUString > >( aUsedNames, aUsedNames.end() )
);
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 000cd740f513..c7097ae960e7 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -637,8 +637,8 @@ bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp, const OUSt
{
Sequence< PropertyValue > aInfo;
xProp->getPropertyValue("Info") >>= aInfo;
- const PropertyValue* pValue =std::find_if(aInfo.getConstArray(),
- aInfo.getConstArray() + aInfo.getLength(),
+ const PropertyValue* pValue =std::find_if(aInfo.begin(),
+ aInfo.end(),
std::bind2nd(TPropertyValueEqualFunctor(),_sProperty));
if ( pValue && pValue != (aInfo.getConstArray() + aInfo.getLength()) )
pValue->Value >>= bEnabled;
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 5face6249692..d86826fc6504 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -149,13 +149,10 @@ namespace connectivity
OUStringBuffer aPermittedMethods;
Sequence< OUString > aNodeNames( aConfig.getNodeNames() );
- for ( const OUString* pNodeNames = aNodeNames.getConstArray();
- pNodeNames != aNodeNames.getConstArray() + aNodeNames.getLength();
- ++pNodeNames
- )
+ for ( auto const & nodeName : aNodeNames )
{
OUString sPermittedMethod;
- OSL_VERIFY( aConfig.getNodeValue( *pNodeNames ) >>= sPermittedMethod );
+ OSL_VERIFY( aConfig.getNodeValue( nodeName ) >>= sPermittedMethod );
if ( !aPermittedMethods.isEmpty() )
aPermittedMethods.append( ';' );
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 4239aca287da..d451148fc988 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -633,17 +633,14 @@ namespace
if ( nSetPropertyMethodID == nullptr )
return false;
- for ( const NamedValue* pSystemProp = _rSystemProperties.getConstArray();
- pSystemProp != _rSystemProperties.getConstArray() + _rSystemProperties.getLength();
- ++pSystemProp
- )
+ for ( auto const & systemProp : _rSystemProperties )
{
OUString sValue;
- OSL_VERIFY( pSystemProp->Value >>= sValue );
+ OSL_VERIFY( systemProp.Value >>= sValue );
- _rLogger.log( LogLevel::FINER, STR_LOG_SETTING_SYSTEM_PROPERTY, pSystemProp->Name, sValue );
+ _rLogger.log( LogLevel::FINER, STR_LOG_SETTING_SYSTEM_PROPERTY, systemProp.Name, sValue );
- LocalRef< jstring > jName( _rEnv, convertwchar_tToJavaString( &_rEnv, pSystemProp->Name ) );
+ LocalRef< jstring > jName( _rEnv, convertwchar_tToJavaString( &_rEnv, systemProp.Name ) );
LocalRef< jstring > jValue( _rEnv, convertwchar_tToJavaString( &_rEnv, sValue ) );
_rEnv.CallStaticObjectMethod( systemClass.get(), nSetPropertyMethodID, jName.get(), jValue.get() );
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 51554a2e3595..442a09b6170a 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -157,9 +157,7 @@ namespace cppcanvas
return tools::createTextLinesPolyPolygon(
0.0,
// extract character cell furthest to the right
- *(std::max_element(
- rOffsets.getConstArray(),
- rOffsets.getConstArray() + rOffsets.getLength() )),
+ *(std::max_element( rOffsets.begin(), rOffsets.end() )),
rTextLineInfo );
}
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index d3b68e626951..d171411c72d2 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -507,8 +507,8 @@ void SvxMacroTabPage_::DisplayAppEvents( bool appEvents)
Sequence< OUString > eventNames = nameReplace->getElementNames();
std::set< OUString > aEventNamesCache;
std::copy(
- eventNames.getConstArray(),
- eventNames.getConstArray() + eventNames.getLength(),
+ eventNames.begin(),
+ eventNames.end(),
std::insert_iterator< std::set< OUString > >( aEventNamesCache, aEventNamesCache.end() )
);
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index dfa081b62cd2..cb610a612807 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -639,10 +639,8 @@ namespace svx
void HangulHanjaConversionDialog::FillSuggestions( const css::uno::Sequence< OUString >& _rSuggestions )
{
m_pSuggestions->Clear();
- const OUString* pSuggestions = _rSuggestions.getConstArray();
- const OUString* pSuggestionsEnd = _rSuggestions.getConstArray() + _rSuggestions.getLength();
- while ( pSuggestions != pSuggestionsEnd )
- m_pSuggestions->InsertEntry( *pSuggestions++ );
+ for ( auto const & suggestion : _rSuggestions )
+ m_pSuggestions->InsertEntry( suggestion );
// select the first suggestion, and fill in the suggestion edit field
OUString sFirstSuggestion;
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 572c6c2eebac..a3ef15206420 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -474,12 +474,9 @@ Sequence< OUString > OTableColumnDescriptorWrapper::getSupportedServiceNames( )
if ( !m_bIsDescriptor )
{
- for ( Property* prop = aDescriptor.getArray();
- prop != aDescriptor.getArray() + aDescriptor.getLength();
- ++prop
- )
+ for ( auto & prop : aDescriptor )
{
- prop->Attributes |= PropertyAttribute::READONLY;
+ prop.Attributes |= PropertyAttribute::READONLY;
}
}
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index a8fe61e40fdc..320e2fc4f596 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -366,15 +366,12 @@ Reference< css::container::XNameAccess > OResultSet::getColumns()
const Sequence< OUString > aNames( xColNames->getElementNames() );
SAL_WARN_IF( aNames.getLength() != nColCount, "dbaccess",
"OResultSet::getColumns: invalid column count!" );
- for ( const OUString* pName = aNames.getConstArray();
- pName != aNames.getConstArray() + aNames.getLength();
- ++pName
- )
+ for ( auto const & name : aNames )
{
- Reference< XPropertySet > xColProps( xColNames->getByName( *pName ), UNO_QUERY_THROW );
+ Reference< XPropertySet > xColProps( xColNames->getByName( name ), UNO_QUERY_THROW );
OUString sName;
OSL_VERIFY( xColProps->getPropertyValue( PROPERTY_NAME ) >>= sName );
- SAL_WARN_IF( sName != *pName, "dbaccess", "OResultSet::getColumns: invalid column name!" );
+ SAL_WARN_IF( sName != name, "dbaccess", "OResultSet::getColumns: invalid column name!" );
}
}
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index d72e534bb450..4c36eb9982c9 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -772,12 +772,9 @@ void OConnection::impl_checkTableQueryNames_nothrow()
Reference< XNameAccess > xQueries( getQueries() );
Sequence< OUString > aQueryNames( xQueries->getElementNames() );
- for ( const OUString* pQueryName = aQueryNames.getConstArray();
- pQueryName != aQueryNames.getConstArray() + aQueryNames.getLength();
- ++pQueryName
- )
+ for ( auto const & queryName : aQueryNames )
{
- if ( aSortedTableNames.find( *pQueryName ) != aSortedTableNames.end() )
+ if ( aSortedTableNames.find( queryName ) != aSortedTableNames.end() )
{
OUString sConflictWarning( DBA_RES( RID_STR_CONFLICTING_NAMES ) );
m_aWarnings.appendWarning( sConflictWarning, "01SB0", *this );
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 7f6ac225a0b1..237db1fce2fe 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -401,17 +401,15 @@ void ODatabaseContext::setTransientProperties(const OUString& _sURL, ODatabaseMo
OUString sAuthFailedPassword;
Reference< XPropertySet > xDSProps( _rDataSourceModel.getOrCreateDataSource(), UNO_QUERY_THROW );
const Sequence< PropertyValue >& rSessionPersistentProps = m_aDatasourceProperties[_sURL];
- const PropertyValue* pProp = rSessionPersistentProps.getConstArray();
- const PropertyValue* pPropsEnd = rSessionPersistentProps.getConstArray() + rSessionPersistentProps.getLength();
- for ( ; pProp != pPropsEnd; ++pProp )
+ for ( auto const & prop : rSessionPersistentProps )
{
- if ( pProp->Name == "AuthFailedPassword" )
+ if ( prop.Name == "AuthFailedPassword" )
{
- OSL_VERIFY( pProp->Value >>= sAuthFailedPassword );
+ OSL_VERIFY( prop.Value >>= sAuthFailedPassword );
}
else
{
- xDSProps->setPropertyValue( pProp->Name, pProp->Value );
+ xDSProps->setPropertyValue( prop.Name, prop.Value );
}
}
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index dc917cf7a72f..c49ea30d9d54 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -245,8 +245,8 @@ Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( )
aTypes = Sequence< Type >(
pStripTo,
std::remove_copy_if(
- aTypes.getConstArray(),
- aTypes.getConstArray() + aTypes.getLength(),
+ aTypes.begin(),
+ aTypes.end(),
pStripTo,
std::bind2nd( std::equal_to< Type >(), cppu::UnoType<XEmbeddedScripts>::get() )
) - pStripTo
@@ -256,8 +256,8 @@ Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( )
aTypes = Sequence< Type >(
pStripTo,
std::remove_copy_if(
- aTypes.getConstArray(),
- aTypes.getConstArray() + aTypes.getLength(),
+ aTypes.begin(),
+ aTypes.end(),
pStripTo,
std::bind2nd( std::equal_to< Type >(), cppu::UnoType<XScriptInvocationContext>::get() )
) - pStripTo
@@ -594,13 +594,11 @@ namespace
Reference< css::sdb::application::XDatabaseDocumentUI > xDatabaseUI( i_rController, UNO_QUERY_THROW );
Sequence< Reference< XComponent > > aComponents( xDatabaseUI->getSubComponents() );
- const Reference< XComponent >* component = aComponents.getConstArray();
- const Reference< XComponent >* componentsEnd = aComponents.getConstArray() + aComponents.getLength();
bool isAnyModified = false;
- for ( ; component != componentsEnd; ++component )
+ for ( auto const & xComponent : aComponents )
{
- Reference< XModifiable > xModify( *component, UNO_QUERY );
+ Reference< XModifiable > xModify( xComponent, UNO_QUERY );
if ( xModify.is() )
{
isAnyModified = xModify->isModified();
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index 6734c2e7dc57..be0d94e2d2b7 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -150,12 +150,9 @@ namespace dbaccess
::utl::OConfigurationNode DatabaseRegistrations::impl_getNodeForName_nothrow( const OUString& _rName )
{
Sequence< OUString > aNames( m_aConfigurationRoot.getNodeNames() );
- for ( const OUString* pName = aNames.getConstArray();
- pName != aNames.getConstArray() + aNames.getLength();
- ++pName
- )
+ for ( auto const & nodeName : aNames )
{
- ::utl::OConfigurationNode aNodeForName = m_aConfigurationRoot.openNode( *pName );
+ ::utl::OConfigurationNode aNodeForName = m_aConfigurationRoot.openNode( nodeName );
OUString sTestName;
OSL_VERIFY( aNodeForName.getNodeValue( getNameNodeName() ) >>= sTestName );
@@ -244,13 +241,11 @@ namespace dbaccess
Sequence< OUString > aDisplayNames( aProgrammaticNames.getLength() );
OUString* pDisplayName = aDisplayNames.getArray();
- for ( const OUString* pName = aProgrammaticNames.getConstArray();
- pName != aProgrammaticNames.getConstArray() + aProgrammaticNames.getLength();
- ++pName, ++pDisplayName
- )
+ for ( auto const & name : aProgrammaticNames )
{
- ::utl::OConfigurationNode aRegistrationNode = m_aConfigurationRoot.openNode( *pName );
+ ::utl::OConfigurationNode aRegistrationNode = m_aConfigurationRoot.openNode( name );
OSL_VERIFY( aRegistrationNode.getNodeValue( getNameNodeName() ) >>= *pDisplayName );
+ ++pDisplayName;
}
return aDisplayNames;
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 81df15a36620..88b29f800642 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -759,11 +759,9 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any &
if (!(rValue >>= aValues))
throw IllegalArgumentException();
- const PropertyValue* valueEnd = aValues.getConstArray() + aValues.getLength();
- const PropertyValue* checkName = aValues.getConstArray();
- for ( ;checkName != valueEnd; ++checkName )
+ for ( auto const & checkName : aValues )
{
- if ( checkName->Name.isEmpty() )
+ if ( checkName.Name.isEmpty() )
throw IllegalArgumentException();
}
@@ -773,7 +771,7 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any &
{
const PropertyValue* pInfoIter = aSettings.getConstArray();
const PropertyValue* checkValue = aValues.getConstArray();
- for ( ;!bModified && checkValue != valueEnd ; ++checkValue,++pInfoIter)
+ for ( ;!bModified && checkValue != aValues.end() ; ++checkValue,++pInfoIter)
{
bModified = checkValue->Name != pInfoIter->Name;
if ( !bModified )
@@ -824,8 +822,8 @@ namespace
typedef std::set< OUString > StringSet;
StringSet aToBeSetPropertyNames;
std::transform(
- _rAllNewPropertyValues.getConstArray(),
- _rAllNewPropertyValues.getConstArray() + _rAllNewPropertyValues.getLength(),
+ _rAllNewPropertyValues.begin(),
+ _rAllNewPropertyValues.end(),
std::insert_iterator< StringSet >( aToBeSetPropertyNames, aToBeSetPropertyNames.end() ),
SelectPropertyName()
);
@@ -839,19 +837,17 @@ namespace
Reference< XPropertyState > xPropertyState( _rxPropertyBag, UNO_QUERY_THROW );
// loop through them, and reset resp. default properties which are not to be set
- const Property* pExistentProperty( aAllExistentProperties.getConstArray() );
- const Property* pExistentPropertyEnd( aAllExistentProperties.getConstArray() + aAllExistentProperties.getLength() );
- for ( ; pExistentProperty != pExistentPropertyEnd; ++pExistentProperty )
+ for ( auto const & existentProperty : aAllExistentProperties )
{
- if ( aToBeSetPropertyNames.find( pExistentProperty->Name ) != aToBeSetPropertyNames.end() )
+ if ( aToBeSetPropertyNames.find( existentProperty.Name ) != aToBeSetPropertyNames.end() )
continue;
// this property is not to be set, but currently exists in the bag.
// -> Remove it, or reset it to the default.
- if ( ( pExistentProperty->Attributes & PropertyAttribute::REMOVABLE ) != 0 )
- _rxPropertyBag->removeProperty( pExistentProperty->Name );
+ if ( ( existentProperty.Attributes & PropertyAttribute::REMOVABLE ) != 0 )
+ _rxPropertyBag->removeProperty( existentProperty.Name );
else
- xPropertyState->setPropertyToDefault( pExistentProperty->Name );
+ xPropertyState->setPropertyToDefault( existentProperty.Name );
}
// finally, set the new property values
@@ -944,12 +940,9 @@ void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con
Reference< XPropertySetInfo > xPST( xSettingsAsProps->getPropertySetInfo(), UNO_QUERY_THROW );
Sequence< Property > aSettings( xPST->getProperties() );
std::map< OUString, sal_Int32 > aPropertyAttributes;
- for ( const Property* pSettings = aSettings.getConstArray();
- pSettings != aSettings.getConstArray() + aSettings.getLength();
- ++pSettings
- )
+ for ( auto const & setting : aSettings )
{
- aPropertyAttributes[ pSettings->Name ] = pSettings->Attributes;
+ aPropertyAttributes[ setting.Name ] = setting.Attributes;
}
// get all current settings with their values
@@ -959,8 +952,8 @@ void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con
// criteria survive
Sequence< PropertyValue > aNonDefaultOrUserDefined( aValues.getLength() );
const PropertyValue* pCopyEnd = std::remove_copy_if(
- aValues.getConstArray(),
- aValues.getConstArray() + aValues.getLength(),
+ aValues.begin(),
+ aValues.end(),
aNonDefaultOrUserDefined.getArray(),
IsDefaultAndNotRemoveable( aPropertyAttributes )
);
diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx
index a803a7d87b68..adde1ade5b3a 100644
--- a/dbaccess/source/core/misc/ContainerMediator.cxx
+++ b/dbaccess/source/core/misc/ContainerMediator.cxx
@@ -211,16 +211,14 @@ void OContainerMediator::notifyElementCreated( const OUString& _sName, const Ref
// collect the to-be-monitored properties
Reference< XPropertySetInfo > xPSI( _xDest->getPropertySetInfo(), UNO_QUERY_THROW );
Sequence< Property > aProperties( xPSI->getProperties() );
- const Property* property = aProperties.getConstArray();
- const Property* propertyEnd = aProperties.getConstArray() + aProperties.getLength();
- for ( ; property != propertyEnd; ++property )
+ for ( auto const & property : aProperties )
{
- if ( ( property->Attributes & PropertyAttribute::READONLY ) != 0 )
+ if ( ( property.Attributes & PropertyAttribute::READONLY ) != 0 )
continue;
- if ( ( property->Attributes & PropertyAttribute::BOUND ) == 0 )
+ if ( ( property.Attributes & PropertyAttribute::BOUND ) == 0 )
continue;
- aPropertyList.push_back( property->Name );
+ aPropertyList.push_back( property.Name );
}
}
catch( const Exception& )
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index ef6345f0b024..aaca4ecd9cd3 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -711,8 +711,8 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor
{
aColumns.resize( aRowSetColumnNames.getLength() );
std::transform(
- aRowSetColumnNames.getConstArray(),
- aRowSetColumnNames.getConstArray() + aRowSetColumnNames.getLength(),
+ aRowSetColumnNames.begin(),
+ aRowSetColumnNames.end(),
aColumns.begin(),
CreateColumnDescription()
);
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 31068a852ad7..62407e4df00f 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -250,11 +250,9 @@ namespace dbaccess
Reference< XDatabaseDocumentUI > xDatabaseUI( *ctrl, UNO_QUERY_THROW );
Sequence< Reference< XComponent > > aComponents( xDatabaseUI->getSubComponents() );
- const Reference< XComponent >* component = aComponents.getConstArray();
- const Reference< XComponent >* componentEnd = aComponents.getConstArray() + aComponents.getLength();
- for ( ; component != componentEnd; ++component )
+ for ( auto const & component : aComponents )
{
- SubComponentRecovery aComponentRecovery( m_pData->aContext, xDatabaseUI, *component );
+ SubComponentRecovery aComponentRecovery( m_pData->aContext, xDatabaseUI, component );
aComponentRecovery.saveToRecoveryStorage( xRecoveryStorage, aMapCompDescs );
}
}
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index 2ef661e0ce08..cd1477fcc1a2 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -675,8 +675,8 @@ namespace dbmm
std::set< OUString > aNames;
std::copy(
- aElementNames.getConstArray(),
- aElementNames.getConstArray() + aElementNames.getLength(),
+ aElementNames.begin(),
+ aElementNames.end(),
std::insert_iterator< std::set< OUString > >( aNames, aNames.end() )
);
return aNames;
@@ -971,13 +971,10 @@ namespace dbmm
OUString( _rContainerLoc + "/" ) );
Sequence< OUString > aElementNames( _rxContainer->getElementNames() );
- for ( const OUString* elementName = aElementNames.getConstArray();
- elementName != aElementNames.getConstArray() + aElementNames.getLength();
- ++elementName
- )
+ for ( auto const & elementName : aElementNames )
{
- Any aElement( _rxContainer->getByName( *elementName ) );
- OUString sElementName( sHierarhicalBase + *elementName );
+ Any aElement( _rxContainer->getByName( elementName ) );
+ OUString sElementName( sHierarhicalBase + elementName );
Reference< XNameAccess > xSubContainer( aElement, UNO_QUERY );
if ( xSubContainer.is() )
@@ -1439,12 +1436,9 @@ namespace dbmm
Reference< XNameContainer > xTargetLib( xTargetLibraries->createLibrary( sNewLibName ), UNO_QUERY_THROW );
Sequence< OUString > aLibElementNames( xSourceLib->getElementNames() );
- for ( const OUString* pSourceElementName = aLibElementNames.getConstArray();
- pSourceElementName != aLibElementNames.getConstArray() + aLibElementNames.getLength();
- ++pSourceElementName
- )
+ for ( auto const & sourceElementName : aLibElementNames )
{
- Any aElement = xSourceLib->getByName( *pSourceElementName );
+ Any aElement = xSourceLib->getByName( sourceElementName );
OSL_ENSURE( aElement.hasValue(),
"MigrationEngine_Impl::impl_migrateContainerLibraries_nothrow: invalid (empty) lib element!" );
@@ -1452,10 +1446,10 @@ namespace dbmm
if ( _eScriptType == eDialog )
{
impl_adjustDialogEvents_nothrow( aElement, lcl_getSubDocumentDescription( _rDocument ),
- *pSourceLibName, *pSourceElementName );
+ *pSourceLibName, sourceElementName );
}
- xTargetLib->insertByName( *pSourceElementName, aElement );
+ xTargetLib->insertByName( sourceElementName, aElement );
}
// transfer the read-only flag
@@ -1640,12 +1634,9 @@ namespace dbmm
Sequence< OUString > aEventNames = xEvents->getElementNames();
Any aEvent;
- for ( const OUString* eventName = aEventNames.getConstArray();
- eventName != aEventNames.getConstArray() + aEventNames.getLength();
- ++eventName
- )
+ for ( auto const & eventName : aEventNames )
{
- aEvent = xEvents->getByName( *eventName );
+ aEvent = xEvents->getByName( eventName );
if ( !aEvent.hasValue() )
continue;
@@ -1654,7 +1645,7 @@ namespace dbmm
continue;
// put back
- xEvents->replaceByName( *eventName, aEvent );
+ xEvents->replaceByName( eventName, aEvent );
}
}
catch( const Exception& )
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 5df2a564d76c..547a9a012872 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -265,8 +265,8 @@ Sequence< Type > SAL_CALL SbaTableQueryBrowser::getTypes( )
{
Sequence< Type > aStrippedTypes( aTypes.getLength() - 1 );
std::remove_copy_if(
- aTypes.getConstArray(),
- aTypes.getConstArray() + aTypes.getLength(),
+ aTypes.begin(),
+ aTypes.end(),
aStrippedTypes.getArray(),
std::bind2nd( std::equal_to< Type >(), cppu::UnoType<XScriptInvocationContext>::get() )
);
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index c42ba713a3ea..6cdab2604fde 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -188,9 +188,7 @@ namespace
{
OTableTreeListBox::TNames::value_type aRet;
aRet.first = name;
- const OUString* pIter = m_aViews.getConstArray();
- const OUString* pEnd = m_aViews.getConstArray() + m_aViews.getLength();
- aRet.second = std::any_of(pIter, pEnd,
+ aRet.second = std::any_of(m_aViews.begin(), m_aViews.end(),
[this, &name](const OUString& lhs)
{ return m_aEqualFunctor(lhs, name); } );
@@ -208,12 +206,10 @@ void OTableTreeListBox::UpdateTableList(
{
TNames aTables;
aTables.resize(_rTables.getLength());
- const OUString* pIter = _rTables.getConstArray();
- const OUString* pEnd = _rTables.getConstArray() + _rTables.getLength();
try
{
Reference< XDatabaseMetaData > xMeta( _rxConnection->getMetaData(), UNO_QUERY_THROW );
- std::transform( pIter, pEnd,
+ std::transform( _rTables.begin(), _rTables.end(),
aTables.begin(), OViewSetter( _rViews, xMeta->supportsMixedCaseQuotedIdentifiers() ) );
}
catch(Exception&)
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 2a80aefc3efa..8415d002f48e 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -289,10 +289,8 @@ void QueryListFacade::updateTableObjectList( bool /*_bAllowViews*/ )
}
Sequence< OUString > aQueryNames = xQueries->getElementNames();
- const OUString* pQuery = aQueryNames.getConstArray();
- const OUString* pQueryEnd = aQueryNames.getConstArray() + aQueryNames.getLength();
- while ( pQuery != pQueryEnd )
- m_rQueryList.InsertEntry( *pQuery++ );
+ for ( auto const & name : aQueryNames )
+ m_rQueryList.InsertEntry( name );
}
catch( const Exception& )
{
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index d1a1845ddc56..eefea14eebe9 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1034,17 +1034,17 @@ void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource,
_xDatasource->getPropertyValue(PROPERTY_INFO) >>= aInfo;
// search the right propertyvalue
- const PropertyValue* pValue =std::find_if(aInfo.getConstArray(), aInfo.getConstArray() + aInfo.getLength(),
+ const PropertyValue* pValue =std::find_if(aInfo.begin(), aInfo.end(),
[](const PropertyValue& lhs)
{return TPropertyValueEqualFunctor()(lhs, PROPERTY_AUTOINCREMENTCREATION);} );
- if ( pValue && pValue != (aInfo.getConstArray() + aInfo.getLength()) )
+ if ( pValue && pValue != aInfo.end() )
pValue->Value >>= _rsAutoIncrementValue;
- pValue =std::find_if(aInfo.getConstArray(), aInfo.getConstArray() + aInfo.getLength(),
+ pValue =std::find_if(aInfo.begin(), aInfo.end(),
[](const PropertyValue& lhs)
{return TPropertyValueEqualFunctor()(lhs, "IsAutoRetrievingEnabled");} );
- if ( pValue && pValue != (aInfo.getConstArray() + aInfo.getLength()) )
+ if ( pValue && pValue != aInfo.end() )
pValue->Value >>= _rAutoIncrementValueEnabled;
}
}
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 82a5d90e8e7f..87d5be71f7c2 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -228,8 +228,8 @@ namespace dbaui
{
Sequence< Type > aStrippedTypes( aTypes.getLength() - 1 );
std::remove_copy_if(
- aTypes.getConstArray(),
- aTypes.getConstArray() + aTypes.getLength(),
+ aTypes.begin(),
+ aTypes.end(),
aStrippedTypes.getArray(),
std::bind2nd( std::equal_to< Type >(), cppu::UnoType<XScriptInvocationContext>::get() )
);
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index 4e8da229b874..2d4f378a6211 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -92,13 +92,10 @@ namespace dbaui
{
::connectivity::DriversConfig aDriverConfig( ::comphelper::getProcessComponentContext() );
const uno::Sequence< OUString > aPatterns = aDriverConfig.getURLs();
- for ( const OUString* pattern = aPatterns.getConstArray();
- pattern != aPatterns.getConstArray() + aPatterns.getLength();
- ++pattern
- )
+ for ( auto const & pattern : aPatterns )
{
FeatureSet aCurrentSet;
- const ::comphelper::NamedValueCollection aCurrentFeatures( aDriverConfig.getFeatures( *pattern ).getNamedValues() );
+ const ::comphelper::NamedValueCollection aCurrentFeatures( aDriverConfig.getFeatures( pattern ).getNamedValues() );
const FeatureMapping* pFeatureMapping = lcl_getFeatureMappings();
while ( pFeatureMapping->pAsciiFeatureName )
@@ -108,7 +105,7 @@ namespace dbaui
++pFeatureMapping;
}
- s_aFeatureSets[ *pattern ] = aCurrentSet;
+ s_aFeatureSets[ pattern ] = aCurrentSet;
}
}
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 25e61b4bfbd8..6cce6ebd7c9a 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -3076,13 +3076,10 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >&
m_pSelectionBox->SetReadOnly( rController.isReadOnly() );
m_pSelectionBox->Fill();
- for ( const PropertyValue* field = i_rFieldDescriptions.getConstArray();
- field != i_rFieldDescriptions.getConstArray() + i_rFieldDescriptions.getLength();
- ++field
- )
+ for ( auto const & field : i_rFieldDescriptions )
{
::rtl::Reference< OTableFieldDesc > pField( new OTableFieldDesc() );
- pField->Load( *field, true );
+ pField->Load( field, true );
InsertField( pField, false );
}
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index bcde5918a1f7..44ead8996757 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -151,8 +151,8 @@ void OTableFieldDesc::Load( const css::beans::PropertyValue& i_rSettings, const
const Sequence< PropertyValue > aCriteria( aFieldDesc.getOrDefault( "Criteria", Sequence< PropertyValue >() ) );
m_aCriteria.resize( aCriteria.getLength() );
std::transform(
- aCriteria.getConstArray(),
- aCriteria.getConstArray() + aCriteria.getLength(),
+ aCriteria.begin(),
+ aCriteria.end(),
m_aCriteria.begin(),
SelectPropertyValueAsString()
);
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 91aae8d61b3c..1f7647c1d994 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -398,8 +398,8 @@ void SAL_CALL OQueryController::getFastPropertyValue( Any& o_rValue, sal_Int32 i
);
std::sort(
- aProps.getArray(),
- aProps.getArray() + aProps.getLength(),
+ aProps.begin(),
+ aProps.end(),
::comphelper::PropertyCompareByName()
);
diff --git a/extensions/source/bibliography/formcontrolcontainer.cxx b/extensions/source/bibliography/formcontrolcontainer.cxx
index ecae8048537c..fbe31d20e318 100644
--- a/extensions/source/bibliography/formcontrolcontainer.cxx
+++ b/extensions/source/bibliography/formcontrolcontainer.cxx
@@ -92,8 +92,8 @@ namespace bib
aControls = xControlCont->getControls();
std::for_each(
- aControls.getConstArray(),
- aControls.getConstArray() + aControls.getLength(),
+ aControls.begin(),
+ aControls.end(),
ControlModeSwitch( _bDesign )
);
}
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 5f3ed6459035..ef890085d72b 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -246,13 +246,11 @@ namespace dbp
namespace
{
- void lcl_fillEntries( ListBox& _rListBox, const Sequence< OUString >& _rNames, const Image& _rImage, sal_Int32 _nCommandType )
+ void lcl_fillEntries( ListBox& _rListBox, const Sequence< OUString >& _rNames, const Image& _rImage, sal_Int32 _nCommandType )
{
- const OUString* pNames = _rNames.getConstArray();
- const OUString* pNamesEnd = _rNames.getConstArray() + _rNames.getLength();
- while ( pNames != pNamesEnd )
+ for ( auto const & name : _rNames )
{
- const sal_Int32 nPos = _rListBox.InsertEntry( *pNames++, _rImage );
+ const sal_Int32 nPos = _rListBox.InsertEntry( name, _rImage );
_rListBox.SetEntryData( nPos, reinterpret_cast< void* >( _nCommandType ) );
}
}
diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx
index 42304b077df6..0a20acec0ac5 100644
--- a/extensions/source/propctrlr/cellbindinghelper.cxx
+++ b/extensions/source/propctrlr/cellbindinghelper.cxx
@@ -382,8 +382,8 @@ namespace pcr
aAvailableServices = xDocumentFactory->getAvailableServiceNames( );
const OUString* pFound = std::find_if(
- aAvailableServices.getConstArray(),
- aAvailableServices.getConstArray() + aAvailableServices.getLength(),
+ aAvailableServices.begin(),
+ aAvailableServices.end(),
StringCompare( _rService )
);
if ( pFound - aAvailableServices.getConstArray() < aAvailableServices.getLength() )
diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx
index 2998a8b15a14..0eb9a657b63f 100644
--- a/extensions/source/propctrlr/genericpropertyhandler.cxx
+++ b/extensions/source/propctrlr/genericpropertyhandler.cxx
@@ -469,12 +469,9 @@ namespace pcr
aProperties = xPSI->getProperties();
DBG_ASSERT( aProperties.getLength(), "GenericPropertyHandler::getSupportedProperties: no properties!" );
- for ( const Property* pProperties = aProperties.getConstArray();
- pProperties != aProperties.getConstArray() + aProperties.getLength();
- ++pProperties
- )
+ for ( auto const & property : aProperties )
{
- switch ( pProperties->Type.getTypeClass() )
+ switch ( property.Type.getTypeClass() )
{
case TypeClass_BOOLEAN:
case TypeClass_BYTE:
@@ -493,7 +490,7 @@ namespace pcr
case TypeClass_SEQUENCE:
{
- TypeClass eElementTypeClass = ::comphelper::getSequenceElementType( pProperties->Type ).getTypeClass();
+ TypeClass eElementTypeClass = ::comphelper::getSequenceElementType( property.Type ).getTypeClass();
if ( ( eElementTypeClass != TypeClass_STRING )
&& ( eElementTypeClass != TypeClass_BYTE )
&& ( eElementTypeClass != TypeClass_SHORT )
@@ -511,7 +508,7 @@ namespace pcr
continue;
}
- m_aProperties.insert( PropertyMap::value_type( pProperties->Name, *pProperties ) );
+ m_aProperties.insert( PropertyMap::value_type( property.Name, property ) );
}
}
catch( const Exception& )
diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx
index 41fc4b57d982..88bdf1573b9e 100644
--- a/extensions/source/propctrlr/listselectiondlg.cxx
+++ b/extensions/source/propctrlr/listselectiondlg.cxx
@@ -124,10 +124,8 @@ namespace pcr
void ListSelectionDialog::fillEntryList( const Sequence< OUString >& _rListEntries )
{
m_pEntries->Clear();
- const OUString* _pListEntries = _rListEntries.getConstArray();
- const OUString* _pListEntriesEnd = _rListEntries.getConstArray() + _rListEntries.getLength();
- for ( ; _pListEntries < _pListEntriesEnd; ++_pListEntries )
- m_pEntries->InsertEntry( *_pListEntries );
+ for ( auto const & entry : _rListEntries )
+ m_pEntries->InsertEntry( entry );
}
@@ -143,10 +141,8 @@ namespace pcr
void ListSelectionDialog::selectEntries( const Sequence< sal_Int16 >& /* [in ] */ _rSelection )
{
m_pEntries->SetNoSelection();
- const sal_Int16* pSelection = _rSelection.getConstArray();
- const sal_Int16* pSelectionEnd = _rSelection.getConstArray() + _rSelection.getLength();
- for ( ; pSelection != pSelectionEnd; ++pSelection )
- m_pEntries->SelectEntryPos( *pSelection );
+ for ( auto const & selection : _rSelection )
+ m_pEntries->SelectEntryPos( selection );
}
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index c20b617bbd55..f0d4f40aa32a 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -271,7 +271,7 @@ namespace pcr
throw VetoException();
m_bBindingIntrospectee = true;
- impl_rebindToInspectee_nothrow( InterfaceArray( _rObjects.getConstArray(), _rObjects.getConstArray() + _rObjects.getLength() ) );
+ impl_rebindToInspectee_nothrow( InterfaceArray( _rObjects.begin(), _rObjects.end() ) );
m_bBindingIntrospectee = false;
}
@@ -1455,14 +1455,11 @@ namespace pcr
if ( m_xModel.is() )
aHandlerFactories = m_xModel->getHandlerFactories();
- const Any* pHandlerFactory = aHandlerFactories.getConstArray();
- const Any* pHandlerFactoryEnd = aHandlerFactories.getConstArray() + aHandlerFactories.getLength();
-
- while ( pHandlerFactory != pHandlerFactoryEnd )
+ for ( auto const & handlerFactory : aHandlerFactories )
{
if ( _rObjects.size() == 1 )
{ // we're inspecting only one object -> one handler
- Reference< XPropertyHandler > xHandler( lcl_createHandler( m_xContext, *pHandlerFactory ) );
+ Reference< XPropertyHandler > xHandler( lcl_createHandler( m_xContext, handlerFactory ) );
if ( xHandler.is() )
{
xHandler->inspect( _rObjects[0] );
@@ -1480,7 +1477,7 @@ namespace pcr
for ( ; pObject != pObjectEnd; ++pObject )
{
- *pHandler = lcl_createHandler( m_xContext, *pHandlerFactory );
+ *pHandler = lcl_createHandler( m_xContext, handlerFactory );
if ( pHandler->is() )
{
(*pHandler)->inspect( *pObject );
@@ -1493,8 +1490,6 @@ namespace pcr
if ( !aSingleHandlers.empty() )
_rHandlers.push_back( new PropertyComposer( aSingleHandlers ) );
}
-
- ++pHandlerFactory;
}
// note that the handlers will not be used by our caller, if they indicate that there are no
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 89f3f0a6892c..aca5c0420a47 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -320,12 +320,9 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
Reference< XPropertySetInfo > xDestPSI( getPropertySetInfo(), UNO_QUERY_THROW );
Sequence< Property > aSourceProperties( xSourcePSI->getProperties() );
- for ( const Property* pSourceProperty = aSourceProperties.getConstArray();
- pSourceProperty != aSourceProperties.getConstArray() + aSourceProperties.getLength();
- ++pSourceProperty
- )
+ for ( auto const & sourceProperty : aSourceProperties )
{
- if ( xDestPSI->hasPropertyByName( pSourceProperty->Name ) )
+ if ( xDestPSI->hasPropertyByName( sourceProperty.Name ) )
continue;
// the initial value passed to XPropertyContainer is also used as default, usually. So, try
@@ -333,14 +330,14 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
Any aInitialValue;
if ( xSourcePropState.is() )
{
- aInitialValue = xSourcePropState->getPropertyDefault( pSourceProperty->Name );
+ aInitialValue = xSourcePropState->getPropertyDefault( sourceProperty.Name );
}
else
{
- aInitialValue = xSourceProps->getPropertyValue( pSourceProperty->Name );
+ aInitialValue = xSourceProps->getPropertyValue( sourceProperty.Name );
}
- addProperty( pSourceProperty->Name, pSourceProperty->Attributes, aInitialValue );
- setPropertyValue( pSourceProperty->Name, xSourceProps->getPropertyValue( pSourceProperty->Name ) );
+ addProperty( sourceProperty.Name, sourceProperty.Attributes, aInitialValue );
+ setPropertyValue( sourceProperty.Name, xSourceProps->getPropertyValue( sourceProperty.Name ) );
}
}
catch(const RuntimeException&)
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index edf84814e65f..478c9b9c94f1 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -424,35 +424,29 @@ namespace
}
Sequence< Property > aSourceProps( xSourceInfo->getProperties() );
- const Property* pSourceProps = aSourceProps.getConstArray();
- const Property* pSourcePropsEnd = aSourceProps.getConstArray() + aSourceProps.getLength();
- while ( pSourceProps != pSourcePropsEnd )
+ for ( auto const & sourceprop : aSourceProps )
{
- if ( !xDestInfo->hasPropertyByName( pSourceProps->Name ) )
+ if ( !xDestInfo->hasPropertyByName( sourceprop.Name ) )
{
- ++pSourceProps;
continue;
}
- Property aDestProp( xDestInfo->getPropertyByName( pSourceProps->Name ) );
+ Property aDestProp( xDestInfo->getPropertyByName( sourceprop.Name ) );
if ( 0 != ( aDestProp.Attributes & PropertyAttribute::READONLY ) )
{
- ++pSourceProps;
continue;
}
try
{
- _rxDest->setPropertyValue( pSourceProps->Name, _rxSource->getPropertyValue( pSourceProps->Name ) );
+ _rxDest->setPropertyValue( sourceprop.Name, _rxSource->getPropertyValue( sourceprop.Name ) );
}
catch(const IllegalArgumentException& e)
{
SAL_WARN( "forms.component", "could not transfer the property named '"
- << pSourceProps->Name
+ << sourceprop.Name
<< "'. " << e.Message );
}
-
- ++pSourceProps;
}
}
catch( const Exception& )
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 367238fd119b..296b06ca3d68 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -2366,12 +2366,9 @@ bool OBoundControlModel::impl_approveValueBinding_nolock( const Reference< XValu
// < SYNCHRONIZED
}
- for ( const Type* pType = aTypeCandidates.getConstArray();
- pType != aTypeCandidates.getConstArray() + aTypeCandidates.getLength();
- ++pType
- )
+ for ( auto const & type : aTypeCandidates )
{
- if ( _rxBinding->supportsType( *pType ) )
+ if ( _rxBinding->supportsType( type ) )
return true;
}
return false;
@@ -2598,14 +2595,11 @@ void OBoundControlModel::calculateExternalValueType()
if ( !m_xExternalBinding.is() )
return;
Sequence< Type > aTypeCandidates( getSupportedBindingTypes() );
- for ( const Type* pTypeCandidate = aTypeCandidates.getConstArray();
- pTypeCandidate != aTypeCandidates.getConstArray() + aTypeCandidates.getLength();
- ++pTypeCandidate
- )
+ for ( auto const & typeCandidate : aTypeCandidates )
{
- if ( m_xExternalBinding->supportsType( *pTypeCandidate ) )
+ if ( m_xExternalBinding->supportsType( typeCandidate ) )
{
- m_aExternalValueType = *pTypeCandidate;
+ m_aExternalValueType = typeCandidate;
break;
}
}
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 3e50047e1803..a5e6d61125ca 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -322,8 +322,8 @@ namespace frm
// copy to member
ValueList().swap(m_aListSourceValues);
::std::copy(
- aListSource.getConstArray(),
- aListSource.getConstArray() + aListSource.getLength(),
+ aListSource.begin(),
+ aListSource.end(),
::std::insert_iterator< ValueList >( m_aListSourceValues, m_aListSourceValues.end() )
);
@@ -467,21 +467,19 @@ namespace frm
// #i27024#
const Any* pSelectSequenceValue = nullptr;
- const OUString* pStartPos = _rPropertyNames.getConstArray();
- const OUString* pEndPos = _rPropertyNames.getConstArray() + _rPropertyNames.getLength();
const OUString* pSelectedItemsPos = ::std::find_if(
- pStartPos, pEndPos,
+ _rPropertyNames.begin(), _rPropertyNames.end(),
::std::bind2nd( ::std::equal_to< OUString >(), PROPERTY_SELECT_SEQ )
);
const OUString* pStringItemListPos = ::std::find_if(
- pStartPos, pEndPos,
+ _rPropertyNames.begin(), _rPropertyNames.end(),
::std::bind2nd( ::std::equal_to< OUString >(), PROPERTY_STRINGITEMLIST )
);
- if ( ( pSelectedItemsPos != pEndPos ) && ( pStringItemListPos != pEndPos ) )
+ if ( ( pSelectedItemsPos != _rPropertyNames.end() ) && ( pStringItemListPos != _rPropertyNames.end() ) )
{
// both properties are present
// -> remember the value for the select sequence
- pSelectSequenceValue = _rValues.getConstArray() + ( pSelectedItemsPos - pStartPos );
+ pSelectSequenceValue = _rValues.getConstArray() + ( pSelectedItemsPos - _rPropertyNames.begin() );
}
OBoundControlModel::setPropertyValues( _rPropertyNames, _rValues );
@@ -974,8 +972,8 @@ namespace frm
{
css::uno::Sequence<OUString> seqNames = xFieldNames->getElementNames();
::std::copy(
- seqNames.getConstArray(),
- seqNames.getConstArray() + seqNames.getLength(),
+ seqNames.begin(),
+ seqNames.end(),
::std::insert_iterator< ValueList >( aDisplayList, aDisplayList.end() )
);
if(*aBoundColumn == -1)
@@ -1229,14 +1227,12 @@ namespace frm
#if HAVE_FEATURE_DBCONNECTIVITY
sal_Int16 *pIndex = aSelectionIndicies.getArray();
- const Any *pValue = i_aValues.getConstArray();
- const Any * const pValueEnd = i_aValues.getConstArray() + i_aValues.getLength();
- for (;pValue < pValueEnd; ++pValue)
+ for ( auto const & value : i_aValues)
{
- if ( pValue->hasValue() )
+ if ( value.hasValue() )
{
ORowSetValue v;
- v.fill(*pValue);
+ v.fill(value);
v.setTypeKind( m_nConvertedBoundValuesType );
ValueList::const_iterator curValuePos = ::std::find( aValues.begin(), aValues.end(), v );
if ( curValuePos != aValues.end() )
@@ -1401,8 +1397,8 @@ namespace frm
OSL_VERIFY( _rExternalValue >>= aSelectIndexesPure );
aSelectIndexes.realloc( aSelectIndexesPure.getLength() );
::std::copy(
- aSelectIndexesPure.getConstArray(),
- aSelectIndexesPure.getConstArray() + aSelectIndexesPure.getLength(),
+ aSelectIndexesPure.begin(),
+ aSelectIndexesPure.end(),
aSelectIndexes.getArray()
);
}
@@ -1535,8 +1531,8 @@ namespace frm
{
Sequence< OUString > aSelectedEntriesTexts( _rSelectSequence.getLength() );
::std::transform(
- _rSelectSequence.getConstArray(),
- _rSelectSequence.getConstArray() + _rSelectSequence.getLength(),
+ _rSelectSequence.begin(),
+ _rSelectSequence.end(),
aSelectedEntriesTexts.getArray(),
ExtractStringFromSequence_Safe( _rStringList )
);
@@ -1582,8 +1578,8 @@ namespace frm
{
Sequence< Any > aSelectedEntriesValues( _rSelectSequence.getLength() );
::std::transform(
- _rSelectSequence.getConstArray(),
- _rSelectSequence.getConstArray() + _rSelectSequence.getLength(),
+ _rSelectSequence.begin(),
+ _rSelectSequence.end(),
aSelectedEntriesValues.getArray(),
ExtractAnyFromValueList_Safe( _rStringList )
);
@@ -1616,8 +1612,8 @@ namespace frm
// expects int's
Sequence< sal_Int32 > aTransformed( aSelectSequence.getLength() );
::std::copy(
- aSelectSequence.getConstArray(),
- aSelectSequence.getConstArray() + aSelectSequence.getLength(),
+ aSelectSequence.begin(),
+ aSelectSequence.end(),
aTransformed.getArray()
);
aReturn <<= aTransformed;
diff --git a/forms/source/misc/componenttools.cxx b/forms/source/misc/componenttools.cxx
index ad929575d7f5..d57e67adeb78 100644
--- a/forms/source/misc/componenttools.cxx
+++ b/forms/source/misc/componenttools.cxx
@@ -60,8 +60,8 @@ namespace frm
void TypeBag::addTypes( const TypeSequence& _rTypes )
{
::std::copy(
- _rTypes.getConstArray(),
- _rTypes.getConstArray() + _rTypes.getLength(),
+ _rTypes.begin(),
+ _rTypes.end(),
::std::insert_iterator< TypeSet >( m_aTypes, m_aTypes.begin() )
);
}
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index 9f2f0f70813d..9445a47feef4 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -607,14 +607,9 @@ namespace svt
static_cast< ListBox* >( _pControl )->Clear();
// add the new ones
- const OUString* pItems = aItems.getConstArray();
- const OUString* pItemsEnd = aItems.getConstArray() + aItems.getLength();
- for ( const OUString* pItem = pItems;
- pItem != pItemsEnd;
- ++pItem
- )
+ for ( auto const & item : aItems )
{
- static_cast< ListBox* >( _pControl )->InsertEntry( *pItem );
+ static_cast< ListBox* >( _pControl )->InsertEntry( item );
}
}
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index ecdc92676273..1124d6881d83 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1954,8 +1954,7 @@ void SAL_CALL OReportDefinition::setMimeType( const OUString& _mimetype )
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
uno::Sequence< OUString > aList = getAvailableMimeTypes();
- const OUString* pEnd = aList.getConstArray()+aList.getLength();
- if ( ::std::find(aList.getConstArray(),pEnd,_mimetype) == pEnd )
+ if ( ::std::find(aList.begin(), aList.end(), _mimetype) == aList.end() )
throwIllegallArgumentException("getAvailableMimeTypes()"
,*this
,1);
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 6df01d2c2927..73a162b74f0e 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -189,13 +189,11 @@ template <typename T, T base> T lcl_round(T value)
bool GeometryHandler::impl_isDataField(const OUString& _sName) const
{
- const OUString* pEnd = m_aFieldNames.getConstArray() + m_aFieldNames.getLength();
- bool bIsField = ( ::std::find( m_aFieldNames.getConstArray(), pEnd, _sName ) != pEnd );
+ bool bIsField = ( ::std::find( m_aFieldNames.begin(), m_aFieldNames.end(), _sName ) != m_aFieldNames.end() );
if ( !bIsField )
{
- pEnd = m_aParamNames.getConstArray() + m_aParamNames.getLength();
- bIsField = ( ::std::find( m_aParamNames.getConstArray(), pEnd, _sName ) != pEnd );
+ bIsField = ( ::std::find( m_aParamNames.begin(), m_aParamNames.end(), _sName ) != m_aParamNames.end() );
}
return bIsField;
}
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index dc010291fa64..19a6b01961bc 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -161,10 +161,8 @@ namespace calc
// look up in our sequence
Sequence< Type > aSupportedTypes( getSupportedValueTypes() );
- const Type* pTypes = aSupportedTypes.getConstArray();
- const Type* pTypesEnd = aSupportedTypes.getConstArray() + aSupportedTypes.getLength();
- while ( pTypes != pTypesEnd )
- if ( aType.equals( *pTypes++ ) )
+ for ( auto const & i : aSupportedTypes )
+ if ( aType == i )
return true;
return false;
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 4ff9d68d219f..4f0c8babe547 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -333,11 +333,9 @@ namespace dlgprov
else
{
Sequence< OUString > aOpenDocsTdocURLs( MiscUtils::allOpenTDocUrls( m_xContext ) );
- const OUString* pTdocURL = aOpenDocsTdocURLs.getConstArray();
- const OUString* pTdocURLEnd = aOpenDocsTdocURLs.getConstArray() + aOpenDocsTdocURLs.getLength();
- for ( ; pTdocURL != pTdocURLEnd; ++pTdocURL )
+ for ( auto const & tdocURL : aOpenDocsTdocURLs )
{
- Reference< frame::XModel > xModel( MiscUtils::tDocUrlToModel( *pTdocURL ) );
+ Reference< frame::XModel > xModel( MiscUtils::tDocUrlToModel( tdocURL ) );
OSL_ENSURE( xModel.is(), "DialogProviderImpl::createDialogModel: invalid document model!" );
if ( !xModel.is() )
continue;
diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index 6b7fff2c60a6..eb4633eaa7c5 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -409,11 +409,9 @@ void aqua_init_systray()
SvtDynamicMenuOptions aOpt;
css::uno::Sequence < css::uno::Sequence < css::beans::PropertyValue > > aNewMenu = aOpt.GetMenu( EDynamicMenuType::NewMenu );
- const css::uno::Sequence< css::beans::PropertyValue >* pNewMenu = aNewMenu.getConstArray();
- const css::uno::Sequence< css::beans::PropertyValue >* pNewMenuEnd = aNewMenu.getConstArray() + aNewMenu.getLength();
- for ( ; pNewMenu != pNewMenuEnd; ++pNewMenu )
+ for ( auto const & newMenuProp : aNewMenu )
{
- comphelper::SequenceAsHashMap aEntryItems( *pNewMenu );
+ comphelper::SequenceAsHashMap aEntryItems( newMenuProp );
rtl::OUString sURL( aEntryItems.getUnpackedValueOrDefault( "URL", rtl::OUString() ) );
if ( sURL.getLength() )
aFileNewAppsAvailable.insert( sURL );
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 502b99f55b0d..a7bd05a34f04 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -153,11 +153,9 @@ static HMENU createSystrayMenu( )
Sequence < Sequence < PropertyValue > > aNewMenu = aOpt.GetMenu( EDynamicMenuType::NewMenu );
const OUString sURLKey( "URL" );
- const Sequence< PropertyValue >* pNewMenu = aNewMenu.getConstArray();
- const Sequence< PropertyValue >* pNewMenuEnd = aNewMenu.getConstArray() + aNewMenu.getLength();
- for ( ; pNewMenu != pNewMenuEnd; ++pNewMenu )
+ for ( auto const & newMenuProp : aNewMenu )
{
- ::comphelper::SequenceAsHashMap aEntryItems( *pNewMenu );
+ ::comphelper::SequenceAsHashMap aEntryItems( newMenuProp );
OUString sURL( aEntryItems.getUnpackedValueOrDefault( sURLKey, OUString() ) );
if ( sURL.getLength() )
aFileNewAppsAvailable.insert( sURL );
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 67d1f7d4217d..d5703887e7ab 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -208,11 +208,9 @@ void BackingWindow::initControls()
Sequence < Sequence < PropertyValue > > aNewMenu = aOpt.GetMenu( EDynamicMenuType::NewMenu );
const OUString sURLKey( "URL" );
- const Sequence< PropertyValue >* pNewMenu = aNewMenu.getConstArray();
- const Sequence< PropertyValue >* pNewMenuEnd = aNewMenu.getConstArray() + aNewMenu.getLength();
- for ( ; pNewMenu != pNewMenuEnd; ++pNewMenu )
+ for ( auto const & newMenuProp : aNewMenu )
{
- comphelper::SequenceAsHashMap aEntryItems( *pNewMenu );
+ comphelper::SequenceAsHashMap aEntryItems( newMenuProp );
OUString sURL( aEntryItems.getUnpackedValueOrDefault( sURLKey, OUString() ) );
if ( !sURL.isEmpty() )
aFileNewAppsAvailable.insert( sURL );
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 9bd048d6ae1c..b7a602e7ecac 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -256,8 +256,8 @@ namespace sfx2
_rFilterClassification.openNode( "GlobalFilters/Classes" );
Sequence< OUString > aFilterClasses = aFilterClassesNode.getNodeNames();
::std::for_each(
- aFilterClasses.getConstArray(),
- aFilterClasses.getConstArray() + aFilterClasses.getLength(),
+ aFilterClasses.begin(),
+ aFilterClasses.end(),
ReadGlobalFilter( aFilterClassesNode, aClassReferrer )
);
}
@@ -299,8 +299,8 @@ namespace sfx2
Sequence< OUString > aFilterClasses = aFilterClassesNode.getNodeNames();
::std::for_each(
- aFilterClasses.getConstArray(),
- aFilterClasses.getConstArray() + aFilterClasses.getLength(),
+ aFilterClasses.begin(),
+ aFilterClasses.end(),
ReadLocalFilter( aFilterClassesNode, _rLocalClasses )
);
}
@@ -387,8 +387,8 @@ namespace sfx2
// and for all the sub filters of the class, remember the class
// (respectively the position of the class it the group)
::std::for_each(
- _rClass.aSubFilters.getConstArray(),
- _rClass.aSubFilters.getConstArray() + _rClass.aSubFilters.getLength(),
+ _rClass.aSubFilters.begin(),
+ _rClass.aSubFilters.end(),
ReferToFilterEntry( m_rClassReferrer, aClassEntryPos )
);
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index faba052f4ec2..cefd4db1cb70 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -546,8 +546,8 @@ namespace
{
Sequence< uno::Type > aStrippedTypes( io_rTypes.getLength() - 1 );
::std::remove_copy_if(
- io_rTypes.getConstArray(),
- io_rTypes.getConstArray() + io_rTypes.getLength(),
+ io_rTypes.begin(),
+ io_rTypes.end(),
aStrippedTypes.getArray(),
[&i_rTypeToStrip](const uno::Type& aType) { return aType == i_rTypeToStrip; }
);
diff --git a/sfx2/source/doc/sfxmodelfactory.cxx b/sfx2/source/doc/sfxmodelfactory.cxx
index c50034e8ab7a..564a5dc3e0c3 100644
--- a/sfx2/source/doc/sfxmodelfactory.cxx
+++ b/sfx2/source/doc/sfxmodelfactory.cxx
@@ -158,8 +158,8 @@ namespace sfx2
Sequence< Any > aStrippedArguments( _rArguments.getLength() );
Any* pStrippedArgs = aStrippedArguments.getArray();
Any* pStrippedArgsEnd = ::std::remove_copy_if(
- _rArguments.getConstArray(),
- _rArguments.getConstArray() + _rArguments.getLength(),
+ _rArguments.begin(),
+ _rArguments.end(),
pStrippedArgs,
IsSpecialArgument()
);
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 50d6f5ab70db..365b5ead28e8 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1075,8 +1075,8 @@ void SlideShowImpl::displaySlide(
bool bSkipAllMainSequenceEffects (false);
bool bSkipSlideTransition (false);
- std::for_each( rProperties.getConstArray(),
- rProperties.getConstArray() + rProperties.getLength(),
+ std::for_each( rProperties.begin(),
+ rProperties.end(),
PrefetchPropertiesFunc(this, bSkipAllMainSequenceEffects, bSkipSlideTransition) );
OSL_ENSURE( !maViewContainer.empty(), "### no views!" );
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index 4fc636ccc440..94eac674447b 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -894,18 +894,15 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow()
try
{
const Sequence< Reference< XGridColumn > > columns = xColumnModel->getColumns();
- for ( const Reference< XGridColumn >* colRef = columns.getConstArray();
- colRef != columns.getConstArray() + columns.getLength();
- ++colRef
- )
+ for ( auto const & colRef : columns )
{
- if ( !colRef->is() )
+ if ( !colRef.is() )
{
SAL_WARN( "svtools.uno", "illegal column!" );
continue;
}
- m_xTableModel->appendColumn( *colRef );
+ m_xTableModel->appendColumn( colRef );
}
}
catch( const Exception& )
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index 110f74b28866..e461c58e9bb7 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -94,12 +94,9 @@ namespace svx
// forward the allowed extensions to the input control
OUStringBuffer aExtensionList;
- for ( const OUString* pExtension = m_aFilterExtensions.getConstArray();
- pExtension != m_aFilterExtensions.getConstArray() + m_aFilterExtensions.getLength();
- ++pExtension
- )
+ for ( auto const & extension : m_aFilterExtensions )
{
- aExtensionList.append( *pExtension );
+ aExtensionList.append( extension );
aExtensionList.append( ';' );
}
m_rLocationInput.SetFilter( aExtensionList.makeStringAndClear() );
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 199e667feac7..e6a855e860d4 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -569,17 +569,14 @@ void FmFilterModel::Update(const Reference< XIndexAccess > & xControllers, FmPar
OUString aTitle(SvxResId(RID_STR_FILTER_FILTER_FOR));
Sequence< Sequence< OUString > > aExpressions = xFilterController->getPredicateExpressions();
- for ( const Sequence< OUString >* pConjunctionTerm = aExpressions.getConstArray();
- pConjunctionTerm != aExpressions.getConstArray() + aExpressions.getLength();
- ++pConjunctionTerm
- )
+ for ( auto const & conjunctionTerm : aExpressions )
{
// we always display one row, even if there's no term to be displayed
FmFilterItems* pFilterItems = new FmFilterItems( pFormItem, aTitle );
Insert( pFormItem->GetChildren().end(), pFilterItems );
- const Sequence< OUString >& rDisjunction( *pConjunctionTerm );
- for ( const OUString* pDisjunctiveTerm = rDisjunction.getConstArray();
+ const Sequence< OUString >& rDisjunction( conjunctionTerm );
+ for ( const OUString* pDisjunctiveTerm = rDisjunction.getConstArray();
pDisjunctiveTerm != rDisjunction.getConstArray() + rDisjunction.getLength();
++pDisjunctiveTerm
)
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 3ca840e48802..019419d204cd 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -865,16 +865,14 @@ static Reference< XControl > lcl_firstFocussableControl( const Sequence< Referen
Reference< XControl > xReturn;
// loop through all the controls
- const Reference< XControl >* pControls = _rControls.getConstArray();
- const Reference< XControl >* pControlsEnd = _rControls.getConstArray() + _rControls.getLength();
- for ( ; pControls != pControlsEnd; ++pControls )
+ for ( auto const & control : _rControls )
{
- if ( !pControls->is() )
+ if ( !control.is() )
continue;
- if ( FmXFormView::isFocusable( *pControls ) )
+ if ( FmXFormView::isFocusable( control ) )
{
- xReturn = *pControls;
+ xReturn = control;
break;
}
}
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index db123f977bb9..7c3d2d6f840f 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -3558,16 +3558,14 @@ Reference< XControl > FormController::locateControl( const Reference< XControlMo
try
{
Sequence< Reference< XControl > > aControls( getControls() );
- const Reference< XControl >* pControls = aControls.getConstArray();
- const Reference< XControl >* pControlsEnd = aControls.getConstArray() + aControls.getLength();
- for ( ; pControls != pControlsEnd; ++pControls )
+ for ( auto const & control : aControls )
{
- OSL_ENSURE( pControls->is(), "FormController::locateControl: NULL-control?" );
- if ( pControls->is() )
+ OSL_ENSURE( control.is(), "FormController::locateControl: NULL-control?" );
+ if ( control.is() )
{
- if ( ( *pControls)->getModel() == _rxModel )
- return *pControls;
+ if ( control->getModel() == _rxModel )
+ return control;
}
}
OSL_FAIL( "FormController::locateControl: did not find a control for this model!" );
diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx
index 30996bfd7062..23459b2069e8 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -388,8 +388,8 @@ namespace svx
::std::vector< sal_Int32 > aFeatures( Features.getLength() );
::std::transform(
- Features.getConstArray(),
- Features.getConstArray() + Features.getLength(),
+ Features.begin(),
+ Features.end(),
aFeatures.begin(),
FormFeatureToSlotId()
);
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 9abc5eca60ab..2cab3bd553e4 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -1556,9 +1556,7 @@ void VCLXListBox::addItems( const css::uno::Sequence< OUString>& aItems, sal_Int
if ( pBox )
{
sal_uInt16 nP = nPos;
- const OUString* pItems = aItems.getConstArray();
- const OUString* pItemsEnd = aItems.getConstArray() + aItems.getLength();
- while ( pItems != pItemsEnd )
+ for ( auto const & item : aItems )
{
if ( nP == 0xFFFF )
{
@@ -1567,7 +1565,7 @@ void VCLXListBox::addItems( const css::uno::Sequence< OUString>& aItems, sal_Int
break;
}
- pBox->InsertEntry( *pItems++, nP++ );
+ pBox->InsertEntry( item, nP++ );
}
}
}
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index dadeeac23c6d..2a26fdf76b79 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -670,18 +670,16 @@ void SAL_CALL ControlModelContainerBase::setControlModels( const Sequence< Refer
SolarMutexGuard aGuard;
// set the tab indexes according to the order of models in the sequence
- const Reference< XControlModel >* pControls = _rControls.getConstArray( );
- const Reference< XControlModel >* pControlsEnd = _rControls.getConstArray( ) + _rControls.getLength();
sal_Int16 nTabIndex = 1;
- for ( ; pControls != pControlsEnd; ++pControls )
+ for ( auto const & control : _rControls )
{
// look up the control in our own structure. This is to prevent invalid arguments
UnoControlModelHolderList::const_iterator aPos =
::std::find_if(
maModels.begin(), maModels.end(),
- CompareControlModel( *pControls )
+ CompareControlModel( control )
);
if ( maModels.end() != aPos )
{
diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx
index 69d1b1c056da..2cf0557fe015 100644
--- a/toolkit/source/controls/formattedcontrol.cxx
+++ b/toolkit/source/controls/formattedcontrol.cxx
@@ -307,15 +307,12 @@ namespace toolkit
{
bool bSettingValue = false;
bool bSettingText = false;
- for ( const OUString* pPropertyNames = _rPropertyNames.getConstArray();
- pPropertyNames != _rPropertyNames.getConstArray() + _rPropertyNames.getLength();
- ++pPropertyNames
- )
+ for ( auto const & propertyName : _rPropertyNames )
{
- if ( BASEPROPERTY_EFFECTIVE_VALUE == GetPropertyId( *pPropertyNames ) )
+ if ( BASEPROPERTY_EFFECTIVE_VALUE == GetPropertyId( propertyName ) )
bSettingValue = true;
- if ( BASEPROPERTY_TEXT == GetPropertyId( *pPropertyNames ) )
+ if ( BASEPROPERTY_TEXT == GetPropertyId( propertyName ) )
bSettingText = true;
}
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx
index e7824d416f5c..7a541cafa0a6 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -157,8 +157,8 @@
sal_Int32 nOldSize = aTypes.getLength();
aTypes.realloc( nOldSize + aAggTypes.getLength() );
::std::copy(
- aAggTypes.getConstArray(),
- aAggTypes.getConstArray() + aAggTypes.getLength(),
+ aAggTypes.begin(),
+ aAggTypes.end(),
aTypes.getArray() + nOldSize
);
}
@@ -531,8 +531,8 @@
IntArrayArray::value_type& rDuplicateIds = AmbiguousPropertyIds::get()[ _nId ];
// for this, sort the aggregate properties
::std::sort(
- aAggregateProps.getArray(),
- aAggregateProps.getArray() + aAggregateProps.getLength(),
+ aAggregateProps.begin(),
+ aAggregateProps.end(),
PropertyNameLess()
);
const Property* pAggProps = aAggregateProps.getConstArray();
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 3233f71081c2..42c33c0d27eb 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -454,11 +454,8 @@ void UnoControl::ImplLockPropertyChangeNotification( const OUString& rPropertyNa
void UnoControl::ImplLockPropertyChangeNotifications( const Sequence< OUString >& rPropertyNames, bool bLock )
{
- for ( const OUString* pPropertyName = rPropertyNames.getConstArray();
- pPropertyName != rPropertyNames.getConstArray() + rPropertyNames.getLength();
- ++pPropertyName
- )
- ImplLockPropertyChangeNotification( *pPropertyName, bLock );
+ for ( auto const & propertyName : rPropertyNames )
+ ImplLockPropertyChangeNotification( propertyName, bLock );
}
void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent >& rEvents )
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index a173d18afb39..89ab2d222520 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -2250,8 +2250,8 @@ void SAL_CALL UnoControlListBoxModel::setFastPropertyValue_NoBroadcast( sal_Int3
::std::vector< ListItem > aItems( aStringItemList.getLength() );
::std::transform(
- aStringItemList.getConstArray(),
- aStringItemList.getConstArray() + aStringItemList.getLength(),
+ aStringItemList.begin(),
+ aStringItemList.end(),
aItems.begin(),
CreateListItem()
);
@@ -2456,8 +2456,8 @@ void UnoControlListBoxModel::impl_getStringItemList( ::std::vector< OUString >&
o_rStringItems.resize( size_t( aStringItemList.getLength() ) );
::std::copy(
- aStringItemList.getConstArray(),
- aStringItemList.getConstArray() + aStringItemList.getLength(),
+ aStringItemList.begin(),
+ aStringItemList.end(),
o_rStringItems.begin()
);
}
@@ -3087,8 +3087,8 @@ void SAL_CALL UnoControlComboBoxModel::setFastPropertyValue_NoBroadcast( sal_Int
::std::vector< ListItem > aItems( aStringItemList.getLength() );
::std::transform(
- aStringItemList.getConstArray(),
- aStringItemList.getConstArray() + aStringItemList.getLength(),
+ aStringItemList.begin(),
+ aStringItemList.end(),
aItems.begin(),
CreateListItem()
);
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index 2c561322aec8..266ed9fcc4a5 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -474,8 +474,8 @@ namespace ucb { namespace ucp { namespace ext
// translate the property request
Sequence< OUString > aPropertyNames( i_rProperties.getLength() );
::std::transform(
- i_rProperties.getConstArray(),
- i_rProperties.getConstArray() + i_rProperties.getLength(),
+ i_rProperties.begin(),
+ i_rProperties.end(),
aPropertyNames.getArray(),
SelectPropertyName()
);
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index b394ab00f450..c60dbc7b58e1 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -126,18 +126,15 @@ namespace ucb { namespace ucp { namespace ext
case E_ROOT:
{
Sequence< Sequence< OUString > > aExtensionInfo( xPackageInfo->getExtensionList() );
- for ( const Sequence< OUString >* pExtInfo = aExtensionInfo.getConstArray();
- pExtInfo != aExtensionInfo.getConstArray() + aExtensionInfo.getLength();
- ++pExtInfo
- )
+ for ( auto const & extInfo : aExtensionInfo )
{
- if ( pExtInfo->getLength() <= 0 )
+ if ( extInfo.getLength() <= 0 )
{
SAL_WARN( "ucb.ucp.ext", "illegal extension info" );
continue;
}
- const OUString& rLocalId = (*pExtInfo)[0];
+ const OUString& rLocalId = extInfo[0];
ResultListEntry aEntry;
aEntry.sId = ContentProvider::getRootURL() + Content::encodeIdentifier( rLocalId ) + "/";
m_pImpl->m_aResults.push_back( aEntry );
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 0d742684bb73..e7938b121db2 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -352,25 +352,21 @@ bool UUIInteractionHelper::handleTypedHandlerImplementations( Reference< XIntera
// loop through all registered implementations
const Sequence< OUString > aRegisteredHandlers( aConfigRoot.getNodeNames() );
- const OUString* pHandlerName = aRegisteredHandlers.getConstArray();
- const OUString* pHandlersEnd = aRegisteredHandlers.getConstArray() + aRegisteredHandlers.getLength();
- for ( ; pHandlerName != pHandlersEnd; ++pHandlerName )
+ for ( auto const & handlerName : aRegisteredHandlers )
{
- const ::utl::OConfigurationNode aHandlerNode( aConfigRoot.openNode( *pHandlerName ) );
+ const ::utl::OConfigurationNode aHandlerNode( aConfigRoot.openNode( handlerName ) );
const ::utl::OConfigurationNode aTypesNode( aHandlerNode.openNode( "HandledRequestTypes" ) );
// loop through all the types which the current handler is registered for
const Sequence< OUString > aHandledTypes( aTypesNode.getNodeNames() );
- const OUString* pType = aHandledTypes.getConstArray();
- const OUString* pTypesEnd = aHandledTypes.getConstArray() + aHandledTypes.getLength();
- for ( ; pType != pTypesEnd; ++pType )
+ for ( auto const & type : aHandledTypes )
{
// the UNO type is the node name
- ::utl::OConfigurationNode aType( aTypesNode.openNode( *pType ) );
+ ::utl::OConfigurationNode aType( aTypesNode.openNode( type ) );
// and there's a child denoting how the responsibility propagates
OUString sPropagation;
OSL_VERIFY( aType.getNodeValue( "Propagation" ) >>= sPropagation );
- if ( lcl_matchesRequest( aRequest, *pType, sPropagation ) )
+ if ( lcl_matchesRequest( aRequest, type, sPropagation ) )
{
// retrieve the service/implementation name of the handler
OUString sServiceName;
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index b8787f4cedac..8e8b7aaa559f 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -440,16 +440,13 @@ namespace xmloff
void OControlExport::exportGenericHandlerAttributes()
{
const Sequence< Property > aProperties = m_xPropertyInfo->getProperties();
- for ( const Property* prop = aProperties.getConstArray();
- prop != aProperties.getConstArray() + aProperties.getLength();
- ++prop
- )
+ for ( auto const & prop : aProperties )
{
try
{
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list