diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 10:41:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 12:16:48 +0200 |
commit | fd80650672d5d3a0b585d6d46a1b1b0cd4012faf (patch) | |
tree | ca23283c97c9bb16594ff3d3abd6d97a4c163bb7 /sw/source/uibase/uno/dlelstnr.cxx | |
parent | 1c080b887c1ef28cb2e98173d0121bcae3167075 (diff) |
loplugin:flatten in sw/uibase/sidebar..sw/uibase/uno
Change-Id: Ifc9c838ffc94e89d2049969ef28d66fed853548b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99765
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/uno/dlelstnr.cxx')
-rw-r--r-- | sw/source/uibase/uno/dlelstnr.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/uibase/uno/dlelstnr.cxx b/sw/source/uibase/uno/dlelstnr.cxx index aeb72b54056f..76a66603928b 100644 --- a/sw/source/uibase/uno/dlelstnr.cxx +++ b/sw/source/uibase/uno/dlelstnr.cxx @@ -83,19 +83,19 @@ void SAL_CALL SwLinguServiceEventListener::processLinguServiceEvent( { SwModule::CheckSpellChanges( false, bIsSpellWrong, bIsSpellAll, false ); } - if (rLngSvcEvent.nEvent & HYPHENATE_AGAIN) - { - SwView *pSwView = SwModule::GetFirstView(); + if (!(rLngSvcEvent.nEvent & HYPHENATE_AGAIN)) + return; - //!! since this function may be called within the ctor of - //!! SwView (during formatting) where the WrtShell is not yet - //!! created, we have to check for the WrtShellPtr to see - //!! if it is already available - while (pSwView && pSwView->GetWrtShellPtr()) - { - pSwView->GetWrtShell().ChgHyphenation(); - pSwView = SwModule::GetNextView( pSwView ); - } + SwView *pSwView = SwModule::GetFirstView(); + + //!! since this function may be called within the ctor of + //!! SwView (during formatting) where the WrtShell is not yet + //!! created, we have to check for the WrtShellPtr to see + //!! if it is already available + while (pSwView && pSwView->GetWrtShellPtr()) + { + pSwView->GetWrtShell().ChgHyphenation(); + pSwView = SwModule::GetNextView( pSwView ); } } |