diff options
Diffstat (limited to 'extensions')
6 files changed, 19 insertions, 33 deletions
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 |