diff options
author | Release Engineers <releng@openoffice.org> | 2009-08-26 14:41:39 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2009-08-26 14:41:39 +0000 |
commit | 05a1a258cf2aab6e33750ff2c00bcd8827348146 (patch) | |
tree | a0006d6e0aa3d1b12bd2f61dffd5e5c0300d9b19 /drawinglayer | |
parent | fcf4f2dbc83a61a1747f5ee95f0470dbb5a7d0a8 (diff) |
CWS-TOOLING: integrate CWS aw075
2009-08-12 18:26:05 +0200 aw r274912 : #i97672# use SelectionMaximumLuminancePercent to limit the hilight color to be not too invisible
2009-08-12 18:25:53 +0200 aw r274911 : #i97672# use SelectionMaximumLuminancePercent to limit the hilight color to be not too invisible
2009-08-12 18:25:20 +0200 aw r274910 : #i97672# Added SelectionMaximumLuminancePercent to decide which maximum luminance for the selection color to accept from the system
2009-08-12 18:00:17 +0200 aw r274908 : #i97672# added SelectionMaximumLuminancePercent which limits the luminance of the system's selection color to a maximum luminance (default is 70)
2009-08-11 14:01:07 +0200 aw r274859 : #i104150# take over values from transparence percent field even when disabled
2009-08-11 13:59:33 +0200 aw r274858 : #i103500# corrected the transparent SC overlay pixel alignment
2009-08-11 12:42:46 +0200 jsk r274854 : #i103937# Added two new controls to options/view page for transparency and opacity
2009-08-10 16:20:02 +0200 aw r274823 : #i97672# Adapting MF_SELECTION to #i35956#
2009-08-04 17:50:42 +0200 aw r274626 : #i102109# need to use AlphaMask instead of Bitmap
2009-08-04 17:03:25 +0200 aw r274624 : #i103982# corrected OutlinerParaObject owvership in GetBackgroundTextForwarder()
2009-08-04 12:18:11 +0200 aw r274614 : #i97672# corrected warning due to member initialisation
2009-08-03 11:54:16 +0200 aw r274571 : #i99268# corrected SdrExchangeView::GetObjGraphic
2009-07-31 14:22:57 +0200 aw r274529 : #i101520# added support for not correct 3d polygons for 3D polygon object which is used over API from chart directly
2009-07-31 13:25:20 +0200 aw r274527 : #i97672# added disabling selection options when system does not support them; slightly corrected positions
2009-07-31 13:20:32 +0200 aw r274526 : #i102706# Do not merge closed polygons when converting MetaFiles to SdrObjects
2009-07-30 18:03:07 +0200 aw r274499 : #i102175# corrected 1870 degree rotation situation for MetaFile paints
2009-07-30 17:06:31 +0200 aw r274496 : #i103709# corrected HitTest for callouts and DrawingLayer text objects
2009-07-29 18:55:22 +0200 aw r274465 : #i102956# corrected CutFindProcessor to back-transform all found cuts to the starting 3D coordinate system
2009-07-29 13:38:40 +0200 aw r274448 : #i103720# corrected mpAsynchLoadEvent usage
2009-07-29 12:48:12 +0200 aw r274447 : #i96762# cleanup: spaces
2009-07-28 19:11:31 +0200 aw r274427 : #97672# first version of reworked selection with changeable transparency and frame
2009-07-28 19:09:39 +0200 aw r274425 : #97672# first version of reworked selection with changeable transparency and frame
2009-07-28 19:09:27 +0200 aw r274424 : #97672# first version of reworked selection with changeable transparency and frame
2009-07-28 19:09:14 +0200 aw r274423 : #97672# first version of reworked selection with changeable transparency and frame
2009-07-28 19:08:59 +0200 aw r274422 : #97672# first version of reworked selection with changeable transparency and frame
2009-07-28 19:08:47 +0200 aw r274421 : #97672# first version of reworked selection with changeable transparency and frame
2009-07-28 15:44:50 +0200 aw r274411 : #i102556# corrected TextLayouterDevice::getTextBoundRect implementation and usage; empty Rectangles were not handled correctly
2009-07-23 17:48:36 +0200 aw r274277 : #i102063# implemented in-between OLE content holder (SdrOleContentPrimitive2D) and it's decomposition. Cleaned up diverse OLE graphic preparations
2009-07-22 12:55:12 +0200 aw r274227 : #i102109# extended OutputDevice::DrawTransparent (the version with TransparenceGradient) to work correctly with AntiAliased content
2009-07-21 13:31:12 +0200 aw r274191 : #i102611# changed scaling of Z-Range for Z-Buffer for ZBufferProcessor3D
2009-07-20 20:06:46 +0200 aw r274155 : #i103500# moved OverlayObjectCell back to use discrete coordinates for rectangle list
2009-07-16 17:33:26 +0200 aw r274065 : #i103530# corrected parameter preparation for MetaFile::Rotate call
Diffstat (limited to 'drawinglayer')
4 files changed, 61 insertions, 25 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 75e66a5422d2..0055af3ea4bd 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -286,12 +286,14 @@ namespace drawinglayer nIndex, nLength); - return basegfx::B2DRange(aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom()); - } - else - { - return basegfx::B2DRange(); + // #i102556# take empty results into account + if(!aRect.IsEmpty()) + { + return basegfx::B2DRange(aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom()); + } } + + return basegfx::B2DRange(); } } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index 8188265ff8e7..7c62c235c21d 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -312,26 +312,31 @@ namespace drawinglayer // get basic text range basegfx::B2DRange aNewRange(aTextLayouter.getTextBoundRect(getText(), getTextPosition(), getTextLength())); -#ifdef WIN32 - // when under Windows and the font is unequally scaled, need to correct font X-Scaling factor - if(bCorrectScale) + + // #i102556# take empty results into account + if(!aNewRange.isEmpty()) { - aScale.setX(aScale.getX() * aTextLayouter.getCurrentFontRelation()); - } +#ifdef WIN32 + // when under Windows and the font is unequally scaled, need to correct font X-Scaling factor + if(bCorrectScale) + { + aScale.setX(aScale.getX() * aTextLayouter.getCurrentFontRelation()); + } #endif - // prepare object transformation for range - basegfx::B2DHomMatrix aRangeTransformation; + // prepare object transformation for range + basegfx::B2DHomMatrix aRangeTransformation; - aRangeTransformation.scale(aScale.getX(), aScale.getY()); - aRangeTransformation.shearX(fShearX); - aRangeTransformation.rotate(fRotate); - aRangeTransformation.translate(aTranslate.getX(), aTranslate.getY()); + aRangeTransformation.scale(aScale.getX(), aScale.getY()); + aRangeTransformation.shearX(fShearX); + aRangeTransformation.rotate(fRotate); + aRangeTransformation.translate(aTranslate.getX(), aTranslate.getY()); - // apply range transformation to it - aNewRange.transform(aRangeTransformation); + // apply range transformation to it + aNewRange.transform(aRangeTransformation); - // assign to buffered value - const_cast< TextSimplePortionPrimitive2D* >(this)->maB2DRange = aNewRange; + // assign to buffered value + const_cast< TextSimplePortionPrimitive2D* >(this)->maB2DRange = aNewRange; + } } } diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index d6eb6e1695b2..adc33c4d676d 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -682,6 +682,15 @@ namespace drawinglayer double fRotate, fShearX; aLocalTransform.decompose(aScale, aTranslate, fRotate, fShearX); + if(basegfx::fTools::less(aScale.getX(), 0.0) && basegfx::fTools::less(aScale.getY(), 0.0)) + { + // #i102175# handle special case: If scale is negative in (x,y) (3rd quadrant), it can + // be expressed as rotation by PI. This needs to be done for Metafiles since + // these can be rotated, but not really mirrored + aScale = basegfx::absolute(aScale); + fRotate += F_PI; + } + // get BoundRect basegfx::B2DRange aOutlineRange(rMetaCandidate.getB2DRange(getViewInformation2D())); aOutlineRange.transform(maCurrentTransformation); @@ -715,8 +724,18 @@ namespace drawinglayer // rotation if(!basegfx::fTools::equalZero(fRotate)) { - double fRotation((fRotate / F_PI180) * -10.0); - aMetaFile.Rotate((sal_uInt16)(fRotation)); + // #i103530# + // MetaFile::Rotate has no input parameter check, so the parameter needs to be + // well-aligned to the old range [0..3600] 10th degrees with inverse orientation + sal_Int16 nRotation((sal_Int16)((fRotate / F_PI180) * -10.0)); + + while(nRotation < 0) + nRotation += 3600; + + while(nRotation >= 3600) + nRotation -= 3600; + + aMetaFile.Rotate(nRotation); } // Prepare target output size diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx index 0a15ff224073..b5a59e10a119 100644 --- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx +++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx @@ -675,15 +675,25 @@ namespace drawinglayer { // step two: // - // bring from [0.0 .. 1.0] in X,Y and Z to view cordinates. also: - // - scale Z to [0.0 .. fMaxZDepth] - const double fMaxZDepth(double(0x0000ff00)); + // bring from [0.0 .. 1.0] in X,Y and Z to view cordinates + // + // #i102611# + // also: scale Z to [1.5 .. 65534.5]. Normally, a range of [0.0 .. 65535.0] + // could be used, but a 'unused' value is needed, so '0' is used what reduces + // the range to [1.0 .. 65535.0]. It has also shown that small numerical errors + // (smaller as basegfx::fTools::mfSmallValue, which is 0.000000001) happen. + // Instead of checking those by basegfx::fTools methods which would cost + // runtime, just add another 0.5 tolerance to the start and end of the Z-Buffer + // range, thus resulting in [1.5 .. 65534.5] + const double fMaxZDepth(65533.0); aDeviceToView.translate(-rVisiblePart.getMinX(), -rVisiblePart.getMinY(), 0.0); if(mnAntiAlialize) aDeviceToView.scale(fFullViewSizeX * mnAntiAlialize, fFullViewSizeY * mnAntiAlialize, fMaxZDepth); else aDeviceToView.scale(fFullViewSizeX, fFullViewSizeY, fMaxZDepth); + + aDeviceToView.translate(0.0, 0.0, 1.5); } // update local ViewInformation3D with own DeviceToView |