summaryrefslogtreecommitdiff
path: root/vcl/source/edit/textview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/edit/textview.cxx')
-rw-r--r--vcl/source/edit/textview.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 92ec4acc06ff..8e32b78578a5 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -736,7 +736,7 @@ bool TextView::KeyInput( const KeyEvent& rKeyEvent )
aCurSel = mpImpl->mpTextEngine->ImpInsertParaBreak( aCurSel );
if ( mpImpl->mbAutoIndent )
{
- TextNode* pPrev = mpImpl->mpTextEngine->mpDoc->GetNode( aCurSel.GetEnd().GetPara() - 1 );
+ TextNode* pPrev = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aCurSel.GetEnd().GetPara() - 1 );
sal_uInt16 n = 0;
while ( ( n < pPrev->GetText().getLength() ) && (
( pPrev->GetText()[ n ] == ' ' ) ||
@@ -859,7 +859,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
if ( mpImpl->maSelection.GetEnd().GetIndex() < mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection.GetEnd().GetPara() ) )
{
HideSelection();
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( mpImpl->maSelection.GetEnd().GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( mpImpl->maSelection.GetEnd().GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->GetText(), mpImpl->maSelection.GetEnd().GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, true );
TextSelection aNewSel( mpImpl->maSelection );
@@ -898,7 +898,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
HideSelection();
TextSelection aNewSel( mpImpl->maSelection );
aNewSel.GetStart().GetIndex() = 0;
- aNewSel.GetEnd().GetIndex() = mpImpl->mpTextEngine->mpDoc->GetNode( mpImpl->maSelection.GetEnd().GetPara() )->GetText().getLength();
+ aNewSel.GetEnd().GetIndex() = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( mpImpl->maSelection.GetEnd().GetPara() )->GetText().getLength();
ImpSetSelection( aNewSel );
ShowSelection();
ShowCursor( true, true );
@@ -922,7 +922,7 @@ void TextView::Command( const CommandEvent& rCEvt )
{
DeleteSelected();
delete mpImpl->mpTextEngine->mpIMEInfos;
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( GetSelection().GetEnd().GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( GetSelection().GetEnd().GetPara() );
mpImpl->mpTextEngine->mpIMEInfos = new TEIMEInfos( GetSelection().GetEnd(), pNode->GetText().copy( GetSelection().GetEnd().GetIndex() ) );
mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite = !IsInsertMode();
}
@@ -1376,7 +1376,7 @@ TextPaM TextView::CursorLeft( const TextPaM& rPaM, sal_uInt16 nCharacterIterator
if ( aPaM.GetIndex() )
{
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aPaM.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
sal_Int32 nCount = 1;
aPaM.GetIndex() = (sal_uInt16)xBI->previousCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
@@ -1384,7 +1384,7 @@ TextPaM TextView::CursorLeft( const TextPaM& rPaM, sal_uInt16 nCharacterIterator
else if ( aPaM.GetPara() )
{
aPaM.GetPara()--;
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aPaM.GetPara() );
aPaM.GetIndex() = pNode->GetText().getLength();
}
return aPaM;
@@ -1394,14 +1394,14 @@ TextPaM TextView::CursorRight( const TextPaM& rPaM, sal_uInt16 nCharacterIterato
{
TextPaM aPaM( rPaM );
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aPaM.GetPara() );
if ( aPaM.GetIndex() < pNode->GetText().getLength() )
{
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
sal_Int32 nCount = 1;
aPaM.GetIndex() = (sal_uInt16)xBI->nextCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
}
- else if ( aPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->CountNodes()-1) )
+ else if ( aPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->GetNodes().Count()-1) )
{
aPaM.GetPara()++;
aPaM.GetIndex() = 0;
@@ -1416,7 +1416,7 @@ TextPaM TextView::CursorWordLeft( const TextPaM& rPaM )
if ( aPaM.GetIndex() )
{
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aPaM.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->GetText(), rPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, true );
if ( aBoundary.startPos >= rPaM.GetIndex() )
@@ -1426,7 +1426,7 @@ TextPaM TextView::CursorWordLeft( const TextPaM& rPaM )
else if ( aPaM.GetPara() )
{
aPaM.GetPara()--;
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aPaM.GetPara() );
aPaM.GetIndex() = pNode->GetText().getLength();
}
return aPaM;
@@ -1436,14 +1436,14 @@ TextPaM TextView::CursorWordRight( const TextPaM& rPaM )
{
TextPaM aPaM( rPaM );
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aPaM.GetPara() );
if ( aPaM.GetIndex() < pNode->GetText().getLength() )
{
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->nextWord( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
aPaM.GetIndex() = (sal_uInt16)aBoundary.startPos;
}
- else if ( aPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->CountNodes()-1) )
+ else if ( aPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->GetNodes().Count()-1) )
{
aPaM.GetPara()++;
aPaM.GetIndex() = 0;
@@ -1467,7 +1467,7 @@ TextPaM TextView::ImpDelete( sal_uInt8 nMode, sal_uInt8 nDelMode )
}
else if ( nDelMode == DELMODE_RESTOFWORD )
{
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aEndPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aEndPaM.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->GetText(), mpImpl->maSelection.GetEnd().GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, true );
if ( aBoundary.startPos == mpImpl->maSelection.GetEnd().GetIndex() )
@@ -1495,21 +1495,21 @@ TextPaM TextView::ImpDelete( sal_uInt8 nMode, sal_uInt8 nDelMode )
}
else if ( nDelMode == DELMODE_RESTOFWORD )
{
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aEndPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aEndPaM.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->nextWord( pNode->GetText(), mpImpl->maSelection.GetEnd().GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
aEndPaM.GetIndex() = (sal_uInt16)aBoundary.startPos;
}
else // DELMODE_RESTOFCONTENT
{
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aEndPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aEndPaM.GetPara() );
if ( aEndPaM.GetIndex() < pNode->GetText().getLength() )
aEndPaM.GetIndex() = pNode->GetText().getLength();
- else if ( aEndPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->CountNodes() - 1 ) )
+ else if ( aEndPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->GetNodes().Count() - 1 ) )
{
// next paragraph
aEndPaM.GetPara()++;
- TextNode* pNextNode = mpImpl->mpTextEngine->mpDoc->GetNode( aEndPaM.GetPara() );
+ TextNode* pNextNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aEndPaM.GetPara() );
aEndPaM.GetIndex() = pNextNode->GetText().getLength();
}
}
@@ -1581,7 +1581,7 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM )
if ( ( aPaM.GetIndex() == pLine.GetEnd() ) && ( aPaM.GetIndex() > pLine.GetStart() ) && aPaM.GetIndex() < pPPortion->GetNode()->GetText().getLength() )
aPaM.GetIndex()--;
}
- else if ( rPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->CountNodes() - 1 ) ) // next paragraph
+ else if ( rPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->GetNodes().Count() - 1 ) ) // next paragraph
{
aPaM.GetPara()++;
pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
@@ -1639,7 +1639,7 @@ TextPaM TextView::CursorStartOfParagraph( const TextPaM& rPaM )
TextPaM TextView::CursorEndOfParagraph( const TextPaM& rPaM )
{
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( rPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( rPaM.GetPara() );
TextPaM aPaM( rPaM );
aPaM.GetIndex() = pNode->GetText().getLength();
return aPaM;
@@ -1653,8 +1653,8 @@ TextPaM TextView::CursorStartOfDoc()
TextPaM TextView::CursorEndOfDoc()
{
- sal_uLong nNode = mpImpl->mpTextEngine->mpDoc->CountNodes() - 1;
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( nNode );
+ sal_uLong nNode = mpImpl->mpTextEngine->mpDoc->GetNodes().Count() - 1;
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( nNode );
TextPaM aPaM( nNode, pNode->GetText().getLength() );
return aPaM;
}
@@ -1713,7 +1713,7 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec
if ( !IsInsertMode() && !mpImpl->maSelection.HasRange() )
{
- TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNode( aPaM.GetPara() );
+ TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aPaM.GetPara() );
if ( !pNode->GetText().isEmpty() && ( aPaM.GetIndex() < pNode->GetText().getLength() ) )
{
// If we are behind a portion, and the next portion has other direction, we must change position...