diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-10-02 16:59:26 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-10-02 20:54:08 +0400 |
commit | 86b9e14bc8fed823ae39ebc5fee62e98c524d3fe (patch) | |
tree | 3fe675dfad207b263b5d2b1a22373dc1ee5d5820 /starmath | |
parent | 939d6400401d01658d173b67d17b2051c3468bb6 (diff) |
String -> OUString
Change-Id: I88873eec738a068152e7d7be0dc4ab86fcfe345a
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/edit.hxx | 2 | ||||
-rw-r--r-- | starmath/source/cursor.cxx | 2 | ||||
-rw-r--r-- | starmath/source/edit.cxx | 4 | ||||
-rw-r--r-- | starmath/source/view.cxx | 12 |
4 files changed, 6 insertions, 14 deletions
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 67e657491e49..be7b52d8c397 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -113,7 +113,7 @@ public: void Paste(); void Delete(); void SelectAll(); - void InsertText(const String &rText); + void InsertText(const OUString &rText); void InsertCommand(sal_uInt16 nCommand); void MarkError(const Point &rPos); void SelNextMark(); diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index c3514ad6e873..8ba0529bf2cf 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -484,7 +484,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList, } //If we need to save the selected text if(pSelectedNodes && len2 > 0) { - String str = aText.copy(start2, len2); + OUString str = aText.copy(start2, len2); SmTextNode* pSeg2 = new SmTextNode(aToken, eFontDesc); pSeg2->ChangeText(str); pSelectedNodes->push_back(pSeg2); diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 1c0510ab98d1..b6d83e0f6e9f 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -912,12 +912,12 @@ void SmEditWindow::Delete() } } -void SmEditWindow::InsertText(const String& Text) +void SmEditWindow::InsertText(const OUString& rText) { OSL_ENSURE( pEditView, "EditView missing" ); if (pEditView) { - pEditView->InsertText(Text); + pEditView->InsertText(rText); aModifyTimer.Start(); StartCursorMove(); } diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 5707439852fe..2f7e0a7a4baf 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1466,8 +1466,6 @@ bool SmViewShell::Insert( SfxMedium& rMedium ) RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Insert" ); SmDocShell *pDoc = GetDoc(); - String aText( pDoc->GetText() ); - String aTemp = aText; bool bRet = false; uno::Reference < embed::XStorage > xStorage = rMedium.GetStorage(); @@ -1485,15 +1483,13 @@ bool SmViewShell::Insert( SfxMedium& rMedium ) if( bRet ) { - aText = pDoc->GetText(); + OUString aText = pDoc->GetText(); SmEditWindow *pEditWin = GetEditWindow(); if (pEditWin) pEditWin->InsertText( aText ); else { OSL_FAIL( "EditWindow missing" ); - aTemp += aText; - aText = aTemp; } pDoc->Parse(); @@ -1514,8 +1510,6 @@ bool SmViewShell::InsertFrom(SfxMedium &rMedium) bool bSuccess = false; SmDocShell *pDoc = GetDoc(); SvStream *pStream = rMedium.GetInStream(); - String aText( pDoc->GetText() ); - String aTemp = aText; if (pStream) { @@ -1530,15 +1524,13 @@ bool SmViewShell::InsertFrom(SfxMedium &rMedium) if( bSuccess ) { - aText = pDoc->GetText(); + OUString aText = pDoc->GetText(); SmEditWindow *pEditWin = GetEditWindow(); if (pEditWin) pEditWin->InsertText( aText ); else { OSL_FAIL( "EditWindow missing" ); - aTemp += aText; - aText = aTemp; } pDoc->Parse(); |