summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/data/global.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/core/tool/token.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx8
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
5 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 0baa974628fd..bd6522d12ea9 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -884,7 +884,7 @@ xub_StrLen ScGlobal::FindUnquoted( const String& rString, sal_Unicode cChar, xub
while (p < pStop)
{
if (*p == cChar && !bQuoted)
- return p - pStart;
+ return xub_StrLen(p - pStart);
else if (*p == cQuote)
{
if (!bQuoted)
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index ac895bbb34d8..2271269a7858 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -645,7 +645,7 @@ static bool lcl_parseExternalName(
aEndTabName, nFlags, true, pExternalLinks );
if (!p || p == pStart)
return false;
- i = p - pStart;
+ i = xub_StrLen(p - pStart);
cPrev = *(p-1);
}
for ( ; i < nLen; ++i, ++p)
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 977aacbd231f..63164c536d48 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1207,7 +1207,7 @@ bool ScTokenArray::AddFormulaToken(const com::sun::star::sheet::FormulaToken& _a
lcl_ExternalRefToCalc( aComplRef.Ref1, aApiCRef.Reference1 );
lcl_ExternalRefToCalc( aComplRef.Ref2, aApiCRef.Reference2 );
// NOTE: This assumes that cached sheets are in consecutive order!
- aComplRef.Ref2.nTab = aComplRef.Ref1.nTab + (aApiCRef.Reference2.Sheet - aApiCRef.Reference1.Sheet);
+ aComplRef.Ref2.nTab = aComplRef.Ref1.nTab + SCsTAB(aApiCRef.Reference2.Sheet - aApiCRef.Reference1.Sheet);
AddExternalDoubleReference( nFileId, aTabName, aComplRef );
}
else
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index c78785e6336f..86b658dc039d 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -739,7 +739,7 @@ void ScInputHandler::ShowTipCursor()
if( ppFDesc->getFunctionName().getLength() )
{
nArgPos = aHelper.GetArgStart( aSelText, nNextFStart, 0 );
- nArgs = ppFDesc->getParameterCount();
+ nArgs = (USHORT)ppFDesc->getParameterCount();
USHORT nActive = 0;
USHORT nCount = 0;
@@ -754,7 +754,7 @@ void ScInputHandler::ShowTipCursor()
{
for( USHORT i=0; i < nArgs; i++ )
{
- xub_StrLen nLength=aArgs[i].getLength();
+ xub_StrLen nLength= (USHORT)aArgs[i].getLength();
if( nArgPos <= aSelText.Len()-1 )
{
nActive = i+1;
@@ -977,7 +977,7 @@ void ScInputHandler::UseFormulaData()
{
{
nArgPos = aHelper.GetArgStart( aFormula, nNextFStart, 0 );
- nArgs = ppFDesc->getParameterCount();
+ nArgs = (USHORT)ppFDesc->getParameterCount();
USHORT nActive = 0;
USHORT nCount = 0;
@@ -992,7 +992,7 @@ void ScInputHandler::UseFormulaData()
{
for( USHORT i=0; i < nArgs; i++ )
{
- xub_StrLen nLength=aArgs[i].getLength();
+ xub_StrLen nLength= (USHORT)aArgs[i].getLength();
if( nArgPos <= aFormula.Len()-1 )
{
nActive = i+1;
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index e211cbd24b70..63e7ef261297 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -622,7 +622,7 @@ SCsTAB ScExternalRefCache::getTabSpan( sal_uInt16 nFileId, const String& rStartT
size_t nStartDist = ::std::distance( itrBeg, itrStartTab);
size_t nEndDist = ::std::distance( itrBeg, itrEndTab);
- return nStartDist <= nEndDist ? nEndDist - nStartDist + 1 : -(nStartDist - nEndDist + 1);
+ return nStartDist <= nEndDist ? (SCsTAB)(nEndDist - nStartDist + 1) : -(SCsTAB)(nStartDist - nEndDist + 1);
}
void ScExternalRefCache::getAllNumberFormats(vector<sal_uInt32>& rNumFmts) const