Reuse already existing value

Change-Id: I996cd76b55265e783f51573b6d67b0c0187427c8
Reviewed-on: https://gerrit.libreoffice.org/44924
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Mike Kaganski 2017-11-19 08:31:59 +02:00 committed by Julien Nabet
parent 60da185b57
commit dfc45f0aba

View file

@ -2735,7 +2735,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(const DBConnURITypes type, const
OUString sNewName = INetURLObject::decode( aURL.getName(),
INetURLObject::DecodeMechanism::Unambiguous );
sal_Int32 nExtLen = aURL.GetExtension().getLength();
sal_Int32 nExtLen = sExt.getLength();
sNewName = sNewName.replaceAt( sNewName.getLength() - nExtLen - 1, nExtLen + 1, "" );
if (pPrefix)
sNewName = *pPrefix + sNewName;