diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-06-23 23:55:50 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-06-24 15:10:04 +0200 |
commit | a8dc650eaae7d35b944b62560056bda0423d3f96 (patch) | |
tree | f407afe8b981dc449ea2d66ced48826e8bb7ed2a | |
parent | c50ad28cea076d44c863c2b554d909235554cba0 (diff) |
tdf#40713: dBASE, don't lose dbt file
if aDbtFile corresponds exactly to aTmpFile, we just have to return
Change-Id: I1dde8efbe01838dc94f6025d5b81f5aee01932ac
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)
Reviewed-on: https://gerrit.libreoffice.org/39195
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
-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 77db8cd073f4..69a724d44b55 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2379,6 +2379,12 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) const SfxStringItem* pNameItem = rMed.GetItemSet()->GetItem<SfxStringItem>( 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::NONE ) == aTmpFile.GetMainURL( INetURLObject::DecodeMechanism::NONE )) + return bRet; + if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) ) bRet = false; if ( bRet && !MoveFile( aTmpFile, aDbtFile ) ) |