diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-09-03 18:29:30 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-04 09:57:11 +0000 |
commit | 9a0d753b84aed53083bed3ed460308b771f432a8 (patch) | |
tree | c4c27c8f8eb8c1a08df3f6e87e230918a1784eb1 | |
parent | Replace XROW_GETXXX macro with template (diff) | |
download | core-9a0d753b84aed53083bed3ed460308b771f432a8.tar.gz core-9a0d753b84aed53083bed3ed460308b771f432a8.zip |
String to OUString
Change-Id: I8c51db8fce8c5eea1ac7bd5751aa7f3212ef1166
Reviewed-on: https://gerrit.libreoffice.org/5790
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
36 files changed, 189 insertions, 193 deletions
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index b64c65c53da3..0dcef66ce70f 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -192,7 +192,7 @@ void SAL_CALL ChartController::executeDispatch_InsertSpecialCharacter() // delete current selection by inserting empty String, so current // attributes become unique (sel. has to be erased anyway) - pOutlinerView->InsertText(String()); + pOutlinerView->InsertText(OUString()); pOutlinerView->InsertText(aString, true); diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index e3309d407d1a..e8b30c672c28 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -858,7 +858,7 @@ EditPaM EditEngine::InsertField(const EditSelection& rEditSelection, const SvxFi return pImpEditEngine->InsertField(rEditSelection, rFld); } -EditPaM EditEngine::InsertText(const EditSelection& aCurEditSelection, const String& rStr) +EditPaM EditEngine::InsertText(const EditSelection& aCurEditSelection, const OUString& rStr) { return pImpEditEngine->InsertText(aCurEditSelection, rStr); } @@ -870,7 +870,7 @@ EditSelection EditEngine::InsertText(const EditTextObject& rTextObject, const Ed EditSelection EditEngine::InsertText( uno::Reference<datatransfer::XTransferable >& rxDataObj, - const String& rBaseURL, const EditPaM& rPaM, bool bUseSpecial) + const OUString& rBaseURL, const EditPaM& rPaM, bool bUseSpecial) { return pImpEditEngine->InsertText(rxDataObj, rBaseURL, rPaM, bUseSpecial); } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 34075afb389f..9e43df306544 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -526,7 +526,7 @@ private: EditTextObject* CreateTextObject( EditSelection aSelection, SfxItemPool*, sal_Bool bAllowBigObjects = sal_False, sal_uInt16 nBigObjStart = 0 ); EditSelection InsertTextObject( const EditTextObject&, EditPaM aPaM ); - EditSelection InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial ); + EditSelection InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxDataObj, const OUString& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial ); EditPaM Clear(); EditPaM RemoveText(); @@ -548,7 +548,7 @@ private: EditPaM ImpDeleteSelection(const EditSelection& rCurSel); EditPaM ImpInsertParaBreak( EditPaM& rPaM, bool bKeepEndingAttribs = true ); EditPaM ImpInsertParaBreak( const EditSelection& rEditSelection, bool bKeepEndingAttribs = true ); - EditPaM ImpInsertText(const EditSelection& aCurEditSelection, const String& rStr); + EditPaM ImpInsertText(const EditSelection& aCurEditSelection, const OUString& rStr); EditPaM ImpInsertFeature(const EditSelection& rCurSel, const SfxPoolItem& rItem); void ImpRemoveChars( const EditPaM& rPaM, sal_uInt16 nChars, EditUndoRemoveChars* pCurUndo = 0 ); void ImpRemoveParagraph( sal_Int32 nPara ); @@ -758,7 +758,7 @@ public: 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); + EditPaM InsertText(const EditSelection& aCurEditSelection, const OUString& rStr); EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, Window* pFrameWin = NULL ); EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, sal_uInt8 nMode, sal_uInt8 nDelMode = DELMODE_SIMPLE ); EditPaM InsertParaBreak( EditSelection aEditSelection ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 045835a242ae..b9d3103d9fd2 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -600,7 +600,7 @@ sal_Bool ImpEditEngine::MouseMove( const MouseEvent& rMEvt, EditView* pView ) return sal_True; } -EditPaM ImpEditEngine::InsertText(const EditSelection& aSel, const String& rStr) +EditPaM ImpEditEngine::InsertText(const EditSelection& aSel, const OUString& rStr) { EditPaM aPaM = ImpInsertText( aSel, rStr ); return aPaM; @@ -2640,7 +2640,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, return aPaM; } -EditPaM ImpEditEngine::ImpInsertText(const EditSelection& aCurSel, const String& rStr) +EditPaM ImpEditEngine::ImpInsertText(const EditSelection& aCurSel, const OUString& rStr) { UndoActionStart( EDITUNDO_INSERT ); @@ -3470,7 +3470,7 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( return xDataObj; } -EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial ) +EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransferable >& rxDataObj, const OUString& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial ) { EditSelection aNewSelection( rPaM ); diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 8a1d71be40fb..9369d5633535 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -455,7 +455,7 @@ sal_uInt16 SvxAccessibleTextAdapter::GetTextLen( sal_Int32 nParagraph ) const return static_cast< sal_uInt16 >(aIndex.GetIndex()); } -String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const +OUString SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -601,7 +601,7 @@ sal_uInt16 SvxAccessibleTextAdapter::GetItemState( sal_Int32 nPara, sal_uInt16 n return mrTextForwarder->GetItemState( nPara, nWhich ); } -void SvxAccessibleTextAdapter::QuickInsertText( const String& rText, const ESelection& rSel ) +void SvxAccessibleTextAdapter::QuickInsertText( const OUString& rText, const ESelection& rSel ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1063,7 +1063,7 @@ sal_Bool SvxAccessibleTextAdapter::Delete( const ESelection& rSel ) return mrTextForwarder->Delete( MakeEESelection(aStartIndex, aEndIndex ) ); } -sal_Bool SvxAccessibleTextAdapter::InsertText( const String& rStr, const ESelection& rSel ) +sal_Bool SvxAccessibleTextAdapter::InsertText( const OUString& rStr, const ESelection& rSel ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1169,7 +1169,7 @@ void SvxAccessibleTextAdapter::AppendParagraph() OSL_FAIL( "not implemented" ); } -xub_StrLen SvxAccessibleTextAdapter::AppendTextPortion( sal_Int32, const String &, const SfxItemSet & ) +sal_uInt16 SvxAccessibleTextAdapter::AppendTextPortion( sal_Int32, const OUString &, const SfxItemSet & ) { OSL_FAIL( "not implemented" ); return 0; diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index ed926dc8381d..57d77fbe2836 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -56,7 +56,7 @@ sal_uInt16 SvxEditEngineForwarder::GetTextLen( sal_Int32 nParagraph ) const return rEditEngine.GetTextLen( nParagraph ); } -String SvxEditEngineForwarder::GetText( const ESelection& rSel ) const +OUString SvxEditEngineForwarder::GetText( const ESelection& rSel ) const { return convertLineEnd(rEditEngine.GetText(rSel, LINEEND_LF), GetSystemLineEnd()); } @@ -127,7 +127,7 @@ void SvxEditEngineForwarder::GetPortions( sal_Int32 nPara, std::vector<sal_uInt1 rEditEngine.GetPortions( nPara, rList ); } -void SvxEditEngineForwarder::QuickInsertText( const String& rText, const ESelection& rSel ) +void SvxEditEngineForwarder::QuickInsertText( const OUString& rText, const ESelection& rSel ) { rEditEngine.QuickInsertText( rText, rSel ); } @@ -447,7 +447,7 @@ sal_Bool SvxEditEngineForwarder::Delete( const ESelection& rSelection ) return sal_True; } -sal_Bool SvxEditEngineForwarder::InsertText( const String& rStr, const ESelection& rSelection ) +sal_Bool SvxEditEngineForwarder::InsertText( const OUString& rStr, const ESelection& rSelection ) { rEditEngine.QuickInsertText( rStr, rSelection ); rEditEngine.QuickFormatDoc(); @@ -477,9 +477,9 @@ void SvxEditEngineForwarder::AppendParagraph() rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() ); } -xub_StrLen SvxEditEngineForwarder::AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet & /*rSet*/ ) +sal_uInt16 SvxEditEngineForwarder::AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet & /*rSet*/ ) { - xub_StrLen nLen = 0; + sal_uInt16 nLen = 0; sal_Int32 nParaCount = rEditEngine.GetParagraphCount(); DBG_ASSERT( nPara < nParaCount, "paragraph index out of bounds" ); diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index 669cd20fcd6b..d07c68a97a3a 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -63,7 +63,7 @@ sal_uInt16 SvxOutlinerForwarder::GetTextLen( sal_Int32 nParagraph ) const return rOutliner.GetEditEngine().GetTextLen( nParagraph ); } -String SvxOutlinerForwarder::GetText( const ESelection& rSel ) const +OUString SvxOutlinerForwarder::GetText( const ESelection& rSel ) const { //! GetText (ESelection) should probably also be in the Outliner // in the time beeing use as the hack for the EditEngine: @@ -195,10 +195,10 @@ void SvxOutlinerForwarder::GetPortions( sal_Int32 nPara, std::vector<sal_uInt16> ((EditEngine&)rOutliner.GetEditEngine()).GetPortions( nPara, rList ); } -void SvxOutlinerForwarder::QuickInsertText( const String& rText, const ESelection& rSel ) +void SvxOutlinerForwarder::QuickInsertText( const OUString& rText, const ESelection& rSel ) { flushCache(); - if( rText.Len() == 0 ) + if( rText.isEmpty() ) { rOutliner.QuickDelete( rSel ); } @@ -444,7 +444,7 @@ sal_Bool SvxOutlinerForwarder::Delete( const ESelection& rSelection ) return sal_True; } -sal_Bool SvxOutlinerForwarder::InsertText( const String& rStr, const ESelection& rSelection ) +sal_Bool SvxOutlinerForwarder::InsertText( const OUString& rStr, const ESelection& rSelection ) { flushCache(); rOutliner.QuickInsertText( rStr, rSelection ); @@ -551,9 +551,9 @@ void SvxOutlinerForwarder::AppendParagraph() rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() ); } -xub_StrLen SvxOutlinerForwarder::AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet & /*rSet*/ ) +sal_uInt16 SvxOutlinerForwarder::AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet & /*rSet*/ ) { - xub_StrLen nLen = 0; + sal_uInt16 nLen = 0; EditEngine& rEditEngine = const_cast< EditEngine& >( rOutliner.GetEditEngine() ); sal_Int32 nParaCount = rEditEngine.GetParagraphCount(); diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 9299b6d30fce..f04fa5565b3e 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -2208,7 +2208,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion( DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" ); sal_Int32 nPara = nParaCount - 1; SfxItemSet aSet( pTextForwarder->GetParaAttribs( nPara ) ); - xub_StrLen nStart = pTextForwarder->AppendTextPortion( nPara, rText, aSet ); + sal_uInt16 nStart = pTextForwarder->AppendTextPortion( nPara, rText, aSet ); pEditSource->UpdateData(); xub_StrLen nEnd = pTextForwarder->GetTextLen( nPara ); @@ -2441,9 +2441,9 @@ sal_uInt16 SvxDummyTextSource::GetTextLen( sal_Int32 ) const return 0; } -String SvxDummyTextSource::GetText( const ESelection& ) const +OUString SvxDummyTextSource::GetText( const ESelection& ) const { - return String(); + return OUString(); } SfxItemSet SvxDummyTextSource::GetAttribs( const ESelection&, sal_Bool ) const @@ -2486,7 +2486,7 @@ SfxItemPool* SvxDummyTextSource::GetPool() const return NULL; } -void SvxDummyTextSource::QuickInsertText( const String&, const ESelection& ) +void SvxDummyTextSource::QuickInsertText( const OUString&, const ESelection& ) { } @@ -2615,7 +2615,7 @@ sal_Bool SvxDummyTextSource::Delete( const ESelection& ) return sal_False; } -sal_Bool SvxDummyTextSource::InsertText( const String&, const ESelection& ) +sal_Bool SvxDummyTextSource::InsertText( const OUString&, const ESelection& ) { return sal_False; } @@ -2629,7 +2629,7 @@ void SvxDummyTextSource::AppendParagraph() { } -xub_StrLen SvxDummyTextSource::AppendTextPortion( sal_Int32, const String &, const SfxItemSet & ) +sal_uInt16 SvxDummyTextSource::AppendTextPortion( sal_Int32, const OUString &, const SfxItemSet & ) { return 0; } diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index c7debc470e4a..bcad84dcf3e9 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -150,7 +150,7 @@ private: EDITENG_DLLPRIVATE EditSelection InsertText( com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable >& rxDataObj, - const String& rBaseURL, const EditPaM& rPaM, bool bUseSpecial); + const OUString& rBaseURL, const EditPaM& rPaM, bool bUseSpecial); EDITENG_DLLPRIVATE EditPaM EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES); @@ -531,7 +531,7 @@ public: ContentNode* pLeft, ContentNode* pRight, bool bBackward = false); EditPaM InsertField(const EditSelection& rEditSelection, const SvxFieldItem& rFld); - EditPaM InsertText(const EditSelection& aCurEditSelection, const String& rStr); + EditPaM InsertText(const EditSelection& aCurEditSelection, const OUString& rStr); EditSelection InsertText(const EditTextObject& rTextObject, const EditSelection& rSel); EditPaM InsertParaBreak( const EditSelection& rEditSelection, bool bKeepEndingAttribs = true); diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx index c41f54b6e0e2..17b8df88c8bd 100644 --- a/include/editeng/unoedprx.hxx +++ b/include/editeng/unoedprx.hxx @@ -35,7 +35,7 @@ public: virtual sal_Int32 GetParagraphCount() const; virtual sal_uInt16 GetTextLen( sal_Int32 nParagraph ) const; - virtual String GetText( const ESelection& rSel ) const; + virtual OUString GetText( const ESelection& rSel ) const; virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); @@ -47,7 +47,7 @@ public: virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; virtual sal_uInt16 GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const; - virtual void QuickInsertText( const String& rText, const ESelection& rSel ); + virtual void QuickInsertText( const OUString& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); virtual void QuickInsertLineBreak( const ESelection& rSel ); @@ -76,7 +76,7 @@ public: virtual sal_uInt16 GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const String&, const ESelection& ); + virtual sal_Bool InsertText( const OUString&, const ESelection& ); virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); @@ -86,7 +86,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend // (not needed for accessibility, only for new import API) virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet ); + virtual sal_uInt16 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); diff --git a/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx index 07c7567590b6..8c703fef0ff3 100644 --- a/include/editeng/unoedsrc.hxx +++ b/include/editeng/unoedsrc.hxx @@ -142,7 +142,7 @@ public: virtual sal_Int32 GetParagraphCount() const = 0; virtual sal_uInt16 GetTextLen( sal_Int32 nParagraph ) const = 0; - virtual String GetText( const ESelection& rSel ) const = 0; + virtual OUString GetText( const ESelection& rSel ) const = 0; virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const = 0; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const = 0; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) = 0; @@ -152,7 +152,7 @@ public: virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0; virtual sal_uInt16 GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const = 0; - virtual void QuickInsertText( const String& rText, const ESelection& rSel ) = 0; + virtual void QuickInsertText( const OUString& rText, const ESelection& rSel ) = 0; virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) = 0; virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) = 0; virtual void QuickInsertLineBreak( const ESelection& rSel ) = 0; @@ -166,7 +166,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph() = 0; - virtual xub_StrLen AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet ) = 0; + virtual sal_uInt16 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ) = 0; // XTextCopy virtual void CopyText(const SvxTextForwarder& rSource) = 0; @@ -394,7 +394,7 @@ public: @return sal_True if text has been successfully inserted */ - virtual sal_Bool InsertText( const String& rText, const ESelection& rSel ) = 0; + virtual sal_Bool InsertText( const OUString& rText, const ESelection& rSel ) = 0; /** Updates the formatting diff --git a/include/editeng/unofored.hxx b/include/editeng/unofored.hxx index 6a7d7bf111b2..a80a5683e157 100644 --- a/include/editeng/unofored.hxx +++ b/include/editeng/unofored.hxx @@ -37,7 +37,7 @@ public: virtual sal_Int32 GetParagraphCount() const; virtual sal_uInt16 GetTextLen( sal_Int32 nParagraph ) const; - virtual String GetText( const ESelection& rSel ) const; + virtual OUString GetText( const ESelection& rSel ) const; virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); @@ -47,7 +47,7 @@ public: virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; virtual sal_uInt16 GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const; - virtual void QuickInsertText( const String& rText, const ESelection& rSel ); + virtual void QuickInsertText( const OUString& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); virtual void QuickInsertLineBreak( const ESelection& rSel ); @@ -74,7 +74,7 @@ public: virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nParagraph, sal_uInt16 nLine ) const; virtual sal_uInt16 GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const String&, const ESelection& ); + virtual sal_Bool InsertText( const OUString&, const ESelection& ); virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); @@ -83,7 +83,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet ); + virtual sal_uInt16 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/include/editeng/unoforou.hxx b/include/editeng/unoforou.hxx index 7b88da3455db..a8b1057cea1a 100644 --- a/include/editeng/unoforou.hxx +++ b/include/editeng/unoforou.hxx @@ -55,7 +55,7 @@ public: virtual sal_Int32 GetParagraphCount() const; virtual sal_uInt16 GetTextLen( sal_Int32 nParagraph ) const; - virtual String GetText( const ESelection& rSel ) const; + virtual OUString GetText( const ESelection& rSel ) const; virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); @@ -65,7 +65,7 @@ public: virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; virtual sal_uInt16 GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const; - virtual void QuickInsertText( const String& rText, const ESelection& rSel ); + virtual void QuickInsertText( const OUString& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); virtual void QuickInsertLineBreak( const ESelection& rSel ); @@ -95,7 +95,7 @@ public: virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nPara, sal_uInt16 nLine ) const; virtual sal_uInt16 GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const String&, const ESelection& ); + virtual sal_Bool InsertText( const OUString&, const ESelection& ); virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); @@ -112,7 +112,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet ); + virtual sal_uInt16 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx index 394079ca573d..dd56df80641d 100644 --- a/include/editeng/unotext.hxx +++ b/include/editeng/unotext.hxx @@ -181,7 +181,7 @@ public: // SvxTextForwarder virtual sal_Int32 GetParagraphCount() const; virtual sal_uInt16 GetTextLen( sal_Int32 nParagraph ) const; - virtual String GetText( const ESelection& rSel ) const; + virtual OUString GetText( const ESelection& rSel ) const; virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); @@ -193,7 +193,7 @@ public: virtual SfxItemPool* GetPool() const; - virtual void QuickInsertText( const String& rText, const ESelection& rSel ); + virtual void QuickInsertText( const OUString& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); virtual void QuickInsertLineBreak( const ESelection& rSel ); @@ -220,7 +220,7 @@ public: virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nParagraph, sal_uInt16 nLine ) const; virtual sal_uInt16 GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const String&, const ESelection& ); + virtual sal_Bool InsertText( const OUString&, const ESelection& ); virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); @@ -229,7 +229,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet ); + virtual sal_uInt16 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index abbbc2a25bf2..b9a52fce836d 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -1203,7 +1203,7 @@ void ScEditFieldObj::DeleteField() if (mpEditSource) { SvxTextForwarder* pForwarder = mpEditSource->GetTextForwarder(); - pForwarder->QuickInsertText( String(), aSelection ); + pForwarder->QuickInsertText( OUString(), aSelection ); mpEditSource->UpdateData(); aSelection.nEndPara = aSelection.nStartPara; diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 821937e935dd..c19bd04d8a5f 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -104,7 +104,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, // same method now for clipboard or drag&drop // mba: clipboard always must contain absolute URLs (could be from alien source) - aEditView.InsertText( rxTransferable, String(), sal_True ); + aEditView.InsertText( rxTransferable, OUString(), sal_True ); } sal_Int32 nParCnt = pEngine->GetParagraphCount(); diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 4446ad0d86fd..778171927b50 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -130,7 +130,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener sal_Int32 nFileFormat, sal_Bool bTemplate = sal_False ) const; - virtual sal_Bool SetData( const String& rData ); + virtual sal_Bool SetData( const OUString& rData ); virtual sal_uLong GetMiscStatus() const; virtual void OnDocumentPrinterChanged( Printer * ); virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); @@ -179,7 +179,7 @@ public: SfxPrinter *GetPrinter() { GetPrt(); return pPrinter; } void SetPrinter( SfxPrinter * ); - const String GetComment() const; + const OUString GetComment() const; // to replace chars that can not be saved with the document... sal_Bool ReplaceBadChars(); diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx index 394f7fb9926e..378cc3de9e85 100644 --- a/starmath/inc/format.hxx +++ b/starmath/inc/format.hxx @@ -90,7 +90,7 @@ enum SmHorAlign { AlignLeft, AlignCenter, AlignRight }; -String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent ); +OUString GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent ); class SmFormat : public SfxBroadcaster { diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx index 163009904136..e5cc5a4b55bc 100644 --- a/starmath/inc/parse.hxx +++ b/starmath/inc/parse.hxx @@ -19,9 +19,7 @@ #ifndef PARSE_HXX #define PARSE_HXX - #include <vcl/svapp.hxx> -#include <tools/string.hxx> #include <set> #include <stack> diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index f05c6a52e5c3..637600a08212 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -98,13 +98,13 @@ public: const ResStringArray& GetUiSymbolNamesArray() const { return aUiSymbolNamesAry; } const ResStringArray& GetExportSymbolNamesArray() const { return aExportSymbolNamesAry; } - const String GetUiSymbolName( const String &rExportName ) const; - const String GetExportSymbolName( const String &rUiName ) const; + const OUString GetUiSymbolName( const OUString &rExportName ) const; + const OUString GetExportSymbolName( const OUString &rUiName ) const; const ResStringArray& GetUiSymbolSetNamesArray() const { return aUiSymbolSetNamesAry; } const ResStringArray& GetExportSymbolSetNamesArray() const { return aExportSymbolSetNamesAry; } - const String GetUiSymbolSetName( const String &rExportName ) const; - const String GetExportSymbolSetName( const String &rUiName ) const; + const OUString GetUiSymbolSetName( const OUString &rExportName ) const; + const OUString GetExportSymbolSetName( const OUString &rUiName ) const; const ResStringArray* Get50NamesArray( LanguageType nLang ); const ResStringArray* Get60NamesArray( LanguageType nLang ); diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index e3071373651c..60e36fb24037 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -243,16 +243,16 @@ class SmViewShell: public SfxViewShell protected: Size GetTextLineSize(OutputDevice& rDevice, - const String& rLine); + const OUString& rLine); Size GetTextSize(OutputDevice& rDevice, - const String& rText, + const OUString& rText, long MaxWidth); void DrawTextLine(OutputDevice& rDevice, const Point& rPosition, - const String& rLine); + const OUString& rLine); void DrawText(OutputDevice& rDevice, const Point& rPosition, - const String& rText, + const OUString& rText, sal_uInt16 MaxWidth); virtual sal_uInt16 Print(SfxProgress &rProgress, sal_Bool bIsAPI); diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 6aa86f583383..ca8b35de0f56 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -988,10 +988,10 @@ sal_uInt16 SmTextForwarder::GetTextLen( sal_Int32 nParagraph ) const return pEditEngine ? pEditEngine->GetTextLen( nParagraph ) : 0; } -String SmTextForwarder::GetText( const ESelection& rSel ) const +OUString SmTextForwarder::GetText( const ESelection& rSel ) const { EditEngine *pEditEngine = rEditAcc.GetEditEngine(); - String aRet; + OUString aRet; if (pEditEngine) aRet = pEditEngine->GetText( rSel, LINEEND_LF ); return convertLineEnd(aRet, GetSystemLineEnd()); @@ -1075,7 +1075,7 @@ void SmTextForwarder::GetPortions( sal_Int32 nPara, std::vector<sal_uInt16>& rLi pEditEngine->GetPortions( nPara, rList ); } -void SmTextForwarder::QuickInsertText( const String& rText, const ESelection& rSel ) +void SmTextForwarder::QuickInsertText( const OUString& rText, const ESelection& rSel ) { EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) @@ -1413,7 +1413,7 @@ sal_Bool SmTextForwarder::Delete( const ESelection& rSelection ) return bRes; } -sal_Bool SmTextForwarder::InsertText( const String& rStr, const ESelection& rSelection ) +sal_Bool SmTextForwarder::InsertText( const OUString& rStr, const ESelection& rSelection ) { sal_Bool bRes = sal_False; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); @@ -1444,11 +1444,11 @@ void SmTextForwarder::AppendParagraph() if (pEditEngine) { sal_Int32 nParaCount = pEditEngine->GetParagraphCount(); - pEditEngine->InsertParagraph( nParaCount, String() ); + pEditEngine->InsertParagraph( nParaCount, OUString() ); } } -xub_StrLen SmTextForwarder::AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet ) +sal_uInt16 SmTextForwarder::AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ) { xub_StrLen nRes = 0; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx index df0745b4aaef..4614ae13251c 100644 --- a/starmath/source/accessibility.hxx +++ b/starmath/source/accessibility.hxx @@ -203,7 +203,7 @@ public: virtual sal_Int32 GetParagraphCount() const; virtual sal_uInt16 GetTextLen( sal_Int32 nParagraph ) const; - virtual String GetText( const ESelection& rSel ) const; + virtual OUString GetText( const ESelection& rSel ) const; virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); @@ -213,7 +213,7 @@ public: virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; virtual sal_uInt16 GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const; - virtual void QuickInsertText( const String& rText, const ESelection& rSel ); + virtual void QuickInsertText( const OUString& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); virtual void QuickInsertLineBreak( const ESelection& rSel ); @@ -240,7 +240,7 @@ public: virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nParagraph, sal_uInt16 nLine ) const; virtual sal_uInt16 GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nLine ) const; virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const String&, const ESelection& ); + virtual sal_Bool InsertText( const OUString&, const ESelection& ); virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; @@ -249,7 +249,7 @@ public: virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet ); + virtual sal_uInt16 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ); virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 3d12fc927aac..53ba5ded40e6 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -212,7 +212,7 @@ SmCfgOther::SmCfgOther() SmFontFormat::SmFontFormat() { - aName.AssignAscii( FONTNAME_MATH ); + aName = OUString( FONTNAME_MATH ); nCharSet = RTL_TEXTENCODING_UNICODE; nFamily = FAMILY_DONTKNOW; nPitch = PITCH_DONTKNOW; @@ -258,7 +258,7 @@ bool SmFontFormat::operator == ( const SmFontFormat &rFntFmt ) const ///////////////////////////////////////////////////////////////// -SmFntFmtListEntry::SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt ) : +SmFntFmtListEntry::SmFntFmtListEntry( const OUString &rId, const SmFontFormat &rFntFmt ) : aId (rId), aFntFmt (rFntFmt) { @@ -281,7 +281,7 @@ void SmFontFormatList::Clear() } -void SmFontFormatList::AddFontFormat( const String &rFntFmtId, +void SmFontFormatList::AddFontFormat( const OUString &rFntFmtId, const SmFontFormat &rFntFmt ) { const SmFontFormat *pFntFmt = GetFontFormat( rFntFmtId ); @@ -295,7 +295,7 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId, } -void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId ) +void SmFontFormatList::RemoveFontFormat( const OUString &rFntFmtId ) { // search for entry @@ -312,7 +312,7 @@ void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId ) } -const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId ) const +const SmFontFormat * SmFontFormatList::GetFontFormat( const OUString &rFntFmtId ) const { const SmFontFormat *pRes = 0; @@ -339,9 +339,9 @@ const SmFontFormat * SmFontFormatList::GetFontFormat( size_t nPos ) const } -const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) const +const OUString SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) const { - String aRes; + OUString aRes; for (size_t i = 0; i < aEntries.size(); ++i) { @@ -356,10 +356,10 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) co } -const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd ) +const OUString SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd ) { - String aRes( GetFontFormatId( rFntFmt) ); - if (0 == aRes.Len() && bAdd) + OUString aRes( GetFontFormatId( rFntFmt) ); + if (aRes.isEmpty() && bAdd) { aRes = GetNewFontFormatId(); AddFontFormat( aRes, rFntFmt ); @@ -368,9 +368,9 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, boo } -const String SmFontFormatList::GetFontFormatId( size_t nPos ) const +const OUString SmFontFormatList::GetFontFormatId( size_t nPos ) const { - String aRes; + OUString aRes; if (nPos < aEntries.size()) aRes = aEntries[nPos].aId; return aRes; @@ -464,7 +464,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol, const Any * pValue = aValues.getConstArray(); Font aFont; sal_UCS4 cChar = '\0'; - String aSet; + OUString aSet; bool bPredefined = false; OUString aTmpStr; @@ -500,23 +500,23 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol, if (bOK) { - String aUiName( rSymbolName ); - String aUiSetName( aSet ); + OUString aUiName( rSymbolName ); + OUString aUiSetName( aSet ); if (bPredefined) { - String aTmp; + OUString aTmp; aTmp = GetUiSymbolName( rSymbolName ); - OSL_ENSURE( aTmp.Len(), "localized symbol-name not found" ); - if (aTmp.Len()) + OSL_ENSURE( !aTmp.isEmpty(), "localized symbol-name not found" ); + if (!aTmp.isEmpty()) aUiName = aTmp; aTmp = GetUiSymbolSetName( aSet ); - OSL_ENSURE( aTmp.Len(), "localized symbolset-name not found" ); - if (aTmp.Len()) + OSL_ENSURE( !aTmp.isEmpty(), "localized symbolset-name not found" ); + if (!aTmp.isEmpty()) aUiSetName = aTmp; } rSymbol = SmSym( aUiName, aFont, cChar, aUiSetName, bPredefined ); - if (aUiName != String(rSymbolName)) + if (aUiName != rSymbolName) rSymbol.SetExportName( rSymbolName ); } else @@ -613,11 +613,11 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols ) pVal++; // FontFormatId SmFontFormat aFntFmt( rSymbol.GetFace() ); - String aFntFmtId( GetFontFormatList().GetFontFormatId( aFntFmt, true ) ); - OSL_ENSURE( aFntFmtId.Len(), "FontFormatId not found" ); + OUString aFntFmtId( GetFontFormatList().GetFontFormatId( aFntFmt, true ) ); + OSL_ENSURE( !aFntFmtId.isEmpty(), "FontFormatId not found" ); pVal->Name = aNodeNameDelim; pVal->Name += *pName++; - pVal->Value <<= OUString( aFntFmtId ); + pVal->Value <<= aFntFmtId; pVal++; } OSL_ENSURE( pVal - pValues == sal::static_int_cast< ptrdiff_t >(nCount * nSymbolProps), "properties missing" ); @@ -749,7 +749,7 @@ void SmMathConfig::SaveFontFormatList() OUString aDelim( OUString( (sal_Unicode) '/' ) ); for (size_t i = 0; i < nCount; ++i) { - String aFntFmtId( rFntFmtList.GetFontFormatId( i ) ); + OUString aFntFmtId( rFntFmtList.GetFontFormatId( i ) ); const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) ); OUString aNodeNameDelim( FONT_FORMAT_LIST ); @@ -828,7 +828,7 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols ) } for (k = 0; k < nCnt; ++k) { - if (0 == aUsedList.GetFontFormatId( pTmpFormat[k] ).Len()) + if (aUsedList.GetFontFormatId( pTmpFormat[k] ).isEmpty()) { rFntFmtList.RemoveFontFormat( pId[k] ); } diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx index 590621ccb3f2..9cbc089e4921 100644 --- a/starmath/source/cfgitem.hxx +++ b/starmath/source/cfgitem.hxx @@ -49,7 +49,7 @@ struct SmCfgOther; struct SmFontFormat { - String aName; + OUString aName; sal_Int16 nCharSet; sal_Int16 nFamily; sal_Int16 nPitch; @@ -66,10 +66,10 @@ struct SmFontFormat struct SmFntFmtListEntry { - String aId; + OUString aId; SmFontFormat aFntFmt; - SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt ); + SmFntFmtListEntry( const OUString &rId, const SmFontFormat &rFntFmt ); }; class SmFontFormatList @@ -85,15 +85,15 @@ public: SmFontFormatList(); void Clear(); - void AddFontFormat( const String &rFntFmtId, const SmFontFormat &rFntFmt ); - void RemoveFontFormat( const String &rFntFmtId ); + void AddFontFormat( const OUString &rFntFmtId, const SmFontFormat &rFntFmt ); + void RemoveFontFormat( const OUString &rFntFmtId ); - const SmFontFormat * GetFontFormat( const String &rFntFmtId ) const; + const SmFontFormat * GetFontFormat( const OUString &rFntFmtId ) const; const SmFontFormat * GetFontFormat( size_t nPos ) const; - const String GetFontFormatId( const SmFontFormat &rFntFmt ) const; - const String GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd ); - const String GetFontFormatId( size_t nPos ) const; - const OUString GetNewFontFormatId() const; + const OUString GetFontFormatId( const SmFontFormat &rFntFmt ) const; + const OUString GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd ); + const OUString GetFontFormatId( size_t nPos ) const; + const OUString GetNewFontFormatId() const; size_t GetCount() const { return aEntries.size(); } bool IsModified() const { return bModified; } diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 6e91900c35e4..c33c0d569e94 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -139,7 +139,7 @@ void SmDocShell::LoadSymbols() } -const String SmDocShell::GetComment() const +const OUString SmDocShell::GetComment() const { SAL_INFO( "starmath", "starmath: SmDocShell::GetComment" ); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( @@ -402,8 +402,8 @@ EditEngine& SmDocShell::GetEditEngine() // set initial text if the document already has some... // (may be the case when reloading a doc) - String aTxt( GetText() ); - if (aTxt.Len()) + OUString aTxt( GetText() ); + if (!aTxt.isEmpty()) pEditEngine->SetText( aTxt ); pEditEngine->ClearModifyFlag(); @@ -729,7 +729,7 @@ SmDocShell::~SmDocShell() } -sal_Bool SmDocShell::SetData( const String& rData ) +sal_Bool SmDocShell::SetData( const OUString& rData ) { SAL_INFO( "starmath", "starmath: SmDocShell::SetData" ); @@ -743,11 +743,11 @@ sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium) SAL_INFO( "starmath", "starmath: SmDocShell::ConvertFrom" ); bool bSuccess = false; - const String& rFltName = rMedium.GetFilter()->GetFilterName(); + const OUString& rFltName = rMedium.GetFilter()->GetFilterName(); - OSL_ENSURE( !rFltName.EqualsAscii( STAROFFICE_XML ), "Wrong filter!"); + OSL_ENSURE( !rFltName.equals( STAROFFICE_XML ), "Wrong filter!"); - if ( rFltName.EqualsAscii( MATHML_XML ) ) + if ( rFltName.equals( MATHML_XML ) ) { if (pTree) { @@ -952,15 +952,15 @@ sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium ) if( pTree && !IsFormulaArranged() ) ArrangeFormula(); - const String& rFltName = pFlt->GetFilterName(); - if(rFltName.EqualsAscii( STAROFFICE_XML )) + const OUString& rFltName = pFlt->GetFilterName(); + if(rFltName.equals( STAROFFICE_XML )) { Reference<com::sun::star::frame::XModel> xModel(GetModel()); SmXMLExportWrapper aEquation(xModel); aEquation.SetFlat(sal_False); bRet = aEquation.Export(rMedium); } - else if(rFltName.EqualsAscii( MATHML_XML )) + else if(rFltName.equals( MATHML_XML )) { Reference<com::sun::star::frame::XModel> xModel(GetModel()); SmXMLExportWrapper aEquation(xModel); @@ -1406,15 +1406,15 @@ void SmDocShell::FillClass(SvGlobalName* pClassName, { *pClassName = SvGlobalName(SO3_SM_CLASSID_60); *pFormat = SOT_FORMATSTR_ID_STARMATH_60; - *pFullTypeName = String(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT)); - *pShortTypeName = String(SmResId(RID_DOCUMENTSTR)); + *pFullTypeName = OUString(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT)); + *pShortTypeName = OUString(SmResId(RID_DOCUMENTSTR)); } else if (nFileFormat == SOFFICE_FILEFORMAT_8 ) { *pClassName = SvGlobalName(SO3_SM_CLASSID_60); *pFormat = bTemplate ? SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE : SOT_FORMATSTR_ID_STARMATH_8; - *pFullTypeName = String(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT)); - *pShortTypeName = String(SmResId(RID_DOCUMENTSTR)); + *pFullTypeName = OUString(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT)); + *pShortTypeName = OUString(SmResId(RID_DOCUMENTSTR)); } } diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index ce3dd4b91a68..fa32b8fc33c2 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -653,7 +653,7 @@ void SmEditWindow::InitScrollBars() OUString SmEditWindow::GetText() const { - String aText; + OUString aText; EditEngine *pEditEngine = const_cast< SmEditWindow* >(this)->GetEditEngine(); OSL_ENSURE( pEditEngine, "EditEngine missing" ); if (pEditEngine) diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index c18b4923077e..5d75ef9ee8e1 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -67,7 +67,7 @@ static const sal_uInt16 aCTLDefFnts[FNT_END] = }; -String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent ) +OUString GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent ) { OSL_ENSURE( /*FNT_BEGIN <= nIdent &&*/ nIdent <= FNT_END, "index out opd range" ); diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index ae337634136f..c53c7d8bec99 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -607,7 +607,7 @@ void SmXMLExport::_ExportContent() SvXMLElementExport aEquation(*this, XML_NAMESPACE_MATH, XML_MATH, sal_True, sal_True); SvXMLElementExport *pSemantics=0; - if (aText.Len()) + if (!aText.isEmpty()) { pSemantics = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_SEMANTICS, sal_True, sal_True); @@ -615,7 +615,7 @@ void SmXMLExport::_ExportContent() ExportNodes(pTree, 0); - if (aText.Len()) + if (!aText.isEmpty()) { // Convert symbol names if (pDocShell) @@ -633,7 +633,7 @@ void SmXMLExport::_ExportContent() OUString("StarMath 5.0")); SvXMLElementExport aAnnotation(*this, XML_NAMESPACE_MATH, XML_ANNOTATION, sal_True, sal_False); - GetDocHandler()->characters(OUString( aText )); + GetDocHandler()->characters( aText ); } delete pSemantics; } diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx index d7ca75a7f534..4f97bb403b43 100644 --- a/starmath/source/mathmlexport.hxx +++ b/starmath/source/mathmlexport.hxx @@ -77,7 +77,7 @@ public: class SmXMLExport : public SvXMLExport { const SmNode * pTree; - String aText; + OUString aText; sal_Bool bSuccess; protected: diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 3f029bb31e8b..edf32af659c0 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -2868,14 +2868,14 @@ void SmAttributNode::CreateTextFromNode(OUString &rText) /**************************************************************************/ -static bool lcl_IsFromGreekSymbolSet( const String &rTokenText ) +static bool lcl_IsFromGreekSymbolSet( const OUString &rTokenText ) { bool bRes = false; // valid symbol name needs to have a '%' at pos 0 and at least an additonal char - if (rTokenText.Len() > 2 && rTokenText.GetBuffer()[0] == (sal_Unicode)'%') + if (rTokenText.getLength() > 2 && rTokenText.getStr()[0] == (sal_Unicode)'%') { - String aName( rTokenText.Copy(1) ); + OUString aName( rTokenText.copy(1) ); SmSym *pSymbol = SM_MOD()->GetSymbolManager().GetSymbolByName( aName ); if (pSymbol && GetExportSymbolSetName(pSymbol->GetSymbolSetName()) == "Greek") bRes = true; diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx index a0fc6ecb8c43..be21c53e727b 100644 --- a/starmath/source/smdetect.cxx +++ b/starmath/source/smdetect.cxx @@ -80,10 +80,10 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor Reference< XInputStream > xStream; Reference< XContent > xContent; Reference< XInteractionHandler > xInteraction; - String aURL; + OUString aURL; OUString sTemp; - String aTypeName; // a name describing the type (from MediaDescriptor, usually from flat detection) - String aPreselectedFilterName; // a name describing the filter to use (from MediaDescriptor, usually from UI action) + OUString aTypeName; // a name describing the type (from MediaDescriptor, usually from flat detection) + OUString aPreselectedFilterName; // a name describing the filter to use (from MediaDescriptor, usually from UI action) OUString aDocumentTitle; // interesting only if set in this method @@ -114,7 +114,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor lDescriptor[nProperty].Value >>= sTemp; aURL = sTemp; } - else if( !aURL.Len() && lDescriptor[nProperty].Name == "FileName" ) + else if( aURL.isEmpty() && lDescriptor[nProperty].Name == "FileName" ) { lDescriptor[nProperty].Value >>= sTemp; aURL = sTemp; @@ -160,14 +160,14 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor bWasReadOnly = pItem && pItem->GetValue(); - String aFilterName; - String aPrefix = OUString( "private:factory/" ); - if( aURL.Match( aPrefix ) == aPrefix.Len() ) + OUString aFilterName; + OUString aPrefix( "private:factory/" ); + if( aURL.startsWith( aPrefix ) ) { const SfxFilter* pFilter = 0; - String aPattern( aPrefix ); - aPattern += OUString("smath"); - if ( aURL.Match( aPattern ) >= aPattern.Len() ) + OUString aPattern( aPrefix ); + aPattern += "smath"; + if ( aURL.startsWith( aPattern ) ) { pFilter = SfxFilter::GetDefaultFilterFromFactory( aURL ); aTypeName = pFilter->GetTypeName(); @@ -219,13 +219,13 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor } else { - aFilterName.Erase(); + aFilterName = OUString(); try { - const SfxFilter* pFilter = aPreselectedFilterName.Len() ? - SfxFilterMatcher().GetFilter4FilterName( aPreselectedFilterName ) : aTypeName.Len() ? - SfxFilterMatcher(OUString("smath")).GetFilter4EA( aTypeName ) : 0; + const SfxFilter* pFilter = !aPreselectedFilterName.isEmpty() ? + SfxFilterMatcher().GetFilter4FilterName( aPreselectedFilterName ) : !aTypeName.isEmpty() ? + SfxFilterMatcher( "smath" ).GetFilter4EA( aTypeName ) : 0; OUString aTmpFilterName; if ( pFilter ) aTmpFilterName = pFilter->GetName(); @@ -240,7 +240,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor packages::zip::ZipIOException aZipException; // repairing is done only if this type is requested from outside - if ( ( aWrap.TargetException >>= aZipException ) && aTypeName.Len() ) + if ( ( aWrap.TargetException >>= aZipException ) && !aTypeName.isEmpty() ) { if ( xInteraction.is() ) { @@ -267,7 +267,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor } if ( !bRepairAllowed ) - aTypeName.Erase(); + aTypeName = OUString(); } } catch( RuntimeException& ) @@ -276,13 +276,13 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor } catch( Exception& ) { - aTypeName.Erase(); + aTypeName = OUString(); } - if ( aTypeName.Len() ) + if ( !aTypeName.isEmpty() ) { const SfxFilter* pFilter = - SfxFilterMatcher( OUString("smath") ).GetFilter4EA( aTypeName ); + SfxFilterMatcher( "smath" ).GetFilter4EA( aTypeName ); if ( pFilter ) aFilterName = pFilter->GetName(); } @@ -294,17 +294,17 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor //the MathML filter. There are all sorts of things wrong with //this approach, to be fixed at a better level than here SvStream *pStrm = aMedium.GetInStream(); - aTypeName.Erase(); + aTypeName = OUString(); if (pStrm && !pStrm->GetError()) { SotStorageRef aStorage = new SotStorage ( pStrm, sal_False ); if ( !aStorage->GetError() ) { - if (aStorage->IsStream(OUString("Equation Native"))) + if (aStorage->IsStream("Equation Native")) { sal_uInt8 nVersion; if (GetMathTypeVersion( aStorage, nVersion ) && nVersion <=3) - aTypeName.AssignAscii( "math_MathType_3x" ); + aTypeName = "math_MathType_3x"; } } else @@ -335,17 +335,15 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor bIsMathType = true; if (bIsMathType){ - static const sal_Char sFltrNm_2[] = MATHML_XML; - static const sal_Char sTypeNm_2[] = "math_MathML_XML_Math"; - aFilterName.AssignAscii( sFltrNm_2 ); - aTypeName.AssignAscii( sTypeNm_2 ); + aFilterName = OUString( MATHML_XML ); + aTypeName = "math_MathML_XML_Math"; } } } - if ( aTypeName.Len() ) + if ( !aTypeName.isEmpty() ) { - const SfxFilter* pFilt = SfxFilterMatcher( OUString("smath") ).GetFilter4EA( aTypeName ); + const SfxFilter* pFilt = SfxFilterMatcher( "smath" ).GetFilter4EA( aTypeName ); if ( pFilt ) aFilterName = pFilt->GetName(); } @@ -424,8 +422,8 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor lDescriptor[nIndexOfDocumentTitle].Value <<= aDocumentTitle; } - if ( !aFilterName.Len() ) - aTypeName.Erase(); + if ( aFilterName.isEmpty() ) + aTypeName = OUString(); return aTypeName; } diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index 8fd26f90959e..35f546959ebd 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -79,15 +79,15 @@ SmLocalizedSymbolData::~SmLocalizedSymbolData() } -const String SmLocalizedSymbolData::GetUiSymbolName( const String &rExportName ) const +const OUString SmLocalizedSymbolData::GetUiSymbolName( const OUString &rExportName ) const { - String aRes; + OUString aRes; const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData(); const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray(); const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray(); sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count()); - for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i) + for (sal_uInt16 i = 0; i < nCount && aRes.isEmpty(); ++i) { if (rExportNames.GetString(i).equals(rExportName)) { @@ -100,15 +100,15 @@ const String SmLocalizedSymbolData::GetUiSymbolName( const String &rExportName ) } -const String SmLocalizedSymbolData::GetExportSymbolName( const String &rUiName ) const +const OUString SmLocalizedSymbolData::GetExportSymbolName( const OUString &rUiName ) const { - String aRes; + OUString aRes; const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData(); const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray(); const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray(); sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count()); - for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i) + for (sal_uInt16 i = 0; i < nCount && aRes.isEmpty(); ++i) { if (rUiNames.GetString(i).equals(rUiName)) { @@ -121,15 +121,15 @@ const String SmLocalizedSymbolData::GetExportSymbolName( const String &rUiName ) } -const String SmLocalizedSymbolData::GetUiSymbolSetName( const String &rExportName ) const +const OUString SmLocalizedSymbolData::GetUiSymbolSetName( const OUString &rExportName ) const { - String aRes; + OUString aRes; const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData(); const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray(); const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray(); sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count()); - for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i) + for (sal_uInt16 i = 0; i < nCount && aRes.isEmpty(); ++i) { if (rExportNames.GetString(i).equals(rExportName)) { @@ -142,15 +142,15 @@ const String SmLocalizedSymbolData::GetUiSymbolSetName( const String &rExportNam } -const String SmLocalizedSymbolData::GetExportSymbolSetName( const String &rUiName ) const +const OUString SmLocalizedSymbolData::GetExportSymbolSetName( const OUString &rUiName ) const { - String aRes; + OUString aRes; const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData(); const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray(); const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray(); sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count()); - for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i) + for (sal_uInt16 i = 0; i < nCount && aRes.isEmpty(); ++i) { if (rUiNames.GetString(i).equals(rUiName)) { diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 9a291a98ff9e..7b4685f75665 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1003,7 +1003,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY ) } -Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine) +Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const OUString& rLine) { SAL_INFO( "starmath", "starmath: SmViewShell::GetTextLineSize" ); @@ -1021,7 +1021,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine) if (i > 0) aSize.Width() = ((aSize.Width() / TabPos) + 1) * TabPos; - OUString aText = rLine.GetToken(i, '\t'); + OUString aText = rLine.getToken(i, '\t'); aText = comphelper::string::stripStart(aText, '\t'); aText = comphelper::string::stripEnd(aText, '\t'); aSize.Width() += rDevice.GetTextWidth(aText); @@ -1032,7 +1032,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine) } -Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long MaxWidth) +Size SmViewShell::GetTextSize(OutputDevice& rDevice, const OUString& rText, long MaxWidth) { SAL_INFO( "starmath", "starmath: SmViewShell::GetTextSize" ); @@ -1042,7 +1042,7 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M for (sal_uInt16 i = 0; i < nLines; i++) { - OUString aLine = rText.GetToken(i, '\n'); + OUString aLine = rText.getToken(i, '\n'); aLine = comphelper::string::remove(aLine, '\r'); aLine = comphelper::string::stripStart(aLine, '\n'); aLine = comphelper::string::stripEnd(aLine, '\n'); @@ -1093,7 +1093,7 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M } -void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, const String& rLine) +void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, const OUString& rLine) { SAL_INFO( "starmath", "starmath: SmViewShell::DrawTextLine" ); @@ -1109,7 +1109,7 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co if (i > 0) aPoint.X() = ((aPoint.X() / TabPos) + 1) * TabPos; - OUString aText = rLine.GetToken(i, '\t'); + OUString aText = rLine.getToken(i, '\t'); aText = comphelper::string::stripStart(aText, '\t'); aText = comphelper::string::stripEnd(aText, '\t'); rDevice.DrawText(aPoint, aText); @@ -1121,7 +1121,7 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co } -void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, sal_uInt16 MaxWidth) +void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const OUString& rText, sal_uInt16 MaxWidth) { SAL_INFO( "starmath", "starmath: SmViewShell::DrawText" ); @@ -1131,7 +1131,7 @@ void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const for (sal_uInt16 i = 0; i < nLines; i++) { - OUString aLine = rText.GetToken(i, '\n'); + OUString aLine = rText.getToken(i, '\n'); aLine = comphelper::string::remove(aLine, '\r'); aLine = comphelper::string::stripEnd(aLine, '\n'); aLine = comphelper::string::stripEnd(aLine, '\n'); diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 1f2b3b9efd82..88d79be8a990 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -97,7 +97,7 @@ namespace accessibility // SvxTextForwarder sal_Int32 GetParagraphCount() const { return 1; } sal_uInt16 GetTextLen( sal_Int32 /*nParagraph*/ ) const { return 0; } - String GetText( const ESelection& /*rSel*/ ) const { return String(); } + OUString GetText( const ESelection& /*rSel*/ ) const { return String(); } SfxItemSet GetAttribs( const ESelection& /*rSel*/, sal_Bool /*bOnlyHardAttrib*/ = 0 ) const { // AW: Very dangerous: The former implementation used a SfxItemPool created on the @@ -115,7 +115,7 @@ namespace accessibility SfxItemPool* GetPool() const { return NULL; } - void QuickInsertText( const String& /*rText*/, const ESelection& /*rSel*/ ) {} + void QuickInsertText( const OUString& /*rText*/, const ESelection& /*rSel*/ ) {} void QuickInsertField( const SvxFieldItem& /*rFld*/, const ESelection& /*rSel*/ ) {} void QuickSetAttribs( const SfxItemSet& /*rSet*/, const ESelection& /*rSel*/ ) {} void QuickInsertLineBreak( const ESelection& /*rSel*/ ) {} @@ -123,7 +123,7 @@ namespace accessibility const SfxItemSet * GetEmptyItemSetPtr() { return 0; } void AppendParagraph() {} - xub_StrLen AppendTextPortion( sal_Int32 /*nPara*/, const String & /*rText*/, const SfxItemSet & /*rSet*/ ) { return 0; } + sal_uInt16 AppendTextPortion( sal_Int32 /*nPara*/, const OUString & /*rText*/, const SfxItemSet & /*rSet*/ ) { return 0; } //XTextCopy void CopyText(const SvxTextForwarder& ){} @@ -162,7 +162,7 @@ namespace accessibility // longer be possible to enter text in previously empty // shapes). sal_Bool Delete( const ESelection& ) { return sal_False; } - sal_Bool InsertText( const String&, const ESelection& ) { return sal_False; } + sal_Bool InsertText( const OUString&, const ESelection& ) { return sal_False; } sal_Bool QuickFormatDoc( sal_Bool ) { return sal_True; } sal_Int16 GetDepth( sal_Int32 ) const { return -1; } sal_Bool SetDepth( sal_Int32, sal_Int16 ) { return sal_True; } diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index c5e8387a26fa..6617fff44c03 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -57,7 +57,7 @@ class SwASCIIParser bool bNewDoc; sal_uLong ReadChars(); - void InsertText( const String& rStr ); + void InsertText( const OUString& rStr ); public: SwASCIIParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, @@ -485,10 +485,10 @@ sal_uLong SwASCIIParser::ReadChars() return 0; } -void SwASCIIParser::InsertText( const String& rStr ) +void SwASCIIParser::InsertText( const OUString& rStr ) { pDoc->InsertString( *pPam, rStr ); - pDoc->UpdateRsid( *pPam, rStr.Len() ); + pDoc->UpdateRsid( *pPam, rStr.getLength() ); pDoc->UpdateParRsid( pPam->GetPoint()->nNode.GetNode().GetTxtNode() ); if( pItemSet && g_pBreakIt && nScript != ( SCRIPTTYPE_LATIN | |