[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sc/source
Julien Nabet
serval2412 at yahoo.fr
Sat Jun 24 17:51:30 UTC 2017
sc/source/ui/docshell/docsh.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit e9cb227d3fd65ea46ffb926f2babb1926e5f2133
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Jun 23 23:55:50 2017 +0200
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 at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 36d91a65ab2db0c4c81e09771f6b44e1905122a0)
Change-Id: I1dde8efbe01838dc94f6025d5b81f5aee01932ac
Reviewed-on: https://gerrit.libreoffice.org/39196
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
Tested-by: Jenkins <ci at libreoffice.org>
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 ) )
More information about the Libreoffice-commits
mailing list