summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r--sw/source/uibase/app/docsh.cxx26
-rw-r--r--sw/source/uibase/app/docsh2.cxx8
-rw-r--r--sw/source/uibase/app/docshini.cxx8
-rw-r--r--sw/source/uibase/app/swmodule.cxx4
4 files changed, 23 insertions, 23 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index fc112a080bff..714b20cac102 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -154,9 +154,9 @@ bool SwDocShell::InsertGeneratedStream(SfxMedium & rMedium,
Reader *const pRead = StartConvertFrom(rMedium, &pReader, nullptr, &aPam);
if (!pRead)
return false;
- sal_uLong const nError = pReader->Read(*pRead);
+ ErrCode const nError = pReader->Read(*pRead);
delete pReader;
- return 0 == nError;
+ return ERRCODE_NONE == nError;
}
// Prepare loading
@@ -255,7 +255,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
// Restore the pool default if reading a saved document.
m_pDoc->RemoveAllFormatLanguageDependencies();
- sal_uLong nErr = pRdr->Read( *pRead );
+ ErrCode nErr = pRdr->Read( *pRead );
// Maybe put away one old Doc
if (m_pDoc != pRdr->GetDoc())
@@ -277,7 +277,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
SW_MOD()->SetEmbeddedLoadSave( false );
SetError(nErr);
- bool bOk = !IsError( nErr );
+ bool bOk = !nErr.IsError();
if (bOk && !m_pDoc->IsInLoadAsynchron())
{
@@ -307,13 +307,13 @@ bool SwDocShell::Save()
m_pDoc->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
- sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ ErrCode nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
if( SfxObjectShell::Save() )
{
switch( GetCreateMode() )
{
case SfxObjectCreateMode::INTERNAL:
- nErr = 0;
+ nErr = ERRCODE_NONE;
break;
case SfxObjectCreateMode::ORGANIZER:
@@ -374,7 +374,7 @@ bool SwDocShell::Save()
{
pFrame->GetBindings().SetState(SfxBoolItem(SID_DOC_MODIFIED, false));
}
- return !IsError( nErr );
+ return !nErr.IsError();
}
// Save using the Defaultformat
@@ -446,7 +446,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
m_pDoc->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
- sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ ErrCode nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
uno::Reference < embed::XStorage > xStor = rMedium.GetOutputStorage();
if( SfxObjectShell::SaveAs( rMedium ) )
{
@@ -514,7 +514,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
}
SetError(nErr ? nErr : nVBWarning);
- return !IsError( nErr );
+ return !nErr.IsError();
}
// Save all Formats
@@ -552,7 +552,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
m_pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
}
- sal_uLong nVBWarning = 0;
+ ErrCode nVBWarning = ERRCODE_NONE;
if (m_pDoc->ContainsMSVBasic())
{
@@ -711,7 +711,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
SfxObjectCreateMode::EMBEDDED == GetCreateMode());
// Span Context in order to suppress the Selection's View
- sal_uLong nErrno;
+ ErrCode nErrno;
const OUString aFileName( rMedium.GetName() );
// No View, so the whole Document!
@@ -741,7 +741,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
if( pSrcView )
{
pSrcView->SaveContentTo(rMedium);
- nErrno = 0;
+ nErrno = ERRCODE_NONE;
}
else
{
@@ -755,7 +755,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
if( !rMedium.IsStorage() )
rMedium.CloseOutStream();
- return !IsError( nErrno );
+ return ! nErrno.IsError();
}
// Hands off
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index ad675dfd9b0c..89bf88550bd3 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -715,7 +715,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pStrm->SetBufferSize( 16348 );
SwWriter aWrt( *pStrm, *pSmryDoc );
ErrCode eErr = aWrt.Write( xWrt );
- if( !ERRCODE_TOERROR( eErr ) )
+ if( !eErr.IgnoreWarning() )
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference< frame::XDispatchProvider > xProv = drawing::ModuleDispatcher::create( xContext );
@@ -776,7 +776,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SwWriter aWrt( *pStrm, *GetDoc() );
ErrCode eErr = aWrt.Write( xWrt );
EnableSetModified( bEnable );
- if( !ERRCODE_TOERROR( eErr ) )
+ if( !eErr.IgnoreWarning() )
{
pStrm->Seek( STREAM_SEEK_TO_END );
pStrm->WriteChar( '\0' );
@@ -1434,10 +1434,10 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie
m_pDoc->getIDocumentState().ResetModified();
}
-sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL,
+ErrCode SwDocShell::LoadStylesFromFile( const OUString& rURL,
SwgReaderOption& rOpt, bool bUnoCall )
{
- sal_uLong nErr = 0;
+ ErrCode nErr = ERRCODE_NONE;
// Set filter:
SfxFilterMatcher aMatcher( SwDocShell::Factory().GetFactoryName() );
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index a670ff8eb7a0..4419abf03cf2 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -522,7 +522,7 @@ bool SwDocShell::Load( SfxMedium& rMedium )
}
SwWait aWait( *this, true );
- sal_uInt32 nErr = ERR_SWG_READ_ERROR;
+ ErrCode nErr = ERR_SWG_READ_ERROR;
switch( GetCreateMode() )
{
case SfxObjectCreateMode::ORGANIZER:
@@ -582,7 +582,7 @@ bool SwDocShell::Load( SfxMedium& rMedium )
InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : nullptr);
SetError(nErr);
- bRet = !IsError( nErr );
+ bRet = !nErr.IsError();
if (bRet && !m_pDoc->IsInLoadAsynchron() &&
GetCreateMode() == SfxObjectCreateMode::STANDARD)
@@ -606,7 +606,7 @@ bool SwDocShell::LoadFrom( SfxMedium& rMedium )
AddLink(); // set Link and update Data!!
do { // middle check loop
- sal_uInt32 nErr = ERR_SWG_READ_ERROR;
+ ErrCode nErr = ERR_SWG_READ_ERROR;
OUString aStreamName = "styles.xml";
uno::Reference < container::XNameAccess > xAccess( rMedium.GetStorage(), uno::UNO_QUERY );
if ( xAccess->hasByName( aStreamName ) && rMedium.GetStorage()->isStreamElement( aStreamName ) )
@@ -631,7 +631,7 @@ bool SwDocShell::LoadFrom( SfxMedium& rMedium )
}
SetError(nErr);
- bRet = !IsError( nErr );
+ bRet = !nErr.IsError();
} while( false );
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index 9b5c6f6debb5..e9b4cb53b571 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -170,8 +170,8 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
pSwResMgr = GetResMgr();
SvxErrorHandler::ensure();
m_pErrorHandler = new SfxErrorHandler( RID_SW_ERRHDL,
- ERRCODE_AREA_SW,
- ERRCODE_AREA_SW_END,
+ ErrCode(ERRCODE_AREA_SW),
+ ErrCode(ERRCODE_AREA_SW_END),
pSwResMgr );
m_pModuleConfig = new SwModuleOptions;