[Libreoffice-commits] .: 2 commits - drawinglayer/inc drawinglayer/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Tue Aug 14 08:01:51 PDT 2012
drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx | 2
drawinglayer/source/primitive2d/baseprimitive2d.cxx | 31 +++++-----
2 files changed, 18 insertions(+), 15 deletions(-)
New commits:
commit 234738874f29ed23cd2aafb470511b5acf411e3c
Author: Lennard <Wasserthal at nefkom.net>
Date: Sat Aug 11 20:29:24 2012 +0200
Fixed Bug [35079]
Drawing: Fixed Custom Shape Frame-Selection Bounding box bug
Change-Id: Ia14feba446358cb195922477e0aa9576e9be2ae6
Signed-off-by: Lennard <Wasserthal at nefkom.net>
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index 54b23ed..df66275 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;
}
commit 5321134c73dca4b7e7a191758f4691b71e49dcc7
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Tue Aug 14 16:56:28 2012 +0200
drawinglayer: fixed file name in a comment
Change-Id: Ia27b38a2eb027a987990d55cbe8b9951b7d384f7
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
index 5b7c32f..ecab8e9 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -168,7 +168,7 @@ namespace drawinglayer
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
/** provide unique ID for fast identifying of known primitive implementations in renderers. These use
- the the defines from primitivetypes2d.hxx to define unique IDs.
+ the the defines from drawinglayer_primitivetypes2d.hxx to define unique IDs.
This method is normally defined using DeclPrimitrive2DIDBlock()
*/
virtual sal_uInt32 getPrimitive2DID() const = 0;
More information about the Libreoffice-commits
mailing list