summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/objsh.hxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx38
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx2
-rw-r--r--sd/source/ui/docshell/docshel4.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx12
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx6
-rw-r--r--sw/source/core/doc/docglbl.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx6
12 files changed, 39 insertions, 39 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index dfb69b264418..a214c242a1c7 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -290,7 +290,7 @@ public:
SAL_DLLPRIVATE void SetMacroMode_Impl(bool bModal=true);
void ResetError();
- ErrCode GetError() const;
+ ErrCode GetErrorIgnoreWarning() const;
ErrCode GetErrorCode() const;
void SetError(ErrCode rErr);
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());
}
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index c240399053b9..6b9d8993ada9 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -583,7 +583,7 @@ bool DrawDocShell::SaveAs( SfxMedium& rMedium )
if( bRet )
bRet = SdXMLFilter( rMedium, *this, SdXMLFilterMode::Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Export();
- if( GetError() == ERRCODE_NONE )
+ if( GetErrorIgnoreWarning() == ERRCODE_NONE )
SetError(ERRCODE_NONE);
return bRet;
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index a5fb72251bf1..db7b972b67d8 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -217,7 +217,7 @@ void SfxObjectShell::SetError(ErrCode lErr)
}
}
-ErrCode SfxObjectShell::GetError() const
+ErrCode SfxObjectShell::GetErrorIgnoreWarning() const
{
return GetErrorCode().IgnoreWarning();
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 4044bc72fdef..a62271fa9ccf 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -635,7 +635,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
EnableSetModified( false );
pMedium->LockOrigFileOnDemand( true, false );
- if ( GetError() == ERRCODE_NONE && bOwnStorageFormat && ( !pFilter || !( pFilter->GetFilterFlags() & SfxFilterFlags::STARONEFILTER ) ) )
+ if ( GetErrorIgnoreWarning() == ERRCODE_NONE && bOwnStorageFormat && ( !pFilter || !( pFilter->GetFilterFlags() & SfxFilterFlags::STARONEFILTER ) ) )
{
uno::Reference< embed::XStorage > xStorage;
if ( pMedium->GetError() == ERRCODE_NONE )
@@ -675,7 +675,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
// Load
- if ( !GetError() )
+ if ( !GetErrorIgnoreWarning() )
{
pImpl->nLoadedFlags = SfxLoadedFlags::NONE;
pImpl->bModelInitialized = false;
@@ -694,7 +694,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
else
SetError(pMed->GetLastStorageCreationState());
}
- else if ( GetError() == ERRCODE_NONE && InitNew(nullptr) )
+ else if ( GetErrorIgnoreWarning() == ERRCODE_NONE && InitNew(nullptr) )
{
// set name before ConvertFrom, so that GetSbxObject() already works
bHasName = true;
@@ -705,7 +705,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
else
pMedium->GetStorage();
- if ( GetError() == ERRCODE_NONE )
+ if ( GetErrorIgnoreWarning() == ERRCODE_NONE )
{
// Experimental PDF importing using PDFium. This is currently enabled for LOK only and
// we handle it not via XmlFilterAdaptor but a new SdPdfFiler.
@@ -1928,7 +1928,7 @@ bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
// here only root storages are included, which are stored via temp file
rMedium.CreateTempFileNoCopy();
SetError(rMedium.GetErrorCode());
- if ( GetError() )
+ if ( GetErrorIgnoreWarning() )
return false;
// copy version list from "old" medium to target medium, so it can be used on saving
@@ -2621,7 +2621,7 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
pMediumTmp->DisableFileSync(true);
bool bSaved = false;
- if( !GetError() && SaveTo_Impl( *pMediumTmp, pArgs ) )
+ if( !GetErrorIgnoreWarning() && SaveTo_Impl( *pMediumTmp, pArgs ) )
{
bSaved = true;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index ac0de0cc89a5..3b8bcd160018 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1697,7 +1697,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
pParams.reset();
- ErrCode nErrCode = m_pData->m_pObjectShell->GetError() ? m_pData->m_pObjectShell->GetError()
+ ErrCode nErrCode = m_pData->m_pObjectShell->GetErrorIgnoreWarning() ? m_pData->m_pObjectShell->GetErrorIgnoreWarning()
: ERRCODE_IO_CANTWRITE;
m_pData->m_pObjectShell->ResetError();
@@ -1882,8 +1882,8 @@ void SAL_CALL SfxBaseModel::initNew()
throw frame::DoubleInitializationException();
bool bRes = m_pData->m_pObjectShell->DoInitNew();
- ErrCode nErrCode = m_pData->m_pObjectShell->GetError() ?
- m_pData->m_pObjectShell->GetError() : ERRCODE_IO_CANTCREATE;
+ ErrCode nErrCode = m_pData->m_pObjectShell->GetErrorIgnoreWarning() ?
+ m_pData->m_pObjectShell->GetErrorIgnoreWarning() : ERRCODE_IO_CANTCREATE;
m_pData->m_pObjectShell->ResetError();
if ( !bRes )
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 737506ca275e..6a87836d75e8 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -331,7 +331,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
xDocSh->DoSaveCompleted( pTmpMed );
// do not insert a FileLinkSection in case of error
- if( xDocSh->GetError() )
+ if( xDocSh->GetErrorIgnoreWarning() )
sFileName.clear();
}
xDocSh->DoClose();
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 5bf5b65c3af3..e4363df4fdf0 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -632,7 +632,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
aOpt.SetMerge( !bMerge );
SetError(LoadStylesFromFile(aFileName, aOpt, false));
- if ( !GetError() )
+ if ( !GetErrorIgnoreWarning() )
rReq.Done();
}
}
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index f16fadeaa395..0cc225e0c3de 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -797,7 +797,7 @@ static void lcl_SaveDebugDoc( SfxObjectShell *xTargetDocShell,
StreamMode::STD_READWRITE );
bool bAnyError = !xTargetDocShell->DoSaveAs( *pDstMed );
// xObjectShell->DoSaveCompleted crashes the mail merge unit tests, so skip it
- bAnyError |= (ERRCODE_NONE != xTargetDocShell->GetError());
+ bAnyError |= (ERRCODE_NONE != xTargetDocShell->GetErrorIgnoreWarning());
if( bAnyError )
SAL_WARN( "sw.mailmerge", "Error saving: " << aTempFile.GetURL() );
else
@@ -837,11 +837,11 @@ static bool lcl_SaveDoc(
// Actually this should be a bool... so in case of email and individual
// files, where this is set, we skip the recently used handling
bAnyError |= !xObjectShell->DoSaveCompleted( pDstMed, !decodedURL );
- bAnyError |= (ERRCODE_NONE != xObjectShell->GetError());
+ bAnyError |= (ERRCODE_NONE != xObjectShell->GetErrorIgnoreWarning());
if( bAnyError )
{
// error message ??
- ErrorHandler::HandleError( xObjectShell->GetError() );
+ ErrorHandler::HandleError( xObjectShell->GetErrorIgnoreWarning() );
}
return !bAnyError;
}