diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-06-23 23:55:50 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-06-24 19:51:09 +0200 |
commit | e9cb227d3fd65ea46ffb926f2babb1926e5f2133 (patch) | |
tree | dc4097ea80ee36d2f50ce3669c0b952f6f468f02 /sc | |
parent | 954931c86cf67876c8324acec31c3e95feeb6b4d (diff) |
tdf#40713: dBASE, don't lose dbt file
if aDbtFile corresponds exactly to aTmpFile, we just have to return
Reviewed-on: https://gerrit.libreoffice.org/39189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 36d91a65ab2db0c4c81e09771f6b44e1905122a0)
Change-Id: I1dde8efbe01838dc94f6025d5b81f5aee01932ac
Reviewed-on: https://gerrit.libreoffice.org/39196
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 9b12c99a25d5..f0214bd46cf5 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2394,6 +2394,12 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) static_cast<const SfxStringItem*>( rMed.GetItemSet()->GetItem( SID_FILE_NAME ) ); INetURLObject aDbtFile( pNameItem->GetValue(), INetProtocol::File ); aDbtFile.setExtension("dbt"); + + // tdf#40713: don't lose dbt file + // if aDbtFile corresponds exactly to aTmpFile, we just have to return + if (aDbtFile.GetMainURL( INetURLObject::DecodeMechanism::DECODE_UNAMBIGUOUS ) == aTmpFile.GetMainURL( INetURLObject::DecodeMechanism::DECODE_UNAMBIGUOUS )) + return bRet; + if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) ) bRet = false; if ( bRet && !MoveFile( aTmpFile, aDbtFile ) ) |