diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-09-17 15:22:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-18 12:00:51 +0200 |
commit | 898ba5beb4db4ff30cc4409da829c3d79907f37e (patch) | |
tree | 9128a742c7f427e8fdc8fa8a3a5f4d4a31fc8bae /sw/source/uibase/dbui | |
parent | ca3d526a24390df6158bf233fa63e19f5f4b1f4b (diff) |
use more string_view in utl::TempFile
Change-Id: I151c66479053b9b5b7699a4938a622b4320aeaa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140104
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/dbui')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 2cef62c22f05..ac6aa2df1e6b 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -786,12 +786,11 @@ static void lcl_SaveDebugDoc( SfxObjectShell *xTargetDocShell, if( sTempDirURL.isEmpty() ) return; - const OUString sExt( ".odt" ); OUString basename = OUString::createFromAscii( name ); if (no > 0) basename += OUString::number(no) + "-"; // aTempFile is not deleted, but that seems to be intentional - utl::TempFile aTempFile( basename, true, &sExt, &sTempDirURL ); + utl::TempFile aTempFile( basename, true, u".odt", &sTempDirURL ); INetURLObject aTempFileURL( aTempFile.GetURL() ); auto pDstMed = std::make_unique<SfxMedium>( aTempFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), @@ -1324,7 +1323,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, } OUString sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), '*')); - aTempFile.reset( new utl::TempFile(sLeading, sColumnData.isEmpty(), &sExt, &sPrefix, true) ); + aTempFile.reset( new utl::TempFile(sLeading, sColumnData.isEmpty(), sExt, &sPrefix, true) ); if( !aTempFile->IsValid() ) { ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED ); @@ -2743,9 +2742,8 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference if (aOwnURL.isEmpty()) { // Cannot embed, as embedded data source would need the URL of the parent document. - OUString const sOutputExt = ".odb"; OUString sHomePath(SvtPathOptions().GetWorkPath()); - utl::TempFile aTempFile(sNewName, true, &sOutputExt, pDestDir ? pDestDir : &sHomePath); + utl::TempFile aTempFile(sNewName, true, u".odb", pDestDir ? pDestDir : &sHomePath); const OUString& sTmpName = aTempFile.GetURL(); xStore->storeAsURL(sTmpName, uno::Sequence<beans::PropertyValue>()); } |