summaryrefslogtreecommitdiff
path: root/dbaccess/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/core')
-rw-r--r--dbaccess/source/core/api/query.cxx17
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx16
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx6
3 files changed, 15 insertions, 24 deletions
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index efd3eb0748c0..d1ade9cc26d5 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -170,26 +170,23 @@ void OQuery::rebuildColumns()
throw RuntimeException();
}
- Sequence< OUString> aNames = xColumns->getElementNames();
- const OUString* pIter = aNames.getConstArray();
- const OUString* pEnd = pIter + aNames.getLength();
- for ( sal_Int32 i = 0;pIter != pEnd; ++pIter,++i)
+ for ( const OUString& rName : xColumns->getElementNames() )
{
- Reference<XPropertySet> xSource(xColumns->getByName( *pIter ),UNO_QUERY);
- OUString sLabel = *pIter;
- if ( xColumnDefinitions.is() && xColumnDefinitions->hasByName(*pIter) )
+ Reference<XPropertySet> xSource(xColumns->getByName( rName ),UNO_QUERY);
+ OUString sLabel = rName;
+ if ( xColumnDefinitions.is() && xColumnDefinitions->hasByName(rName) )
{
- Reference<XPropertySet> xCommandColumn(xColumnDefinitions->getByName( *pIter ),UNO_QUERY);
+ Reference<XPropertySet> xCommandColumn(xColumnDefinitions->getByName( rName ),UNO_QUERY);
xCommandColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
}
OQueryColumn* pColumn = new OQueryColumn( xSource, m_xConnection, sLabel);
Reference< XChild > xChild( *pColumn, UNO_QUERY_THROW );
xChild->setParent( *this );
- implAppendColumn( *pIter, pColumn );
+ implAppendColumn( rName, pColumn );
Reference< XPropertySet > xDest( *pColumn, UNO_QUERY_THROW );
if ( m_pColumnMediator.is() )
- m_pColumnMediator->notifyElementCreated( *pIter, xDest );
+ m_pColumnMediator->notifyElementCreated( rName, xDest );
}
}
catch( const SQLContext& e )
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index b2cc08996dbf..0432b9a2e665 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -466,18 +466,14 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl
if (xSetInfo.is())
aProperties = xSetInfo->getProperties();
- if (aProperties.getLength())
+ for ( const Property& rProperty : aProperties )
{
- const Property* pProperties = aProperties.getConstArray();
- for ( sal_Int32 i=0; i<aProperties.getLength(); ++i, ++pProperties )
+ if ( ( ( rProperty.Attributes & PropertyAttribute::TRANSIENT) != 0 )
+ && ( ( rProperty.Attributes & PropertyAttribute::READONLY) == 0 )
+ )
{
- if ( ( ( pProperties->Attributes & PropertyAttribute::TRANSIENT) != 0 )
- && ( ( pProperties->Attributes & PropertyAttribute::READONLY) == 0 )
- )
- {
- // found such a property
- aRememberProps.put( pProperties->Name, xSource->getPropertyValue( pProperties->Name ) );
- }
+ // found such a property
+ aRememberProps.put( rProperty.Name, xSource->getPropertyValue( rProperty.Name ) );
}
}
}
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index e5c34a8f53e7..e074f78c818f 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -383,12 +383,10 @@ void lcl_uglyHackToStoreDialogeEmbedImages( const Reference< XStorageBasedLibrar
{
// Export the images to the storage
Reference< XGraphicObjectResolver > xGraphicResolver = GraphicObjectResolver::createWithStorage(rxContext, xTmpPic);
- std::vector< OUString >::const_iterator it = vEmbedImgUrls.begin();
- std::vector< OUString >::const_iterator it_end = vEmbedImgUrls.end();
if ( xGraphicResolver.is() )
{
- for ( sal_Int32 count = 0; it != it_end; ++it, ++count )
- xGraphicResolver->resolveGraphicObjectURL( *it );
+ for ( const OUString& rURL : vEmbedImgUrls )
+ xGraphicResolver->resolveGraphicObjectURL( rURL );
}
// delete old 'Pictures' storage and copy the contents of tempPictures into xStorage