diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-24 11:49:21 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-24 11:49:21 +0100 |
commit | 137480e9aafbb47f06ad8558574cc5210dc0dc39 (patch) | |
tree | a4f2f15702fd6e21ba4fabe247701c243033fbd7 | |
parent | 9820a8b2a0d89c355db5a363857c410125b54214 (diff) |
bool improvements
Change-Id: I7b66909d467f460d674434ae47c11808d1bf832d
-rw-r--r-- | sw/source/core/draw/dview.cxx | 12 |
1 files 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( "<SwDrawView::CheckPossibilities()> - 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 <SwDrawVirtObj>-objects by its reference object for delete marked objects. |