diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-08-11 17:00:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-12 08:32:59 +0100 |
commit | 9dd40c656feda2ccadb07d618a95b9ff63ab61ff (patch) | |
tree | 84b5e0e3bd48909413c074d52c4bc08a46cfabce /vcl/source/edit/textdoc.cxx | |
parent | 3e9ae4da947cd9c3f75b6e4942f2ba52337df075 (diff) |
XubString->OUString
Change-Id: I04c7da143425a9d8cc4fae155ad45a469df953c1
Diffstat (limited to 'vcl/source/edit/textdoc.cxx')
-rw-r--r-- | vcl/source/edit/textdoc.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx index 5ef6cf13dec5..3a2d3499d297 100644 --- a/vcl/source/edit/textdoc.cxx +++ b/vcl/source/edit/textdoc.cxx @@ -458,7 +458,7 @@ void TextDoc::DestroyTextNodes() maTextNodes.clear(); } -String TextDoc::GetText( const sal_Unicode* pSep ) const +OUString TextDoc::GetText( const sal_Unicode* pSep ) const { sal_uLong nLen = GetTextLen( pSep ); sal_uLong nNodes = maTextNodes.Count(); @@ -483,9 +483,10 @@ String TextDoc::GetText( const sal_Unicode* pSep ) const return aASCIIText; } -XubString TextDoc::GetText( sal_uLong nPara ) const +OUString TextDoc::GetText( sal_uLong nPara ) const { - XubString aText; + OUString aText; + TextNode* pNode = ( nPara < maTextNodes.Count() ) ? maTextNodes.GetObject( nPara ) : 0; if ( pNode ) aText = pNode->GetText(); @@ -541,15 +542,15 @@ TextPaM TextDoc::InsertText( const TextPaM& rPaM, sal_Unicode c ) return aPaM; } -TextPaM TextDoc::InsertText( const TextPaM& rPaM, const XubString& rStr ) +TextPaM TextDoc::InsertText( const TextPaM& rPaM, const OUString& rStr ) { - DBG_ASSERT( rStr.Search( 0x0A ) == STRING_NOTFOUND, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" ); - DBG_ASSERT( rStr.Search( 0x0D ) == STRING_NOTFOUND, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" ); + DBG_ASSERT( rStr.indexOf( 0x0A ) == -1, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" ); + DBG_ASSERT( rStr.indexOf( 0x0D ) == -1, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" ); TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() ); pNode->InsertText( rPaM.GetIndex(), rStr ); - TextPaM aPaM( rPaM.GetPara(), rPaM.GetIndex()+rStr.Len() ); + TextPaM aPaM( rPaM.GetPara(), rPaM.GetIndex()+rStr.getLength() ); return aPaM; } |