Kaydet (Commit) 6de7da38 authored tarafından Caolán McNamara's avatar Caolán McNamara

longparas: these are really xub_StrLens

Change-Id: Ia754de347f277a07479e4056b7c9a03534a3dab4
üst 522fd111
...@@ -247,7 +247,7 @@ public: ...@@ -247,7 +247,7 @@ public:
void ShowOriginal( sal_uInt16 nLoop = 0 ); void ShowOriginal( sal_uInt16 nLoop = 0 );
/// Calculates the intersection with text node number nNdIdx. /// Calculates the intersection with text node number nNdIdx.
void CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const; void CalcStartEnd( sal_uLong nNdIdx, xub_StrLen& rStart, xub_StrLen& rEnd ) const;
/// Initiate the layout. /// Initiate the layout.
void InvalidateRange(); void InvalidateRange();
......
...@@ -3258,36 +3258,36 @@ void SwRedline::InvalidateRange() // trigger the Layout ...@@ -3258,36 +3258,36 @@ void SwRedline::InvalidateRange() // trigger the Layout
/** Calculates the start and end position of the intersection rTmp and /** Calculates the start and end position of the intersection rTmp and
text node nNdIdx */ text node nNdIdx */
void SwRedline::CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const void SwRedline::CalcStartEnd( sal_uLong nNdIdx, xub_StrLen& rStart, xub_StrLen& rEnd ) const
{ {
const SwPosition *pRStt = Start(), *pREnd = End(); const SwPosition *pRStt = Start(), *pREnd = End();
if( pRStt->nNode < nNdIdx ) if( pRStt->nNode < nNdIdx )
{ {
if( pREnd->nNode > nNdIdx ) if( pREnd->nNode > nNdIdx )
{ {
nStart = 0; // Paragraph is completely enclosed rStart = 0; // Paragraph is completely enclosed
nEnd = STRING_LEN; rEnd = STRING_LEN;
} }
else else
{ {
OSL_ENSURE( pREnd->nNode == nNdIdx, OSL_ENSURE( pREnd->nNode == nNdIdx,
"SwRedlineItr::Seek: GetRedlinePos Error" ); "SwRedlineItr::Seek: GetRedlinePos Error" );
nStart = 0; // Paragraph is overlapped in the beginning rStart = 0; // Paragraph is overlapped in the beginning
nEnd = pREnd->nContent.GetIndex(); rEnd = pREnd->nContent.GetIndex();
} }
} }
else if( pRStt->nNode == nNdIdx ) else if( pRStt->nNode == nNdIdx )
{ {
nStart = pRStt->nContent.GetIndex(); rStart = pRStt->nContent.GetIndex();
if( pREnd->nNode == nNdIdx ) if( pREnd->nNode == nNdIdx )
nEnd = pREnd->nContent.GetIndex(); // Within the Paragraph rEnd = pREnd->nContent.GetIndex(); // Within the Paragraph
else else
nEnd = STRING_LEN; // Paragraph is overlapped in the end rEnd = STRING_LEN; // Paragraph is overlapped in the end
} }
else else
{ {
nStart = STRING_LEN; rStart = STRING_LEN;
nEnd = STRING_LEN; rEnd = STRING_LEN;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment