summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/docsh.cxx18
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx16
3 files changed, 18 insertions, 18 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 8ccfffa058a9..36ce03fdf3f2 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1128,7 +1128,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!GetError())
SetError(eError);
- if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
+ if( eError.IsWarning() )
bRet = true;
}
else
@@ -1284,7 +1284,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
ScDocRowHeightUpdater::TabRanges aRecalcRanges(0);
- sal_uLong eError = DBaseImport( rMedium.GetPhysicalName(),
+ ErrCode eError = DBaseImport( rMedium.GetPhysicalName(),
ScGlobal::GetCharsetValue(sItStr), aColWidthParam, *aRecalcRanges.mpRanges );
aRecalcRowRangesArray.push_back(aRecalcRanges);
@@ -1331,7 +1331,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!GetError())
SetError(eError);
- if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
+ if( eError.IsWarning() )
bRet = true;
}
else
@@ -1377,7 +1377,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
if (!GetError())
SetError(eError);
- if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
+ if( eError.IsWarning() )
bRet = true;
}
else
@@ -1404,7 +1404,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!GetError())
SetError(eError);
- if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
+ if( eError.IsWarning() )
bRet = true;
}
else
@@ -1456,7 +1456,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (!GetError())
SetError(eError);
- if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK )
+ if( eError.IsWarning() )
bRet = true;
}
else
@@ -2288,7 +2288,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
SetError(eError);
// don't return false for warnings
- bRet = ((eError & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK) || (eError == ERRCODE_NONE);
+ bRet = eError.IsWarning() || (eError == ERRCODE_NONE);
}
else
{
@@ -2353,10 +2353,10 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
rMed.CloseOutStream();
bool bHasMemo = false;
- sal_uLong eError = DBaseExport(
+ ErrCode eError = DBaseExport(
rMed.GetPhysicalName(), ScGlobal::GetCharsetValue(sCharSet), bHasMemo);
- if ( eError != ERRCODE_NONE && (eError & ERRCODE_WARNING_MASK) )
+ if ( eError != ERRCODE_NONE && eError.IsWarning() )
{
eError = ERRCODE_NONE;
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 869513e6f0b0..513fc1467eb8 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -739,7 +739,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScDocShell* pOtherDocSh = new ScDocShell;
SfxObjectShellLock aDocShTablesRef = pOtherDocSh;
pOtherDocSh->DoLoad( pMed );
- sal_uLong nErr = pOtherDocSh->GetErrorCode();
+ ErrCode nErr = pOtherDocSh->GetErrorCode();
if (nErr)
ErrorHandler::HandleError( nErr ); // also warnings
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 85d73f4070d7..170c94213a66 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -104,7 +104,7 @@ using ::std::vector;
namespace
{
- sal_uLong lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager2>& _rDrvMgr, uno::Reference<sdbc::XConnection>& _rConnection, OUString& _rTabName, const OUString& rFullFileName, rtl_TextEncoding eCharSet)
+ ErrCode lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager2>& _rDrvMgr, uno::Reference<sdbc::XConnection>& _rConnection, OUString& _rTabName, const OUString& rFullFileName, rtl_TextEncoding eCharSet)
{
INetURLObject aURL;
aURL.SetSmartProtocol( INetProtocol::File );
@@ -147,7 +147,7 @@ namespace
}));
_rConnection = _rDrvMgr->getConnectionWithInfo( aConnUrl, aProps );
- return 0L;
+ return ERRCODE_NONE;
}
}
@@ -287,7 +287,7 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales
#endif // HAVE_FEATURE_DBCONNECTIVITY
-sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncoding eCharSet,
+ErrCode ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncoding eCharSet,
ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc )
{
#if !HAVE_FEATURE_DBCONNECTIVITY
@@ -299,7 +299,7 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi
return ERRCODE_IO_GENERAL;
#else
- sal_uLong nErr = ERRCODE_NONE;
+ ErrCode nErr = ERRCODE_NONE;
// Try to get the Text Encoding from the driver
if( eCharSet == RTL_TEXTENCODING_IBM_850 )
@@ -312,7 +312,7 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi
OUString aTabName;
uno::Reference<sdbc::XDriverManager2> xDrvMan;
uno::Reference<sdbc::XConnection> xConnection;
- sal_uLong nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
+ ErrCode nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
if ( !xConnection.is() || !xDrvMan.is() )
return nRet;
::utl::DisposableComponent aConnectionHelper(xConnection);
@@ -755,7 +755,7 @@ inline void lcl_getLongVarCharString(
#endif // HAVE_FEATURE_DBCONNECTIVITY
-sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding eCharSet, bool& bHasMemo )
+ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding eCharSet, bool& bHasMemo )
{
#if !HAVE_FEATURE_DBCONNECTIVITY
(void) rFullFileName;
@@ -768,7 +768,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
INetURLObject aDeleteObj( rFullFileName, INetProtocol::File );
KillFile( aDeleteObj );
- sal_uLong nErr = ERRCODE_NONE;
+ ErrCode nErr = ERRCODE_NONE;
SCCOL nFirstCol, nLastCol;
SCROW nFirstRow, nLastRow;
@@ -811,7 +811,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
{
uno::Reference<sdbc::XDriverManager2> xDrvMan;
uno::Reference<sdbc::XConnection> xConnection;
- sal_uLong nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
+ ErrCode nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet);
if ( !xConnection.is() || !xDrvMan.is() )
return nRet;
::utl::DisposableComponent aConnectionHelper(xConnection);