summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-11-17 11:04:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-11-17 11:04:56 +0100
commit1b3f795c8e993fa9a8b76f84292041d3d22523dc (patch)
tree91df2a4fbe9b3370a84f789fbf867a994f59acf3
parentd8a8149e1550ca435b35a421b97070266914f49f (diff)
suspicious cast from 'bool' to 'sal_Bool' [loplugin:salbool]
Change-Id: I28b52faa71bb198ee34ae4893e4610aa83773645
-rw-r--r--sw/source/core/unocore/unoobj2.cxx6
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx2
-rw-r--r--sw/source/core/unocore/unoportenum.cxx2
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx2
5 files changed, 7 insertions, 7 deletions
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<sal_Bool>(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<sal_Bool>(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<sal_Bool>(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<sal_Bool>(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<sal_Bool>(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<sal_Bool>(!pFormShell || pFormShell->IsDesignMode());
+ return !pFormShell || pFormShell->IsDesignMode();
}
void SAL_CALL SwXTextView::setFormDesignMode( sal_Bool _DesignMode ) throw (RuntimeException, std::exception)