diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-03-04 14:16:02 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-03-04 14:16:02 +0000 |
commit | 7a753c73e9bae907158ec6d7b4e14fa53186e1ea (patch) | |
tree | b35398d8e51e905ab2887d7a519e6acdf64c7f16 /chart2/source | |
parent | f98d50e037954b075028c6fd9db12fa5e56db818 (diff) |
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/view/diagram/VDiagram.cxx | 137 | ||||
-rw-r--r-- | chart2/source/view/main/ChartItemPool.cxx | 19 | ||||
-rw-r--r-- | chart2/source/view/main/ChartItemPool.hxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/DrawModelWrapper.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/PropertyMapper.cxx | 4 |
5 files changed, 75 insertions, 89 deletions
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index 103134b32..23fa74da8 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -523,6 +523,72 @@ void VDiagram::createShapes_3d() "com.sun.star.drawing.Shape3DSceneObject" ) ), uno::UNO_QUERY ); m_xLogicTarget->add(m_xOuterGroupShape); + uno::Reference< drawing::XShapes > xOuterGroup_Shapes = + uno::Reference<drawing::XShapes>( m_xOuterGroupShape, uno::UNO_QUERY ); + + + //------------------------------------------------------------------------- + //create additional group to manipulate the aspect ratio of the whole diagram: + xOuterGroup_Shapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, rtl::OUString() ); + + m_xAspectRatio3D = uno::Reference< beans::XPropertySet >( xOuterGroup_Shapes, uno::UNO_QUERY ); + + //--------------------------- + + bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram ); + + //add walls + { + uno::Reference< beans::XPropertySet > xWallProp( NULL ); + if( m_xDiagram.is() ) + xWallProp=uno::Reference< beans::XPropertySet >( m_xDiagram->getWall()); + + rtl::OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, rtl::OUString() ) );//@todo read CID from model + if( !bAddFloorAndWall ) + aWallCID = rtl::OUString(); + uno::Reference< drawing::XShapes > xWallGroup_Shapes( m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, aWallCID ) ); + //add left wall + { + double xPos = 0.0; + CuboidPlanePosition eLeftWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeftWall( uno::Reference< beans::XPropertySet >( m_xDiagram, uno::UNO_QUERY ) ) ); + if( CuboidPlanePosition_Right==eLeftWallPos ) + xPos = FIXED_SIZE_FOR_3D_CHART_VOLUME; + Stripe aStripe( drawing::Position3D(xPos,0,0) + , drawing::Direction3D(0,FIXED_SIZE_FOR_3D_CHART_VOLUME,0) + , drawing::Direction3D(0,0,FIXED_SIZE_FOR_3D_CHART_VOLUME) ); + + uno::Reference< drawing::XShape > xShape = + m_pShapeFactory->createStripe( xWallGroup_Shapes, aStripe + , xWallProp, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), true ); + if( !bAddFloorAndWall ) + { + //we always need this object as dummy object for correct scene dimensions + //but it should not be visible in this case: + ShapeFactory::makeShapeInvisible( xShape ); + } + } + //add back wall + { + double zPos = 0.0; + CuboidPlanePosition eBackWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBackWall( uno::Reference< beans::XPropertySet >( m_xDiagram, uno::UNO_QUERY ) ) ); + if( CuboidPlanePosition_Front==eBackWallPos ) + zPos = FIXED_SIZE_FOR_3D_CHART_VOLUME; + Stripe aStripe( drawing::Position3D(0,0,zPos) + , drawing::Direction3D(FIXED_SIZE_FOR_3D_CHART_VOLUME,0,0) + , drawing::Direction3D(0,FIXED_SIZE_FOR_3D_CHART_VOLUME,0) ); + + uno::Reference< drawing::XShape > xShape = + m_pShapeFactory->createStripe(xWallGroup_Shapes, aStripe + , xWallProp, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), true ); + if( !bAddFloorAndWall ) + { + //we always need this object as dummy object for correct scene dimensions + //but it should not be visible in this case: + ShapeFactory::makeShapeInvisible( xShape ); + } + } + } + try { uno::Reference< beans::XPropertySet > xSourceProp( m_xDiagram, uno::UNO_QUERY_THROW ); @@ -563,6 +629,8 @@ void VDiagram::createShapes_3d() else aEffectiveTranformation.shearXY(m_fYAnglePi,-m_fXAnglePi); + //#i98497# 3D charts are rendered with wrong size + E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); xDestProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ), uno::makeAny( BaseGFXHelper::B3DHomMatrixToHomogenMatrix( aEffectiveTranformation ) ) ); } @@ -572,20 +640,6 @@ void VDiagram::createShapes_3d() ASSERT_EXCEPTION( ex ); } - uno::Reference< drawing::XShapes > xOuterGroup_Shapes = - uno::Reference<drawing::XShapes>( m_xOuterGroupShape, uno::UNO_QUERY ); - - - //------------------------------------------------------------------------- - //create additional group to manipulate the aspect ratio of the whole diagram: - xOuterGroup_Shapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, rtl::OUString() ); - - m_xAspectRatio3D = uno::Reference< beans::XPropertySet >( xOuterGroup_Shapes, uno::UNO_QUERY ); - - //--------------------------- - - bool bAddFloorAndWall = DiagramHelper::isSupportingFloorAndWall( m_xDiagram ); - //add floor plate { uno::Reference< beans::XPropertySet > xFloorProp( NULL ); @@ -623,6 +677,7 @@ void VDiagram::createShapes_3d() aM.rotate(F_PI/2.0,0.0,0.0); aM.translate(0.0,FLOOR_THICKNESS, 0.0); drawing::HomogenMatrix aHM = B3DHomMatrixToHomogenMatrix(aM); + E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); xShapeProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) , uno::makeAny(aHM) ); } @@ -643,59 +698,6 @@ void VDiagram::createShapes_3d() ShapeFactory::setShapeName( xShape, aFloorCID ); } } - - //--------------------------- - //add walls - { - uno::Reference< beans::XPropertySet > xWallProp( NULL ); - if( m_xDiagram.is() ) - xWallProp=uno::Reference< beans::XPropertySet >( m_xDiagram->getWall()); - - rtl::OUString aWallCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, rtl::OUString() ) );//@todo read CID from model - if( !bAddFloorAndWall ) - aWallCID = rtl::OUString(); - uno::Reference< drawing::XShapes > xWallGroup_Shapes( m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, aWallCID ) ); - //add left wall - { - double xPos = 0.0; - CuboidPlanePosition eLeftWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeftWall( uno::Reference< beans::XPropertySet >( m_xDiagram, uno::UNO_QUERY ) ) ); - if( CuboidPlanePosition_Right==eLeftWallPos ) - xPos = FIXED_SIZE_FOR_3D_CHART_VOLUME; - Stripe aStripe( drawing::Position3D(xPos,0,0) - , drawing::Direction3D(0,FIXED_SIZE_FOR_3D_CHART_VOLUME,0) - , drawing::Direction3D(0,0,FIXED_SIZE_FOR_3D_CHART_VOLUME) ); - - uno::Reference< drawing::XShape > xShape = - m_pShapeFactory->createStripe( xWallGroup_Shapes, aStripe - , xWallProp, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), true ); - if( !bAddFloorAndWall ) - { - //we always need this object as dummy object for correct scene dimensions - //but it should not be visible in this case: - ShapeFactory::makeShapeInvisible( xShape ); - } - } - //add back wall - { - double zPos = 0.0; - CuboidPlanePosition eBackWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBackWall( uno::Reference< beans::XPropertySet >( m_xDiagram, uno::UNO_QUERY ) ) ); - if( CuboidPlanePosition_Front==eBackWallPos ) - zPos = FIXED_SIZE_FOR_3D_CHART_VOLUME; - Stripe aStripe( drawing::Position3D(0,0,zPos) - , drawing::Direction3D(FIXED_SIZE_FOR_3D_CHART_VOLUME,0,0) - , drawing::Direction3D(0,FIXED_SIZE_FOR_3D_CHART_VOLUME,0) ); - - uno::Reference< drawing::XShape > xShape = - m_pShapeFactory->createStripe(xWallGroup_Shapes, aStripe - , xWallProp, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), true ); - if( !bAddFloorAndWall ) - { - //we always need this object as dummy object for correct scene dimensions - //but it should not be visible in this case: - ShapeFactory::makeShapeInvisible( xShape ); - } - } - } //--------------------------- //create an additional scene for the smaller inner coordinate region: @@ -716,6 +718,7 @@ void VDiagram::createShapes_3d() ::basegfx::B3DHomMatrix aM; aM.translate(GRID_TO_WALL_DISTANCE/fXScale, (FLOOR_THICKNESS+GRID_TO_WALL_DISTANCE)/fYScale, GRID_TO_WALL_DISTANCE/fZScale); aM.scale( fXScale, fYScale, fZScale ); + E3DModifySceneSnapRectUpdater aUpdater(lcl_getE3dScene( m_xOuterGroupShape )); xShapeProp->setPropertyValue( C2U( UNO_NAME_3D_TRANSFORM_MATRIX ) , uno::makeAny(BaseGFXHelper::B3DHomMatrixToHomogenMatrix(aM)) ); } diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx index 4ba957232..e00deac2d 100644 --- a/chart2/source/view/main/ChartItemPool.cxx +++ b/chart2/source/view/main/ChartItemPool.cxx @@ -46,25 +46,6 @@ #define _SVSTDARR_ULONGS #include <svtools/svstdarr.hxx> -// for Singleton GetChartItemPool() function -// --------------------------------------- -#ifndef INCLUDED_OSL_DOUBLECHECKEDLOCKING_H -#include "rtl/instance.hxx" -#endif -#include "osl/getglobalmutex.hxx" - -namespace { -struct ChartItemPoolInitialization -{ - ::chart::ChartItemPool * operator()() - { - static ::chart::ChartItemPool aInstance; - return &aInstance; - } -}; -} -// --------------------------------------- - namespace chart { diff --git a/chart2/source/view/main/ChartItemPool.hxx b/chart2/source/view/main/ChartItemPool.hxx index d0f29c5be..8723753e2 100644 --- a/chart2/source/view/main/ChartItemPool.hxx +++ b/chart2/source/view/main/ChartItemPool.hxx @@ -44,7 +44,9 @@ private: public: ChartItemPool(); ChartItemPool(const ChartItemPool& rPool); +protected: virtual ~ChartItemPool(); +public: virtual SfxItemPool* Clone() const; SfxMapUnit GetMetric( USHORT nWhich ) const; diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx index 8a296b413..e03e9e42d 100644 --- a/chart2/source/view/main/DrawModelWrapper.cxx +++ b/chart2/source/view/main/DrawModelWrapper.cxx @@ -208,7 +208,7 @@ DrawModelWrapper::~DrawModelWrapper() } pPool = pSecondary; } - delete m_pChartItemPool; + SfxItemPool::Free(m_pChartItemPool); } } diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx index 82c6c25ac..595aa7b4a 100644 --- a/chart2/source/view/main/PropertyMapper.cxx +++ b/chart2/source/view/main/PropertyMapper.cxx @@ -200,8 +200,8 @@ const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProper ( C2U( "CharContoured" ), C2U("CharContoured") ) /////// ( C2U( "CharCrossedOut" ), C2U("CharCrossedOut") ) //setting this explicitly somehow conflicts with CharStrikeout ( C2U( "CharEmphasis" ), C2U("CharEmphasis") )//the service style::CharacterProperties describes a property called 'CharEmphasize' wich is nowhere implemented - ( C2U( "CharEscapement" ), C2U("CharEscapement") ) - ( C2U( "CharEscapementHeight" ), C2U("CharEscapementHeight") ) +// ( C2U( "CharEscapement" ), C2U("CharEscapement") ) //#i98344# @future: add these to properties again, if the user interface offers the possibility to change them; then make sure that older wrong files are corrected on import +// ( C2U( "CharEscapementHeight" ), C2U("CharEscapementHeight") ) //#i98344# @future: add these to properties again, if the user interface offers the possibility to change them; then make sure that older wrong files are corrected on import // ( C2U( "CharFlash" ), C2U("Flashing") ) ( C2U( "CharFontFamily" ), C2U("CharFontFamily") ) |