diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-15 12:54:57 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-16 09:10:19 +0200 |
commit | 866e287adee448c1c8b431c6c084d3fe3283649d (patch) | |
tree | 53864635bcb2832c92834678a66b7090f1181147 /accessibility | |
parent | a00c47afd4cf379ce2b22f3c33bb7975a5a6366a (diff) |
sal_uLong to sal_uInt32 as TextPaM paragraph number
Applied also to related functions.
Also fix a couple of minor issues while at it.
Change-Id: I615094d047c87a0f4854054e720492d3ab25c575
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/extended/textwindowaccessibility.cxx | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 23b7b1e903ab..4d9e8329a45e 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -928,19 +928,15 @@ Document::retrieveCharacterBounds(Paragraph const * pParagraph, if ( nIndex == nLength ) { aBounds = AWTRectangle( - m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, - static_cast< ::sal_uInt16 >(nIndex)))); + m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, nIndex))); } else { ::Rectangle aLeft( - m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, - static_cast< ::sal_uInt16 >(nIndex)))); + m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, nIndex))); // XXX numeric overflow ::Rectangle aRight( - m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, - static_cast< ::sal_uInt16 >(nIndex) - + 1))); + m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, nIndex + 1))); // XXX numeric overflow (2x) // FIXME If the vertical extends of the two cursors do not match, assume // nIndex is the last character on the line; the bounding box will then @@ -1173,7 +1169,7 @@ void Document::retrieveRunAttributesImpl( tPropValMap& rRunAttrSeq) { ::sal_uLong nNumber = static_cast< ::sal_uLong >( pParagraph->getNumber() ); - ::TextPaM aPaM( nNumber, static_cast< ::sal_uInt16 >( Index ) ); + ::TextPaM aPaM( nNumber, Index ); // XXX numeric overflow // FIXME TEXTATTR_HYPERLINK ignored: ::TextAttribFontColor const * pColor @@ -1290,8 +1286,8 @@ void Document::copyParagraphText(Paragraph const * pParagraph, " Document::copyParagraphText", static_cast< css::uno::XWeak * >(this)); m_rView.SetSelection( - ::TextSelection(::TextPaM(nNumber, static_cast< ::sal_uInt16 >(nBegin)), - ::TextPaM(nNumber, static_cast< ::sal_uInt16 >(nEnd)))); + ::TextSelection(::TextPaM(nNumber, nBegin), + ::TextPaM(nNumber, nEnd))); // XXX numeric overflow (2x) m_rView.Copy(); } @@ -1345,8 +1341,8 @@ void Document::changeParagraphSelection(Paragraph * pParagraph, " Document::changeParagraphSelection", static_cast< css::uno::XWeak * >(this)); m_rView.SetSelection( - ::TextSelection(::TextPaM(nNumber, static_cast< ::sal_uInt16 >(nBegin)), - ::TextPaM(nNumber, static_cast< ::sal_uInt16 >(nEnd)))); + ::TextSelection(::TextPaM(nNumber, nBegin), + ::TextPaM(nNumber, nEnd))); // XXX numeric overflow (2x) } } @@ -2111,10 +2107,10 @@ void Document::handleParagraphNotifications() return -1; ::sal_Int32 Osp = m_nSelectionFirstPara, Osl = m_nSelectionFirstPos, Oep = m_nSelectionLastPara, Oel = m_nSelectionLastPos; ::sal_Int32 Nsp = nNewFirstPara, Nsl = nNewFirstPos, Nep = nNewLastPara, Nel = nNewLastPos; - TextPaM Ns(Nsp, sal_uInt16(Nsl)); - TextPaM Ne(Nep, sal_uInt16(Nel)); - TextPaM Os(Osp, sal_uInt16(Osl)); - TextPaM Oe(Oep, sal_uInt16(Oel)); + TextPaM Ns(Nsp, Nsl); + TextPaM Ne(Nep, Nel); + TextPaM Os(Osp, Osl); + TextPaM Oe(Oep, Oel); if (Os == Oe && Ns == Ne) { |