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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 6 |
3 files changed, 10 insertions, 10 deletions
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 ) |