Kaydet (Commit) 86b9e14b authored tarafından Ivan Timofeev's avatar Ivan Timofeev

String -> OUString

Change-Id: I88873eec738a068152e7d7be0dc4ab86fcfe345a
üst 939d6400
...@@ -113,7 +113,7 @@ public: ...@@ -113,7 +113,7 @@ public:
void Paste(); void Paste();
void Delete(); void Delete();
void SelectAll(); void SelectAll();
void InsertText(const String &rText); void InsertText(const OUString &rText);
void InsertCommand(sal_uInt16 nCommand); void InsertCommand(sal_uInt16 nCommand);
void MarkError(const Point &rPos); void MarkError(const Point &rPos);
void SelNextMark(); void SelNextMark();
......
...@@ -484,7 +484,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList, ...@@ -484,7 +484,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList,
} }
//If we need to save the selected text //If we need to save the selected text
if(pSelectedNodes && len2 > 0) { if(pSelectedNodes && len2 > 0) {
String str = aText.copy(start2, len2); OUString str = aText.copy(start2, len2);
SmTextNode* pSeg2 = new SmTextNode(aToken, eFontDesc); SmTextNode* pSeg2 = new SmTextNode(aToken, eFontDesc);
pSeg2->ChangeText(str); pSeg2->ChangeText(str);
pSelectedNodes->push_back(pSeg2); pSelectedNodes->push_back(pSeg2);
......
...@@ -912,12 +912,12 @@ void SmEditWindow::Delete() ...@@ -912,12 +912,12 @@ void SmEditWindow::Delete()
} }
} }
void SmEditWindow::InsertText(const String& Text) void SmEditWindow::InsertText(const OUString& rText)
{ {
OSL_ENSURE( pEditView, "EditView missing" ); OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView) if (pEditView)
{ {
pEditView->InsertText(Text); pEditView->InsertText(rText);
aModifyTimer.Start(); aModifyTimer.Start();
StartCursorMove(); StartCursorMove();
} }
......
...@@ -1466,8 +1466,6 @@ bool SmViewShell::Insert( SfxMedium& rMedium ) ...@@ -1466,8 +1466,6 @@ bool SmViewShell::Insert( SfxMedium& rMedium )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Insert" ); RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Insert" );
SmDocShell *pDoc = GetDoc(); SmDocShell *pDoc = GetDoc();
String aText( pDoc->GetText() );
String aTemp = aText;
bool bRet = false; bool bRet = false;
uno::Reference < embed::XStorage > xStorage = rMedium.GetStorage(); uno::Reference < embed::XStorage > xStorage = rMedium.GetStorage();
...@@ -1485,15 +1483,13 @@ bool SmViewShell::Insert( SfxMedium& rMedium ) ...@@ -1485,15 +1483,13 @@ bool SmViewShell::Insert( SfxMedium& rMedium )
if( bRet ) if( bRet )
{ {
aText = pDoc->GetText(); OUString aText = pDoc->GetText();
SmEditWindow *pEditWin = GetEditWindow(); SmEditWindow *pEditWin = GetEditWindow();
if (pEditWin) if (pEditWin)
pEditWin->InsertText( aText ); pEditWin->InsertText( aText );
else else
{ {
OSL_FAIL( "EditWindow missing" ); OSL_FAIL( "EditWindow missing" );
aTemp += aText;
aText = aTemp;
} }
pDoc->Parse(); pDoc->Parse();
...@@ -1514,8 +1510,6 @@ bool SmViewShell::InsertFrom(SfxMedium &rMedium) ...@@ -1514,8 +1510,6 @@ bool SmViewShell::InsertFrom(SfxMedium &rMedium)
bool bSuccess = false; bool bSuccess = false;
SmDocShell *pDoc = GetDoc(); SmDocShell *pDoc = GetDoc();
SvStream *pStream = rMedium.GetInStream(); SvStream *pStream = rMedium.GetInStream();
String aText( pDoc->GetText() );
String aTemp = aText;
if (pStream) if (pStream)
{ {
...@@ -1530,15 +1524,13 @@ bool SmViewShell::InsertFrom(SfxMedium &rMedium) ...@@ -1530,15 +1524,13 @@ bool SmViewShell::InsertFrom(SfxMedium &rMedium)
if( bSuccess ) if( bSuccess )
{ {
aText = pDoc->GetText(); OUString aText = pDoc->GetText();
SmEditWindow *pEditWin = GetEditWindow(); SmEditWindow *pEditWin = GetEditWindow();
if (pEditWin) if (pEditWin)
pEditWin->InsertText( aText ); pEditWin->InsertText( aText );
else else
{ {
OSL_FAIL( "EditWindow missing" ); OSL_FAIL( "EditWindow missing" );
aTemp += aText;
aText = aTemp;
} }
pDoc->Parse(); pDoc->Parse();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment