Kaydet (Commit) daafd2dd authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

tdf#100002 MM: directly try filename from column

If we generate multiple files via mail merge with the same name,
we append a number to any file, so the "basename" filename won't
actually be generated.

But if we get the filename from a database column, the user
expects to try the original file name before trying a name with
an appended number.

Change-Id: I68411901ed90d8e9a21423de9233a5be4f41eb12
üst 9fc04e6e
...@@ -1322,7 +1322,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, ...@@ -1322,7 +1322,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
aEntry.removeSegment(); aEntry.removeSegment();
sPath = aEntry.GetMainURL( INetURLObject::NO_DECODE ); sPath = aEntry.GetMainURL( INetURLObject::NO_DECODE );
OUString sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), '*')); OUString sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), '*'));
aTempFile.reset( new utl::TempFile(sLeading, true, &sExt, &sPath) ); aTempFile.reset( new utl::TempFile(sLeading, sColumnData.isEmpty(), &sExt, &sPath) );
if( !aTempFile->IsValid() ) if( !aTempFile->IsValid() )
{ {
ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED ); ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment