diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2009-02-23 07:59:24 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2009-02-23 07:59:24 +0000 |
commit | fd96a21876dd23ea3d55ef993eb4cc6e8eef4d91 (patch) | |
tree | 814e37820ce9660259d2ac011a35ef98364cda19 /svx/source | |
parent | 6dd5fa4a48346ea9b7ff330204feb4f9817dca80 (diff) |
CWS-TOOLING: integrate CWS aw064_OOO310
2009-02-10 17:39:02 +0100 aw r267569 : #i98314# adapted texture size to object size
2009-02-05 15:26:16 +0100 aw r267427 : #i98532# added mirroring of redline info when RTL is on
2009-02-04 16:31:27 +0100 aw r267392 : #i98314# corrected texturing for E3dPolygonObj's primitive creation
2009-02-02 17:58:49 +0100 aw r267285 : #i98295# corrected orientation of E3dPolygonObj's polygon definition on it's way to prmitives
2009-02-02 17:57:32 +0100 aw r267283 : #i98295# optimized SdrPolyPolygonPrimitive3D::createLocalDecomposition data flow
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/sdr/contact/viewcontactofe3dpolygon.cxx | 53 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaymanager.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 11 |
3 files changed, 62 insertions, 4 deletions
diff --git a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx index 5c84da834f..61d5cc78cb 100644 --- a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx @@ -38,6 +38,7 @@ #include <svx/sdr/primitive2d/sdrattributecreator.hxx> #include <svx/sdr/primitive3d/sdrattributecreator3d.hxx> #include <basegfx/polygon/b3dpolygon.hxx> +#include <basegfx/polygon/b3dpolypolygontools.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -120,11 +121,57 @@ namespace sdr if(bTexture) { - const basegfx::B2DRange aTxRange(basegfx::tools::getRange(aPolyTexture2D)); - aTextureSize.setX(aTxRange.getWidth()); - aTextureSize.setY(aTxRange.getHeight()); + // #i98314# + // create texture size from object's size + const basegfx::B3DRange aObjectRange(basegfx::tools::getRange(aPolyPolygon3D)); + + double fWidth(0.0); + double fHeight(0.0); + + // this is a polygon object, so Width/Height and/or Depth may be zero (e.g. left + // wall of chart). Take this into account + if(basegfx::fTools::equalZero(aObjectRange.getWidth())) + { + // width is zero, use height and depth + fWidth = aObjectRange.getHeight(); + fHeight = aObjectRange.getDepth(); + } + else if(basegfx::fTools::equalZero(aObjectRange.getHeight())) + { + // height is zero, use width and depth + fWidth = aObjectRange.getWidth(); + fHeight = aObjectRange.getDepth(); + } + else + { + // use width and height + fWidth = aObjectRange.getWidth(); + fHeight = aObjectRange.getHeight(); + } + + if(basegfx::fTools::lessOrEqual(fWidth, 0.0) ||basegfx::fTools::lessOrEqual(fHeight, 0.0)) + { + // no texture; fallback to very small size + aTextureSize.setX(0.01); + aTextureSize.setY(0.01); + } + else + { + aTextureSize.setX(fWidth); + aTextureSize.setY(fHeight); + } } + // #i98295# + // unfortunately, this SdrObject type which allows a free 3d geometry definition was defined + // wrong topologically in relation to it's plane normal and 3D visibility when it was invented + // a long time ago. Since the API allows creation of this SDrObject type, it is not possible to + // simply change this definition. Only the chart should use it, and at least this object type + // only exists at Runtime (is not saved and/or loaded in any FileFormat). Still someone external + // may have used it in it's API. To not risk wrong 3D lightings, i have to switch the orientation + // of the polygon here + aPolyPolygon3D.flip(); + // create primitive and add const basegfx::B3DHomMatrix aWorldTransform; const drawinglayer::primitive3d::Primitive3DReference xReference(new drawinglayer::primitive3d::SdrPolyPolygonPrimitive3D( diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index d6ddfde6f2..834f8f170c 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -121,7 +121,7 @@ namespace sdr } } - const double OverlayManager::getDiscreteOne() const + double OverlayManager::getDiscreteOne() const { if(getOutputDevice().GetViewTransformation() != maViewTransformation) { diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 5d1fb9b3d1..b894b19073 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -435,6 +435,17 @@ namespace if(!basegfx::fTools::equal(fStart, fEnd)) { + if(rInfo.IsRTL()) + { + // #i98523# + // When the portion is RTL, mirror the redlining using the + // full portion width + const double fTextWidth(aDXArray[aDXArray.size() - 1]); + + fStart = fTextWidth - fStart; + fEnd = fTextWidth - fEnd; + } + maTextPortionPrimitives.push_back(new drawinglayer::primitive2d::WrongSpellPrimitive2D( aNewTransform, fStart, |