[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/source

Julien Nabet serval2412 at yahoo.fr
Sat Jun 24 13:10:24 UTC 2017


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

New commits:
commit a8dc650eaae7d35b944b62560056bda0423d3f96
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>
    (cherry picked from commit 36d91a65ab2db0c4c81e09771f6b44e1905122a0)
    Reviewed-on: https://gerrit.libreoffice.org/39195
    Reviewed-by: Muthu Subramanian K <muthusuba at gmail.com>

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 ) )


More information about the Libreoffice-commits mailing list