sw/source/filter/ww8/ww8par.cxx | 10 +++++----- sw/source/filter/ww8/ww8par.hxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit a7db1c8606b3c47f0d349918b72a2585d9b2ad34 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 7 15:19:10 2013 +0000 these longs are really 32bit Change-Id: I6c71f1ce32df6067f0be820656d86e851d288291 diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index e0d52c8..59dbb04 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2935,15 +2935,15 @@ sal_Unicode SwWW8ImplReader::TranslateToHindiNumbers(sal_Unicode nChar) /** * Return value: true for non special chars */ -bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs) +bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCpOfs) { - sal_Size nRequestedStrLen = nEnd - rPos; + sal_Int32 nRequestedStrLen = nEnd - rPos; OSL_ENSURE(nRequestedStrLen, "String is 0"); - if (!nRequestedStrLen) + if (nRequestedStrLen <= 0) return true; - sal_Size nRequestedPos = pSBase->WW8Cp2Fc(nCpOfs+rPos, &bIsUnicode); + sal_Int32 nRequestedPos = pSBase->WW8Cp2Fc(nCpOfs+rPos, &bIsUnicode); bool bValidPos = checkSeek(*pStrm, nRequestedPos); OSL_ENSURE(bValidPos, "Document claimed to have more text than available"); if (!bValidPos) @@ -2962,7 +2962,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs) return true; } - sal_Size nValidStrLen = std::min(nRequestedStrLen, nAvailableStrLen); + sal_Int32 nValidStrLen = std::min<sal_Size>(nRequestedStrLen, nAvailableStrLen); // Reset Unicode flag and correct FilePos if needed. // Note: Seek is not expensive, as we're checking inline whether or not diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 917ac7a..28dca2e 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1395,7 +1395,7 @@ private: void simpleAddTextToParagraph(const OUString& rAddString); bool HandlePageBreakChar(); bool ReadChar(long nPosCp, long nCpOfs); - bool ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs); + bool ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCpOfs); bool ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd, long nCpOfs); bool LangUsesHindiNumbers(sal_uInt16 nLang); sal_Unicode TranslateToHindiNumbers(sal_Unicode);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits