summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/sderror.hxx15
-rw-r--r--sd/inc/sdgrffilter.hxx2
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx60
-rw-r--r--sd/source/filter/html/htmlex.cxx38
-rw-r--r--sd/source/filter/html/htmlex.hxx2
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx56
-rw-r--r--sd/source/ui/app/sdmod.cxx4
-rw-r--r--sd/source/ui/app/sdmod1.cxx26
-rw-r--r--sd/source/ui/docshell/docshel4.cxx2
-rw-r--r--sd/source/ui/func/fuinsfil.cxx4
-rw-r--r--sd/source/ui/func/fupage.cxx2
-rw-r--r--sd/source/ui/inc/OutlineViewShell.hxx2
-rw-r--r--sd/source/ui/view/outlnvsh.cxx4
-rw-r--r--sd/source/ui/view/sdview4.cxx2
14 files changed, 95 insertions, 124 deletions
diff --git a/sd/inc/sderror.hxx b/sd/inc/sderror.hxx
index 009bb9f35d57..4f52035a13c0 100644
--- a/sd/inc/sderror.hxx
+++ b/sd/inc/sderror.hxx
@@ -31,21 +31,12 @@
#define WARN_SD_WRITE_BASE (WARN_SD_BASE | ERRCODE_CLASS_WRITE )
// Import errors
-#define ERR_FORMAT_ROWCOL (ERROR_SD_READ_BASE | 1)
-#define ERR_FORMAT_FILE_ROWCOL (ERROR_SD_READ_BASE | 2)
+#define ERR_FORMAT_ROWCOL ErrCode(ERROR_SD_READ_BASE | 1)
+#define ERR_FORMAT_FILE_ROWCOL ErrCode(ERROR_SD_READ_BASE | 2)
// ----- Warnings ---------------------------
-#define WARN_FORMAT_FILE_ROWCOL (WARN_SD_READ_BASE | 100)
-
-#ifndef __RSC
-
-inline bool IsWarning( sal_uLong nErr )
-{
- return 0 != ( nErr & ERRCODE_WARNING_MASK );
-}
-
-#endif
+#define WARN_FORMAT_FILE_ROWCOL ErrCode(WARN_SD_READ_BASE | 100)
#endif
diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx
index a64896d4d4b2..2846914e24cd 100644
--- a/sd/inc/sdgrffilter.hxx
+++ b/sd/inc/sdgrffilter.hxx
@@ -36,7 +36,7 @@ public:
bool Import();
bool Export() override;
- static void HandleGraphicFilterError( ErrCode nFilterError, sal_uLong nStreamError );
+ static void HandleGraphicFilterError( ErrCode nFilterError, ErrCode nStreamError );
};
#endif // INCLUDED_SD_INC_SDGRFFILTER_HXX
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 93c80c101803..5b5af603e3a5 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -86,7 +86,7 @@ using namespace ::sfx2;
class SdGRFFilter_ImplInteractionHdl : public ::cppu::WeakImplHelper< css::task::XInteractionHandler >
{
css::uno::Reference< css::task::XInteractionHandler > m_xInter;
- sal_uInt16 nFilterError;
+ ErrCode nFilterError;
public:
@@ -95,7 +95,7 @@ class SdGRFFilter_ImplInteractionHdl : public ::cppu::WeakImplHelper< css::task:
nFilterError( ERRCODE_NONE )
{}
- sal_uInt16 GetErrorCode() const { return nFilterError; };
+ ErrCode GetErrorCode() const { return nFilterError; };
virtual void SAL_CALL handle( const css::uno::Reference< css::task::XInteractionRequest >& ) override;
};
@@ -107,7 +107,7 @@ void SdGRFFilter_ImplInteractionHdl::handle( const css::uno::Reference< css::tas
css::drawing::GraphicFilterRequest aErr;
if ( xRequest->getRequest() >>= aErr )
- nFilterError = (sal_uInt16)aErr.ErrCode;
+ nFilterError = ErrCode(aErr.ErrCode);
else
m_xInter->handle( xRequest );
}
@@ -122,40 +122,32 @@ SdGRFFilter::~SdGRFFilter()
{
}
-void SdGRFFilter::HandleGraphicFilterError( ErrCode nFilterError, sal_uLong nStreamError )
+void SdGRFFilter::HandleGraphicFilterError( ErrCode nFilterError, ErrCode nStreamError )
{
- sal_uInt16 nId;
-
- switch( nFilterError )
+ if( ERRCODE_NONE != nStreamError )
{
- case ERRCODE_GRFILTER_OPENERROR:
- nId = STR_IMPORT_GRFILTER_OPENERROR;
- break;
- case ERRCODE_GRFILTER_IOERROR:
- nId = STR_IMPORT_GRFILTER_IOERROR;
- break;
- case ERRCODE_GRFILTER_FORMATERROR:
- nId = STR_IMPORT_GRFILTER_FORMATERROR;
- break;
- case ERRCODE_GRFILTER_VERSIONERROR:
- nId = STR_IMPORT_GRFILTER_VERSIONERROR;
- break;
- case ERRCODE_GRFILTER_TOOBIG:
- nId = STR_IMPORT_GRFILTER_TOOBIG;
- break;
- case 0 :
- nId = 0;
- break;
-
- default:
- case ERRCODE_GRFILTER_FILTERERROR:
- nId = STR_IMPORT_GRFILTER_FILTERERROR;
- break;
+ ErrorHandler::HandleError( nStreamError );
+ return;
}
- if( ERRCODE_NONE != nStreamError )
- ErrorHandler::HandleError( nStreamError );
- else if( STR_IMPORT_GRFILTER_IOERROR == nId )
+ sal_uInt16 nId;
+
+ if( nFilterError == ERRCODE_GRFILTER_OPENERROR )
+ nId = STR_IMPORT_GRFILTER_OPENERROR;
+ else if( nFilterError == ERRCODE_GRFILTER_IOERROR )
+ nId = STR_IMPORT_GRFILTER_IOERROR;
+ else if( nFilterError == ERRCODE_GRFILTER_FORMATERROR )
+ nId = STR_IMPORT_GRFILTER_FORMATERROR;
+ else if( nFilterError == ERRCODE_GRFILTER_VERSIONERROR )
+ nId = STR_IMPORT_GRFILTER_VERSIONERROR;
+ else if( nFilterError == ERRCODE_GRFILTER_TOOBIG )
+ nId = STR_IMPORT_GRFILTER_TOOBIG;
+ else if( nFilterError == ERRCODE_NONE )
+ nId = 0;
+ else
+ nId = STR_IMPORT_GRFILTER_FILTERERROR;
+
+ if( STR_IMPORT_GRFILTER_IOERROR == nId )
ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
else
{
@@ -173,7 +165,7 @@ bool SdGRFFilter::Import()
bool bRet = false;
SvStream* pIStm = mrMedium.GetInStream();
- sal_uInt16 nReturn = pIStm ? rGraphicFilter.ImportGraphic( aGraphic, aFileName, *pIStm, nFilter ) : 1;
+ ErrCode nReturn = pIStm ? rGraphicFilter.ImportGraphic( aGraphic, aFileName, *pIStm, nFilter ) : ErrCode(1);
if( nReturn )
HandleGraphicFilterError( nReturn, rGraphicFilter.GetLastError().nStreamError );
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index aef32f6bd961..e80256f82d87 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -138,7 +138,7 @@ public:
EasyFile();
~EasyFile();
- sal_uLong createStream( const OUString& rUrl, SvStream*& rpStr );
+ ErrCode createStream( const OUString& rUrl, SvStream*& rpStr );
void createFileName( const OUString& rUrl, OUString& rFileName );
void close();
};
@@ -1158,7 +1158,7 @@ bool HtmlExport::CreateHtmlTextForPresPages()
the given filename */
bool HtmlExport::WriteHtml( const OUString& rFileName, bool bAddExtension, const OUString& rHtmlData )
{
- sal_uLong nErr = 0;
+ ErrCode nErr = ERRCODE_NONE;
OUString aFileName( rFileName );
if( bAddExtension )
@@ -1169,7 +1169,7 @@ bool HtmlExport::WriteHtml( const OUString& rFileName, bool bAddExtension, const
SvStream* pStr;
OUString aFull(maExportPath + aFileName);
nErr = aFile.createStream(aFull , pStr);
- if(nErr == 0)
+ if(nErr == ERRCODE_NONE)
{
OString aStr(OUStringToOString(rHtmlData,
RTL_TEXTENCODING_UTF8));
@@ -1177,10 +1177,10 @@ bool HtmlExport::WriteHtml( const OUString& rFileName, bool bAddExtension, const
aFile.close();
}
- if( nErr != 0 )
+ if( nErr != ERRCODE_NONE )
ErrorHandler::HandleError(nErr);
- return nErr == 0;
+ return nErr == ERRCODE_NONE;
}
/** creates a outliner text for the title objects of a page
@@ -2868,7 +2868,7 @@ bool HtmlExport::CopyScript( const OUString& rPath, const OUString& rSource, con
meEC.SetContext( STR_HTMLEXP_ERROR_OPEN_FILE, rSource );
- sal_uLong nErr = 0;
+ ErrCode nErr = ERRCODE_NONE;
SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
if( pIStm )
@@ -2892,7 +2892,7 @@ bool HtmlExport::CopyScript( const OUString& rPath, const OUString& rSource, con
delete pIStm;
}
- if( nErr != 0 )
+ if( nErr != ERRCODE_NONE )
{
ErrorHandler::HandleError( nErr );
return (bool) nErr;
@@ -2913,7 +2913,7 @@ bool HtmlExport::CopyScript( const OUString& rPath, const OUString& rSource, con
EasyFile aFile;
SvStream* pStr;
nErr = aFile.createStream(aDest, pStr);
- if(nErr == 0)
+ if(nErr == ERRCODE_NONE)
{
OString aStr(OUStringToOString(aScript,
RTL_TEXTENCODING_UTF8));
@@ -2925,10 +2925,10 @@ bool HtmlExport::CopyScript( const OUString& rPath, const OUString& rSource, con
if (mpProgress)
mpProgress->SetState(++mnPagesWritten);
- if( nErr != 0 )
+ if( nErr != ERRCODE_NONE )
ErrorHandler::HandleError( nErr );
- return nErr == 0;
+ return nErr == ERRCODE_NONE;
}
static const char * ASP_Scripts[] = { "common.inc", "webcast.asp", "show.asp", "savepic.asp", "poll.asp", "editpic.asp" };
@@ -2999,8 +2999,8 @@ bool HtmlExport::CreateImageNumberFile()
meEC.SetContext( STR_HTMLEXP_ERROR_CREATE_FILE, aFileName );
EasyFile aFile;
SvStream* pStr;
- sal_uLong nErr = aFile.createStream(aFull, pStr);
- if(nErr == 0)
+ ErrCode nErr = aFile.createStream(aFull, pStr);
+ if(nErr == ERRCODE_NONE)
{
pStr->WriteCharPtr( "1" );
aFile.close();
@@ -3009,10 +3009,10 @@ bool HtmlExport::CreateImageNumberFile()
if (mpProgress)
mpProgress->SetState(++mnPagesWritten);
- if( nErr != 0 )
+ if( nErr != ERRCODE_NONE )
ErrorHandler::HandleError( nErr );
- return nErr == 0;
+ return nErr == ERRCODE_NONE;
}
OUString HtmlExport::InsertSound( const OUString& rSoundFile )
@@ -3040,7 +3040,7 @@ bool HtmlExport::CopyFile( const OUString& rSourceFile, const OUString& rDestFil
if( Error != osl::FileBase::E_None )
{
- ErrorHandler::HandleError(Error);
+ ErrorHandler::HandleError(ErrCode(Error));
return false;
}
else
@@ -3132,7 +3132,7 @@ EasyFile::~EasyFile()
close();
}
-sal_uLong EasyFile::createStream( const OUString& rUrl, SvStream* &rpStr )
+ErrCode EasyFile::createStream( const OUString& rUrl, SvStream* &rpStr )
{
if(bOpen)
close();
@@ -3140,7 +3140,7 @@ sal_uLong EasyFile::createStream( const OUString& rUrl, SvStream* &rpStr )
OUString aFileName;
createFileName( rUrl, aFileName );
- sal_uLong nErr = 0;
+ ErrCode nErr = ERRCODE_NONE;
pOStm = ::utl::UcbStreamHelper::CreateStream( aFileName, StreamMode::WRITE | StreamMode::TRUNC );
if( pOStm )
{
@@ -3152,7 +3152,7 @@ sal_uLong EasyFile::createStream( const OUString& rUrl, SvStream* &rpStr )
nErr = ERRCODE_SFX_CANTCREATECONTENT;
}
- if( nErr != 0 )
+ if( nErr != ERRCODE_NONE )
{
bOpen = false;
delete pOStm;
@@ -3195,7 +3195,7 @@ HtmlErrorContext::HtmlErrorContext()
mnResId = 0;
}
-bool HtmlErrorContext::GetString( sal_uInt32, OUString& rCtxStr )
+bool HtmlErrorContext::GetString( ErrCode, OUString& rCtxStr )
{
DBG_ASSERT( mnResId != 0, "No error context set" );
if( mnResId == 0 )
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 754aeb8e5787..8a470979330f 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -68,7 +68,7 @@ private:
public:
explicit HtmlErrorContext();
- virtual bool GetString( sal_uInt32 nErrId, OUString& rCtxStr ) override;
+ virtual bool GetString( ErrCode nErrId, OUString& rCtxStr ) override;
void SetContext( sal_uInt16 nResId, const OUString& rURL );
void SetContext( sal_uInt16 nResId, const OUString& rURL1, const OUString& rURL2 );
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index ef9f1a264f18..29313c60f32d 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -78,7 +78,7 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::document;
using namespace comphelper;
-#define SD_XML_READERROR 1234
+#define SD_XML_READERROR ErrCode(1234)
char const sXML_export_impress_meta_oasis_service[] = "com.sun.star.comp.Impress.XMLOasisMetaExporter";
char const sXML_export_impress_styles_oasis_service[] = "com.sun.star.comp.Impress.XMLOasisStylesExporter";
@@ -166,7 +166,7 @@ SdXMLFilter::~SdXMLFilter()
namespace
{
-sal_Int32 ReadThroughComponent(
+ErrCode ReadThroughComponent(
const Reference<io::XInputStream>& xInputStream,
const Reference<XComponent>& xModelComponent,
const OUString& rStreamName,
@@ -288,10 +288,10 @@ sal_Int32 ReadThroughComponent(
}
// success!
- return 0;
+ return ERRCODE_NONE;
}
-sal_Int32 ReadThroughComponent(
+ErrCode ReadThroughComponent(
const uno::Reference < embed::XStorage >& xStorage,
const Reference<XComponent>& xModelComponent,
const sal_Char* pStreamName,
@@ -323,7 +323,7 @@ sal_Int32 ReadThroughComponent(
// do we even have an alternative name?
if ( nullptr == pCompatibilityStreamName )
- return 0;
+ return ERRCODE_NONE;
// if so, does the stream exist?
sStreamName = OUString::createFromAscii(pCompatibilityStreamName);
@@ -336,7 +336,7 @@ sal_Int32 ReadThroughComponent(
}
if (! bContainsStream )
- return 0;
+ return ERRCODE_NONE;
}
// set Base URL
@@ -446,7 +446,7 @@ void fixupOutlinePlaceholderNumberingDepths(SdDrawDocument* pDoc)
bool SdXMLFilter::Import( ErrCode& nError )
{
- sal_uInt32 nRet = 0;
+ ErrCode nRet = ERRCODE_NONE;
// Get service factory
Reference< uno::XComponentContext > rxContext =
@@ -549,7 +549,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
if( !xStorage.is() )
nRet = SD_XML_READERROR;
- if( 0 == nRet )
+ if( ERRCODE_NONE == nRet )
{
pGraphicHelper = SvXMLGraphicHelper::Create( xStorage,
SvXMLGraphicHelperMode::Read,
@@ -568,7 +568,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
SAL_INFO_IF(baseURI.isEmpty(), "sd.filter", "SdXMLFilter: no base URL");
xInfoSet->setPropertyValue("BaseURI", makeAny(baseURI));
- if( 0 == nRet && SfxObjectCreateMode::EMBEDDED == mrDocShell.GetCreateMode() )
+ if( ERRCODE_NONE == nRet && SfxObjectCreateMode::EMBEDDED == mrDocShell.GetCreateMode() )
{
OUString aName;
if ( mrMedium.GetItemSet() )
@@ -588,7 +588,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
if (SDXMLMODE_Organizer == meFilterMode)
xInfoSet->setPropertyValue("OrganizerMode", uno::makeAny(true));
- if( 0 == nRet )
+ if( ERRCODE_NONE == nRet )
{
// prepare filter arguments
@@ -608,8 +608,8 @@ bool SdXMLFilter::Import( ErrCode& nError )
XML_SERVICES* pServices = getServices( true, IsDraw(), mnStoreVer );
- sal_uInt32 nWarn = 0;
- sal_uInt32 nWarn2 = 0;
+ ErrCode nWarn = ERRCODE_NONE;
+ ErrCode nWarn2 = ERRCODE_NONE;
// read storage streams
// #i103539#: always read meta.xml for generator
nWarn = ReadThroughComponent(
@@ -658,27 +658,19 @@ bool SdXMLFilter::Import( ErrCode& nError )
if( mxModel.is() )
mxModel->unlockControllers();
- if( nRet == 0 )
+ if( nRet == ERRCODE_NONE )
pDoc->UpdateAllLinks();
- switch( nRet )
+ if( nRet.anyOf( ERRCODE_NONE, SD_XML_READERROR ) )
+ ;
+ else if( nRet == ERRCODE_IO_BROKENPACKAGE && xStorage.is() )
+ nError = ERRCODE_IO_BROKENPACKAGE;
+ else
{
- case 0: break;
- case SD_XML_READERROR: break;
- case ERRCODE_IO_BROKENPACKAGE:
- if( xStorage.is() )
- {
- nError = ERRCODE_IO_BROKENPACKAGE;
- break;
- }
- SAL_FALLTHROUGH;
- default:
- {
- // TODO/LATER: this is completely wrong! Filter code should never call ErrorHandler directly!
- ErrorHandler::HandleError( nRet );
- if( IsWarning( nRet ) )
- nRet = 0;
- }
+ // TODO/LATER: this is completely wrong! Filter code should never call ErrorHandler directly!
+ ErrorHandler::HandleError( nRet );
+ if( nRet.IsWarning() )
+ nRet = ERRCODE_NONE;
}
// clear unused named items from item pool
@@ -738,7 +730,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
bool bTransform = false;
- if( nRet == 0 )
+ if( nRet == ERRCODE_NONE )
{
if( !sBuildId.isEmpty() )
{
@@ -782,7 +774,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
pDoc->EnableUndo(true);
mrDocShell.ClearUndoBuffer();
- return nRet == 0;
+ return nRet == ERRCODE_NONE;
}
bool SdXMLFilter::Export()
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 689ba7569b15..f8d0ee660771 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -85,8 +85,8 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
StartListening( *SfxGetpApp() );
SvxErrorHandler::ensure();
mpErrorHdl = new SfxErrorHandler( RID_SD_ERRHDL,
- ERRCODE_AREA_SD,
- ERRCODE_AREA_SD_END,
+ ErrCode(ERRCODE_AREA_SD),
+ ErrCode(ERRCODE_AREA_SD_END),
GetResMgr() );
// Create a new ref device and (by calling SetReferenceDevice())
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 094becb271fc..12945863ea8f 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -433,7 +433,7 @@ SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Ref
SfxItemSet* pSet = new SfxAllItemSet( SfxGetpApp()->GetPool() );
pSet->Put( SfxBoolItem( SID_TEMPLATE, true ) );
- sal_uLong lErr = SfxGetpApp()->LoadTemplate( xDocShell, rTemplatePath, pSet );
+ ErrCode lErr = SfxGetpApp()->LoadTemplate( xDocShell, rTemplatePath, pSet );
SfxObjectShell* pDocShell = xDocShell;
@@ -566,19 +566,17 @@ OutlineToImpressFinalizer::OutlineToImpressFinalizer (
// Check the error code and stop copying the stream data when an
// error has occurred.
- switch (nErrorCode)
+ if (nErrorCode == ERRCODE_NONE)
{
- case ERRCODE_NONE:
- if (nReadByteCount == 0)
- bLoop = false;
- break;
- case ERRCODE_IO_PENDING:
- break;
-
- default:
+ if (nReadByteCount == 0)
bLoop = false;
- nReadByteCount = 0;
- break;
+ }
+ else if (nErrorCode == ERRCODE_IO_PENDING)
+ ;
+ else
+ {
+ bLoop = false;
+ nReadByteCount = 0;
}
// Append the read bytes to the end of the memory stream.
@@ -606,9 +604,7 @@ void OutlineToImpressFinalizer::operator() (bool)
sd::OutlineView* pView = static_cast<sd::OutlineView*>(pOutlineShell->GetView());
// mba: the stream can't contain any relative URLs, because we don't
// have any information about a BaseURL!
- if ( pOutlineShell->ReadRtf(*mpStream) == 0 )
- {
- }
+ pOutlineShell->ReadRtf(*mpStream);
// Call UpdatePreview once for every slide to resync the
// document with the outliner of the OutlineViewShell.
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index cb562673ef43..afaacaf55dec 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -585,7 +585,7 @@ bool DrawDocShell::SaveAs( SfxMedium& rMedium )
if( GetCreateMode() == SfxObjectCreateMode::STANDARD )
SfxObjectShell::SetVisArea( ::tools::Rectangle() );
- sal_uInt32 nVBWarning = ERRCODE_NONE;
+ ErrCode nVBWarning = ERRCODE_NONE;
bool bRet = SfxObjectShell::SaveAs( rMedium );
if( bRet )
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index d8c620e6f7f6..711aa064351a 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -456,7 +456,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
assert(pStream && "No InStream!");
pStream->Seek( 0 );
- sal_uLong nErr = pOutliner->Read( *pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes() );
+ ErrCode nErr = pOutliner->Read( *pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes() );
if (nErr || pOutliner->GetEditEngine().GetText().isEmpty())
{
@@ -600,7 +600,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
DBG_ASSERT( pStream, "No InStream!" );
pStream->Seek( 0 );
- sal_uLong nErr = pOutliner->Read(*pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes());
+ ErrCode nErr = pOutliner->Read(*pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes());
if (nErr || pOutliner->GetEditEngine().GetText().isEmpty())
{
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 024afcc41ac4..fe040185b4e6 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -312,7 +312,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
if( aDlg.Execute() == ERRCODE_NONE )
{
Graphic aGraphic;
- int nError = aDlg.GetGraphic(aGraphic);
+ ErrCode nError = aDlg.GetGraphic(aGraphic);
if( nError == ERRCODE_NONE )
{
pTempSet.reset( new SfxItemSet( mpDoc->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}) );
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index 10ff97c9a074..179853283af6 100644
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -111,7 +111,7 @@ public:
virtual bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) override;
virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin) override;
- sal_uLong ReadRtf(SvStream& rInput);
+ ErrCode ReadRtf(SvStream& rInput);
virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override;
virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override;
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 328c2b101857..14b9022abc1c 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1752,9 +1752,9 @@ void OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
/**
* Fill Outliner from Stream
*/
-sal_uLong OutlineViewShell::ReadRtf(SvStream& rInput)
+ErrCode OutlineViewShell::ReadRtf(SvStream& rInput)
{
- sal_uLong bRet = 0;
+ ErrCode bRet = ERRCODE_NONE;
::Outliner& rOutl = pOlView->GetOutliner();
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 3d98ee66ea4f..4f8b8be7fec2 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -392,7 +392,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void)
return;
SfxErrorContext aEc( ERRCTX_ERROR, mpViewSh->GetActiveWindow(), RID_SO_ERRCTX );
- ErrCode nError = 0;
+ ErrCode nError = ERRCODE_NONE;
::std::vector< OUString >::const_iterator aIter( maDropFileVector.begin() );