diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-09-19 13:16:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-09-19 17:56:37 +0200 |
commit | 6ae1794736666b2a483120977479fc6f12406021 (patch) | |
tree | 2677c2684044e23572516887aeb72f624abd96d6 /sc | |
parent | 9e92a17cb6e03beedeeca40bfc8524c2623d31eb (diff) |
rename SfxObjectShell::GetError -> GetErrorIgnoreWarning
to distinguish it from the very similar GetErrorCode()
Change-Id: Ic863742a7546e2835826d12181bf073ccbbbfb83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 38 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/instbdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/linkarea.cxx | 2 |
4 files changed, 22 insertions, 22 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index dc61327de9d1..2b568c5d8d54 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1219,7 +1219,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) ScGlobal::GetCharsetValue(sItStr)); if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) @@ -1256,7 +1256,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) bRet = true; @@ -1356,12 +1356,12 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) bRet = true; } - else if (!GetError() && (bOverflowRow || bOverflowCol || bOverflowCell)) + else if (!GetErrorIgnoreWarning() && (bOverflowRow || bOverflowCol || bOverflowCell)) { // precedence: row, column, cell ErrCode nWarn = (bOverflowRow ? SCWARN_IMPORT_ROW_OVERFLOW : @@ -1395,7 +1395,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) bRet = true; @@ -1431,7 +1431,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) ScGlobal::GetCharsetValue(sItStr)); if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) @@ -1475,12 +1475,12 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) bRet = true; } - else if (!GetError() && (bOverflowRow || bOverflowCol || bOverflowCell)) + else if (!GetErrorIgnoreWarning() && (bOverflowRow || bOverflowCol || bOverflowCell)) { // precedence: row, column, cell ErrCode nWarn = (bOverflowRow ? SCWARN_IMPORT_ROW_OVERFLOW : @@ -1497,7 +1497,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) ErrCode eError = ScFormatFilter::Get().ScImportQuattroPro(rMedium.GetInStream(), *m_pDocument); if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) bRet = true; @@ -1523,7 +1523,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) eError = ScFormatFilter::Get().ScImportRTF( *pInStream, rMedium.GetBaseURL(), m_pDocument.get(), aRange ); if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) @@ -1545,7 +1545,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) bRet = true; @@ -1578,7 +1578,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) GetOutputFactor(), !bWebQuery, &aNumFormatter, bDateConvert, bScientificConvert ); if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) @@ -1599,7 +1599,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != ERRCODE_NONE) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if( eError.IsWarning() ) bRet = true; @@ -1607,7 +1607,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) } else { - if (!GetError()) + if (!GetErrorIgnoreWarning()) { SAL_WARN("sc.filter", "No match for filter '" << aFltName << "' in ConvertFrom"); SetError(SCERR_IMPORT_NI); @@ -2449,7 +2449,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) eFormat = ExpBiff8; ErrCode eError = ScFormatFilter::Get().ScExportExcel5( rMed, m_pDocument.get(), eFormat, RTL_TEXTENCODING_MS_1252 ); - if( eError && !GetError() ) + if( eError && !GetErrorIgnoreWarning() ) SetError(eError); // don't return false for warnings @@ -2614,7 +2614,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) aTmpFile.setExtension(u"dbt"); if ( eError != ERRCODE_NONE && !eError.IsWarning() ) { - if (!GetError()) + if (!GetErrorIgnoreWarning()) SetError(eError); if ( bHasMemo && IsDocument( aTmpFile ) ) KillFile( aTmpFile ); @@ -2634,7 +2634,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) if (aDbtFile.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) == aTmpFile.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous )) { - if (eError != ERRCODE_NONE && !GetError()) + if (eError != ERRCODE_NONE && !GetErrorIgnoreWarning()) SetError(eError); return bRet; } @@ -2650,7 +2650,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) eError = SCERR_EXPORT_DATA; } } - if (eError != ERRCODE_NONE && !GetError()) + if (eError != ERRCODE_NONE && !GetErrorIgnoreWarning()) SetError(eError); } } @@ -2726,7 +2726,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) } else { - if (GetError()) + if (GetErrorIgnoreWarning()) SetError(SCERR_IMPORT_NI); } return bRet; diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 36666799dbce..377b8cff1943 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -838,7 +838,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (nErr) ErrorHandler::HandleError( nErr ); // also warnings - if ( !pOtherDocSh->GetError() ) // only errors + if ( !pOtherDocSh->GetErrorIgnoreWarning() ) // only errors { bool bHadTrack = ( m_pDocument->GetChangeTrack() != nullptr ); #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index c8ef1a6b4bef..8d92699e70f8 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -329,7 +329,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg if ( nErr ) ErrorHandler::HandleError(nErr, m_xDialog.get()); // warnings, too - if ( !pDocShTables->GetError() ) // errors only + if ( !pDocShTables->GetErrorIgnoreWarning() ) // errors only { FillTables_Impl( &pDocShTables->GetDocument() ); m_xFtPath->set_label(pDocShTables->GetTitle(SFX_TITLE_FULLNAME)); diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 6b1716407561..00d508a6661b 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -215,7 +215,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, if (nErr) ErrorHandler::HandleError( nErr ); // including warnings - if (!m_pSourceShell->GetError()) // only errors + if (!m_pSourceShell->GetErrorIgnoreWarning()) // only errors { m_xCbUrl->set_entry_text(pMed->GetName()); } |