diff options
author | Lennard <Wasserthal@nefkom.net> | 2012-08-11 20:29:24 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-08-14 16:59:39 +0200 |
commit | 234738874f29ed23cd2aafb470511b5acf411e3c (patch) | |
tree | 1db5ce07198764ffd6ac0651256ef5f6736904e2 /drawinglayer | |
parent | 5321134c73dca4b7e7a191758f4691b71e49dcc7 (diff) |
Fixed Bug [35079]
Drawing: Fixed Custom Shape Frame-Selection Bounding box bug
Change-Id: Ia14feba446358cb195922477e0aa9576e9be2ae6
Signed-off-by: Lennard <Wasserthal@nefkom.net>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/baseprimitive2d.cxx | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index 54b23ed50930..df662759efa4 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -27,6 +27,7 @@ ************************************************************************/ #include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> #include <basegfx/tools/canvastools.hxx> @@ -121,25 +122,27 @@ namespace drawinglayer basegfx::B2DRange getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation) { basegfx::B2DRange aRetval; - if(rCandidate.is()) { - // try to get C++ implementation base - const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get())); - - if(pCandidate) - { - // use it if possible - aRetval.expand(pCandidate->getB2DRange(aViewInformation)); - } - else + //Ignores hidden primitives that may be malpositioned + if ((dynamic_cast< BasePrimitive2D*>(rCandidate.get()))->getPrimitive2DID() != PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D) { - // use UNO API call instead - const uno::Sequence< beans::PropertyValue >& rViewParameters(aViewInformation.getViewInformationSequence()); - aRetval.expand(basegfx::unotools::b2DRectangleFromRealRectangle2D(rCandidate->getRange(rViewParameters))); + // try to get C++ implementation base + const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get())); + + if(pCandidate) + { + // use it if possible + aRetval.expand(pCandidate->getB2DRange(aViewInformation)); + } + else + { + // use UNO API call instead + const uno::Sequence< beans::PropertyValue >& rViewParameters(aViewInformation.getViewInformationSequence()); + aRetval.expand(basegfx::unotools::b2DRectangleFromRealRectangle2D(rCandidate->getRange(rViewParameters))); + } } } - return aRetval; } |