diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-07-22 15:50:51 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-07-23 10:04:48 +0200 |
commit | 22914d1eb8afa35827b33f2d8bdce9da7283e735 (patch) | |
tree | 8b860a2a0946a703bf1370883d28d8bed970503f /dbaccess/source | |
parent | c6b404c39569b6bc972b821a13f6bba0a68d8d9d (diff) |
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 <lionel@mamane.lu>
Tested-by: Jenkins
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
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(); } } |