diff options
25 files changed, 52 insertions, 53 deletions
diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx index 4f2db5a41376..d941b6fbb581 100644 --- a/include/svx/graphctl.hxx +++ b/include/svx/graphctl.hxx @@ -104,7 +104,7 @@ public: SdrModel* GetSdrModel() const { return pModel; } SdrView* GetSdrView() const { return pView; } SdrObject* GetSelectedSdrObject() const; - bool IsChanged() const { return bSdrMode ? pModel->IsChanged() : false; } + bool IsChanged() const { return bSdrMode && pModel->IsChanged(); } void SetMousePosLink( const Link& rLink ) { aMousePosLink = rLink; } const Link& GetMousePosLink() const { return aMousePosLink; } diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index d148e9adbc47..a189d195496c 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -306,7 +306,7 @@ bool SvxSuperContourDlg::Close() bRet = false; } - return( bRet ? SfxFloatingWindow::Close() : false ); + return bRet && SfxFloatingWindow::Close(); } // Enabled or disabled all Controls diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index b90df70e737d..76470da30158 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -251,7 +251,7 @@ bool SvxIMapDlg::Close() bRet = false; } - return( bRet ? SfxModelessDialog::Close() : false ); + return bRet && SfxModelessDialog::Close(); } // Enabled or disable all Controls diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 40ce13a0c0ad..950a11af2a71 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -347,8 +347,8 @@ sal_Int32 SvxLanguageBoxBase::ImplInsertLanguage( const LanguageType nLangType, if ( xSpell.is() ) m_pSpellUsedLang = new Sequence< sal_Int16 >( xSpell->getLanguages() ); } - bFound = m_pSpellUsedLang ? - lcl_SeqHasLang( *m_pSpellUsedLang, nRealLang ) : false; + bFound = m_pSpellUsedLang && + lcl_SeqHasLang( *m_pSpellUsedLang, nRealLang ); nAt = ImplInsertImgEntry( aStrEntry, nPos, bFound ); } diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx index d87ddabb5826..4822c1be155f 100644 --- a/svx/source/dialog/rlrcitem.cxx +++ b/svx/source/dialog/rlrcitem.cxx @@ -62,14 +62,14 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState, case SID_ATTR_LONG_LRSPACE: { const SvxLongLRSpaceItem *pItem = PTR_CAST(SvxLongLRSpaceItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SvxLRSpaceItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxLRSpaceItem expected"); rRuler.UpdateFrame(pItem); break; } case SID_ATTR_LONG_ULSPACE: { const SvxLongULSpaceItem *pItem = PTR_CAST(SvxLongULSpaceItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SvxULSpaceItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxULSpaceItem expected"); rRuler.UpdateFrame(pItem); break; } @@ -77,7 +77,7 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState, case SID_ATTR_TABSTOP: { const SvxTabStopItem *pItem = PTR_CAST(SvxTabStopItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SvxTabStopItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxTabStopItem expected"); rRuler.Update(pItem); break; } @@ -85,7 +85,7 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState, case SID_ATTR_PARA_LRSPACE: { const SvxLRSpaceItem *pItem = PTR_CAST(SvxLRSpaceItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SvxLRSpaceItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxLRSpaceItem expected"); rRuler.UpdatePara(pItem); break; } @@ -95,7 +95,7 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState, case SID_RULER_ROWS_VERTICAL: { const SvxColumnItem *pItem = PTR_CAST(SvxColumnItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SvxColumnItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxColumnItem expected"); #ifdef DBG_UTIL if(pItem) { @@ -114,35 +114,35 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState, case SID_RULER_PAGE_POS: { // Position page, page width const SvxPagePosSizeItem *pItem = PTR_CAST(SvxPagePosSizeItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SvxPagePosSizeItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxPagePosSizeItem expected"); rRuler.Update(pItem); break; } case SID_RULER_OBJECT: { // Object selection const SvxObjectItem *pItem = PTR_CAST(SvxObjectItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SvxObjectItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxObjectItem expected"); rRuler.Update(pItem); break; } case SID_RULER_PROTECT: { const SvxProtectItem *pItem = PTR_CAST(SvxProtectItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SvxProtectItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxProtectItem expected"); rRuler.Update(pItem); break; } case SID_RULER_BORDER_DISTANCE: { const SvxLRSpaceItem *pItem = PTR_CAST(SvxLRSpaceItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SvxLRSpaceItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxLRSpaceItem expected"); rRuler.UpdateParaBorder(pItem); } break; case SID_RULER_TEXT_RIGHT_TO_LEFT : { const SfxBoolItem *pItem = PTR_CAST(SfxBoolItem, pState); - DBG_ASSERT(pState? 0 != pItem: true, "SfxBoolItem expected"); + DBG_ASSERT(pState == nullptr || pItem != nullptr, "SfxBoolItem expected"); rRuler.UpdateTextRTL(pItem); } break; diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index c0e565c1ec70..9c8146dd2ba8 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -2348,7 +2348,7 @@ void SvxRuler::ApplyBorders() #endif // DEBUGLIN SfxBoolItem aFlag(SID_RULER_ACT_LINE_ONLY, - nDragType & DRAG_OBJECT_ACTLINE_ONLY ? true : false); + (nDragType & DRAG_OBJECT_ACTLINE_ONLY) != 0); sal_uInt16 nColId = mxRulerImpl->bIsTableRows ? (bHorz ? SID_RULER_ROWS : SID_RULER_ROWS_VERTICAL) : (bHorz ? SID_RULER_BORDERS : SID_RULER_BORDERS_VERTICAL); @@ -3021,7 +3021,7 @@ void SvxRuler::CalcMinMax() { if(mxObjectItem->HasLimits()) { - if(CalcLimits(nMaxLeft, nMaxRight, nIdx & 1? false : true)) + if(CalcLimits(nMaxLeft, nMaxRight, (nIdx & 1) == 0)) { nMaxLeft = ConvertPosPixel(nMaxLeft); nMaxRight = ConvertPosPixel(nMaxRight); diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 70a173b9add7..35ab86b85636 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -689,7 +689,7 @@ void SvxSwFrameExample::Paint(const Rectangle&) DrawRect_Impl(aRect, m_aTransColor, m_aAlignColor); // Frame View - bool bDontFill = (nAnchor == TextContentAnchorType_AT_CHARACTER && aFrmRect.IsOver(aAutoCharFrame)) ? true : bTrans; + bool bDontFill = (nAnchor == TextContentAnchorType_AT_CHARACTER && aFrmRect.IsOver(aAutoCharFrame)) || bTrans; DrawRect_Impl( aFrmRect, bDontFill? m_aTransColor : m_aBgCol, m_aFrameColor ); } diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index c69cd50f04f8..cb489b02451d 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -955,7 +955,7 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe if ( eInspectorAction != eNone ) { FmInterfaceItem aIFaceItem( SID_FM_SHOW_PROPERTY_BROWSER, xColumnToInspect ); - SfxBoolItem aShowItem( SID_FM_SHOW_PROPERTIES, eInspectorAction == eCloseInspector ? false : true ); + SfxBoolItem aShowItem( SID_FM_SHOW_PROPERTIES, eInspectorAction != eCloseInspector ); pCurrentFrame->GetBindings().GetDispatcher()->Execute( SID_FM_SHOW_PROPERTY_BROWSER, SfxCallMode::ASYNCHRON, &aIFaceItem, &aShowItem, 0L ); diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index ba536d1e723e..9d2b7c278081 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -614,7 +614,7 @@ void FmFormShell::Execute(SfxRequest &rReq) { // PropertyBrowser anzeigen SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSlot, false); - bool bShow = pShowItem ? pShowItem->GetValue() : true; + bool bShow = pShowItem == nullptr || pShowItem->GetValue(); InterfaceBag aOnlyTheForm; aOnlyTheForm.insert( Reference< XInterface >( GetImpl()->getCurrentForm(), UNO_QUERY ) ); @@ -628,7 +628,7 @@ void FmFormShell::Execute(SfxRequest &rReq) case SID_FM_CTL_PROPERTIES: { SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSlot, false); - bool bShow = pShowItem ? pShowItem->GetValue() : true; + bool bShow = pShowItem == nullptr || pShowItem->GetValue(); OSL_ENSURE( GetImpl()->onlyControlsAreMarked(), "FmFormShell::Execute: ControlProperties should be disabled!" ); if ( bShow ) diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 78e7331711d2..3b13e0402c15 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -2733,8 +2733,8 @@ bool FmXFormShell::IsPropBrwOpen() const if ( impl_checkDisposed() ) return false; - return( ( m_pShell->GetViewShell() && m_pShell->GetViewShell()->GetViewFrame() ) ? - m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow(SID_FM_SHOW_PROPERTIES) : false ); + return m_pShell->GetViewShell() && m_pShell->GetViewShell()->GetViewFrame() + && m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow(SID_FM_SHOW_PROPERTIES); } diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index 84789afbd88f..b4900cee83a4 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -299,7 +299,7 @@ void FmFormView::ChangeDesignMode(bool bDesign) else { // set the auto focus to the first control (if indicated by the model to do so) - bool bForceControlFocus = pModel ? pModel->GetAutoControlFocus() : false; + bool bForceControlFocus = pModel && pModel->GetAutoControlFocus(); if (bForceControlFocus) pImpl->AutoFocus(); } diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 70d1da989a65..1a480441d48e 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -1616,8 +1616,8 @@ bool FormController::determineLockState() const if (m_bFiltering || !xResultSet.is() || !isRowSetAlive(xResultSet)) return true; else - return (m_bCanInsert && m_bCurrentRecordNew) ? false - : xResultSet->isBeforeFirst() || xResultSet->isAfterLast() || xResultSet->rowDeleted() || !m_bCanUpdate; + return !(m_bCanInsert && m_bCurrentRecordNew) + && (xResultSet->isBeforeFirst() || xResultSet->isAfterLast() || xResultSet->rowDeleted() || !m_bCanUpdate); } // FocusListener diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 8c1a906d0eab..b78e985ed94a 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -662,7 +662,7 @@ void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eSt mpTbxIndent_IncDec->EnableItem( nSID == SID_INC_INDENT ? nIdIncrIndent : nIdDecrIndent, - ( pState && eState == SfxItemState::UNKNOWN ) ? true : false ); + pState && eState == SfxItemState::UNKNOWN ); } } diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 70734e9be2d7..d15f9c0c5a25 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -561,7 +561,7 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj, bool bScale) aPoly, maClip, true, - aPoly.isClosed() ? false : true)); + !aPoly.isClosed())); const basegfx::B2DRange aNewRange(aNewPoly.getB2DRange()); if(!aNewRange.isEmpty()) diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 93141e73ca8a..1bb16bc1873d 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1474,8 +1474,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev) E3dScene* pScene = NULL; SdrObject* pObjHit = (bPrev) ? pBtmObjHit : pTopObjHit; bool bRemap = pObjHit->ISA(E3dCompoundObject) - ? static_cast<E3dCompoundObject*>(pObjHit)->IsAOrdNumRemapCandidate(pScene) - : false; + && static_cast<E3dCompoundObject*>(pObjHit)->IsAOrdNumRemapCandidate(pScene); if(bPrev) { diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 24b6923c5a56..0434d6918a2a 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -1148,7 +1148,7 @@ void SdrCircObj::ImpSetCircInfoToAttr() SdrObject* SdrCircObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const { - const bool bFill(OBJ_CARC == meCircleKind ? false : true); + const bool bFill(meCircleKind != OBJ_CARC); const basegfx::B2DPolygon aCircPolygon(ImpCalcXPolyCirc(meCircleKind, maRect, nStartAngle, nEndAngle)); SdrObject* pRet = ImpConvertMakeObj(basegfx::B2DPolyPolygon(aCircPolygon), bFill, bBezier); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 5eb6fe4bb1ab..1cde6ffdc7af 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1793,20 +1793,20 @@ long SdrTextObj::GetMaxTextFrameWidth() const bool SdrTextObj::IsFontwork() const { - return (bTextFrame) ? false // Default is FALSE - : static_cast<const XFormTextStyleItem&>(GetObjectItemSet().Get(XATTR_FORMTXTSTYLE)).GetValue() != XFT_NONE; + return !bTextFrame // Default is FALSE + && static_cast<const XFormTextStyleItem&>(GetObjectItemSet().Get(XATTR_FORMTXTSTYLE)).GetValue() != XFT_NONE; } bool SdrTextObj::IsHideContour() const { - return (bTextFrame) ? false // Default is: no, don't HideContour; HideContour not together with TextFrames - : static_cast<const XFormTextHideFormItem&>(GetObjectItemSet().Get(XATTR_FORMTXTHIDEFORM)).GetValue(); + return !bTextFrame // Default is: no, don't HideContour; HideContour not together with TextFrames + && static_cast<const XFormTextHideFormItem&>(GetObjectItemSet().Get(XATTR_FORMTXTHIDEFORM)).GetValue(); } bool SdrTextObj::IsContourTextFrame() const { - return (bTextFrame) ? false // ContourFrame not together with normal TextFrames - : static_cast<const SdrOnOffItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(); + return !bTextFrame // ContourFrame not together with normal TextFrames + && static_cast<const SdrOnOffItem&>(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(); } long SdrTextObj::GetTextLeftDistance() const diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 52568f11a078..6d053e47ddb3 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -92,7 +92,7 @@ namespace maFont(rInfo.mrFont), maDblDXArray(), maLocale(rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale()), - mbRTL(rInfo.mrFont.IsVertical() ? false : rInfo.IsRTL()) + mbRTL(!rInfo.mrFont.IsVertical() && rInfo.IsRTL()) { if(mnTextLength && rInfo.mpDXArray) { diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 1ac3a8f28577..74665329c8a6 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -1736,32 +1736,32 @@ SdrUndoAction* SdrUndoFactory::CreateUndoGeoObject( SdrObject& rObject ) SdrUndoAction* SdrUndoFactory::CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText ) { - return new SdrUndoAttrObj( rObject, bStyleSheet1 ? true : false, bSaveText ? true : false ); + return new SdrUndoAttrObj( rObject, bStyleSheet1, bSaveText ); } SdrUndoAction* SdrUndoFactory::CreateUndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoRemoveObj( rObject, bOrdNumDirect ? true : false ); + return new SdrUndoRemoveObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoInsertObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoInsertObj( rObject, bOrdNumDirect ? true : false ); + return new SdrUndoInsertObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoDelObj( rObject, bOrdNumDirect ? true : false ); + return new SdrUndoDelObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoNewObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoNewObj( rObject, bOrdNumDirect ? true : false ); + return new SdrUndoNewObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect ) { - return new SdrUndoCopyObj( rObject, bOrdNumDirect ? true : false ); + return new SdrUndoCopyObj( rObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1) @@ -1771,7 +1771,7 @@ SdrUndoAction* SdrUndoFactory::CreateUndoObjectOrdNum( SdrObject& rObject, sal_u SdrUndoAction* SdrUndoFactory::CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect ) { - return new SdrUndoReplaceObj( rOldObject, rNewObject, bOrdNumDirect ? true : false ); + return new SdrUndoReplaceObj( rOldObject, rNewObject, bOrdNumDirect ); } SdrUndoAction* SdrUndoFactory::CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer ) diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 7270573c2529..c949cc6b9012 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -519,7 +519,7 @@ void SdrTableObjImpl::DragEdge( bool mbHorizontal, int nEdge, sal_Int32 nOffset //Todo: Implement Dragging functionality for leftmost edge of table. if( (nEdge >= 0) && (nEdge <= getColumnCount()) ) { - const bool bRTL = !mpTableObj? false: (mpTableObj->GetWritingMode() == WritingMode_RL_TB); + const bool bRTL = mpTableObj != nullptr && (mpTableObj->GetWritingMode() == WritingMode_RL_TB); sal_Int32 nWidth; if(bRTL) { diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 440287eed77f..9848f65e8692 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -241,7 +241,7 @@ bool SvxTableController::onKeyInput(const KeyEvent& rKEvt, vcl::Window* pWindow sal_uInt16 nAction = getKeyboardAction( rKEvt, pWindow ); - return executeAction( nAction, ( rKEvt.GetKeyCode().IsShift() ) ? true : false, pWindow ); + return executeAction( nAction, rKEvt.GetKeyCode().IsShift(), pWindow ); } diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 13029b6f1b24..ff4dc5e53050 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -48,7 +48,7 @@ namespace svx , maCurColor(COL_TRANSPARENT) { DBG_ASSERT(pToolBox, "ToolBox not found :-("); - mbWasHiContrastMode = pToolBox ? pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode() : false; + mbWasHiContrastMode = pToolBox && pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode(); switch (mnSlotId) { case SID_ATTR_CHAR_COLOR: diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 9a9a2ccb4eaa..ccd5515e69d9 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1876,7 +1876,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c pObject->NbcMirror( aTop, aBottom ); // NbcMirroring is flipping the current mirror state, // so we have to set the correct state again - static_cast<SdrObjCustomShape*>(pObject)->SetMirroredX( bMirroredX ? false : true ); + static_cast<SdrObjCustomShape*>(pObject)->SetMirroredX( !bMirroredX ); } if ( bNeedsMirrorY ) { @@ -1885,7 +1885,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c pObject->NbcMirror( aLeft, aRight ); // NbcMirroring is flipping the current mirror state, // so we have to set the correct state again - static_cast<SdrObjCustomShape*>(pObject)->SetMirroredY( bMirroredY ? false : true ); + static_cast<SdrObjCustomShape*>(pObject)->SetMirroredY( !bMirroredY ); } if( pListCopy ) diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index d2ffe9d53bc6..1850e1d394f3 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -112,7 +112,7 @@ private: void SetupOutliner(); - bool HasView() const { return mpView ? true : false; } + bool HasView() const { return mpView != nullptr; } bool IsEditMode() const { SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject ); @@ -921,7 +921,7 @@ void SvxTextEditSourceImpl::unlock() bool SvxTextEditSourceImpl::IsValid() const { - return mpView && mpWindow ? true : false; + return mpView && mpWindow; } Rectangle SvxTextEditSourceImpl::GetVisArea() diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index c22a271d9995..7259401f2052 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -739,7 +739,7 @@ void SvXMLGraphicHelper::Init( const uno::Reference < embed::XStorage >& rXMLSto { mxRootStorage = rXMLStorage; meCreateMode = eCreateMode; - mbDirect = ( ( GRAPHICHELPER_MODE_READ == meCreateMode ) ? bDirect : true ); + mbDirect = meCreateMode != GRAPHICHELPER_MODE_READ || bDirect; } SvXMLGraphicHelper* SvXMLGraphicHelper::Create( const uno::Reference < embed::XStorage >& rXMLStorage, |