diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-11-30 17:46:35 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-12-01 12:39:53 +0100 |
commit | 29dad1e4545c877bcf8e9bb23359d4eb39251938 (patch) | |
tree | f6891e7be42537efed1d0219348e0057ed673297 /sfx2 | |
parent | 0d9231f2133def9254e0220b8033a46e5fc17658 (diff) |
sc: move test back where it belongs
This test was moved from sc/qa/unit/subsequent_filters_test2.cxx
to sc/qa/unit/filters-test.cxx in ad40ad91c5400391a0848832e91c596be8fbd811
"CppunitTest_sc_subsequent_filters_test2: inherit from UnoApiXmlTest".
As the commit message says:
I couldn't find a way to test testTooManyColsRows,
move it to sc/qa/unit/filters-test.cxx for the
time being
The problem is that using loadFromDestkop resets the Error in
sfx2/source/doc/sfxbasemodel.cxx:2005 - m_pData->m_pObjectShell->ResetError();
so add a way to log the WarningError in SfxMedium
Change-Id: Ieda9bdc9de856b75d4b162248da41d637305e28d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143506
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 2f773fca6e62..c81b79e8ec4e 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -348,6 +348,7 @@ class SfxMedium_Impl public: StreamMode m_nStorOpenMode; ErrCode m_eError; + ErrCode m_eWarningError; ::ucbhelper::Content aContent; bool bUpdatePickList:1; @@ -437,6 +438,7 @@ public: SfxMedium_Impl::SfxMedium_Impl() : m_nStorOpenMode(SFX_STREAM_READWRITE), m_eError(ERRCODE_NONE), + m_eWarningError(ERRCODE_NONE), bUpdatePickList(true), bIsTemp( false ), bDownloadDone( true ), @@ -487,6 +489,11 @@ void SfxMedium::ResetError() pImpl->m_pOutStream->ResetError(); } +ErrCode SfxMedium::GetWarningError() const +{ + return pImpl->m_eWarningError; +} + ErrCode const & SfxMedium::GetLastStorageCreationState() const { return pImpl->nLastStorageError; @@ -497,6 +504,11 @@ void SfxMedium::SetError(ErrCode nError) pImpl->m_eError = nError; } +void SfxMedium::SetWarningError(ErrCode nWarningError) +{ + pImpl->m_eWarningError = nWarningError; +} + ErrCode SfxMedium::GetErrorCode() const { ErrCode lError = pImpl->m_eError; diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index ebfa497aaef1..9948aadf0d37 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2802,6 +2802,8 @@ SfxMedium* SfxBaseModel::handleLoadError( ErrCode nError, SfxMedium* pMedium ) "SfxBaseModel::handleLoadError: 0x" + nError.toString(), Reference< XInterface >(), sal_uInt32(nError)); } + else + pMedium->SetWarningError(nError); return pMedium; } |