From 137480e9aafbb47f06ad8558574cc5210dc0dc39 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 24 Jan 2014 11:49:21 +0100 Subject: bool improvements Change-Id: I7b66909d467f460d674434ae47c11808d1bf832d --- sw/source/core/draw/dview.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 306d5ce0ff99..99fc36cf5dca 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -818,8 +818,8 @@ void SwDrawView::CheckPossibilities() //OLE-Objects may themselves wish a resize protection (StarMath) const SdrMarkList &rMrkList = GetMarkedObjectList(); - sal_Bool bProtect = sal_False, - bSzProtect = sal_False; + bool bProtect = false; + bool bSzProtect = false; for ( sal_uInt16 i = 0; !bProtect && i < rMrkList.GetMarkCount(); ++i ) { const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); @@ -842,7 +842,7 @@ void SwDrawView::CheckPossibilities() // than one Writer fly frame can be selected. // TODO/LATER: retrieve Aspect - from where?! - bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) ? sal_True : sal_False; + bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) != 0; // #i972: protect position if it is a Math object anchored 'as char' and baseline alignment is activated SwDoc* pDoc = Imp().GetShell()->GetDoc(); @@ -869,17 +869,17 @@ void SwDrawView::CheckPossibilities() if ( !pFrmFmt ) { OSL_FAIL( " - missing frame format" ); - bProtect = sal_True; + bProtect = true; } else if ((FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId()) && rMrkList.GetMarkCount() > 1 ) { - bProtect = sal_True; + bProtect = true; } } } bMoveProtect |= bProtect; - bResizeProtect |= bProtect | bSzProtect; + bResizeProtect |= bProtect || bSzProtect; } /// replace marked -objects by its reference object for delete marked objects. -- cgit