summaryrefslogtreecommitdiffstats
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-04 09:41:18 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-04 09:41:18 +0000
commita3acf41195f4c39cba7950c389dc817b824f76ed (patch)
tree18166c83c4ed3fe7d971b9e17f5bce1e0f031df2 /chart2/source/tools
parentCWS-TOOLING: integrate CWS os128 (diff)
downloadcore-a3acf41195f4c39cba7950c389dc817b824f76ed.tar.gz
core-a3acf41195f4c39cba7950c389dc817b824f76ed.zip
CWS-TOOLING: integrate CWS chart37
2009-05-22 09:10:36 +0200 iha r272170 : #i102130# color of pies is not loaded correctly 2009-04-27 17:16:20 +0200 iha r271294 : #i24203# compiler problem 2009-04-27 16:43:21 +0200 iha r271292 : #i101281# missing API documentation for secondary axis title properties 2009-04-27 15:26:05 +0200 hde r271276 : #i100987 2009-04-27 15:24:42 +0200 hde r271273 : #i100987 2009-04-24 15:08:33 +0200 iha r271214 : #i100995# crash with some logarithmic scalings 2009-04-22 18:50:56 +0200 dr r271134 : #i82177# write out deleted point labels 2009-04-22 18:40:48 +0200 iha r271133 : #i101281# missing API documentation for secondary axis title properties 2009-04-22 16:39:42 +0200 dr r271128 : #i82177# extensions for bubble charts 2009-04-22 14:37:00 +0200 dr r271114 : #i82177# import/export data label type and separator 2009-04-22 14:36:24 +0200 dr r271113 : #i82177# import/export data label type and separator 2009-04-21 15:25:26 +0200 dr r271038 : #i82177# import data label type and separator from BIFF8 CHFR records 2009-04-21 14:37:16 +0200 dr r271037 : #i82177# dump BIFF8 chart future records 2009-04-20 17:44:27 +0200 iha r271002 : #i96898# reduce library exports 2009-04-20 13:01:13 +0200 iha r270975 : #i24203# rotate data labels - help ids 2009-04-20 11:40:33 +0200 dr r270969 : #i96600# export of axis scaling/positioning properties 2009-04-16 16:02:31 +0200 dr r270892 : #i69599# keep Y axis left in 3d charts 2009-04-15 18:16:46 +0200 dr r270859 : #i69599# import of axis position settings 2009-04-15 18:16:01 +0200 dr r270858 : #i69599# correct handling of logarithmic crossing axes 2009-04-14 16:27:48 +0200 dr r270794 : #i96599# handle auto axis position on logarithmic axes 2009-04-09 19:59:51 +0200 dr r270722 : #i96599# import axis crossing settings, fix import of logarithmic scaling settings 2009-04-09 18:26:00 +0200 iha r270720 : #i96898# reduce library exports 2009-04-09 15:17:04 +0200 iha r270710 : #i96898# reduce library exports 2009-04-09 10:50:14 +0200 dr r270682 : #i24203# import/export of data label rotation, fixed some other broken stuff too 2009-04-08 16:54:54 +0200 dr r270657 : #i24203# import rotation for data point labels 2009-04-06 18:19:17 +0200 iha r270571 : #i100876# Axis scaling settings dialog wrong after API usage (anys different from double type) 2009-04-06 15:57:05 +0200 iha r270567 : #i100105# #i58585# leftover -> 2009-04-06 15:55:48 +0200 iha r270564 : #i58585# leftover -> 2009-04-02 16:41:07 +0200 iha r270422 : #i99721# remove unused code 2009-04-02 14:29:03 +0200 iha r270407 : #i99721# remove unused code 2009-03-26 10:58:23 +0100 iha r270059 : #i96898# reduce library exports 2009-03-26 10:13:49 +0100 iha r270055 : #i96898# reduce library exports 2009-03-25 09:39:13 +0100 iha r269998 : CWS-TOOLING: rebase CWS chart37 to trunk@269781 (milestone: DEV300:m44) 2009-03-24 17:56:56 +0100 iha r269986 : #i96898# reduce library exports 2009-03-24 16:56:44 +0100 iha r269974 : #i99721# remove unused code 2009-03-24 16:48:48 +0100 iha r269970 : #i89731# remove unused string 2009-03-24 15:44:04 +0100 iha r269961 : remove unused code 2009-03-24 15:22:45 +0100 iha r269959 : remove unused code 2009-03-24 15:17:17 +0100 iha r269957 : remove unused code 2009-03-24 11:14:53 +0100 iha r269923 : #i24203# rotate data labels 2009-03-09 12:10:25 +0100 hde r269076 : #i99300# 2009-03-06 15:56:26 +0100 iha r269011 : #i93953# Source Format for secondary axis without data 2009-02-17 15:59:05 +0100 iha r268177 : avoid warning during build 2009-02-17 15:01:59 +0100 iha r268173 : avoid warning during build 2009-02-13 09:39:03 +0100 ufi r267693 : i96999 2009-02-11 15:12:35 +0100 iha r267604 : removed unused string 2009-02-11 14:00:29 +0100 iha r267600 : #i96999# Corrected wording from 'correlation coefficient' to 'coefficient of determination' 2009-02-11 10:56:45 +0100 iha r267584 : #i89731# typo in resource string 2009-02-11 10:01:29 +0100 iha r267582 : #i89031# compile error on asian windows systems 2009-02-10 16:15:16 +0100 iha r267552 : #i24203# rotate data labels 2009-02-04 18:00:33 +0100 iha r267395 : #i98893# don't export defaults to file 2009-02-04 15:48:15 +0100 iha r267390 : #i92128# asian typography for chart elements 2009-02-04 15:17:41 +0100 iha r267386 : #i92128# asian typography for chart elements 2009-01-30 14:41:10 +0100 iha r267197 : CWS-TOOLING: rebase CWS chart37 to trunk@267171 (milestone: DEV300:m41)
Diffstat (limited to 'chart2/source/tools')
-rw-r--r--chart2/source/tools/AxisHelper.cxx12
-rw-r--r--chart2/source/tools/CachedDataSequence.cxx38
-rw-r--r--chart2/source/tools/CharacterProperties.cxx8
-rw-r--r--chart2/source/tools/ChartModelHelper.cxx36
-rw-r--r--chart2/source/tools/CommonConverters.cxx186
-rw-r--r--chart2/source/tools/ConfigColorScheme.cxx6
-rw-r--r--chart2/source/tools/DataSourceHelper.cxx37
-rw-r--r--chart2/source/tools/ErrorBar.cxx9
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx50
-rw-r--r--chart2/source/tools/LabeledDataSequence.cxx6
-rw-r--r--chart2/source/tools/ModifyListenerHelper.cxx10
-rw-r--r--chart2/source/tools/NameContainer.cxx6
-rw-r--r--chart2/source/tools/OPropertySet.cxx26
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx8
-rw-r--r--chart2/source/tools/ReferenceSizeProvider.cxx20
-rw-r--r--chart2/source/tools/RegressionCurveModel.cxx4
-rw-r--r--chart2/source/tools/StatisticsHelper.cxx2
-rw-r--r--chart2/source/tools/TitleHelper.cxx6
-rw-r--r--chart2/source/tools/UncachedDataSequence.cxx6
19 files changed, 160 insertions, 316 deletions
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index b9778042baed..5e6c0bce8717 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -40,6 +40,7 @@
#include "ContainerHelper.hxx"
#include "servicenames_coosystems.hxx"
#include "DataSeriesHelper.hxx"
+#include "Scaling.hxx"
#include <svtools/saveopt.hxx>
@@ -66,6 +67,17 @@ using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
+//static
+Reference< chart2::XScaling > AxisHelper::createLinearScaling()
+{
+ return new LinearScaling( 1.0, 0.0 );
+}
+
+//static
+Reference< chart2::XScaling > AxisHelper::createLogarithmicScaling( double fBase )
+{
+ return new LogarithmicScaling( fBase );
+}
//static
ScaleData AxisHelper::createDefaultScale()
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index dd7fdad630df..09a814f277c8 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -81,7 +81,7 @@ CachedDataSequence::CachedDataSequence()
: OPropertyContainer( GetBroadcastHelper()),
CachedDataSequence_Base( GetMutex()),
m_eCurrentDataType( NUMERICAL ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
registerProperties();
}
@@ -89,52 +89,22 @@ CachedDataSequence::CachedDataSequence( const Reference< uno::XComponentContext
: OPropertyContainer( GetBroadcastHelper()),
CachedDataSequence_Base( GetMutex()),
m_eCurrentDataType( MIXED ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder( ))
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder( ))
{
registerProperties();
}
-CachedDataSequence::CachedDataSequence( const ::std::vector< double > & rVector )
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_eCurrentDataType( NUMERICAL ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
-{
- m_aNumericalSequence = ContainerToSequence( rVector );
- registerProperties();
-}
-
-CachedDataSequence::CachedDataSequence( const ::std::vector< OUString > & rVector )
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_eCurrentDataType( TEXTUAL ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
-{
- m_aTextualSequence = ContainerToSequence( rVector );
- registerProperties();
-}
-
CachedDataSequence::CachedDataSequence( const OUString & rSingleText )
: OPropertyContainer( GetBroadcastHelper()),
CachedDataSequence_Base( GetMutex()),
m_eCurrentDataType( TEXTUAL ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
m_aTextualSequence.realloc(1);
m_aTextualSequence[0] = rSingleText;
registerProperties();
}
-CachedDataSequence::CachedDataSequence( const ::std::vector< Any > & rVector )
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_eCurrentDataType( MIXED ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
-{
- m_aMixedSequence = ContainerToSequence( rVector );
- registerProperties();
-}
-
CachedDataSequence::CachedDataSequence( const CachedDataSequence & rSource )
: OMutexAndBroadcastHelper(),
OPropertyContainer( GetBroadcastHelper()),
@@ -143,7 +113,7 @@ CachedDataSequence::CachedDataSequence( const CachedDataSequence & rSource )
m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
m_sRole( rSource.m_sRole ),
m_eCurrentDataType( rSource.m_eCurrentDataType ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
switch( m_eCurrentDataType )
{
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 937aec554215..e9893bae0a89 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -463,6 +463,13 @@ void CharacterProperties::AddPropertiesToVector(
::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), /*com::sun::star::text::WritingMode2*/
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT ));
+
+ rOutProperties.push_back(
+ Property( C2U( "ParaIsCharacterDistance" ),
+ PROP_PARA_IS_CHARACTER_DISTANCE,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
}
void CharacterProperties::AddDefaultsToMap(
@@ -541,6 +548,7 @@ void CharacterProperties::AddDefaultsToMap(
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_PITCH, sal_Int16(aFontCTL.GetPitch()) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_WRITING_MODE, sal_Int16( com::sun::star::text::WritingMode2::PAGE ) );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PARA_IS_CHARACTER_DISTANCE, sal_True );
}
bool CharacterProperties::IsCharacterPropertyHandle( sal_Int32 nHandle )
diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx
index 83310fa38aec..2d6ce7cbfd9d 100644
--- a/chart2/source/tools/ChartModelHelper.cxx
+++ b/chart2/source/tools/ChartModelHelper.cxx
@@ -35,6 +35,9 @@
#include "DiagramHelper.hxx"
#include "DataSourceHelper.hxx"
#include "ControllerLockGuard.hxx"
+#include "UndoManager.hxx"
+#include "RangeHighlighter.hxx"
+#include "InternalDataProvider.hxx"
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
@@ -56,6 +59,39 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
//static
+uno::Reference< chart2::XUndoManager > ChartModelHelper::createUndoManager()
+{
+ return new UndoManager();
+}
+
+//static
+uno::Reference< chart2::data::XRangeHighlighter > ChartModelHelper::createRangeHighlighter(
+ const uno::Reference< view::XSelectionSupplier > & xSelectionSupplier )
+{
+ return new RangeHighlighter( xSelectionSupplier );
+}
+
+//static
+uno::Reference< chart2::data::XDataProvider > ChartModelHelper::createInternalDataProvider()
+{
+ return new InternalDataProvider();
+}
+
+//static
+uno::Reference< chart2::data::XDataProvider > ChartModelHelper::createInternalDataProvider(
+ const uno::Reference< ::com::sun::star::chart::XChartDataArray >& xDataToCopy )
+{
+ return new InternalDataProvider( xDataToCopy );
+}
+
+//static
+uno::Reference< chart2::data::XDataProvider > ChartModelHelper::createInternalDataProvider(
+ const uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc )
+{
+ return new InternalDataProvider( xChartDoc );
+}
+
+//static
uno::Reference< XDiagram > ChartModelHelper::findDiagram( const uno::Reference< frame::XModel >& xModel )
{
uno::Reference< XChartDocument > xChartDoc( xModel, uno::UNO_QUERY );
diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx
index 787d79668ca3..692f6ee54a1b 100644
--- a/chart2/source/tools/CommonConverters.cxx
+++ b/chart2/source/tools/CommonConverters.cxx
@@ -155,15 +155,6 @@ drawing::Position3D B3DPointToPosition3D( const ::basegfx::B3DPoint& rPoint)
);
}
-::basegfx::B3DPoint Direction3DToB3DPoint( const drawing::Direction3D& rDirection)
-{
- return ::basegfx::B3DPoint(
- rDirection.DirectionX
- , rDirection.DirectionY
- , rDirection.DirectionZ
- );
-}
-
::basegfx::B3DVector Direction3DToB3DVector( const drawing::Direction3D& rDirection)
{
return ::basegfx::B3DVector(
@@ -173,39 +164,6 @@ drawing::Position3D B3DPointToPosition3D( const ::basegfx::B3DPoint& rPoint)
);
}
-drawing::PolyPolygonShape3D MakeLine3D(
- const drawing::Position3D & rStart,
- const drawing::Position3D & rEnd )
-{
- drawing::PolyPolygonShape3D aPP;
-
- aPP.SequenceX.realloc(1);
- aPP.SequenceY.realloc(1);
- aPP.SequenceZ.realloc(1);
-
- drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray();
- drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray();
- drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray();
-
- pOuterSequenceX->realloc(2);
- pOuterSequenceY->realloc(2);
- pOuterSequenceZ->realloc(2);
-
- double* pInnerSequenceX = pOuterSequenceX->getArray();
- double* pInnerSequenceY = pOuterSequenceY->getArray();
- double* pInnerSequenceZ = pOuterSequenceZ->getArray();
-
- *pInnerSequenceX++ = rStart.PositionX;
- *pInnerSequenceY++ = rStart.PositionY;
- *pInnerSequenceZ++ = rStart.PositionZ;
-
- *pInnerSequenceX++ = rEnd.PositionX;
- *pInnerSequenceY++ = rEnd.PositionY;
- *pInnerSequenceZ++ = rEnd.PositionZ;
-
- return aPP;
-}
-
void AddPointToPoly( drawing::PolyPolygonShape3D& rPoly, const drawing::Position3D& rPos, sal_Int32 nPolygonIndex )
{
if(nPolygonIndex<0)
@@ -298,110 +256,6 @@ void appendPoly( drawing::PolyPolygonShape3D& rRet, const drawing::PolyPolygonSh
}
}
-/*
-drawing::PolyPolygonShape3D operator+(
- const drawing::PolyPolygonShape3D& rPoly1
- , const drawing::PolyPolygonShape3D& rPoly2 )
-{
- drawing::PolyPolygonShape3D aRet;
-
- sal_Int32 nOuterCount = Max( rPoly1.SequenceX.getLength(), rPoly2.SequenceX.getLength() );
- aRet.SequenceX.realloc(nOuterCount);
- aRet.SequenceY.realloc(nOuterCount);
- aRet.SequenceZ.realloc(nOuterCount);
-
- for( sal_Int32 nOuter=0;nOuter<nOuterCount;nOuter++ )
- {
- sal_Int32 nPointCount_1 = 0;
- sal_Int32 nPointCount_2 = 0;
- if(nOuter<rPoly1.SequenceX.getLength())
- nPointCount_1 = rPoly1.SequenceX[nOuter].getLength();
- if(nOuter<rPoly2.SequenceX.getLength())
- nPointCount_2 = rPoly2.SequenceX[nOuter].getLength();
-
- sal_Int32 nPointCount = nPointCount_1 + nPointCount_2;
-
- aRet.SequenceX[nOuter].realloc(nPointCount);
- aRet.SequenceY[nOuter].realloc(nPointCount);
- aRet.SequenceZ[nOuter].realloc(nPointCount);
-
- sal_Int32 nPointTarget=0;
-
- {
- sal_Int32 nPointSourceCount = nPointCount_1;
- const drawing::PolyPolygonShape3D* pPoly = &rPoly1;
- for( sal_Int32 nPointSource=0; nPointSource<nPointSourceCount ; nPointSource++,nPointTarget++ )
- {
- aRet.SequenceX[nOuter][nPointTarget] = pPoly->SequenceX[nOuter][nPointSource];
- aRet.SequenceY[nOuter][nPointTarget] = pPoly->SequenceY[nOuter][nPointSource];
- aRet.SequenceZ[nOuter][nPointTarget] = pPoly->SequenceZ[nOuter][nPointSource];
- }
- }
- {
- sal_Int32 nPointSourceCount = nPointCount_2;
- const drawing::PolyPolygonShape3D* pPoly = &rPoly2;
- for( sal_Int32 nPointSource=nPointSourceCount; nPointSource-- ; nPointTarget++ )
- {
- aRet.SequenceX[nOuter][nPointTarget] = pPoly->SequenceX[nOuter][nPointSource];
- aRet.SequenceY[nOuter][nPointTarget] = pPoly->SequenceY[nOuter][nPointSource];
- aRet.SequenceZ[nOuter][nPointTarget] = pPoly->SequenceZ[nOuter][nPointSource];
- }
- }
- }
- return aRet;
-}
-*/
-/*
-drawing::PolyPolygonShape3D operator+(
- const drawing::PolyPolygonShape3D& rPoly1
- , const drawing::PolyPolygonShape3D& rPoly2 )
-{
- drawing::PolyPolygonShape3D aRet;
-
- sal_Int32 nOuterCount = rPoly1.SequenceX.getLength()+rPoly2.SequenceX.getLength();
- aRet.SequenceX.realloc(nOuterCount);
- aRet.SequenceY.realloc(nOuterCount);
- aRet.SequenceZ.realloc(nOuterCount);
-
- drawing::DoubleSequence* pOuterSequenceX = aRet.SequenceX.getArray();
- drawing::DoubleSequence* pOuterSequenceY = aRet.SequenceY.getArray();
- drawing::DoubleSequence* pOuterSequenceZ = aRet.SequenceZ.getArray();
-
- for( sal_Int32 nOuterTarget=0;nOuterTarget<nOuterCount;nOuterTarget++ )
- {
- const drawing::PolyPolygonShape3D* pPoly = &rPoly1;
- sal_Int32 nOuterSource = nOuterTarget;
- if(nOuterTarget>=rPoly1.SequenceX.getLength())
- {
- pPoly = &rPoly2;
- nOuterSource -= rPoly1.SequenceX.getLength();
- }
-
- sal_Int32 nPointCount = pPoly->SequenceX[nOuterSource].getLength();
-
- pOuterSequenceX->realloc(nPointCount);
- pOuterSequenceY->realloc(nPointCount);
- pOuterSequenceZ->realloc(nPointCount);
-
- double* pInnerSequenceX = pOuterSequenceX->getArray();
- double* pInnerSequenceY = pOuterSequenceY->getArray();
- double* pInnerSequenceZ = pOuterSequenceZ->getArray();
-
- for( sal_Int32 nPoint=0;nPoint<nPointCount;nPoint++ )
- {
- *pInnerSequenceX = pPoly->SequenceX[nOuterSource][nPoint];
- *pInnerSequenceY = pPoly->SequenceY[nOuterSource][nPoint];
- *pInnerSequenceZ = pPoly->SequenceZ[nOuterSource][nPoint];
-
- pInnerSequenceX++; pInnerSequenceY++; pInnerSequenceZ++;
- }
-
- pOuterSequenceX++; pOuterSequenceY++; pOuterSequenceZ++;
- }
- return aRet;
-}
-*/
-
drawing::PolyPolygonShape3D BezierToPoly(
const drawing::PolyPolygonBezierCoords& rBezier )
{
@@ -494,26 +348,6 @@ drawing::Position3D operator+( const drawing::Position3D& rPos
);
}
-drawing::Direction3D operator+( const drawing::Direction3D& rDirection
- , const drawing::Direction3D& rDirectionAdd)
-{
- return drawing::Direction3D(
- rDirection.DirectionX + rDirectionAdd.DirectionX
- , rDirection.DirectionY + rDirectionAdd.DirectionY
- , rDirection.DirectionZ + rDirectionAdd.DirectionZ
- );
-}
-
-drawing::Position3D operator-( const drawing::Position3D& rPos
- , const drawing::Direction3D& rDirection)
-{
- return drawing::Position3D(
- rPos.PositionX - rDirection.DirectionX
- , rPos.PositionY - rDirection.DirectionY
- , rPos.PositionZ - rDirection.DirectionZ
- );
-}
-
drawing::Direction3D operator-( const drawing::Position3D& rPos1
, const drawing::Position3D& rPos2)
{
@@ -524,16 +358,6 @@ drawing::Direction3D operator-( const drawing::Position3D& rPos1
);
}
-drawing::Direction3D operator*( const drawing::Direction3D& rDirection
- , double fFraction)
-{
- return drawing::Direction3D(
- fFraction*rDirection.DirectionX
- , fFraction*rDirection.DirectionY
- , fFraction*rDirection.DirectionZ
- );
-}
-
bool operator==( const drawing::Position3D& rPos1
, const drawing::Position3D& rPos2)
{
@@ -597,16 +421,6 @@ uno::Sequence< double > Position3DToSequence( const drawing::Position3D& rPositi
return aRet;
}
-drawing::Direction3D operator/( const drawing::Direction3D& rDirection, double f )
-{
- OSL_ENSURE(f,"a Direction3D is divided by NULL");
- return drawing::Direction3D(
- rDirection.DirectionX/f
- , rDirection.DirectionY/f
- , rDirection.DirectionZ/f
- );
-}
-
using namespace ::com::sun::star::chart2;
uno::Sequence< double > DataSequenceToDoubleSequence(
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index 7e418f04ab7b..835872aad8e4 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -56,6 +56,12 @@ static const OUString aSeriesPropName( RTL_CONSTASCII_USTRINGPARAM("Series"));
namespace chart
{
+
+uno::Reference< chart2::XColorScheme > createConfigColorScheme( const uno::Reference< uno::XComponentContext > & xContext )
+{
+ return new ConfigColorScheme( xContext );
+}
+
namespace impl
{
class ChartConfigItem : public ::utl::ConfigItem
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 0de52f8a53ea..37c3a609ac9f 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -40,6 +40,8 @@
#include "ContainerHelper.hxx"
#include "ControllerLockGuard.hxx"
#include "PropertyHelper.hxx"
+#include "CachedDataSequence.hxx"
+#include "LabeledDataSequence.hxx"
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
@@ -117,6 +119,41 @@ void lcl_addErrorBarRanges(
} // anonymous namespace
+Reference< chart2::data::XDataSource > DataSourceHelper::createDataSource(
+ const Sequence< Reference< chart2::data::XLabeledDataSequence > >& rSequences )
+{
+ return new DataSource(rSequences);
+}
+
+Reference< chart2::data::XDataSequence > DataSourceHelper::createCachedDataSequence()
+{
+ return new ::chart::CachedDataSequence();
+}
+
+Reference< chart2::data::XDataSequence > DataSourceHelper::createCachedDataSequence( const ::rtl::OUString& rSingleText )
+{
+ return new ::chart::CachedDataSequence( rSingleText );
+}
+
+Reference< chart2::data::XLabeledDataSequence > DataSourceHelper::createLabeledDataSequence(
+ const Reference< chart2::data::XDataSequence >& xValues ,
+ const Reference< chart2::data::XDataSequence >& xLabels )
+{
+ return new ::chart::LabeledDataSequence( xValues, xLabels );
+}
+
+Reference< chart2::data::XLabeledDataSequence > DataSourceHelper::createLabeledDataSequence(
+ const Reference< chart2::data::XDataSequence >& xValues )
+{
+ return new ::chart::LabeledDataSequence( xValues );
+}
+
+Reference< chart2::data::XLabeledDataSequence > DataSourceHelper::createLabeledDataSequence(
+ const Reference< uno::XComponentContext >& xContext )
+{
+ return new ::chart::LabeledDataSequence( xContext );
+}
+
uno::Sequence< beans::PropertyValue > DataSourceHelper::createArguments(
bool bUseColumns, bool bFirstCellAsLabel, bool bHasCategories )
{
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index 6a704dbc54d8..a1b8b7c02106 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -166,11 +166,16 @@ bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequenc
namespace chart
{
+uno::Reference< beans::XPropertySet > createErrorBar( const uno::Reference< uno::XComponentContext > & xContext )
+{
+ return new ErrorBar( xContext );
+}
+
ErrorBar::ErrorBar(
uno::Reference< uno::XComponentContext > const & xContext ) :
::property::OPropertySet( m_aMutex ),
m_xContext( xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
ErrorBar::ErrorBar( const ErrorBar & rOther ) :
@@ -178,7 +183,7 @@ ErrorBar::ErrorBar( const ErrorBar & rOther ) :
impl::ErrorBar_Base(),
::property::OPropertySet( rOther, m_aMutex ),
m_xContext( rOther.m_xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
if( ! rOther.m_aDataSequences.empty())
{
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 3257821e521f..81e1407e3045 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -138,13 +138,6 @@ public:
void setColumnLabels( const ::std::vector< OUString > & rNewColumnLabels );
::std::vector< OUString > getColumnLabels() const;
- /** returns whether the data source was created by putting sequence contents
- into columns (true) or rows (false)
- */
- bool setDataByDataSource(
- const Reference< chart2::data::XDataSource > & xDataSource,
- const Sequence< beans::PropertyValue > & rArgs );
-
#if OSL_DEBUG_LEVEL > 2
void traceData() const;
#endif
@@ -628,49 +621,6 @@ void InternalData::setColumnLabels( const ::std::vector< OUString > & rNewColumn
return m_aColumnLabels;
}
-bool InternalData::setDataByDataSource(
- const Reference< chart2::data::XDataSource > & xDataSource,
- const Sequence< beans::PropertyValue > & rArgs )
-{
- OUString aRangeRepresentation;
- uno::Sequence< sal_Int32 > aSequenceMapping; //yyyy todo...? InternalData::setDataByDataSource
- bool bUseColumns = true;
- bool bFirstCellAsLabel = true;
- bool bHasCategories = true;
-
- DataSourceHelper::readArguments( rArgs, aRangeRepresentation, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories );
-
- typedef ::std::vector< Reference< chart2::data::XLabeledDataSequence > > tLSeqCntType;
- tLSeqCntType aLSeqVec( ContainerHelper::SequenceToVector( xDataSource->getDataSequences()));
- tLSeqCntType::const_iterator aIt( aLSeqVec.begin());
- const tLSeqCntType::const_iterator aEndIt( aLSeqVec.end());
-
- if( bHasCategories && aIt != aEndIt )
- {
- if( bUseColumns )
- setRowLabels( ContainerHelper::SequenceToVector(
- DataSequenceToStringSequence( (*aIt)->getValues() )));
- else
- setColumnLabels( ContainerHelper::SequenceToVector(
- DataSequenceToStringSequence( (*aIt)->getValues() )));
- ++aIt;
- }
-
- ::std::vector< Sequence< double > > aDataVec;
- ::std::vector< OUString > aLabelVec;
- transform( aIt, aEndIt, back_inserter( aDataVec ), lcl_ValuesOfLabeledSequence());
- transform( aIt, aEndIt, back_inserter( aLabelVec ), lcl_LabelOfLabeledSequence());
-
- setData( ContainerHelper::ContainerToSequence( aDataVec ), bUseColumns );
-
- if( bUseColumns )
- setColumnLabels( aLabelVec );
- else
- setRowLabels( aLabelVec );
-
- return bUseColumns;
-}
-
#if OSL_DEBUG_LEVEL > 2
void InternalData::traceData() const
{
diff --git a/chart2/source/tools/LabeledDataSequence.cxx b/chart2/source/tools/LabeledDataSequence.cxx
index 83c3a1e5a059..bb0ec7053497 100644
--- a/chart2/source/tools/LabeledDataSequence.cxx
+++ b/chart2/source/tools/LabeledDataSequence.cxx
@@ -46,13 +46,13 @@ namespace chart
LabeledDataSequence::LabeledDataSequence( const Reference< uno::XComponentContext > & xContext ) :
m_xContext( xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
LabeledDataSequence::LabeledDataSequence(
const uno::Reference< chart2::data::XDataSequence > & rValues ) :
m_xData( rValues ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
ModifyListenerHelper::addListener( m_xData, m_xModifyEventForwarder );
}
@@ -62,7 +62,7 @@ LabeledDataSequence::LabeledDataSequence(
const uno::Reference< chart2::data::XDataSequence > & rLabel ) :
m_xData( rValues ),
m_xLabel( rLabel ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
ModifyListenerHelper::addListener( m_xData, m_xModifyEventForwarder );
ModifyListenerHelper::addListener( m_xLabel, m_xModifyEventForwarder );
diff --git a/chart2/source/tools/ModifyListenerHelper.cxx b/chart2/source/tools/ModifyListenerHelper.cxx
index 42943d192c0f..722ecb82e155 100644
--- a/chart2/source/tools/ModifyListenerHelper.cxx
+++ b/chart2/source/tools/ModifyListenerHelper.cxx
@@ -106,6 +106,11 @@ namespace chart
namespace ModifyListenerHelper
{
+uno::Reference< util::XModifyListener > createModifyEventForwarder()
+{
+ return new ModifyEventForwarder();
+}
+
ModifyEventForwarder::ModifyEventForwarder() :
::cppu::WeakComponentImplHelper2<
::com::sun::star::util::XModifyBroadcaster,
@@ -114,11 +119,6 @@ ModifyEventForwarder::ModifyEventForwarder() :
{
}
-void ModifyEventForwarder::FireEvent( const Reference< uno::XWeak > & xSource )
-{
- lcl_fireModifyEvent( m_aModifyListeners, xSource, 0 );
-}
-
void ModifyEventForwarder::FireEvent( const lang::EventObject & rEvent )
{
lcl_fireModifyEvent( m_aModifyListeners, Reference< uno::XWeak >(), & rEvent );
diff --git a/chart2/source/tools/NameContainer.cxx b/chart2/source/tools/NameContainer.cxx
index 3fefe3a920df..815f72257490 100644
--- a/chart2/source/tools/NameContainer.cxx
+++ b/chart2/source/tools/NameContainer.cxx
@@ -50,6 +50,12 @@ namespace chart
{
//.............................................................................
+uno::Reference< container::XNameContainer > createNameContainer(
+ const ::com::sun::star::uno::Type& rType, const rtl::OUString& rServicename, const rtl::OUString& rImplementationName )
+{
+ return new NameContainer( rType, rServicename, rImplementationName );
+}
+
NameContainer::NameContainer( const ::com::sun::star::uno::Type& rType, const OUString& rServicename, const OUString& rImplementationName )
: m_aType( rType )
, m_aServicename( rServicename )
diff --git a/chart2/source/tools/OPropertySet.cxx b/chart2/source/tools/OPropertySet.cxx
index d3988bb93671..4ba7f99edcc1 100644
--- a/chart2/source/tools/OPropertySet.cxx
+++ b/chart2/source/tools/OPropertySet.cxx
@@ -63,7 +63,8 @@ OPropertySet::OPropertySet( ::osl::Mutex & par_rMutex ) :
// the following causes a warning; there seems to be no way to avoid it
OPropertySetHelper( static_cast< OBroadcastHelper & >( *this )),
m_rMutex( par_rMutex ),
- m_pImplProperties( new impl::ImplOPropertySet() )
+ m_pImplProperties( new impl::ImplOPropertySet() ),
+ m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault(false)
{
}
@@ -71,7 +72,8 @@ OPropertySet::OPropertySet( const OPropertySet & rOther, ::osl::Mutex & par_rMut
OBroadcastHelper( par_rMutex ),
// the following causes a warning; there seems to be no way to avoid it
OPropertySetHelper( static_cast< OBroadcastHelper & >( *this )),
- m_rMutex( par_rMutex )
+ m_rMutex( par_rMutex ),
+ m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault(false)
{
// /--
MutexGuard aGuard( m_rMutex );
@@ -80,6 +82,11 @@ OPropertySet::OPropertySet( const OPropertySet & rOther, ::osl::Mutex & par_rMut
// \--
}
+void OPropertySet::SetNewValuesExplicitlyEvenIfTheyEqualDefault()
+{
+ m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault = true;
+}
+
OPropertySet::~OPropertySet()
{}
@@ -322,6 +329,8 @@ sal_Bool SAL_CALL OPropertySet::convertFastPropertyValue
}
}
rConvertedValue = rValue;
+ if( !m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault && rOldValue == rConvertedValue )
+ return sal_False;//no change necessary
return sal_True;
}
@@ -341,7 +350,20 @@ void SAL_CALL OPropertySet::setFastPropertyValue_NoBroadcast
}
#endif
+ Any aDefault;
+ try
+ {
+ aDefault = GetDefaultValue( nHandle );
+ }
+ catch( beans::UnknownPropertyException ex )
+ {
+ aDefault.clear();
+ }
m_pImplProperties->SetPropertyValueByHandle( nHandle, rValue );
+ if( !m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault && aDefault.hasValue() && aDefault == rValue ) //#i98893# don't export defaults to file
+ m_pImplProperties->SetPropertyToDefault( nHandle );
+ else
+ m_pImplProperties->SetPropertyValueByHandle( nHandle, rValue );
}
void SAL_CALL OPropertySet::getFastPropertyValue
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 57c8ef01d5d6..07f8d16efffd 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -439,14 +439,6 @@ OUString ObjectIdentifier::createParticleForGrid(
return aRet.makeStringAndClear();
}
-OUString ObjectIdentifier::createClassifiedIdentifierForAxis(
- const Reference< XAxis >& xAxis
- , const Reference< frame::XModel >& xChartModel )
-{
- rtl::OUString aAxisCID( createClassifiedIdentifierForObject( xAxis,xChartModel ) );
- return aAxisCID;
-}
-
//static
OUString ObjectIdentifier::createClassifiedIdentifierForGrid(
const Reference< XAxis >& xAxis
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index 93ba4b43cfc3..ddddc7d71ee4 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -226,32 +226,18 @@ void ReferenceSizeProvider::getAutoResizeFromPropSet(
}
}
-void ReferenceSizeProvider::getAutoResizeFromTitle(
- const Reference< XTitle > & xTitle,
- ReferenceSizeProvider::AutoResizeState & rInOutState )
-{
- Reference< beans::XPropertySet > xProp( xTitle, uno::UNO_QUERY );
- if( xProp.is())
- getAutoResizeFromPropSet( xProp, rInOutState );
-}
-
void ReferenceSizeProvider::impl_getAutoResizeFromTitled(
const Reference< XTitled > & xTitled,
ReferenceSizeProvider::AutoResizeState & rInOutState )
{
if( xTitled.is())
{
- Reference< XTitle > xTitle( xTitled->getTitleObject());
- if( xTitle.is())
- getAutoResizeFromTitle( xTitle, rInOutState );
+ Reference< beans::XPropertySet > xProp( xTitled->getTitleObject(), uno::UNO_QUERY );
+ if( xProp.is())
+ getAutoResizeFromPropSet( xProp, rInOutState );
}
}
-ReferenceSizeProvider::AutoResizeState ReferenceSizeProvider::getAutoResizeState() const
-{
- return getAutoResizeState( m_xChartDoc );
-}
-
/** Retrieves the state auto-resize from all objects that support this
feature. If all objects return the same state, AUTO_RESIZE_YES or
AUTO_RESIZE_NO is returned.
diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx
index 377f087315ae..dea90a312845 100644
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -109,7 +109,7 @@ RegressionCurveModel::RegressionCurveModel(
::property::OPropertySet( m_aMutex ),
m_xContext( xContext ),
m_eRegressionCurveType( eCurveType ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()),
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_xEquationProperties( new RegressionEquation( xContext ))
{
// set 0 line width (default) hard, so that it is always written to XML,
@@ -125,7 +125,7 @@ RegressionCurveModel::RegressionCurveModel( const RegressionCurveModel & rOther
::property::OPropertySet( rOther, m_aMutex ),
m_xContext( rOther.m_xContext ),
m_eRegressionCurveType( rOther.m_eRegressionCurveType ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
m_xEquationProperties.set( CloneHelper::CreateRefClone< uno::Reference< beans::XPropertySet > >()( rOther.m_xEquationProperties ));
ModifyListenerHelper::addListener( m_xEquationProperties, m_xModifyEventForwarder );
diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx
index 83f9cde5f783..f820fb78c89e 100644
--- a/chart2/source/tools/StatisticsHelper.cxx
+++ b/chart2/source/tools/StatisticsHelper.cxx
@@ -337,7 +337,7 @@ Reference< beans::XPropertySet > StatisticsHelper::addErrorBars(
if( !( xSeriesProp->getPropertyValue( aPropName ) >>= xErrorBar ) ||
!xErrorBar.is())
{
- xErrorBar.set( new ErrorBar( xContext ));
+ xErrorBar.set( createErrorBar( xContext ));
}
OSL_ASSERT( xErrorBar.is());
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index 24e55ccfc90e..43006920951a 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -191,7 +191,7 @@ uno::Reference< XTitle > TitleHelper::createTitle(
switch( eTitleType )
{
case TitleHelper::SUB_TITLE:
- chart::TitleHelper::setCompleteString(
+ TitleHelper::setCompleteString(
rTitleText, xTitle, xContext, & fDefaultCharHeightSub );
break;
case TitleHelper::X_AXIS_TITLE:
@@ -201,11 +201,11 @@ uno::Reference< XTitle > TitleHelper::createTitle(
case TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION:
case TitleHelper::SECONDARY_X_AXIS_TITLE:
case TitleHelper::SECONDARY_Y_AXIS_TITLE:
- chart::TitleHelper::setCompleteString(
+ TitleHelper::setCompleteString(
rTitleText, xTitle, xContext, & fDefaultCharHeightAxis );
break;
default:
- chart::TitleHelper::setCompleteString( rTitleText, xTitle, xContext );
+ TitleHelper::setCompleteString( rTitleText, xTitle, xContext );
break;
}
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index 041b7a288648..c5e20d70629f 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -79,7 +79,7 @@ UncachedDataSequence::UncachedDataSequence(
UncachedDataSequence_Base( GetMutex()),
m_xDataProvider( xIntDataProv ),
m_aSourceRepresentation( rRangeRepresentation ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
registerProperties();
}
@@ -92,7 +92,7 @@ UncachedDataSequence::UncachedDataSequence(
UncachedDataSequence_Base( GetMutex()),
m_xDataProvider( xIntDataProv ),
m_aSourceRepresentation( rRangeRepresentation ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
registerProperties();
setFastPropertyValue_NoBroadcast( PROP_PROPOSED_ROLE, uno::makeAny( rRole ));
@@ -107,7 +107,7 @@ UncachedDataSequence::UncachedDataSequence( const UncachedDataSequence & rSource
m_sRole( rSource.m_sRole ),
m_xDataProvider( rSource.m_xDataProvider ),
m_aSourceRepresentation( rSource.m_aSourceRepresentation ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
registerProperties();
}