sal_uInt16 to sal_Int32
Change-Id: I723d7c187ec186ccc68f061ba2357712a5f31869
This commit is contained in:
parent
69a4c6626c
commit
2a57ea7a67
@ -703,8 +703,7 @@ void ModulWindow::BasicAddWatch()
|
||||
if ( !aWord.isEmpty() )
|
||||
{
|
||||
TextSelection aSel( aWordStart );
|
||||
sal_uInt16& rIndex = aSel.GetEnd().GetIndex();
|
||||
rIndex = rIndex + aWord.getLength();
|
||||
aSel.GetEnd().GetIndex() += aWord.getLength();
|
||||
GetEditView()->SetSelection( aSel );
|
||||
bAdd = true;
|
||||
}
|
||||
|
@ -31,17 +31,17 @@ class TextPaM
|
||||
{
|
||||
private:
|
||||
sal_uLong mnPara;
|
||||
sal_uInt16 mnIndex;
|
||||
sal_Int32 mnIndex;
|
||||
|
||||
public:
|
||||
TextPaM() { mnPara = 0, mnIndex = 0; }
|
||||
TextPaM( sal_uLong nPara, sal_uInt16 nIndex ) { mnPara = nPara, mnIndex = nIndex; }
|
||||
TextPaM() : mnPara(0), mnIndex(0) {}
|
||||
TextPaM( sal_uLong nPara, sal_Int32 nIndex ) : mnPara(nPara), mnIndex(nIndex) {}
|
||||
|
||||
sal_uLong GetPara() const { return mnPara; }
|
||||
sal_uLong& GetPara() { return mnPara; }
|
||||
|
||||
sal_uInt16 GetIndex() const { return mnIndex; }
|
||||
sal_uInt16& GetIndex() { return mnIndex; }
|
||||
sal_Int32 GetIndex() const { return mnIndex; }
|
||||
sal_Int32& GetIndex() { return mnIndex; }
|
||||
|
||||
inline bool operator == ( const TextPaM& rPaM ) const;
|
||||
inline bool operator != ( const TextPaM& rPaM ) const;
|
||||
|
@ -1443,7 +1443,7 @@ void AddressMultiLineEdit::InsertNewEntry( const OUString& rStr )
|
||||
ExtTextView* pTextView = GetTextView();
|
||||
const TextSelection& rSelection = pTextView->GetSelection();
|
||||
sal_uLong nPara = rSelection.GetStart().GetPara();
|
||||
sal_uInt16 nIndex = rSelection.GetEnd().GetIndex();
|
||||
sal_Int32 nIndex = rSelection.GetEnd().GetIndex();
|
||||
ExtTextEngine *pTextEngine = GetTextEngine();
|
||||
const TextCharAttrib *pAttrib;
|
||||
if(0 != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED )))
|
||||
@ -1452,7 +1452,7 @@ void AddressMultiLineEdit::InsertNewEntry( const OUString& rStr )
|
||||
|
||||
// select the new entry
|
||||
pAttrib = pTextEngine->FindCharAttrib(TextPaM(nPara, nIndex),TEXTATTR_PROTECTED);
|
||||
const sal_uInt16 nEnd = pAttrib ? pAttrib->GetEnd() : nIndex;
|
||||
const sal_Int32 nEnd = pAttrib ? pAttrib->GetEnd() : nIndex;
|
||||
TextSelection aEntrySel(TextPaM(nPara, nIndex), TextPaM(nPara, nEnd));
|
||||
pTextView->SetSelection(aEntrySel);
|
||||
Invalidate();
|
||||
|
@ -474,7 +474,7 @@ sal_uLong TextDoc::GetTextLen( const sal_Unicode* pSep, const TextSelection* pSe
|
||||
{
|
||||
TextNode* pNode = maTextNodes[ nNode ];
|
||||
|
||||
sal_uInt16 nS = 0;
|
||||
sal_Int32 nS = 0;
|
||||
sal_Int32 nE = pNode->GetText().getLength();
|
||||
if ( pSel && ( nNode == pSel->GetStart().GetPara() ) )
|
||||
nS = pSel->GetStart().GetIndex();
|
||||
|
@ -490,8 +490,8 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndo
|
||||
OUString aStr( pNode->GetText().copy( rPaM.GetIndex(), nChars ) );
|
||||
|
||||
// check if attributes are being deleted or changed
|
||||
sal_uInt16 nStart = rPaM.GetIndex();
|
||||
sal_uInt16 nEnd = nStart + nChars;
|
||||
const sal_Int32 nStart = rPaM.GetIndex();
|
||||
const sal_Int32 nEnd = nStart + nChars;
|
||||
for ( sal_uInt16 nAttr = pNode->GetCharAttribs().Count(); nAttr; )
|
||||
{
|
||||
TextCharAttrib& rAttr = pNode->GetCharAttribs().GetAttrib( --nAttr );
|
||||
@ -2542,7 +2542,7 @@ bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, bool bHTML
|
||||
{
|
||||
TextNode* pNode = mpDoc->GetNodes()[ nPara ];
|
||||
|
||||
sal_uInt16 nStartPos = 0;
|
||||
sal_Int32 nStartPos = 0;
|
||||
sal_Int32 nEndPos = pNode->GetText().getLength();
|
||||
if ( nPara == aSel.GetStart().GetPara() )
|
||||
nStartPos = aSel.GetStart().GetIndex();
|
||||
|
Loading…
x
Reference in New Issue
Block a user