summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/SpellDialog.cxx
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-01-21 14:32:09 +0100
committerMichael Stahl <mstahl@redhat.com>2013-01-21 20:48:35 +0000
commite3f11c10d8cc759d01afa4b8fd8bd98c81a03119 (patch)
tree36191c6d90da559009161a1199d1176cf6a2bbba /cui/source/dialogs/SpellDialog.cxx
parent87f9d7da00857c649784a7d9eca046bf6e71ae3c (diff)
Changed SetText() / GetText() to take/return OUString
replaced lots of Len() with isEmpty() Change-Id: I6b82d48245ee2a0782e05a326f7934e9357227d0 Reviewed-on: https://gerrit.libreoffice.org/1795 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'cui/source/dialogs/SpellDialog.cxx')
-rw-r--r--cui/source/dialogs/SpellDialog.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index c3e3f4fdeeea..135e9c0c84ba 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -364,7 +364,7 @@ void SpellDialog::UpdateBoxes_Impl()
m_pCheckGrammarCB->Show(rParent.HasGrammarChecking());
m_pExplainLink->Show(!m_pExplainLink->GetURL().isEmpty());
- if (m_pExplainFT->GetText().Len() == 0)
+ if (m_pExplainFT->GetText().isEmpty())
{
m_pExplainFT->Hide();
m_pExplainLink->Hide();
@@ -706,7 +706,7 @@ void SpellDialog::Impl_Restore()
//clear the "ChangeAllList"
SvxGetChangeAllList()->clear();
//get a new sentence
- m_pSentenceED->SetText(rtl::OUString());
+ m_pSentenceED->SetText(OUString());
m_pSentenceED->ResetModified();
//Resolves: fdo#39348 refill the dialog with the currently spelled sentence
SpellContinue_Impl(true);
@@ -959,7 +959,7 @@ IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd)
bModified = true;
m_pSuggestionLB->SetNoSelection();
m_pSuggestionLB->Disable();
- String sNewText( m_pSentenceED->GetText() );
+ OUString sNewText( m_pSentenceED->GetText() );
m_pAutoCorrPB->Enable( sNewText != m_pSentenceED->GetText() );
SpellUndoAction_Impl* pSpellAction = new SpellUndoAction_Impl(SPELLUNDO_CHANGE_TEXTENGINE, aDialogUndoLink);
if(!m_pChangeAllPB->IsEnabled())
@@ -1447,7 +1447,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
break;
}
//save the current paragraph
- sal_uInt16 nCurrentLen = GetText().Len();
+ sal_Int32 nCurrentLen = GetText().getLength();
if(nAction != ACTION_SELECTFIELD)
pTextView->GetWindow()->KeyInput(rKeyEvt);
else
@@ -1485,11 +1485,11 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
else if(pErrorAttr)
{
//determine the change
- sal_uInt16 nAddedChars = GetText().Len() - nCurrentLen;
+ sal_Int32 nAddedChars = GetText().getLength() - nCurrentLen;
TextAttrib* pNewError = pErrorAttr->GetAttr().Clone();
- sal_uInt16 nStart = pErrorAttr->GetStart();
- sal_uInt16 nEnd = pErrorAttr->GetEnd();
+ sal_Int32 nStart = pErrorAttr->GetStart();
+ sal_Int32 nEnd = pErrorAttr->GetEnd();
pTextEngine->RemoveAttrib( 0, *pErrorAttr );
nStart = nStart - (sal_uInt16)nAddedChars;
SetAttrib( *pNewError, 0, nStart - nAddedChars, nEnd );
@@ -1772,7 +1772,7 @@ void SentenceEditWindow_Impl::SetAttrib( const TextAttrib& rAttr, sal_uLong nPar
}
//-----------------------------------------------------------------------
-void SentenceEditWindow_Impl::SetText( const String& rStr )
+void SentenceEditWindow_Impl::SetText( const OUString& rStr )
{
m_nErrorStart = m_nErrorEnd = 0;
GetTextEngine()->SetText(rStr);