Revert "Fixed Bug [35079]"

The commit completely breaks slide transitions (and probably other
things as well).

This reverts commit 234738874f.
This commit is contained in:
David Tardon
2012-08-17 10:01:50 +02:00
parent ad031fd4bd
commit 19d13fd16e

View File

@@ -27,7 +27,6 @@
************************************************************************/ ************************************************************************/
#include <drawinglayer/primitive2d/baseprimitive2d.hxx> #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx>
#include <basegfx/tools/canvastools.hxx> #include <basegfx/tools/canvastools.hxx>
@@ -122,27 +121,25 @@ namespace drawinglayer
basegfx::B2DRange getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation) basegfx::B2DRange getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation)
{ {
basegfx::B2DRange aRetval; basegfx::B2DRange aRetval;
if(rCandidate.is()) if(rCandidate.is())
{ {
//Ignores hidden primitives that may be malpositioned // try to get C++ implementation base
if ((dynamic_cast< BasePrimitive2D*>(rCandidate.get()))->getPrimitive2DID() != PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D) const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get()));
{
// try to get C++ implementation base
const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get()));
if(pCandidate) if(pCandidate)
{ {
// use it if possible // use it if possible
aRetval.expand(pCandidate->getB2DRange(aViewInformation)); aRetval.expand(pCandidate->getB2DRange(aViewInformation));
} }
else else
{ {
// use UNO API call instead // use UNO API call instead
const uno::Sequence< beans::PropertyValue >& rViewParameters(aViewInformation.getViewInformationSequence()); const uno::Sequence< beans::PropertyValue >& rViewParameters(aViewInformation.getViewInformationSequence());
aRetval.expand(basegfx::unotools::b2DRectangleFromRealRectangle2D(rCandidate->getRange(rViewParameters))); aRetval.expand(basegfx::unotools::b2DRectangleFromRealRectangle2D(rCandidate->getRange(rViewParameters)));
}
} }
} }
return aRetval; return aRetval;
} }