diff options
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 4 | ||||
-rw-r--r-- | comphelper/source/misc/syntaxhighlight.cxx | 4 | ||||
-rw-r--r-- | include/comphelper/syntaxhighlight.hxx | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index df405c8d89e4..5e23916754f7 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -594,7 +594,7 @@ void EditorWindow::HandleAutoCorrect() { TextSelection aSel = GetEditView()->GetSelection(); sal_uLong nLine = aSel.GetStart().GetPara(); - sal_uLong nIndex = aSel.GetStart().GetIndex(); + sal_uInt16 nIndex = aSel.GetStart().GetIndex(); OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified const OUString& sActSubName = GetActualSubName( nLine ); // the actual procedure @@ -671,7 +671,7 @@ void EditorWindow::HandleAutoCorrect() TextSelection EditorWindow::GetLastHighlightPortionTextSelection() {//creates a text selection from the highlight portion on the cursor sal_uLong nLine = GetEditView()->GetSelection().GetStart().GetPara(); - sal_uLong nIndex = GetEditView()->GetSelection().GetStart().GetIndex(); + sal_uInt16 nIndex = GetEditView()->GetSelection().GetStart().GetIndex(); OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified std::vector<HighlightPortion> aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx index 63a4b1bf077e..68d1701b9080 100644 --- a/comphelper/source/misc/syntaxhighlight.cxx +++ b/comphelper/source/misc/syntaxhighlight.cxx @@ -678,8 +678,8 @@ void SimpleTokenizer_Impl::getHighlightPortions( sal_uInt32 nParseLine, const OU { HighlightPortion portion; - portion.nBegin = (sal_uInt16)(pStartPos - mpStringBegin); - portion.nEnd = (sal_uInt16)(pEndPos - mpStringBegin); + portion.nBegin = pStartPos - mpStringBegin; + portion.nEnd = pEndPos - mpStringBegin; portion.tokenType = eType; portions.push_back(portion); diff --git a/include/comphelper/syntaxhighlight.hxx b/include/comphelper/syntaxhighlight.hxx index 5161a5622cda..a82986c49429 100644 --- a/include/comphelper/syntaxhighlight.hxx +++ b/include/comphelper/syntaxhighlight.hxx @@ -44,7 +44,11 @@ enum TokenTypes TT_PARAMETER }; -struct HighlightPortion { sal_uInt16 nBegin; sal_uInt16 nEnd; TokenTypes tokenType; }; +struct HighlightPortion { + sal_Int32 nBegin; + sal_Int32 nEnd; + TokenTypes tokenType; +}; ///////////////////////////////////////////////////////////////////////// // Auxiliary class to support JavaScript modules, next to find functions which |