summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/app/tmplctrl.cxx2
-rw-r--r--sd/source/ui/dlg/navigatr.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx2
-rw-r--r--sd/source/ui/view/drviews3.cxx2
-rw-r--r--sd/source/ui/view/drviewsj.cxx2
-rw-r--r--sd/source/ui/view/sdview.cxx3
6 files changed, 8 insertions, 7 deletions
diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx
index fd9d27da3d1d..62d3ba6336a1 100644
--- a/sd/source/ui/app/tmplctrl.cxx
+++ b/sd/source/ui/app/tmplctrl.cxx
@@ -97,7 +97,7 @@ void SdTemplateControl::Paint( const UserDrawEvent& )
void SdTemplateControl::Command( const CommandEvent& rCEvt )
{
- if ( !(rCEvt.GetCommand() == CommandEventId::ContextMenu && !GetStatusBar().GetItemText( GetId() ).isEmpty()) )
+ if ( rCEvt.GetCommand() != CommandEventId::ContextMenu || GetStatusBar().GetItemText( GetId() ).isEmpty() )
return;
SfxViewFrame* pViewFrame = SfxViewFrame::Current();
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 21185602e2bb..7dc5177fc8b2 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -673,7 +673,7 @@ SdNavigatorControllerItem::SdNavigatorControllerItem(
void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId,
SfxItemState eState, const SfxPoolItem* pItem )
{
- if( !(eState >= SfxItemState::DEFAULT && nSId == SID_NAVIGATOR_STATE) )
+ if( eState < SfxItemState::DEFAULT || nSId != SID_NAVIGATOR_STATE )
return;
const SfxUInt32Item& rStateItem = dynamic_cast<const SfxUInt32Item&>(*pItem);
@@ -739,7 +739,7 @@ SdPageNameControllerItem::SdPageNameControllerItem(
void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId,
SfxItemState eState, const SfxPoolItem* pItem )
{
- if( !(eState >= SfxItemState::DEFAULT && nSId == SID_NAVIGATOR_PAGENAME) )
+ if( eState < SfxItemState::DEFAULT || nSId != SID_NAVIGATOR_PAGENAME )
return;
// only if doc in LB is the active
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 932f8e6da24f..1efdd922277a 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -1386,7 +1386,7 @@ void MultiSelectionModeHandler::UpdateSelection()
maSecondCorner,
false,
false));
- if (!(nIndexUnderMouse>=0 && nIndexUnderMouse<nPageCount))
+ if (nIndexUnderMouse < 0 || nIndexUnderMouse >= nPageCount)
return;
if (mnAnchorIndex < 0)
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index f6358f3629c2..2883be985b46 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -148,7 +148,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
sal_Int32 nWhatPage = static_cast<sal_Int32>(pWhatPage->GetValue ());
PageKind nWhatKind = static_cast<PageKind>(pWhatKind->GetValue ());
- if (! (nWhatKind >= PageKind::Standard && nWhatKind <= PageKind::Handout))
+ if (nWhatKind < PageKind::Standard || nWhatKind > PageKind::Handout)
{
#if HAVE_FEATURE_SCRIPTING
StarBASIC::FatalError (ERRCODE_BASIC_BAD_PROP_VALUE);
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 772cf4a48ddb..372cb555ebdf 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -141,7 +141,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
}
// If it is not a group object, we disable "ungroup"
- if(!(dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && nInv == SdrInventor::Default))
+ if(dynamic_cast< const SdrObjGroup *>( pObj ) == nullptr || nInv != SdrInventor::Default)
{
rSet.DisableItem(SID_UNGROUP);
}
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 12470903d5a3..28e163e5bebc 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -180,7 +180,8 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
{
const bool bDoCreateGeometry(pObject->getSdrPageFromSdrObject()->checkVisibility( rOriginal, rDisplayInfo, true ));
- if(!bDoCreateGeometry && !(( pObject->GetObjInventor() == SdrInventor::Default ) && ( pObject->GetObjIdentifier() == OBJ_PAGE )) )
+ if(!bDoCreateGeometry &&
+ (( pObject->GetObjInventor() != SdrInventor::Default ) || ( pObject->GetObjIdentifier() != OBJ_PAGE )) )
return xRetval;
PresObjKind eKind(PresObjKind::NONE);