diff options
Diffstat (limited to 'svx/source/sdr/contact/viewobjectcontactofgroup.cxx')
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofgroup.cxx | 69 |
1 files changed, 37 insertions, 32 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx index 47c2cccbd02d..392b8e923212 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx @@ -57,51 +57,56 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGroup::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const { - const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount()); + drawinglayer::primitive2d::Primitive2DSequence xRetval; - if(nSubHierarchyCount) + // check model-view visibility + if(isPrimitiveVisible(rDisplayInfo)) { - const sal_Bool bDoGhostedDisplaying( - GetObjectContact().DoVisualizeEnteredGroup() - && !GetObjectContact().isOutputToPrinter() - && GetObjectContact().getActiveViewContact() == &GetViewContact()); + const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount()); - if(bDoGhostedDisplaying) + if(nSubHierarchyCount) { - rDisplayInfo.ClearGhostedDrawMode(); - } + const sal_Bool bDoGhostedDisplaying( + GetObjectContact().DoVisualizeEnteredGroup() + && !GetObjectContact().isOutputToPrinter() + && GetObjectContact().getActiveViewContact() == &GetViewContact()); - // create object hierarchy - drawinglayer::primitive2d::Primitive2DSequence xRetval(getPrimitive2DSequenceSubHierarchy(rDisplayInfo)); + if(bDoGhostedDisplaying) + { + rDisplayInfo.ClearGhostedDrawMode(); + } - if(xRetval.hasElements()) - { - // get ranges - const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D()); - const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D)); - const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport()); + // create object hierarchy + xRetval = getPrimitive2DSequenceSubHierarchy(rDisplayInfo); - // check geometrical visibility - if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange)) + if(xRetval.hasElements()) { - // not visible, release - xRetval.realloc(0); + // get ranges + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D()); + const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D)); + const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport()); + + // check geometrical visibility + if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange)) + { + // not visible, release + xRetval.realloc(0); + } } - } - if(bDoGhostedDisplaying) + if(bDoGhostedDisplaying) + { + rDisplayInfo.SetGhostedDrawMode(); + } + } + else { - rDisplayInfo.SetGhostedDrawMode(); + // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence + // which creates the replacement primitives for an empty group + xRetval = ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo); } - - return xRetval; - } - else - { - // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence - // which creates the replacement primitives for an empty group - return ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo); } + return xRetval; } } // end of namespace contact } // end of namespace sdr |