From 1b3f795c8e993fa9a8b76f84292041d3d22523dc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 17 Nov 2014 11:04:56 +0100 Subject: suspicious cast from 'bool' to 'sal_Bool' [loplugin:salbool] Change-Id: I28b52faa71bb198ee34ae4893e4610aa83773645 --- sw/source/core/unocore/unoobj2.cxx | 6 +++--- sw/source/core/unocore/unoparagraph.cxx | 2 +- sw/source/core/unocore/unoportenum.cxx | 2 +- sw/source/core/unocore/unorefmk.cxx | 2 +- sw/source/uibase/uno/unotxvw.cxx | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sw') diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index ed2db727b050..adc6bd005dee 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -538,7 +538,7 @@ SwXParagraphEnumeration::hasMoreElements() throw (uno::RuntimeException, std::ex { SolarMutexGuard aGuard; - return static_cast(m_pImpl->m_bFirstParagraph || m_pImpl->m_xNextPara.is()); + return m_pImpl->m_bFirstParagraph || m_pImpl->m_xNextPara.is(); } //!! compare to SwShellTableCrsr::FillRects() in viscrs.cxx @@ -1861,8 +1861,8 @@ SwXParaFrameEnumeration::hasMoreElements() throw (uno::RuntimeException, std::ex if (!m_pImpl->GetCursor()) throw uno::RuntimeException(); - return static_cast(m_pImpl->m_xNextObject.is() || - lcl_CreateNextObject(*m_pImpl->GetCursor(),m_pImpl->m_xNextObject, m_pImpl->m_Frames)); + return m_pImpl->m_xNextObject.is() || + lcl_CreateNextObject(*m_pImpl->GetCursor(),m_pImpl->m_xNextObject, m_pImpl->m_Frames); } uno::Any SAL_CALL SwXParaFrameEnumeration::nextElement() diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index a7a7395adc49..3acacd739615 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -1328,7 +1328,7 @@ uno::Type SAL_CALL SwXParagraph::getElementType() throw (uno::RuntimeException, sal_Bool SAL_CALL SwXParagraph::hasElements() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - return static_cast(GetTxtNode() != nullptr); + return GetTxtNode() != nullptr; } uno::Reference< text::XText > SAL_CALL diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 90e9700c1bda..039e60f94436 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -399,7 +399,7 @@ throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - return static_cast(m_Portions.size() > 0); + return m_Portions.size() > 0; } uno::Any SwXTextPortionEnumeration::nextElement() diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index ec1c4c4bccc4..9cc6a33a952b 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -1234,7 +1234,7 @@ SwXMeta::hasElements() throw (uno::RuntimeException, std::exception) { SolarMutexGuard g; - return static_cast(m_pImpl->GetRegisteredIn() != nullptr); + return m_pImpl->GetRegisteredIn() != nullptr; } // XEnumerationAccess diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 7f6682ef7fd9..8d3124660032 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -483,7 +483,7 @@ sal_Bool SAL_CALL SwXTextView::isFormDesignMode( ) throw (uno::RuntimeException SolarMutexGuard aGuard; SwView* pView2 = GetView(); FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL; - return static_cast(!pFormShell || pFormShell->IsDesignMode()); + return !pFormShell || pFormShell->IsDesignMode(); } void SAL_CALL SwXTextView::setFormDesignMode( sal_Bool _DesignMode ) throw (RuntimeException, std::exception) -- cgit