diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-20 23:08:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-12-21 09:30:19 +0000 |
commit | 1bac5427d6e1b3af2591291fc328d832a8b23047 (patch) | |
tree | 8a99fb4abafeabb07bdc966fd3eefaa74e37e7b5 | |
parent | 60bfcc0a4af860f21a840ce47585ff9395cf28e6 (diff) |
SpellError doesn't need to be a [IMPL|DECL]Link
and as a side effect we can simplify, because argument is never NULL
and return is never used
-rwxr-xr-x | sw/source/ui/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/lingu/hyp.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewling.cxx | 9 |
3 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 45e44051376b..4e7d8f6db509 100755 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -466,7 +466,7 @@ public: long SetVScrollMax(long lMax); long SetHScrollMax(long lMax); - DECL_LINK( SpellError, LanguageType * ); + void SpellError(LanguageType eLang); sal_Bool ExecSpellPopup( const Point& rPt ); void ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM ); diff --git a/sw/source/ui/lingu/hyp.cxx b/sw/source/ui/lingu/hyp.cxx index 19c98edbf48f..13e29bbb6089 100644 --- a/sw/source/ui/lingu/hyp.cxx +++ b/sw/source/ui/lingu/hyp.cxx @@ -113,7 +113,7 @@ sal_Bool SwHyphWrapper::SpellContinue() bShowError = sal_False; PSH->Push(); PSH->ClearMark(); - pView->SpellError( &nLangError ); + pView->SpellError( nLangError ); PSH->Combine(); } return GetLast().is(); diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 10273953522b..397449c40510 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -346,7 +346,7 @@ void SwView::SpellStart( SvxSpellArea eWhich, Beschreibung: Fehlermeldung beim Spelling --------------------------------------------------------------------*/ // Der uebergebene Pointer nLang ist selbst der Wert -IMPL_LINK( SwView, SpellError, LanguageType *, pLang ) +void SwView::SpellError(LanguageType eLang) { #if OSL_DEBUG_LEVEL > 1 sal_Bool bFocus = GetEditWin().HasFocus(); @@ -364,7 +364,6 @@ IMPL_LINK( SwView, SpellError, LanguageType *, pLang ) } while( pWrtShell->ActionPend() ); } - LanguageType eLang = pLang ? *pLang : LANGUAGE_NONE; String aErr(SvtLanguageTable::GetLanguageString( eLang ) ); SwEditWin &rEditWin = GetEditWin(); @@ -402,7 +401,6 @@ IMPL_LINK( SwView, SpellError, LanguageType *, pLang ) GetEditWin().GrabFocus(); #endif - return 0; } /*-------------------------------------------------------------------- @@ -588,8 +586,7 @@ void SwView::StartThesaurus() if( eLang == LANGUAGE_DONTKNOW || eLang == LANGUAGE_NONE ) { - LanguageType nLanguage = LANGUAGE_NONE; - SpellError( &nLanguage ); + SpellError( LANGUAGE_NONE ); return; } @@ -605,7 +602,7 @@ void SwView::StartThesaurus() AbstractThesaurusDialog *pDlg = NULL; if ( !xThes.is() || !xThes->hasLocale( SvxCreateLocale( eLang ) ) ) - SpellError( &eLang ); + SpellError( eLang ); else { // create dialog |