diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-12 10:38:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-12 13:09:03 +0100 |
commit | d908422f5763ed8ea79af81336ca564f46435baf (patch) | |
tree | 1ca43737a7ae7f53d291348dd885e0a8855e40f3 /editeng/source | |
parent | 16a53253e5991de8d44679157c29d58bb431eb2c (diff) |
Related: fdo#38838 remove XubString alias
Change-Id: I29efbe2bee94c0059f5a2e3dc4d163375e439e1a
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 40 | ||||
-rw-r--r-- | editeng/source/editeng/editdoc.hxx | 16 |
2 files changed, 28 insertions, 28 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 4439615c9404..32e0da2b10b1 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1301,7 +1301,7 @@ ContentNode::ContentNode( SfxItemPool& rPool ) : aContentAttribs( rPool ) DBG_CTOR( EE_ContentNode, 0 ); } -ContentNode::ContentNode( const XubString& rStr, const ContentAttribs& rContentAttribs ) : +ContentNode::ContentNode( const OUString& rStr, const ContentAttribs& rContentAttribs ) : maString(rStr), aContentAttribs(rContentAttribs) { DBG_CTOR( EE_ContentNode, 0 ); @@ -1697,12 +1697,12 @@ void ContentNode::SetChar(sal_uInt16 nPos, sal_Unicode c) maString = maString.replaceAt(nPos, 1, OUString(c)); } -void ContentNode::Insert(const XubString& rStr, sal_uInt16 nPos) +void ContentNode::Insert(const OUString& rStr, sal_uInt16 nPos) { maString = maString.replaceAt(nPos, 0, rStr); } -void ContentNode::Append(const XubString& rStr) +void ContentNode::Append(const OUString& rStr) { maString += rStr; } @@ -1717,12 +1717,12 @@ void ContentNode::Erase(sal_uInt16 nPos, sal_uInt16 nCount) maString = maString.replaceAt(nPos, nCount, ""); } -XubString ContentNode::Copy(sal_uInt16 nPos) const +OUString ContentNode::Copy(sal_uInt16 nPos) const { return maString.copy(nPos); } -XubString ContentNode::Copy(sal_uInt16 nPos, sal_uInt16 nCount) const +OUString ContentNode::Copy(sal_uInt16 nPos, sal_uInt16 nCount) const { return maString.copy(nPos, nCount); } @@ -2126,12 +2126,12 @@ OUString EditDoc::GetText( LineEnd eEnd ) const return OUString(newStr, SAL_NO_ACQUIRE); } -XubString EditDoc::GetParaAsString( sal_Int32 nNode ) const +OUString EditDoc::GetParaAsString( sal_Int32 nNode ) const { return GetParaAsString( GetObject( nNode ) ); } -XubString EditDoc::GetParaAsString( +OUString EditDoc::GetParaAsString( const ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, bool bResolveFields) const { if ( nEndPos > pNode->Len() ) @@ -2140,7 +2140,7 @@ XubString EditDoc::GetParaAsString( DBG_ASSERT( nStartPos <= nEndPos, "Start and End reversed?" ); sal_uInt16 nIndex = nStartPos; - XubString aStr; + OUString aStr; const EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( nIndex ); while ( nIndex < nEndPos ) { @@ -2154,15 +2154,15 @@ XubString EditDoc::GetParaAsString( //!! beware of sub string length of -1 which is also defined as STRING_LEN and //!! thus would result in adding the whole sub string up to the end of the node !! if (nEnd > nIndex) - aStr += XubString(pNode->GetString(), nIndex, nEnd - nIndex); + aStr += pNode->GetString().copy(nIndex, nEnd - nIndex); if ( pNextFeature ) { switch ( pNextFeature->GetItem()->Which() ) { - case EE_FEATURE_TAB: aStr += '\t'; + case EE_FEATURE_TAB: aStr += "\t"; break; - case EE_FEATURE_LINEBR: aStr += '\x0A'; + case EE_FEATURE_LINEBR: aStr += "\x0A"; break; case EE_FEATURE_FIELD: if ( bResolveFields ) @@ -2266,16 +2266,16 @@ EditPaM EditDoc::RemoveText() return aPaM; } -EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr ) +EditPaM EditDoc::InsertText( EditPaM aPaM, const OUString& rStr ) { - DBG_ASSERT( rStr.Search( 0x0A ) == STRING_NOTFOUND, "EditDoc::InsertText: Newlines prohibited in paragraph!" ); - DBG_ASSERT( rStr.Search( 0x0D ) == STRING_NOTFOUND, "EditDoc::InsertText: Newlines prohibited in paragraph!" ); - DBG_ASSERT( rStr.Search( '\t' ) == STRING_NOTFOUND, "EditDoc::InsertText: Newlines prohibited in paragraph!" ); + DBG_ASSERT( rStr.indexOf( 0x0A ) == -1, "EditDoc::InsertText: Newlines prohibited in paragraph!" ); + DBG_ASSERT( rStr.indexOf( 0x0D ) == -1, "EditDoc::InsertText: Newlines prohibited in paragraph!" ); + DBG_ASSERT( rStr.indexOf( '\t' ) == -1, "EditDoc::InsertText: Newlines prohibited in paragraph!" ); DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertText1" ); aPaM.GetNode()->Insert( rStr, aPaM.GetIndex() ); - aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.Len(), GetItemPool() ); - aPaM.GetIndex() = aPaM.GetIndex() + rStr.Len(); + aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.getLength(), GetItemPool() ); + aPaM.GetIndex() = aPaM.GetIndex() + rStr.getLength(); SetModified( sal_True ); @@ -2287,7 +2287,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs ) DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertParaBreak" ); ContentNode* pCurNode = aPaM.GetNode(); sal_Int32 nPos = GetPos( pCurNode ); - XubString aStr = aPaM.GetNode()->Copy( aPaM.GetIndex() ); + OUString aStr = aPaM.GetNode()->Copy( aPaM.GetIndex() ); aPaM.GetNode()->Erase( aPaM.GetIndex() ); // the paragraph attributes... @@ -2304,8 +2304,8 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs ) SfxStyleSheet* pStyle = aPaM.GetNode()->GetStyleSheet(); if ( pStyle ) { - XubString aFollow( pStyle->GetFollow() ); - if ( aFollow.Len() && ( aFollow != pStyle->GetName() ) ) + OUString aFollow( pStyle->GetFollow() ); + if ( !aFollow.isEmpty() && ( aFollow != pStyle->GetName() ) ) { SfxStyleSheetBase* pNext = pStyle->GetPool().Find( aFollow, pStyle->GetFamily() ); pNode->SetStyleSheet( (SfxStyleSheet*)pNext ); diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 422e44f6611f..ab6d577ecdec 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -263,7 +263,7 @@ private: public: ContentNode( SfxItemPool& rItemPool ); - ContentNode( const XubString& rStr, const ContentAttribs& rContentAttribs ); + ContentNode( const OUString& rStr, const ContentAttribs& rContentAttribs ); ~ContentNode(); ContentAttribs& GetContentAttribs() { return aContentAttribs; } @@ -297,12 +297,12 @@ public: const OUString& GetString() const; void SetChar(sal_uInt16 nPos, sal_Unicode c); - void Insert(const XubString& rStr, sal_uInt16 nPos); - void Append(const XubString& rStr); + void Insert(const OUString& rStr, sal_uInt16 nPos); + void Append(const OUString& rStr); void Erase(sal_uInt16 nPos); void Erase(sal_uInt16 nPos, sal_uInt16 nCount); - XubString Copy(sal_uInt16 nPos) const; - XubString Copy(sal_uInt16 nPos, sal_uInt16 nCount) const; + OUString Copy(sal_uInt16 nPos) const; + OUString Copy(sal_uInt16 nPos, sal_uInt16 nCount) const; sal_Unicode GetChar(sal_uInt16 nPos) const; }; @@ -774,7 +774,7 @@ public: EditPaM Clear(); EditPaM RemoveText(); EditPaM RemoveChars( EditPaM aPaM, sal_uInt16 nChars ); - EditPaM InsertText( EditPaM aPaM, const XubString& rStr ); + EditPaM InsertText( EditPaM aPaM, const OUString& rStr ); EditPaM InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs ); EditPaM InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem ); EditPaM ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight ); @@ -782,8 +782,8 @@ public: OUString GetText( LineEnd eEnd ) const; sal_uLong GetTextLen() const; - XubString GetParaAsString( sal_Int32 nNode ) const; - XubString GetParaAsString(const ContentNode* pNode, sal_uInt16 nStartPos = 0, sal_uInt16 nEndPos = 0xFFFF, bool bResolveFields = true) const; + OUString GetParaAsString( sal_Int32 nNode ) const; + OUString GetParaAsString(const ContentNode* pNode, sal_uInt16 nStartPos = 0, sal_uInt16 nEndPos = 0xFFFF, bool bResolveFields = true) const; EditPaM GetStartPaM() const; EditPaM GetEndPaM() const; |