diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-05-22 18:24:50 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-05-22 18:24:50 +0000 |
commit | 93b937c028188a6555a21f0d811d2d4cc53654a0 (patch) | |
tree | 3432e3744210ec92be29f157d10eca81fe52afd6 /chart2/source/view/main | |
parent | INTEGRATION: CWS chart2mst3 (1.2.4); FILE MERGED (diff) | |
download | core-93b937c028188a6555a21f0d811d2d4cc53654a0.tar.gz core-93b937c028188a6555a21f0d811d2d4cc53654a0.zip |
INTEGRATION: CWS chart2mst3 (1.12.4); FILE MERGED
2006/10/18 17:23:44 bm 1.12.4.5: RESYNC: (1.13-1.14); FILE MERGED
2005/12/21 21:29:43 iha 1.12.4.4: remove identifiers from model objects and create an index based CID protocol instead for selection purposes
2005/10/07 12:25:45 bm 1.12.4.3: RESYNC: (1.12-1.13); FILE MERGED
2004/03/22 19:32:02 iha 1.12.4.2: transport information bSwapXAndYAxis over method setScales not constructor
2004/03/01 18:14:33 iha 1.12.4.1: added method isValidPosition()
Diffstat (limited to 'chart2/source/view/main')
-rw-r--r-- | chart2/source/view/main/PlotterBase.cxx | 116 |
1 files changed, 24 insertions, 92 deletions
diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx index 1b51f363bba6..442f20240451 100644 --- a/chart2/source/view/main/PlotterBase.cxx +++ b/chart2/source/view/main/PlotterBase.cxx @@ -4,9 +4,9 @@ * * $RCSfile: PlotterBase.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: obo $ $Date: 2006-09-17 13:37:10 $ + * last change: $Author: vg $ $Date: 2007-05-22 19:24:50 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -67,15 +67,17 @@ PlotterBase::PlotterBase( sal_Int32 nDimensionCount ) , m_xFinalTarget(NULL) , m_xShapeFactory(NULL) , m_pShapeFactory(NULL) + , m_aCID() , m_nDimension(nDimensionCount) , m_pPosHelper(NULL) { } void SAL_CALL PlotterBase -::init( const uno::Reference< drawing::XShapes >& xLogicTarget +::initPlotter( const uno::Reference< drawing::XShapes >& xLogicTarget , const uno::Reference< drawing::XShapes >& xFinalTarget - , const uno::Reference< lang::XMultiServiceFactory >& xShapeFactory ) + , const uno::Reference< lang::XMultiServiceFactory >& xShapeFactory + , const rtl::OUString& rCID ) throw (uno::RuntimeException) { DBG_ASSERT(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters"); @@ -84,6 +86,7 @@ PlotterBase::PlotterBase( sal_Int32 nDimensionCount ) m_xFinalTarget = xFinalTarget; m_xShapeFactory = xShapeFactory; m_pShapeFactory = new ShapeFactory(xShapeFactory); + m_aCID = rCID; } PlotterBase::~PlotterBase() @@ -91,11 +94,12 @@ PlotterBase::~PlotterBase() delete m_pShapeFactory; } -void SAL_CALL PlotterBase::setScales( const uno::Sequence< ExplicitScaleData >& rScales ) +void SAL_CALL PlotterBase::setScales( const uno::Sequence< ExplicitScaleData >& rScales + , sal_Bool bSwapXAndYAxis ) throw (uno::RuntimeException) { DBG_ASSERT(m_nDimension<=rScales.getLength(),"Dimension of Plotter does not fit two dimension of given scale sequence"); - m_pPosHelper->setScales( rScales ); + m_pPosHelper->setScales( rScales, bSwapXAndYAxis ); } @@ -126,95 +130,23 @@ uno::Reference< drawing::XShapes > PlotterBase::createGroupShape( } } -/* -//----------------------------------------------------------------- -// chart2::XPlotter -//----------------------------------------------------------------- - - ::rtl::OUString SAL_CALL PlotterBase -::getCoordinateSystemTypeID() - throw (uno::RuntimeException) -{ - return CHART2_COOSYSTEM_CARTESIAN_SERVICE_NAME; -} - - void SAL_CALL PlotterBase -::setScales( const uno::Sequence< ExplicitScaleData >& rScales ) throw (uno::RuntimeException) -{ -} - void SAL_CALL PlotterBase -::setTransformation( const uno::Reference< XTransformation >& xTransformationToLogicTarget, const uno::Reference< XTransformation >& xTransformationToFinalPage ) throw (uno::RuntimeException) -{ -} -*/ - -//e.g. for Rectangle -/* -uno::Reference< drawing::XShape > PlotterBase::createPartialPointShape( - CooPoint + series dependent properties ...(create a special struct for each chart type) - , uno::Reference< XThinCoordinateSystem > xCoo - , sal_Bool bIsInBreak - , PointStyle* pStyle ) -{ - //create one here; use scaling and transformation to logic target - - //maybe do not show anything in the break //maybe read the behavior out of the configuration - //if(bIsInBreak) - // return NULL; - - uno::Reference< drawing::XShape > xNewPartialPointShape( - m_xShapeFactory->createInstance( - rtl::OUString::createFromAscii( "com.sun.star.drawing.RectangleShape" ) ) - , uno::UNO_QUERY ); - //set size and position - { - // - } - if(pStyle||bIsInBreak) - { - //set style properties if any for a single point - uno::Reference< beans::XPropertySet > xProp( xNewPartialPointShape, uno::UNO_QUERY ); - xProp->setPropertyValue( ... ); - - //set special properties if point in break (e.g. additional transparency ...) - } -} - -//e.g. for PlotterBase in 2 dim cartesian coordinates: -sal_Bool ShapeFactory::isShown( const Sequence< ExplicitScaleData >& rScales, const CooPoint& rP, double dLogicalWidthBeforeScaling ) +bool PlotterBase::isValidPosition( const drawing::Position3D& rPos ) { - ASSERT(rScales.getLength()==2) - double dMin_x = rScales[0].Minimum; - double dMax_x = rScales[0].Maximum; - double dMin_y = rScales[1].Minimum; - double dMax_y = rScales[1].Maximum; - - //we know that we have cartesian geometry - Rectangle aSysRect( rScales[0].Minimum, rScales[1].Maximum, rScales[0].Maximum, rScales[1].Minimum ); - Rectangle aPointRect( dLogicalWidthBeforeScaling ) - if(rP) + if( ::rtl::math::isNan(rPos.PositionX) ) + return false; + if( ::rtl::math::isNan(rPos.PositionY) ) + return false; + if( ::rtl::math::isNan(rPos.PositionZ) ) + return false; + if( ::rtl::math::isInf(rPos.PositionX) ) + return false; + if( ::rtl::math::isInf(rPos.PositionY) ) + return false; + if( ::rtl::math::isInf(rPos.PositionZ) ) + return false; + return true; } -//----------------------------------------------------------------------------- - -class FatCoordinateSystem -{ -public: - //XCoordinateSystemType getType(); - Sequence<XThinCoordinateSystem> getCoordinateSystems(); -} - -class ThinCoordinateSystem -{ -private: - -public: - sal_Bool isBreak(); - Sequence< ExplicitScaleData > getScales();//SubScales without beak - - -} -*/ //............................................................................. } //namespace chart //............................................................................. |