dbaccess/source/core/dataaccess/databasedocument.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 22914d1eb8afa35827b33f2d8bdce9da7283e735 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sat Jul 22 15:50:51 2023 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Sun Jul 23 10:04:48 2023 +0200 No need to create an identical obj if we return the same property values Change-Id: Ib932de42ffec6d71b31a25d53f46f18a26b0b2b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154762 Reviewed-by: Lionel Mamane <lio...@mamane.lu> Tested-by: Jenkins diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 2aa2710006c0..e40c295d9b51 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -306,12 +306,12 @@ namespace Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const ::comphelper::NamedValueCollection& _rDescriptor, const OUString& _rURL ) { + if ( _rURL.isEmpty() ) + return _rDescriptor.getPropertyValues(); + ::comphelper::NamedValueCollection aMutableDescriptor( _rDescriptor ); - if ( !_rURL.isEmpty() ) - { - aMutableDescriptor.put( "FileName", _rURL ); - aMutableDescriptor.put( "URL", _rURL ); - } + aMutableDescriptor.put( "FileName", _rURL ); + aMutableDescriptor.put( "URL", _rURL ); return aMutableDescriptor.getPropertyValues(); } }