From d5e11f5ffb741aabe7e43be78ef764a1f3cafd8e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 10 Sep 2013 09:34:08 +0200 Subject: convert editeng/source/editeng/editundo.hxx from String to OUString Change-Id: Ie00d45230491776c441efd4f2c464a002129db43 --- editeng/source/editeng/editundo.cxx | 22 +++++++++++----------- editeng/source/editeng/editundo.hxx | 26 +++++++++++++------------- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'editeng') diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index 1ce72741152b..02989df3d732 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -256,9 +256,9 @@ void EditUndoConnectParas::Undo() if (GetEditEngine()->GetStyleSheetPool()) { - if ( aLeftStyleName.Len() ) + if ( !aLeftStyleName.isEmpty() ) GetEditEngine()->SetStyleSheet( nNode, (SfxStyleSheet*)GetEditEngine()->GetStyleSheetPool()->Find( aLeftStyleName, eLeftStyleFamily ) ); - if ( aRightStyleName.Len() ) + if ( !aRightStyleName.isEmpty() ) GetEditEngine()->SetStyleSheet( nNode+1, (SfxStyleSheet*)GetEditEngine()->GetStyleSheetPool()->Find( aRightStyleName, eRightStyleFamily ) ); } @@ -295,7 +295,7 @@ void EditUndoSplitPara::Redo() } EditUndoInsertChars::EditUndoInsertChars( - EditEngine* pEE, const EPaM& rEPaM, const String& rStr) : + EditEngine* pEE, const EPaM& rEPaM, const OUString& rStr) : EditUndo(EDITUNDO_INSERTCHARS, pEE), aEPaM(rEPaM), aText(rStr) {} @@ -305,7 +305,7 @@ void EditUndoInsertChars::Undo() DBG_ASSERT( GetEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" ); EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM); EditSelection aSel( aPaM, aPaM ); - aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.Len(); + aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.getLength(); EditPaM aNewPaM( GetEditEngine()->DeleteSelection(aSel) ); GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aNewPaM, aNewPaM ) ); } @@ -316,7 +316,7 @@ void EditUndoInsertChars::Redo() EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM); GetEditEngine()->InsertText(EditSelection(aPaM, aPaM), aText); EditPaM aNewPaM( aPaM ); - aNewPaM.GetIndex() = aNewPaM.GetIndex() + aText.Len(); + aNewPaM.GetIndex() = aNewPaM.GetIndex() + aText.getLength(); GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aNewPaM ) ); } @@ -329,7 +329,7 @@ bool EditUndoInsertChars::Merge( SfxUndoAction* pNextAction ) if ( aEPaM.nPara != pNext->aEPaM.nPara ) return false; - if ( ( aEPaM.nIndex + aText.Len() ) == pNext->aEPaM.nIndex ) + if ( ( aEPaM.nIndex + aText.getLength() ) == pNext->aEPaM.nIndex ) { aText += pNext->aText; return true; @@ -338,7 +338,7 @@ bool EditUndoInsertChars::Merge( SfxUndoAction* pNextAction ) } EditUndoRemoveChars::EditUndoRemoveChars( - EditEngine* pEE, const EPaM& rEPaM, const String& rStr) : + EditEngine* pEE, const EPaM& rEPaM, const OUString& rStr) : EditUndo(EDITUNDO_REMOVECHARS, pEE), aEPaM(rEPaM), aText(rStr) {} @@ -348,7 +348,7 @@ void EditUndoRemoveChars::Undo() EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM); EditSelection aSel( aPaM, aPaM ); GetEditEngine()->InsertText(aSel, aText); - aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.Len(); + aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.getLength(); GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aSel); } @@ -357,7 +357,7 @@ void EditUndoRemoveChars::Redo() DBG_ASSERT( GetEditEngine()->GetActiveView(), "Undo/Redo: No Active View!" ); EditPaM aPaM = GetEditEngine()->CreateEditPaM(aEPaM); EditSelection aSel( aPaM, aPaM ); - aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.Len(); + aSel.Max().GetIndex() = aSel.Max().GetIndex() + aText.getLength(); EditPaM aNewPaM = GetEditEngine()->DeleteSelection(aSel); GetEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection(aNewPaM); } @@ -436,8 +436,8 @@ void EditUndoMoveParagraphs::Redo() } EditUndoSetStyleSheet::EditUndoSetStyleSheet( - EditEngine* pEE, sal_Int32 nP, const String& rPrevName, SfxStyleFamily ePrevFam, - const String& rNewName, SfxStyleFamily eNewFam, const SfxItemSet& rPrevParaAttribs) : + EditEngine* pEE, sal_Int32 nP, const OUString& rPrevName, SfxStyleFamily ePrevFam, + const OUString& rNewName, SfxStyleFamily eNewFam, const SfxItemSet& rPrevParaAttribs) : EditUndo(EDITUNDO_STYLESHEET, pEE), aPrevName(rPrevName), aNewName(rNewName), diff --git a/editeng/source/editeng/editundo.hxx b/editeng/source/editeng/editundo.hxx index 7f7d4e3114f7..834280bfb984 100644 --- a/editeng/source/editeng/editundo.hxx +++ b/editeng/source/editeng/editundo.hxx @@ -58,8 +58,8 @@ private: SfxItemSet aRightParaAttribs; // 2 Pointers would be nicer but then it would have to be a SfxListener. - String aLeftStyleName; - String aRightStyleName; + OUString aLeftStyleName; + OUString aRightStyleName; SfxStyleFamily eLeftStyleFamily; SfxStyleFamily eRightStyleFamily; @@ -99,13 +99,13 @@ class EditUndoInsertChars : public EditUndo { private: EPaM aEPaM; - String aText; + OUString aText; public: - EditUndoInsertChars(EditEngine* pEE, const EPaM& rEPaM, const String& rStr); + EditUndoInsertChars(EditEngine* pEE, const EPaM& rEPaM, const OUString& rStr); const EPaM& GetEPaM() { return aEPaM; } - String& GetStr() { return aText; } + OUString GetStr() const { return aText; } virtual void Undo(); virtual void Redo(); @@ -120,13 +120,13 @@ class EditUndoRemoveChars : public EditUndo { private: EPaM aEPaM; - String aText; + OUString aText; public: - EditUndoRemoveChars(EditEngine* pEE, const EPaM& rEPaM, const String& rStr); + EditUndoRemoveChars(EditEngine* pEE, const EPaM& rEPaM, const OUString& rStr); const EPaM& GetEPaM() { return aEPaM; } - String& GetStr() { return aText; } + OUString GetStr() const { return aText; } virtual void Undo(); virtual void Redo(); @@ -173,16 +173,16 @@ class EditUndoSetStyleSheet: public EditUndo { private: sal_Int32 nPara; - String aPrevName; - String aNewName; + OUString aPrevName; + OUString aNewName; SfxStyleFamily ePrevFamily; SfxStyleFamily eNewFamily; SfxItemSet aPrevParaAttribs; public: EditUndoSetStyleSheet(EditEngine* pEE, sal_Int32 nPara, - const String& rPrevName, SfxStyleFamily ePrevFamily, - const String& rNewName, SfxStyleFamily eNewFamily, + const OUString& rPrevName, SfxStyleFamily ePrevFamily, + const OUString& rNewName, SfxStyleFamily eNewFamily, const SfxItemSet& rPrevParaAttribs); virtual ~EditUndoSetStyleSheet(); @@ -256,7 +256,7 @@ private: sal_Int32 nMode; EditTextObject* pTxtObj; - String aText; + OUString aText; public: EditUndoTransliteration(EditEngine* pEE, const ESelection& rESel, sal_Int32 nMode); -- cgit