diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-10 10:50:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-10 21:46:39 +0000 |
commit | 33c2688e91164e162e38aca5bc1d066b6063b5fd (patch) | |
tree | 172b342da3c643d8feafb05701e511270328df0f /svx | |
parent | 7d83d0fe0400b17311c0da5072bf9a4dafb5a250 (diff) |
rearrange this a little, no logic change
Change-Id: Ia5dd68ab8b7e4fe93caf0e79a27922abf02b97b6
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdviter.cxx | 95 |
1 files changed, 43 insertions, 52 deletions
diff --git a/svx/source/svdraw/svdviter.cxx b/svx/source/svdraw/svdviter.cxx index f7bc7005d9a9..1078dc76a1b9 100644 --- a/svx/source/svdraw/svdviter.cxx +++ b/svx/source/svdraw/svdviter.cxx @@ -70,71 +70,62 @@ SdrViewIter::SdrViewIter(const SdrObject* pObject, bool bNoMasterPage) bool SdrViewIter::ImpCheckPageView(SdrPageView* pPV) const { - if(mpPage) - { - bool bMaster(mpPage->IsMasterPage()); - SdrPage* pPg = pPV->GetPage(); + if(!mpPage) + return true; - if(pPg == mpPage) + bool bMaster(mpPage->IsMasterPage()); + SdrPage* pPg = pPV->GetPage(); + + if(pPg == mpPage) + { + if(mpObject) { - if(mpObject) - { - // Looking for an object? First, determine if it visible in - // this PageView. - SetOfByte aObjLay; - mpObject->getMergedHierarchyLayerSet(aObjLay); - aObjLay &= pPV->GetVisibleLayers(); - return !aObjLay.IsEmpty(); - } - else - { - return true; - } + // Looking for an object? First, determine if it visible in + // this PageView. + SetOfByte aObjLay; + mpObject->getMergedHierarchyLayerSet(aObjLay); + aObjLay &= pPV->GetVisibleLayers(); + return !aObjLay.IsEmpty(); } else { - if(!mbNoMasterPage && bMaster && (!mpObject || !mpObject->IsNotVisibleAsMaster())) + return true; + } + } + else if(!mbNoMasterPage && bMaster && (!mpObject || !mpObject->IsNotVisibleAsMaster())) + { + if(pPg->TRG_HasMasterPage()) + { + SdrPage& rMasterPage = pPg->TRG_GetMasterPage(); + + if(&rMasterPage == mpPage) { - if(pPg->TRG_HasMasterPage()) + // the page we're looking for is a master page in this PageView + if(mpObject) { - SdrPage& rMasterPage = pPg->TRG_GetMasterPage(); - - if(&rMasterPage == mpPage) + // Looking for an object? First, determine if it visible in + // this PageView. + SetOfByte aObjLay; + mpObject->getMergedHierarchyLayerSet(aObjLay); + aObjLay &= pPV->GetVisibleLayers(); + aObjLay &= pPg->TRG_GetMasterPageVisibleLayers(); + + if(!aObjLay.IsEmpty()) { - // the page we're looking for is a master page in this PageView - if(mpObject) - { - // Looking for an object? First, determine if it visible in - // this PageView. - SetOfByte aObjLay; - mpObject->getMergedHierarchyLayerSet(aObjLay); - aObjLay &= pPV->GetVisibleLayers(); - aObjLay &= pPg->TRG_GetMasterPageVisibleLayers(); - - if(!aObjLay.IsEmpty()) - { - return true; - } // else, look at the next master page of this page... - } - else - { - return true; - } - } + return true; + } // else, look at the next master page of this page... + } + else + { + return true; } } - - // master page forbidden or no fitting master page found - return false; } } - else - { - return true; - } -} - + // master page forbidden or no fitting master page found + return false; +} SdrView* SdrViewIter::ImpFindView() { |