Kaydet (Commit) cbf3bdab authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_uInt16 to sal_Int32

Change-Id: I2ab0eab053238b3c6db29b25a514e2b1b2ecd923
üst ea404ac3
......@@ -1375,20 +1375,14 @@ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwAccessiblePa
SwSpecialPos aSpecialPos;
SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
sal_uInt16 nPos = 0;
/* #i12332# FillSpecialPos does not accept nIndex ==
GetString().getLength(). In that case nPos is set to the
length of the string in the core. This way GetCharRect
returns the rectangle for a cursor at the end of the
paragraph. */
if (bBehindText)
{
nPos = pNode->GetTxt().getLength();
}
else
nPos = GetPortionData().FillSpecialPos
(nIndex, aSpecialPos, aMoveState.pSpecialPos );
const sal_Int32 nPos = bBehindText
? pNode->GetTxt().getLength()
: GetPortionData().FillSpecialPos(nIndex, aSpecialPos, aMoveState.pSpecialPos );
// call GetCharRect
SwRect aCoreRect;
......@@ -2425,20 +2419,14 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
SwSpecialPos aSpecialPos;
SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
sal_uInt16 nPos = 0;
/** #i12332# FillSpecialPos does not accept nIndex ==
GetString().getLength(). In that case nPos is set to the
length of the string in the core. This way GetCharRect
returns the rectangle for a cursor at the end of the
paragraph. */
if (bBehindText)
{
nPos = pNode->GetTxt().getLength();
}
else
nPos = GetPortionData().FillSpecialPos
(nIndex, aSpecialPos, aMoveState.pSpecialPos );
const sal_Int32 nPos = bBehindText
? pNode->GetTxt().getLength()
: GetPortionData().FillSpecialPos(nIndex, aSpecialPos, aMoveState.pSpecialPos );
// call GetCharRect
SwRect aCoreRect;
......
......@@ -582,7 +582,7 @@ sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( sal_Int32 nPos ) const
return nRet;
}
sal_uInt16 SwAccessiblePortionData::FillSpecialPos(
sal_Int32 SwAccessiblePortionData::FillSpecialPos(
sal_Int32 nPos,
SwSpecialPos& rPos,
SwSpecialPos*& rpPos ) const
......@@ -674,7 +674,7 @@ sal_uInt16 SwAccessiblePortionData::FillSpecialPos(
rPos.nLineOfst = nLineOffset;
}
return static_cast<sal_uInt16>( nModelPos );
return nModelPos;
}
bool SwAccessiblePortionData::FillBoundaryIFDateField( com::sun::star::i18n::Boundary& rBound, const sal_Int32 nPos )
......
......@@ -147,9 +147,9 @@ public:
/// fill a SwSpecialPos structure, suitable for calling
/// SwTxtFrm->GetCharRect
/// Returns the core position, and fills thr rpPos either with NULL or
/// Returns the core position, and fills rpPos either with NULL or
/// with the &rPos, after putting the appropriate data into it.
sal_uInt16 FillSpecialPos( sal_Int32 nPos,
sal_Int32 FillSpecialPos( sal_Int32 nPos,
SwSpecialPos& rPos,
SwSpecialPos*& rpPos ) const;
......
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