From 9cbafe9085b226d0d109fed85d67ba4e0895974e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 29 Aug 2013 08:43:17 +0100 Subject: XubString->OUString Change-Id: I6db7b9e86ea6d17b5ba0a883136e0e4dbdd9e0b3 --- editeng/source/editeng/editeng.cxx | 24 ++++++++++++------------ editeng/source/editeng/editobj.cxx | 4 ++-- editeng/source/editeng/editobj2.hxx | 4 ++-- editeng/source/editeng/impedit.hxx | 12 ++++++------ editeng/source/editeng/impedit2.cxx | 26 +++++++++++++------------- editeng/source/editeng/impedit4.cxx | 6 +++--- editeng/source/editeng/impedit5.cxx | 4 ++-- editeng/source/items/borderline.cxx | 2 +- editeng/source/items/bulitem.cxx | 2 +- 9 files changed, 42 insertions(+), 42 deletions(-) (limited to 'editeng') diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 142be57a958b..95a7ac28ae0f 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -618,7 +618,7 @@ OUString EditEngine::GetText( LineEnd eEnd ) const return pImpEditEngine->GetEditDoc().GetText( eEnd ); } -XubString EditEngine::GetText( const ESelection& rESelection, const LineEnd eEnd ) const +OUString EditEngine::GetText( const ESelection& rESelection, const LineEnd eEnd ) const { DBG_CHKTHIS( EditEngine, 0 ); EditSelection aSel( pImpEditEngine->CreateSel( rESelection ) ); @@ -689,7 +689,7 @@ sal_uInt32 EditEngine::GetTextHeight( sal_Int32 nParagraph ) const return nHeight; } -XubString EditEngine::GetWord( sal_Int32 nPara, sal_uInt16 nIndex ) +OUString EditEngine::GetWord( sal_Int32 nPara, sal_uInt16 nIndex ) { ESelection aESel( nPara, nIndex, nPara, nIndex ); EditSelection aSel( pImpEditEngine->CreateSel( aESel ) ); @@ -1038,9 +1038,9 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() ); DBG_ASSERT( !aCurSel.IsInvalid(), "Blinde Selection in EditEngine::PostKeyEvent" ); - String aAutoText( pImpEditEngine->GetAutoCompleteText() ); - if ( pImpEditEngine->GetAutoCompleteText().Len() ) - pImpEditEngine->SetAutoCompleteText( String(), sal_True ); + OUString aAutoText( pImpEditEngine->GetAutoCompleteText() ); + if (!pImpEditEngine->GetAutoCompleteText().isEmpty()) + pImpEditEngine->SetAutoCompleteText(OUString(), true); sal_uInt16 nCode = rKeyEvent.GetKeyCode().GetCode(); KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction(); @@ -1295,7 +1295,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie } else { - if ( !aAutoText.Len() ) + if (aAutoText.isEmpty()) { if ( pImpEditEngine->GetStatus().DoAutoCorrect() ) aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin ); @@ -1703,10 +1703,10 @@ sal_uInt16 EditEngine::GetTextLen( sal_Int32 nPara ) const return 0; } -XubString EditEngine::GetText( sal_Int32 nPara ) const +OUString EditEngine::GetText( sal_Int32 nPara ) const { DBG_CHKTHIS( EditEngine, 0 ); - XubString aStr; + OUString aStr; if ( 0 <= nPara && nPara < pImpEditEngine->GetEditDoc().Count() ) aStr = pImpEditEngine->GetEditDoc().GetParaAsString( nPara ); return aStr; @@ -1773,7 +1773,7 @@ void EditEngine::InsertParagraph( sal_Int32 nPara, const EditTextObject& rTxtObj pImpEditEngine->FormatAndUpdate(); } -void EditEngine::InsertParagraph( sal_Int32 nPara, const XubString& rTxt ) +void EditEngine::InsertParagraph(sal_Int32 nPara, const OUString& rTxt) { DBG_CHKTHIS( EditEngine, 0 ); if ( nPara > GetParagraphCount() ) @@ -1792,7 +1792,7 @@ void EditEngine::InsertParagraph( sal_Int32 nPara, const XubString& rTxt ) pImpEditEngine->FormatAndUpdate(); } -void EditEngine::SetText( sal_Int32 nPara, const XubString& rTxt ) +void EditEngine::SetText(sal_Int32 nPara, const OUString& rTxt) { DBG_CHKTHIS( EditEngine, 0 ); EditSelection* pSel = pImpEditEngine->SelectParagraph( nPara ); @@ -2145,7 +2145,7 @@ void EditEngine::QuickMarkInvalid( const ESelection& rSel ) } } -void EditEngine::QuickInsertText( const XubString& rText, const ESelection& rSel ) +void EditEngine::QuickInsertText(const OUString& rText, const ESelection& rSel) { DBG_CHKTHIS( EditEngine, 0 ); @@ -2663,7 +2663,7 @@ void EditEngine::ParagraphHeightChanged( sal_Int32 nPara ) OUString EditEngine::GetUndoComment( sal_uInt16 nId ) const { DBG_CHKTHIS( EditEngine, 0 ); - XubString aComment; + OUString aComment; switch ( nId ) { case EDITUNDO_REMOVECHARS: diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 7d4b765b1b4b..22e0cc639f3e 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -988,8 +988,8 @@ void EditTextObjectImpl::SetStyleSheet(sal_Int32 nPara, const OUString& rName, c } bool EditTextObjectImpl::ImpChangeStyleSheets( - const XubString& rOldName, SfxStyleFamily eOldFamily, - const XubString& rNewName, SfxStyleFamily eNewFamily ) + const OUString& rOldName, SfxStyleFamily eOldFamily, + const OUString& rNewName, SfxStyleFamily eNewFamily ) { const size_t nParagraphs = aContents.size(); bool bChanges = false; diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx index c67fc8e6a23c..650e88d5d6ae 100644 --- a/editeng/source/editeng/editobj2.hxx +++ b/editeng/source/editeng/editobj2.hxx @@ -184,8 +184,8 @@ private: bool bVertical:1; bool bStoreUnicodeStrings:1; - bool ImpChangeStyleSheets( const String& rOldName, SfxStyleFamily eOldFamily, - const String& rNewName, SfxStyleFamily eNewFamily ); + bool ImpChangeStyleSheets( const OUString& rOldName, SfxStyleFamily eOldFamily, + const OUString& rNewName, SfxStyleFamily eNewFamily ); public: void StoreData( SvStream& rOStream ) const; diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 12dabd10822d..f15f01a2ca4b 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -438,7 +438,7 @@ private: ConvInfo * pConvInfo; - XubString aAutoCompleteText; + OUString aAutoCompleteText; InternalEditStatus aStatus; @@ -550,7 +550,7 @@ private: void ImpRemoveParagraph( sal_Int32 nPara ); EditSelection ImpMoveParagraphs( Range aParagraphs, sal_Int32 nNewPos ); - EditPaM ImpFastInsertText( EditPaM aPaM, const String& rStr ); + EditPaM ImpFastInsertText( EditPaM aPaM, const OUString& rStr ); EditPaM ImpFastInsertParagraph( sal_Int32 nPara ); sal_Bool ImpCheckRefMapMode(); @@ -727,7 +727,7 @@ public: void Command( const CommandEvent& rCEvt, EditView* pView ); EditSelectionEngine& GetSelEngine() { return aSelEngine; } - XubString GetSelected( const EditSelection& rSel, const LineEnd eParaSep = LINEEND_LF ) const; + OUString GetSelected( const EditSelection& rSel, const LineEnd eParaSep = LINEEND_LF ) const; const SfxItemSet& GetEmptyItemSet(); @@ -751,7 +751,7 @@ public: bool IsFormatted() const { return bFormatted; } bool IsFormatting() const { return bIsFormatting; } - void SetText( const String& rText ); + void SetText(const OUString& rText); EditPaM DeleteSelected( EditSelection aEditSelection); EditPaM InsertText( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput = sal_False ); EditPaM InsertText(const EditSelection& aCurEditSelection, const String& rStr); @@ -969,8 +969,8 @@ public: void StartOnlineSpellTimer() { aOnlineSpellTimer.Start(); } void StopOnlineSpellTimer() { aOnlineSpellTimer.Stop(); } - const XubString& GetAutoCompleteText() const { return aAutoCompleteText; } - void SetAutoCompleteText( const String& rStr, sal_Bool bUpdateTipWindow ); + const OUString& GetAutoCompleteText() const { return aAutoCompleteText; } + void SetAutoCompleteText(const OUString& rStr, bool bUpdateTipWindow); EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode ); short ReplaceTextOnly( ContentNode* pNode, sal_uInt16 nCurrentStart, xub_StrLen nLen, const String& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 3a5fb7e78faa..f5806b399c6b 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -265,9 +265,9 @@ EditPaM ImpEditEngine::DeleteSelected( EditSelection aSel ) return aPaM; } -XubString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd eEnd ) const +OUString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd eEnd ) const { - XubString aText; + OUString aText; if ( !rSel.HasRange() ) return aText; @@ -308,7 +308,7 @@ sal_Bool ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pVie GetSelEngine().SetCurView( pView ); SetActiveView( pView ); - if ( GetAutoCompleteText().Len() ) + if (!GetAutoCompleteText().isEmpty()) SetAutoCompleteText( String(), sal_True ); GetSelEngine().SelMouseButtonDown( rMEvt ); @@ -645,7 +645,7 @@ EditPaM ImpEditEngine::RemoveText() } -void ImpEditEngine::SetText( const XubString& rText ) +void ImpEditEngine::SetText(const OUString& rText) { // RemoveText deletes the undo list! EditPaM aStartPaM = RemoveText(); @@ -655,7 +655,7 @@ void ImpEditEngine::SetText( const XubString& rText ) EditSelection aEmptySel( aStartPaM, aStartPaM ); EditPaM aPaM = aStartPaM; - if ( rText.Len() ) + if (!rText.isEmpty()) aPaM = ImpInsertText( aEmptySel, rText ); for (size_t nView = 0; nView < aEditViews.size(); ++nView) @@ -665,7 +665,7 @@ void ImpEditEngine::SetText( const XubString& rText ) pView->pImpEditView->SetEditSelection( EditSelection( aPaM, aPaM ) ); // If no text then also no Format&Update // => The text remains. - if ( !rText.Len() && GetUpdateMode() ) + if (rText.isEmpty() && GetUpdateMode()) { Rectangle aTmpRect( pView->GetOutputArea().TopLeft(), Size( aPaperSize.Width(), nCurTextHeight ) ); @@ -673,7 +673,7 @@ void ImpEditEngine::SetText( const XubString& rText ) pView->GetWindow()->Invalidate( aTmpRect ); } } - if( !rText.Len() ) { // otherwise it must be invalidated later, !bFormatted is enough. + if (rText.isEmpty()) { // otherwise it must be invalidated later, !bFormatted is enough. nCurTextHeight = 0; nCurTextHeightNTP = 0; } @@ -2739,13 +2739,13 @@ EditPaM ImpEditEngine::ImpInsertText(const EditSelection& aCurSel, const String& return aPaM; } -EditPaM ImpEditEngine::ImpFastInsertText( EditPaM aPaM, const XubString& rStr ) +EditPaM ImpEditEngine::ImpFastInsertText( EditPaM aPaM, const OUString& rStr ) { - OSL_ENSURE( rStr.Search( 0x0A ) == STRING_NOTFOUND, "FastInsertText: Newline not allowed! "); - OSL_ENSURE( rStr.Search( 0x0D ) == STRING_NOTFOUND, "FastInsertText: Newline not allowed! "); - OSL_ENSURE( rStr.Search( '\t' ) == STRING_NOTFOUND, "FastInsertText: Newline not allowed! "); + OSL_ENSURE( rStr.indexOf( 0x0A ) == -1, "FastInsertText: Newline not allowed! "); + OSL_ENSURE( rStr.indexOf( 0x0D ) == -1, "FastInsertText: Newline not allowed! "); + OSL_ENSURE( rStr.indexOf( '\t' ) == -1, "FastInsertText: Newline not allowed! "); - if ( ( aPaM.GetNode()->Len() + rStr.Len() ) < MAXCHARSINPARA ) + if ( ( aPaM.GetNode()->Len() + rStr.getLength() ) < MAXCHARSINPARA ) { if ( IsUndoEnabled() && !IsInUndo() ) InsertUndo(new EditUndoInsertChars(pEditEngine, CreateEPaM(aPaM), rStr)); @@ -3436,7 +3436,7 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( uno::Reference< datatransfer::XTransferable > xDataObj; xDataObj = pDataObj; - XubString aText(convertLineEnd(GetSelected(aSelection), GetSystemLineEnd())); // System specific + OUString aText(convertLineEnd(GetSelected(aSelection), GetSystemLineEnd())); // System specific pDataObj->GetString() = aText; SvxFontItem::EnableStoreUnicodeNames( sal_True ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 004bdcb2b97c..734a83c83ae9 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1662,7 +1662,7 @@ void ImpEditEngine::ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, { // empty paragraph found that needs to have language and font set? if (bAllowImplicitChangesForNotConvertibleText && - !pEditEngine->GetText( pConvInfo->aConvContinue.nPara ).Len()) + pEditEngine->GetText( pConvInfo->aConvContinue.nPara ).isEmpty()) { sal_Int32 nPara = pConvInfo->aConvContinue.nPara; ESelection aESel( nPara, 0, nPara, 0 ); @@ -2662,11 +2662,11 @@ sal_Bool ImpEditEngine::HasText( const SvxSearchItem& rSearchItem ) return ImpSearch( aTmpItem, aDummySel, aStartPaM, aFoundSel ); } -void ImpEditEngine::SetAutoCompleteText( const String& rStr, sal_Bool bClearTipWindow ) +void ImpEditEngine::SetAutoCompleteText(const OUString& rStr, bool bClearTipWindow) { aAutoCompleteText = rStr; if ( bClearTipWindow && pActiveView ) - Help::ShowQuickHelp( pActiveView->GetWindow(), Rectangle(), String(), 0 ); + Help::ShowQuickHelp( pActiveView->GetWindow(), Rectangle(), OUString(), 0 ); } namespace diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index e52813e62809..571cc817414c 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -72,11 +72,11 @@ void ImpEditEngine::SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle ) { if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() ) { - XubString aPrevStyleName; + OUString aPrevStyleName; if ( pCurStyle ) aPrevStyleName = pCurStyle->GetName(); - XubString aNewStyleName; + OUString aNewStyleName; if ( pStyle ) aNewStyleName = pStyle->GetName(); diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 47bb613eb5f9..b086d0c1fcd4 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -613,7 +613,7 @@ Color SvxBorderLine::GetColorGap( ) const // ----------------------------------------------------------------------- -XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, +OUString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper* pIntl, sal_Bool bMetricStr) const diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index e76869e9575f..074df55db354 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -368,7 +368,7 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c //------------------------------------------------------------------------ -XubString SvxBulletItem::GetFullText() const +OUString SvxBulletItem::GetFullText() const { XubString aStr( aPrevText ); aStr += cSymbol; -- cgit