From 19d13fd16e11f366c60e560896f49afcabc8e747 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 17 Aug 2012 10:01:50 +0200 Subject: [PATCH] Revert "Fixed Bug [35079]" The commit completely breaks slide transitions (and probably other things as well). This reverts commit 234738874f29ed23cd2aafb470511b5acf411e3c. --- .../source/primitive2d/baseprimitive2d.cxx | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index df662759efa4..54b23ed50930 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -27,7 +27,6 @@ ************************************************************************/ #include -#include #include #include @@ -122,27 +121,25 @@ namespace drawinglayer basegfx::B2DRange getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation) { basegfx::B2DRange aRetval; + if(rCandidate.is()) { - //Ignores hidden primitives that may be malpositioned - if ((dynamic_cast< BasePrimitive2D*>(rCandidate.get()))->getPrimitive2DID() != PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D) - { - // try to get C++ implementation base - const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get())); + // 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))); - } + 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; }