[Libreoffice-commits] core.git: sc/source

Julien Nabet serval2412 at yahoo.fr
Sat Jun 24 07:22:47 UTC 2017


 sc/source/ui/docshell/docsh.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 36d91a65ab2db0c4c81e09771f6b44e1905122a0
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
    
    Change-Id: I1dde8efbe01838dc94f6025d5b81f5aee01932ac
    Reviewed-on: https://gerrit.libreoffice.org/39189
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 36ce03fdf3f2..fd4721744e27 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 ) )


More information about the Libreoffice-commits mailing list