summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-07-16 13:54:32 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-07-16 14:00:20 +0200
commite7d7a1edb4a867d434a9b33c991a5ae9cded7a8e (patch)
treee5a79582f93d80d8936f6eaf140defff084b788a /sfx2
parentb36e8678bc6e6b272cc116dcd4fbdb90dca12e28 (diff)
loplugin:simplifybool
Change-Id: If72974c49113c64b3ac6269779c5013c554ebdcc
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/plugin.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx6
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index b5b0e14fb6f0..f51d38174b63 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -207,7 +207,7 @@ throw( uno::RuntimeException, std::exception )
// we must destroy the plugin before the parent is destroyed
xWindow->addEventListener( this );
xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
- return mxPlugin.is() ? sal_True : sal_False;
+ return mxPlugin.is();
}
return sal_False;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index f28a43b75056..0cd2ab3ac498 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1317,7 +1317,7 @@ sal_Bool SAL_CALL SfxBaseModel::isModified() throw(RuntimeException, std::except
{
SfxModelGuard aGuard( *this );
- return m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->IsModified() : sal_False;
+ return m_pData->m_pObjectShell.Is() && m_pData->m_pObjectShell->IsModified();
}
@@ -1480,7 +1480,7 @@ sal_Bool SAL_CALL SfxBaseModel::hasLocation() throw(RuntimeException, std::excep
{
SfxModelGuard aGuard( *this );
- return m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->HasName() : sal_False;
+ return m_pData->m_pObjectShell.Is() && m_pData->m_pObjectShell->HasName();
}
@@ -1511,7 +1511,7 @@ sal_Bool SAL_CALL SfxBaseModel::isReadonly() throw(RuntimeException, std::except
{
SfxModelGuard aGuard( *this );
- return m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->IsReadOnly() : sal_True;
+ return !m_pData->m_pObjectShell.Is() || m_pData->m_pObjectShell->IsReadOnly();
}
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 1ab147bc669e..42ef70985079 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -623,7 +623,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( Runtime
if (bool(bSuspend) == m_pData->m_bSuspendState)
return sal_True;
- if ( bSuspend == sal_True )
+ if ( bSuspend )
{
if ( !m_pData->m_pViewShell )
{