diff options
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/arealink.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 21 |
4 files changed, 14 insertions, 15 deletions
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index c2bf54e1bd89..c3def988b08b 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -280,7 +280,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter, SCROW nHeight = 0; sal_Int32 nTokenCnt = comphelper::string::getTokenCount(aTempArea, ';'); sal_Int32 nStringIx = 0; - xub_StrLen nToken; + sal_Int32 nToken; for( nToken = 0; nToken < nTokenCnt; nToken++ ) { diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 5c4e7285927a..101332d1807a 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -323,7 +323,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) if( *pNameBuffer == SC_COMPILER_FILE_TAB_SEP ) // after the last quote of the docname should be the # char { - xub_StrLen nIndex = nNameLength - nLinkTabNameLength; + sal_Int32 nIndex = nNameLength - nLinkTabNameLength; INetURLObject aINetURLObject(aDocURLBuffer.makeStringAndClear()); if(aName == aLinkTabName.copy(nIndex, nLinkTabNameLength) && (aName[nIndex - 1] == '#') && // before the table name should be the # char diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index f8585b4179f9..0e97eda57cd4 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -656,7 +656,7 @@ void lcl_GetColumnTypes( } else if ( nDbType == sdbc::DataType::DECIMAL ) { // maximale Feldbreite und Nachkommastellen bestimmen - xub_StrLen nLen; + sal_Int32 nLen; sal_uInt16 nPrec; nLen = pDoc->GetMaxNumberStringLen( nPrec, nTab, nCol, nFirstDataRow, nLastRow ); @@ -668,7 +668,7 @@ void lcl_GetColumnTypes( if ( bPrecDefined && nPrecision != nPrec ) { // Laenge auf vorgegebene Nachkommastellen anpassen if ( nPrecision ) - nLen = sal::static_int_cast<xub_StrLen>( nLen + ( nPrecision - nPrec ) ); + nLen = nLen + ( nPrecision - nPrec ); else nLen -= nPrec+1; // auch den . mit raus } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index d6ce4f3058d3..737ec547d6a4 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -23,7 +23,6 @@ #include <i18nlangtag/languagetag.hxx> #include <sot/formats.hxx> #include <sfx2/mieclip.hxx> -#include <tools/string.hxx> #include <com/sun/star/i18n/CalendarFieldIndex.hpp> #include "global.hxx" @@ -62,7 +61,7 @@ // times maximum cell content length, 2*1024*64K=128M, and because it's // sal_Unicode that's 256MB. If it's 2GB of data without LF we're out of luck // anyway. -static const sal_Int32 nArbitraryLineLengthLimit = 2 * MAXCOLCOUNT * STRING_MAXLEN; +static const sal_Int32 nArbitraryLineLengthLimit = 2 * MAXCOLCOUNT * 65536; namespace { @@ -354,7 +353,7 @@ bool ScImportExport::ExportByteString( OString& rText, rtl_TextEncoding eEnc, sa eEnc = osl_getThreadTextEncoding(); if (!nSizeLimit) - nSizeLimit = STRING_MAXLEN; + nSizeLimit = SAL_MAX_UINT16; SvMemoryStream aStrm; aStrm.SetStreamCharSet( eEnc ); @@ -365,7 +364,7 @@ bool ScImportExport::ExportByteString( OString& rText, rtl_TextEncoding eEnc, sa aStrm.WriteChar( (sal_Char) 0 ); aStrm.Seek( STREAM_SEEK_TO_END ); // Sicherheits-Check: - if( aStrm.Tell() <= (sal_uLong) STRING_MAXLEN ) + if( aStrm.Tell() <= nSizeLimit ) { rText = (const sal_Char*) aStrm.GetData(); return true; @@ -623,15 +622,15 @@ static QuoteType lcl_isEscapedOrFieldEndQuote( sal_Int32 nQuotes, const sal_Unic */ static bool lcl_appendLineData( OUString& rField, const sal_Unicode* p1, const sal_Unicode* p2 ) { - OSL_ENSURE( rField.getLength() + (p2 - p1) <= STRING_MAXLEN, "lcl_appendLineData: data overflow"); - if (rField.getLength() + (p2 - p1) <= STRING_MAXLEN) + OSL_ENSURE( rField.getLength() + (p2 - p1) <= SAL_MAX_UINT16, "lcl_appendLineData: data overflow"); + if (rField.getLength() + (p2 - p1) <= SAL_MAX_UINT16) { rField += OUString( p1, sal::static_int_cast<sal_Int32>( p2 - p1 ) ); return true; } else { - rField += OUString( p1, STRING_MAXLEN - rField.getLength() ); + rField += OUString( p1, SAL_MAX_UINT16 - rField.getLength() ); return false; } } @@ -1247,26 +1246,26 @@ static OUString lcl_GetFixed( const OUString& rLine, sal_Int32 nStart, sal_Int32 rbIsQuoted = (pStr[nStart] == '"' && pStr[nSpace-1] == '"'); if (rbIsQuoted) { - bool bFits = (nSpace - nStart - 3 <= STRING_MAXLEN); + bool bFits = (nSpace - nStart - 3 <= SAL_MAX_UINT16); OSL_ENSURE( bFits, "lcl_GetFixed: line doesn't fit into data"); if (bFits) return rLine.copy(nStart+1, nSpace-nStart-2); else { rbOverflowCell = true; - return rLine.copy(nStart+1, STRING_MAXLEN); + return rLine.copy(nStart+1, SAL_MAX_UINT16); } } else { - bool bFits = (nSpace - nStart <= STRING_MAXLEN); + bool bFits = (nSpace - nStart <= SAL_MAX_UINT16); OSL_ENSURE( bFits, "lcl_GetFixed: line doesn't fit into data"); if (bFits) return rLine.copy(nStart, nSpace-nStart); else { rbOverflowCell = true; - return rLine.copy(nStart, STRING_MAXLEN); + return rLine.copy(nStart, SAL_MAX_UINT16); } } } |