Kaydet (Commit) 53c907aa authored tarafından Mike Kaganski's avatar Mike Kaganski

Simplify conditions a bit

bOn is implied when nCount is > 0

Change-Id: I77939668445603a22ae9ea56a7d272ca650c5c1c
Reviewed-on: https://gerrit.libreoffice.org/62499
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 19a06980
...@@ -490,8 +490,8 @@ void SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf ) ...@@ -490,8 +490,8 @@ void SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf )
OSL_ENSURE( !bTopRule, "DrawTextOpaque: Wrong TopRule" ); OSL_ENSURE( !bTopRule, "DrawTextOpaque: Wrong TopRule" );
// #i68520# // #i68520#
SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); const SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 );
if ( bOn && nCount > 0 ) if (nCount > 0)
{ {
const SdrLayerID nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); const SdrLayerID nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId();
for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i )
...@@ -576,8 +576,8 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect ) ...@@ -576,8 +576,8 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect )
SwRegionRects aRegion( rRect ); SwRegionRects aRegion( rRect );
OSL_ENSURE( !bTopRule, "DrawFlyRect: Wrong TopRule" ); OSL_ENSURE( !bTopRule, "DrawFlyRect: Wrong TopRule" );
// #i68520# // #i68520#
SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); const SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 );
if ( bOn && nCount > 0 ) if (nCount > 0)
{ {
const SdrLayerID nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId(); const SdrLayerID nHellId = pPage->getRootFrame()->GetCurrShell()->getIDocumentDrawModelAccess().GetHellId();
for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i )
...@@ -1001,8 +1001,8 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const ...@@ -1001,8 +1001,8 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const
bool bRet = false; bool bRet = false;
// #i68520# // #i68520#
SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 ); const SwAnchoredObjList::size_type nCount( bOn ? GetAnchoredObjList()->size() : 0 );
if ( bOn && nCount > 0 ) if (nCount > 0)
{ {
for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i ) for( SwAnchoredObjList::size_type i = 0; i < nCount; ++i )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment