diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-07 10:55:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-07 13:10:29 +0200 |
commit | 35f9dec3645f7a4a8d1f7f9dfb62e28d73bc5244 (patch) | |
tree | 36be6e2e018ff56f0e2b757202bfbe6912bd5729 /lingucomponent/source/thesaurus/libnth | |
parent | 27d04f6dbf38aa28fb7215590d578c4567db5770 (diff) |
loplugin:flatten in lingucomponent
Change-Id: Ic0bf912a22e8efeae1a4f4864397f3f3d474c632
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91803
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent/source/thesaurus/libnth')
-rw-r--r-- | lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 7cab6c0770eb..e165d0962918 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -470,24 +470,24 @@ void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments ) { MutexGuard aGuard( GetLinguMutex() ); - if (!pPropHelper) + if (pPropHelper) + return; + + sal_Int32 nLen = rArguments.getLength(); + if (1 == nLen) { - sal_Int32 nLen = rArguments.getLength(); - if (1 == nLen) - { - Reference< XLinguProperties > xPropSet; - rArguments.getConstArray()[0] >>= xPropSet; - - //! Pointer allows for access of the non-UNO functions. - //! And the reference to the UNO-functions while increasing - //! the ref-count and will implicitly free the memory - //! when the object is no longer used. - pPropHelper = new PropertyHelper_Thesaurus( static_cast<XThesaurus *>(this), xPropSet ); - pPropHelper->AddAsPropListener(); //! after a reference is established - } - else - OSL_FAIL( "wrong number of arguments in sequence" ); + Reference< XLinguProperties > xPropSet; + rArguments.getConstArray()[0] >>= xPropSet; + + //! Pointer allows for access of the non-UNO functions. + //! And the reference to the UNO-functions while increasing + //! the ref-count and will implicitly free the memory + //! when the object is no longer used. + pPropHelper = new PropertyHelper_Thesaurus( static_cast<XThesaurus *>(this), xPropSet ); + pPropHelper->AddAsPropListener(); //! after a reference is established } + else + OSL_FAIL( "wrong number of arguments in sequence" ); } OUString Thesaurus::makeLowerCase(const OUString& aTerm, CharClass const * pCC) |