diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-06 15:32:23 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-09-11 09:45:31 +0200 |
commit | 0f9976f9cea73cf57ae8441c840523bbcd1655fc (patch) | |
tree | 693b0f961741de520a30c88ea6c976d60d5d297c /editeng | |
parent | convert SvxAutoCorrectLanguageLists from String to OUString (diff) | |
download | core-0f9976f9cea73cf57ae8441c840523bbcd1655fc.tar.gz core-0f9976f9cea73cf57ae8441c840523bbcd1655fc.zip |
convert include/editeng/splwrap.hxx from String to OUString
Change-Id: I52e6e34776fe494da431f8387f5f330b9aca36fe
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/edtspell.cxx | 8 | ||||
-rw-r--r-- | editeng/source/editeng/edtspell.hxx | 14 | ||||
-rw-r--r-- | editeng/source/misc/splwrap.cxx | 22 |
3 files changed, 22 insertions, 22 deletions
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index 7501837876bf..dc429803984d 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -150,7 +150,7 @@ void EditSpellWrapper::ScrollArea() // still anywhere. } -void EditSpellWrapper::ReplaceAll( const String &rNewText, +void EditSpellWrapper::ReplaceAll( const OUString &rNewText, sal_Int16 ) { // Is called when the word is in ReplaceList of the spell checker @@ -158,7 +158,7 @@ void EditSpellWrapper::ReplaceAll( const String &rNewText, CheckSpellTo(); } -void EditSpellWrapper::ChangeWord( const String& rNewWord, +void EditSpellWrapper::ChangeWord( const OUString& rNewWord, const sal_uInt16 ) { // Will be called when Word Button Change @@ -171,13 +171,13 @@ void EditSpellWrapper::ChangeWord( const String& rNewWord, CheckSpellTo(); } -void EditSpellWrapper::ChangeThesWord( const String& rNewWord ) +void EditSpellWrapper::ChangeThesWord( const OUString& rNewWord ) { pEditView->InsertText( rNewWord ); CheckSpellTo(); } -void EditSpellWrapper::AutoCorrect( const String&, const String& ) +void EditSpellWrapper::AutoCorrect( const OUString&, const OUString& ) { } diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx index 375dd780cdce..76d0c0d5397b 100644 --- a/editeng/source/editeng/edtspell.hxx +++ b/editeng/source/editeng/edtspell.hxx @@ -46,15 +46,15 @@ private: protected: virtual void SpellStart( SvxSpellArea eArea ); - virtual sal_Bool SpellContinue(); // Check area - virtual void ReplaceAll( const String &rNewText, sal_Int16 nLanguage ); + virtual sal_Bool SpellContinue(); // Check area + virtual void ReplaceAll( const OUString &rNewText, sal_Int16 nLanguage ); virtual void SpellEnd(); - virtual sal_Bool SpellMore(); - virtual sal_Bool HasOtherCnt(); + virtual sal_Bool SpellMore(); + virtual sal_Bool HasOtherCnt(); virtual void ScrollArea(); - virtual void ChangeWord( const String& rNewWord, const sal_uInt16 nLang ); - virtual void ChangeThesWord( const String& rNewWord ); - virtual void AutoCorrect( const String& rOldWord, const String& rNewWord ); + virtual void ChangeWord( const OUString& rNewWord, const sal_uInt16 nLang ); + virtual void ChangeThesWord( const OUString& rNewWord ); + virtual void AutoCorrect( const OUString& rOldWord, const OUString& rNewWord ); public: EditSpellWrapper( Window* pWin, diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 01816b4c7390..5d6ac6c6c626 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -53,7 +53,7 @@ using namespace ::com::sun::star::linguistic2; // misc functions --------------------------------------------- -void SvxPrepareAutoCorrect( String &rOldText, String &rNewText ) +void SvxPrepareAutoCorrect( OUString &rOldText, const OUString &rNewText ) { // This function should be used to strip (or add) trailing '.' from // the strings before passing them on to the autocorrect function in @@ -64,15 +64,15 @@ void SvxPrepareAutoCorrect( String &rOldText, String &rNewText ) // rOldText: text to be replaced // rNewText: replacement text - xub_StrLen nOldLen = rOldText.Len(), - nNewLen = rNewText.Len(); + xub_StrLen nOldLen = rOldText.getLength(), + nNewLen = rNewText.getLength(); if (nOldLen && nNewLen) { - sal_Bool bOldHasDot = sal_Unicode( '.' ) == rOldText.GetChar( nOldLen - 1 ), - bNewHasDot = sal_Unicode( '.' ) == rNewText.GetChar( nNewLen - 1 ); + bool bOldHasDot = '.' == rOldText[ nOldLen - 1 ], + bNewHasDot = '.' == rNewText[ nNewLen - 1 ]; if (bOldHasDot && !bNewHasDot /*this is: !(bOldHasDot && bNewHasDot) && bOldHasDot*/) - rOldText.Erase( nOldLen - 1 ); + rOldText = rOldText.copy( 0, nOldLen - 1 ); } } @@ -282,7 +282,7 @@ sal_Bool SvxSpellWrapper::SpellContinue() // ----------------------------------------------------------------------- -void SvxSpellWrapper::AutoCorrect( const String&, const String& ) +void SvxSpellWrapper::AutoCorrect( const OUString&, const OUString& ) { } @@ -296,21 +296,21 @@ void SvxSpellWrapper::ScrollArea() // ----------------------------------------------------------------------- -void SvxSpellWrapper::ChangeWord( const String&, const sal_uInt16 ) +void SvxSpellWrapper::ChangeWord( const OUString&, const sal_uInt16 ) { // Insert Word } // ----------------------------------------------------------------------- -void SvxSpellWrapper::ChangeThesWord( const String& ) +void SvxSpellWrapper::ChangeThesWord( const OUString& ) { // replace word due to Thesaurus. } // ----------------------------------------------------------------------- -void SvxSpellWrapper::StartThesaurus( const String &rWord, sal_uInt16 nLanguage ) +void SvxSpellWrapper::StartThesaurus( const OUString &rWord, sal_uInt16 nLanguage ) { Reference< XThesaurus > xThes( SvxGetThesaurus() ); if (!xThes.is()) @@ -332,7 +332,7 @@ void SvxSpellWrapper::StartThesaurus( const String &rWord, sal_uInt16 nLanguage // ----------------------------------------------------------------------- -void SvxSpellWrapper::ReplaceAll( const String &, sal_Int16 ) +void SvxSpellWrapper::ReplaceAll( const OUString &, sal_Int16 ) { // Replace Word from the Replace list } |