summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx137
-rw-r--r--chart2/source/view/main/ChartItemPool.cxx19
-rw-r--r--chart2/source/view/main/ChartItemPool.hxx2
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx2
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx4
-rw-r--r--sc/inc/docpool.hxx4
-rw-r--r--sc/source/core/data/docpool.cxx2
-rw-r--r--sc/source/core/data/documen2.cxx2
-rw-r--r--sc/source/core/data/poolhelp.cxx6
-rw-r--r--sc/source/core/tool/editutil.cxx2
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx4
-rw-r--r--sc/source/ui/app/msgpool.cxx2
-rw-r--r--sc/source/ui/app/scmod.cxx2
-rw-r--r--sc/source/ui/drawfunc/futext.cxx2
-rw-r--r--sc/source/ui/inc/msgpool.hxx4
15 files changed, 93 insertions, 101 deletions
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index acffb369e200..70f930aa8623 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 8a831caa34ac..47eb3f59595f 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 98d52b30b374..00c813ed4922 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 494afa48c408..95b5144265ae 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 459f2e1dae86..53a1b3673c81 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") )
diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index ef08f72fb4a8..c81a68afe63d 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -56,7 +56,9 @@ class SC_DLLPUBLIC ScDocumentPool: public SfxItemPool
public:
ScDocumentPool( SfxItemPool* pSecPool = NULL, BOOL bLoadRefCounts = FALSE );
- ~ScDocumentPool();
+protected:
+ virtual ~ScDocumentPool();
+public:
virtual SfxItemPool* Clone() const;
virtual SfxMapUnit GetMetric( USHORT nWhich ) const;
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index ce98fcce8774..c2a77a0d0ede 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -389,7 +389,7 @@ __EXPORT ScDocumentPool::~ScDocumentPool()
}
delete[] ppPoolDefaults;
- delete pSecondary;
+ SfxItemPool::Free(pSecondary);
}
void ScDocumentPool::InitVersionMaps()
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index fa350ec3584b..1ef50cf30fd7 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -437,7 +437,7 @@ ScDocument::~ScDocument()
delete pChangeTrack;
delete pEditEngine;
delete pNoteEngine;
- delete pNoteItemPool;
+ SfxItemPool::Free(pNoteItemPool);
delete pChangeViewSettings; // und weg damit
delete pVirtualDevice_100th_mm;
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index e9909b80fb09..0121eca685e4 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -70,11 +70,11 @@ ScPoolHelper::ScPoolHelper( ScDocument* pSourceDoc )
ScPoolHelper::~ScPoolHelper()
{
- delete pEnginePool;
- delete pEditPool;
+ SfxItemPool::Free(pEnginePool);
+ SfxItemPool::Free(pEditPool);
delete pFormTable;
mxStylePool.clear();
- delete pDocPool;
+ SfxItemPool::Free(pDocPool);
}
void ScPoolHelper::SourceDocumentGone()
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 922506464ba9..0e9477f9015a 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -281,7 +281,7 @@ ScEnginePoolHelper::~ScEnginePoolHelper()
if ( bDeleteDefaults )
delete pDefaults;
if ( bDeleteEnginePool )
- delete pEnginePool;
+ SfxItemPool::Free(pEnginePool);
}
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 25427c0825c4..9c28cf49d729 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -620,8 +620,8 @@ ScEEParser::~ScEEParser()
// Pool erst loeschen nachdem die Listen geloescht wurden
pPool->SetSecondaryPool( NULL );
- delete pDocPool;
- delete pPool;
+ SfxItemPool::Free(pDocPool);
+ SfxItemPool::Free(pPool);
}
diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx
index 43288baceca4..bb558c3a42ec 100644
--- a/sc/source/ui/app/msgpool.cxx
+++ b/sc/source/ui/app/msgpool.cxx
@@ -106,7 +106,7 @@ __EXPORT ScMessagePool::~ScMessagePool()
delete[] ppPoolDefaults;
- delete pDocPool;
+ SfxItemPool::Free(pDocPool);
}
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 95de1fdd23a9..5afe9e11c7d5 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -204,7 +204,7 @@ ScModule::~ScModule()
// InputHandler braucht nicht mehr geloescht zu werden (gibt keinen an der App mehr)
- DELETEZ( pMessagePool );
+ SfxItemPool::Free(pMessagePool);
DELETEZ( pFormEditData );
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index ca9fc462b9df..302d1c825a2a 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -43,6 +43,8 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/svxids.hrc>
+#include <svx/eeitem.hxx>
+#include <svtools/itemset.hxx>
#include "futext.hxx"
#include "drwlayer.hxx"
diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx
index 1685b8408a2b..954d0d7a5d47 100644
--- a/sc/source/ui/inc/msgpool.hxx
+++ b/sc/source/ui/inc/msgpool.hxx
@@ -68,7 +68,9 @@ class ScMessagePool: public SfxItemPool
public:
ScMessagePool();
- ~ScMessagePool();
+protected:
+ virtual ~ScMessagePool();
+public:
virtual SfxMapUnit GetMetric( USHORT nWhich ) const;
};