summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/dialogs/SpellDialog.cxx4
-rw-r--r--editeng/source/editeng/edtspell.cxx8
-rw-r--r--editeng/source/editeng/edtspell.hxx14
-rw-r--r--editeng/source/misc/splwrap.cxx22
-rw-r--r--include/editeng/splwrap.hxx12
-rw-r--r--sw/source/ui/lingu/olmenu.cxx4
6 files changed, 32 insertions, 32 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index dfaef3112983..506c11eed0dc 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -463,7 +463,7 @@ IMPL_LINK( SpellDialog, ExtClickHdl, Button *, pBtn )
const SpellErrorDescription* pSpellErrorDescription = m_pSentenceED->GetAlternatives();
if( pSpellErrorDescription )
{
- String sWrong(pSpellErrorDescription->sErrorText);
+ OUString sWrong(pSpellErrorDescription->sErrorText);
//if the word has not been edited in the MultiLineEdit then
//the current suggestion should be used
//if it's not the 'no suggestions' entry
@@ -581,7 +581,7 @@ IMPL_LINK_NOARG(SpellDialog, ChangeAllHdl)
LanguageType eLang = GetSelectedLang_Impl();
// add new word to ChangeAll list
- String aOldWord( m_pSentenceED->GetErrorText() );
+ OUString aOldWord( m_pSentenceED->GetErrorText() );
SvxPrepareAutoCorrect( aOldWord, aString );
Reference<XDictionary> aXDictionary( SvxGetChangeAllList(), UNO_QUERY );
sal_uInt8 nAdded = linguistic::AddEntryToDic( aXDictionary,
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
}
diff --git a/include/editeng/splwrap.hxx b/include/editeng/splwrap.hxx
index d4c9b8da8732..41d07530cabe 100644
--- a/include/editeng/splwrap.hxx
+++ b/include/editeng/splwrap.hxx
@@ -36,7 +36,7 @@ class Window;
// misc functions ---------------------------------------------------------------
-void EDITENG_DLLPUBLIC SvxPrepareAutoCorrect( String &rOldText, String &rNewText );
+void EDITENG_DLLPUBLIC SvxPrepareAutoCorrect( OUString &rOldText, const OUString &rNewText );
/*--------------------------------------------------------------------
Description: The SpellWrapper
@@ -129,19 +129,19 @@ protected:
virtual void SpellStart( SvxSpellArea eSpell ); // Preparing the area
virtual sal_Bool SpellContinue(); // Check Areas
// Result available through GetLast
- virtual void ReplaceAll( const String &rNewText, sal_Int16 nLanguage ); //Replace word from the replace list
- virtual void StartThesaurus( const String &rWord, sal_uInt16 nLang );
+ virtual void ReplaceAll( const OUString &rNewText, sal_Int16 nLanguage ); //Replace word from the replace list
+ virtual void StartThesaurus( const OUString &rWord, sal_uInt16 nLang );
virtual ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionary >
GetAllRightDic() const;
virtual void SpellEnd(); // Finish area
virtual void ScrollArea(); // Set ScrollArea
// Replace word
- virtual void ChangeWord( const String& rNewWord, const sal_uInt16 nLang );
+ virtual void ChangeWord( const OUString& rNewWord, const sal_uInt16 nLang );
// Wort via Thesaurus ersetzen
- virtual void ChangeThesWord( const String& rNewWord );
+ virtual void ChangeThesWord( const OUString& rNewWord );
virtual void SetLanguage( const sal_uInt16 nLang ); // Change Language
- virtual void AutoCorrect( const String& rAktStr, const String& rNewStr );
+ virtual void AutoCorrect( const OUString& rAktStr, const OUString& rNewStr );
virtual void InsertHyphen( const sal_uInt16 nPos ); // Insert hyphen
};
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index ee4bece90798..ae51219e6520 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -691,8 +691,8 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
// record only if it's NOT already present in autocorrection
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect();
- String aOrigWord( bGrammarResults ? OUString() : xSpellAlt->getWord() ) ;
- String aNewWord( aSuggestions[ nAltIdx ] );
+ OUString aOrigWord( bGrammarResults ? OUString() : xSpellAlt->getWord() ) ;
+ OUString aNewWord( aSuggestions[ nAltIdx ] );
SvxPrepareAutoCorrect( aOrigWord, aNewWord );
if (MN_AUTOCORR_START <= nId && nId <= MN_AUTOCORR_END)