From d042b39c2f30246b51cba65400552c25a6dd5105 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 23 Feb 2021 09:47:58 +0100 Subject: No need to check if parent is empty: utl::TempFile does it itself ... down in ConstructTempDir_Impl Change-Id: I04f4cdb0bd77b1bf0f20a2c72b32a5343e9e7e72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111324 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sfx2/source/doc/docfile.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sfx2/source') diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 567e4e678b2b..b1f96440fb8a 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -3667,7 +3667,7 @@ void SfxMedium::CreateTempFile( bool bReplace ) } OUString aLogicBase = GetLogicBase(GetURLObject(), pImpl); - pImpl->pTempFile.reset( new ::utl::TempFile(aLogicBase.isEmpty() ? nullptr : &aLogicBase) ); + pImpl->pTempFile.reset(new ::utl::TempFile(&aLogicBase)); pImpl->pTempFile->EnableKillingFile(); pImpl->m_aName = pImpl->pTempFile->GetFileName(); OUString aTmpURL = pImpl->pTempFile->GetURL(); @@ -3763,7 +3763,7 @@ void SfxMedium::CreateTempFileNoCopy() pImpl->pTempFile.reset(); OUString aLogicBase = GetLogicBase(GetURLObject(), pImpl); - pImpl->pTempFile.reset( new ::utl::TempFile(aLogicBase.isEmpty() ? nullptr : &aLogicBase) ); + pImpl->pTempFile.reset(new ::utl::TempFile(&aLogicBase)); pImpl->pTempFile->EnableKillingFile(); pImpl->m_aName = pImpl->pTempFile->GetFileName(); if ( pImpl->m_aName.isEmpty() ) -- cgit