Lines Matching refs:mpData
210 DBG_ASSERT( (mpData->mnRefCount != 0), "String::ImplCopyData() - RefCount == 0" ); in ImplCopyData()
213 if ( mpData->mnRefCount != 1 ) in ImplCopyData()
214 mpData = _ImplCopyData( mpData ); in ImplCopyData()
222 if ( mpData->mnRefCount != 1 ) { in ImplCopyStringData()
223 DBG_ASSERT( (pStr >= mpData->maStr) && in ImplCopyStringData()
224 ((pStr-mpData->maStr) < mpData->mnLen), in ImplCopyStringData()
226 unsigned int nIndex = (unsigned int)(pStr-mpData->maStr); in ImplCopyStringData()
227 mpData = _ImplCopyData( mpData ); in ImplCopyStringData()
228 pStr = mpData->maStr + nIndex; in ImplCopyStringData()
246 : mpData(NULL) in STRING()
250 STRING_NEW((STRING_TYPE **)&mpData); in STRING()
262 STRING_ACQUIRE((STRING_TYPE *)rStr.mpData); in STRING()
263 mpData = rStr.mpData; in STRING()
269 : mpData( NULL ) in STRING()
275 if ( nPos > rStr.mpData->mnLen ) in STRING()
280 sal_Int32 nMaxLen = rStr.mpData->mnLen-nPos; in STRING()
289 if ( (nPos == 0) && (nLen == rStr.mpData->mnLen) ) in STRING()
291 STRING_ACQUIRE((STRING_TYPE *)rStr.mpData); in STRING()
292 mpData = rStr.mpData; in STRING()
297 mpData = ImplAllocData( nLen ); in STRING()
298 memcpy( mpData->maStr, rStr.mpData->maStr+nPos, nLen*sizeof( STRCODE ) ); in STRING()
303 STRING_NEW((STRING_TYPE **)&mpData); in STRING()
310 : mpData(NULL) in STRING()
326 mpData = ImplAllocData( nLen ); in STRING()
327 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in STRING()
331 STRING_NEW((STRING_TYPE **)&mpData); in STRING()
338 : mpData(NULL) in STRING()
363 mpData = ImplAllocData( nLen ); in STRING()
364 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in STRING()
368 STRING_NEW((STRING_TYPE **)&mpData); in STRING()
380 mpData = ImplAllocData( 1 ); in STRING()
381 mpData->maStr[0] = c; in STRING()
391 STRING_RELEASE((STRING_TYPE *)mpData); in ~STRING()
401 STRING_ACQUIRE((STRING_TYPE *)rStr.mpData); in Assign()
402 STRING_RELEASE((STRING_TYPE *)mpData); in Assign()
403 mpData = rStr.mpData; in Assign()
419 STRING_NEW((STRING_TYPE **)&mpData); in Assign()
424 if ( (nLen == mpData->mnLen) && (mpData->mnRefCount == 1) ) in Assign()
425 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in Assign()
429 STRING_RELEASE((STRING_TYPE *)mpData); in Assign()
432 mpData = ImplAllocData( nLen ); in Assign()
433 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in Assign()
465 STRING_NEW((STRING_TYPE **)&mpData); in Assign()
470 if ( (nLen == mpData->mnLen) && (mpData->mnRefCount == 1) ) in Assign()
471 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in Assign()
475 STRING_RELEASE((STRING_TYPE *)mpData); in Assign()
478 mpData = ImplAllocData( nLen ); in Assign()
479 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in Assign()
494 STRING_RELEASE((STRING_TYPE *)mpData); in Assign()
495 mpData = ImplAllocData( 1 ); in Assign()
496 mpData->maStr[0] = c; in Assign()
508 sal_Int32 nLen = mpData->mnLen; in Append()
511 STRING_ACQUIRE((STRING_TYPE *)rStr.mpData); in Append()
512 STRING_RELEASE((STRING_TYPE *)mpData); in Append()
513 mpData = rStr.mpData; in Append()
518 sal_Int32 nCopyLen = ImplGetCopyLen( nLen, rStr.mpData->mnLen ); in Append()
527 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Append()
528 memcpy( pNewData->maStr+nLen, rStr.mpData->maStr, nCopyLen*sizeof( STRCODE ) ); in Append()
531 STRING_RELEASE((STRING_TYPE *)mpData); in Append()
532 mpData = pNewData; in Append()
547 sal_Int32 nLen = mpData->mnLen; in Append()
560 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Append()
564 STRING_RELEASE((STRING_TYPE *)mpData); in Append()
565 mpData = pNewData; in Append()
595 sal_Int32 nLen = mpData->mnLen; in Append()
605 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Append()
609 STRING_RELEASE((STRING_TYPE *)mpData); in Append()
610 mpData = pNewData; in Append()
623 sal_Int32 nLen = mpData->mnLen; in Append()
630 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Append()
634 STRING_RELEASE((STRING_TYPE *)mpData); in Append()
635 mpData = pNewData; in Append()
646 DBG_ASSERT( nIndex < mpData->mnLen, "String::SetChar() - nIndex > String.Len()" ); in SetChar()
650 mpData->maStr[nIndex] = c; in SetChar()
661 sal_Int32 nCopyLen = ImplGetCopyLen( mpData->mnLen, rStr.mpData->mnLen ); in Insert()
668 if ( nIndex > mpData->mnLen ) in Insert()
669 nIndex = static_cast< xub_StrLen >(mpData->mnLen); in Insert()
672 STRINGDATA* pNewData = ImplAllocData( mpData->mnLen+nCopyLen ); in Insert()
675 memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) ); in Insert()
676 memcpy( pNewData->maStr+nIndex, rStr.mpData->maStr, nCopyLen*sizeof( STRCODE ) ); in Insert()
677 memcpy( pNewData->maStr+nIndex+nCopyLen, mpData->maStr+nIndex, in Insert()
678 (mpData->mnLen-nIndex)*sizeof( STRCODE ) ); in Insert()
681 STRING_RELEASE((STRING_TYPE *)mpData); in Insert()
682 mpData = pNewData; in Insert()
696 if ( nPos > rStr.mpData->mnLen ) in Insert()
701 sal_Int32 nMaxLen = rStr.mpData->mnLen-nPos; in Insert()
707 sal_Int32 nCopyLen = ImplGetCopyLen( mpData->mnLen, nLen ); in Insert()
714 if ( nIndex > mpData->mnLen ) in Insert()
715 nIndex = static_cast< xub_StrLen >(mpData->mnLen); in Insert()
718 STRINGDATA* pNewData = ImplAllocData( mpData->mnLen+nCopyLen ); in Insert()
721 memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) ); in Insert()
722 memcpy( pNewData->maStr+nIndex, rStr.mpData->maStr+nPos, nCopyLen*sizeof( STRCODE ) ); in Insert()
723 memcpy( pNewData->maStr+nIndex+nCopyLen, mpData->maStr+nIndex, in Insert()
724 (mpData->mnLen-nIndex)*sizeof( STRCODE ) ); in Insert()
727 STRING_RELEASE((STRING_TYPE *)mpData); in Insert()
728 mpData = pNewData; in Insert()
744 nCopyLen = ImplGetCopyLen( mpData->mnLen, nCopyLen ); in Insert()
751 if ( nIndex > mpData->mnLen ) in Insert()
752 nIndex = static_cast< xub_StrLen >(mpData->mnLen); in Insert()
755 STRINGDATA* pNewData = ImplAllocData( mpData->mnLen+nCopyLen ); in Insert()
758 memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) ); in Insert()
760 memcpy( pNewData->maStr+nIndex+nCopyLen, mpData->maStr+nIndex, in Insert()
761 (mpData->mnLen-nIndex)*sizeof( STRCODE ) ); in Insert()
764 STRING_RELEASE((STRING_TYPE *)mpData); in Insert()
765 mpData = pNewData; in Insert()
777 if ( !c || (mpData->mnLen == STRING_MAXLEN) ) in Insert()
781 if ( nIndex > mpData->mnLen ) in Insert()
782 nIndex = static_cast< xub_StrLen >(mpData->mnLen); in Insert()
785 STRINGDATA* pNewData = ImplAllocData( mpData->mnLen+1 ); in Insert()
788 memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) ); in Insert()
790 memcpy( pNewData->maStr+nIndex+1, mpData->maStr+nIndex, in Insert()
791 (mpData->mnLen-nIndex)*sizeof( STRCODE ) ); in Insert()
794 STRING_RELEASE((STRING_TYPE *)mpData); in Insert()
795 mpData = pNewData; in Insert()
808 if ( nIndex >= mpData->mnLen ) in Replace()
815 if ( (nIndex == 0) && (nCount >= mpData->mnLen) ) in Replace()
822 sal_Int32 nStrLen = rStr.mpData->mnLen; in Replace()
827 if ( nCount > mpData->mnLen - nIndex ) in Replace()
828 nCount = static_cast< xub_StrLen >(mpData->mnLen-nIndex); in Replace()
838 memcpy( mpData->maStr+nIndex, rStr.mpData->maStr, nCount*sizeof( STRCODE ) ); in Replace()
843 nStrLen = ImplGetCopyLen( mpData->mnLen-nCount, nStrLen ); in Replace()
846 STRINGDATA* pNewData = ImplAllocData( mpData->mnLen-nCount+nStrLen ); in Replace()
849 memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) ); in Replace()
850 memcpy( pNewData->maStr+nIndex, rStr.mpData->maStr, nStrLen*sizeof( STRCODE ) ); in Replace()
851 memcpy( pNewData->maStr+nIndex+nStrLen, mpData->maStr+nIndex+nCount, in Replace()
852 (mpData->mnLen-nIndex-nCount+1)*sizeof( STRCODE ) ); in Replace()
855 STRING_RELEASE((STRING_TYPE *)mpData); in Replace()
856 mpData = pNewData; in Replace()
868 if ( (nIndex >= mpData->mnLen) || !nCount ) in Erase()
872 if ( nCount > mpData->mnLen - nIndex ) in Erase()
873 nCount = static_cast< xub_StrLen >(mpData->mnLen-nIndex); in Erase()
876 if ( mpData->mnLen - nCount ) in Erase()
879 STRINGDATA* pNewData = ImplAllocData( mpData->mnLen-nCount ); in Erase()
882 memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) ); in Erase()
883 memcpy( pNewData->maStr+nIndex, mpData->maStr+nIndex+nCount, in Erase()
884 (mpData->mnLen-nIndex-nCount+1)*sizeof( STRCODE ) ); in Erase()
887 STRING_RELEASE((STRING_TYPE *)mpData); in Erase()
888 mpData = pNewData; in Erase()
892 STRING_NEW((STRING_TYPE **)&mpData); in Erase()
908 if ( nCount > mpData->mnLen ) in Fill()
912 STRING_RELEASE((STRING_TYPE *)mpData); in Fill()
913 mpData = pNewData; in Fill()
918 STRCODE* pStr = mpData->maStr; in Fill()
937 sal_Int32 nLen = mpData->mnLen; in Expand()
945 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Expand()
955 STRING_RELEASE((STRING_TYPE *)mpData); in Expand()
956 mpData = pNewData; in Expand()
967 if ( mpData->maStr[0] != c ) in EraseLeadingChars()
971 while ( mpData->maStr[nStart] == c ) in EraseLeadingChars()
983 sal_Int32 nEnd = mpData->mnLen; in EraseTrailingChars()
984 while ( nEnd && (mpData->maStr[nEnd-1] == c) ) in EraseTrailingChars()
987 if ( nEnd != mpData->mnLen ) in EraseTrailingChars()
1000 while ( mpData->maStr[nStart] == c ) in EraseLeadingAndTrailingChars()
1005 sal_Int32 nEnd = mpData->mnLen; in EraseLeadingAndTrailingChars()
1006 while ( nEnd && (mpData->maStr[nEnd-1] == c) ) in EraseLeadingAndTrailingChars()
1008 if ( nEnd != mpData->mnLen ) in EraseLeadingAndTrailingChars()
1021 for (sal_Int32 i = 0; i < mpData->mnLen; ++i) { in EraseAllChars()
1022 if ( mpData->maStr[i] == c ) in EraseAllChars()
1028 if ( nCount == mpData->mnLen ) in EraseAllChars()
1030 STRING_NEW((STRING_TYPE **)&mpData); in EraseAllChars()
1035 STRINGDATA* pNewData = ImplAllocData( mpData->mnLen-nCount ); in EraseAllChars()
1039 for( xub_StrLen j = 0; j < mpData->mnLen; ++j ) in EraseAllChars()
1041 if ( mpData->maStr[j] != c ) in EraseAllChars()
1043 pNewData->maStr[nCount] = mpData->maStr[j]; in EraseAllChars()
1049 STRING_RELEASE((STRING_TYPE *)mpData); in EraseAllChars()
1050 mpData = pNewData; in EraseAllChars()
1063 if ( !mpData->mnLen ) in Reverse()
1070 sal_Int32 nCount = mpData->mnLen / 2; in Reverse()
1073 STRCODE cTemp = mpData->maStr[i]; in Reverse()
1074 mpData->maStr[i] = mpData->maStr[mpData->mnLen-i-1]; in Reverse()
1075 mpData->maStr[mpData->mnLen-i-1] = cTemp; in Reverse()
1088 sal_Int32 nLen = mpData->mnLen; in ToLowerAscii()
1089 STRCODE* pStr = mpData->maStr; in ToLowerAscii()
1114 sal_Int32 nLen = mpData->mnLen; in ToUpperAscii()
1115 STRCODE* pStr = mpData->maStr; in ToUpperAscii()
1141 const STRCODE* pStr = mpData->maStr; // damit es schneller geht in ConvertLineEnd()
1146 while ( i < mpData->mnLen ) in ConvertLineEnd()
1193 while ( i < mpData->mnLen ) in ConvertLineEnd()
1219 pNewData->maStr[j] = mpData->maStr[i]; in ConvertLineEnd()
1227 STRING_RELEASE((STRING_TYPE *)mpData); in ConvertLineEnd()
1228 mpData = pNewData; in ConvertLineEnd()
1242 if ( mpData == rStr.mpData ) in CompareTo()
1246 if ( mpData->mnLen < nLen ) in CompareTo()
1247 nLen = static_cast< xub_StrLen >(mpData->mnLen+1); in CompareTo()
1248 if ( rStr.mpData->mnLen < nLen ) in CompareTo()
1249 nLen = static_cast< xub_StrLen >(rStr.mpData->mnLen+1); in CompareTo()
1252 sal_Int32 nCompare = ImplStringCompareWithoutZero( mpData->maStr, rStr.mpData->maStr, nLen ); in CompareTo()
1270 sal_Int32 nCompare = ImplStringCompare( mpData->maStr, pCharStr, nLen ); in CompareTo()
1290 if ( mpData == rStr.mpData ) in CompareIgnoreCaseToAscii()
1294 if ( mpData->mnLen < nLen ) in CompareIgnoreCaseToAscii()
1295 nLen = static_cast< xub_StrLen >(mpData->mnLen+1); in CompareIgnoreCaseToAscii()
1296 if ( rStr.mpData->mnLen < nLen ) in CompareIgnoreCaseToAscii()
1297 nLen = static_cast< xub_StrLen >(rStr.mpData->mnLen+1); in CompareIgnoreCaseToAscii()
1300 sal_Int32 nCompare = ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, nLen ); in CompareIgnoreCaseToAscii()
1319 sal_Int32 nCompare = ImplStringICompare( mpData->maStr, pCharStr, nLen ); in CompareIgnoreCaseToAscii()
1338 if ( mpData == rStr.mpData ) in Equals()
1342 if ( mpData->mnLen != rStr.mpData->mnLen ) in Equals()
1346 return (ImplStringCompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0); in Equals()
1355 return (ImplStringCompare( mpData->maStr, pCharStr ) == 0); in Equals()
1366 if ( mpData == rStr.mpData ) in EqualsIgnoreCaseAscii()
1370 if ( mpData->mnLen != rStr.mpData->mnLen ) in EqualsIgnoreCaseAscii()
1374 return (ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0); in EqualsIgnoreCaseAscii()
1383 return (ImplStringICompare( mpData->maStr, pCharStr ) == 0); in EqualsIgnoreCaseAscii()
1394 if ( nIndex > mpData->mnLen ) in Equals()
1395 return (rStr.mpData->mnLen == 0); in Equals()
1396 sal_Int32 nMaxLen = mpData->mnLen-nIndex; in Equals()
1399 if ( rStr.mpData->mnLen != nMaxLen ) in Equals()
1405 return (ImplStringCompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0); in Equals()
1415 if ( nIndex > mpData->mnLen ) in Equals()
1418 return (ImplStringCompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0); in Equals()
1429 if ( nIndex > mpData->mnLen ) in EqualsIgnoreCaseAscii()
1430 return (rStr.mpData->mnLen == 0); in EqualsIgnoreCaseAscii()
1431 sal_Int32 nMaxLen = mpData->mnLen-nIndex; in EqualsIgnoreCaseAscii()
1434 if ( rStr.mpData->mnLen != nMaxLen ) in EqualsIgnoreCaseAscii()
1440 return (ImplStringICompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0); in EqualsIgnoreCaseAscii()
1450 if ( nIndex > mpData->mnLen ) in EqualsIgnoreCaseAscii()
1453 return (ImplStringICompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0); in EqualsIgnoreCaseAscii()
1464 if ( !mpData->mnLen ) in Match()
1468 const STRCODE* pStr1 = mpData->maStr; in Match()
1469 const STRCODE* pStr2 = rStr.mpData->maStr; in Match()
1471 while ( i < mpData->mnLen ) in Match()
1491 if ( !mpData->mnLen ) in Match()
1495 const STRCODE* pStr = mpData->maStr; in Match()
1497 while ( i < mpData->mnLen ) in Match()
1516 sal_Int32 nLen = mpData->mnLen; in Search()
1517 const STRCODE* pStr = mpData->maStr; in Search()
1537 sal_Int32 nLen = mpData->mnLen; in Search()
1538 sal_Int32 nStrLen = rStr.mpData->mnLen; in Search()
1545 const STRCODE* pStr1 = mpData->maStr; in Search()
1550 STRCODE cSearch = rStr.mpData->maStr[0]; in Search()
1561 const STRCODE* pStr2 = rStr.mpData->maStr; in Search()
1583 sal_Int32 nLen = mpData->mnLen; in Search()
1591 const STRCODE* pStr = mpData->maStr; in Search()
1627 if ( nIndex > mpData->mnLen ) in SearchBackward()
1628 nIndex = (xub_StrLen)mpData->mnLen; in SearchBackward()
1630 const STRCODE* pStr = mpData->maStr; in SearchBackward()
1650 sal_Int32 nLen = mpData->mnLen; in SearchChar()
1651 const STRCODE* pStr = mpData->maStr; in SearchChar()
1676 if ( nIndex > mpData->mnLen ) in SearchCharBackward()
1677 nIndex = (xub_StrLen)mpData->mnLen; in SearchCharBackward()
1679 const STRCODE* pStr = mpData->maStr; in SearchCharBackward()
1706 sal_Int32 nLen = mpData->mnLen; in SearchAndReplace()
1707 const STRCODE* pStr = mpData->maStr; in SearchAndReplace()
1714 mpData->maStr[nIndex] = cRep; in SearchAndReplace()
1761 sal_Int32 nLen = mpData->mnLen; in SearchAndReplaceAll()
1762 const STRCODE* pStr = mpData->maStr; in SearchAndReplaceAll()
1769 mpData->maStr[nIndex] = cRep; in SearchAndReplaceAll()
1817 if ( !mpData->mnLen ) in GetTokenCount()
1821 sal_Int32 nLen = mpData->mnLen; in GetTokenCount()
1822 const STRCODE* pStr = mpData->maStr; in GetTokenCount()
1844 const STRCODE* pStr = mpData->maStr; in SetToken()
1845 xub_StrLen nLen = (xub_StrLen)mpData->mnLen; in SetToken()
1882 const STRCODE* pStr = mpData->maStr; in GetToken()
1883 xub_StrLen nLen = (xub_StrLen)mpData->mnLen; in GetToken()
1935 if ( !mpData->mnLen ) in GetQuotedTokenCount()
1939 sal_Int32 nLen = mpData->mnLen; in GetQuotedTokenCount()
1942 const STRCODE* pQuotedStr = rQuotedPairs.mpData->maStr; in GetQuotedTokenCount()
1943 const STRCODE* pStr = mpData->maStr; in GetQuotedTokenCount()
1991 const STRCODE* pStr = mpData->maStr; in GetQuotedToken()
1992 const STRCODE* pQuotedStr = rQuotedPairs.mpData->maStr; in GetQuotedToken()
1995 xub_StrLen nLen = (xub_StrLen)mpData->mnLen; in GetQuotedToken()
2067 if ( mpData->mnLen ) in GetBufferAccess()
2071 return mpData->maStr; in GetBufferAccess()
2080 DBG_ASSERT( mpData->mnRefCount == 1, "String::ReleaseCharStr() called for String with RefCount" ); in ReleaseBufferAccess()
2082 if ( nLen > mpData->mnLen ) in ReleaseBufferAccess()
2083 nLen = ImplStringLen( mpData->maStr ); in ReleaseBufferAccess()
2084 OSL_ASSERT(nLen <= mpData->mnLen); in ReleaseBufferAccess()
2087 STRING_NEW((STRING_TYPE **)&mpData); in ReleaseBufferAccess()
2090 else if ( mpData->mnLen - nLen > 8 ) in ReleaseBufferAccess()
2093 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in ReleaseBufferAccess()
2094 STRING_RELEASE((STRING_TYPE *)mpData); in ReleaseBufferAccess()
2095 mpData = pNewData; in ReleaseBufferAccess()
2098 mpData->mnLen = nLen; in ReleaseBufferAccess()
2107 STRING_RELEASE((STRING_TYPE *)mpData); in AllocBuffer()
2109 mpData = ImplAllocData( nLen ); in AllocBuffer()
2112 mpData = NULL; in AllocBuffer()
2113 STRING_NEW((STRING_TYPE **)&mpData); in AllocBuffer()
2116 return mpData->maStr; in AllocBuffer()