summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx10
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx5
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx8
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx5
8 files changed, 24 insertions, 18 deletions
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 8f993096fe95..c7a7238f3f97 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1376,7 +1376,7 @@ bool ODatabaseModelImpl::hasTrustedScriptingSignature(bool bAllowUIToAddAuthor)
uno::Reference<security::XDocumentDigitalSignatures> xSigner(
security::DocumentDigitalSignatures::createWithVersion(
comphelper::getProcessComponentContext(), aODFVersion));
- uno::Sequence<security::DocumentSignatureInformation> aInfo
+ const uno::Sequence<security::DocumentSignatureInformation> aInfo
= xSigner->verifyScriptingContentSignatures(xStorage,
uno::Reference<io::XInputStream>());
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index d5889255523e..15054023170e 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -750,7 +750,7 @@ void OConnection::impl_checkTableQueryNames_nothrow()
try
{
Reference< XNameAccess > xTables( getTables() );
- Sequence< OUString > aTableNames( xTables->getElementNames() );
+ const Sequence< OUString > aTableNames( xTables->getElementNames() );
std::set< OUString > aSortedTableNames( aTableNames.begin(), aTableNames.end() );
Reference< XNameAccess > xQueries( getQueries() );
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 7fc1cb6eb254..e9867def1b99 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -223,11 +223,12 @@ Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( )
// allowed to contain macros, too.
if ( !m_bAllowDocumentScripting )
{
- auto newEnd = std::remove_if( aTypes.begin(), aTypes.end(),
+ auto [begin, end] = toNonConstRange(aTypes);
+ auto newEnd = std::remove_if( begin, end,
[](const Type& t)
{ return t == cppu::UnoType<XEmbeddedScripts>::get() ||
t == cppu::UnoType<XScriptInvocationContext>::get();} );
- aTypes.realloc( std::distance(aTypes.begin(), newEnd) );
+ aTypes.realloc( std::distance(begin, newEnd) );
}
return aTypes;
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 4f499eccc263..48039c3e6943 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -1046,13 +1046,15 @@ void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con
// transform them so that only property values which fulfill certain
// criteria survive
Sequence< PropertyValue > aNonDefaultOrUserDefined( aValues.getLength() );
+ auto [begin, end] = toNonConstRange(aValues);
+ auto pCopyStart = aNonDefaultOrUserDefined.getArray();
const PropertyValue* pCopyEnd = std::remove_copy_if(
- aValues.begin(),
- aValues.end(),
- aNonDefaultOrUserDefined.getArray(),
+ begin,
+ end,
+ pCopyStart,
IsDefaultAndNotRemoveable( aPropertyAttributes )
);
- aNonDefaultOrUserDefined.realloc( pCopyEnd - aNonDefaultOrUserDefined.getArray() );
+ aNonDefaultOrUserDefined.realloc( pCopyEnd - pCopyStart );
rValue <<= aNonDefaultOrUserDefined;
}
catch( const Exception& )
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 43f084fec020..b6bf10274b8b 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -214,10 +214,11 @@ Sequence< Type > SAL_CALL SbaTableQueryBrowser::getTypes( )
OSL_PRECOND( !!m_aDocScriptSupport, "SbaTableQueryBrowser::getTypes: did not initialize this, yet!" );
if ( !m_aDocScriptSupport || !*m_aDocScriptSupport )
{
- auto newEnd = std::remove_if( aTypes.begin(), aTypes.end(),
+ auto [begin, end] = toNonConstRange(aTypes);
+ auto newEnd = std::remove_if( begin, end,
[](const Type& type)
{ return type == cppu::UnoType<XScriptInvocationContext>::get(); } );
- aTypes.realloc( std::distance(aTypes.begin(), newEnd) );
+ aTypes.realloc( std::distance(begin, newEnd) );
}
return aTypes;
}
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 4086e7b442f2..7c9a09cc8484 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -982,17 +982,17 @@ void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource,
_xDatasource->getPropertyValue(PROPERTY_INFO) >>= aInfo;
// search the right propertyvalue
- const PropertyValue* pValue =std::find_if(aInfo.begin(), aInfo.end(),
+ const PropertyValue* pValue =std::find_if(std::cbegin(aInfo), std::cend(aInfo),
[](const PropertyValue& lhs)
{return lhs.Name == PROPERTY_AUTOINCREMENTCREATION;} );
- if ( pValue != aInfo.end() )
+ if ( pValue != std::cend(aInfo) )
pValue->Value >>= _rsAutoIncrementValue;
- pValue =std::find_if(aInfo.begin(), aInfo.end(),
+ pValue =std::find_if(std::cbegin(aInfo), std::cend(aInfo),
[](const PropertyValue& lhs)
{return lhs.Name == "IsAutoRetrievingEnabled";} );
- if ( pValue != aInfo.end() )
+ if ( pValue != std::cend(aInfo) )
pValue->Value >>= _rAutoIncrementValueEnabled;
}
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 6a6784e92dcc..82ce80f71333 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -222,10 +222,11 @@ namespace dbaui
Sequence< Type > aTypes( DBSubComponentController_Base::getTypes() );
if ( !m_pImpl->documentHasScriptSupport() )
{
- auto newEnd = std::remove_if( aTypes.begin(), aTypes.end(),
+ auto [begin, end] = toNonConstRange(aTypes);
+ auto newEnd = std::remove_if( begin, end,
[](const Type& type)
{ return type == cppu::UnoType<XScriptInvocationContext>::get(); } );
- aTypes.realloc( std::distance(aTypes.begin(), newEnd) );
+ aTypes.realloc( std::distance(begin, newEnd) );
}
return aTypes;
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 8070df7a5f90..4f7bd55bde1e 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -288,9 +288,10 @@ void SAL_CALL OQueryController::getFastPropertyValue( Any& o_rValue, sal_Int32 i
PropertyAttribute::READONLY
);
+ auto [begin, end] = toNonConstRange(aProps);
std::sort(
- aProps.begin(),
- aProps.end(),
+ begin,
+ end,
::comphelper::PropertyCompareByName()
);