Files
libreoffice/chart2/source/inc/CommonConverters.hxx

307 lines
13 KiB
C++
Raw Normal View History

2003-10-06 08:58:36 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2003-10-06 08:58:36 +00:00
*
* Copyright 2008 by Sun Microsystems, Inc.
2003-10-06 08:58:36 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2003-10-06 08:58:36 +00:00
*
* $RCSfile: CommonConverters.hxx,v $
2008-10-01 07:35:04 +00:00
* $Revision: 1.10.44.1 $
2003-10-06 08:58:36 +00:00
*
* This file is part of OpenOffice.org.
2003-10-06 08:58:36 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2003-10-06 08:58:36 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2003-10-06 08:58:36 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2003-10-06 08:58:36 +00:00
*
************************************************************************/
#ifndef __CHART_COMMON_CONVERTERS_HXX
#define __CHART_COMMON_CONVERTERS_HXX
#include <tools/poly.hxx>
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/awt/Size.hpp>
2003-10-06 08:58:36 +00:00
#include <com/sun/star/drawing/Direction3D.hpp>
#include <com/sun/star/drawing/HomogenMatrix.hpp>
#include <com/sun/star/drawing/HomogenMatrix3.hpp>
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
2003-10-06 08:58:36 +00:00
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/drawing/Position3D.hpp>
#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
#include <com/sun/star/text/WritingMode.hpp>
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
#include <com/sun/star/chart2/data/XDataSequence.hpp>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/point/b3dpoint.hxx>
#include <basegfx/vector/b3dvector.hxx>
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
#include <vector>
#include <algorithm>
2003-10-06 08:58:36 +00:00
//.............................................................................
namespace chart
{
//.............................................................................
//-----------------------------------------------------------------------------
/**
diverse methods for class conversions; e.g. ::basegfx::B3DHomMatrix to HomogenMatrix
2003-10-06 08:58:36 +00:00
and operations e.g drawing::Position3D + drawing::Direction3D
*/
//-----------------------------------------------------------------------------
/** ::basegfx::B3DHomMatrix -> HomogenMatrix
2003-10-06 08:58:36 +00:00
*/
com::sun::star::drawing::HomogenMatrix
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
B3DHomMatrixToHomogenMatrix( const ::basegfx::B3DHomMatrix& rM );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** HomogenMatrix -> ::basegfx::B3DHomMatrix
2003-10-06 08:58:36 +00:00
*/
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
::basegfx::B3DHomMatrix HomogenMatrixToB3DHomMatrix( const com::sun::star::drawing::HomogenMatrix& rHM );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** ::basegfx::B3DHomMatrix -> B2DHomMatrix
2003-10-06 08:58:36 +00:00
*/
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
::basegfx::B2DHomMatrix IgnoreZ( const ::basegfx::B3DHomMatrix& rM );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** B2DHomMatrix <-> HomogenMatrix3
2003-10-06 08:58:36 +00:00
*/
com::sun::star::drawing::HomogenMatrix3
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
B2DHomMatrixToHomogenMatrix3( const ::basegfx::B2DHomMatrix& rM );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** Position3D -> B3DPoint
2003-10-06 08:58:36 +00:00
*/
::basegfx::B3DPoint Position3DToB3DPoint( const com::sun::star::drawing::Position3D& rPosition );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** B3DVector -> Direction3D
2003-10-06 08:58:36 +00:00
*/
com::sun::star::drawing::Direction3D B3DVectorToDirection3D( const ::basegfx::B3DVector& rVector);
2003-10-06 08:58:36 +00:00
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
//-----------------------------------------------------------------------------
/** B3DPoint -> Position3D
*/
com::sun::star::drawing::Position3D B3DPointToPosition3D( const ::basegfx::B3DPoint& rPoint);
//-----------------------------------------------------------------------------
/** Direction3D -> B3DPoint
*/
::basegfx::B3DPoint Direction3DToB3DPoint( const com::sun::star::drawing::Direction3D& rDirection);
2008-10-17 08:40:10 +00:00
//-----------------------------------------------------------------------------
/** Direction3D -> B3DVector
*/
::basegfx::B3DVector Direction3DToB3DVector( const com::sun::star::drawing::Direction3D& rDirection);
//-----------------------------------------------------------------------------
/** two drawing::Position3D -> PolyPolygonShape3D
*/
::com::sun::star::drawing::PolyPolygonShape3D
MakeLine3D( const ::com::sun::star::drawing::Position3D & rStart,
const ::com::sun::star::drawing::Position3D & rEnd );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** PolyPolygonShape3D + drawing::Position3D -> PolyPolygonShape3D
*/
2003-11-04 12:14:20 +00:00
void AddPointToPoly( ::com::sun::star::drawing::PolyPolygonShape3D& rPoly
2003-10-06 08:58:36 +00:00
, const com::sun::star::drawing::Position3D& rPos
, sal_Int32 nSequenceIndex=0 );
2003-11-04 12:14:20 +00:00
//-----------------------------------------------------------------------------
/** get a single Point from a Polygon
*/
::com::sun::star::drawing::Position3D getPointFromPoly(
const ::com::sun::star::drawing::PolyPolygonShape3D& rPolygon
, sal_Int32 nPointIndex, sal_Int32 nPolyIndex=0 );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** PolyPolygonShape3D + PolyPolygonShape3D -> PolyPolygonShape3D
*/
void appendPoly( com::sun::star::drawing::PolyPolygonShape3D& rRet
, const com::sun::star::drawing::PolyPolygonShape3D& rAdd );
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
//-----------------------------------------------------------------------------
/** PolyPolygonBezierCoords -> PolyPolygonShape3D
*/
com::sun::star::drawing::PolyPolygonShape3D BezierToPoly(
const com::sun::star::drawing::PolyPolygonBezierCoords& rBezier );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** PolyPolygonShape3D -> drawing::PointSequenceSequence (2D)
*/
com::sun::star::drawing::PointSequenceSequence PolyToPointSequence(
const com::sun::star::drawing::PolyPolygonShape3D& rPolyPolygon );
//-----------------------------------------------------------------------------
/** drawing::PointSequenceSequence + drawing::PointSequenceSequence
*/
void appendPointSequence( com::sun::star::drawing::PointSequenceSequence& rTarget
, com::sun::star::drawing::PointSequenceSequence& rAdd );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** Position3D + Direction3D == Position3D
*/
com::sun::star::drawing::Position3D
operator+( const com::sun::star::drawing::Position3D& rPos
, const com::sun::star::drawing::Direction3D& rDirection);
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
//-----------------------------------------------------------------------------
/** Direction3D + Direction3D == Direction3D
*/
com::sun::star::drawing::Direction3D
operator+( const com::sun::star::drawing::Direction3D& rDirection
, const com::sun::star::drawing::Direction3D& rDirectionAdd);
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** Position3D - Direction3D == Position3D
*/
com::sun::star::drawing::Position3D
operator-( const com::sun::star::drawing::Position3D& rPos
, const com::sun::star::drawing::Direction3D& rDirection);
//-----------------------------------------------------------------------------
/** Position3D - Position3D == Direction3D
*/
com::sun::star::drawing::Direction3D
operator-( const com::sun::star::drawing::Position3D& rPos1
, const com::sun::star::drawing::Position3D& rPos2);
//-----------------------------------------------------------------------------
/** Direction3D * double == Direction3D
*/
com::sun::star::drawing::Direction3D
operator*( const com::sun::star::drawing::Direction3D& rDirection
, double fFraction);
2003-11-04 09:23:04 +00:00
//-----------------------------------------------------------------------------
/** Position3D == Position3D ?
*/
bool operator==( const com::sun::star::drawing::Position3D& rPos1
, const com::sun::star::drawing::Position3D& rPos2);
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
//-----------------------------------------------------------------------------
/** awt::Rect --> awt::Point (2D)
*/
::com::sun::star::awt::Point ToPoint( const com::sun::star::awt::Rectangle& rRectangle );
//-----------------------------------------------------------------------------
/** awt::Rect --> awt::Size (2D)
*/
::com::sun::star::awt::Size ToSize( const com::sun::star::awt::Rectangle& rRectangle );
//-----------------------------------------------------------------------------
/** Position3D --> awt::Point (2D)
*/
::com::sun::star::awt::Point Position3DToAWTPoint( const com::sun::star::drawing::Position3D& rPos );
//-----------------------------------------------------------------------------
/** Direction3D --> awt::Size (2D)
*/
::com::sun::star::awt::Size Direction3DToAWTSize( const com::sun::star::drawing::Direction3D& rDirection );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** B3DPoint -> Sequence<double>
2003-10-06 08:58:36 +00:00
*/
com::sun::star::uno::Sequence< double > B3DPointToSequence( const ::basegfx::B3DPoint& rPoint );
2003-10-06 08:58:36 +00:00
//-----------------------------------------------------------------------------
/** Sequence<double> -> drawing::Position3D
*/
com::sun::star::drawing::Position3D
SequenceToPosition3D( const com::sun::star::uno::Sequence< double >& rSeq );
//-----------------------------------------------------------------------------
/** drawing::Position3D -> Sequence<double>
*/
com::sun::star::uno::Sequence< double >
Position3DToSequence( const com::sun::star::drawing::Position3D& rPosition );
//-----------------------------------------------------------------------------
/** drawing::Direction3D / double
*/
com::sun::star::drawing::Direction3D
operator/( const com::sun::star::drawing::Direction3D& rDirection, double f );
2003-12-17 13:30:48 +00:00
//-----------------------------------------------------------------------------
/** chart2::XDataSequence -> uno::Sequence< double >
*/
::com::sun::star::uno::Sequence< double > DataSequenceToDoubleSequence(
const ::com::sun::star::uno::Reference<
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED 2006/11/26 13:07:53 iha 1.6.4.21: method Direction3DToB3DPoin 2006/11/22 17:24:57 iha 1.6.4.20: RESYNC: (1.7-1.8); FILE MERGED 2006/11/01 15:35:32 iha 1.6.4.19: cleanup resources + changed variable names according to style guide 2006/10/20 20:32:24 iha 1.6.4.18: implement gradient step count 2006/09/29 15:00:07 iha 1.6.4.17: corrected creation of 3D pies and donuts (extrude instead of lathe objects- for corect texture, get rid of problem with extended scene due to rotating bounding box, fixed #i67743# and no 90degree rotation difference between old and new API anymore) 2006/09/24 09:12:54 iha 1.6.4.16: #i61970# correct implementation of axis at 2006/08/02 11:36:18 bm 1.6.4.15: typename keyword missing 2006/08/01 08:58:12 bm 1.6.4.14: +FlattenVector to convert a vector of vector of T to a vector of T 2005/10/07 11:39:18 bm 1.6.4.13: RESYNC: (1.6-1.7); FILE MERGED 2005/08/03 16:19:01 bm 1.6.4.12: -ContainerToSequence: see ContainerHelper for this function now 2005/07/23 00:01:20 iha 1.6.4.11: include axis title sizes in diagram position to support old api and fileformat 2005/05/09 09:51:00 bm 1.6.4.10: moved parts of API to data namespace 2004/06/07 17:51:27 iha 1.6.4.9: added Direction3DToVector3D 2004/05/05 16:00:40 iha 1.6.4.8: added Vector3DToPosition3D 2004/04/07 14:33:20 bm 1.6.4.7: +ContainerToSequence 2004/03/19 14:32:51 bm 1.6.4.6: XDataSource now contains XLabeledDataSources 2004/03/11 09:38:05 iha 1.6.4.5: added operator+ for Direction3D 2004/02/29 10:20:04 iha 1.6.4.4: added Position3DToAWTPoint + Direction3DToAWTSize 2004/02/23 19:08:07 iha 1.6.4.3: do not convert something wrong to number - functionality not needed anymore 2004/02/20 17:33:49 iha 1.6.4.2: added method DataSequenceToStringSequence for categories at axes 2004/02/13 16:51:22 bm 1.6.4.1: join from changes on branch bm_post_chart01
2007-05-22 17:13:46 +00:00
::com::sun::star::chart2::data::XDataSequence > & xDataSequence );
::com::sun::star::uno::Sequence< rtl::OUString > DataSequenceToStringSequence(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XDataSequence > & xDataSequence );
//-----------------------------------------------------------------------------
/** uno::Sequence< uno::Sequence< T > > -> uno::Sequence< T >
*/
template< typename T >
::com::sun::star::uno::Sequence< T >
FlattenSequence( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Sequence< T > > & aSeqSeq )
{
sal_Int32 nOuter, nInner, nCount = 0,
nResultSize = 0;
const sal_Int32 nOuterSize = aSeqSeq.getLength();
for( nOuter=0; nOuter<nOuterSize; ++nOuter )
nResultSize += aSeqSeq[nOuter].getLength();
::com::sun::star::uno::Sequence< T > aResult( nResultSize );
for( nOuter=0; nOuter<nOuterSize; ++nOuter )
{
const sal_Int32 nInnerSize = aSeqSeq[nOuter].getLength();
for( nInner=0; nInner<nInnerSize; ++nInner, ++nCount )
aResult[nCount] = aSeqSeq[nOuter][nInner];
}
return aResult;
}
template< typename T >
::std::vector< T >
FlattenVector( const ::std::vector< ::std::vector< T > > & rVecVec )
{
typedef ::std::vector< T > tFlatVec;
typedef ::std::vector< tFlatVec > tVecVec;
tFlatVec aResult;
typename tVecVec::const_iterator aOuterEnd( rVecVec.end());
for( typename tVecVec::const_iterator aOuterIt( rVecVec.begin()); aOuterIt != aOuterEnd; ++aOuterIt )
::std::copy( aOuterIt->begin(), aOuterIt->end(), back_inserter( aResult ));
return aResult;
}
sal_Bool hasDoubleValue( const ::com::sun::star::uno::Any& rAny );
sal_Bool hasLongOrShortValue( const ::com::sun::star::uno::Any& rAny );
sal_Int16 getShortForLongAlso( const ::com::sun::star::uno::Any& rAny );
bool replaceParamterInString( rtl::OUString & rInOutResourceString,
const rtl::OUString & rParamToReplace,
const rtl::OUString & rReplaceWith );
2003-12-17 13:30:48 +00:00
2003-10-06 08:58:36 +00:00
//.............................................................................
} //namespace chart
//.............................................................................
#endif