summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docsh.cxx')
-rw-r--r--sc/source/ui/docshell/docsh.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 0fd41c54d957..bd7402231333 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2442,15 +2442,10 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
ErrCode eError = DBaseExport(
rMed.GetPhysicalName(), ScGlobal::GetCharsetValue(sCharSet), bHasMemo);
- if ( eError != ERRCODE_NONE && eError.IsWarning() )
- {
- eError = ERRCODE_NONE;
- }
-
INetURLObject aTmpFile( rMed.GetPhysicalName(), INetProtocol::File );
if ( bHasMemo )
aTmpFile.setExtension("dbt");
- if ( eError != ERRCODE_NONE )
+ if ( eError != ERRCODE_NONE && !eError.IsWarning() )
{
if (!GetError())
SetError(eError);
@@ -2468,8 +2463,13 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
// tdf#40713: don't lose dbt file
// if aDbtFile corresponds exactly to aTmpFile, we just have to return
- if (aDbtFile.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) == aTmpFile.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ))
+ if (aDbtFile.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ==
+ aTmpFile.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ))
+ {
+ if (eError != ERRCODE_NONE && !GetError())
+ SetError(eError);
return bRet;
+ }
if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) )
bRet = false;
@@ -2478,10 +2478,12 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
if ( !bRet )
{
KillFile( aTmpFile );
- if ( !GetError() )
- SetError(SCERR_EXPORT_DATA);
+ if (eError == ERRCODE_NONE || eError.IsWarning())
+ eError = SCERR_EXPORT_DATA;
}
}
+ if (eError != ERRCODE_NONE && !GetError())
+ SetError(eError);
}
}
else if (aFltName == pFilterDif)