summaryrefslogtreecommitdiff
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
parentce3275ad4a2c96c8178b3764c05085f9c8ad1265 (diff)
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)
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.cxx1
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx3
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx13
-rw-r--r--chart2/source/controller/chartapiwrapper/GridWrapper.cxx1
-rw-r--r--chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx1
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx3
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx557
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx234
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx2
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx37
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx8
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx57
-rw-r--r--chart2/source/controller/dialogs/DialogModel.hxx8
-rw-r--r--chart2/source/controller/dialogs/Strings.src6
-rw-r--r--chart2/source/controller/dialogs/Strings_Statistic.src4
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertDataLabel.src4
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx12
-rw-r--r--chart2/source/controller/dialogs/hidother.src2
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx87
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.hxx9
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel_IDs.hrc4
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc54
-rw-r--r--chart2/source/controller/dialogs/res_TextSeparator.cxx7
-rw-r--r--chart2/source/controller/dialogs/res_TextSeparator.hxx1
-rw-r--r--chart2/source/controller/dialogs/res_Trendline_tmpl.hrc2
-rw-r--r--chart2/source/controller/dialogs/tp_DataLabel.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_DataLabel.src2
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx8
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx2
-rw-r--r--chart2/source/controller/inc/ChartRenderer.hxx2
-rw-r--r--chart2/source/controller/inc/ConfigurationAccess.hxx17
-rw-r--r--chart2/source/controller/inc/HelpIds.hrc4
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx76
-rw-r--r--chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx7
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx30
-rw-r--r--chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx3
-rw-r--r--chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx2
-rw-r--r--chart2/source/controller/main/ChartRenderer.cxx5
-rw-r--r--chart2/source/controller/main/ConfigurationAccess.cxx39
-rw-r--r--chart2/source/inc/AxisHelper.hxx15
-rw-r--r--chart2/source/inc/BaseGFXHelper.hxx7
-rw-r--r--chart2/source/inc/CachedDataSequence.hxx18
-rw-r--r--chart2/source/inc/CharacterProperties.hxx1
-rw-r--r--chart2/source/inc/ChartModelHelper.hxx21
-rw-r--r--chart2/source/inc/ChartTypeHelper.hxx10
-rw-r--r--chart2/source/inc/ColorPerPointHelper.hxx2
-rw-r--r--chart2/source/inc/CommonConverters.hxx41
-rw-r--r--chart2/source/inc/ConfigColorScheme.hxx15
-rw-r--r--chart2/source/inc/ControllerLockGuard.hxx4
-rw-r--r--chart2/source/inc/DataSeriesHelper.hxx2
-rw-r--r--chart2/source/inc/DataSource.hxx3
-rw-r--r--chart2/source/inc/DataSourceHelper.hxx36
-rw-r--r--chart2/source/inc/DiagramHelper.hxx8
-rw-r--r--chart2/source/inc/ErrorBar.hxx6
-rw-r--r--chart2/source/inc/ExplicitCategoriesProvider.hxx4
-rw-r--r--chart2/source/inc/ExponentialRegressionCurveCalculator.hxx3
-rw-r--r--chart2/source/inc/InternalDataProvider.hxx3
-rw-r--r--chart2/source/inc/LabeledDataSequence.hxx3
-rw-r--r--chart2/source/inc/LifeTime.hxx28
-rw-r--r--chart2/source/inc/LineProperties.hxx4
-rw-r--r--chart2/source/inc/LinearRegressionCurveCalculator.hxx3
-rw-r--r--chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx3
-rw-r--r--chart2/source/inc/MeanValueRegressionCurveCalculator.hxx3
-rw-r--r--chart2/source/inc/MediaDescriptorHelper.hxx2
-rw-r--r--chart2/source/inc/ModifyListenerCallBack.hxx6
-rw-r--r--chart2/source/inc/ModifyListenerHelper.hxx6
-rw-r--r--chart2/source/inc/NameContainer.hxx5
-rw-r--r--chart2/source/inc/OPropertySet.hxx3
-rw-r--r--chart2/source/inc/ObjectIdentifier.hxx10
-rw-r--r--chart2/source/inc/PotentialRegressionCurveCalculator.hxx2
-rw-r--r--chart2/source/inc/RangeHighlighter.hxx3
-rw-r--r--chart2/source/inc/ReferenceSizeProvider.hxx36
-rw-r--r--chart2/source/inc/RegressionCurveCalculator.hxx3
-rw-r--r--chart2/source/inc/RegressionCurveHelper.hxx6
-rw-r--r--chart2/source/inc/RelativePositionHelper.hxx2
-rw-r--r--chart2/source/inc/RessourceManager.hxx2
-rw-r--r--chart2/source/inc/Scaling.hxx23
-rw-r--r--chart2/source/inc/Strings.hrc6
-rw-r--r--chart2/source/inc/ThreeDHelper.hxx6
-rw-r--r--chart2/source/inc/UncachedDataSequence.hxx2
-rw-r--r--chart2/source/inc/UndoGuard.hxx4
-rw-r--r--chart2/source/inc/UndoManager.hxx3
-rw-r--r--chart2/source/inc/WeakListenerAdapter.hxx5
-rw-r--r--chart2/source/inc/WrappedIgnoreProperty.hxx10
-rw-r--r--chart2/source/inc/WrappedPropertySet.hxx4
-rw-r--r--chart2/source/inc/XMLRangeHelper.hxx2
-rw-r--r--chart2/source/inc/chartview/DrawModelWrapper.hxx20
-rw-r--r--chart2/source/inc/chartview/ExplicitValueProvider.hxx2
-rw-r--r--chart2/source/inc/chartview/NumberFormatterWrapper.hxx2
-rw-r--r--chart2/source/model/inc/BaseCoordinateSystem.hxx1
-rw-r--r--chart2/source/model/inc/Diagram.hxx1
-rw-r--r--chart2/source/model/inc/StockBar.hxx1
-rw-r--r--chart2/source/model/main/Axis.cxx4
-rw-r--r--chart2/source/model/main/BaseCoordinateSystem.cxx4
-rw-r--r--chart2/source/model/main/ChartData.cxx29
-rw-r--r--chart2/source/model/main/ChartData.hxx13
-rw-r--r--chart2/source/model/main/ChartModel.cxx4
-rw-r--r--chart2/source/model/main/DataPoint.cxx10
-rw-r--r--chart2/source/model/main/DataPointProperties.cxx9
-rw-r--r--chart2/source/model/main/DataPointProperties.hxx1
-rw-r--r--chart2/source/model/main/DataSeries.cxx4
-rw-r--r--chart2/source/model/main/Diagram.cxx6
-rw-r--r--chart2/source/model/main/FormattedString.cxx4
-rw-r--r--chart2/source/model/main/GridProperties.cxx6
-rw-r--r--chart2/source/model/main/ImplChartModel.cxx18
-rw-r--r--chart2/source/model/main/Legend.cxx4
-rw-r--r--chart2/source/model/main/PageBackground.cxx4
-rw-r--r--chart2/source/model/main/RectangularDataSource.cxx297
-rw-r--r--chart2/source/model/main/StockBar.cxx5
-rw-r--r--chart2/source/model/main/Title.cxx4
-rw-r--r--chart2/source/model/main/Wall.cxx4
-rw-r--r--chart2/source/model/template/ChartType.cxx8
-rw-r--r--chart2/source/model/template/ChartTypeManager.cxx1
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx1
-rw-r--r--chart2/source/model/template/DataInterpreter.cxx4
-rw-r--r--chart2/source/model/template/NetChartType.cxx5
-rw-r--r--chart2/source/model/template/NetChartTypeTemplate.cxx1
-rw-r--r--chart2/source/model/template/PieChartType.cxx4
-rw-r--r--chart2/source/model/template/PieChartTypeTemplate.cxx1
-rw-r--r--chart2/source/model/template/ScatterChartType.cxx4
-rw-r--r--chart2/source/model/template/ScatterChartTypeTemplate.cxx1
-rw-r--r--chart2/source/model/template/StockChartTypeTemplate.cxx1
-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
-rw-r--r--chart2/source/view/axes/ScaleAutomatism.cxx50
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx197
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx52
-rw-r--r--chart2/source/view/inc/LabelPositionHelper.hxx3
-rw-r--r--chart2/source/view/inc/PlottingPositionHelper.hxx2
-rw-r--r--chart2/source/view/inc/VDataSeries.hxx1
-rw-r--r--chart2/source/view/inc/VSeriesPlotter.hxx1
-rw-r--r--chart2/source/view/main/ChartView.cxx35
-rw-r--r--chart2/source/view/main/LabelPositionHelper.cxx355
-rw-r--r--chart2/source/view/main/PlottingPositionHelper.cxx2
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx1
-rw-r--r--chart2/source/view/main/VDataSeries.cxx9
-rw-r--r--sc/source/filter/excel/xechart.cxx682
-rw-r--r--sc/source/filter/excel/xerecord.cxx18
-rw-r--r--sc/source/filter/excel/xichart.cxx267
-rw-r--r--sc/source/filter/excel/xlchart.cxx44
-rw-r--r--sc/source/filter/excel/xlstyle.cxx6
-rw-r--r--sc/source/filter/inc/xechart.hxx121
-rw-r--r--sc/source/filter/inc/xerecord.hxx17
-rw-r--r--sc/source/filter/inc/xichart.hxx22
-rw-r--r--sc/source/filter/inc/xlchart.hxx85
-rw-r--r--sc/source/filter/inc/xlconst.hxx13
165 files changed, 2071 insertions, 2592 deletions
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index 9a024cf309fc..7fd921e761dc 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -32,7 +32,6 @@
#include "precompiled_chart2.hxx"
#include "AxisWrapper.hxx"
#include "AxisHelper.hxx"
-#include "Scaling.hxx"
#include "Chart2ModelContact.hxx"
#include "ContainerHelper.hxx"
#include "macros.hxx"
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index ee7069338872..8cbb0c5af80c 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -37,7 +37,7 @@
#include "servicenames_charttypes.hxx"
#include "ContainerHelper.hxx"
#include "CommonFunctors.hxx"
-#include "InternalDataProvider.hxx"
+#include "ChartModelHelper.hxx"
#include "DataSeriesHelper.hxx"
#include "ControllerLockGuard.hxx"
#include "Chart2ModelContact.hxx"
@@ -580,7 +580,7 @@ void ChartDataWrapper::applyData( bool bSetValues, bool bSetRowDescriptions, boo
// create a data provider containing the new data
uno::Reference< chart2::data::XDataProvider > xTempDataProvider(
- new InternalDataProvider());
+ ChartModelHelper::createInternalDataProvider() );
if( ! xTempDataProvider.is())
throw uno::RuntimeException( C2U("Couldn't create temporary data provider"),
static_cast< ::cppu::OWeakObject * >( this ));
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 5869a1e4bdb0..2cd99ecef534 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -43,7 +43,6 @@
#include "chartview/ExplicitValueProvider.hxx"
#include "chartview/DrawModelWrapper.hxx"
#include "Chart2ModelContact.hxx"
-#include "InternalDataProvider.hxx"
#include "DiagramHelper.hxx"
#include "DataSourceHelper.hxx"
@@ -899,7 +898,7 @@ void SAL_CALL ChartDocumentWrapper::attachData( const Reference< XChartData >& x
// create a data provider containing the new data
Reference< chart2::data::XDataProvider > xTempDataProvider(
- new InternalDataProvider( xDataArray ));
+ ChartModelHelper::createInternalDataProvider( xDataArray ));
if( ! xTempDataProvider.is())
throw uno::RuntimeException( C2U("Couldn't create temporary data provider"),
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index fc62b3b77223..a6c18f9475dc 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -50,6 +50,7 @@
#include "WrappedDataCaptionProperties.hxx"
#include "WrappedSeriesAreaOrLineProperty.hxx"
#include "WrappedScaleTextProperties.hxx"
+#include "WrappedTextRotationProperty.hxx"
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
// header for define DBG_ASSERT
@@ -90,7 +91,8 @@ enum
PROP_SERIES_PERCENTAGE_NUMBERFORMAT,
PROP_SERIES_DATAPOINT_LABEL_PLACEMENT,
//other series properties
- PROP_SERIES_ATTACHED_AXIS
+ PROP_SERIES_ATTACHED_AXIS,
+ PROP_SERIES_DATAPOINT_TEXT_ROTATION
};
void lcl_AddPropertiesToVector_PointProperties(
@@ -145,6 +147,13 @@ void lcl_AddPropertiesToVector_PointProperties(
::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEVOID ));
+
+ rOutProperties.push_back(
+ Property( C2U( "TextRotation" ),
+ PROP_SERIES_DATAPOINT_TEXT_ROTATION,
+ ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
}
void lcl_AddPropertiesToVector_SeriesOnly(
@@ -750,6 +759,8 @@ const std::vector< WrappedProperty* > DataSeriesPointWrapper::createWrappedPrope
aWrappedProperties.push_back( new WrappedSegmentOffsetProperty() );
aWrappedProperties.push_back( new WrappedProperty( C2U( "D3DPercentDiagonal" ), C2U( "PercentDiagonal" ) ) );
+ aWrappedProperties.push_back( new WrappedTextRotationProperty() );
+
return aWrappedProperties;
}
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index 11cf4cbb3102..7aebd872f870 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -34,7 +34,6 @@
#include "GridWrapper.hxx"
#include "macros.hxx"
#include "AxisHelper.hxx"
-#include "Scaling.hxx"
#include "Chart2ModelContact.hxx"
#include "ContainerHelper.hxx"
#include "AxisIndexDefines.hxx"
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index 7e9aa4c6aeb9..efda626e5fd6 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -33,7 +33,6 @@
#include "WallFloorWrapper.hxx"
#include "macros.hxx"
-#include "Scaling.hxx"
#include "Chart2ModelContact.hxx"
#include "ContainerHelper.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index 9c3330932fc1..ffbaac3a5eb0 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -33,7 +33,6 @@
#include "WrappedScaleProperty.hxx"
#include "macros.hxx"
-#include "Scaling.hxx"
#include "CommonConverters.hxx"
#include "AxisHelper.hxx"
#include <com/sun/star/chart2/XAxis.hpp>
@@ -280,7 +279,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
if( (!bBool) != (!bWasLogarithm) )
{
if( bBool )
- aScaleData.Scaling = new LogarithmicScaling( 10.0 );
+ aScaleData.Scaling = AxisHelper::createLogarithmicScaling( 10.0 );
else
aScaleData.Scaling = 0;
bSetScaleData = true;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
index 96067e01c510..e5f45408217e 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
@@ -54,23 +54,6 @@ void WrappedSceneProperty::addWrappedProperties( std::vector< WrappedProperty* >
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
rList.push_back( new WrappedD3DTransformMatrixProperty( spChart2ModelContact ) );
- /*
- rList.push_back( new WrappedD3DSceneShadeModeProperty() );
- rList.push_back( new WrappedD3DScenePerspectiveProperty() );
- rList.push_back( new WrappedD3DSceneAmbientColorProperty() );
- for( sal_Int32 nN=1; nN<=8; nN++ )
- {
- rList.push_back( new WrappedD3DSceneLightColorProperty(nN) );
- rList.push_back( new WrappedD3DSceneLightDirectionProperty(nN) );
- rList.push_back( new WrappedD3DSceneLightOnProperty(nN) );
- }
-
- rList.push_back( new WrappedD3DSceneDistanceProperty() );
- rList.push_back( new WrappedD3DSceneFocalLengthProperty() );
- rList.push_back( new WrappedD3DSceneShadowSlantProperty() );
- rList.push_back( new WrappedD3DSceneTwoSidedLightingProperty() );
- rList.push_back( new WrappedD3DCameraGeometryProperty() );
- */
}
//----------------------------------------------------------------------------------------------------------------------
@@ -146,546 +129,6 @@ Any WrappedD3DTransformMatrixProperty::getPropertyDefault( const Reference< bean
return WrappedProperty::getPropertyDefault( xInnerPropertyState );
}
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-/*
-WrappedD3DSceneShadeModeProperty::WrappedD3DSceneShadeModeProperty()
- : WrappedProperty(C2U("D3DSceneShadeMode"),OUString())
-{
-}
-
-WrappedD3DSceneShadeModeProperty::~WrappedD3DSceneShadeModeProperty()
-{
-}
-
-void WrappedD3DSceneShadeModeProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- drawing::ShadeMode aNewValue;
- if( !(rOuterValue >>= aNewValue) )
- throw lang::IllegalArgumentException( C2U("Property D3DSceneShadeMode requires value of type drawing::ShadeMode"), 0, 0 );
-
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DSceneShadeMode" );
- return;
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
-
- if( aSceneDescriptor.aShadeMode != aNewValue )
- {
- aSceneDescriptor.aShadeMode = aNewValue;
- xInnerPropertySet->setPropertyValue( C2U( "SceneProperties" ), uno::makeAny( aSceneDescriptor ) );
- }
-}
-
-Any WrappedD3DSceneShadeModeProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DTransformMatrix" );
- return Any();
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
- return uno::makeAny( aSceneDescriptor.aShadeMode );
-}
-
-Any WrappedD3DSceneShadeModeProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return uno::makeAny( drawing::ShadeMode_SMOOTH );
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DScenePerspectiveProperty::WrappedD3DScenePerspectiveProperty()
- : WrappedProperty(C2U("D3DScenePerspective"),OUString())
-{
-}
-
-WrappedD3DScenePerspectiveProperty::~WrappedD3DScenePerspectiveProperty()
-{
-}
-
-void WrappedD3DScenePerspectiveProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- drawing::ProjectionMode aNewValue;
- if( !(rOuterValue >>= aNewValue) )
- throw lang::IllegalArgumentException( C2U("Property D3DScenePerspective requires value of type drawing::ProjectionMode"), 0, 0 );
-
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DScenePerspective" );
- return;
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
-
- if( aSceneDescriptor.aProjectionMode != aNewValue )
- {
- aSceneDescriptor.aProjectionMode = aNewValue;
- xInnerPropertySet->setPropertyValue( C2U( "SceneProperties" ), uno::makeAny( aSceneDescriptor ) );
- }
-}
-
-Any WrappedD3DScenePerspectiveProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DTransformMatrix" );
- return Any();
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
- return uno::makeAny( aSceneDescriptor.aProjectionMode );
-}
-
-Any WrappedD3DScenePerspectiveProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return uno::makeAny( drawing::ProjectionMode_PERSPECTIVE );
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DSceneAmbientColorProperty::WrappedD3DSceneAmbientColorProperty()
- : WrappedProperty(C2U("D3DSceneAmbientColor"),OUString())
-{
-}
-
-WrappedD3DSceneAmbientColorProperty::~WrappedD3DSceneAmbientColorProperty()
-{
-}
-
-void WrappedD3DSceneAmbientColorProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- sal_Int32 nNewColor;
- if( !(rOuterValue >>= nNewColor) )
- throw lang::IllegalArgumentException( C2U("Property D3DSceneAmbientColor requires value of type sal_Int32"), 0, 0 );
-
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DSceneAmbientColor" );
- return;
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
-
- if( aSceneDescriptor.nAmbientLightColor != nNewColor )
- {
- aSceneDescriptor.nAmbientLightColor = nNewColor;
- xInnerPropertySet->setPropertyValue( C2U( "SceneProperties" ), uno::makeAny( aSceneDescriptor ) );
- }
-}
-
-Any WrappedD3DSceneAmbientColorProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DSceneAmbientColor" );
- return Any();
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
- return uno::makeAny( aSceneDescriptor.nAmbientLightColor );
-}
-
-Any WrappedD3DSceneAmbientColorProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return uno::makeAny( sal_Int32(0x666666) ); // grey40
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DSceneLightColorProperty::WrappedD3DSceneLightColorProperty( sal_Int32 nLightNumber )
- : WrappedProperty(C2U("D3DSceneLightColor"),OUString())
- , m_nLightIndex( nLightNumber-1 )
-{
- if( m_nLightIndex < 0 )
- m_nLightIndex = 0;
-
- m_aOuterName += OUString::valueOf( nLightNumber );
-}
-
-WrappedD3DSceneLightColorProperty::~WrappedD3DSceneLightColorProperty()
-{
-}
-
-void WrappedD3DSceneLightColorProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- sal_Int32 nNewColor;
- if( !(rOuterValue >>= nNewColor) )
- throw lang::IllegalArgumentException( C2U("Property D3DSceneAmbientColor requires value of type sal_Int32"), 0, 0 );
-
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DSceneAmbientColor" );
- return;
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
-
- if( aSceneDescriptor.aLightSources.getLength() <= m_nLightIndex )
- aSceneDescriptor.aLightSources.realloc(m_nLightIndex+1);
-
- if( aSceneDescriptor.aLightSources[m_nLightIndex].nDiffuseColor != nNewColor )
- {
- aSceneDescriptor.aLightSources[m_nLightIndex].nDiffuseColor = nNewColor;
- xInnerPropertySet->setPropertyValue( C2U( "SceneProperties" ), uno::makeAny( aSceneDescriptor ) );
- }
-}
-
-Any WrappedD3DSceneLightColorProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DSceneAmbientColor" );
- return Any();
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
- if( aSceneDescriptor.aLightSources.getLength() <= m_nLightIndex )
- return getPropertyDefault( 0 );
-
- return uno::makeAny( aSceneDescriptor.aLightSources[m_nLightIndex].nDiffuseColor );
-}
-
-Any WrappedD3DSceneLightColorProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- if(m_nLightIndex==1)
- return uno::makeAny( sal_Int32(0xcccccc) ); // grey80
- return uno::makeAny( sal_Int32(0xffffff) ); // white
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DSceneLightDirectionProperty::WrappedD3DSceneLightDirectionProperty( sal_Int32 nLightNumber )
- : WrappedProperty(C2U("D3DSceneLightDirection"),OUString())
- , m_nLightIndex( nLightNumber-1 )
-{
- if( m_nLightIndex < 0 )
- m_nLightIndex = 0;
-
- m_aOuterName += OUString::valueOf( nLightNumber );
-}
-
-WrappedD3DSceneLightDirectionProperty::~WrappedD3DSceneLightDirectionProperty()
-{
-}
-
-void WrappedD3DSceneLightDirectionProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- drawing::Direction3D aNewValue;
- if( !(rOuterValue >>= aNewValue) )
- throw lang::IllegalArgumentException( C2U("Property D3DSceneLightDirection requires value of type drawing::Direction3D"), 0, 0 );
-
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DSceneLightDirection" );
- return;
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
-
- if( aSceneDescriptor.aLightSources.getLength() <= m_nLightIndex )
- aSceneDescriptor.aLightSources.realloc(m_nLightIndex+1);
-
- if( Direction3DToB3DPoint( aSceneDescriptor.aLightSources[m_nLightIndex].aDirection ) != Direction3DToB3DPoint( aNewValue ) )
- {
- aSceneDescriptor.aLightSources[m_nLightIndex].aDirection = aNewValue;
- xInnerPropertySet->setPropertyValue( C2U( "SceneProperties" ), uno::makeAny( aSceneDescriptor ) );
- }
-}
-
-Any WrappedD3DSceneLightDirectionProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DSceneLightDirection" );
- return Any();
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
- if( aSceneDescriptor.aLightSources.getLength() <= m_nLightIndex )
- return getPropertyDefault( 0 );
-
- return uno::makeAny( aSceneDescriptor.aLightSources[m_nLightIndex].aDirection );
-}
-
-Any WrappedD3DSceneLightDirectionProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return uno::makeAny( drawing::Direction3D( 1, 1, 1 ) );
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DSceneLightOnProperty::WrappedD3DSceneLightOnProperty( sal_Int32 nLightNumber )
- : WrappedProperty(C2U("D3DSceneLightOn"),OUString())
- , m_nLightIndex( nLightNumber-1 )
-{
- if( m_nLightIndex < 0 )
- m_nLightIndex = 0;
-
- m_aOuterName += OUString::valueOf( nLightNumber );
-}
-
-WrappedD3DSceneLightOnProperty::~WrappedD3DSceneLightOnProperty()
-{
-}
-
-void WrappedD3DSceneLightOnProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- sal_Bool bNewValue;
- if( !(rOuterValue >>= bNewValue) )
- throw lang::IllegalArgumentException( C2U("Property D3DSceneLightOn requires value of type sal_Bool"), 0, 0 );
-
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DSceneLightOn" );
- return;
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
-
- if( aSceneDescriptor.aLightSources.getLength() <= m_nLightIndex )
- aSceneDescriptor.aLightSources.realloc(m_nLightIndex+1);
-
- if( aSceneDescriptor.aLightSources[m_nLightIndex].bIsEnabled != bNewValue )
- {
- aSceneDescriptor.aLightSources[m_nLightIndex].bIsEnabled = bNewValue;
- xInnerPropertySet->setPropertyValue( C2U( "SceneProperties" ), uno::makeAny( aSceneDescriptor ) );
- }
-}
-
-Any WrappedD3DSceneLightOnProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- if( !xInnerPropertySet.is() )
- {
- DBG_ERROR( "need xInnerPropertySet to wrap property D3DSceneLightOn" );
- return Any();
- }
-
- chart2::SceneDescriptor aSceneDescriptor;
- xInnerPropertySet->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor;
- if( aSceneDescriptor.aLightSources.getLength() <= m_nLightIndex )
- return getPropertyDefault( 0 );
-
- return uno::makeAny( aSceneDescriptor.aLightSources[m_nLightIndex].bIsEnabled );
-}
-
-Any WrappedD3DSceneLightOnProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- if(m_nLightIndex==1)
- return uno::makeAny( sal_Bool(sal_True) );
- return uno::makeAny( sal_Bool(sal_False) );
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DSceneDistanceProperty::WrappedD3DSceneDistanceProperty()
- : WrappedProperty(C2U("D3DSceneDistance"),OUString())
-{
-}
-
-WrappedD3DSceneDistanceProperty::~WrappedD3DSceneDistanceProperty()
-{
-}
-
-void WrappedD3DSceneDistanceProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return; //this property is not supported anymore
-}
-
-Any WrappedD3DSceneDistanceProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return getPropertyDefault(0);//this property is not supported anymore
-}
-
-Any WrappedD3DSceneDistanceProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- Any aRet;
- aRet <<= sal_Int32(419);
- return aRet;
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DSceneFocalLengthProperty::WrappedD3DSceneFocalLengthProperty()
- : WrappedProperty(C2U("D3DSceneFocalLength"),OUString())
-{
-}
-
-WrappedD3DSceneFocalLengthProperty::~WrappedD3DSceneFocalLengthProperty()
-{
-}
-
-void WrappedD3DSceneFocalLengthProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return; //this property is not supported anymore
-}
-
-Any WrappedD3DSceneFocalLengthProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return getPropertyDefault(0);//this property is not supported anymore
-}
-
-Any WrappedD3DSceneFocalLengthProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- Any aRet;
- aRet <<= sal_Int32(800);
- return aRet;
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DSceneShadowSlantProperty::WrappedD3DSceneShadowSlantProperty()
- : WrappedProperty(C2U("D3DSceneShadowSlant"),OUString())
-{
-}
-
-WrappedD3DSceneShadowSlantProperty::~WrappedD3DSceneShadowSlantProperty()
-{
-}
-
-void WrappedD3DSceneShadowSlantProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return; //this property is not supported anymore
-}
-
-Any WrappedD3DSceneShadowSlantProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return getPropertyDefault(0);//this property is not supported anymore
-}
-
-Any WrappedD3DSceneShadowSlantProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- Any aRet;
- aRet <<= sal_Int32(0);
- return aRet;
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DSceneTwoSidedLightingProperty::WrappedD3DSceneTwoSidedLightingProperty()
- : WrappedProperty(C2U("D3DSceneTwoSidedLighting"),OUString())
-{
-}
-
-WrappedD3DSceneTwoSidedLightingProperty::~WrappedD3DSceneTwoSidedLightingProperty()
-{
-}
-
-void WrappedD3DSceneTwoSidedLightingProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return; //this property is not supported anymore
-}
-
-Any WrappedD3DSceneTwoSidedLightingProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return getPropertyDefault(0);//this property is not supported anymore
-}
-
-Any WrappedD3DSceneTwoSidedLightingProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- Any aRet;
- aRet <<= sal_Bool(sal_False);
- return aRet;
-}
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-WrappedD3DCameraGeometryProperty::WrappedD3DCameraGeometryProperty()
- : WrappedProperty(C2U("D3DCameraGeometry"),OUString())
-{
-}
-
-WrappedD3DCameraGeometryProperty::~WrappedD3DCameraGeometryProperty()
-{
-}
-
-void WrappedD3DCameraGeometryProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return; //this property is not supported anymore
-}
-
-Any WrappedD3DCameraGeometryProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return getPropertyDefault(0);//this property is not supported anymore
-}
-
-Any WrappedD3DCameraGeometryProperty::getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
- throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
-{
- return Any();
-}
-*/
-
} //namespace wrapper
} //namespace chart
//.............................................................................
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
index f587954968bb..520524e7c4d3 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx
@@ -77,240 +77,6 @@ private:
::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
};
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-/*
-class WrappedD3DSceneShadeModeProperty : public WrappedProperty
-{
-public:
- WrappedD3DSceneShadeModeProperty();
- virtual ~WrappedD3DSceneShadeModeProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DScenePerspectiveProperty : public WrappedProperty
-{
-public:
- WrappedD3DScenePerspectiveProperty();
- virtual ~WrappedD3DScenePerspectiveProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DSceneAmbientColorProperty : public WrappedProperty
-{
-public:
- WrappedD3DSceneAmbientColorProperty();
- virtual ~WrappedD3DSceneAmbientColorProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DSceneLightColorProperty : public WrappedProperty
-{
-public:
- WrappedD3DSceneLightColorProperty( sal_Int32 nLightNumber );
- virtual ~WrappedD3DSceneLightColorProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
-private:
- sal_Int32 m_nLightIndex;
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DSceneLightDirectionProperty : public WrappedProperty
-{
-public:
- WrappedD3DSceneLightDirectionProperty( sal_Int32 nLightNumber );
- virtual ~WrappedD3DSceneLightDirectionProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
-private:
- sal_Int32 m_nLightIndex;
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DSceneLightOnProperty : public WrappedProperty
-{
-public:
- WrappedD3DSceneLightOnProperty( sal_Int32 nLightNumber );
- virtual ~WrappedD3DSceneLightOnProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
-private:
- sal_Int32 m_nLightIndex;
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DSceneDistanceProperty : public WrappedProperty
-{
-public:
- WrappedD3DSceneDistanceProperty();
- virtual ~WrappedD3DSceneDistanceProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DSceneShadowSlantProperty : public WrappedProperty
-{
-public:
- WrappedD3DSceneShadowSlantProperty();
- virtual ~WrappedD3DSceneShadowSlantProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DSceneFocalLengthProperty : public WrappedProperty
-{
-public:
- WrappedD3DSceneFocalLengthProperty();
- virtual ~WrappedD3DSceneFocalLengthProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DSceneTwoSidedLightingProperty : public WrappedProperty
-{
-public:
- WrappedD3DSceneTwoSidedLightingProperty();
- virtual ~WrappedD3DSceneTwoSidedLightingProperty();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-};
-
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------------------------------------
-
-class WrappedD3DCameraGeometryProperty : public WrappedProperty
-{
-public:
- WrappedD3DCameraGeometryProperty ();
- virtual ~WrappedD3DCameraGeometryProperty ();
-
- virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-};
-*/
-
-
} //namespace wrapper
} //namespace chart
//.............................................................................
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index a090e670bc8b..226bfd14bf4d 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -208,7 +208,7 @@ protected:
if( !xErrorBarProperties.is() )
{
// todo: use a valid context
- xErrorBarProperties = new ::chart::ErrorBar( uno::Reference< uno::XComponentContext >() );
+ xErrorBarProperties = ::chart::createErrorBar( uno::Reference< uno::XComponentContext >() );
//default in new and old api are different
xErrorBarProperties->setPropertyValue( C2U( "ShowPositiveError" ), uno::makeAny(sal_Bool(sal_False)) );
xErrorBarProperties->setPropertyValue( C2U( "ShowNegativeError" ), uno::makeAny(sal_Bool(sal_False)) );
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 6dbce3afac61..cf61b88a63ac 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -101,33 +101,6 @@ using namespace ::svt;
namespace
{
-void lcl_setNumberFormat(
- SvNumberFormatter * pNumFormatter, long nFmt,
- double fData, String & rOutString )
-{
- short eType = pNumFormatter->GetType( nFmt );
-
- // change nFmt to an editable format (without loss of information)
- if( eType == NUMBERFORMAT_CURRENCY ) // for currencies just display decimals
- {
- nFmt = pNumFormatter->GetStandardIndex();
- }
- else
- {
- const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt );
- if( pFormat )
- {
- LanguageType eLanguage = pFormat->GetLanguage();
- nFmt = pNumFormatter->GetStandardFormat( nFmt, eType, eLanguage );
- }
- // else: format is 'standard'
- }
-
- // format string to an editable format (without loss of information)
- Color* pDummy = NULL;
- pNumFormatter->GetOutputString( fData, nFmt, rOutString, &pDummy );
-}
-
sal_Int32 lcl_getRowInData( long nRow )
{
return static_cast< sal_Int32 >( nRow );
@@ -218,7 +191,6 @@ public:
sal_Int32 GetEndColumn() const;
void Show();
- void Hide();
/** call this before destroying the class. This notifies the listeners to
changes of the edit field for the series name.
@@ -380,13 +352,6 @@ void SeriesHeader::Show()
m_spColorBar->Show();
}
-void SeriesHeader::Hide()
-{
- m_spSymbol->Hide();
- m_spSeriesName->Hide();
- m_spColorBar->Hide();
-}
-
void SeriesHeader::SetEditChangedHdl( const Link & rLink )
{
m_aChangeLink = rLink;
@@ -1313,12 +1278,10 @@ void DataBrowser::ImplAdjustHeaderControls()
{
(*aIt)->SetPixelPosX( nStartPos + 2 );
(*aIt)->SetPixelWidth( nCurrentPos - nStartPos - 3 );
-// (*aIt)->Show();
}
else
// do not hide, to get focus events. Move outside the dialog for "hiding"
(*aIt)->SetPixelPosX( nMaxPos + 42 );
-// (*aIt)->Hide();
++aIt;
}
}
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index f89171d4d55e..e612edc0901b 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -103,7 +103,7 @@ OUString lcl_getUIRoleName(
{
OUString aResult( lcl_getRole( xLSeq ));
if( aResult.getLength())
- aResult = chart::DialogModel::ConvertRoleFromInternalToUI( aResult );
+ aResult = ::chart::DialogModel::ConvertRoleFromInternalToUI( aResult );
return aResult;
}
@@ -279,8 +279,8 @@ struct DataBrowserModel::implColumnLess : public ::std::binary_function<
{
if( rLeft.m_xLabeledDataSequence.is() && rRight.m_xLabeledDataSequence.is())
{
- return chart::DialogModel::GetRoleIndexForSorting( lcl_getRole( rLeft.m_xLabeledDataSequence )) <
- chart::DialogModel::GetRoleIndexForSorting( lcl_getRole( rRight.m_xLabeledDataSequence ));
+ return DialogModel::GetRoleIndexForSorting( lcl_getRole( rLeft.m_xLabeledDataSequence )) <
+ DialogModel::GetRoleIndexForSorting( lcl_getRole( rRight.m_xLabeledDataSequence ));
}
return true;
}
@@ -708,7 +708,7 @@ void DataBrowserModel::updateFromModel()
tDataColumn aCategories;
aCategories.m_xLabeledDataSequence.set( xCategories );
if( lcl_ShowCategoriesAsDataLabel( xDiagram ))
- aCategories.m_aUIRoleName = chart::DialogModel::GetRoleDataLabel();
+ aCategories.m_aUIRoleName = DialogModel::GetRoleDataLabel();
else
aCategories.m_aUIRoleName = lcl_getUIRoleName( xCategories );
aCategories.m_eCellType = TEXT;
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 28d9f6420419..1a7e8675f5bc 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -40,8 +40,6 @@
#include "macros.hxx"
#include "Strings.hrc"
#include "ResId.hxx"
-#include "LabeledDataSequence.hxx"
-#include "CachedDataSequence.hxx"
#include "ContainerHelper.hxx"
#include "CommonFunctors.hxx"
#include "ControllerLockGuard.hxx"
@@ -328,26 +326,26 @@ Reference< XDataSeries > lcl_CreateNewSeries(
{
if( aRoles[nI].equals( lcl_aLabelRole ))
continue;
- Reference< data::XDataSequence > xSeq( new ::chart::CachedDataSequence());
+ Reference< data::XDataSequence > xSeq( ::chart::DataSourceHelper::createCachedDataSequence() );
lcl_SetSequenceRole( xSeq, aRoles[nI] );
// assert that aRoleOfSeqForSeriesLabel is part of the mandatory roles
if( aRoles[nI].equals( aRoleOfSeqForSeriesLabel ))
{
- Reference< data::XDataSequence > xLabel( new ::chart::CachedDataSequence( aLabel ));
+ Reference< data::XDataSequence > xLabel( ::chart::DataSourceHelper::createCachedDataSequence( aLabel ));
lcl_SetSequenceRole( xLabel, lcl_aLabelRole );
- aNewSequences.push_back( new ::chart::LabeledDataSequence( xSeq, xLabel ));
+ aNewSequences.push_back( ::chart::DataSourceHelper::createLabeledDataSequence( xSeq, xLabel ));
}
else
- aNewSequences.push_back( new ::chart::LabeledDataSequence( xSeq ));
+ aNewSequences.push_back( ::chart::DataSourceHelper::createLabeledDataSequence( xSeq ));
}
for(nI=0; nI<aOptRoles.getLength(); ++nI)
{
if( aOptRoles[nI].equals( lcl_aLabelRole ))
continue;
- Reference< data::XDataSequence > xSeq( new ::chart::CachedDataSequence());
+ Reference< data::XDataSequence > xSeq( ::chart::DataSourceHelper::createCachedDataSequence());
lcl_SetSequenceRole( xSeq, aOptRoles[nI] );
- aNewSequences.push_back( new ::chart::LabeledDataSequence( xSeq ));
+ aNewSequences.push_back( ::chart::DataSourceHelper::createLabeledDataSequence( xSeq ));
}
xSink->setData( ContainerToSequence( aNewSequences ));
@@ -723,12 +721,6 @@ OUString DialogModel::ConvertRoleFromInternalToUI( const OUString & rRoleString
}
// static
-OUString DialogModel::ConvertRoleFromUIToInternal( const OUString & rRoleString )
-{
- return lcl_ConvertRole( rRoleString, false );
-}
-
-// static
OUString DialogModel::GetRoleDataLabel()
{
return OUString( String( ::chart::SchResId( STR_OBJECT_DATALABELS )));
@@ -750,43 +742,6 @@ sal_Int32 DialogModel::GetRoleIndexForSorting( const ::rtl::OUString & rInternal
return 0;
}
-// static
-bool DialogModel::isSeriesValid(
- const Reference< chart2::XDataSeries > & xSeries,
- const OUString & aRoleOfSequenceForLabel,
- const Reference< chart2::XChartType > & xChartType )
-{
- if( ! (xSeries.is() && xChartType.is()))
- return false;
-
- try
- {
- sal_Int32 nFoundRoles = 0;
- DialogModel::tRolesWithRanges aRolesWithRanges;
- Reference< data::XDataSource > xSource( xSeries, uno::UNO_QUERY_THROW );
- const Sequence< Reference< data::XLabeledDataSequence > > aSeq( xSource->getDataSequences());
- ::std::copy( aSeq.getConstArray(), aSeq.getConstArray() + aSeq.getLength(),
- lcl_RolesWithRangeAppend( aRolesWithRanges, aRoleOfSequenceForLabel ));
- const Sequence< OUString > aRoles( xChartType->getSupportedMandatoryRoles());
- for( sal_Int32 nI = 0; nI < aRoles.getLength(); ++nI )
- if( !aRoles[nI].equals( lcl_aLabelRole ) && aRolesWithRanges.find( aRoles[nI] ) != aRolesWithRanges.end() )
- ++nFoundRoles;
- // strong condition: all mandatory roles exist (except the label)
-// if( !aRoles[nI].equals( lcl_aLabelRole ) && aRolesWithRanges.find( aRoles[nI] ) == aRolesWithRanges.end() )
-// return false;
- // weak condition: one mandatory role exists
- if( aRoles.getLength() > 0 && nFoundRoles == 0 )
- return false;
- }
- catch( uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- return false;
- }
-
- return true;
-}
-
// private methods
void DialogModel::createBackup()
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index 65579ab652be..744262cbbd1f 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -154,20 +154,12 @@ public:
void startControllerLockTimer();
static ::rtl::OUString ConvertRoleFromInternalToUI( const ::rtl::OUString & rRoleString );
- static ::rtl::OUString ConvertRoleFromUIToInternal( const ::rtl::OUString & rRoleString );
static ::rtl::OUString GetRoleDataLabel();
// pass a role string (not translated) and get an index that serves for
// relative ordering, to get e.g. x-values and y-values in the right order
static sal_Int32 GetRoleIndexForSorting( const ::rtl::OUString & rInternalRoleString );
- static bool isSeriesValid(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDataSeries > & xSeries,
- const ::rtl::OUString & aRoleOfSequenceForLabel,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartType > & xChartType );
-
private:
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument >
diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src
index 8da8700a4406..b08fe754513f 100644
--- a/chart2/source/controller/dialogs/Strings.src
+++ b/chart2/source/controller/dialogs/Strings.src
@@ -156,6 +156,12 @@ String STR_PAGE_ILLUMINATION
{
Text [ en-US ] = "Illumination" ;
};
+
+String STR_PAGE_ASIAN
+{
+ Text [ en-US ] = "Asian Typography" ;
+};
+
String STR_OBJECT_AVERAGE_LINE_WITH_PARAMETERS
{
Text [ en-US ] = "Mean value line with value %AVERAGE_VALUE and standard deviation %STD_DEVIATION";
diff --git a/chart2/source/controller/dialogs/Strings_Statistic.src b/chart2/source/controller/dialogs/Strings_Statistic.src
index a0f1a1811cd3..9f6572c6ae82 100644
--- a/chart2/source/controller/dialogs/Strings_Statistic.src
+++ b/chart2/source/controller/dialogs/Strings_Statistic.src
@@ -52,10 +52,6 @@ String STR_CONTROLTEXT_ERROR_BARS_FROM_DATA
//------------------------------------------------------------------------
//------------------------------------------------------------------------
-String STR_REGRESSION_NONE
-{
- Text [ en-US ] = "No Regression" ;
-};
String STR_REGRESSION_LINEAR
{
Text [ en-US ] = "Linear Regression" ;
diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx
index 79f4bf52d05b..638a8f5f2994 100644
--- a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx
@@ -47,7 +47,7 @@ DataLabelsDialog::DataLabelsDialog(Window* pWindow, const SfxItemSet& rInAttrs,
m_aBtnOK(this, SchResId(BTN_OK)),
m_aBtnCancel(this, SchResId(BTN_CANCEL)),
m_aBtnHelp(this, SchResId(BTN_HELP)),
- m_apDataLabelResources( new DataLabelResources(this,rInAttrs,false) ),
+ m_apDataLabelResources( new DataLabelResources(this,rInAttrs) ),
m_rInAttrs(rInAttrs)
{
FreeResource();
diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.src b/chart2/source/controller/dialogs/dlg_InsertDataLabel.src
index b11b2102ecef..091628a2c73e 100644
--- a/chart2/source/controller/dialogs/dlg_InsertDataLabel.src
+++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.src
@@ -38,8 +38,8 @@ ModalDialog DLG_DATA_DESCR
HelpID = SID_INSERT_DESCRIPTION ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 200 , 136 ) ;
+ Size = MAP_APPFONT ( 316 , 185 ) ;
Moveable = TRUE ;
- BUTTONS_OK_CANCEL_HELP_STACKED(144)
+ BUTTONS_OK_CANCEL_HELP_STACKED(260)
RESOURCE_DATALABEL( 6, 7 )
};
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 2087df6deb9e..fdc7c3766644 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -82,6 +82,8 @@
#include <svx/flagsdef.hxx>
#include <svx/numinf.hxx>
+#include <svtools/cjkoptions.hxx>
+
//.............................................................................
namespace chart
{
@@ -345,6 +347,8 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
this->SetText( pDialogParameter->getLocalizedName() );
+ SvtCJKOptions aCJKOptions;
+
switch (eObjectType)
{
case OBJECTTYPE_TITLE:
@@ -354,6 +358,8 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
AddTabPage(TP_ALIGNMENT, String(SchResId(STR_PAGE_ALIGNMENT)), SchAlignmentTabPage::Create, NULL);
+ if( aCJKOptions.IsAsianTypographyEnabled() )
+ AddTabPage(RID_SVXPAGE_PARA_ASIAN, String(SchResId(STR_PAGE_ASIAN)));
break;
case OBJECTTYPE_LEGEND:
@@ -363,6 +369,8 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
AddTabPage(TP_LEGEND_POS, String(SchResId(STR_PAGE_POSITION)), SchLegendPosTabPage::Create, NULL);
+ if( aCJKOptions.IsAsianTypographyEnabled() )
+ AddTabPage(RID_SVXPAGE_PARA_ASIAN, String(SchResId(STR_PAGE_ASIAN)));
break;
case OBJECTTYPE_DATA_SERIES:
@@ -377,6 +385,8 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
}
AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
+ if( aCJKOptions.IsAsianTypographyEnabled() )
+ AddTabPage(RID_SVXPAGE_PARA_ASIAN, String(SchResId(STR_PAGE_ASIAN)));
AddTabPage(TP_DATA_DESCR, String(SchResId(STR_OBJECT_DATALABELS)), DataLabelsTabPage::Create, NULL);
// if( m_pParameter->HasStatisticProperties() )
// AddTabPage(TP_YERRORBAR, String(SchResId(STR_PAGE_YERROR_BARS)), ErrorBarsTabPage::Create, NULL);
@@ -401,6 +411,8 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)));
AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
+ if( aCJKOptions.IsAsianTypographyEnabled() )
+ AddTabPage(RID_SVXPAGE_PARA_ASIAN, String(SchResId(STR_PAGE_ASIAN)));
break;
}
diff --git a/chart2/source/controller/dialogs/hidother.src b/chart2/source/controller/dialogs/hidother.src
index 8707088c4337..4f409d14094b 100644
--- a/chart2/source/controller/dialogs/hidother.src
+++ b/chart2/source/controller/dialogs/hidother.src
@@ -91,6 +91,8 @@ hidspecial HID_SCH_DATALABEL_PLACEMENT {HelpId= HID_SCH_DATALABEL_PLACEMENT; };
hidspecial HID_SCH_TEXTDIRECTION {HelpId= HID_SCH_TEXTDIRECTION; };
hidspecial HID_SCH_TEXTDIRECTION_TITLE {HelpId= HID_SCH_TEXTDIRECTION_TITLE; };
hidspecial HID_SCH_TEXTDIRECTION_EQUATION {HelpId= HID_SCH_TEXTDIRECTION_EQUATION; };
+hidspecial HID_SCH_DATALABEL_ROTATION_KNOB {HelpId= HID_SCH_DATALABEL_ROTATION_KNOB; };
+hidspecial HID_SCH_DATALABEL_ROTATION_EDIT {HelpId= HID_SCH_DATALABEL_ROTATION_EDIT; };
hidspecial HID_SCH_TITLE_MAIN {HelpId= HID_SCH_TITLE_MAIN; };
hidspecial HID_SCH_TITLE_SUB {HelpId= HID_SCH_TITLE_SUB; };
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index ff92fe45f385..a93711151ac1 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -112,7 +112,7 @@ void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, USHORT nWhichId, Che
}//end anonymous namespace
-DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAttrs, bool bShowTextDirectionListBox )
+DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAttrs )
: m_aCBNumber(pWindow, SchResId(CB_VALUE_AS_NUMBER)),
m_aPB_NumberFormatForValue(pWindow, SchResId(PB_NUMBERFORMAT)),
m_aCBPercent(pWindow, SchResId(CB_VALUE_AS_PERCENTAGE)),
@@ -122,6 +122,10 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt
m_aSeparatorResources(pWindow),
m_aFT_LabelPlacement(pWindow, SchResId(FT_LABEL_PLACEMENT)),
m_aLB_LabelPlacement(pWindow, SchResId(LB_LABEL_PLACEMENT)),
+ m_aFL_Rotate(pWindow, SchResId(FL_LABEL_ROTATE)),
+ m_aDC_Dial(pWindow, SchResId(CT_LABEL_DIAL)),
+ m_aFT_Degrees(pWindow, SchResId(FT_LABEL_DEGREES)),
+ m_aNF_Degrees(pWindow, SchResId(NF_LABEL_DEGREES)),
m_aFT_TextDirection(pWindow, SchResId(FT_LABEL_TEXTDIR)),
m_aLB_TextDirection(pWindow, SchResId(LB_LABEL_TEXTDIR), &m_aFT_TextDirection),
m_pNumberFormatter(0),
@@ -136,6 +140,7 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt
m_pWindow(pWindow),
m_pPool(rInAttrs.GetPool())
{
+ //fill label placement list
std::map< sal_Int32, XubString > aPlacementToStringMap;
for( sal_Int32 nEnum=0; nEnum<m_aLB_LabelPlacement.GetEntryCount(); ++nEnum )
aPlacementToStringMap[nEnum]=m_aLB_LabelPlacement.GetEntry(static_cast<USHORT>(nEnum));
@@ -146,7 +151,6 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt
aAvailabelPlacementList =((const SfxIntegerListItem*)pPoolItem)->GetConstSequence();
m_aLB_LabelPlacement.Clear();
-
for( sal_Int32 nN=0; nN<aAvailabelPlacementList.getLength(); ++nN )
{
USHORT nListBoxPos = static_cast<USHORT>( nN );
@@ -155,55 +159,52 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt
m_aListBoxToPlacementMap[nListBoxPos]=nPlacement;
m_aLB_LabelPlacement.InsertEntry( aPlacementToStringMap[nPlacement] );
}
-
m_aLB_LabelPlacement.SetDropDownLineCount(m_aLB_LabelPlacement.GetEntryCount());
- Size aPBSize( m_aPB_NumberFormatForPercent.GetSizePixel() );
- long nMinWidth = ::std::max( m_aPB_NumberFormatForPercent.CalcMinimumSize().getWidth(), m_aPB_NumberFormatForValue.CalcMinimumSize().getWidth() );
- aPBSize.setWidth( nMinWidth+20 );//the min with is to small to fit, hm... so add alittle
+ //replace&resize push buttons and resize checkboxes
+ Size aControlDistance( pWindow->LogicToPixel( Size(RSC_SP_CTRL_DESC_X,RSC_SP_CTRL_GROUP_Y), MapMode(MAP_APPFONT) ) );
+ long nPBWidth = ::std::max( m_aPB_NumberFormatForPercent.CalcMinimumSize().getWidth(), m_aPB_NumberFormatForValue.CalcMinimumSize().getWidth() )
+ + 20; //the min with is to small to fit, hm... so add alittle
+ long nCBXWidth = ::std::max( m_aCBNumber.CalcMinimumSize().getWidth(), m_aCBPercent.CalcMinimumSize().getWidth() );
+ long nNewPBXPos = m_aCBNumber.GetPosPixel().X() + nCBXWidth + aControlDistance.Width();
+ long nPageWidth = pWindow->LogicToPixel( Size(260,185), MapMode(MAP_APPFONT) ).getWidth();
+ if( nNewPBXPos + nPBWidth > nPageWidth )
+ {
+ if( nPBWidth > nPageWidth/2 )
+ nPBWidth = nPageWidth/2;
+ nNewPBXPos = nPageWidth-nPBWidth;
+ nCBXWidth = nPageWidth-m_aCBNumber.GetPosPixel().X()-nPBWidth-aControlDistance.Width();
+ }
+ m_aPB_NumberFormatForValue.SetPosPixel( Point( nNewPBXPos, m_aPB_NumberFormatForValue.GetPosPixel().Y() ) );
+ m_aPB_NumberFormatForPercent.SetPosPixel( Point( nNewPBXPos, m_aPB_NumberFormatForPercent.GetPosPixel().Y() ) );
+ Size aPBSize( m_aPB_NumberFormatForPercent.GetSizePixel() );
+ aPBSize.setWidth( nPBWidth );
m_aPB_NumberFormatForValue.SetSizePixel( aPBSize );
m_aPB_NumberFormatForPercent.SetSizePixel( aPBSize );
- long nWantedMinRightBorder = m_aPB_NumberFormatForPercent.GetPosPixel().X() + m_aPB_NumberFormatForPercent.GetSizePixel().Width() - 1;
+ Size aCBSize( m_aCBNumber.GetSizePixel() );
+ aCBSize.setWidth(nCBXWidth);
+ m_aCBNumber.SetSizePixel( aCBSize );
+ m_aCBPercent.SetSizePixel( aCBSize );
+ //place and align separator and label placement listboxes
Size aSize( m_aFT_LabelPlacement.GetSizePixel() );
aSize.setWidth( m_aFT_LabelPlacement.CalcMinimumSize().getWidth() );
m_aFT_LabelPlacement.SetSizePixel(aSize);
- Size aControlDistance( pWindow->LogicToPixel( Size(RSC_SP_CTRL_DESC_X,RSC_SP_CTRL_GROUP_Y), MapMode(MAP_APPFONT) ) );
- long nWantedMinLeftBorder = m_aFT_LabelPlacement.GetPosPixel().X() + aSize.getWidth () + aControlDistance.Width();;
+ long nWantedMinLeftBorder = m_aFT_LabelPlacement.GetPosPixel().X() + aSize.getWidth () + aControlDistance.Width();
m_aSeparatorResources.PositionBelowControl(m_aCBSymbol);
- m_aSeparatorResources.AlignListBoxWidthAndXPos( nWantedMinLeftBorder, nWantedMinRightBorder, m_aLB_LabelPlacement.CalcMinimumSize().getWidth() );
+ m_aSeparatorResources.AlignListBoxWidthAndXPos( nWantedMinLeftBorder, -1, m_aLB_LabelPlacement.CalcMinimumSize().getWidth() );
m_aSeparatorResources.Show(true);
aSize = m_aLB_LabelPlacement.GetSizePixel();
aSize.setWidth( m_aSeparatorResources.GetCurrentListBoxSize().getWidth() );
m_aLB_LabelPlacement.SetSizePixel(aSize);
+ m_aLB_LabelPlacement.SetPosPixel( Point( m_aSeparatorResources.GetCurrentListBoxPosition().X(), m_aLB_LabelPlacement.GetPosPixel().Y() ) );
- long nYDiff = m_aFT_LabelPlacement.GetPosPixel().Y() - m_aLB_LabelPlacement.GetPosPixel().Y();
- Point aPos( m_aSeparatorResources.GetCurrentListBoxPosition() );
- aPos.Y() = m_aSeparatorResources.GetBottom();
- aPos.Y() += aControlDistance.Height();
- m_aLB_LabelPlacement.SetPosPixel(aPos);
-
- aPos.X() = m_aFT_LabelPlacement.GetPosPixel().X();
- aPos.Y() += nYDiff;
- m_aFT_LabelPlacement.SetPosPixel(aPos);
-
- // hide "text direction" listbox is specified by caller
- if( !bShowTextDirectionListBox )
- {
- m_aFT_TextDirection.Hide();
- m_aLB_TextDirection.Hide();
- }
- // move "text direction" listbox down below "label placement" listbox
- long nNewY = m_aLB_LabelPlacement.GetPosPixel().Y() + m_aLB_LabelPlacement.GetSizePixel().Height() + aControlDistance.Height();
- nYDiff = nNewY - m_aLB_TextDirection.GetPosPixel().Y();
- m_aFT_TextDirection.SetPosPixel( m_aFT_TextDirection.GetPosPixel() + Point( 0, nYDiff ) );
- m_aLB_TextDirection.SetPosPixel( m_aLB_TextDirection.GetPosPixel() + Point( 0, nYDiff ) );
-
+ //some click handler
m_aPB_NumberFormatForValue.SetClickHdl( LINK( this, DataLabelResources, NumberFormatDialogHdl ) );
m_aPB_NumberFormatForPercent.SetClickHdl( LINK( this, DataLabelResources, NumberFormatDialogHdl ) );
m_aCBNumber.SetClickHdl( LINK( this, DataLabelResources, CheckHdl ));
@@ -213,6 +214,8 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt
m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState );
m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState);
+
+ m_aDC_Dial.SetLinkedField( &m_aNF_Degrees );
}
DataLabelResources::~DataLabelResources()
@@ -305,6 +308,12 @@ void DataLabelResources::EnableControls()
m_aPB_NumberFormatForValue.Enable( m_pNumberFormatter && m_aCBNumber.IsChecked() );
m_aPB_NumberFormatForPercent.Enable( m_pNumberFormatter && m_aCBPercent.IsChecked() );
+
+ bool bEnableRotation = ( m_aCBNumber.IsChecked() || m_aCBPercent.IsChecked() || m_aCBCategory.IsChecked() );
+ m_aFL_Rotate.Enable( bEnableRotation );
+ m_aDC_Dial.Enable( bEnableRotation );
+ m_aFT_Degrees.Enable( bEnableRotation );
+ m_aNF_Degrees.Enable( bEnableRotation );
}
BOOL DataLabelResources::FillItemSet( SfxItemSet& rOutAttrs ) const
@@ -344,6 +353,12 @@ BOOL DataLabelResources::FillItemSet( SfxItemSet& rOutAttrs ) const
if( m_aLB_TextDirection.GetSelectEntryCount() > 0 )
rOutAttrs.Put( SfxInt32Item( EE_PARA_WRITINGDIR, m_aLB_TextDirection.GetSelectEntryValue() ) );
+ if( m_aDC_Dial.IsVisible() )
+ {
+ sal_Int32 nDegrees = m_aDC_Dial.GetRotation();
+ rOutAttrs.Put(SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) );
+ }
+
return TRUE;
}
@@ -384,6 +399,14 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs)
if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, TRUE, &pPoolItem ) == SFX_ITEM_SET )
m_aLB_TextDirection.SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) );
+ if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, TRUE, &pPoolItem ) == SFX_ITEM_SET )
+ {
+ sal_Int32 nDegrees = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+ m_aDC_Dial.SetRotation( nDegrees );
+ }
+ else
+ m_aDC_Dial.SetRotation( 0 );
+
EnableControls();
}
diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx
index cadbf1230c45..e560eed9f573 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.hxx
@@ -37,6 +37,8 @@
#include <svtools/itemset.hxx>
#include "TextDirectionListBox.hxx"
+#include <svx/dialcontrol.hxx>
+
class SvNumberFormatter;
//.............................................................................
@@ -47,7 +49,7 @@ namespace chart
class DataLabelResources
{
public:
- DataLabelResources( Window* pParent, const SfxItemSet& rInAttrs, bool bShowTextDirectionListBox );
+ DataLabelResources( Window* pParent, const SfxItemSet& rInAttrs );
virtual ~DataLabelResources();
BOOL FillItemSet(SfxItemSet& rOutAttrs) const;
@@ -68,6 +70,11 @@ private:
FixedText m_aFT_LabelPlacement;
ListBox m_aLB_LabelPlacement;
+ FixedLine m_aFL_Rotate;
+ svx::DialControl m_aDC_Dial;
+ FixedText m_aFT_Degrees;
+ NumericField m_aNF_Degrees;
+
FixedText m_aFT_TextDirection;
TextDirectionListBox m_aLB_TextDirection;
diff --git a/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc b/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc
index 536b355980d0..31112bdc3340 100644
--- a/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc
+++ b/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc
@@ -42,3 +42,7 @@
#define FT_LABEL_TEXTDIR 31
#define LB_LABEL_TEXTDIR 32
+#define FL_LABEL_ROTATE 40
+#define CT_LABEL_DIAL 40
+#define FT_LABEL_DEGREES 40
+#define NF_LABEL_DEGREES 40
diff --git a/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc b/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc
index 70d03376b51f..bc21882dd841 100644
--- a/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc
@@ -65,14 +65,14 @@ PushButton PB_NUMBERFORMAT \
{ \
HelpID = HID_SCH_PB_NUMBERFORMAT; \
TabStop = TRUE ; \
- Pos = MAP_APPFONT ( xpos+8 , ypos+12 ) ; \
+ Pos = MAP_APPFONT ( xpos+100 , ypos-3 ) ; \
Size = MAP_APPFONT ( 100 , 14 ) ; \
Text [ en-US ] = "Number ~format..." ; \
}; \
CheckBox CB_VALUE_AS_PERCENTAGE \
{ \
HelpID = HID_SCH_DATALABEL_PERCENT; \
- Pos = MAP_APPFONT ( xpos , ypos+30 ) ; \
+ Pos = MAP_APPFONT ( xpos , ypos+17 ) ; \
Size = MAP_APPFONT ( 136 , 10 ) ; \
TabStop = TRUE ; \
Text [ en-US ] = "Show value as ~percentage" ; \
@@ -81,29 +81,29 @@ PushButton PB_PERCENT_NUMBERFORMAT \
{ \
HelpID = HID_SCH_PB_PERCENT_NUMBERFORMAT; \
TabStop = TRUE ; \
- Pos = MAP_APPFONT ( xpos+8 , ypos+42 ) ; \
+ Pos = MAP_APPFONT ( xpos+100 , ypos+17-3 ) ; \
Size = MAP_APPFONT ( 100 , 14 ) ; \
Text [ en-US ] = "Percentage f~ormat..." ; \
}; \
CheckBox CB_CATEGORY \
{ \
HelpID = HID_SCH_DATALABEL_TEXT; \
- Pos = MAP_APPFONT ( xpos , ypos+62 ); \
- Size = MAP_APPFONT ( 182 , 10 ); \
+ Pos = MAP_APPFONT ( xpos , ypos+33 ); \
+ Size = MAP_APPFONT ( 254 , 10 ); \
TabStop = TRUE; \
Text [ en-US ] = "Show ~category"; \
}; \
CheckBox CB_SYMBOL \
{ \
HelpID = HID_SCH_DATALABEL_SYMBOL; \
- Pos = MAP_APPFONT ( xpos , ypos+76 ) ; \
- Size = MAP_APPFONT ( 182 , 10 ) ; \
+ Pos = MAP_APPFONT ( xpos , ypos+49 ) ; \
+ Size = MAP_APPFONT ( 254 , 10 ) ; \
TabStop = TRUE ; \
Text [ en-US ] = "Show ~legend key" ; \
}; \
FixedText FT_LABEL_PLACEMENT \
{ \
- Pos = MAP_APPFONT ( xpos , ypos+104 ) ; \
+ Pos = MAP_APPFONT ( xpos , ypos+84 ) ; \
Size = MAP_APPFONT ( 182 , 10 ) ; \
TabStop = FALSE ; \
Text [ en-US ] = "Place~ment"; \
@@ -113,7 +113,7 @@ ListBox LB_LABEL_PLACEMENT \
HelpID = HID_SCH_DATALABEL_PLACEMENT; \
Border = TRUE ; \
AutoHScroll = TRUE ; \
- Pos = MAP_APPFONT ( xpos+100 , ypos+102 ) ; \
+ Pos = MAP_APPFONT ( xpos+100 , ypos+82 ) ; \
Size = MAP_APPFONT ( 89 , 12 ) ; \
TabStop = TRUE ; \
Group = TRUE ; \
@@ -121,16 +121,48 @@ ListBox LB_LABEL_PLACEMENT \
DDExtraWidth = TRUE ; \
WORKAROUND \
}; \
+FixedLine FL_LABEL_ROTATE \
+{ \
+ Pos = MAP_APPFONT ( xpos, ypos+103 ) ; \
+ Size = MAP_APPFONT ( 248, 8 ) ; \
+ Text [ en-US ] = "Rotate Text" ; \
+}; \
+Control CT_LABEL_DIAL \
+{ \
+ HelpId = HID_SCH_DATALABEL_ROTATION_KNOB ; \
+ Pos = MAP_APPFONT ( xpos+6 , ypos+116 ) ; \
+ Size = MAP_APPFONT ( 43 , 43 ) ; \
+ Text = "ABCD" ; \
+}; \
+FixedText FT_LABEL_DEGREES \
+{ \
+ Pos = MAP_APPFONT ( xpos+87 , ypos+133 ) ; \
+ Size = MAP_APPFONT ( 46, 8 ) ; \
+ Text [ en-US ] = "~Degrees" ; \
+}; \
+NumericField NF_LABEL_DEGREES \
+{ \
+ HelpId = HID_SCH_DATALABEL_ROTATION_EDIT ; \
+ Pos = MAP_APPFONT ( xpos+55 , ypos+131 ) ; \
+ Size = MAP_APPFONT ( 28 , 12 ) ; \
+ Border = TRUE ; \
+ TabStop = TRUE ; \
+ Repeat = TRUE ; \
+ Spin = TRUE ; \
+ Minimum = 0 ; \
+ Maximum = 359 ; \
+ SpinSize = 5 ; \
+}; \
FixedText FT_LABEL_TEXTDIR \
{ \
- Pos = MAP_APPFONT ( xpos , ypos+120 ) ; \
+ Pos = MAP_APPFONT ( xpos , ypos+162 ) ; \
Size = MAP_APPFONT ( 64 , 8 ) ; \
Text [ en-US ] = "Te~xt direction" ; \
}; \
ListBox LB_LABEL_TEXTDIR \
{ \
HelpID = HID_SCH_TEXTDIRECTION; \
- Pos = MAP_APPFONT ( xpos+66 , ypos+118 ) ; \
+ Pos = MAP_APPFONT ( xpos+66 , ypos+160 ) ; \
Size = MAP_APPFONT ( 170 , 100 ) ; \
Border = TRUE; \
TabStop = TRUE; \
diff --git a/chart2/source/controller/dialogs/res_TextSeparator.cxx b/chart2/source/controller/dialogs/res_TextSeparator.cxx
index c01bf374f2b7..298499ed39d9 100644
--- a/chart2/source/controller/dialogs/res_TextSeparator.cxx
+++ b/chart2/source/controller/dialogs/res_TextSeparator.cxx
@@ -91,13 +91,6 @@ void TextSeparatorResources::PositionBelowControl( const Window& rWindow )
m_aLB_Separator.SetPosPixel( Point( aPoint.X()+m_aFT_Separator.GetSizePixel().Width()+aDistanceSize.Width(), aPoint.Y()-aDistanceSize.Height()-1) );
}
-long TextSeparatorResources::GetBottom() const
-{
- Point aPoint( m_aLB_Separator.GetPosPixel() );
- aPoint.Y() += m_aLB_Separator.GetSizePixel().Height();
- return aPoint.Y();
-}
-
void TextSeparatorResources::AlignListBoxWidthAndXPos( long nWantedLeftBorder /*use -1 to indicate that this can be automatic*/
, long nWantedRightBorder /*use -1 to indicate that this can be automatic*/
, long nMinimumListBoxWidth /*use -1 to indicate that this can be automatic*/ )
diff --git a/chart2/source/controller/dialogs/res_TextSeparator.hxx b/chart2/source/controller/dialogs/res_TextSeparator.hxx
index a93cab0f95fe..fb8365206fb5 100644
--- a/chart2/source/controller/dialogs/res_TextSeparator.hxx
+++ b/chart2/source/controller/dialogs/res_TextSeparator.hxx
@@ -57,7 +57,6 @@ public:
, long nMinimumListBoxWidth /*use -1 to indicate that this can be automatic*/ );
Point GetCurrentListBoxPosition() const;
Size GetCurrentListBoxSize() const;
- long GetBottom() const;
::rtl::OUString GetValue() const;
void SetValue( const ::rtl::OUString& rSeparator );
diff --git a/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc b/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc
index 4bd41b4047d6..45fc55435594 100644
--- a/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc
@@ -120,7 +120,7 @@ CheckBox CB_SHOW_CORRELATION_COEFF \
Pos = MAP_APPFONT( 10, 134 + yoffset ); \
Size = MAP_APPFONT( availablewidth - 20, 10 ); \
TabStop = TRUE; \
- Text[ en-US ] = "Show ~correlation coefficient (R²)"; \
+ Text[ en-US ] = "Show ~coefficient of determination (R²)"; \
};
#endif
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx
index 35712ebcc566..2da9778a4db8 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx
@@ -42,7 +42,7 @@ namespace chart
DataLabelsTabPage::DataLabelsTabPage(Window* pWindow, const SfxItemSet& rInAttrs) :
SfxTabPage(pWindow, SchResId(TP_DATA_DESCR), rInAttrs),
- m_aDataLabelResources(this, rInAttrs, true)
+ m_aDataLabelResources(this, rInAttrs)
{
FreeResource();
}
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.src b/chart2/source/controller/dialogs/tp_DataLabel.src
index de4434759812..32f5835295f7 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.src
+++ b/chart2/source/controller/dialogs/tp_DataLabel.src
@@ -41,5 +41,5 @@ TabPage TP_DATA_DESCR
HelpID = HID_SCH_DATA_DESCR ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
- RESOURCE_DATALABEL( 12, 8 )
+ RESOURCE_DATALABEL( 6, 8 )
};
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 77c861d529e9..f499e2acc23a 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -42,7 +42,7 @@
#include "DataSeriesHelper.hxx"
#include "tp_DataSourceControls.hxx"
#include "ControllerLockGuard.hxx"
-#include "LabeledDataSequence.hxx"
+#include "DataSourceHelper.hxx"
#include <com/sun/star/sheet/XRangeSelection.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
@@ -890,7 +890,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
// create or change categories
if( !xLabeledSeq.is())
{
- xLabeledSeq.set( new ::chart::LabeledDataSequence( Reference< uno::XComponentContext >(0)));
+ xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence( Reference< uno::XComponentContext >(0)));
m_rDialogModel.setCategories( xLabeledSeq );
}
try
@@ -945,7 +945,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
if( ! xLabeledSeq.is())
{
// no corresponding labeled data sequence for label found
- xLabeledSeq.set( new ::chart::LabeledDataSequence( Reference< uno::XComponentContext >(0)));
+ xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence( Reference< uno::XComponentContext >(0)));
lcl_addLSequenceToDataSource( xLabeledSeq, xSource );
}
}
@@ -1009,7 +1009,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
xLabeledSeq.set( lcl_findLSequenceWithOnlyLabel( xSource ));
if( ! xLabeledSeq.is())
{
- xLabeledSeq.set( new ::chart::LabeledDataSequence( Reference< uno::XComponentContext >(0)));
+ xLabeledSeq.set( DataSourceHelper::createLabeledDataSequence( Reference< uno::XComponentContext >(0)));
lcl_addLSequenceToDataSource( xLabeledSeq, xSource );
}
}
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 7ed9a93073bd..fa285f98d991 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -321,7 +321,7 @@ SfxItemSet DrawViewWrapper::getPositionAndSizeItemSetFromMarkedObject() const
0);
SfxItemSet aGeoSet( E3dView::GetGeoAttrFromMarked() );
aFullSet.Put( aGeoSet );
- aFullSet.Put( SfxUInt16Item(SID_ATTR_METRIC,static_cast< sal_uInt16 >( ConfigurationAccess::getConfigurationAccess()->getFieldUnit())));
+ aFullSet.Put( SfxUInt16Item(SID_ATTR_METRIC,static_cast< sal_uInt16 >( ConfigurationAccess::getFieldUnit())));
return aFullSet;
}
diff --git a/chart2/source/controller/inc/ChartRenderer.hxx b/chart2/source/controller/inc/ChartRenderer.hxx
index 3b2c3b90b35d..0a2ec2cde87c 100644
--- a/chart2/source/controller/inc/ChartRenderer.hxx
+++ b/chart2/source/controller/inc/ChartRenderer.hxx
@@ -53,12 +53,10 @@ class ChartRenderer : public ::cppu::WeakImplHelper2<
{
public:
ChartRenderer( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
- ChartRenderer( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext);
virtual ~ChartRenderer();
// ___lang::XServiceInfo___
APPHELPER_XSERVICEINFO_DECL()
- APPHELPER_SERVICE_FACTORY_HELPER(ChartRenderer)
// ____ XUnoTunnel ___
virtual ::sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& aIdentifier )
diff --git a/chart2/source/controller/inc/ConfigurationAccess.hxx b/chart2/source/controller/inc/ConfigurationAccess.hxx
index 3866d00feb65..02bdb7da8082 100644
--- a/chart2/source/controller/inc/ConfigurationAccess.hxx
+++ b/chart2/source/controller/inc/ConfigurationAccess.hxx
@@ -43,15 +43,8 @@ namespace chart
/**
*/
-class CalcConfigItem;
-class ConfigurationAccess
+namespace ConfigurationAccess
{
-public:
- // use this to get the singleton ConfigurationAccess (CTOR is private)
- static ConfigurationAccess * getConfigurationAccess();
-
- ~ConfigurationAccess();
-
/** @descr Retrieve the FieldUnit to be used for the UI. This unit is retrieved
from the registry settings of the Calc application.
@@ -61,13 +54,7 @@ public:
@return the FieldUnit enum. See <vcl/fldunit.hxx> for definition
*/
FieldUnit getFieldUnit();
-
-private:
- ConfigurationAccess();
-
- static ConfigurationAccess * m_pThis;
- CalcConfigItem* m_pCalcConfigItem;
-};
+}
//.............................................................................
} //namespace chart
diff --git a/chart2/source/controller/inc/HelpIds.hrc b/chart2/source/controller/inc/HelpIds.hrc
index 68edcdc54dd5..ccff9e913f97 100644
--- a/chart2/source/controller/inc/HelpIds.hrc
+++ b/chart2/source/controller/inc/HelpIds.hrc
@@ -31,7 +31,7 @@
#define CHART_HELPIDS_HRC
#include <svtools/solar.hrc>
-//next is 118
+//next is 120
//see old chart: schhids.h
@@ -142,6 +142,8 @@
#define HID_SCH_TEXTDIRECTION (HID_SCH_START + 115)
#define HID_SCH_TEXTDIRECTION_TITLE (HID_SCH_START + 116)
#define HID_SCH_TEXTDIRECTION_EQUATION (HID_SCH_START + 117)
+#define HID_SCH_DATALABEL_ROTATION_KNOB (HID_SCH_START + 118)
+#define HID_SCH_DATALABEL_ROTATION_EDIT (HID_SCH_START + 119)
#define HID_SCH_TITLE_MAIN (HID_SCH_START + 80)
#define HID_SCH_TITLE_SUB (HID_SCH_START + 81)
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index f1bc4ce4097c..0c7ff467a91b 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -38,7 +38,6 @@
#include "chartview/ExplicitValueProvider.hxx"
#include "SchWhichPairs.hxx"
#include "macros.hxx"
-#include "Scaling.hxx"
#include "ChartModelHelper.hxx"
#include "AxisHelper.hxx"
#include "CommonConverters.hxx"
@@ -180,45 +179,42 @@ void AxisItemConverter::FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemS
{
case SCHATTR_AXIS_AUTO_MAX:
// if the any has no value => auto is on
- rOutItemSet.Put( SfxBoolItem( nWhichId, ( ! aScale.Maximum.hasValue())));
+ rOutItemSet.Put( SfxBoolItem( nWhichId, !hasDoubleValue(aScale.Maximum) ) );
break;
case SCHATTR_AXIS_MAX:
- if( aScale.Maximum.hasValue())
{
- OSL_ASSERT( aScale.Maximum.getValueTypeClass() == uno::TypeClass_DOUBLE );
- rOutItemSet.Put(
- SvxDoubleItem(
- *reinterpret_cast< const double * >( aScale.Maximum.getValue()), nWhichId ));
- }
- else
- {
- double fExplicitMax = 10.0;
- if( m_pExplicitScale )
- fExplicitMax = m_pExplicitScale->Maximum;
-
- rOutItemSet.Put(
- SvxDoubleItem( fExplicitMax, nWhichId ));
+ double fMax = 10.0;
+ if( aScale.Maximum >>= fMax )
+ {
+ rOutItemSet.Put( SvxDoubleItem( fMax, nWhichId ) );
+ }
+ else
+ {
+ if( m_pExplicitScale )
+ fMax = m_pExplicitScale->Maximum;
+ rOutItemSet.Put( SvxDoubleItem( fMax, nWhichId ) );
+ }
}
break;
case SCHATTR_AXIS_AUTO_MIN:
// if the any has no value => auto is on
- rOutItemSet.Put( SfxBoolItem( nWhichId, ( ! aScale.Minimum.hasValue())));
+ rOutItemSet.Put( SfxBoolItem( nWhichId, !hasDoubleValue(aScale.Minimum) ) );
break;
case SCHATTR_AXIS_MIN:
- if( aScale.Minimum.hasValue())
- {
- OSL_ASSERT( aScale.Minimum.getValueTypeClass() == uno::TypeClass_DOUBLE );
- rOutItemSet.Put(
- SvxDoubleItem(
- *reinterpret_cast< const double * >( aScale.Minimum.getValue()), nWhichId ));
- }
- else
{
- if( m_pExplicitScale )
- rOutItemSet.Put( SvxDoubleItem( m_pExplicitScale->Minimum, nWhichId ));
+ double fMin = 0.0;
+ if( aScale.Minimum >>= fMin )
+ {
+ rOutItemSet.Put( SvxDoubleItem( fMin, nWhichId ) );
+ }
+ else
+ {
+ if( m_pExplicitScale )
+ rOutItemSet.Put( SvxDoubleItem( m_pExplicitScale->Minimum, nWhichId ));
+ }
}
break;
@@ -236,21 +232,21 @@ void AxisItemConverter::FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemS
// Increment
case SCHATTR_AXIS_AUTO_STEP_MAIN:
// if the any has no value => auto is on
- rOutItemSet.Put( SfxBoolItem( nWhichId, ( ! aInc.Distance.hasValue())));
+ rOutItemSet.Put( SfxBoolItem( nWhichId, !hasDoubleValue(aInc.Distance) ) );
break;
case SCHATTR_AXIS_STEP_MAIN:
- if( aInc.Distance.hasValue())
- {
- OSL_ASSERT( aInc.Distance.getValueTypeClass() == uno::TypeClass_DOUBLE );
- rOutItemSet.Put(
- SvxDoubleItem(
- *reinterpret_cast< const double * >( aInc.Distance.getValue()), nWhichId ));
- }
- else
{
- if( m_pExplicitIncrement )
- rOutItemSet.Put( SvxDoubleItem( m_pExplicitIncrement->Distance, nWhichId ));
+ double fDistance = 1.0;
+ if( aInc.Distance >>= fDistance )
+ {
+ rOutItemSet.Put( SvxDoubleItem(fDistance, nWhichId ));
+ }
+ else
+ {
+ if( m_pExplicitIncrement )
+ rOutItemSet.Put( SvxDoubleItem( m_pExplicitIncrement->Distance, nWhichId ));
+ }
}
break;
@@ -478,7 +474,7 @@ bool AxisItemConverter::ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rI
// logarithm is true
if( ! bWasLogarithm )
{
- aScale.Scaling = new LogarithmicScaling( 10.0 );
+ aScale.Scaling = AxisHelper::createLogarithmicScaling( 10.0 );
bSetScale = true;
}
}
@@ -487,7 +483,7 @@ bool AxisItemConverter::ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rI
// logarithm is false => linear scaling
if( bWasLogarithm )
{
- aScale.Scaling = new LinearScaling( 1.0, 0.0 );
+ aScale.Scaling = AxisHelper::createLinearScaling();
bSetScale = true;
}
}
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index a6f20f53fcf3..ad2aab714757 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -78,7 +78,7 @@ namespace
// IPM_MAP_ENTRY( EE_CHAR_WEIGHT_CTL, "CharWeightComplex", 0 )
// IPM_MAP_ENTRY( EE_CHAR_ITALIC_CJK, "CharPostureAsian", 0 )
// IPM_MAP_ENTRY( EE_CHAR_ITALIC_CTL, "CharPostureComplex", 0 )
-
+ IPM_MAP_ENTRY( EE_PARA_ASIANCJKSPACING, "ParaIsCharacterDistance", 0 )
);
return aCharacterPropertyMap;
@@ -290,6 +290,11 @@ void CharacterPropertyItemConverter::FillSpecialItem(
rOutItemSet.Put( SfxStringItem( nWhichId, C2U( "" ) ) );
}
break;
+
+ case EE_PARA_FORBIDDENRULES:
+ case EE_PARA_HANGINGPUNCTUATION:
+ rOutItemSet.DisableItem( nWhichId );
+ break;
}
}
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 4593230d65cc..0c0ea2d0dbdd 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -521,6 +521,24 @@ bool DataPointItemConverter::ApplySpecialItem(
}
}
break;
+
+ case SCHATTR_TEXT_DEGREES:
+ {
+ double fValue = static_cast< double >(
+ static_cast< const SfxInt32Item & >(
+ rItemSet.Get( nWhichId )).GetValue()) / 100.0;
+ double fOldValue = 0.0;
+ bool bPropExisted =
+ ( GetPropertySet()->getPropertyValue( C2U( "TextRotation" )) >>= fOldValue );
+
+ if( ! bPropExisted ||
+ ( bPropExisted && fOldValue != fValue ))
+ {
+ GetPropertySet()->setPropertyValue( C2U( "TextRotation" ), uno::makeAny( fValue ));
+ bChanged = true;
+ }
+ }
+ break;
}
return bChanged;
@@ -657,6 +675,18 @@ void DataPointItemConverter::FillSpecialItem(
}
}
break;
+
+ case SCHATTR_TEXT_DEGREES:
+ {
+ double fValue = 0;
+
+ if( GetPropertySet()->getPropertyValue( C2U( "TextRotation" )) >>= fValue )
+ {
+ rOutItemSet.Put( SfxInt32Item( nWhichId, static_cast< sal_Int32 >(
+ ::rtl::math::round( fValue * 100.0 ) ) ));
+ }
+ }
+ break;
}
}
diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
index 087f5137a934..0321df6035f2 100644
--- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
@@ -130,6 +130,8 @@ const USHORT nDataLabelWhichPairs[] =
SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, /* 41 sch/schattr.hxx*/ \
SCHATTR_DATADESCR_PLACEMENT, SCHATTR_DATADESCR_PLACEMENT,
SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS,
+ SCHATTR_TEXT_DEGREES,SCHATTR_TEXT_DEGREES,
+ EE_PARA_WRITINGDIR,EE_PARA_WRITINGDIR,
0
};
@@ -145,6 +147,7 @@ const USHORT nDataLabelWhichPairs[] =
SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, /* 41 sch/schattr.hxx*/ \
SCHATTR_DATADESCR_PLACEMENT, SCHATTR_DATADESCR_PLACEMENT, \
SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, \
+ SCHATTR_TEXT_DEGREES, SCHATTR_TEXT_DEGREES, \
SCHATTR_STYLE_START,SCHATTR_STYLE_END, /* 59 - 68 sch/schattr.hxx*/ \
SCHATTR_SYMBOL_BRUSH,SCHATTR_SYMBOL_BRUSH, /* 94 sch/schattr.hxx*/ \
SCHATTR_SYMBOL_SIZE,SCHATTR_SYMBOL_SIZE, /* 97 sch/schattr.hxx*/ \
diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
index 4ee0ca2f1f51..eed9235aff9b 100644
--- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
@@ -108,7 +108,7 @@ uno::Reference< beans::XPropertySet > lcl_GetDefaultErrorBar()
{
// todo: use a valid context
return uno::Reference< beans::XPropertySet >(
- new ::chart::ErrorBar( uno::Reference< uno::XComponentContext >()));
+ ::chart::createErrorBar( uno::Reference< uno::XComponentContext >()));
}
void lcl_getErrorValues( const uno::Reference< beans::XPropertySet > & xErrorBarProp,
diff --git a/chart2/source/controller/main/ChartRenderer.cxx b/chart2/source/controller/main/ChartRenderer.cxx
index 00e69082db00..60d13981c00f 100644
--- a/chart2/source/controller/main/ChartRenderer.cxx
+++ b/chart2/source/controller/main/ChartRenderer.cxx
@@ -59,11 +59,6 @@ ChartRenderer::ChartRenderer( const Reference< frame::XModel >& xChartModel )
{
}
-ChartRenderer::ChartRenderer( const Reference< uno::XComponentContext >& /*xContext*/)
- : m_xChartModel()
-{
-}
-
ChartRenderer::~ChartRenderer()
{
}
diff --git a/chart2/source/controller/main/ConfigurationAccess.cxx b/chart2/source/controller/main/ConfigurationAccess.cxx
index f3de96cfc844..f71d26b7b3c2 100644
--- a/chart2/source/controller/main/ConfigurationAccess.cxx
+++ b/chart2/source/controller/main/ConfigurationAccess.cxx
@@ -38,6 +38,8 @@
#include <svtools/syslocale.hxx>
// header for class ConfigItem
#include <unotools/configitem.hxx>
+// header for rtl::Static
+#include <rtl/instance.hxx>
//.............................................................................
@@ -96,37 +98,20 @@ FieldUnit CalcConfigItem::getFieldUnit()
return eResult;
}
-// ----------------------------------------
-
-ConfigurationAccess * ConfigurationAccess::m_pThis = 0;
-
-// private, use static getConfigurationAccess method
-ConfigurationAccess::ConfigurationAccess()
- : m_pCalcConfigItem(0)
-{
- m_pCalcConfigItem = new CalcConfigItem();
-}
-
-// static
-ConfigurationAccess * ConfigurationAccess::getConfigurationAccess()
-{
- // note: not threadsafe
- if( !m_pThis )
- m_pThis = new ConfigurationAccess();
- return m_pThis;
-}
-
-ConfigurationAccess::~ConfigurationAccess()
+namespace
{
- delete m_pCalcConfigItem;
+ //a CalcConfigItem Singleton
+ struct theCalcConfigItem : public rtl::Static< CalcConfigItem, theCalcConfigItem > {};
}
-FieldUnit ConfigurationAccess::getFieldUnit()
+namespace ConfigurationAccess
{
- OSL_ASSERT( m_pCalcConfigItem );
- FieldUnit aUnit( m_pCalcConfigItem->getFieldUnit() );
- return aUnit;
-}
+ FieldUnit getFieldUnit()
+ {
+ FieldUnit aUnit( theCalcConfigItem::get().getFieldUnit() );
+ return aUnit;
+ }
+} //namespace ConfigurationAccess
//.............................................................................
} //namespace chart
diff --git a/chart2/source/inc/AxisHelper.hxx b/chart2/source/inc/AxisHelper.hxx
index a6b91481af8a..d6d7e14bc7d3 100644
--- a/chart2/source/inc/AxisHelper.hxx
+++ b/chart2/source/inc/AxisHelper.hxx
@@ -51,6 +51,9 @@ namespace chart
class OOO_DLLPUBLIC_CHARTTOOLS AxisHelper
{
public:
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XScaling > createLinearScaling();
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XScaling > createLogarithmicScaling( double fBase = 10.0 );
+
static ::com::sun::star::chart2::ScaleData createDefaultScale();
static void removeExplicitScaling( ::com::sun::star::chart2::ScaleData& rScaleData );
@@ -95,14 +98,14 @@ public:
static sal_Bool isGridShown( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram );
- static void makeAxisVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis );
+ SAL_DLLPRIVATE static void makeAxisVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis );
static void makeGridVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xGridProperties );
- static void makeAxisInvisible( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis );
- static void makeGridInvisible( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xGridProperties );
+ SAL_DLLPRIVATE static void makeAxisInvisible( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis );
+ SAL_DLLPRIVATE static void makeGridInvisible( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xGridProperties );
- static sal_Bool areAxisLabelsVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xAxisProperties );
- static sal_Bool isAxisVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis );
+ SAL_DLLPRIVATE static sal_Bool areAxisLabelsVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xAxisProperties );
+ SAL_DLLPRIVATE static sal_Bool isAxisVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis );
static sal_Bool isGridVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xGridProperties );
static ::com::sun::star::uno::Reference<
@@ -187,7 +190,7 @@ public:
/** @param bOnlyVisible if </TRUE>, only axes with property "Show" set to
</TRUE> are returned
*/
- static std::vector<
+ SAL_DLLPRIVATE static std::vector<
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XAxis > >
getAllAxesOfCoordinateSystem( const ::com::sun::star::uno::Reference<
diff --git a/chart2/source/inc/BaseGFXHelper.hxx b/chart2/source/inc/BaseGFXHelper.hxx
index 3544f5678462..675b2ff5acd5 100644
--- a/chart2/source/inc/BaseGFXHelper.hxx
+++ b/chart2/source/inc/BaseGFXHelper.hxx
@@ -68,17 +68,15 @@ OOO_DLLPUBLIC_CHARTTOOLS
com::sun::star::awt::Rectangle B2IRectangleToAWTRectangle(
const ::basegfx::B2IRectangle& rB2IRectangle );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DVector Direction3DToB3DVector(
+::basegfx::B3DVector Direction3DToB3DVector(
const com::sun::star::drawing::Direction3D& rDirection );
-OOO_DLLPUBLIC_CHARTTOOLS
com::sun::star::drawing::Direction3D B3DVectorToDirection3D(
const ::basegfx::B3DVector& rB3DVector );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DVector Position3DToB3DVector(
+::basegfx::B3DVector Position3DToB3DVector(
const com::sun::star::drawing::Position3D& rPosition );
-OOO_DLLPUBLIC_CHARTTOOLS
com::sun::star::drawing::Position3D B3DVectorToPosition3D(
const ::basegfx::B3DVector& rB3DVector );
@@ -95,7 +93,6 @@ OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetRotationFromMatrix(
OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetScaleFromMatrix(
const ::basegfx::B3DHomMatrix & rB3DMatrix );
-OOO_DLLPUBLIC_CHARTTOOLS
void ReduceToRotationMatrix( ::basegfx::B3DHomMatrix & rB3DMatrix );
OOO_DLLPUBLIC_CHARTTOOLS double Deg2Rad( double fDegrees );
diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx
index bf60ba3e1930..22b2c9311085 100644
--- a/chart2/source/inc/CachedDataSequence.hxx
+++ b/chart2/source/inc/CachedDataSequence.hxx
@@ -37,7 +37,6 @@
#include <comphelper/propertycontainer.hxx>
#include <comphelper/proparrhlp.hxx>
#include "ServiceMacros.hxx"
-#include "charttoolsdllapi.hxx"
// interfaces and types
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -69,7 +68,7 @@ typedef ::cppu::WeakComponentImplHelper7<
CachedDataSequence_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS CachedDataSequence :
+class CachedDataSequence :
public ::comphelper::OMutexAndBroadcastHelper,
public ::comphelper::OPropertyContainer,
public ::comphelper::OPropertyArrayUsageHelper< CachedDataSequence >,
@@ -84,25 +83,11 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext > & xContext );
- /** creates a sequence and initializes it with the given vector of floating
- point numbers
- */
- explicit CachedDataSequence( const ::std::vector< double > & rVector );
-
- /** creates a sequence and initializes it with the given vector of strings
- */
- explicit CachedDataSequence( const ::std::vector< ::rtl::OUString > & rVector );
-
/** creates a sequence and initializes it with the given string. This is
especially useful for labels, which only have one element.
*/
explicit CachedDataSequence( const ::rtl::OUString & rSingleText );
- /** creates a sequence and initializes it with the given vector of arbitrary
- content
- */
- explicit CachedDataSequence( const ::std::vector< ::com::sun::star::uno::Any > & rVector );
-
/// Copy CTOR
explicit CachedDataSequence( const CachedDataSequence & rSource );
@@ -181,6 +166,7 @@ protected:
*/
void registerProperties();
+private:
/** is used by interface method getNumericalData().
*/
::com::sun::star::uno::Sequence< double > Impl_getNumericalData() const;
diff --git a/chart2/source/inc/CharacterProperties.hxx b/chart2/source/inc/CharacterProperties.hxx
index 092f614846b7..ae32f29ba20f 100644
--- a/chart2/source/inc/CharacterProperties.hxx
+++ b/chart2/source/inc/CharacterProperties.hxx
@@ -121,6 +121,7 @@ public:
PROP_CHAR_COMPLEX_WEIGHT,
PROP_CHAR_COMPLEX_POSTURE,
PROP_CHAR_COMPLEX_LOCALE,
+ PROP_PARA_IS_CHARACTER_DISTANCE,
PROP_WRITING_MODE,
diff --git a/chart2/source/inc/ChartModelHelper.hxx b/chart2/source/inc/ChartModelHelper.hxx
index 797db8fe8d01..fa80d00413f7 100644
--- a/chart2/source/inc/ChartModelHelper.hxx
+++ b/chart2/source/inc/ChartModelHelper.hxx
@@ -34,6 +34,12 @@
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XUndoManager.hpp>
+#include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/chart2/data/XRangeHighlighter.hpp>
+#include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include "charttoolsdllapi.hxx"
@@ -52,6 +58,19 @@ namespace chart
class OOO_DLLPUBLIC_CHARTTOOLS ChartModelHelper
{
public:
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager > createUndoManager();
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XRangeHighlighter > createRangeHighlighter(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier >& xSelectionSupplier );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > createInternalDataProvider();
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > createInternalDataProvider(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataArray >& xDataToCopy );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > createInternalDataProvider(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc );
+
static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDiagram >
findDiagram( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
@@ -60,7 +79,7 @@ public:
::com::sun::star::chart2::XDiagram >
findDiagram( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc );
- static ::std::vector< ::com::sun::star::uno::Reference<
+ SAL_DLLPRIVATE static ::std::vector< ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDataSeries > > getDataSeries(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > & xChartDoc );
diff --git a/chart2/source/inc/ChartTypeHelper.hxx b/chart2/source/inc/ChartTypeHelper.hxx
index f99d39f63bcb..efa4758c4ccd 100644
--- a/chart2/source/inc/ChartTypeHelper.hxx
+++ b/chart2/source/inc/ChartTypeHelper.hxx
@@ -76,12 +76,12 @@ public:
static ::com::sun::star::uno::Sequence < sal_Int32 > getSupportedMissingValueTreatments(
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
- static ::com::sun::star::drawing::Direction3D getDefaultSimpleLightDirection( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
- static ::com::sun::star::drawing::Direction3D getDefaultRealisticLightDirection( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
- static sal_Int32 getDefaultDirectLightColor( bool bSimple, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
- static sal_Int32 getDefaultAmbientLightColor( bool bSimple, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
+ SAL_DLLPRIVATE static ::com::sun::star::drawing::Direction3D getDefaultSimpleLightDirection( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
+ SAL_DLLPRIVATE static ::com::sun::star::drawing::Direction3D getDefaultRealisticLightDirection( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
+ SAL_DLLPRIVATE static sal_Int32 getDefaultDirectLightColor( bool bSimple, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
+ SAL_DLLPRIVATE static sal_Int32 getDefaultAmbientLightColor( bool bSimple, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
static sal_Int32 getNumberOfDisplayedSeries( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType, sal_Int32 nNumberOfSeries );
- static bool noBordersForSimpleScheme( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
+ SAL_DLLPRIVATE static bool noBordersForSimpleScheme( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
static sal_Int32 //one of ::com::sun::star::chart2::AxisType
getAxisType( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType
diff --git a/chart2/source/inc/ColorPerPointHelper.hxx b/chart2/source/inc/ColorPerPointHelper.hxx
index a18757f4f8b7..c1391d9837cd 100644
--- a/chart2/source/inc/ColorPerPointHelper.hxx
+++ b/chart2/source/inc/ColorPerPointHelper.hxx
@@ -56,7 +56,7 @@ public:
// returns true if AttributedDataPoints contains nPointIndex and the
// property Color is DEFAULT
- static bool hasPointOwnProperties(
+ SAL_DLLPRIVATE static bool hasPointOwnProperties(
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet >& xSeriesProperties
, sal_Int32 nPointIndex );
diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx
index f27bad5a719c..102ffde71918 100644
--- a/chart2/source/inc/CommonConverters.hxx
+++ b/chart2/source/inc/CommonConverters.hxx
@@ -101,23 +101,11 @@ OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Direction3D B3DVectorToDirecti
OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Position3D B3DPointToPosition3D( const ::basegfx::B3DPoint& rPoint);
//-----------------------------------------------------------------------------
-/** Direction3D -> B3DPoint
-*/
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DPoint Direction3DToB3DPoint( const com::sun::star::drawing::Direction3D& rDirection);
-
-//-----------------------------------------------------------------------------
/** Direction3D -> B3DVector
*/
OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DVector Direction3DToB3DVector( const com::sun::star::drawing::Direction3D& rDirection);
//-----------------------------------------------------------------------------
-/** two drawing::Position3D -> PolyPolygonShape3D
-*/
-OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::drawing::PolyPolygonShape3D
- MakeLine3D( const ::com::sun::star::drawing::Position3D & rStart,
- const ::com::sun::star::drawing::Position3D & rEnd );
-
-//-----------------------------------------------------------------------------
/** PolyPolygonShape3D + drawing::Position3D -> PolyPolygonShape3D
*/
OOO_DLLPUBLIC_CHARTTOOLS
@@ -168,21 +156,6 @@ OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Position3D
, const com::sun::star::drawing::Direction3D& rDirection);
//-----------------------------------------------------------------------------
-/** Direction3D + Direction3D == Direction3D
-*/
-OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Direction3D
- operator+( const com::sun::star::drawing::Direction3D& rDirection
- , const com::sun::star::drawing::Direction3D& rDirectionAdd);
-
-//-----------------------------------------------------------------------------
-/** Position3D - Direction3D == Position3D
-*/
-OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Position3D
- operator-( const com::sun::star::drawing::Position3D& rPos
- , const com::sun::star::drawing::Direction3D& rDirection);
-
-
-//-----------------------------------------------------------------------------
/** Position3D - Position3D == Direction3D
*/
OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Direction3D
@@ -190,13 +163,6 @@ OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Direction3D
, const com::sun::star::drawing::Position3D& rPos2);
//-----------------------------------------------------------------------------
-/** Direction3D * double == Direction3D
-*/
-OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Direction3D
- operator*( const com::sun::star::drawing::Direction3D& rDirection
- , double fFraction);
-
-//-----------------------------------------------------------------------------
/** Position3D == Position3D ?
*/
OOO_DLLPUBLIC_CHARTTOOLS
@@ -242,13 +208,6 @@ OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::uno::Sequence< double >
Position3DToSequence( const com::sun::star::drawing::Position3D& rPosition );
//-----------------------------------------------------------------------------
-/** drawing::Direction3D / double
-*/
-
-OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Direction3D
- operator/( const com::sun::star::drawing::Direction3D& rDirection, double f );
-
-//-----------------------------------------------------------------------------
/** chart2::XDataSequence -> uno::Sequence< double >
*/
diff --git a/chart2/source/inc/ConfigColorScheme.hxx b/chart2/source/inc/ConfigColorScheme.hxx
index 7a27f93f338c..3fe9355fd8cb 100644
--- a/chart2/source/inc/ConfigColorScheme.hxx
+++ b/chart2/source/inc/ConfigColorScheme.hxx
@@ -44,12 +44,17 @@
namespace chart
{
+
+OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XColorScheme > createConfigColorScheme(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > & xContext );
+
namespace impl
{
class ChartConfigItem;
}
-class OOO_DLLPUBLIC_CHARTTOOLS ConfigColorScheme :
+class ConfigColorScheme :
public ConfigItemListener,
public ::cppu::WeakImplHelper2<
::com::sun::star::chart2::XColorScheme,
@@ -59,7 +64,7 @@ public:
explicit ConfigColorScheme(
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext > & xContext );
- virtual ~ConfigColorScheme();
+ SAL_DLLPRIVATE virtual ~ConfigColorScheme();
/// establish methods for factory instatiation
APPHELPER_SERVICE_FACTORY_HELPER( ConfigColorScheme )
@@ -68,14 +73,14 @@ public:
protected:
// ____ XColorScheme ____
- virtual ::sal_Int32 SAL_CALL getColorByIndex( ::sal_Int32 nIndex )
+ SAL_DLLPRIVATE virtual ::sal_Int32 SAL_CALL getColorByIndex( ::sal_Int32 nIndex )
throw (::com::sun::star::uno::RuntimeException);
// ____ ConfigItemListener ____
- virtual void notify( const ::rtl::OUString & rPropertyName );
+ SAL_DLLPRIVATE virtual void notify( const ::rtl::OUString & rPropertyName );
private:
- void retrieveConfigColors();
+ SAL_DLLPRIVATE void retrieveConfigColors();
// member variables
::com::sun::star::uno::Reference<
diff --git a/chart2/source/inc/ControllerLockGuard.hxx b/chart2/source/inc/ControllerLockGuard.hxx
index b7bf17def1cb..0440018d2c72 100644
--- a/chart2/source/inc/ControllerLockGuard.hxx
+++ b/chart2/source/inc/ControllerLockGuard.hxx
@@ -67,8 +67,8 @@ public:
::com::sun::star::frame::XModel > & xModel );
~ControllerLockHelper();
- void lockControllers();
- void unlockControllers();
+ SAL_DLLPRIVATE void lockControllers();
+ SAL_DLLPRIVATE void unlockControllers();
private:
::com::sun::star::uno::Reference<
diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx
index 6434eb75ecec..ae179e5c5e83 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -50,7 +50,7 @@ namespace chart
namespace DataSeriesHelper
{
-OOO_DLLPUBLIC_CHARTTOOLS ::rtl::OUString GetRole(
+::rtl::OUString GetRole(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XLabeledDataSequence >& xLabeledDataSequence );
diff --git a/chart2/source/inc/DataSource.hxx b/chart2/source/inc/DataSource.hxx
index 286e6b6116e1..555bbad847c4 100644
--- a/chart2/source/inc/DataSource.hxx
+++ b/chart2/source/inc/DataSource.hxx
@@ -37,12 +37,11 @@
#include <cppuhelper/implbase3.hxx>
#include <comphelper/uno3.hxx>
#include "ServiceMacros.hxx"
-#include "charttoolsdllapi.hxx"
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS DataSource : public
+class DataSource : public
::cppu::WeakImplHelper3<
::com::sun::star::lang::XServiceInfo,
::com::sun::star::chart2::data::XDataSource,
diff --git a/chart2/source/inc/DataSourceHelper.hxx b/chart2/source/inc/DataSourceHelper.hxx
index 40b03034fcf7..c2f29e42c6ba 100644
--- a/chart2/source/inc/DataSourceHelper.hxx
+++ b/chart2/source/inc/DataSourceHelper.hxx
@@ -34,11 +34,11 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
-#ifndef _COM_SUN_STAR_CHART2_XLABELEDDATASEQUENCE_HPP_
#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
-#endif
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
#include "charttoolsdllapi.hxx"
#include <vector>
@@ -55,6 +55,30 @@ namespace chart
class OOO_DLLPUBLIC_CHARTTOOLS DataSourceHelper
{
public:
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >
+ createDataSource( const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XLabeledDataSequence > > & rSequences );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >
+ createCachedDataSequence();
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >
+ createCachedDataSequence( const ::rtl::OUString & rSingleText );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence >
+ createLabeledDataSequence(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xValues ,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xLabels );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence >
+ createLabeledDataSequence(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xValues );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence >
+ createLabeledDataSequence(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
+
static ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue > createArguments(
bool bUseColumns, bool bFirstCellAsLabel, bool bHasCategories );
@@ -65,7 +89,7 @@ public:
const ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping,
bool bUseColumns, bool bFirstCellAsLabel, bool bHasCategories );
- static void readArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArguments
+ SAL_DLLPRIVATE static void readArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArguments
, ::rtl::OUString & rRangeRepresentation, ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool& bUseColumns, bool& bFirstCellAsLabel, bool& bHasCategories );
@@ -79,7 +103,7 @@ public:
::com::sun::star::chart2::data::XLabeledDataSequence >& xLabeledDataSequence
, ::std::vector< ::rtl::OUString >& rOutRangeRepresentations );
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getUsedDataRanges(
+ SAL_DLLPRIVATE static ::com::sun::star::uno::Sequence< ::rtl::OUString > getUsedDataRanges(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDiagram > & xDiagram );
@@ -127,11 +151,11 @@ public:
static bool allArgumentsForRectRangeDetected(
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument );
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getRangesFromLabeledDataSequence(
+ SAL_DLLPRIVATE static ::com::sun::star::uno::Sequence< ::rtl::OUString > getRangesFromLabeledDataSequence(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XLabeledDataSequence > & xLSeq );
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getRangesFromDataSource(
+ SAL_DLLPRIVATE static ::com::sun::star::uno::Sequence< ::rtl::OUString > getRangesFromDataSource(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XDataSource > & xSource );
};
diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx
index ae650e0a4898..119d206a2937 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -157,7 +157,7 @@ public:
/** Replaces all occurences of xCooSysToReplace in the tree with
xReplacement in the diagram's tree
*/
- static void replaceCoordinateSystem(
+ SAL_DLLPRIVATE static void replaceCoordinateSystem(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDiagram > & xDiagram,
const ::com::sun::star::uno::Reference<
@@ -230,12 +230,12 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > & xChartDoc );
- static ::com::sun::star::uno::Sequence< rtl::OUString >
+ SAL_DLLPRIVATE static ::com::sun::star::uno::Sequence< rtl::OUString >
generateAutomaticCategories(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XCoordinateSystem > & xCooSys );
- static void generateAutomaticCategoriesFromChartType(
+ SAL_DLLPRIVATE static void generateAutomaticCategoriesFromChartType(
::com::sun::star::uno::Sequence< rtl::OUString >& rRet,
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& xChartType );
@@ -251,7 +251,7 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDiagram > & xDiagram );
- static bool areChartTypesCompatible( const ::com::sun::star::uno::Reference<
+ SAL_DLLPRIVATE static bool areChartTypesCompatible( const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartType >& xFirstType,
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartType >& xSecondType );
diff --git a/chart2/source/inc/ErrorBar.hxx b/chart2/source/inc/ErrorBar.hxx
index 041e4aa6a5ab..4b586aefc8a9 100644
--- a/chart2/source/inc/ErrorBar.hxx
+++ b/chart2/source/inc/ErrorBar.hxx
@@ -50,6 +50,10 @@
namespace chart
{
+OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createErrorBar(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > & xContext );
+
namespace impl
{
typedef ::cppu::WeakImplHelper6<
@@ -62,7 +66,7 @@ typedef ::cppu::WeakImplHelper6<
ErrorBar_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS ErrorBar :
+class ErrorBar :
public MutexContainer,
public impl::ErrorBar_Base,
public ::property::OPropertySet
diff --git a/chart2/source/inc/ExplicitCategoriesProvider.hxx b/chart2/source/inc/ExplicitCategoriesProvider.hxx
index 12a98e4fca47..a6d8926d36ac 100644
--- a/chart2/source/inc/ExplicitCategoriesProvider.hxx
+++ b/chart2/source/inc/ExplicitCategoriesProvider.hxx
@@ -49,10 +49,10 @@ class OOO_DLLPUBLIC_CHARTTOOLS ExplicitCategoriesProvider :
public:
ExplicitCategoriesProvider( const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XCoordinateSystem >& xCooSysModel );
- virtual ~ExplicitCategoriesProvider();
+ SAL_DLLPRIVATE virtual ~ExplicitCategoriesProvider();
//XTextualDataSequence
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getTextualData()
+ SAL_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getTextualData()
throw (::com::sun::star::uno::RuntimeException);
static ::rtl::OUString getCategoryByIndex(
diff --git a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
index 20c58c31b458..fe7734730a45 100644
--- a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
@@ -31,12 +31,11 @@
#define CHART2_EXPONENTIALREGRESSIONCURVECALCULATOR_HXX
#include "RegressionCurveCalculator.hxx"
-#include "charttoolsdllapi.hxx"
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS ExponentialRegressionCurveCalculator :
+class ExponentialRegressionCurveCalculator :
public RegressionCurveCalculator
{
public:
diff --git a/chart2/source/inc/InternalDataProvider.hxx b/chart2/source/inc/InternalDataProvider.hxx
index 5a7afc62c5fe..9bf598441b3a 100644
--- a/chart2/source/inc/InternalDataProvider.hxx
+++ b/chart2/source/inc/InternalDataProvider.hxx
@@ -41,7 +41,6 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <cppuhelper/implbase6.hxx>
#include "ServiceMacros.hxx"
-#include "charttoolsdllapi.hxx"
#include "CachedDataSequence.hxx"
@@ -75,7 +74,7 @@ typedef ::cppu::WeakImplHelper6<
<p>The format for a complete range is "all". (Do we need more than
that?)</p>
*/
-class OOO_DLLPUBLIC_CHARTTOOLS InternalDataProvider :
+class InternalDataProvider :
public impl::InternalDataProvider_Base
{
public:
diff --git a/chart2/source/inc/LabeledDataSequence.hxx b/chart2/source/inc/LabeledDataSequence.hxx
index 23cfb7bb2743..3eba45bd2df9 100644
--- a/chart2/source/inc/LabeledDataSequence.hxx
+++ b/chart2/source/inc/LabeledDataSequence.hxx
@@ -31,7 +31,6 @@
#define CHART2_LABELEDDATASEQUENCE_HXX
#include "ServiceMacros.hxx"
#include "MutexContainer.hxx"
-#include "charttoolsdllapi.hxx"
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase4.hxx>
@@ -56,7 +55,7 @@ typedef cppu::WeakImplHelper4<
LabeledDataSequence_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS LabeledDataSequence :
+class LabeledDataSequence :
public MutexContainer,
public impl::LabeledDataSequence_Base
{
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index 6b08c33b89da..26b9f09f7880 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -46,17 +46,17 @@ namespace apphelper
{
class LifeTimeGuard;
-class OOO_DLLPUBLIC_CHARTTOOLS LifeTimeManager
+class LifeTimeManager
{
friend class LifeTimeGuard;
protected:
mutable ::osl::Mutex m_aAccessMutex;
public:
- LifeTimeManager( ::com::sun::star::lang::XComponent* pComponent, sal_Bool bLongLastingCallsCancelable = sal_False );
- virtual ~LifeTimeManager();
+OOO_DLLPUBLIC_CHARTTOOLS LifeTimeManager( ::com::sun::star::lang::XComponent* pComponent, sal_Bool bLongLastingCallsCancelable = sal_False );
+OOO_DLLPUBLIC_CHARTTOOLS virtual ~LifeTimeManager();
- sal_Bool impl_isDisposed();
- sal_Bool dispose() throw(::com::sun::star::uno::RuntimeException);
+OOO_DLLPUBLIC_CHARTTOOLS sal_Bool impl_isDisposed();
+OOO_DLLPUBLIC_CHARTTOOLS sal_Bool dispose() throw(::com::sun::star::uno::RuntimeException);
public:
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer;
@@ -85,7 +85,7 @@ protected:
sal_Int32 volatile m_nLongLastingCallCount;
};
-class OOO_DLLPUBLIC_CHARTTOOLS CloseableLifeTimeManager : public LifeTimeManager
+class CloseableLifeTimeManager : public LifeTimeManager
{
protected:
::com::sun::star::util::XCloseable* m_pCloseable;
@@ -103,19 +103,19 @@ protected:
sal_Bool volatile m_bOwnershipIsWellKnown;
public:
- CloseableLifeTimeManager( ::com::sun::star::util::XCloseable* pCloseable
+OOO_DLLPUBLIC_CHARTTOOLS CloseableLifeTimeManager( ::com::sun::star::util::XCloseable* pCloseable
, ::com::sun::star::lang::XComponent* pComponent
, sal_Bool bLongLastingCallsCancelable = sal_False );
- virtual ~CloseableLifeTimeManager();
+OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager();
- sal_Bool impl_isDisposedOrClosed();
- sal_Bool g_close_startTryClose(sal_Bool bDeliverOwnership)
+OOO_DLLPUBLIC_CHARTTOOLS sal_Bool impl_isDisposedOrClosed();
+OOO_DLLPUBLIC_CHARTTOOLS sal_Bool g_close_startTryClose(sal_Bool bDeliverOwnership)
throw ( ::com::sun::star::uno::Exception );
- sal_Bool g_close_isNeedToCancelLongLastingCalls( sal_Bool bDeliverOwnership, ::com::sun::star::util::CloseVetoException& ex )
+OOO_DLLPUBLIC_CHARTTOOLS sal_Bool g_close_isNeedToCancelLongLastingCalls( sal_Bool bDeliverOwnership, ::com::sun::star::util::CloseVetoException& ex )
throw ( ::com::sun::star::util::CloseVetoException );
- void g_close_endTryClose(sal_Bool bDeliverOwnership, sal_Bool bMyVeto );
- void g_close_endTryClose_doClose();
- sal_Bool g_addCloseListener( const ::com::sun::star::uno::Reference<
+OOO_DLLPUBLIC_CHARTTOOLS void g_close_endTryClose(sal_Bool bDeliverOwnership, sal_Bool bMyVeto );
+OOO_DLLPUBLIC_CHARTTOOLS void g_close_endTryClose_doClose();
+OOO_DLLPUBLIC_CHARTTOOLS sal_Bool g_addCloseListener( const ::com::sun::star::uno::Reference<
::com::sun::star::util::XCloseListener > & xListener )
throw(::com::sun::star::uno::RuntimeException);
diff --git a/chart2/source/inc/LineProperties.hxx b/chart2/source/inc/LineProperties.hxx
index 9a4a978c09ce..3cc60c5f3aa7 100644
--- a/chart2/source/inc/LineProperties.hxx
+++ b/chart2/source/inc/LineProperties.hxx
@@ -62,9 +62,9 @@ public:
static void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
- static bool IsLineVisible( const ::com::sun::star::uno::Reference<
+ SAL_DLLPRIVATE static bool IsLineVisible( const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet >& xLineProperties );
- static void SetLineVisible( const ::com::sun::star::uno::Reference<
+ SAL_DLLPRIVATE static void SetLineVisible( const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet >& xLineProperties );
static void SetLineInvisible( const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet >& xLineProperties );
diff --git a/chart2/source/inc/LinearRegressionCurveCalculator.hxx b/chart2/source/inc/LinearRegressionCurveCalculator.hxx
index 55147aa5874d..ad79a887c019 100644
--- a/chart2/source/inc/LinearRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/LinearRegressionCurveCalculator.hxx
@@ -31,12 +31,11 @@
#define CHART2_LINEARREGRESSIONCURVECALCULATOR_HXX
#include "RegressionCurveCalculator.hxx"
-#include "charttoolsdllapi.hxx"
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS LinearRegressionCurveCalculator :
+class LinearRegressionCurveCalculator :
public RegressionCurveCalculator
{
public:
diff --git a/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx b/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx
index 2913d9401b98..b0274600d543 100644
--- a/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx
@@ -31,12 +31,11 @@
#define CHART2_LOGARITHMICREGRESSIONCURVECALCULATOR_HXX
#include "RegressionCurveCalculator.hxx"
-#include "charttoolsdllapi.hxx"
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS LogarithmicRegressionCurveCalculator :
+class LogarithmicRegressionCurveCalculator :
public RegressionCurveCalculator
{
public:
diff --git a/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx b/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx
index ea02d6a4fef5..8febb3d6078c 100644
--- a/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx
@@ -31,12 +31,11 @@
#define CHART2_MEANVALUEREGRESSIONCURVECALCULATOR_HXX
#include "RegressionCurveCalculator.hxx"
-#include "charttoolsdllapi.hxx"
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS MeanValueRegressionCurveCalculator :
+class MeanValueRegressionCurveCalculator :
public RegressionCurveCalculator
{
public:
diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx
index 403c842fa45b..35cc90d30ca7 100644
--- a/chart2/source/inc/MediaDescriptorHelper.hxx
+++ b/chart2/source/inc/MediaDescriptorHelper.hxx
@@ -202,7 +202,7 @@ public:
sal_Bool ISSET_SetEmbedded;
protected:
- void impl_init();
+SAL_DLLPRIVATE void impl_init();
};
}
diff --git a/chart2/source/inc/ModifyListenerCallBack.hxx b/chart2/source/inc/ModifyListenerCallBack.hxx
index a664816930f8..92e7a778348c 100644
--- a/chart2/source/inc/ModifyListenerCallBack.hxx
+++ b/chart2/source/inc/ModifyListenerCallBack.hxx
@@ -53,11 +53,11 @@ public:
virtual ~ModifyListenerCallBack();
void startListening( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyBroadcaster >& xBroadcaster );
- void stopListening();
+ SAL_DLLPRIVATE void stopListening();
private: //methods
- ModifyListenerCallBack();
- ModifyListenerCallBack( const ModifyListenerCallBack& );
+ SAL_DLLPRIVATE ModifyListenerCallBack();
+ SAL_DLLPRIVATE ModifyListenerCallBack( const ModifyListenerCallBack& );
private: //member
ModifyListenerCallBack_impl* pModifyListener_impl;
diff --git a/chart2/source/inc/ModifyListenerHelper.hxx b/chart2/source/inc/ModifyListenerHelper.hxx
index 7c02d0356299..fa2977fd1b44 100644
--- a/chart2/source/inc/ModifyListenerHelper.hxx
+++ b/chart2/source/inc/ModifyListenerHelper.hxx
@@ -58,6 +58,8 @@ namespace chart
namespace ModifyListenerHelper
{
+OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > createModifyEventForwarder();
+
// ================================================================================
/** This helper class serves as forwarder of modify events. It can be used
@@ -68,7 +70,7 @@ namespace ModifyListenerHelper
life time of the listeners is independent of the broadcaster's lifetime in
this case.</p>
*/
-class OOO_DLLPUBLIC_CHARTTOOLS ModifyEventForwarder :
+class ModifyEventForwarder :
public MutexContainer,
public ::cppu::WeakComponentImplHelper2<
::com::sun::star::util::XModifyBroadcaster,
@@ -77,8 +79,6 @@ class OOO_DLLPUBLIC_CHARTTOOLS ModifyEventForwarder :
public:
ModifyEventForwarder();
- void FireEvent( const ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XWeak > & xSource );
void FireEvent( const ::com::sun::star::lang::EventObject & rEvent );
void AddListener(
diff --git a/chart2/source/inc/NameContainer.hxx b/chart2/source/inc/NameContainer.hxx
index 104fd941f217..9a55884d9535 100644
--- a/chart2/source/inc/NameContainer.hxx
+++ b/chart2/source/inc/NameContainer.hxx
@@ -45,6 +45,9 @@ namespace chart
{
//.............................................................................
+OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createNameContainer(
+ const ::com::sun::star::uno::Type& rType, const rtl::OUString& rServicename, const rtl::OUString& rImplementationName );
+
namespace impl
{
typedef ::cppu::WeakImplHelper3<
@@ -54,7 +57,7 @@ typedef ::cppu::WeakImplHelper3<
NameContainer_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS NameContainer : public impl::NameContainer_Base
+class NameContainer : public impl::NameContainer_Base
{
public:
NameContainer( const ::com::sun::star::uno::Type& rType, const rtl::OUString& rServicename, const rtl::OUString& rImplementationName );
diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx
index c2e54d41da5f..00517f87c61a 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -80,6 +80,8 @@ public:
protected:
explicit OPropertySet( const OPropertySet & rOther, ::osl::Mutex & rMutex );
+ void SetNewValuesExplicitlyEvenIfTheyEqualDefault();
+
/** implement this method to provide default values for all properties
supporting defaults. If a property does not have a default value, you
may throw an UnknownPropertyException.
@@ -311,6 +313,7 @@ private:
/// pImpl idiom implementation
::std::auto_ptr< impl::ImplOPropertySet > m_pImplProperties;
+ bool m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault;
};
} // namespace property
diff --git a/chart2/source/inc/ObjectIdentifier.hxx b/chart2/source/inc/ObjectIdentifier.hxx
index 973e896f846a..7793cd57d21e 100644
--- a/chart2/source/inc/ObjectIdentifier.hxx
+++ b/chart2/source/inc/ObjectIdentifier.hxx
@@ -124,13 +124,7 @@ public:
::com::sun::star::frame::XModel >& xChartModel
, sal_Int32 nSubIndex = -1 );//-1: main grid, 0: first subgrid etc
- static rtl::OUString createClassifiedIdentifierForAxis(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XAxis >& xAxis
- , const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XModel >& xChartModel );
-
- static rtl::OUString createParticleForDiagram(
+ SAL_DLLPRIVATE static rtl::OUString createParticleForDiagram(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDiagram >& xDiagram
, const ::com::sun::star::uno::Reference<
@@ -195,7 +189,7 @@ public:
static rtl::OUString createDataCurveCID( const rtl::OUString& rSeriesParticle, sal_Int32 nCurveIndex, bool bAverageLine );
static rtl::OUString createDataCurveEquationCID( const rtl::OUString& rSeriesParticle, sal_Int32 nCurveIndex );
- static rtl::OUString getObjectID( const rtl::OUString& rCID );
+ SAL_DLLPRIVATE static rtl::OUString getObjectID( const rtl::OUString& rCID );
static rtl::OUString getParticleID( const rtl::OUString& rCID );
static rtl::OUString getFullParentParticle( const rtl::OUString& rCID );
diff --git a/chart2/source/inc/PotentialRegressionCurveCalculator.hxx b/chart2/source/inc/PotentialRegressionCurveCalculator.hxx
index ea3e621bf6e8..f5b8a7c7428f 100644
--- a/chart2/source/inc/PotentialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/PotentialRegressionCurveCalculator.hxx
@@ -37,7 +37,7 @@ namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS PotentialRegressionCurveCalculator :
+class PotentialRegressionCurveCalculator :
public RegressionCurveCalculator
{
public:
diff --git a/chart2/source/inc/RangeHighlighter.hxx b/chart2/source/inc/RangeHighlighter.hxx
index 4bf0dc4e158e..caa424dc4f05 100644
--- a/chart2/source/inc/RangeHighlighter.hxx
+++ b/chart2/source/inc/RangeHighlighter.hxx
@@ -31,7 +31,6 @@
#define CHART2_RANGEHIGHLIGHTER_HXX
#include "MutexContainer.hxx"
-#include "charttoolsdllapi.hxx"
#include <cppuhelper/compbase2.hxx>
#include <com/sun/star/chart2/data/XRangeHighlighter.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
@@ -56,7 +55,7 @@ typedef ::cppu::WeakComponentImplHelper2<
RangeHighlighter_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS RangeHighlighter :
+class RangeHighlighter :
public MutexContainer,
public impl::RangeHighlighter_Base
{
diff --git a/chart2/source/inc/ReferenceSizeProvider.hxx b/chart2/source/inc/ReferenceSizeProvider.hxx
index 6d8612d79f73..c6505c4d3796 100644
--- a/chart2/source/inc/ReferenceSizeProvider.hxx
+++ b/chart2/source/inc/ReferenceSizeProvider.hxx
@@ -64,7 +64,6 @@ public:
::com::sun::star::chart2::XChartDocument > & xChartDoc );
::com::sun::star::awt::Size getPageSize() const;
- bool useAutoScale() const;
/** Retrieves the state auto-resize from all objects that support this
feature. If all objects return the same state, AUTO_RESIZE_YES or
@@ -78,11 +77,6 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > & xChartDoc );
- /** Retrieves the current auto-resize state from the internally set chart
- document
- */
- AutoResizeState getAutoResizeState() const;
-
/** sets or resets the auto-resize at all objects that support this feature
for text to the opposite of the current setting. If the current state
is ambiguous, it is turned on. If the current state is unknown it stays
@@ -90,16 +84,12 @@ public:
*/
void toggleAutoResizeState();
- /** sets the auto-resize at all objects that support this feature for text.
- eNewState must be either AUTO_RESIZE_YES or AUTO_RESIZE_NO
- */
- void setAutoResizeState( AutoResizeState eNewState );
/** Sets the ReferencePageSize according to the internal settings of this
class at the XPropertySet, and the adapted font sizes if bAdaptFontSizes
is </TRUE>.
*/
- void setValuesAtPropertySet(
+ SAL_DLLPRIVATE void setValuesAtPropertySet(
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & xProp,
bool bAdaptFontSizes = true );
@@ -108,7 +98,7 @@ public:
class at the XTitle, and the adapted font sizes at the contained
XFormattedStrings
*/
- void setValuesAtTitle(
+ SAL_DLLPRIVATE void setValuesAtTitle(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XTitle > & xTitle );
@@ -118,6 +108,14 @@ public:
*/
void setValuesAtAllDataSeries();
+private:
+ SAL_DLLPRIVATE bool useAutoScale() const;
+
+ /** sets the auto-resize at all objects that support this feature for text.
+ eNewState must be either AUTO_RESIZE_YES or AUTO_RESIZE_NO
+ */
+ SAL_DLLPRIVATE void setAutoResizeState( AutoResizeState eNewState );
+
/** Retrieves the auto-resize state from the given propertyset. The result
will be put into eInOutState. If you initialize eInOutState with
AUTO_RESIZE_UNKNOWN, you will get the actual state. If you pass any
@@ -125,23 +123,15 @@ public:
esp. AUTO_RESIZE_AMBIGUOUS, if the value was NO before, and is YES for
the current property set, or the other way round.
*/
- static void getAutoResizeFromPropSet(
+ SAL_DLLPRIVATE static void getAutoResizeFromPropSet(
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > & xProp,
AutoResizeState & rInOutState );
- /** calls getAutoResizeFromPropSet with the title's property set
- */
- static void getAutoResizeFromTitle(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XTitle > & xTitle,
- AutoResizeState & rInOutState );
-
-private:
- void impl_setValuesAtTitled(
+ SAL_DLLPRIVATE void impl_setValuesAtTitled(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XTitled > & xTitled );
- static void impl_getAutoResizeFromTitled(
+ SAL_DLLPRIVATE static void impl_getAutoResizeFromTitled(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XTitled > & xTitled,
AutoResizeState & rInOutState );
diff --git a/chart2/source/inc/RegressionCurveCalculator.hxx b/chart2/source/inc/RegressionCurveCalculator.hxx
index 8ca8849c6bf0..0168ca2f57ba 100644
--- a/chart2/source/inc/RegressionCurveCalculator.hxx
+++ b/chart2/source/inc/RegressionCurveCalculator.hxx
@@ -34,12 +34,11 @@
#include <com/sun/star/chart2/XRegressionCurveCalculator.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
-#include "charttoolsdllapi.hxx"
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS RegressionCurveCalculator : public
+class RegressionCurveCalculator : public
::cppu::WeakImplHelper1< ::com::sun::star::chart2::XRegressionCurveCalculator >
{
public:
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx b/chart2/source/inc/RegressionCurveHelper.hxx
index 8cfe8b6f9ac8..3f18fa6c46c8 100644
--- a/chart2/source/inc/RegressionCurveHelper.hxx
+++ b/chart2/source/inc/RegressionCurveHelper.hxx
@@ -49,14 +49,14 @@ class OOO_DLLPUBLIC_CHARTTOOLS RegressionCurveHelper
{
public:
/// returns a model mean-value line
- static ::com::sun::star::uno::Reference<
+ SAL_DLLPRIVATE static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XRegressionCurve >
createMeanValueLine(
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext > & xContext );
/// returns a model regression curve
- static ::com::sun::star::uno::Reference<
+ SAL_DLLPRIVATE static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XRegressionCurve >
createRegressionCurveByServiceName(
const ::com::sun::star::uno::Reference<
@@ -187,7 +187,7 @@ public:
If false, the sequence (1, 2, 3, ...) will always be used, even if
there is a data-sequence with role "values-x"
*/
- static void initializeCurveCalculator(
+ SAL_DLLPRIVATE static void initializeCurveCalculator(
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XRegressionCurveCalculator > & xOutCurveCalculator,
const ::com::sun::star::uno::Reference<
diff --git a/chart2/source/inc/RelativePositionHelper.hxx b/chart2/source/inc/RelativePositionHelper.hxx
index 628fd0fdd017..e8e7dde535b5 100644
--- a/chart2/source/inc/RelativePositionHelper.hxx
+++ b/chart2/source/inc/RelativePositionHelper.hxx
@@ -77,7 +77,7 @@ public:
been changed to the given one. The passed object size is taken into
account for shifting the position.
*/
- static ::com::sun::star::chart2::RelativePosition
+ SAL_DLLPRIVATE static ::com::sun::star::chart2::RelativePosition
getReanchoredPosition(
const ::com::sun::star::chart2::RelativePosition & rPosition,
const ::com::sun::star::chart2::RelativeSize & rObjectSize,
diff --git a/chart2/source/inc/RessourceManager.hxx b/chart2/source/inc/RessourceManager.hxx
index a0d12cf2ed07..6cefa1a23d02 100644
--- a/chart2/source/inc/RessourceManager.hxx
+++ b/chart2/source/inc/RessourceManager.hxx
@@ -38,7 +38,7 @@ class ResMgr;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS RessourceManager
+class RessourceManager
{
public:
static ::ResMgr & getRessourceManager();
diff --git a/chart2/source/inc/Scaling.hxx b/chart2/source/inc/Scaling.hxx
index 31b32cac65e9..8f5e83c5254e 100644
--- a/chart2/source/inc/Scaling.hxx
+++ b/chart2/source/inc/Scaling.hxx
@@ -30,7 +30,6 @@
#ifndef _CHART2_SCALING_HXX
#define _CHART2_SCALING_HXX
#include "ServiceMacros.hxx"
-#include "charttoolsdllapi.hxx"
#include <com/sun/star/chart2/XScaling.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
@@ -46,7 +45,7 @@ namespace chart
/**
*/
-class OOO_DLLPUBLIC_CHARTTOOLS LogarithmicScaling :
+class LogarithmicScaling :
public ::cppu::WeakImplHelper3 <
::com::sun::star::chart2::XScaling,
::com::sun::star::lang::XServiceName,
@@ -67,13 +66,12 @@ public:
APPHELPER_XSERVICEINFO_DECL()
// ____ XScaling ____
- virtual double SAL_CALL
- doScaling( double value )
+ virtual double SAL_CALL doScaling( double value )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XScaling > SAL_CALL
- getInverseScaling() throw (::com::sun::star::uno::RuntimeException);
+ getInverseScaling() throw (::com::sun::star::uno::RuntimeException);
// ____ XServiceName ____
virtual ::rtl::OUString SAL_CALL getServiceName()
@@ -88,7 +86,7 @@ private:
// ----------------------------------------
-class OOO_DLLPUBLIC_CHARTTOOLS ExponentialScaling :
+class ExponentialScaling :
public ::cppu::WeakImplHelper3 <
::com::sun::star::chart2::XScaling,
::com::sun::star::lang::XServiceName,
@@ -129,7 +127,7 @@ private:
// ----------------------------------------
-class OOO_DLLPUBLIC_CHARTTOOLS LinearScaling : public ::cppu::WeakImplHelper3 <
+class LinearScaling : public ::cppu::WeakImplHelper3 <
::com::sun::star::chart2::XScaling,
::com::sun::star::lang::XServiceName,
::com::sun::star::lang::XServiceInfo
@@ -150,13 +148,12 @@ public:
APPHELPER_XSERVICEINFO_DECL()
// ____ XScaling ____
- virtual double SAL_CALL
- doScaling( double value )
+ virtual double SAL_CALL doScaling( double value )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XScaling > SAL_CALL
- getInverseScaling() throw (::com::sun::star::uno::RuntimeException);
+ getInverseScaling() throw (::com::sun::star::uno::RuntimeException);
// ____ XServiceName ____
virtual ::rtl::OUString SAL_CALL getServiceName()
@@ -171,7 +168,7 @@ private:
// ----------------------------------------
-class OOO_DLLPUBLIC_CHARTTOOLS PowerScaling : public ::cppu::WeakImplHelper3 <
+class PowerScaling : public ::cppu::WeakImplHelper3 <
::com::sun::star::chart2::XScaling,
::com::sun::star::lang::XServiceName,
::com::sun::star::lang::XServiceInfo
diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc
index 78b53e9807f4..0af8f7e1ae04 100644
--- a/chart2/source/inc/Strings.hrc
+++ b/chart2/source/inc/Strings.hrc
@@ -33,7 +33,8 @@
// this includes no link dependency
#include <svtools/solar.hrc>
-//next is 281
+//single free is: 134
+//next free is 282
//#define RID_APP_START 30000
////#define STR_NULL (RID_APP_START + 1)
@@ -149,7 +150,7 @@
#define STR_INDICATE_BOTH (RID_APP_START + 131)
#define STR_INDICATE_UP (RID_APP_START + 132)
#define STR_INDICATE_DOWN (RID_APP_START + 133)
-#define STR_REGRESSION_NONE (RID_APP_START + 134)
+
#define STR_REGRESSION_LINEAR (RID_APP_START + 135)
#define STR_REGRESSION_LOG (RID_APP_START + 136)
#define STR_REGRESSION_EXP (RID_APP_START + 137)
@@ -287,6 +288,7 @@
#define STR_DLG_NUMBERFORMAT_FOR_PERCENTAGE_VALUE (RID_APP_START + 266)
#define STR_PAGE_POSITIONING (RID_APP_START + 277)
+#define STR_PAGE_ASIAN (RID_APP_START + 281)
//-----------------------------------------------------------------------------
//strings used as description for actions on toolbar icons, as tip help or for undo
diff --git a/chart2/source/inc/ThreeDHelper.hxx b/chart2/source/inc/ThreeDHelper.hxx
index cb860a193b73..62eaba4ffa77 100644
--- a/chart2/source/inc/ThreeDHelper.hxx
+++ b/chart2/source/inc/ThreeDHelper.hxx
@@ -105,7 +105,7 @@ public:
sal_Int32 nElevationDeg, sal_Int32 nRotationDeg
, double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad );
- static void convertXYZAngleRadToElevationRotationDeg(
+ SAL_DLLPRIVATE static void convertXYZAngleRadToElevationRotationDeg(
sal_Int32& rnElevationDeg, sal_Int32& rnRotationDeg
, double fXRad, double fYRad, double fZRad );
@@ -116,8 +116,8 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet >& xSceneProperties
, double fCameraDistance );
- static void ensureCameraDistanceRange( double& rfCameraDistance );
- static void getCameraDistanceRange( double& rfMinimumDistance, double& rfMaximumDistance );
+ SAL_DLLPRIVATE static void ensureCameraDistanceRange( double& rfCameraDistance );
+ SAL_DLLPRIVATE static void getCameraDistanceRange( double& rfMinimumDistance, double& rfMaximumDistance );
static double CameraDistanceToPerspective( double fCameraDistance );
static double PerspectiveToCameraDistance( double fPerspective );
diff --git a/chart2/source/inc/UncachedDataSequence.hxx b/chart2/source/inc/UncachedDataSequence.hxx
index 3a46ebed6008..2a5e23602738 100644
--- a/chart2/source/inc/UncachedDataSequence.hxx
+++ b/chart2/source/inc/UncachedDataSequence.hxx
@@ -73,7 +73,7 @@ typedef ::cppu::WeakComponentImplHelper8<
UncachedDataSequence_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS UncachedDataSequence :
+class UncachedDataSequence :
public ::comphelper::OMutexAndBroadcastHelper,
public ::comphelper::OPropertyContainer,
public ::comphelper::OPropertyArrayUsageHelper< UncachedDataSequence >,
diff --git a/chart2/source/inc/UndoGuard.hxx b/chart2/source/inc/UndoGuard.hxx
index 98cffab939af..cdefdcd44c41 100644
--- a/chart2/source/inc/UndoGuard.hxx
+++ b/chart2/source/inc/UndoGuard.hxx
@@ -41,7 +41,7 @@ namespace chart
{
/** Base Class for UndoGuard and UndoLiveUpdateGuard
*/
-class OOO_DLLPUBLIC_CHARTTOOLS UndoGuard_Base
+class UndoGuard_Base
{
public:
explicit UndoGuard_Base( const rtl::OUString & rUndoMessage
@@ -51,7 +51,7 @@ public:
::com::sun::star::frame::XModel > & xModel );
virtual ~UndoGuard_Base();
- void commitAction();
+OOO_DLLPUBLIC_CHARTTOOLS void commitAction();
protected:
::com::sun::star::uno::Reference<
diff --git a/chart2/source/inc/UndoManager.hxx b/chart2/source/inc/UndoManager.hxx
index d8c1690963ff..6c71e668a2b5 100644
--- a/chart2/source/inc/UndoManager.hxx
+++ b/chart2/source/inc/UndoManager.hxx
@@ -32,7 +32,6 @@
#include "ConfigItemListener.hxx"
#include "MutexContainer.hxx"
-#include "charttoolsdllapi.hxx"
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
@@ -82,7 +81,7 @@ typedef ::cppu::WeakComponentImplHelper3<
redo-stacks support the css::util::XCloneable interface, which is
implemented such that the entire model is cloned.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS UndoManager :
+class UndoManager :
public MutexContainer,
public ConfigItemListener,
public impl::UndoManager_Base
diff --git a/chart2/source/inc/WeakListenerAdapter.hxx b/chart2/source/inc/WeakListenerAdapter.hxx
index cd5f472c12a0..936e6e4ab4cf 100644
--- a/chart2/source/inc/WeakListenerAdapter.hxx
+++ b/chart2/source/inc/WeakListenerAdapter.hxx
@@ -36,7 +36,6 @@
#include <com/sun/star/view/XSelectionChangeListener.hpp>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/implbase1.hxx>
-#include "charttoolsdllapi.hxx"
namespace chart
{
@@ -94,7 +93,7 @@ private:
// --------------------------------------------------------------------------------
-class OOO_DLLPUBLIC_CHARTTOOLS WeakModifyListenerAdapter :
+class WeakModifyListenerAdapter :
public WeakListenerAdapter< ::com::sun::star::util::XModifyListener >
{
public:
@@ -110,7 +109,7 @@ protected:
// --------------------------------------------------------------------------------
-class OOO_DLLPUBLIC_CHARTTOOLS WeakSelectionChangeListenerAdapter :
+class WeakSelectionChangeListenerAdapter :
public WeakListenerAdapter< ::com::sun::star::view::XSelectionChangeListener >
{
public:
diff --git a/chart2/source/inc/WrappedIgnoreProperty.hxx b/chart2/source/inc/WrappedIgnoreProperty.hxx
index 168967aa7fbf..db45c5291a9a 100644
--- a/chart2/source/inc/WrappedIgnoreProperty.hxx
+++ b/chart2/source/inc/WrappedIgnoreProperty.hxx
@@ -52,13 +52,13 @@ public:
virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void setPropertyToDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
+SAL_DLLPRIVATE virtual void setPropertyToDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
+SAL_DLLPRIVATE virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::beans::PropertyState getPropertyState( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
+SAL_DLLPRIVATE virtual ::com::sun::star::beans::PropertyState getPropertyState( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
protected:
@@ -72,8 +72,8 @@ public:
static void addIgnoreLineProperties( std::vector< WrappedProperty* >& rList );
static void addIgnoreFillProperties( std::vector< WrappedProperty* >& rList );
- static void addIgnoreFillProperties_without_BitmapProperties( std::vector< WrappedProperty* >& rList );
- static void addIgnoreFillProperties_only_BitmapProperties( std::vector< WrappedProperty* >& rList );
+ SAL_DLLPRIVATE static void addIgnoreFillProperties_without_BitmapProperties( std::vector< WrappedProperty* >& rList );
+ SAL_DLLPRIVATE static void addIgnoreFillProperties_only_BitmapProperties( std::vector< WrappedProperty* >& rList );
};
//.............................................................................
diff --git a/chart2/source/inc/WrappedPropertySet.hxx b/chart2/source/inc/WrappedPropertySet.hxx
index 99aaadcd3c11..3a6f19b06473 100644
--- a/chart2/source/inc/WrappedPropertySet.hxx
+++ b/chart2/source/inc/WrappedPropertySet.hxx
@@ -116,11 +116,11 @@ protected: //methods
virtual ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > getInnerPropertySet() = 0;
- ::com::sun::star::uno::Reference<
+ SAL_DLLPRIVATE ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertyState > getInnerPropertyState();
::cppu::IPropertyArrayHelper& getInfoHelper();
- tWrappedPropertyMap& getWrappedPropertyMap();
+ SAL_DLLPRIVATE tWrappedPropertyMap& getWrappedPropertyMap();
const WrappedProperty* getWrappedProperty( const ::rtl::OUString& rOuterName );
const WrappedProperty* getWrappedProperty( sal_Int32 nHandle );
diff --git a/chart2/source/inc/XMLRangeHelper.hxx b/chart2/source/inc/XMLRangeHelper.hxx
index 3e948c4567fc..32bb08f4a552 100644
--- a/chart2/source/inc/XMLRangeHelper.hxx
+++ b/chart2/source/inc/XMLRangeHelper.hxx
@@ -65,10 +65,8 @@ struct OOO_DLLPUBLIC_CHARTTOOLS CellRange
::rtl::OUString aTableName;
};
-OOO_DLLPUBLIC_CHARTTOOLS
CellRange getCellRangeFromXMLString( const ::rtl::OUString & rXMLString );
-OOO_DLLPUBLIC_CHARTTOOLS
::rtl::OUString getXMLStringFromCellRange( const CellRange & rRange );
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index 10ddc9657c7b..caec07d58a15 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -62,15 +62,15 @@ private:
DrawModelWrapper();
public:
- DrawModelWrapper(::com::sun::star::uno::Reference<
+ SAL_DLLPRIVATE DrawModelWrapper(::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext > const & xContext );
- virtual ~DrawModelWrapper();
+ SAL_DLLPRIVATE virtual ~DrawModelWrapper();
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getShapeFactory();
// the main page will contain the normal view objects
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > getMainDrawPage();
- void clearMainDrawPage();
+ SAL_DLLPRIVATE void clearMainDrawPage();
// the extra page is not visible, but contains some extras like the symbols for data points
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > getHiddenDrawPage();
@@ -80,25 +80,25 @@ public:
::com::sun::star::drawing::XDrawPage>& xPage );
- void lockControllers();
- void unlockControllers();
+ SAL_DLLPRIVATE void lockControllers();
+ SAL_DLLPRIVATE void unlockControllers();
/// tries to get an OutputDevice from the XParent of the model to use as reference device
- void attachParentReferenceDevice(
+ SAL_DLLPRIVATE void attachParentReferenceDevice(
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xChartModel );
OutputDevice* getReferenceDevice() const;
SfxItemPool& GetItemPool();
- const SfxItemPool& GetItemPool() const;
+ SAL_DLLPRIVATE const SfxItemPool& GetItemPool() const;
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
createUnoModel();
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
getUnoModel();
SdrModel& getSdrModel();
- void updateTablesFromChartModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
+ SAL_DLLPRIVATE void updateTablesFromChartModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
XColorTable* GetColorTable() const;
XDashList* GetDashList() const;
diff --git a/chart2/source/inc/chartview/ExplicitValueProvider.hxx b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
index 645e25166594..2f96bed91fa5 100644
--- a/chart2/source/inc/chartview/ExplicitValueProvider.hxx
+++ b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
@@ -91,7 +91,7 @@ public:
, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
- static sal_Int32 getPercentNumberFormat( const ::com::sun::star::uno::Reference<
+ SAL_DLLPRIVATE static sal_Int32 getPercentNumberFormat( const ::com::sun::star::uno::Reference<
::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
static sal_Int32 getExplicitNumberFormatKeyForLabel(
diff --git a/chart2/source/inc/chartview/NumberFormatterWrapper.hxx b/chart2/source/inc/chartview/NumberFormatterWrapper.hxx
index 71a6f20acb0d..0305ffdfd905 100644
--- a/chart2/source/inc/chartview/NumberFormatterWrapper.hxx
+++ b/chart2/source/inc/chartview/NumberFormatterWrapper.hxx
@@ -64,7 +64,7 @@ private: //private member
};
-class OOO_DLLPUBLIC_CHARTVIEW FixedNumberFormatter
+class FixedNumberFormatter
{
public:
FixedNumberFormatter( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xSupplier
diff --git a/chart2/source/model/inc/BaseCoordinateSystem.hxx b/chart2/source/model/inc/BaseCoordinateSystem.hxx
index afb0c5027f72..4afd4f6ff51f 100644
--- a/chart2/source/model/inc/BaseCoordinateSystem.hxx
+++ b/chart2/source/model/inc/BaseCoordinateSystem.hxx
@@ -33,7 +33,6 @@
#include "ServiceMacros.hxx"
#include "OPropertySet.hxx"
#include "MutexContainer.hxx"
-#include "ModifyListenerHelper.hxx"
#include <cppuhelper/implbase6.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/chart2/source/model/inc/Diagram.hxx b/chart2/source/model/inc/Diagram.hxx
index 283885866546..69e58bad0128 100644
--- a/chart2/source/model/inc/Diagram.hxx
+++ b/chart2/source/model/inc/Diagram.hxx
@@ -45,7 +45,6 @@
#include <com/sun/star/util/XModifyListener.hpp>
#include "ServiceMacros.hxx"
-#include "ModifyListenerHelper.hxx"
#include <map>
#include <vector>
diff --git a/chart2/source/model/inc/StockBar.hxx b/chart2/source/model/inc/StockBar.hxx
index 9f1b7aac9fc0..6db0c02b8959 100644
--- a/chart2/source/model/inc/StockBar.hxx
+++ b/chart2/source/model/inc/StockBar.hxx
@@ -37,7 +37,6 @@
#include "OPropertySet.hxx"
#include "ServiceMacros.hxx"
-#include "ModifyListenerHelper.hxx"
#include <cppuhelper/implbase3.hxx>
#include <comphelper/uno3.hxx>
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index d4a1cdff49e8..2b119c633537 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -296,7 +296,7 @@ namespace chart
Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) :
::property::OPropertySet( m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()),
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_aScaleData( AxisHelper::createDefaultScale() ),
m_xGrid( new GridProperties() ),
m_aSubGridProperties(),
@@ -317,7 +317,7 @@ Axis::Axis( const Axis & rOther ) :
MutexContainer(),
impl::Axis_Base(),
::property::OPropertySet( rOther, m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()),
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_aScaleData( rOther.m_aScaleData )
{
m_xGrid.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xGrid ));
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index 6384964e7738..ebbffe2ef1eb 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -113,7 +113,7 @@ BaseCoordinateSystem::BaseCoordinateSystem(
sal_Bool bSwapXAndYAxis /* = sal_False */ ) :
::property::OPropertySet( m_aMutex ),
m_xContext( xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()),
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_nDimensionCount( nDimensionCount )
{
m_aAllAxis.resize( m_nDimensionCount );
@@ -154,7 +154,7 @@ BaseCoordinateSystem::BaseCoordinateSystem(
MutexContainer(),
::property::OPropertySet( rSource, m_aMutex ),
m_xContext( rSource.m_xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()),
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_nDimensionCount( rSource.m_nDimensionCount ),
m_aOrigin( rSource.m_aOrigin )
{
diff --git a/chart2/source/model/main/ChartData.cxx b/chart2/source/model/main/ChartData.cxx
index b17c0e27bb16..af332f6c3c6e 100644
--- a/chart2/source/model/main/ChartData.cxx
+++ b/chart2/source/model/main/ChartData.cxx
@@ -32,7 +32,10 @@
#include "precompiled_chart2.hxx"
#include "ChartData.hxx"
-#include "InternalDataProvider.hxx"
+#include "ChartModelHelper.hxx"
+
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
using namespace ::com::sun::star;
@@ -45,7 +48,8 @@ namespace chart
ChartData::ChartData( const Reference< uno::XComponentContext > & xContext ) :
m_xContext( xContext ),
- m_pInternalDataProvider( 0 )
+ m_xDataProvider( 0 ),
+ m_xInternalDataProvider( 0 )
{}
ChartData::~ChartData()
@@ -55,7 +59,7 @@ void ChartData::setDataProvider(
const Reference< chart2::data::XDataProvider > & xDataProvider ) throw()
{
m_xDataProvider.set( xDataProvider );
- m_pInternalDataProvider = 0;
+ m_xInternalDataProvider.clear();
}
Reference< chart2::data::XDataProvider > ChartData::getDataProvider() const throw()
@@ -70,25 +74,32 @@ bool ChartData::createInternalData(
return false;
if( bCloneOldData )
- m_pInternalDataProvider = new InternalDataProvider( xChartDoc );
+ m_xInternalDataProvider = ChartModelHelper::createInternalDataProvider( xChartDoc );
else
- m_pInternalDataProvider = new InternalDataProvider();
+ m_xInternalDataProvider = ChartModelHelper::createInternalDataProvider();
- m_xDataProvider.set( m_pInternalDataProvider );
+ m_xDataProvider.set( m_xInternalDataProvider );
return true;
}
bool ChartData::hasInternalData() const
{
- return (m_xDataProvider.is() && m_pInternalDataProvider != 0);
+ return (m_xDataProvider.is() && m_xInternalDataProvider.is());
}
bool ChartData::createDefaultData() throw()
{
if( hasInternalData() )
{
- m_pInternalDataProvider->createDefaultData();
- return true;
+ uno::Reference< lang::XInitialization > xIni(m_xInternalDataProvider,uno::UNO_QUERY);
+ if ( xIni.is() )
+ {
+ uno::Sequence< uno::Any > aArgs(1);
+ beans::NamedValue aParam(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDefaultData")),uno::makeAny(sal_True));
+ aArgs[0] <<= aParam;
+ xIni->initialize(aArgs);
+ return true;
+ }
}
return false;
}
diff --git a/chart2/source/model/main/ChartData.hxx b/chart2/source/model/main/ChartData.hxx
index f13971f67629..308db5ab0f6a 100644
--- a/chart2/source/model/main/ChartData.hxx
+++ b/chart2/source/model/main/ChartData.hxx
@@ -58,8 +58,6 @@ namespace com { namespace sun { namespace star {
namespace chart
{
-class InternalDataProvider;
-
class ChartData
{
public:
@@ -93,15 +91,12 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider >
m_xDataProvider;
+
/** is only valid if m_xDataProvider is set. If m_xDataProvider is set to an
- external data provider this pointer must be set to 0
+ external data provider this reference must be set to 0
*/
- InternalDataProvider * m_pInternalDataProvider;
-
-// ::com::sun::star::uno::Reference<
-// ::com::sun::star::embed::XEmbeddedClient > m_xInternalData;
-// /// is only valid if m_xInternalData exists
-// InternalData * m_pInternalData;
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider >
+ m_xInternalDataProvider;
};
} // namespace chart
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index f73b27f35b1e..4882ecef72de 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -39,7 +39,7 @@
#include "servicenames.hxx"
#include "DataSourceHelper.hxx"
#include "NoWarningThisInCTOR.hxx"
-#include "RangeHighlighter.hxx"
+#include "ChartModelHelper.hxx"
#include "DisposeHelper.hxx"
#include "ControllerLockGuard.hxx"
#include "ObjectIdentifier.hxx"
@@ -784,7 +784,7 @@ sal_Bool SAL_CALL ChartModel::hasInternalDataProvider()
{
uno::Reference< view::XSelectionSupplier > xSelSupp( this->getCurrentController(), uno::UNO_QUERY );
if( xSelSupp.is() )
- m_xRangeHighlighter.set( new RangeHighlighter( xSelSupp ));
+ m_xRangeHighlighter.set( ChartModelHelper::createRangeHighlighter( xSelSupp ));
}
return m_xRangeHighlighter;
}
diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx
index 57680c4c15e7..983ba72080c1 100644
--- a/chart2/source/model/main/DataPoint.cxx
+++ b/chart2/source/model/main/DataPoint.cxx
@@ -90,17 +90,21 @@ namespace chart
DataPoint::DataPoint( const uno::Reference< beans::XPropertySet > & rParentProperties ) :
::property::OPropertySet( m_aMutex ),
m_xParentProperties( rParentProperties ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()),
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_bNoParentPropAllowed( false )
-{}
+{
+ SetNewValuesExplicitlyEvenIfTheyEqualDefault();
+}
DataPoint::DataPoint( const DataPoint & rOther ) :
MutexContainer(),
impl::DataPoint_Base(),
::property::OPropertySet( rOther, m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()),
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_bNoParentPropAllowed( true )
{
+ SetNewValuesExplicitlyEvenIfTheyEqualDefault();
+
// m_xParentProperties has to be set from outside, like in the method
// DataSeries::createClone
diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx
index 8e80bc1e8a47..a748d04d4b64 100644
--- a/chart2/source/model/main/DataPointProperties.cxx
+++ b/chart2/source/model/main/DataPointProperties.cxx
@@ -332,6 +332,13 @@ void DataPointProperties::AddPropertiesToVector(
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEVOID ));
+ rOutProperties.push_back(
+ Property( C2U( "TextRotation" ),
+ PROP_DATAPOINT_TEXT_ROTATION,
+ ::getCppuType( reinterpret_cast< const double * >(0)),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+
// statistics
rOutProperties.push_back(
Property( C2U( "ErrorBarX" ),
@@ -427,6 +434,8 @@ void DataPointProperties::AddDefaultsToMap(
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_ERROR_BAR_X, uno::Reference< beans::XPropertySet >());
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATAPOINT_ERROR_BAR_Y, uno::Reference< beans::XPropertySet >());
PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_DATAPOINT_PERCENT_DIAGONAL, 0 );
+
+ PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_DATAPOINT_TEXT_ROTATION, 0.0 );
}
} // namespace chart
diff --git a/chart2/source/model/main/DataPointProperties.hxx b/chart2/source/model/main/DataPointProperties.hxx
index 02d41b734503..6482adaa8679 100644
--- a/chart2/source/model/main/DataPointProperties.hxx
+++ b/chart2/source/model/main/DataPointProperties.hxx
@@ -77,6 +77,7 @@ public:
PROP_DATAPOINT_PERCENTAGE_NUMBER_FORMAT,
PROP_DATAPOINT_LABEL_PLACEMENT,
PROP_DATAPOINT_REFERENCE_DIAGRAM_SIZE,
+ PROP_DATAPOINT_TEXT_ROTATION,
// statistics
PROP_DATAPOINT_ERROR_BAR_X,
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index 5324c1eaae5c..9f331ce2a215 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -136,7 +136,7 @@ namespace chart
DataSeries::DataSeries( const uno::Reference< uno::XComponentContext > & xContext ) :
::property::OPropertySet( m_aMutex ),
m_xContext( xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
}
@@ -145,7 +145,7 @@ DataSeries::DataSeries( const DataSeries & rOther ) :
impl::DataSeries_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/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index fdf56f9fcca6..3e8c8ea9cd24 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -250,7 +250,7 @@ namespace chart
Diagram::Diagram( uno::Reference< uno::XComponentContext > const & xContext ) :
::property::OPropertySet( m_aMutex ),
m_xContext( xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
// Set camera position to a default position (that should be set hard, so
// that it will be exported. The property default is a camera looking
@@ -266,7 +266,7 @@ Diagram::Diagram( const Diagram & rOther ) :
impl::Diagram_Base(),
::property::OPropertySet( rOther, m_aMutex ),
m_xContext( rOther.m_xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
lcl_tCooSysMapping aCooSysMapping =
lcl_CloneCoordinateSystems( rOther.m_aCoordSystems, m_aCoordSystems );
@@ -361,7 +361,7 @@ Reference< chart2::XColorScheme > SAL_CALL Diagram::getDefaultColorScheme()
{
if( ! m_xColorScheme.is())
{
- m_xColorScheme.set( new ConfigColorScheme( m_xContext ));
+ m_xColorScheme.set( createConfigColorScheme( m_xContext ));
}
return m_xColorScheme;
}
diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx
index a2175b68a1da..e0d565bdb187 100644
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -91,7 +91,7 @@ FormattedString::FormattedString(
uno::Reference< uno::XComponentContext > const & /* xContext */ ) :
::property::OPropertySet( m_aMutex ),
m_aString(),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
FormattedString::FormattedString( const FormattedString & rOther ) :
@@ -99,7 +99,7 @@ FormattedString::FormattedString( const FormattedString & rOther ) :
impl::FormattedString_Base(),
::property::OPropertySet( rOther, m_aMutex ),
m_aString( rOther.m_aString ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
FormattedString::~FormattedString()
diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx
index 590aed34339b..4f48d16886b1 100644
--- a/chart2/source/model/main/GridProperties.cxx
+++ b/chart2/source/model/main/GridProperties.cxx
@@ -128,20 +128,20 @@ namespace chart
GridProperties::GridProperties( Reference< uno::XComponentContext > const & /* xContext */ ) :
::property::OPropertySet( m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
}
GridProperties::GridProperties() :
::property::OPropertySet( m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
GridProperties::GridProperties( const GridProperties & rOther ) :
MutexContainer(),
impl::GridProperties_Base(),
::property::OPropertySet( rOther, m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
}
diff --git a/chart2/source/model/main/ImplChartModel.cxx b/chart2/source/model/main/ImplChartModel.cxx
index bd4ad5630cb2..87383dcf5817 100644
--- a/chart2/source/model/main/ImplChartModel.cxx
+++ b/chart2/source/model/main/ImplChartModel.cxx
@@ -40,7 +40,7 @@
#include "ModifyListenerHelper.hxx"
#include "DataSourceHelper.hxx"
#include "DisposeHelper.hxx"
-#include "UndoManager.hxx"
+#include "ChartModelHelper.hxx"
#include "ThreeDHelper.hxx"
#include "AxisHelper.hxx"
@@ -112,19 +112,19 @@ ImplChartModel::ImplChartModel(
m_spChartData( new ChartData( m_xContext )),
m_bIsDisposed( false ),
m_xPageBackground( new PageBackground( m_xContext )),
- m_xUndoManager( new UndoManager()),
- m_xDashTable( new NameContainer( ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)),
+ m_xUndoManager( ChartModelHelper::createUndoManager() ),
+ m_xDashTable( createNameContainer( ::getCppuType( reinterpret_cast< const drawing::LineDash * >(0)),
C2U( "com.sun.star.drawing.DashTable" ), C2U( "com.sun.star.comp.chart.DashTable" ) )),
- m_xGradientTable( new NameContainer( ::getCppuType( reinterpret_cast< const awt::Gradient * >(0)),
+ m_xGradientTable( createNameContainer( ::getCppuType( reinterpret_cast< const awt::Gradient * >(0)),
C2U( "com.sun.star.drawing.GradientTable" ), C2U( "com.sun.star.comp.chart.GradientTable" ) )),
- m_xHatchTable( new NameContainer( ::getCppuType( reinterpret_cast< const drawing::Hatch * >(0)),
+ m_xHatchTable( createNameContainer( ::getCppuType( reinterpret_cast< const drawing::Hatch * >(0)),
C2U( "com.sun.star.drawing.HatchTable" ), C2U( "com.sun.star.comp.chart.HatchTable" ) )),
- m_xBitmapTable( new NameContainer( ::getCppuType( reinterpret_cast< const OUString * >(0)), // URL
+ m_xBitmapTable( createNameContainer( ::getCppuType( reinterpret_cast< const OUString * >(0)), // URL
C2U( "com.sun.star.drawing.BitmapTable" ), C2U( "com.sun.star.comp.chart.BitmapTable" ) )),
- m_xTransparencyGradientTable( new NameContainer( ::getCppuType( reinterpret_cast< const awt::Gradient * >(0)),
+ m_xTransparencyGradientTable( createNameContainer( ::getCppuType( reinterpret_cast< const awt::Gradient * >(0)),
C2U( "com.sun.star.drawing.TransparencyGradientTable" ), C2U( "com.sun.star.comp.chart.TransparencyGradientTable" ) )),
- m_xXMLNamespaceMap( new NameContainer( ::getCppuType( (const OUString*) 0 ),
- C2U( "com.sun.star.xml.NamespaceMap" ), C2U( "com.sun.star.comp.chart.XMLNameSpaceMap" ) )),
+ m_xXMLNamespaceMap( createNameContainer( ::getCppuType( (const OUString*) 0 ),
+ C2U( "com.sun.star.xml.NamespaceMap" ), C2U( "com.sun.star.comp.chart.XMLNameSpaceMap" ) ), uno::UNO_QUERY),
m_xModifyListener( xListener )
{
ModifyListenerHelper::addListener( m_xPageBackground, m_xModifyListener );
diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx
index 9f501b41ef63..3f7f66d23950 100644
--- a/chart2/source/model/main/Legend.cxx
+++ b/chart2/source/model/main/Legend.cxx
@@ -166,7 +166,7 @@ namespace chart
Legend::Legend( Reference< uno::XComponentContext > const & /* xContext */ ) :
::property::OPropertySet( m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
}
@@ -174,7 +174,7 @@ Legend::Legend( const Legend & rOther ) :
MutexContainer(),
impl::Legend_Base(),
::property::OPropertySet( rOther, m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
CloneHelper::CloneRefVector< Reference< chart2::XLegendEntry > >( rOther.m_aLegendEntries, m_aLegendEntries );
ModifyListenerHelper::addListenerToAllElements( m_aLegendEntries, m_xModifyEventForwarder );
diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx
index 5a16e30a3733..07def9bf496c 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -108,7 +108,7 @@ namespace chart
PageBackground::PageBackground( const uno::Reference< uno::XComponentContext > & xContext ) :
::property::OPropertySet( m_aMutex ),
m_xContext( xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
PageBackground::PageBackground( const PageBackground & rOther ) :
@@ -116,7 +116,7 @@ PageBackground::PageBackground( const PageBackground & rOther ) :
impl::PageBackground_Base(),
::property::OPropertySet( rOther, m_aMutex ),
m_xContext( rOther.m_xContext ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
PageBackground::~PageBackground()
diff --git a/chart2/source/model/main/RectangularDataSource.cxx b/chart2/source/model/main/RectangularDataSource.cxx
deleted file mode 100644
index edd852927300..000000000000
--- a/chart2/source/model/main/RectangularDataSource.cxx
+++ /dev/null
@@ -1,297 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: RectangularDataSource.cxx,v $
- * $Revision: 1.6 $
- *
- * This file is part of OpenOffice.org.
- *
- * 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.
- *
- * 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).
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_chart2.hxx"
-#include "RectangularDataSource.hxx"
-#include "CachedDataSequence.hxx"
-#include "StandardNaNHelper.hxx"
-#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
-#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
-#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-
-using namespace ::com::sun::star;
-
-using ::rtl::OUString;
-using ::osl::MutexGuard;
-using ::com::sun::star::uno::Sequence;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::beans::Property;
-using ::com::sun::star::uno::RuntimeException;
-using ::com::sun::star::uno::Any;
-using ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT;
-
-// necessary for MS compiler
-using ::comphelper::OPropertyContainer;
-using ::chart::impl::RectangularDataSource_Base;
-
-// ________________________________________
-
-// Property-Ids
-
-namespace
-{
-enum
-{
- PROP_SOURCE_RANGE,
- PROP_DATA_ROW_SOURCE
-};
-} // anonymous namespace
-
-
-// ________________________________________
-
-namespace chart
-{
-
-#define STANDARD_PROPERTY_ATTRIBUTES ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT
-
-RectangularDataSource::RectangularDataSource( uno::Reference< uno::XComponentContext > const & xContext )
- : OPropertyContainer( GetBroadcastHelper() ),
- RectangularDataSource_Base( GetMutex() ),
- m_aDataRowSource( ::com::sun::star::chart::ChartDataRowSource_COLUMNS )
-{
- registerProperty( C2U( "SourceRange" ),
- PROP_SOURCE_RANGE, // Handle for fast access
- 0, // PropertyAttributes
- & m_aSourceRange, // pointer to corresponding member
- ::getCppuType( & m_aSourceRange ) // Type of property
- );
-
- registerProperty( C2U( "DataRowSource" ),
- PROP_DATA_ROW_SOURCE, // Handle for fast access
- MAYBEDEFAULT, // PropertyAttributes
- & m_aDataRowSource, // pointer to corresponding member
- ::getCppuType( & m_aDataRowSource ) // Type of property
- );
-}
-
-RectangularDataSource::~RectangularDataSource()
-{}
-
-// base for XServiceInfo
-Sequence< OUString > RectangularDataSource::getSupportedServiceNames_Static()
-{
- Sequence< OUString > aServices( 4 );
- aServices[ 0 ] = C2U( "com.sun.star.chart2.RectangularDataSource" );
- aServices[ 1 ] = C2U( "com.sun.star.chart2.data.DataFilter" );
- aServices[ 2 ] = C2U( "com.sun.star.chart2.data.DataSource" );
- aServices[ 3 ] = C2U( "com.sun.star.chart2.data.DataSink" );
- return aServices;
-}
-
-// ____ XDataSink ____
-void SAL_CALL RectangularDataSource::setData( const uno::Sequence< Reference< chart2::data::XDataSequence > >& aData )
- throw (RuntimeException)
-{
- m_aDataSequences = aData;
-}
-
-// ____ XDataSource ____
-uno::Sequence< Reference< chart2::data::XDataSequence > > SAL_CALL RectangularDataSource::getDataSequences()
- throw (RuntimeException)
-{
- return m_aDataSequences;
-}
-
-double SAL_CALL RectangularDataSource::getNotANumber()
- throw (uno::RuntimeException)
-{
- return StandardNaNHelper::getNotANumber();
-}
-
-sal_Bool SAL_CALL RectangularDataSource::isNotANumber( double fNumber )
- throw (uno::RuntimeException)
-{
- return StandardNaNHelper::isNotANumber( fNumber );
-}
-
-// ____ XIndexAccess ____
- sal_Int32 SAL_CALL RectangularDataSource::getCount()
- throw (RuntimeException)
-{
- // /--
- MutexGuard aGuard( GetMutex() );
- return m_aDataSequences.getLength();
- // \--
-}
-
- Any SAL_CALL RectangularDataSource::getByIndex( sal_Int32 Index )
- throw (lang::IndexOutOfBoundsException,
- lang::WrappedTargetException,
- RuntimeException)
-{
- // /--
- MutexGuard aGuard( GetMutex() );
- return uno::makeAny( GetDataByIndex( Index ) );
- // \--
-}
-
-// ____ XElementAccess (base of XIndexAccess) ____
- uno::Type SAL_CALL RectangularDataSource::getElementType()
- throw (RuntimeException)
-{
- return ::getCppuType((const Reference< chart2::data::XDataSequence >*)0);
-}
-
-sal_Bool SAL_CALL RectangularDataSource::hasElements()
- throw (RuntimeException)
-{
- // /--
- MutexGuard aGuard( GetMutex() );
- return static_cast< sal_Bool >( m_aDataSequences.getLength() > 0 );
- // \--
-}
-
-Reference< chart2::data::XDataSequence > RectangularDataSource::GetDataByIndex( sal_Int32 Index ) const
- throw (lang::IndexOutOfBoundsException)
-{
- if( 0 > Index || Index >= m_aDataSequences.getLength() )
- throw lang::IndexOutOfBoundsException();
-
- return m_aDataSequences.getConstArray() [ Index ];
-}
-
-void SAL_CALL RectangularDataSource::setFastPropertyValue_NoBroadcast(
- sal_Int32 nHandle,
- const Any& rValue )
- throw (uno::Exception)
-{
- // at this point it is clear that rValue contains a different value than the
- // property currently still has, and that it will be overwritten by it in
- // the final base class call
-
- switch( nHandle )
- {
- case PROP_DATA_ROW_SOURCE:
- {
- ::com::sun::star::chart::ChartDataRowSource aRowSource;
- if( rValue >>= aRowSource )
- {
- if( aRowSource != m_aDataRowSource )
- {
- SwapData();
- }
- }
- }
- break;
- }
-
- OPropertyContainer::setFastPropertyValue_NoBroadcast( nHandle, rValue );
-}
-
-// ================================================================================
-
-using impl::RectangularDataSource_Base;
-
-IMPLEMENT_FORWARD_XINTERFACE2( RectangularDataSource, RectangularDataSource_Base, OPropertyContainer )
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( RectangularDataSource, RectangularDataSource_Base, OPropertyContainer )
-
-// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL RectangularDataSource::getPropertySetInfo()
- throw(RuntimeException)
-{
- return Reference< beans::XPropertySetInfo >( createPropertySetInfo( getInfoHelper() ) );
-}
-
-// ____ ::comphelper::OPropertySetHelper ____
-// __________________________________________
-::cppu::IPropertyArrayHelper& RectangularDataSource::getInfoHelper()
-{
- return *getArrayHelper();
-}
-
-// ____ ::comphelper::OPropertyArrayHelper ____
-// ____________________________________________
-::cppu::IPropertyArrayHelper* RectangularDataSource::createArrayHelper() const
-{
- Sequence< Property > aProps;
- // describes all properties which have been registered in the ctor
- describeProperties( aProps );
-
- return new ::cppu::OPropertyArrayHelper( aProps );
-}
-
-// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( RectangularDataSource,
- C2U( "com.sun.star.comp.chart.RectangularDataSource" ))
-
-void RectangularDataSource::SwapData()
-{
- try
- {
- // assume that there are always text labels
- Reference< chart2::data::XTextualDataSequence > xCategories( GetDataByIndex( 0 ), uno::UNO_QUERY );
-
- // -1: the first sequence contains labels
- sal_Int32 nNewSequenceSize = m_aDataSequences.getLength() - 1;
- if( nNewSequenceSize > 0 )
- {
- // +1: one series more for labels
- sal_Int32 nNewNumOfSequences = GetDataByIndex( 0 )->getData().getLength() + 1;
- Sequence< Reference< chart2::data::XDataSequence > > aResult( nNewNumOfSequences );
- ::std::vector< OUString > aCategoryVector( nNewSequenceSize );
- sal_Int32 nIdx = 0;
-
- // fill new categories consisting of former labels
- for( nIdx = 0; nIdx < nNewSequenceSize; ++nIdx )
- {
- aCategoryVector.push_back( GetDataByIndex( nIdx )->getLabel() );
- }
- aResult[ 0 ] = Reference< chart2::data::XDataSequence >(
- static_cast< chart2::data::XTextualDataSequence * >(
- new ::chart::CachedDataSequence( aCategoryVector )));
-
- // fill new data sequences. The label is set by the former categories
- for( sal_Int32 nSeqIdx = 1; nSeqIdx < nNewNumOfSequences; ++ nSeqIdx )
- {
- ::std::vector< double > aDataVector( nNewSequenceSize );
- for( nIdx = 0; nIdx < nNewSequenceSize; ++nIdx )
- {
- aDataVector.push_back(
- Reference< chart2::data::XNumericalDataSequence >(
- GetDataByIndex( nIdx ),
- uno::UNO_QUERY )->getNumericalData().getConstArray()[ nSeqIdx - 1 ] );
- }
- aResult[ nSeqIdx ] = Reference< chart2::data::XDataSequence >(
- static_cast< chart2::data::XNumericalDataSequence * >(
- new ::chart::CachedDataSequence( aDataVector )));
- }
-
- setData( aResult );
- }
- }
- catch( lang::IndexOutOfBoundsException aEx )
- {
- }
-}
-
-} // namespace chart
diff --git a/chart2/source/model/main/StockBar.cxx b/chart2/source/model/main/StockBar.cxx
index 68f4e8a6d4f0..5edaf6a606d8 100644
--- a/chart2/source/model/main/StockBar.cxx
+++ b/chart2/source/model/main/StockBar.cxx
@@ -38,6 +38,7 @@
#include "PropertyHelper.hxx"
#include "macros.hxx"
#include "ContainerHelper.hxx"
+#include "ModifyListenerHelper.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -110,7 +111,7 @@ namespace chart
StockBar::StockBar( bool bRisingCourse ) :
::property::OPropertySet( m_aMutex ),
m_bRisingCourse( bRisingCourse ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
if( ! m_bRisingCourse )
{
@@ -128,7 +129,7 @@ StockBar::StockBar( const StockBar & rOther ) :
impl::StockBar_Base(),
::property::OPropertySet( rOther, m_aMutex ),
m_bRisingCourse( rOther.m_bRisingCourse ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
StockBar::~StockBar()
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index e2b9db4e6d2a..55fa2df663cd 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -225,14 +225,14 @@ namespace chart
Title::Title( uno::Reference< uno::XComponentContext > const & /* xContext */ ) :
::property::OPropertySet( m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
Title::Title( const Title & rOther ) :
MutexContainer(),
impl::Title_Base(),
::property::OPropertySet( rOther, m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
CloneHelper::CloneRefSequence< uno::Reference< chart2::XFormattedString > >(
rOther.m_aStrings, m_aStrings );
diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx
index 6da6ff9bba3b..bd27e9fd733a 100644
--- a/chart2/source/model/main/Wall.cxx
+++ b/chart2/source/model/main/Wall.cxx
@@ -112,14 +112,14 @@ namespace chart
Wall::Wall() :
::property::OPropertySet( m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
Wall::Wall( const Wall & rOther ) :
MutexContainer(),
impl::Wall_Base(),
::property::OPropertySet( rOther, m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder())
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
Wall::~Wall()
diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx
index 35b40f3c3d76..2834d9354f95 100644
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -35,7 +35,7 @@
#include "CommonFunctors.hxx"
#include "macros.hxx"
#include "CartesianCoordinateSystem.hxx"
-#include "Scaling.hxx"
+#include "AxisHelper.hxx"
#include "CloneHelper.hxx"
#include "AxisIndexDefines.hxx"
#include "ContainerHelper.hxx"
@@ -57,7 +57,7 @@ namespace chart
ChartType::ChartType(
const Reference< uno::XComponentContext > & xContext ) :
::property::OPropertySet( m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()),
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_xContext( xContext ),
m_bNotifyChanges( true )
{}
@@ -66,7 +66,7 @@ ChartType::ChartType( const ChartType & rOther ) :
MutexContainer(),
impl::ChartType_Base(),
::property::OPropertySet( rOther, m_aMutex ),
- m_xModifyEventForwarder( new ModifyListenerHelper::ModifyEventForwarder()),
+ m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_xContext( rOther.m_xContext ),
m_bNotifyChanges( true )
{
@@ -106,7 +106,7 @@ Reference< chart2::XCoordinateSystem > SAL_CALL
chart2::ScaleData aScaleData = xAxis->getScaleData();
aScaleData.Orientation = chart2::AxisOrientation_MATHEMATICAL;
- aScaleData.Scaling = new LinearScaling( 1.0, 0.0 );
+ aScaleData.Scaling = AxisHelper::createLinearScaling();
switch( i )
{
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index a8eb36d6e5c8..6365c08f4403 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -35,7 +35,6 @@
#include "StackMode.hxx"
#include "ContainerHelper.hxx"
-#include "Scaling.hxx"
#include "CartesianCoordinateSystem.hxx"
#include "LineChartTypeTemplate.hxx"
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index d328f3fb6921..b5791baf6c0f 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -39,7 +39,6 @@
#include "ContainerHelper.hxx"
#include "ChartTypeHelper.hxx"
-#include "Scaling.hxx"
#include "CartesianCoordinateSystem.hxx"
#include "AxisHelper.hxx"
#include "LegendHelper.hxx"
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index 6bfec80d2fa5..8073b7af04ef 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -33,7 +33,7 @@
#include "DataInterpreter.hxx"
#include "DataSeries.hxx"
-#include "DataSource.hxx"
+#include "DataSourceHelper.hxx"
#include "DataSeriesHelper.hxx"
#include "macros.hxx"
#include "CommonConverters.hxx"
@@ -355,7 +355,7 @@ Reference< data::XDataSource > SAL_CALL DataInterpreter::mergeInterpretedData(
// add unused data at end
copy( aUnusedDataVec.begin(), aUnusedDataVec.end(), back_inserter( aResultVec ));
- return Reference< data::XDataSource >( new DataSource( ContainerToSequence( aResultVec )));
+ return Reference< data::XDataSource >( DataSourceHelper::createDataSource( ContainerToSequence( aResultVec ) ) );
}
// convenience methods
diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx
index d36bb4331a46..9de315679223 100644
--- a/chart2/source/model/template/NetChartType.cxx
+++ b/chart2/source/model/template/NetChartType.cxx
@@ -34,10 +34,11 @@
#include "PropertyHelper.hxx"
#include "macros.hxx"
#include "PolarCoordinateSystem.hxx"
-#include "Scaling.hxx"
#include "servicenames_charttypes.hxx"
#include "ContainerHelper.hxx"
#include "AxisIndexDefines.hxx"
+#include "AxisHelper.hxx"
+
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
@@ -137,7 +138,7 @@ Reference< XCoordinateSystem > SAL_CALL
if( xAxis.is() )
{
ScaleData aScaleData = xAxis->getScaleData();
- aScaleData.Scaling = new LinearScaling( 1.0, 0.0 );
+ aScaleData.Scaling = AxisHelper::createLinearScaling();
aScaleData.AxisType = AxisType::CATEGORY;
aScaleData.Orientation = AxisOrientation_MATHEMATICAL;
xAxis->setScaleData( aScaleData );
diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx b/chart2/source/model/template/NetChartTypeTemplate.cxx
index ab90f0f7ff42..e348b32b7bc6 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.cxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.cxx
@@ -33,7 +33,6 @@
#include "NetChartTypeTemplate.hxx"
#include "macros.hxx"
#include "PolarCoordinateSystem.hxx"
-#include "Scaling.hxx"
#include "DiagramHelper.hxx"
#include "servicenames_charttypes.hxx"
#include "DataSeriesHelper.hxx"
diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx
index 4cccd4bedcde..a4c98413fe7d 100644
--- a/chart2/source/model/template/PieChartType.cxx
+++ b/chart2/source/model/template/PieChartType.cxx
@@ -34,7 +34,7 @@
#include "PropertyHelper.hxx"
#include "macros.hxx"
#include "PolarCoordinateSystem.hxx"
-#include "Scaling.hxx"
+#include "AxisHelper.hxx"
#include "servicenames_charttypes.hxx"
#include "ContainerHelper.hxx"
#include "AxisIndexDefines.hxx"
@@ -156,7 +156,7 @@ Reference< chart2::XCoordinateSystem > SAL_CALL
//hhhh todo make axis invisible
chart2::ScaleData aScaleData = xAxis->getScaleData();
- aScaleData.Scaling = new LinearScaling( 1.0, 0.0 );
+ aScaleData.Scaling = AxisHelper::createLinearScaling();
aScaleData.AxisType = chart2::AxisType::REALNUMBER;
if( i == 0 )
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 774eafed625f..1ece7c5edb93 100644
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -31,7 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_chart2.hxx"
#include "PieChartTypeTemplate.hxx"
-#include "Scaling.hxx"
#include "macros.hxx"
#include "CommonConverters.hxx"
#include "DiagramHelper.hxx"
diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx
index 38249e3e72fe..50b1b4f0ac70 100644
--- a/chart2/source/model/template/ScatterChartType.cxx
+++ b/chart2/source/model/template/ScatterChartType.cxx
@@ -36,7 +36,7 @@
#include "servicenames_charttypes.hxx"
#include "ContainerHelper.hxx"
#include "CartesianCoordinateSystem.hxx"
-#include "Scaling.hxx"
+#include "AxisHelper.hxx"
#include "AxisIndexDefines.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
@@ -179,7 +179,7 @@ Reference< chart2::XCoordinateSystem > SAL_CALL
chart2::ScaleData aScaleData = xAxis->getScaleData();
aScaleData.Orientation = chart2::AxisOrientation_MATHEMATICAL;
- aScaleData.Scaling = new LinearScaling( 1.0, 0.0 );
+ aScaleData.Scaling = AxisHelper::createLinearScaling();
if( i == 2 )
aScaleData.AxisType = chart2::AxisType::SERIES;
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
index 6e5449d49f49..a87a82c05827 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
@@ -34,7 +34,6 @@
#include "macros.hxx"
#include "XYDataInterpreter.hxx"
#include "CartesianCoordinateSystem.hxx"
-#include "Scaling.hxx"
#include "DiagramHelper.hxx"
#include "servicenames_charttypes.hxx"
#include "ContainerHelper.hxx"
diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx
index ae48f1cc932e..719decae49a7 100644
--- a/chart2/source/model/template/StockChartTypeTemplate.cxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.cxx
@@ -35,7 +35,6 @@
#include "DataSeriesHelper.hxx"
#include "StockDataInterpreter.hxx"
#include "CartesianCoordinateSystem.hxx"
-#include "Scaling.hxx"
#include "AxisHelper.hxx"
#include "DiagramHelper.hxx"
#include "servicenames_charttypes.hxx"
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();
}
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index 9b1ceae698bd..5287ecbcdc13 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -33,7 +33,6 @@
#include "ScaleAutomatism.hxx"
#include "macros.hxx"
#include "TickmarkHelper.hxx"
-#include "Scaling.hxx"
#include "AxisHelper.hxx"
#include <rtl/math.hxx>
#include <tools/debug.hxx>
@@ -257,6 +256,9 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForLogarithmic(
{
// *** STEP 1: initialize the range data ***
+ const double fInputMinimum = rExplicitScale.Minimum;
+ const double fInputMaximum = rExplicitScale.Maximum;
+
double fSourceMinimum = rExplicitScale.Minimum;
double fSourceMaximum = rExplicitScale.Maximum;
@@ -269,7 +271,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForLogarithmic(
values. In the last step, the original values will be restored. */
uno::Reference< XScaling > xScaling = rExplicitScale.Scaling;
if( !xScaling.is() )
- xScaling.set( new LogarithmicScaling );
+ xScaling.set( AxisHelper::createLogarithmicScaling() );
uno::Reference< XScaling > xInverseScaling = xScaling->getInverseScaling();
fSourceMinimum = xScaling->doScaling( fSourceMinimum );
@@ -412,10 +414,38 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForLogarithmic(
// round to entire multiples of the distance and add additional space
if( bAutoMinimum && m_bExpandBorderToIncrementRhythm )
+ {
fAxisMinimum = TickmarkHelper::getMinimumAtIncrement( fAxisMinimum, rExplicitIncrement );
+
+ //ensure valid values after scaling #i100995#
+ if( !bAutoDistance )
+ {
+ double fCheck = xInverseScaling->doScaling( fAxisMinimum );
+ if( !::rtl::math::isFinite( fCheck ) || fCheck <= 0 )
+ {
+ bAutoDistance = true;
+ bHasCalculatedDistance = false;
+ continue;
+ }
+ }
+ }
if( bAutoMaximum && m_bExpandBorderToIncrementRhythm )
+ {
fAxisMaximum = TickmarkHelper::getMaximumAtIncrement( fAxisMaximum, rExplicitIncrement );
+ //ensure valid values after scaling #i100995#
+ if( !bAutoDistance )
+ {
+ double fCheck = xInverseScaling->doScaling( fAxisMaximum );
+ if( !::rtl::math::isFinite( fCheck ) || fCheck <= 0 )
+ {
+ bAutoDistance = true;
+ bHasCalculatedDistance = false;
+ continue;
+ }
+ }
+ }
+
// set the resulting limits (swap back to negative range if needed)
if( bSwapAndNegateRange )
{
@@ -440,6 +470,22 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForLogarithmic(
// convert limits back to logarithmic scale
rExplicitScale.Minimum = xInverseScaling->doScaling( rExplicitScale.Minimum );
rExplicitScale.Maximum = xInverseScaling->doScaling( rExplicitScale.Maximum );
+
+ //ensure valid values after scaling #i100995#
+ if( !::rtl::math::isFinite( rExplicitScale.Minimum ) || rExplicitScale.Minimum <= 0)
+ {
+ rExplicitScale.Minimum = fInputMinimum;
+ if( !::rtl::math::isFinite( rExplicitScale.Minimum ) || rExplicitScale.Minimum <= 0 )
+ rExplicitScale.Minimum = 1.0;
+ }
+ if( !::rtl::math::isFinite( rExplicitScale.Maximum) || rExplicitScale.Maximum <= 0 )
+ {
+ rExplicitScale.Maximum= fInputMaximum;
+ if( !::rtl::math::isFinite( rExplicitScale.Maximum) || rExplicitScale.Maximum <= 0 )
+ rExplicitScale.Maximum = 10.0;
+ }
+ if( rExplicitScale.Maximum < rExplicitScale.Minimum )
+ ::std::swap( rExplicitScale.Maximum, rExplicitScale.Minimum );
}
//---------------------------------------------------------------
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index c64102f6c984..0f18029254ef 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -64,193 +64,6 @@ using namespace ::com::sun::star::chart2;
using namespace ::rtl::math;
using ::com::sun::star::uno::Reference;
-void lcl_correctRotation_Left( double& rfXCorrection, double& rfYCorrection
- , double fAnglePositiveDegree, const awt::Size& aSize )
-{
- //correct label positions left of an axis with right centered alignment
- double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
- if( fAnglePositiveDegree==0.0 )
- {
- }
- else if( fAnglePositiveDegree<= 90.0 )
- {
- rfXCorrection = -aSize.Height*rtl::math::sin( fAnglePi )/2.0;
- }
- else if( fAnglePositiveDegree<= 180.0 )
- {
- double beta = fAnglePi-F_PI/2.0;
- rfXCorrection = -aSize.Width *rtl::math::sin( beta )
- -aSize.Height *rtl::math::cos( beta )/2.0;
- rfYCorrection = -aSize.Width *rtl::math::cos( beta );
- }
- else if( fAnglePositiveDegree<= 270.0 )
- {
- double beta = fAnglePi - F_PI;
- rfXCorrection = -aSize.Width *rtl::math::cos( beta )
- -aSize.Height*rtl::math::sin( beta )/2.0;
- rfYCorrection = aSize.Width *rtl::math::sin( beta );
- }
- else
- {
- double beta = 2*F_PI - fAnglePi;
- rfXCorrection = -aSize.Height*rtl::math::sin( beta )/2.0;
-
- }
-}
-
-void lcl_correctRotation_Right( double& rfXCorrection, double& rfYCorrection
- , double fAnglePositiveDegree, const awt::Size& aSize )
-{
- //correct label positions right of an axis with left centered alignment
- double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
- if( fAnglePositiveDegree== 0.0 )
- {
- }
- else if( fAnglePositiveDegree<= 90.0 )
- {
- rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi )/2.0;
- }
- else if( fAnglePositiveDegree<= 180.0 )
- {
- double beta = F_PI - fAnglePi;
- rfXCorrection = aSize.Width *rtl::math::cos( beta )
- + aSize.Height*rtl::math::sin( beta )/2.0;
- rfYCorrection = aSize.Width *rtl::math::sin( beta );
- }
- else if( fAnglePositiveDegree<= 270.0 )
- {
- double beta = 3*F_PI/2.0 - fAnglePi;
- rfXCorrection = aSize.Width *rtl::math::sin( beta )
- +aSize.Height*rtl::math::cos( beta )/2.0;
- rfYCorrection = -aSize.Width *rtl::math::cos( beta );
- }
- else
- {
- rfXCorrection = aSize.Height*rtl::math::sin( 2*F_PI - fAnglePi )/2.0;
- }
-}
-
-void lcl_correctRotation_Top( double& rfXCorrection, double& rfYCorrection
- , double fAnglePositiveDegree, const awt::Size& aSize )
-{
- //correct label positions on top of an axis with bottom centered alignment
- double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
- if( fAnglePositiveDegree== 0.0 )
- {
- }
- else if( fAnglePositiveDegree<= 90.0 )
- {
- rfXCorrection = aSize.Width*rtl::math::cos( fAnglePi )/2.0
- +aSize.Height*rtl::math::sin( fAnglePi )/2.0;
- rfYCorrection = -aSize.Width*rtl::math::sin( fAnglePi )/2.0;
- }
- else if( fAnglePositiveDegree<= 180.0 )
- {
- double beta = fAnglePi - F_PI/2.0;
- rfYCorrection = -aSize.Width*rtl::math::cos( beta )/2.0
- - aSize.Height*rtl::math::sin( beta );
- rfXCorrection = - aSize.Width*rtl::math::sin( beta )/2.0
- + aSize.Height*rtl::math::cos( beta )/2.0;
- }
- else if( fAnglePositiveDegree<= 270.0 )
- {
- double beta = fAnglePi - F_PI;
- rfXCorrection = +aSize.Width *rtl::math::cos( beta )/2.0
- -aSize.Height *rtl::math::sin( beta )/2.0; ;
- rfYCorrection = -aSize.Width *rtl::math::sin( beta )/2.0
- -aSize.Height *rtl::math::cos( beta );
- }
- else
- {
- rfXCorrection = -aSize.Width*rtl::math::cos( fAnglePi )/2.0
- +aSize.Height*rtl::math::sin( fAnglePi )/2.0;
- rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi )/2.0;
- }
-}
-
-void lcl_correctRotation_Bottom( double& rfXCorrection, double& rfYCorrection
- , double fAnglePositiveDegree, const awt::Size& aSize )
-{
- //correct label positions below of an axis with top centered alignment
- double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
- if( fAnglePositiveDegree==0.0 )
- {
- }
- else if( fAnglePositiveDegree<= 90.0 )
- {
- rfXCorrection = -aSize.Width *rtl::math::cos( fAnglePi )/2.0
- -aSize.Height*rtl::math::sin( fAnglePi )/2.0;
- rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi )/2.0;
- }
- else if( fAnglePositiveDegree<= 180.0 )
- {
- double beta = fAnglePi-F_PI/2.0;
- rfYCorrection = aSize.Width *rtl::math::cos( beta )/2.0
- +aSize.Height*rtl::math::sin( beta );
- rfXCorrection = aSize.Width *rtl::math::sin( beta )/2.0
- -aSize.Height*rtl::math::cos( beta )/2.0;
- }
- else if( fAnglePositiveDegree<= 270.0 )
- {
- double beta = 3*F_PI/2.0 - fAnglePi;
- rfXCorrection = -aSize.Width *rtl::math::sin( beta )/2.0
- +aSize.Height*rtl::math::cos( beta )/2.0;
- rfYCorrection = aSize.Height*rtl::math::sin( beta )
- +aSize.Width*rtl::math::cos( beta )/2.0;
- }
- else
- {
- double beta = 2*F_PI - fAnglePi;
- rfXCorrection = aSize.Height*rtl::math::sin( beta )/2.0
- +aSize.Width*rtl::math::cos( beta )/2.0;
- rfYCorrection = aSize.Width*rtl::math::sin( beta )/2.0;
- }
-}
-
-void lcl_correctPositionForRotation(
- const Reference< drawing::XShape >& xShape2DText
- , LabelAlignment eLabelAlignment
- , const double fRotationAngle )
-{
- if( !xShape2DText.is() )
- return;
-
- awt::Point aOldPos = xShape2DText->getPosition();
- awt::Size aSize = xShape2DText->getSize();
-
- double fYCorrection = 0.0;
- double fXCorrection = 0.0;
-
- double fAnglePositiveDegree = fRotationAngle;
- while(fAnglePositiveDegree<0.0)
- fAnglePositiveDegree+=360.0;
-
- switch(eLabelAlignment)
- {
- case LABEL_ALIGN_LEFT:
- case LABEL_ALIGN_LEFT_TOP:
- case LABEL_ALIGN_LEFT_BOTTOM:
- lcl_correctRotation_Left( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize );
- break;
- case LABEL_ALIGN_RIGHT:
- case LABEL_ALIGN_RIGHT_TOP:
- case LABEL_ALIGN_RIGHT_BOTTOM:
- lcl_correctRotation_Right( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize );
- break;
- case LABEL_ALIGN_TOP:
- lcl_correctRotation_Top( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize );
- break;
- case LABEL_ALIGN_BOTTOM:
- lcl_correctRotation_Bottom( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize );
- default: //LABEL_ALIGN_CENTER
- break;
- }
-
- xShape2DText->setPosition( awt::Point(
- static_cast<sal_Int32>(aOldPos.X + fXCorrection )
- , static_cast<sal_Int32>(aOldPos.Y + fYCorrection ) ) );
-}
-
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
@@ -299,9 +112,8 @@ Reference< drawing::XShape > createSingleLabel(
.createText( xTarget, aLabel, rPropNames, rPropValues, aATransformation );
//correctPositionForRotation
- lcl_correctPositionForRotation( xShape2DText
- , rAxisProperties.m_aLabelAlignment
- , rAxisLabelProperties.fRotationAngleDegree );
+ LabelPositionHelper::correctPositionForRotation( xShape2DText
+ , rAxisProperties.m_aLabelAlignment, rAxisLabelProperties.fRotationAngleDegree, false );
return xShape2DText;
}
@@ -1424,9 +1236,8 @@ void SAL_CALL VCartesianAxis::updatePositions()
}
//correctPositionForRotation
- lcl_correctPositionForRotation( xShape2DText
- , m_aAxisProperties.m_aLabelAlignment
- , m_aAxisLabelProperties.fRotationAngleDegree );
+ LabelPositionHelper::correctPositionForRotation( xShape2DText
+ , m_aAxisProperties.m_aLabelAlignment, m_aAxisLabelProperties.fRotationAngleDegree, false );
}
}
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 1f37ae7c3aea..71f753afa5c6 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -76,6 +76,8 @@
#include <basegfx/vector/b2dvector.hxx>
#include <com/sun/star/util/XCloneable.hpp>
+#include <svx/unoshape.hxx>
+
#include <functional>
//.............................................................................
@@ -116,13 +118,6 @@ VDataSeriesGroup::VDataSeriesGroup( VDataSeries* pSeries )
{
}
-VDataSeriesGroup::VDataSeriesGroup( const ::std::vector< VDataSeries* >& rSeriesVector )
- : m_aSeriesVector(rSeriesVector)
- , m_bMaxPointCountDirty(true)
- , m_nMaxPointCount(0)
- , m_aListOfCachedYValues()
-{
-}
VDataSeriesGroup::~VDataSeriesGroup()
{
}
@@ -465,11 +460,15 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
//prepare text
::rtl::OUStringBuffer aText;
::rtl::OUString aSeparator(sal_Unicode(' '));
+ double fRotationDegrees = 0.0;
try
{
uno::Reference< beans::XPropertySet > xPointProps( rDataSeries.getPropertiesOfPoint( nPointIndex ) );
if(xPointProps.is())
+ {
xPointProps->getPropertyValue( C2U( "LabelSeparator" ) ) >>= aSeparator;
+ xPointProps->getPropertyValue( C2U( "TextRotation" ) ) >>= fRotationDegrees;
+ }
}
catch( uno::Exception& e )
{
@@ -537,8 +536,21 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
createText( xTarget_, aText.makeStringAndClear()
, *pPropNames, *pPropValues, ShapeFactory::makeTransformation( aScreenPosition2D ) );
+ const awt::Point aUnrotatedTextPos( xTextShape->getPosition() );
+ if( fRotationDegrees != 0.0 )
+ {
+ const double fDegreesPi( fRotationDegrees * ( F_PI / -180.0 ) );
+ uno::Reference< beans::XPropertySet > xProp( xTextShape, uno::UNO_QUERY );
+ if( xProp.is() )
+ xProp->setPropertyValue( C2U( "Transformation" ), ShapeFactory::makeTransformation( aScreenPosition2D, fDegreesPi ) );
+ LabelPositionHelper::correctPositionForRotation( xTextShape, eAlignment, fRotationDegrees, true /*bRotateAroundCenter*/ );
+ }
+
if( xSymbol.is() && xTextShape.is() )
{
+ const awt::Point aOldTextPos( xTextShape->getPosition() );
+ awt::Point aNewTextPos( aOldTextPos );
+
awt::Size aSymbolSize( xSymbol->getSize() );
awt::Size aTextSize( xTextShape->getSize() );
@@ -550,7 +562,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
aSymbolSize.Width = nXDiff * 75/100;
aSymbolSize.Height = nYDiff * 75/100;
- awt::Point aSymbolPosition( xTextShape->getPosition() );
+ awt::Point aSymbolPosition( aUnrotatedTextPos );
aSymbolPosition.Y += (nYDiff * 25/200);
if(LABEL_ALIGN_LEFT==eAlignment
@@ -563,39 +575,21 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
|| LABEL_ALIGN_RIGHT_TOP==eAlignment
|| LABEL_ALIGN_RIGHT_BOTTOM==eAlignment )
{
- aScreenPosition2D.X += nXDiff;
+ aNewTextPos.X += nXDiff;
}
else if(LABEL_ALIGN_TOP==eAlignment
|| LABEL_ALIGN_BOTTOM==eAlignment
|| LABEL_ALIGN_CENTER==eAlignment )
{
aSymbolPosition.X -= nXDiff/2;
- aScreenPosition2D.X += nXDiff/2;
+ aNewTextPos.X += nXDiff/2;
}
xSymbol->setSize( aSymbolSize );
xSymbol->setPosition( aSymbolPosition );
- /*
- ::basegfx::B2DHomMatrix aM;
- //As autogrow is active the rectangle is automatically expanded to that side
- //to which the text is not adjusted.
- aM.scale( aSymbolSize.Width, aSymbolSize.Height );
- aM.translate( aSymbolPosition.X, aSymbolPosition.Y );
- uno::Any aATransformation( uno::makeAny( B2DHomMatrixToHomogenMatrix3(aM) ) );
-
- //set position
- uno::Reference< beans::XPropertySet > xSymbolProp( xSymbol, uno::UNO_QUERY );
- if( xSymbolProp.is() )
- {
- xSymbolProp->setPropertyValue( C2U( "Transformation" ), aATransformation );
- }
- */
-
//set position
- uno::Reference< beans::XPropertySet > xProp( xTextShape, uno::UNO_QUERY );
- if( xProp.is() )
- xProp->setPropertyValue( C2U( "Transformation" ), ShapeFactory::makeTransformation( aScreenPosition2D ) );
+ xTextShape->setPosition( aNewTextPos );
}
}
catch( uno::Exception& e )
diff --git a/chart2/source/view/inc/LabelPositionHelper.hxx b/chart2/source/view/inc/LabelPositionHelper.hxx
index 8b14869aa773..454be825305f 100644
--- a/chart2/source/view/inc/LabelPositionHelper.hxx
+++ b/chart2/source/view/inc/LabelPositionHelper.hxx
@@ -66,6 +66,9 @@ public:
, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xAxisModelProps
, const ::com::sun::star::awt::Size& rNewReferenceSize );
+ static void correctPositionForRotation( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape2DText
+ , LabelAlignment eLabelAlignment, const double fRotationAngle, bool bRotateAroundCenter );
+
private:
LabelPositionHelper();
diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx b/chart2/source/view/inc/PlottingPositionHelper.hxx
index 9c79e226b265..316ada70cac0 100644
--- a/chart2/source/view/inc/PlottingPositionHelper.hxx
+++ b/chart2/source/view/inc/PlottingPositionHelper.hxx
@@ -193,7 +193,9 @@ public:
using PlottingPositionHelper::transformScaledLogicToScene;
+#ifdef NOTYET
double getInnerLogicRadius() const;
+#endif
double getOuterLogicRadius() const;
inline bool isMathematicalOrientationAngle() const;
diff --git a/chart2/source/view/inc/VDataSeries.hxx b/chart2/source/view/inc/VDataSeries.hxx
index 05b27776fccc..61c0a15bc402 100644
--- a/chart2/source/view/inc/VDataSeries.hxx
+++ b/chart2/source/view/inc/VDataSeries.hxx
@@ -174,7 +174,6 @@ public:
sal_Int32 getMissingValueTreatment() const;
private: //methods
- VDataSeries();
::com::sun::star::chart2::DataPointLabel*
getDataPointLabel( sal_Int32 index ) const;
void adaptPointCache( sal_Int32 nNewPointIndex ) const;
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index b5ea7f7c2bfd..eeb561b13f02 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -99,7 +99,6 @@ class VDataSeriesGroup
public:
VDataSeriesGroup();
VDataSeriesGroup( VDataSeries* pSeries );
- VDataSeriesGroup( const ::std::vector< VDataSeries* >& rSeriesVector );
virtual ~VDataSeriesGroup();
void addSeries( VDataSeries* pSeries );//takes ownership of pSeries
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 8612006acf8d..fd08defe1869 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1694,11 +1694,11 @@ bool lcl_getPropertySwapXAndYAxis( const uno::Reference< XDiagram >& xDiagram )
}
-//static
-sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
+sal_Int32 lcl_getExplicitNumberFormatKeyForAxis(
const Reference< chart2::XAxis >& xAxis
, const Reference< chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
- , const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
+ , const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
+ , bool bSearchForParallelAxisIfNothingIsFound )
{
sal_Int32 nNumberFormatKey(0);
Reference< beans::XPropertySet > xProp( xAxis, uno::UNO_QUERY );
@@ -1725,13 +1725,15 @@ sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
typedef ::std::map< sal_Int32, sal_Int32 > tNumberformatFrequency;
tNumberformatFrequency aKeyMap;
+ bool bNumberFormatKeyFoundViaAttachedData = false;
+ sal_Int32 nAxisIndex = 0;
+ sal_Int32 nDimensionIndex = 1;
+
try
{
Reference< XChartTypeContainer > xCTCnt( xCorrespondingCoordinateSystem, uno::UNO_QUERY_THROW );
if( xCTCnt.is() )
{
- sal_Int32 nDimensionIndex = 1;
- sal_Int32 nAxisIndex = 0;
AxisHelper::getIndicesForAxis( xAxis, xCorrespondingCoordinateSystem, nDimensionIndex, nAxisIndex );
::rtl::OUString aRoleToMatch;
if( nDimensionIndex == 0 )
@@ -1801,16 +1803,39 @@ sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
if( (*aIt).second > nMaxFreq )
{
nNumberFormatKey = (*aIt).first;
+ bNumberFormatKeyFoundViaAttachedData = true;
nMaxFreq = (*aIt).second;
}
}
}
+
+ if( bSearchForParallelAxisIfNothingIsFound )
+ {
+ //no format is set to this axis and no data is set to this axis
+ //--> try to obtain the format from the parallel y-axis
+ if( !bNumberFormatKeyFoundViaAttachedData && nDimensionIndex == 1 )
+ {
+ sal_Int32 nParallelAxisIndex = (nAxisIndex==1) ?0 :1;
+ Reference< XAxis > xParallelAxis( AxisHelper::getAxis( 1, nParallelAxisIndex, xCorrespondingCoordinateSystem ) );
+ nNumberFormatKey = lcl_getExplicitNumberFormatKeyForAxis( xParallelAxis, xCorrespondingCoordinateSystem, xNumberFormatsSupplier, false );
+ }
+ }
}
}
return nNumberFormatKey;
}
//static
+sal_Int32 ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
+ const Reference< chart2::XAxis >& xAxis
+ , const Reference< chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
+ , const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
+{
+ return lcl_getExplicitNumberFormatKeyForAxis( xAxis, xCorrespondingCoordinateSystem, xNumberFormatsSupplier
+ , true /*bSearchForParallelAxisIfNothingIsFound*/ );
+}
+
+//static
sal_Int32 ExplicitValueProvider::getPercentNumberFormat( const Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
{
sal_Int32 nRet=-1;
diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx
index b5bf518770fa..e2784f488ab0 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -131,6 +131,361 @@ void LabelPositionHelper::doDynamicFontResize( tAnySequence& rPropValues
}
}
+namespace
+{
+
+void lcl_correctRotation_Left( double& rfXCorrection, double& rfYCorrection
+ , double fAnglePositiveDegree, const awt::Size& aSize, bool bRotateAroundCenter )
+{
+ //correct label positions for labels on a left side of something with a right centered alignment
+ double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
+ if( fAnglePositiveDegree==0.0 )
+ {
+ }
+ else if( fAnglePositiveDegree<= 90.0 )
+ {
+ rfXCorrection = -aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ if( bRotateAroundCenter )
+ rfYCorrection = -aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ }
+ else if( fAnglePositiveDegree<= 180.0 )
+ {
+ double beta = fAnglePi-F_PI/2.0;
+ rfXCorrection = -aSize.Width *rtl::math::sin( beta )
+ -aSize.Height *rtl::math::cos( beta )/2.0;
+ if( bRotateAroundCenter )
+ rfYCorrection = -aSize.Width *rtl::math::cos( beta )/2.0;
+ else
+ rfYCorrection = -aSize.Width *rtl::math::cos( beta );
+ }
+ else if( fAnglePositiveDegree<= 270.0 )
+ {
+ double beta = fAnglePi - F_PI;
+ rfXCorrection = -aSize.Width *rtl::math::cos( beta )
+ -aSize.Height*rtl::math::sin( beta )/2.0;
+ if( bRotateAroundCenter )
+ rfYCorrection = aSize.Width *rtl::math::sin( beta )/2.0;
+ else
+ rfYCorrection = aSize.Width *rtl::math::sin( beta );
+ }
+ else
+ {
+ double beta = 2*F_PI - fAnglePi;
+ rfXCorrection = -aSize.Height*rtl::math::sin( beta )/2.0;
+ if( bRotateAroundCenter )
+ rfYCorrection = aSize.Width*rtl::math::sin( beta )/2.0;
+ }
+}
+
+void lcl_correctRotation_Right( double& rfXCorrection, double& rfYCorrection
+ , double fAnglePositiveDegree, const awt::Size& aSize, bool bRotateAroundCenter )
+{
+ //correct label positions for labels on a right side of something with a left centered alignment
+ double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
+ if( fAnglePositiveDegree== 0.0 )
+ {
+ }
+ else if( fAnglePositiveDegree<= 90.0 )
+ {
+ rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ if( bRotateAroundCenter )
+ rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ }
+ else if( fAnglePositiveDegree<= 180.0 )
+ {
+ double beta = F_PI - fAnglePi;
+ rfXCorrection = aSize.Width *rtl::math::cos( beta )
+ + aSize.Height*rtl::math::sin( beta )/2.0;
+ if( bRotateAroundCenter )
+ rfYCorrection = aSize.Width *rtl::math::sin( beta )/2.0;
+ else
+ rfYCorrection = aSize.Width *rtl::math::sin( beta );
+ }
+ else if( fAnglePositiveDegree<= 270.0 )
+ {
+ double beta = 3*F_PI/2.0 - fAnglePi;
+ rfXCorrection = aSize.Width *rtl::math::sin( beta )
+ +aSize.Height*rtl::math::cos( beta )/2.0;
+ if( bRotateAroundCenter )
+ rfYCorrection = -aSize.Width *rtl::math::cos( beta )/2.0;
+ else
+ rfYCorrection = -aSize.Width *rtl::math::cos( beta );
+ }
+ else
+ {
+ rfXCorrection = aSize.Height*rtl::math::sin( 2*F_PI - fAnglePi )/2.0;
+ if( bRotateAroundCenter )
+ rfYCorrection = -aSize.Width*rtl::math::sin( 2*F_PI - fAnglePi )/2.0;
+ }
+}
+
+void lcl_correctRotation_Top( double& rfXCorrection, double& rfYCorrection
+ , double fAnglePositiveDegree, const awt::Size& aSize, bool bRotateAroundCenter )
+{
+ //correct label positions for labels on top of something with a bottom centered alignment
+ double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
+ if( fAnglePositiveDegree== 0.0 )
+ {
+ }
+ else if( fAnglePositiveDegree<= 90.0 )
+ {
+ rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ if( !bRotateAroundCenter )
+ rfXCorrection += aSize.Width*rtl::math::cos( fAnglePi )/2.0;
+ rfYCorrection = -aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ }
+ else if( fAnglePositiveDegree<= 180.0 )
+ {
+ double beta = fAnglePi - F_PI/2.0;
+ rfXCorrection = aSize.Height*rtl::math::cos( beta )/2.0;
+ if( !bRotateAroundCenter )
+ rfXCorrection -= aSize.Width*rtl::math::sin( beta )/2.0;
+ rfYCorrection = -aSize.Width*rtl::math::cos( beta )/2.0
+ - aSize.Height*rtl::math::sin( beta );
+ }
+ else if( fAnglePositiveDegree<= 270.0 )
+ {
+ double beta = fAnglePi - F_PI;
+ rfXCorrection = -aSize.Height *rtl::math::sin( beta )/2.0;
+ if( !bRotateAroundCenter )
+ rfXCorrection += aSize.Width *rtl::math::cos( beta )/2.0;
+ rfYCorrection = -aSize.Width *rtl::math::sin( beta )/2.0
+ -aSize.Height *rtl::math::cos( beta );
+ }
+ else
+ {
+ rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ if( !bRotateAroundCenter )
+ rfXCorrection -= aSize.Width*rtl::math::cos( fAnglePi )/2.0;
+ rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ }
+}
+
+void lcl_correctRotation_Bottom( double& rfXCorrection, double& rfYCorrection
+ , double fAnglePositiveDegree, const awt::Size& aSize, bool bRotateAroundCenter )
+{
+ //correct label positions for labels below something with a top centered alignment
+ double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
+ if( fAnglePositiveDegree==0.0 )
+ {
+ }
+ else if( fAnglePositiveDegree<= 90.0 )
+ {
+ rfXCorrection = -aSize.Height*rtl::math::sin( fAnglePi )/2.0;
+ if( !bRotateAroundCenter )
+ rfXCorrection -= aSize.Width *rtl::math::cos( fAnglePi )/2.0;
+ rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi )/2.0;
+ }
+ else if( fAnglePositiveDegree<= 180.0 )
+ {
+ double beta = fAnglePi-F_PI/2.0;
+ rfXCorrection = -aSize.Height*rtl::math::cos( beta )/2.0;
+ if( !bRotateAroundCenter )
+ rfXCorrection += aSize.Width *rtl::math::sin( beta )/2.0;
+ rfYCorrection = aSize.Width *rtl::math::cos( beta )/2.0
+ +aSize.Height*rtl::math::sin( beta );
+ }
+ else if( fAnglePositiveDegree<= 270.0 )
+ {
+ double beta = 3*F_PI/2.0 - fAnglePi;
+ rfXCorrection = aSize.Height*rtl::math::cos( beta )/2.0;
+ if( !bRotateAroundCenter )
+ rfXCorrection -= aSize.Width *rtl::math::sin( beta )/2.0;
+ rfYCorrection = aSize.Height*rtl::math::sin( beta )
+ +aSize.Width*rtl::math::cos( beta )/2.0;
+ }
+ else
+ {
+ double beta = 2*F_PI - fAnglePi;
+ rfXCorrection = aSize.Height*rtl::math::sin( beta )/2.0;
+ if( !bRotateAroundCenter )
+ rfXCorrection += aSize.Width*rtl::math::cos( beta )/2.0;
+ rfYCorrection = aSize.Width*rtl::math::sin( beta )/2.0;
+ }
+}
+
+void lcl_correctRotation_Left_Top( double& rfXCorrection, double& rfYCorrection
+ , double fAnglePositiveDegree, const awt::Size& aSize )
+{
+ //correct position for labels at the left top corner of something with a bottom right alignment
+ double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
+ if( fAnglePositiveDegree==0.0 )
+ {
+ }
+ else if( fAnglePositiveDegree<= 90.0 )
+ {
+ rfYCorrection = -aSize.Width*rtl::math::sin( fAnglePi );
+ }
+ else if( fAnglePositiveDegree<= 180.0 )
+ {
+ double beta = fAnglePi-F_PI/2.0;
+ rfXCorrection = -aSize.Width*rtl::math::sin( beta );
+ rfYCorrection = -aSize.Height*rtl::math::sin( beta )
+ -aSize.Width*rtl::math::cos( beta );
+ }
+ else if( fAnglePositiveDegree<= 270.0 )
+ {
+ double beta = 3*F_PI/2.0 - fAnglePi;
+ rfXCorrection = -aSize.Height*rtl::math::cos( beta )
+ -aSize.Width*rtl::math::sin( beta );
+ rfYCorrection = -aSize.Height*rtl::math::sin( beta );
+ }
+ else
+ {
+ rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi );
+ }
+}
+
+void lcl_correctRotation_Left_Bottom( double& rfXCorrection, double& rfYCorrection
+ , double fAnglePositiveDegree, const awt::Size& aSize )
+{
+ //correct position for labels at the left bottom corner of something with a top right alignment
+ double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
+ if( fAnglePositiveDegree==0.0 )
+ {
+ }
+ else if( fAnglePositiveDegree<= 90.0 )
+ {
+ rfXCorrection = -aSize.Height*rtl::math::sin( fAnglePi );
+ }
+ else if( fAnglePositiveDegree<= 180.0 )
+ {
+ double beta = fAnglePi-F_PI/2.0;
+ rfXCorrection = -aSize.Width*rtl::math::sin( beta )
+ -aSize.Height*rtl::math::cos( beta );;
+ rfYCorrection = aSize.Height*rtl::math::sin( beta );
+ }
+ else if( fAnglePositiveDegree<= 270.0 )
+ {
+ double beta = 3*F_PI/2.0 - fAnglePi;
+ rfXCorrection = -aSize.Width*rtl::math::sin( beta );
+ rfYCorrection = aSize.Width*rtl::math::cos( beta )
+ +aSize.Height*rtl::math::sin( beta );
+ }
+ else
+ {
+ rfYCorrection = -aSize.Width*rtl::math::sin( fAnglePi );
+ }
+}
+
+void lcl_correctRotation_Right_Top( double& rfXCorrection, double& rfYCorrection
+ , double fAnglePositiveDegree, const awt::Size& aSize )
+{
+ //correct position for labels at the right top corner of something with a bottom left alignment
+ double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
+ if( fAnglePositiveDegree==0.0 )
+ {
+ }
+ else if( fAnglePositiveDegree<= 90.0 )
+ {
+ rfXCorrection = aSize.Height*rtl::math::sin( fAnglePi );
+ }
+ else if( fAnglePositiveDegree<= 180.0 )
+ {
+ double beta = fAnglePi-F_PI/2.0;
+ rfXCorrection = aSize.Width*rtl::math::sin( beta )
+ +aSize.Height*rtl::math::cos( beta );
+ rfYCorrection = -aSize.Height*rtl::math::sin( beta );
+ }
+ else if( fAnglePositiveDegree<= 270.0 )
+ {
+ double beta = 3*F_PI/2.0 - fAnglePi;
+ rfXCorrection = aSize.Width*rtl::math::sin( beta );
+ rfYCorrection = -aSize.Width*rtl::math::cos( beta )
+ -aSize.Height*rtl::math::sin( beta );
+ }
+ else
+ {
+ rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi );
+ }
+}
+
+void lcl_correctRotation_Right_Bottom( double& rfXCorrection, double& rfYCorrection
+ , double fAnglePositiveDegree, const awt::Size& aSize )
+{
+ //correct position for labels at the right bottom corner of something with a top left alignment
+ double fAnglePi = fAnglePositiveDegree*F_PI/180.0;
+ if( fAnglePositiveDegree==0.0 )
+ {
+ }
+ else if( fAnglePositiveDegree<= 90.0 )
+ {
+ rfYCorrection = aSize.Width*rtl::math::sin( fAnglePi );
+ }
+ else if( fAnglePositiveDegree<= 180.0 )
+ {
+ double beta = fAnglePi-F_PI/2.0;
+ rfXCorrection = aSize.Width*rtl::math::sin( beta );
+ rfYCorrection = aSize.Height*rtl::math::sin( beta )
+ +aSize.Width*rtl::math::cos( beta );
+ }
+ else if( fAnglePositiveDegree<= 270.0 )
+ {
+ double beta = 3*F_PI/2.0 - fAnglePi;
+ rfXCorrection = aSize.Height*rtl::math::cos( beta )
+ +aSize.Width*rtl::math::sin( beta );
+ rfYCorrection = aSize.Height*rtl::math::sin( beta );
+ }
+ else
+ {
+ rfXCorrection = -aSize.Height*rtl::math::sin( fAnglePi );
+ }
+}
+
+}//end anonymous namespace
+
+//static
+void LabelPositionHelper::correctPositionForRotation( const uno::Reference< drawing::XShape >& xShape2DText
+ , LabelAlignment eLabelAlignment, const double fRotationAngle, bool bRotateAroundCenter )
+{
+ if( !xShape2DText.is() )
+ return;
+
+ awt::Point aOldPos = xShape2DText->getPosition();
+ awt::Size aSize = xShape2DText->getSize();
+
+ double fYCorrection = 0.0;
+ double fXCorrection = 0.0;
+
+ double fAnglePositiveDegree = fRotationAngle;
+ while(fAnglePositiveDegree<0.0)
+ fAnglePositiveDegree+=360.0;
+
+ switch(eLabelAlignment)
+ {
+ case LABEL_ALIGN_LEFT:
+ lcl_correctRotation_Left( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize, bRotateAroundCenter );
+ break;
+ case LABEL_ALIGN_RIGHT:
+ lcl_correctRotation_Right( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize, bRotateAroundCenter );
+ break;
+ case LABEL_ALIGN_TOP:
+ lcl_correctRotation_Top( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize, bRotateAroundCenter );
+ break;
+ case LABEL_ALIGN_BOTTOM:
+ lcl_correctRotation_Bottom( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize, bRotateAroundCenter );
+ break;
+ case LABEL_ALIGN_LEFT_TOP:
+ lcl_correctRotation_Left_Top( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize );
+ break;
+ case LABEL_ALIGN_LEFT_BOTTOM:
+ lcl_correctRotation_Left_Bottom( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize );
+ break;
+ case LABEL_ALIGN_RIGHT_TOP:
+ lcl_correctRotation_Right_Top( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize );
+ break;
+ case LABEL_ALIGN_RIGHT_BOTTOM:
+ lcl_correctRotation_Right_Bottom( fXCorrection, fYCorrection, fAnglePositiveDegree, aSize );
+ break;
+ default: //LABEL_ALIGN_CENTER
+ break;
+ }
+
+ xShape2DText->setPosition( awt::Point(
+ static_cast<sal_Int32>(aOldPos.X + fXCorrection )
+ , static_cast<sal_Int32>(aOldPos.Y + fYCorrection ) ) );
+}
+
//.............................................................................
} //namespace chart
//.............................................................................
diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx
index c975519d9628..2d58a25f3808 100644
--- a/chart2/source/view/main/PlottingPositionHelper.cxx
+++ b/chart2/source/view/main/PlottingPositionHelper.cxx
@@ -612,6 +612,7 @@ drawing::Position3D PolarPlottingPositionHelper::transformAngleRadiusToScene( do
return transformUnitCircleToScene( fUnitAngleDegree, fUnitRadius, fLogicZ, bDoScaling );
}
+#ifdef NOTYET
double PolarPlottingPositionHelper::getInnerLogicRadius() const
{
const ExplicitScaleData& rScale = m_bSwapXAndY ? m_aScales[0] : m_aScales[1];
@@ -620,6 +621,7 @@ double PolarPlottingPositionHelper::getInnerLogicRadius() const
else
return rScale.Maximum;
}
+#endif
double PolarPlottingPositionHelper::getOuterLogicRadius() const
{
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 53a1b3673c81..04d95ce249a6 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -250,6 +250,7 @@ const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProper
// ( C2U( "RubyAdjust" ), C2U("RubyAdjust") )
// ( C2U( "RubyCharStyleName" ), C2U("RubyStyleName") )
// ( C2U( "RubyIsAbove" ), C2U("RubyIsAbove") )
+ ( C2U( "ParaIsCharacterDistance" ), C2U("ParaIsCharacterDistance") )
;
return m_aShapePropertyMapForCharacterProperties;
}
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index f178aa41f492..f3e8f4a19739 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -38,7 +38,7 @@
#include "ChartTypeHelper.hxx"
#include "ContainerHelper.hxx"
#include "DataSeriesHelper.hxx"
-#include "MeanValueRegressionCurveCalculator.hxx"
+#include "RegressionCurveHelper.hxx"
#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart2/Symbol.hpp>
@@ -142,11 +142,6 @@ void lcl_clearIfTextIsContained( VDataSequence& rData, const uno::Reference<data
}
-VDataSeries::VDataSeries()
-{
- DBG_ERROR("not implemented");
-}
-
VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
: m_nPolygonIndex(0)
, m_fLogicMinX(0.0)
@@ -624,7 +619,7 @@ double VDataSeries::getYMeanValue() const
{
if( ::rtl::math::isNan( m_fYMeanValue ) )
{
- uno::Reference< XRegressionCurveCalculator > xCalculator( new MeanValueRegressionCurveCalculator() );
+ uno::Reference< XRegressionCurveCalculator > xCalculator( RegressionCurveHelper::createRegressionCurveCalculatorByServiceName( C2U("com.sun.star.chart2.MeanValueRegressionCurve") ) );
uno::Sequence< double > aXValuesDummy;
xCalculator->recalculateRegression( aXValuesDummy, getAllY() );
double fXDummy = 1.0;
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index b65481828c3d..60479659e957 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -36,6 +36,11 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
+#include <com/sun/star/chart/ChartAxisPosition.hpp>
+#include <com/sun/star/chart/DataLabelPlacement.hpp>
+#include <com/sun/star/chart/ErrorBarStyle.hpp>
+#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
@@ -51,9 +56,6 @@
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart2/StackingDirection.hpp>
#include <com/sun/star/chart2/TickmarkStyle.hpp>
-#include <com/sun/star/chart/DataLabelPlacement.hpp>
-#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <vcl/outdev.hxx>
#include <svx/escherex.hxx>
@@ -61,13 +63,13 @@
#include "document.hxx"
#include "rangelst.hxx"
#include "rangeutl.hxx"
+#include "compiler.hxx"
+#include "tokenarray.hxx"
+#include "token.hxx"
#include "xeformula.hxx"
#include "xehelper.hxx"
#include "xepage.hxx"
#include "xestyle.hxx"
-#include "compiler.hxx"
-#include "tokenarray.hxx"
-#include "token.hxx"
using ::rtl::OUString;
using ::com::sun::star::uno::Any;
@@ -103,6 +105,9 @@ using ::com::sun::star::chart2::data::XDataSource;
using ::com::sun::star::chart2::data::XLabeledDataSequence;
using ::com::sun::star::chart2::data::XDataSequence;
+using ::formula::FormulaGrammar;
+using ::formula::FormulaToken;
+
// Helpers ====================================================================
namespace {
@@ -129,17 +134,25 @@ void lclSaveRecord( XclExpStream& rStrm, XclExpRecordRef xRec, sal_uInt16 nRecId
}
}
+void lclWriteChFrBlockRecord( XclExpStream& rStrm, const XclChFrBlock& rFrBlock, bool bBegin )
+{
+ sal_uInt16 nRecId = bBegin ? EXC_ID_CHFRBLOCKBEGIN : EXC_ID_CHFRBLOCKEND;
+ rStrm.StartRecord( nRecId, 12 );
+ rStrm << nRecId << EXC_FUTUREREC_EMPTYFLAGS << rFrBlock.mnType << rFrBlock.mnContext << rFrBlock.mnValue1 << rFrBlock.mnValue2;
+ rStrm.EndRecord();
+}
+
template< typename Type >
inline bool lclIsAutoAnyOrGetValue( Type& rValue, const Any& rAny )
{
return !rAny.hasValue() || !(rAny >>= rValue);
}
-bool lclIsAutoAnyOrGetScaledValue( double& rfValue, const Any& rAny, Reference< XScaling > xScaling )
+bool lclIsAutoAnyOrGetScaledValue( double& rfValue, const Any& rAny, bool bLogScale )
{
bool bIsAuto = lclIsAutoAnyOrGetValue( rfValue, rAny );
- if( !bIsAuto && xScaling.is() )
- rfValue = xScaling->doScaling( rfValue );
+ if( !bIsAuto && bLogScale )
+ rfValue = log( rfValue ) / log( 10.0 );
return bIsAuto;
}
@@ -156,15 +169,74 @@ public:
/** Returns a reference to the parent chart data object. */
inline XclExpChChart& GetChartData() const { return *mpChartData; }
+ /** Registers a new future record level. */
+ void RegisterFutureRecBlock( const XclChFrBlock& rFrBlock );
+ /** Initializes the current future record level (writes all unwritten CHFRBLOCKBEGIN records). */
+ void InitializeFutureRecBlock( XclExpStream& rStrm );
+ /** Finalizes the current future record level (writes CHFRBLOCKEND record if needed). */
+ void FinalizeFutureRecBlock( XclExpStream& rStrm );
+
private:
+ typedef ::std::vector< XclChFrBlock > XclChFrBlockVector;
+
XclExpChChart* mpChartData; /// Pointer to the chart data object.
+ XclChFrBlockVector maWrittenFrBlocks; /// Stack of future record levels already written out.
+ XclChFrBlockVector maUnwrittenFrBlocks; /// Stack of future record levels not yet written out.
};
+// ----------------------------------------------------------------------------
+
XclExpChRootData::XclExpChRootData( XclExpChChart* pChartData ) :
mpChartData( pChartData )
{
}
+void XclExpChRootData::RegisterFutureRecBlock( const XclChFrBlock& rFrBlock )
+{
+ maUnwrittenFrBlocks.push_back( rFrBlock );
+}
+
+void XclExpChRootData::InitializeFutureRecBlock( XclExpStream& rStrm )
+{
+ // first call from a future record writes all missing CHFRBLOCKBEGIN records
+ if( !maUnwrittenFrBlocks.empty() )
+ {
+ // write the leading CHFRINFO record
+ if( maWrittenFrBlocks.empty() )
+ {
+ rStrm.StartRecord( EXC_ID_CHFRINFO, 20 );
+ rStrm << EXC_ID_CHFRINFO << EXC_FUTUREREC_EMPTYFLAGS << EXC_CHFRINFO_EXCELXP2003 << EXC_CHFRINFO_EXCELXP2003 << sal_uInt16( 3 );
+ rStrm << sal_uInt16( 0x0850 ) << sal_uInt16( 0x085A ) << sal_uInt16( 0x0861 ) << sal_uInt16( 0x0861 ) << sal_uInt16( 0x086A ) << sal_uInt16( 0x086B );
+ rStrm.EndRecord();
+ }
+ // write all unwritten CHFRBLOCKBEGIN records
+ for( XclChFrBlockVector::const_iterator aIt = maUnwrittenFrBlocks.begin(), aEnd = maUnwrittenFrBlocks.end(); aIt != aEnd; ++aIt )
+ {
+ DBG_ASSERT( aIt->mnType != EXC_CHFRBLOCK_TYPE_UNKNOWN, "XclExpChRootData::InitializeFutureRecBlock - unknown future record block type" );
+ lclWriteChFrBlockRecord( rStrm, *aIt, true );
+ }
+ // move all record infos to vector of written blocks
+ maWrittenFrBlocks.insert( maWrittenFrBlocks.end(), maUnwrittenFrBlocks.begin(), maUnwrittenFrBlocks.end() );
+ maUnwrittenFrBlocks.clear();
+ }
+}
+
+void XclExpChRootData::FinalizeFutureRecBlock( XclExpStream& rStrm )
+{
+ DBG_ASSERT( !maUnwrittenFrBlocks.empty() || !maWrittenFrBlocks.empty(), "XclExpChRootData::FinalizeFutureRecBlock - no future record level found" );
+ if( !maUnwrittenFrBlocks.empty() )
+ {
+ // no future record has been written, just forget the topmost level
+ maUnwrittenFrBlocks.pop_back();
+ }
+ else if( !maWrittenFrBlocks.empty() )
+ {
+ // write the CHFRBLOCKEND record for the topmost block and delete it
+ lclWriteChFrBlockRecord( rStrm, maWrittenFrBlocks.back(), false );
+ maWrittenFrBlocks.pop_back();
+ }
+}
+
// ----------------------------------------------------------------------------
XclExpChRoot::XclExpChRoot( const XclExpRoot& rRoot, XclExpChChart* pChartData ) :
@@ -255,10 +327,28 @@ sal_uInt16 XclExpChRoot::ConvertPieRotation( const ScfPropertySet& rPropSet )
return static_cast< sal_uInt16 >( (450 - (nApiRot % 360)) % 360 );
}
+void XclExpChRoot::RegisterFutureRecBlock( const XclChFrBlock& rFrBlock )
+{
+ mxChData->RegisterFutureRecBlock( rFrBlock );
+}
+
+void XclExpChRoot::InitializeFutureRecBlock( XclExpStream& rStrm )
+{
+ mxChData->InitializeFutureRecBlock( rStrm );
+}
+
+void XclExpChRoot::FinalizeFutureRecBlock( XclExpStream& rStrm )
+{
+ mxChData->FinalizeFutureRecBlock( rStrm );
+}
+
// ----------------------------------------------------------------------------
-XclExpChGroupBase::XclExpChGroupBase( sal_uInt16 nRecId, sal_Size nRecSize ) :
- XclExpRecord( nRecId, nRecSize )
+XclExpChGroupBase::XclExpChGroupBase( const XclExpChRoot& rRoot,
+ sal_uInt16 nFrType, sal_uInt16 nRecId, sal_Size nRecSize ) :
+ XclExpRecord( nRecId, nRecSize ),
+ XclExpChRoot( rRoot ),
+ maFrBlock( nFrType )
{
}
@@ -273,10 +363,14 @@ void XclExpChGroupBase::Save( XclExpStream& rStrm )
// group records
if( HasSubRecords() )
{
+ // register the future record context corresponding to this record group
+ RegisterFutureRecBlock( maFrBlock );
// CHBEGIN record
XclExpEmptyRecord( EXC_ID_CHBEGIN ).Save( rStrm );
// embedded records
WriteSubRecords( rStrm );
+ // finalize the future records, must be done before the closing CHEND
+ FinalizeFutureRecBlock( rStrm );
// CHEND record
XclExpEmptyRecord( EXC_ID_CHEND ).Save( rStrm );
}
@@ -287,6 +381,28 @@ bool XclExpChGroupBase::HasSubRecords() const
return true;
}
+void XclExpChGroupBase::SetFutureRecordContext( sal_uInt16 nFrContext, sal_uInt16 nFrValue1, sal_uInt16 nFrValue2 )
+{
+ maFrBlock.mnContext = nFrContext;
+ maFrBlock.mnValue1 = nFrValue1;
+ maFrBlock.mnValue2 = nFrValue2;
+}
+
+// ----------------------------------------------------------------------------
+
+XclExpChFutureRecordBase::XclExpChFutureRecordBase( const XclExpChRoot& rRoot,
+ XclFutureRecType eRecType, sal_uInt16 nRecId, sal_Size nRecSize ) :
+ XclExpFutureRecord( eRecType, nRecId, nRecSize ),
+ XclExpChRoot( rRoot )
+{
+}
+
+void XclExpChFutureRecordBase::Save( XclExpStream& rStrm )
+{
+ InitializeFutureRecBlock( rStrm );
+ XclExpFutureRecord::Save( rStrm );
+}
+
// Frame formatting ===========================================================
XclExpChLineFormat::XclExpChLineFormat( const XclExpChRoot& rRoot ) :
@@ -451,22 +567,20 @@ void XclExpChAreaFormat::WriteBody( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
XclExpChEscherFormat::XclExpChEscherFormat( const XclExpChRoot& rRoot ) :
- XclExpChGroupBase( EXC_ID_CHESCHERFORMAT ),
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_UNKNOWN, EXC_ID_CHESCHERFORMAT ),
mnColor1Id( XclExpPalette::GetColorIdFromIndex( EXC_COLOR_CHWINDOWBACK ) ),
mnColor2Id( XclExpPalette::GetColorIdFromIndex( EXC_COLOR_CHWINDOWBACK ) )
{
- DBG_ASSERT_BIFF( rRoot.GetBiff() == EXC_BIFF8 );
- (void)rRoot;
+ DBG_ASSERT_BIFF( GetBiff() == EXC_BIFF8 );
}
-void XclExpChEscherFormat::Convert( const XclExpChRoot& rRoot,
- const ScfPropertySet& rPropSet, XclChObjectType eObjType )
+void XclExpChEscherFormat::Convert( const ScfPropertySet& rPropSet, XclChObjectType eObjType )
{
- const XclChFormatInfo& rFmtInfo = rRoot.GetFormatInfo( eObjType );
- rRoot.ConvertEscherFormat( maData, maPicFmt, rPropSet, rFmtInfo.mePropMode );
+ const XclChFormatInfo& rFmtInfo = GetFormatInfo( eObjType );
+ ConvertEscherFormat( maData, maPicFmt, rPropSet, rFmtInfo.mePropMode );
// register colors in palette
- mnColor1Id = RegisterColor( rRoot, ESCHER_Prop_fillColor );
- mnColor2Id = RegisterColor( rRoot, ESCHER_Prop_fillBackColor );
+ mnColor1Id = RegisterColor( ESCHER_Prop_fillColor );
+ mnColor2Id = RegisterColor( ESCHER_Prop_fillBackColor );
}
bool XclExpChEscherFormat::IsValid() const
@@ -479,7 +593,7 @@ void XclExpChEscherFormat::Save( XclExpStream& rStrm )
if( maData.mxEscherSet.is() )
{
// replace RGB colors with palette indexes in the Escher container
- const XclExpPalette& rPal = rStrm.GetRoot().GetPalette();
+ const XclExpPalette& rPal = GetPalette();
maData.mxEscherSet->AddOpt( ESCHER_Prop_fillColor, 0x08000000 | rPal.GetColorIndex( mnColor1Id ) );
maData.mxEscherSet->AddOpt( ESCHER_Prop_fillBackColor, 0x08000000 | rPal.GetColorIndex( mnColor2Id ) );
@@ -501,7 +615,7 @@ void XclExpChEscherFormat::WriteSubRecords( XclExpStream& rStrm )
rStrm.EndRecord();
}
-sal_uInt32 XclExpChEscherFormat::RegisterColor( const XclExpChRoot& rRoot, sal_uInt16 nPropId )
+sal_uInt32 XclExpChEscherFormat::RegisterColor( sal_uInt16 nPropId )
{
sal_uInt32 nBGRValue;
if( maData.mxEscherSet.is() && maData.mxEscherSet->GetOpt( nPropId, nBGRValue ) )
@@ -511,7 +625,7 @@ sal_uInt32 XclExpChEscherFormat::RegisterColor( const XclExpChRoot& rRoot, sal_u
COLORDATA_BLUE( nBGRValue ),
COLORDATA_GREEN( nBGRValue ),
COLORDATA_RED( nBGRValue ) ) );
- return rRoot.GetPalette().InsertColor( aColor, EXC_COLOR_CHARTAREA );
+ return GetPalette().InsertColor( aColor, EXC_COLOR_CHARTAREA );
}
return XclExpPalette::GetColorIdFromIndex( EXC_COLOR_CHWINDOWBACK );
}
@@ -550,7 +664,7 @@ void XclExpChFrameBase::ConvertFrameBase( const XclExpChRoot& rRoot,
if( (rRoot.GetBiff() == EXC_BIFF8) && bComplexFill )
{
mxEscherFmt.reset( new XclExpChEscherFormat( rRoot ) );
- mxEscherFmt->Convert( rRoot, rPropSet, eObjType );
+ mxEscherFmt->Convert( rPropSet, eObjType );
if( mxEscherFmt->IsValid() )
mxAreaFmt->SetAuto( false );
else
@@ -591,8 +705,7 @@ void XclExpChFrameBase::WriteFrameRecords( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
XclExpChFrame::XclExpChFrame( const XclExpChRoot& rRoot, XclChObjectType eObjType ) :
- XclExpChGroupBase( EXC_ID_CHFRAME, 4 ),
- XclExpChRoot( rRoot ),
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_FRAME, EXC_ID_CHFRAME, 4 ),
meObjType( eObjType )
{
}
@@ -649,43 +762,41 @@ XclExpChFrameRef lclCreateFrame( const XclExpChRoot& rRoot,
return xFrame;
}
-void lclAddDoubleRefData(ScTokenArray& rArray, const ::formula::FormulaToken& rToken,
- SCsTAB nTab1, SCsTAB nTab2, SCsCOL nCol1, SCsCOL nCol2, SCsROW nRow1, SCsROW nRow2)
-{
- using namespace ::formula;
-
- StackVar eType = rToken.GetType();
- bool bExternal = (eType == svExternalDoubleRef);
- DBG_ASSERT(eType == svDoubleRef || eType == svExternalDoubleRef, "not a double ref token!");
-
- ScComplexRefData aData;
+} // namespace
- aData.InitFlags();
- aData.Ref1.SetFlag3D(true);
- aData.Ref1.SetTabRel(false);
- aData.Ref1.SetColRel(false);
- aData.Ref1.SetRowRel(false);
- aData.Ref2.SetFlag3D(false);
- aData.Ref2.SetTabRel(false);
- aData.Ref2.SetColRel(false);
- aData.Ref2.SetRowRel(false);
+// Source links ===============================================================
- aData.Ref1.nTab = nTab1;
- aData.Ref1.nCol = nCol1;
- aData.Ref1.nRow = nRow1;
- aData.Ref2.nTab = nTab2;
- aData.Ref2.nCol = nCol2;
- aData.Ref2.nRow = nRow2;
+namespace {
- if (bExternal)
- rArray.AddExternalDoubleReference(rToken.GetIndex(), rToken.GetString(), aData);
+void lclAddDoubleRefData(
+ ScTokenArray& orArray, const FormulaToken& rToken,
+ SCsTAB nScTab1, SCsCOL nScCol1, SCsROW nScRow1,
+ SCsTAB nScTab2, SCsCOL nScCol2, SCsROW nScRow2 )
+{
+ ScComplexRefData aComplexRef;
+ aComplexRef.InitFlags();
+ aComplexRef.Ref1.SetFlag3D( true );
+ aComplexRef.Ref1.nTab = nScTab1;
+ aComplexRef.Ref1.nCol = nScCol1;
+ aComplexRef.Ref1.nRow = nScRow1;
+ aComplexRef.Ref2.nTab = nScTab2;
+ aComplexRef.Ref2.nCol = nScCol2;
+ aComplexRef.Ref2.nRow = nScRow2;
+
+ if( orArray.GetLen() > 0 )
+ orArray.AddOpCode( ocUnion );
+
+ DBG_ASSERT( (rToken.GetType() == ::formula::svDoubleRef) || (rToken.GetType() == ::formula::svExternalDoubleRef),
+ "lclAddDoubleRefData - double reference token expected");
+ if( rToken.GetType() == ::formula::svExternalDoubleRef )
+ orArray.AddExternalDoubleReference( rToken.GetIndex(), rToken.GetString(), aComplexRef );
else
- rArray.AddDoubleReference(aData);
+ orArray.AddDoubleReference( aComplexRef );
}
} // namespace
-// Source links ===============================================================
+// ----------------------------------------------------------------------------
XclExpChSourceLink::XclExpChSourceLink( const XclExpChRoot& rRoot, sal_uInt8 nDestType ) :
XclExpRecord( EXC_ID_CHSOURCELINK ),
@@ -697,80 +808,67 @@ XclExpChSourceLink::XclExpChSourceLink( const XclExpChRoot& rRoot, sal_uInt8 nDe
sal_uInt16 XclExpChSourceLink::ConvertDataSequence( Reference< XDataSequence > xDataSeq, bool bSplitToColumns, sal_uInt16 nDefCount )
{
- using namespace ::formula;
-
mxLinkFmla.reset();
maData.mnLinkType = EXC_CHSRCLINK_DEFAULT;
- sal_uInt16 nValueCount = nDefCount;
- if (!xDataSeq.is())
- return nValueCount;
+ if( !xDataSeq.is() )
+ return nDefCount;
- // Compile the range representation string into token array.
+ // compile the range representation string into token array
OUString aRangeRepr = xDataSeq->getSourceRangeRepresentation();
- ScRangeList aScRanges;
- ScCompiler aComp(GetDocPtr(), ScAddress());
- aComp.SetGrammar(FormulaGrammar::GRAM_ENGLISH);
- ScTokenArray* pArray = aComp.CompileString(aRangeRepr);
- if (!pArray)
- return nValueCount;
+ ScCompiler aComp( GetDocPtr(), ScAddress() );
+ aComp.SetGrammar( FormulaGrammar::GRAM_ENGLISH );
+ ScTokenArray* pArray = aComp.CompileString( aRangeRepr );
+ if( !pArray )
+ return nDefCount;
ScTokenArray aArray;
+ sal_uInt32 nValueCount = 0;
pArray->Reset();
- bool bFirst = true;
- for (const FormulaToken* p = pArray->First(); p; p = pArray->Next())
+ for( const FormulaToken* pToken = pArray->First(); pToken; pToken = pArray->Next() )
{
- StackVar eType = p->GetType();
- if (eType == svSingleRef || eType == svExternalSingleRef)
+ switch( pToken->GetType() )
{
- // For a single ref token, just add it to the new token array as is.
- if (bFirst)
- bFirst = false;
- else
- aArray.AddOpCode(ocUnion);
-
- aArray.AddToken(*p);
- }
-
- if (eType != svDoubleRef && eType != svExternalDoubleRef)
- continue;
+ case ::formula::svSingleRef:
+ case ::formula::svExternalSingleRef:
+ // for a single ref token, just add it to the new token array as is
+ if( aArray.GetLen() > 0 )
+ aArray.AddOpCode( ocUnion );
+ aArray.AddToken( *pToken );
+ ++nValueCount;
+ break;
- // split 3-dimensional ranges into single sheets.
- const ScComplexRefData& r = static_cast<const ScToken*>(p)->GetDoubleRef();
- const ScSingleRefData& s = r.Ref1;
- const ScSingleRefData& e = r.Ref2;
- for (SCsTAB nTab = s.nTab; nTab <= e.nTab; ++nTab)
- {
- if (bSplitToColumns && (s.nRow != e.nRow))
+ case ::formula::svDoubleRef:
+ case ::formula::svExternalDoubleRef:
{
- // split 2-dimensional ranges into single columns.
- for (SCsCOL nCol = s.nCol; nCol <= e.nCol; ++nCol)
+ // split 3-dimensional ranges into single sheets
+ const ScComplexRefData& rComplexRef = static_cast< const ScToken* >( pToken )->GetDoubleRef();
+ const ScSingleRefData& rRef1 = rComplexRef.Ref1;
+ const ScSingleRefData& rRef2 = rComplexRef.Ref2;
+ for( SCsTAB nScTab = rRef1.nTab; nScTab <= rRef2.nTab; ++nScTab )
{
- if (bFirst)
- bFirst = false;
+ // split 2-dimensional ranges into single columns
+ if( bSplitToColumns && (rRef1.nCol < rRef2.nCol) && (rRef1.nRow < rRef2.nRow) )
+ for( SCsCOL nScCol = rRef1.nCol; nScCol <= rRef2.nCol; ++nScCol )
+ lclAddDoubleRefData( aArray, *pToken, nScTab, nScCol, rRef1.nRow, nScTab, nScCol, rRef2.nRow );
else
- aArray.AddOpCode(ocUnion);
-
- lclAddDoubleRefData(aArray, *p, nTab, nTab, nCol, nCol, s.nRow, e.nRow);
+ lclAddDoubleRefData( aArray, *pToken, nScTab, rRef1.nCol, rRef1.nRow, nScTab, rRef2.nCol, rRef2.nRow );
}
+ sal_uInt32 nTabs = static_cast< sal_uInt32 >( rRef2.nTab - rRef1.nTab + 1 );
+ sal_uInt32 nCols = static_cast< sal_uInt32 >( rRef2.nCol - rRef1.nCol + 1 );
+ sal_uInt32 nRows = static_cast< sal_uInt32 >( rRef2.nRow - rRef1.nRow + 1 );
+ nValueCount += nCols * nRows * nTabs;
}
- else
- {
- if (bFirst)
- bFirst = false;
- else
- aArray.AddOpCode(ocUnion);
+ break;
- lclAddDoubleRefData(aArray, *p, nTab, nTab, s.nCol, e.nCol, s.nRow, e.nRow);
- }
+ default:;
}
}
- const ScAddress aBaseCell(0,0,0);
- mxLinkFmla = GetFormulaCompiler().CreateFormula(EXC_FMLATYPE_CHART, aArray, &aBaseCell);
+ const ScAddress aBaseCell;
+ mxLinkFmla = GetFormulaCompiler().CreateFormula( EXC_FMLATYPE_CHART, aArray, &aBaseCell );
maData.mnLinkType = EXC_CHSRCLINK_WORKSHEET;
- nValueCount = ulimit_cast< sal_uInt16 >( aScRanges.GetCellCount(), EXC_CHDATAFORMAT_MAXPOINTCOUNT );
- return nValueCount;
+ return ulimit_cast< sal_uInt16 >( nValueCount, EXC_CHDATAFORMAT_MAXPOINTCOUNT );
}
sal_uInt16 XclExpChSourceLink::ConvertStringSequence( const Sequence< Reference< XFormattedString > >& rStringSeq )
@@ -918,6 +1016,35 @@ void XclExpChObjectLink::WriteBody( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
+XclExpChFrLabelProps::XclExpChFrLabelProps( const XclExpChRoot& rRoot ) :
+ XclExpChFutureRecordBase( rRoot, EXC_FUTUREREC_UNUSEDREF, EXC_ID_CHFRLABELPROPS, 4 )
+{
+}
+
+void XclExpChFrLabelProps::Convert( const ScfPropertySet& rPropSet, bool bShowSeries,
+ bool bShowCateg, bool bShowValue, bool bShowPercent, bool bShowBubble )
+{
+ // label value flags
+ ::set_flag( maData.mnFlags, EXC_CHFRLABELPROPS_SHOWSERIES, bShowSeries );
+ ::set_flag( maData.mnFlags, EXC_CHFRLABELPROPS_SHOWCATEG, bShowCateg );
+ ::set_flag( maData.mnFlags, EXC_CHFRLABELPROPS_SHOWVALUE, bShowValue );
+ ::set_flag( maData.mnFlags, EXC_CHFRLABELPROPS_SHOWPERCENT, bShowPercent );
+ ::set_flag( maData.mnFlags, EXC_CHFRLABELPROPS_SHOWBUBBLE, bShowBubble );
+
+ // label value separator
+ rPropSet.GetStringProperty( maData.maSeparator, EXC_CHPROP_LABELSEPARATOR );
+ if( maData.maSeparator.Len() == 0 )
+ maData.maSeparator = String( sal_Unicode( ' ' ) );
+}
+
+void XclExpChFrLabelProps::WriteBody( XclExpStream& rStrm )
+{
+ XclExpString aXclSep( maData.maSeparator, EXC_STR_FORCEUNICODE | EXC_STR_SMARTFLAGS );
+ rStrm << maData.mnFlags << aXclSep;
+}
+
+// ----------------------------------------------------------------------------
+
XclExpChFontBase::~XclExpChFontBase()
{
}
@@ -937,17 +1064,16 @@ void XclExpChFontBase::ConvertFontBase( const XclExpChRoot& rRoot, const ScfProp
}
void XclExpChFontBase::ConvertRotationBase(
- const XclExpChRoot& rRoot, const ScfPropertySet& rPropSet )
+ const XclExpChRoot& rRoot, const ScfPropertySet& rPropSet, bool bSupportsStacked )
{
- sal_uInt16 nRotation = rRoot.GetChartPropSetHelper().ReadRotationProperties( rPropSet );
+ sal_uInt16 nRotation = rRoot.GetChartPropSetHelper().ReadRotationProperties( rPropSet, bSupportsStacked );
SetRotation( nRotation );
}
// ----------------------------------------------------------------------------
XclExpChText::XclExpChText( const XclExpChRoot& rRoot ) :
- XclExpChGroupBase( EXC_ID_CHTEXT, (rRoot.GetBiff() == EXC_BIFF8) ? 32 : 26 ),
- XclExpChRoot( rRoot ),
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_TEXT, EXC_ID_CHTEXT, (rRoot.GetBiff() == EXC_BIFF8) ? 32 : 26 ),
mnTextColorId( XclExpPalette::GetColorIdFromIndex( EXC_COLOR_CHWINDOWTEXT ) )
{
}
@@ -968,6 +1094,14 @@ void XclExpChText::SetRotation( sal_uInt16 nRotation )
void XclExpChText::ConvertTitle( Reference< XTitle > xTitle, sal_uInt16 nTarget )
{
+ switch( nTarget )
+ {
+ case EXC_CHOBJLINK_TITLE: SetFutureRecordContext( EXC_CHFRBLOCK_TEXT_TITLE ); break;
+ case EXC_CHOBJLINK_YAXIS: SetFutureRecordContext( EXC_CHFRBLOCK_TEXT_AXISTITLE, 1 ); break;
+ case EXC_CHOBJLINK_XAXIS: SetFutureRecordContext( EXC_CHFRBLOCK_TEXT_AXISTITLE, 0 ); break;
+ case EXC_CHOBJLINK_ZAXIS: SetFutureRecordContext( EXC_CHFRBLOCK_TEXT_AXISTITLE, 2 ); break;
+ }
+
mxSrcLink.reset();
mxObjLink.reset( new XclExpChObjectLink( nTarget, XclChDataPointPos( 0, 0 ) ) );
@@ -983,7 +1117,7 @@ void XclExpChText::ConvertTitle( Reference< XTitle > xTitle, sal_uInt16 nTarget
ConvertFontBase( GetChRoot(), nFontIdx );
// rotation
- ConvertRotationBase( GetChRoot(), aTitleProp );
+ ConvertRotationBase( GetChRoot(), aTitleProp, true );
}
else
{
@@ -1001,69 +1135,93 @@ void XclExpChText::ConvertLegend( const ScfPropertySet& rPropSet )
bool XclExpChText::ConvertDataLabel( const ScfPropertySet& rPropSet,
const XclChTypeInfo& rTypeInfo, const XclChDataPointPos& rPointPos )
{
+ SetFutureRecordContext( EXC_CHFRBLOCK_TEXT_DATALABEL, rPointPos.mnPointIdx, rPointPos.mnSeriesIdx );
+
namespace cssc = ::com::sun::star::chart2;
cssc::DataPointLabel aPointLabel;
- if( rPropSet.GetProperty( aPointLabel, EXC_CHPROP_LABEL ) )
- {
- //! TODO: make value and percent independent
- bool bIsPie = rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_PIE;
- bool bShowValue = aPointLabel.ShowNumber;
- bool bShowPercent = bIsPie && !bShowValue && aPointLabel.ShowNumberInPercent;
- bool bShowCateg = !bShowValue && aPointLabel.ShowCategoryName;
- bool bShowAny = bShowValue || bShowPercent || bShowCateg;
- bool bShowSymbol = bShowAny && aPointLabel.ShowLegendSymbol;
-
- ::set_flag( maData.mnFlags, EXC_CHTEXT_AUTOTEXT );
- ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWVALUE, bShowValue );
- ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWPERCENT, bShowPercent );
- ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWCATEG, bShowCateg );
- ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWCATEGPERC, bShowPercent && bShowCateg );
- ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWSYMBOL, bShowSymbol );
- ::set_flag( maData.mnFlags, EXC_CHTEXT_DELETED, !bShowAny );
-
- if( bShowAny )
+ if( !rPropSet.GetProperty( aPointLabel, EXC_CHPROP_LABEL ) )
+ return false;
+
+ // percentage only allowed in pie and donut charts
+ bool bIsPie = rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_PIE;
+ // bubble sizes only allowed in bubble charts
+ bool bIsBubble = rTypeInfo.meTypeId == EXC_CHTYPEID_BUBBLES;
+ DBG_ASSERT( (GetBiff() == EXC_BIFF8) || !bIsBubble, "XclExpChText::ConvertDataLabel - bubble charts only in BIFF8" );
+
+ // raw show flags
+ bool bShowValue = !bIsBubble && aPointLabel.ShowNumber; // Chart2 uses 'ShowNumber' for bubble size
+ bool bShowPercent = bIsPie && aPointLabel.ShowNumberInPercent; // percentage only in pie/donut charts
+ bool bShowCateg = aPointLabel.ShowCategoryName;
+ bool bShowBubble = bIsBubble && aPointLabel.ShowNumber; // Chart2 uses 'ShowNumber' for bubble size
+ bool bShowAny = bShowValue || bShowPercent || bShowCateg || bShowBubble;
+
+ // create the CHFRLABELPROPS record for extended settings in BIFF8
+ if( bShowAny && (GetBiff() == EXC_BIFF8) )
+ {
+ mxLabelProps.reset( new XclExpChFrLabelProps( GetChRoot() ) );
+ mxLabelProps->Convert( rPropSet, false, bShowCateg, bShowValue, bShowPercent, bShowBubble );
+ }
+
+ // restrict to combinations allowed in CHTEXT
+ if( bShowPercent ) bShowValue = false; // percent wins over value
+ if( bShowValue ) bShowCateg = false; // value wins over category
+ if( bShowValue || bShowCateg ) bShowBubble = false; // value or category wins over bubble size
+
+ // set all flags
+ ::set_flag( maData.mnFlags, EXC_CHTEXT_AUTOTEXT );
+ ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWVALUE, bShowValue );
+ ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWPERCENT, bShowPercent );
+ ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWCATEG, bShowCateg );
+ ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWCATEGPERC, bShowPercent && bShowCateg );
+ ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWBUBBLE, bShowBubble );
+ ::set_flag( maData.mnFlags, EXC_CHTEXT_SHOWSYMBOL, bShowAny && aPointLabel.ShowLegendSymbol );
+ ::set_flag( maData.mnFlags, EXC_CHTEXT_DELETED, !bShowAny );
+
+ if( bShowAny )
+ {
+ // font settings
+ ConvertFontBase( GetChRoot(), rPropSet );
+ ConvertRotationBase( GetChRoot(), rPropSet, false );
+ // label placement
+ sal_Int32 nPlacement = 0;
+ if( rPropSet.GetProperty( nPlacement, EXC_CHPROP_LABELPLACEMENT ) )
{
- // font settings
- ConvertFontBase( GetChRoot(), rPropSet );
- // label placement
- sal_Int32 nPlacement = 0;
- if( rPropSet.GetProperty( nPlacement, EXC_CHPROP_LABELPLACEMENT ) )
+ using namespace ::com::sun::star::chart::DataLabelPlacement;
+ if( nPlacement == rTypeInfo.mnDefaultLabelPos )
{
- using namespace ::com::sun::star::chart::DataLabelPlacement;
- if( nPlacement == rTypeInfo.mnDefaultLabelPos )
- {
- maData.mnPlacement = EXC_CHTEXT_POS_DEFAULT;
- }
- else switch( nPlacement )
- {
- case AVOID_OVERLAP: maData.mnPlacement = EXC_CHTEXT_POS_AUTO; break;
- case CENTER: maData.mnPlacement = EXC_CHTEXT_POS_CENTER; break;
- case TOP: maData.mnPlacement = EXC_CHTEXT_POS_ABOVE; break;
- case TOP_LEFT: maData.mnPlacement = EXC_CHTEXT_POS_LEFT; break;
- case LEFT: maData.mnPlacement = EXC_CHTEXT_POS_LEFT; break;
- case BOTTOM_LEFT: maData.mnPlacement = EXC_CHTEXT_POS_LEFT; break;
- case BOTTOM: maData.mnPlacement = EXC_CHTEXT_POS_BELOW; break;
- case BOTTOM_RIGHT: maData.mnPlacement = EXC_CHTEXT_POS_RIGHT; break;
- case RIGHT: maData.mnPlacement = EXC_CHTEXT_POS_RIGHT; break;
- case TOP_RIGHT: maData.mnPlacement = EXC_CHTEXT_POS_RIGHT; break;
- case INSIDE: maData.mnPlacement = EXC_CHTEXT_POS_INSIDE; break;
- case OUTSIDE: maData.mnPlacement = EXC_CHTEXT_POS_OUTSIDE; break;
- case NEAR_ORIGIN: maData.mnPlacement = EXC_CHTEXT_POS_AXIS; break;
- default: DBG_ERRORFILE( "XclExpChText::ConvertDataLabel - unknown label placement type" );
- }
+ maData.mnPlacement = EXC_CHTEXT_POS_DEFAULT;
+ }
+ else switch( nPlacement )
+ {
+ case AVOID_OVERLAP: maData.mnPlacement = EXC_CHTEXT_POS_AUTO; break;
+ case CENTER: maData.mnPlacement = EXC_CHTEXT_POS_CENTER; break;
+ case TOP: maData.mnPlacement = EXC_CHTEXT_POS_ABOVE; break;
+ case TOP_LEFT: maData.mnPlacement = EXC_CHTEXT_POS_LEFT; break;
+ case LEFT: maData.mnPlacement = EXC_CHTEXT_POS_LEFT; break;
+ case BOTTOM_LEFT: maData.mnPlacement = EXC_CHTEXT_POS_LEFT; break;
+ case BOTTOM: maData.mnPlacement = EXC_CHTEXT_POS_BELOW; break;
+ case BOTTOM_RIGHT: maData.mnPlacement = EXC_CHTEXT_POS_RIGHT; break;
+ case RIGHT: maData.mnPlacement = EXC_CHTEXT_POS_RIGHT; break;
+ case TOP_RIGHT: maData.mnPlacement = EXC_CHTEXT_POS_RIGHT; break;
+ case INSIDE: maData.mnPlacement = EXC_CHTEXT_POS_INSIDE; break;
+ case OUTSIDE: maData.mnPlacement = EXC_CHTEXT_POS_OUTSIDE; break;
+ case NEAR_ORIGIN: maData.mnPlacement = EXC_CHTEXT_POS_AXIS; break;
+ default: DBG_ERRORFILE( "XclExpChText::ConvertDataLabel - unknown label placement type" );
}
- // source link (contains number format)
- mxSrcLink.reset( new XclExpChSourceLink( GetChRoot(), EXC_CHSRCLINK_TITLE ) );
- if( bShowValue || bShowPercent )
- // percentage format wins over value format
- mxSrcLink->ConvertNumFmt( rPropSet, bShowPercent );
- // object link
- mxObjLink.reset( new XclExpChObjectLink( EXC_CHOBJLINK_DATA, rPointPos ) );
- // return true to indicate existing label
- return true;
}
+ // source link (contains number format)
+ mxSrcLink.reset( new XclExpChSourceLink( GetChRoot(), EXC_CHSRCLINK_TITLE ) );
+ if( bShowValue || bShowPercent )
+ // percentage format wins over value format
+ mxSrcLink->ConvertNumFmt( rPropSet, bShowPercent );
+ // object link
+ mxObjLink.reset( new XclExpChObjectLink( EXC_CHOBJLINK_DATA, rPointPos ) );
}
- return false;
+
+ /* Return true to indicate valid label settings:
+ - for existing labels at entire series
+ - for any settings at single data point (to be able to delete a point label) */
+ return bShowAny || (rPointPos.mnPointIdx != EXC_CHDATAFORMAT_ALLPOINTS);
}
void XclExpChText::ConvertTrendLineEquation( const ScfPropertySet& rPropSet, const XclChDataPointPos& rPointPos )
@@ -1105,6 +1263,8 @@ void XclExpChText::WriteSubRecords( XclExpStream& rStrm )
lclSaveRecord( rStrm, mxFrame );
// CHOBJECTLINK record
lclSaveRecord( rStrm, mxObjLink );
+ // CHFRLABELPROPS record
+ lclSaveRecord( rStrm, mxLabelProps );
}
void XclExpChText::WriteBody( XclExpStream& rStrm )
@@ -1284,8 +1444,7 @@ XclExpChAttachedLabel::XclExpChAttachedLabel( sal_uInt16 nFlags ) :
XclExpChDataFormat::XclExpChDataFormat( const XclExpChRoot& rRoot,
const XclChDataPointPos& rPointPos, sal_uInt16 nFormatIdx ) :
- XclExpChGroupBase( EXC_ID_CHDATAFORMAT, 8 ),
- XclExpChRoot( rRoot )
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_DATAFORMAT, EXC_ID_CHDATAFORMAT, 8 )
{
maData.maPointPos = rPointPos;
maData.mnFormatIdx = nFormatIdx;
@@ -1533,8 +1692,7 @@ ScfPropertySet lclGetPointPropSet( Reference< XDataSeries > xDataSeries, sal_Int
} // namespace
XclExpChSeries::XclExpChSeries( const XclExpChRoot& rRoot, sal_uInt16 nSeriesIdx ) :
- XclExpChGroupBase( EXC_ID_CHSERIES, (rRoot.GetBiff() == EXC_BIFF8) ? 12 : 8 ),
- XclExpChRoot( rRoot ),
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_SERIES, EXC_ID_CHSERIES, (rRoot.GetBiff() == EXC_BIFF8) ? 12 : 8 ),
mnGroupIdx( EXC_CHSERGROUP_NONE ),
mnSeriesIdx( nSeriesIdx ),
mnParentIdx( EXC_CHSERIES_INVALID )
@@ -1620,15 +1778,15 @@ bool XclExpChSeries::ConvertDataSeries(
{
const OUString aFillStyleName = CREATE_OUSTRING( "FillStyle" );
const OUString aColorName = CREATE_OUSTRING( "Color" );
- namespace csscd = ::com::sun::star::drawing;
+ namespace cssd = ::com::sun::star::drawing;
for( sal_Int32 nPointIdx = 0; nPointIdx < nMaxPointCount; ++nPointIdx )
{
aPointPos.mnPointIdx = static_cast< sal_uInt16 >( nPointIdx );
ScfPropertySet aPointProp = lclGetPointPropSet( xDataSeries, nPointIdx );
// test that the point fill style is solid, but no color is set
- csscd::FillStyle eFillStyle = csscd::FillStyle_NONE;
+ cssd::FillStyle eFillStyle = cssd::FillStyle_NONE;
if( aPointProp.GetProperty( eFillStyle, aFillStyleName ) &&
- (eFillStyle == csscd::FillStyle_SOLID) &&
+ (eFillStyle == cssd::FillStyle_SOLID) &&
!aPointProp.HasProperty( aColorName ) )
{
aPointProp.SetProperty( aColorName, xColorScheme->getColorByIndex( nPointIdx ) );
@@ -1969,8 +2127,7 @@ void XclExpChChart3d::WriteBody( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
XclExpChLegend::XclExpChLegend( const XclExpChRoot& rRoot ) :
- XclExpChGroupBase( EXC_ID_CHLEGEND, 20 ),
- XclExpChRoot( rRoot )
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_LEGEND, EXC_ID_CHLEGEND, 20 )
{
}
@@ -1998,19 +2155,19 @@ void XclExpChLegend::WriteBody( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
-XclExpChDropBar::XclExpChDropBar( XclChObjectType eObjType ) :
- XclExpChGroupBase( EXC_ID_CHDROPBAR, 2 ),
+XclExpChDropBar::XclExpChDropBar( const XclExpChRoot& rRoot, XclChObjectType eObjType ) :
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_DROPBAR, EXC_ID_CHDROPBAR, 2 ),
meObjType( eObjType ),
mnBarDist( 100 )
{
}
-void XclExpChDropBar::Convert( const XclExpChRoot& rRoot, const ScfPropertySet& rPropSet )
+void XclExpChDropBar::Convert( const ScfPropertySet& rPropSet )
{
if( rPropSet.Is() )
- ConvertFrameBase( rRoot, rPropSet, meObjType );
+ ConvertFrameBase( GetChRoot(), rPropSet, meObjType );
else
- SetDefaultFrameBase( rRoot, EXC_CHFRAMETYPE_INVISIBLE, true );
+ SetDefaultFrameBase( GetChRoot(), EXC_CHFRAMETYPE_INVISIBLE, true );
}
void XclExpChDropBar::WriteSubRecords( XclExpStream& rStrm )
@@ -2026,8 +2183,7 @@ void XclExpChDropBar::WriteBody( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
XclExpChTypeGroup::XclExpChTypeGroup( const XclExpChRoot& rRoot, sal_uInt16 nGroupIdx ) :
- XclExpChGroupBase( EXC_ID_CHTYPEGROUP, 20 ),
- XclExpChRoot( rRoot ),
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_TYPEGROUP, EXC_ID_CHTYPEGROUP, 20 ),
maType( rRoot ),
maTypeInfo( maType.GetTypeInfo() )
{
@@ -2200,13 +2356,13 @@ void XclExpChTypeGroup::CreateAllStockSeries(
// white dropbar format
aTypeProp.GetProperty( xWhitePropSet, EXC_CHPROP_WHITEDAY );
ScfPropertySet aWhiteProp( xWhitePropSet );
- mxUpBar.reset( new XclExpChDropBar( EXC_CHOBJTYPE_WHITEDROPBAR ) );
- mxUpBar->Convert( GetChRoot(), aWhiteProp );
+ mxUpBar.reset( new XclExpChDropBar( GetChRoot(), EXC_CHOBJTYPE_WHITEDROPBAR ) );
+ mxUpBar->Convert( aWhiteProp );
// black dropbar format
aTypeProp.GetProperty( xBlackPropSet, EXC_CHPROP_BLACKDAY );
ScfPropertySet aBlackProp( xBlackPropSet );
- mxDownBar.reset( new XclExpChDropBar( EXC_CHOBJTYPE_BLACKDROPBAR ) );
- mxDownBar->Convert( GetChRoot(), aBlackProp );
+ mxDownBar.reset( new XclExpChDropBar( GetChRoot(), EXC_CHOBJTYPE_BLACKDROPBAR ) );
+ mxDownBar->Convert( aBlackProp );
}
}
@@ -2246,13 +2402,27 @@ void XclExpChLabelRange::Convert( const ScaleData& rScaleData, bool bMirrorOrien
// origin
double fOrigin = 0.0;
if( !lclIsAutoAnyOrGetValue( fOrigin, rScaleData.Origin ) )
- maData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 32767 );
+ maData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 31999 );
// reverse order
if( (rScaleData.Orientation == ::com::sun::star::chart2::AxisOrientation_REVERSE) != bMirrorOrient )
- {
::set_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE );
- SwapAxisMaxCross();
+}
+
+void XclExpChLabelRange::ConvertAxisPosition( const ScfPropertySet& rPropSet )
+{
+ namespace cssc = ::com::sun::star::chart;
+ cssc::ChartAxisPosition eAxisPos = cssc::ChartAxisPosition_VALUE;
+ rPropSet.GetProperty( eAxisPos, EXC_CHPROP_CROSSOVERPOSITION );
+ double fCrossingPos = 1.0;
+ rPropSet.GetProperty( fCrossingPos, EXC_CHPROP_CROSSOVERVALUE );
+ switch( eAxisPos )
+ {
+ case cssc::ChartAxisPosition_ZERO: maData.mnCross = 1; break;
+ case cssc::ChartAxisPosition_START: maData.mnCross = 1; break;
+ case cssc::ChartAxisPosition_END: ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_MAXCROSS ); break;
+ case cssc::ChartAxisPosition_VALUE: maData.mnCross = limit_cast< sal_uInt16 >( fCrossingPos, 1, 31999 ); break;
+ default: maData.mnCross = 1;
}
}
@@ -2274,18 +2444,15 @@ void XclExpChValueRange::Convert( const ScaleData& rScaleData )
// scaling algorithm
bool bLogScale = ScfApiHelper::GetServiceName( rScaleData.Scaling ) == SERVICE_CHART2_LOGSCALING;
::set_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE, bLogScale );
- Reference< XScaling > xLogScaling;
- if( bLogScale )
- xLogScaling = rScaleData.Scaling;
// min/max
- bool bAutoMin = lclIsAutoAnyOrGetScaledValue( maData.mfMin, rScaleData.Minimum, xLogScaling );
+ bool bAutoMin = lclIsAutoAnyOrGetScaledValue( maData.mfMin, rScaleData.Minimum, bLogScale );
::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN, bAutoMin );
- bool bAutoMax = lclIsAutoAnyOrGetScaledValue( maData.mfMax, rScaleData.Maximum, xLogScaling );
+ bool bAutoMax = lclIsAutoAnyOrGetScaledValue( maData.mfMax, rScaleData.Maximum, bLogScale );
::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAX, bAutoMax );
// origin
- bool bAutoCross = lclIsAutoAnyOrGetScaledValue( maData.mfCross, rScaleData.Origin, xLogScaling );
+ bool bAutoCross = lclIsAutoAnyOrGetScaledValue( maData.mfCross, rScaleData.Origin, bLogScale );
::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOCROSS, bAutoCross );
// major increment
@@ -2295,7 +2462,7 @@ void XclExpChValueRange::Convert( const ScaleData& rScaleData )
// minor increment
const Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements;
sal_Int32 nCount = 0;
- bool bAutoMinor = bAutoMajor || (rSubIncrementSeq.getLength() < 1) ||
+ bool bAutoMinor = bLogScale || bAutoMajor || (rSubIncrementSeq.getLength() < 1) ||
lclIsAutoAnyOrGetValue( nCount, rSubIncrementSeq[ 0 ].IntervalCount ) || (nCount < 1);
if( !bAutoMinor )
maData.mfMinorStep = maData.mfMajorStep / nCount;
@@ -2306,6 +2473,32 @@ void XclExpChValueRange::Convert( const ScaleData& rScaleData )
::set_flag( maData.mnFlags, EXC_CHVALUERANGE_REVERSE, rScaleData.Orientation == cssc::AxisOrientation_REVERSE );
}
+void XclExpChValueRange::ConvertAxisPosition( const ScfPropertySet& rPropSet )
+{
+ namespace cssc = ::com::sun::star::chart;
+ cssc::ChartAxisPosition eAxisPos = cssc::ChartAxisPosition_VALUE;
+ double fCrossingPos = 0.0;
+ if( rPropSet.GetProperty( eAxisPos, EXC_CHPROP_CROSSOVERPOSITION ) && rPropSet.GetProperty( fCrossingPos, EXC_CHPROP_CROSSOVERVALUE ) )
+ {
+ switch( eAxisPos )
+ {
+ case cssc::ChartAxisPosition_ZERO:
+ case cssc::ChartAxisPosition_START:
+ ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOCROSS );
+ break;
+ case cssc::ChartAxisPosition_END:
+ ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_MAXCROSS );
+ break;
+ case cssc::ChartAxisPosition_VALUE:
+ ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOCROSS, false );
+ maData.mfCross = ::get_flagvalue< double >( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE, log( fCrossingPos ) / log( 10.0 ), fCrossingPos );
+ break;
+ default:
+ ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOCROSS );
+ }
+ }
+}
+
void XclExpChValueRange::WriteBody( XclExpStream& rStrm )
{
rStrm << maData.mfMin
@@ -2338,14 +2531,46 @@ XclExpChTick::XclExpChTick( const XclExpChRoot& rRoot ) :
{
}
-void XclExpChTick::Convert( const ScfPropertySet& rPropSet )
+void XclExpChTick::Convert( const ScfPropertySet& rPropSet, const XclChExtTypeInfo& rTypeInfo, sal_uInt16 nAxisType )
{
// tick mark style
- sal_Int32 nApiTickmarks(0);
+ sal_Int32 nApiTickmarks = 0;
if( rPropSet.GetProperty( nApiTickmarks, EXC_CHPROP_MAJORTICKS ) )
maData.mnMajor = lclGetXclTickPos( nApiTickmarks );
if( rPropSet.GetProperty( nApiTickmarks, EXC_CHPROP_MINORTICKS ) )
maData.mnMinor = lclGetXclTickPos( nApiTickmarks );
+
+ // axis labels
+ if( (rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_RADAR) && (nAxisType == EXC_CHAXIS_X) )
+ {
+ /* Radar charts disable their category labels via chart type, not via
+ axis, and axis labels are always 'near axis'. */
+ maData.mnLabelPos = EXC_CHTICK_NEXT;
+ }
+ else if( !rPropSet.GetBoolProperty( EXC_CHPROP_DISPLAYLABELS ) )
+ {
+ // no labels
+ maData.mnLabelPos = EXC_CHTICK_NOLABEL;
+ }
+ else if( rTypeInfo.mb3dChart && (nAxisType == EXC_CHAXIS_Y) )
+ {
+ // Excel expects 'near axis' at Y axes in 3D charts
+ maData.mnLabelPos = EXC_CHTICK_NEXT;
+ }
+ else
+ {
+ namespace cssc = ::com::sun::star::chart;
+ cssc::ChartAxisLabelPosition eApiLabelPos = cssc::ChartAxisLabelPosition_NEAR_AXIS;
+ rPropSet.GetProperty( eApiLabelPos, EXC_CHPROP_LABELPOSITION );
+ switch( eApiLabelPos )
+ {
+ case cssc::ChartAxisLabelPosition_NEAR_AXIS:
+ case cssc::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE: maData.mnLabelPos = EXC_CHTICK_NEXT; break;
+ case cssc::ChartAxisLabelPosition_OUTSIDE_START: maData.mnLabelPos = EXC_CHTICK_LOW; break;
+ case cssc::ChartAxisLabelPosition_OUTSIDE_END: maData.mnLabelPos = EXC_CHTICK_HIGH; break;
+ default: maData.mnLabelPos = EXC_CHTICK_NEXT;
+ }
+ }
}
void XclExpChTick::SetFontColor( const Color& rColor, sal_uInt32 nColorId )
@@ -2384,10 +2609,9 @@ Reference< XAxis > lclGetApiAxis( Reference< XCoordinateSystem > xCoordSystem,
sal_Int32 nApiAxisDim, sal_Int32 nApiAxesSetIdx )
{
Reference< XAxis > xAxis;
- try
+ if( (nApiAxisDim >= 0) && xCoordSystem.is() ) try
{
- if( xCoordSystem.is() )
- xAxis = xCoordSystem->getAxisByDimension( nApiAxisDim, nApiAxesSetIdx );
+ xAxis = xCoordSystem->getAxisByDimension( nApiAxisDim, nApiAxesSetIdx );
}
catch( Exception& )
{
@@ -2398,8 +2622,7 @@ Reference< XAxis > lclGetApiAxis( Reference< XCoordinateSystem > xCoordSystem,
} // namespace
XclExpChAxis::XclExpChAxis( const XclExpChRoot& rRoot, sal_uInt16 nAxisType ) :
- XclExpChGroupBase( EXC_ID_CHAXIS, 18 ),
- XclExpChRoot( rRoot ),
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_AXIS, EXC_ID_CHAXIS, 18 ),
mnNumFmtIdx( EXC_FORMAT_NOTFOUND )
{
maData.mnType = nAxisType;
@@ -2418,7 +2641,7 @@ void XclExpChAxis::SetRotation( sal_uInt16 nRotation )
mxTick->SetRotation( nRotation );
}
-void XclExpChAxis::Convert( Reference< XAxis > xAxis, const XclChExtTypeInfo& rTypeInfo, sal_Int32 nApiAxesSetIdx )
+void XclExpChAxis::Convert( Reference< XAxis > xAxis, Reference< XAxis > xCrossingAxis, const XclChExtTypeInfo& rTypeInfo )
{
ScfPropertySet aAxisProp( xAxis );
bool bCategoryAxis = ((GetAxisType() == EXC_CHAXIS_X) && rTypeInfo.mbCategoryAxis) || (GetAxisType() == EXC_CHAXIS_Z);
@@ -2432,6 +2655,7 @@ void XclExpChAxis::Convert( Reference< XAxis > xAxis, const XclChExtTypeInfo& rT
// axis scaling and increment ---------------------------------------------
+ ScfPropertySet aCrossingProp( xCrossingAxis );
if( bCategoryAxis )
{
mxLabelRange.reset( new XclExpChLabelRange( GetChRoot() ) );
@@ -2439,38 +2663,29 @@ void XclExpChAxis::Convert( Reference< XAxis > xAxis, const XclChExtTypeInfo& rT
if( xAxis.is() )
// #i71684# radar charts have reversed rotation direction
mxLabelRange->Convert( xAxis->getScaleData(), (GetAxisType() == EXC_CHAXIS_X) && (rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_RADAR) );
- // swap max-cross flag for secondary X axis to have the secondary Y axis at right side
- if( (GetAxisType() == EXC_CHAXIS_X) && (nApiAxesSetIdx == EXC_CHAXESSET_SECONDARY) )
- mxLabelRange->SwapAxisMaxCross();
+ // get position of crossing axis on this axis from passed axis object
+ if( aCrossingProp.Is() )
+ mxLabelRange->ConvertAxisPosition( aCrossingProp );
}
else
{
mxValueRange.reset( new XclExpChValueRange( GetChRoot() ) );
if( xAxis.is() )
mxValueRange->Convert( xAxis->getScaleData() );
+ // get position of crossing axis on this axis from passed axis object
+ if( aCrossingProp.Is() )
+ mxValueRange->ConvertAxisPosition( aCrossingProp );
}
// axis caption text ------------------------------------------------------
// axis ticks properties
mxTick.reset( new XclExpChTick( GetChRoot() ) );
- mxTick->Convert( aAxisProp );
-
- // existence and position of axis labels
- sal_uInt8 nLabelPos = EXC_CHTICK_NOLABEL;
- if( rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_RADAR )
- /* Radar charts disable their category labels via chart type, not via
- axis, and axis labels are always 'near axis' in Chart2. */
- nLabelPos = EXC_CHTICK_NEXT;
- else if( aAxisProp.GetBoolProperty( EXC_CHPROP_DISPLAYLABELS ) )
- /* #i85862# Axis labels in other chart types always have position 'low'
- in Chart2, but Excel expects 'near axis' at Y axes in 3D charts. */
- nLabelPos = (rTypeInfo.mb3dChart && (GetAxisType() == EXC_CHAXIS_Y)) ? EXC_CHTICK_NEXT : EXC_CHTICK_LOW;
- mxTick->SetLabelPos( nLabelPos );
+ mxTick->Convert( aAxisProp, rTypeInfo, GetAxisType() );
// axis label formatting and rotation
ConvertFontBase( GetChRoot(), aAxisProp );
- ConvertRotationBase( GetChRoot(), aAxisProp );
+ ConvertRotationBase( GetChRoot(), aAxisProp, true );
// axis number format
sal_Int32 nApiNumFmt = 0;
@@ -2539,10 +2754,10 @@ void XclExpChAxis::WriteBody( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
XclExpChAxesSet::XclExpChAxesSet( const XclExpChRoot& rRoot, sal_uInt16 nAxesSetId ) :
- XclExpChGroupBase( EXC_ID_CHAXESSET, 18 ),
- XclExpChRoot( rRoot )
+ XclExpChGroupBase( rRoot, EXC_CHFRBLOCK_TYPE_AXESSET, EXC_ID_CHAXESSET, 18 )
{
maData.mnAxesSetId = nAxesSetId;
+ SetFutureRecordContext( 0, nAxesSetId );
}
sal_uInt16 XclExpChAxesSet::Convert( Reference< XDiagram > xDiagram, sal_uInt16 nFirstGroupIdx )
@@ -2621,10 +2836,10 @@ sal_uInt16 XclExpChAxesSet::Convert( Reference< XDiagram > xDiagram, sal_uInt16
// create axes according to chart type (no axes for pie and donut charts)
if( rTypeInfo.meTypeCateg != EXC_CHTYPECATEG_PIE )
{
- ConvertAxis( mxXAxis, EXC_CHAXIS_X, mxXAxisTitle, EXC_CHOBJLINK_XAXIS, xCoordSystem, rTypeInfo );
- ConvertAxis( mxYAxis, EXC_CHAXIS_Y, mxYAxisTitle, EXC_CHOBJLINK_YAXIS, xCoordSystem, rTypeInfo );
+ ConvertAxis( mxXAxis, EXC_CHAXIS_X, mxXAxisTitle, EXC_CHOBJLINK_XAXIS, xCoordSystem, rTypeInfo, EXC_CHART_AXIS_Y );
+ ConvertAxis( mxYAxis, EXC_CHAXIS_Y, mxYAxisTitle, EXC_CHOBJLINK_YAXIS, xCoordSystem, rTypeInfo, EXC_CHART_AXIS_X );
if( pGroup->Is3dDeepChart() )
- ConvertAxis( mxZAxis, EXC_CHAXIS_Z, mxZAxisTitle, EXC_CHOBJLINK_ZAXIS, xCoordSystem, rTypeInfo );
+ ConvertAxis( mxZAxis, EXC_CHAXIS_Z, mxZAxisTitle, EXC_CHOBJLINK_ZAXIS, xCoordSystem, rTypeInfo, EXC_CHART_AXIS_NONE );
}
// X axis category ranges
@@ -2708,14 +2923,16 @@ XclExpChTypeGroupRef XclExpChAxesSet::GetLastTypeGroup() const
void XclExpChAxesSet::ConvertAxis(
XclExpChAxisRef& rxChAxis, sal_uInt16 nAxisType,
XclExpChTextRef& rxChAxisTitle, sal_uInt16 nTitleTarget,
- Reference< XCoordinateSystem > xCoordSystem, const XclChExtTypeInfo& rTypeInfo )
+ Reference< XCoordinateSystem > xCoordSystem, const XclChExtTypeInfo& rTypeInfo,
+ sal_Int32 nCrossingAxisDim )
{
// create and convert axis object
rxChAxis.reset( new XclExpChAxis( GetChRoot(), nAxisType ) );
sal_Int32 nApiAxisDim = rxChAxis->GetApiAxisDimension();
sal_Int32 nApiAxesSetIdx = GetApiAxesSetIndex();
Reference< XAxis > xAxis = lclGetApiAxis( xCoordSystem, nApiAxisDim, nApiAxesSetIdx );
- rxChAxis->Convert( xAxis, rTypeInfo, nApiAxesSetIdx );
+ Reference< XAxis > xCrossingAxis = lclGetApiAxis( xCoordSystem, nCrossingAxisDim, nApiAxesSetIdx );
+ rxChAxis->Convert( xAxis, xCrossingAxis, rTypeInfo );
// create and convert axis title
Reference< XTitled > xTitled( xAxis, UNO_QUERY );
@@ -2731,8 +2948,7 @@ void XclExpChAxesSet::WriteBody( XclExpStream& rStrm )
XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
Reference< XChartDocument > xChartDoc, const Size& rSize ) :
- XclExpChGroupBase( EXC_ID_CHCHART, 16 ),
- XclExpChRoot( rRoot, this )
+ XclExpChGroupBase( XclExpChRoot( rRoot, this ), EXC_CHFRBLOCK_TYPE_CHART, EXC_ID_CHCHART, 16 )
{
Size aPtSize = OutputDevice::LogicToLogic( rSize, MapMode( MAP_100TH_MM ), MapMode( MAP_POINT ) );
// rectangle is stored in 16.16 fixed-point format
diff --git a/sc/source/filter/excel/xerecord.cxx b/sc/source/filter/excel/xerecord.cxx
index 1ee92c191db9..b422781db143 100644
--- a/sc/source/filter/excel/xerecord.cxx
+++ b/sc/source/filter/excel/xerecord.cxx
@@ -240,6 +240,24 @@ void XclExpDummyRecord::WriteBody( XclExpStream& rStrm )
rStrm.Write( mpData, GetRecSize() );
}
+// Future records =============================================================
+
+XclExpFutureRecord::XclExpFutureRecord( XclFutureRecType eRecType, sal_uInt16 nRecId, sal_Size nRecSize ) :
+ XclExpRecord( nRecId, nRecSize ),
+ meRecType( eRecType )
+{
+}
+
+void XclExpFutureRecord::Save( XclExpStream& rStrm )
+{
+ rStrm.StartRecord( GetRecId(), GetRecSize() + ((meRecType == EXC_FUTUREREC_UNUSEDREF) ? 12 : 4) );
+ rStrm << GetRecId() << sal_uInt16( 0 );
+ if( meRecType == EXC_FUTUREREC_UNUSEDREF )
+ rStrm.WriteZeroBytes( 8 );
+ WriteBody( rStrm );
+ rStrm.EndRecord();
+}
+
// ============================================================================
XclExpSubStream::XclExpSubStream( sal_uInt16 nSubStrmType ) :
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 14bc1c9c8cc9..d74071f17cab 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -39,6 +39,9 @@
#include <com/sun/star/drawing/Direction3D.hpp>
#include <com/sun/star/drawing/ProjectionMode.hpp>
#include <com/sun/star/drawing/ShadeMode.hpp>
+#include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
+#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
+#include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
#include <com/sun/star/chart/ChartAxisPosition.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
@@ -138,10 +141,10 @@ void lclSetValueOrClearAny( Any& rAny, const Type& rValue, bool bClear )
rAny <<= rValue;
}
-void lclSetScaledValueOrClearAny( Any& rAny, double fValue, Reference< XScaling > xScaling, bool bClear )
+void lclSetExpValueOrClearAny( Any& rAny, double fValue, bool bLogScale, bool bClear )
{
- if( !bClear && xScaling.is() )
- fValue = xScaling->doScaling( fValue );
+ if( !bClear && bLogScale )
+ fValue = pow( 10.0, fValue );
lclSetValueOrClearAny( rAny, fValue, bClear );
}
@@ -721,18 +724,14 @@ sal_uInt16 XclImpChSourceLink::GetCellCount() const
void XclImpChSourceLink::ConvertNumFmt( ScfPropertySet& rPropSet, bool bPercent ) const
{
- if( ::get_flag( maData.mnFlags, EXC_CHSRCLINK_NUMFMT ) )
- {
- sal_uInt32 nScNumFmt = GetNumFmtBuffer().GetScFormat( maData.mnNumFmtIdx );
- if( nScNumFmt != NUMBERFORMAT_ENTRY_NOT_FOUND )
- {
- sal_Int32 nApiNumFmt = static_cast< sal_Int32 >( nScNumFmt );
- if( bPercent )
- rPropSet.SetProperty( EXC_CHPROP_PERCENTAGENUMFMT, nApiNumFmt );
- else
- rPropSet.SetProperty( EXC_CHPROP_NUMBERFORMAT, nApiNumFmt );
- }
- }
+ bool bLinkToSource = ::get_flag( maData.mnFlags, EXC_CHSRCLINK_NUMFMT );
+ sal_uInt32 nScNumFmt = bLinkToSource ? GetNumFmtBuffer().GetScFormat( maData.mnNumFmtIdx ) : NUMBERFORMAT_ENTRY_NOT_FOUND;
+ OUString aPropName = bPercent ? EXC_CHPROP_PERCENTAGENUMFMT : EXC_CHPROP_NUMBERFORMAT;
+ if( nScNumFmt != NUMBERFORMAT_ENTRY_NOT_FOUND )
+ rPropSet.SetProperty( aPropName, static_cast< sal_Int32 >( nScNumFmt ) );
+ else
+ // restore 'link to source' at data point (series may contain manual number format)
+ rPropSet.SetAnyProperty( aPropName, Any() );
}
Reference< XDataSequence > XclImpChSourceLink::CreateDataSequence( const OUString& rRole ) const
@@ -752,7 +751,7 @@ Reference< XDataSequence > XclImpChSourceLink::CreateDataSequence( const OUStrin
}
else
{
- DBG_ERRORFILE( "XclImpChSourceLink::CreateDataSequence - cannot create data sequence" );
+// DBG_ERRORFILE( "XclImpChSourceLink::CreateDataSequence - cannot create data sequence" );
}
// set sequence role
@@ -806,9 +805,9 @@ void XclImpChFontBase::ConvertFontBase( const XclImpChRoot& rRoot, ScfPropertySe
rRoot.ConvertFont( rPropSet, GetFontIndex(), &aFontColor );
}
-void XclImpChFontBase::ConvertRotationBase( const XclImpChRoot& rRoot, ScfPropertySet& rPropSet ) const
+void XclImpChFontBase::ConvertRotationBase( const XclImpChRoot& rRoot, ScfPropertySet& rPropSet, bool bSupportsStacked ) const
{
- rRoot.GetChartPropSetHelper().WriteRotationProperties( rPropSet, GetRotation() );
+ rRoot.GetChartPropSetHelper().WriteRotationProperties( rPropSet, GetRotation(), bSupportsStacked );
}
// ----------------------------------------------------------------------------
@@ -879,6 +878,9 @@ void XclImpChText::ReadSubRecord( XclImpStream& rStrm )
case EXC_ID_CHOBJECTLINK:
rStrm >> maObjLink.mnTarget >> maObjLink.maPointPos.mnSeriesIdx >> maObjLink.maPointPos.mnPointIdx;
break;
+ case EXC_ID_CHFRLABELPROPS:
+ ReadChFrLabelProps( rStrm );
+ break;
case EXC_ID_CHEND:
if( mxSrcLink.is() && !maFormats.empty() )
mxSrcLink->SetTextFormats( maFormats );
@@ -939,6 +941,11 @@ void XclImpChText::ConvertFont( ScfPropertySet& rPropSet ) const
ConvertFontBase( GetChRoot(), rPropSet );
}
+void XclImpChText::ConvertRotation( ScfPropertySet& rPropSet, bool bSupportsStacked ) const
+{
+ ConvertRotationBase( GetChRoot(), rPropSet, bSupportsStacked );
+}
+
void XclImpChText::ConvertFrame( ScfPropertySet& rPropSet ) const
{
if( mxFrame.is() )
@@ -953,27 +960,42 @@ void XclImpChText::ConvertNumFmt( ScfPropertySet& rPropSet, bool bPercent ) cons
void XclImpChText::ConvertDataLabel( ScfPropertySet& rPropSet, const XclChTypeInfo& rTypeInfo ) const
{
- const sal_uInt16 EXC_CHTEXT_SHOWANYCATEG = EXC_CHTEXT_SHOWCATEGPERC | EXC_CHTEXT_SHOWCATEG;
- const sal_uInt16 EXC_CHTEXT_SHOWANYVALUE = EXC_CHTEXT_SHOWVALUE;
- const sal_uInt16 EXC_CHTEXT_SHOWANYPERCENT = EXC_CHTEXT_SHOWPERCENT | EXC_CHTEXT_SHOWCATEGPERC;
+ // existing CHFRLABELPROPS record wins over flags from CHTEXT
+ sal_uInt16 nShowFlags = mxLabelProps.is() ? mxLabelProps->mnFlags : maData.mnFlags;
+ sal_uInt16 SHOWANYCATEG = mxLabelProps.is() ? EXC_CHFRLABELPROPS_SHOWCATEG : (EXC_CHTEXT_SHOWCATEGPERC | EXC_CHTEXT_SHOWCATEG);
+ sal_uInt16 SHOWANYVALUE = mxLabelProps.is() ? EXC_CHFRLABELPROPS_SHOWVALUE : EXC_CHTEXT_SHOWVALUE;
+ sal_uInt16 SHOWANYPERCENT = mxLabelProps.is() ? EXC_CHFRLABELPROPS_SHOWPERCENT : (EXC_CHTEXT_SHOWPERCENT | EXC_CHTEXT_SHOWCATEGPERC);
+ sal_uInt16 SHOWANYBUBBLE = mxLabelProps.is() ? EXC_CHFRLABELPROPS_SHOWBUBBLE : EXC_CHTEXT_SHOWBUBBLE;
- bool bIsPie = rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_PIE;
+ // get raw flags for label values
bool bShowNone = IsDeleted();
- bool bShowCateg = !bShowNone && ::get_flag( maData.mnFlags, EXC_CHTEXT_SHOWANYCATEG );
- bool bShowPercent = !bShowNone && bIsPie && ::get_flag( maData.mnFlags, EXC_CHTEXT_SHOWANYPERCENT );
- bool bShowValue = !bShowNone && !bShowPercent && ::get_flag( maData.mnFlags, EXC_CHTEXT_SHOWANYVALUE );
- bool bShowAny = bShowValue || bShowPercent || bShowCateg;
- bool bShowSymbol = bShowAny && ::get_flag( maData.mnFlags, EXC_CHTEXT_SHOWSYMBOL );
+ bool bShowCateg = !bShowNone && ::get_flag( nShowFlags, SHOWANYCATEG );
+ bool bShowPercent = !bShowNone && ::get_flag( nShowFlags, SHOWANYPERCENT );
+ bool bShowValue = !bShowNone && ::get_flag( nShowFlags, SHOWANYVALUE );
+ bool bShowBubble = !bShowNone && ::get_flag( nShowFlags, SHOWANYBUBBLE );
+
+ // adjust to Chart2 behaviour
+ if( rTypeInfo.meTypeId == EXC_CHTYPEID_BUBBLES )
+ bShowValue = bShowBubble; // Chart2 bubble charts show bubble size if 'ShowValue' is set
- // type of attached label
+ // other flags
+ bool bShowAny = bShowValue || bShowPercent || bShowCateg;
+ bool bShowSymbol = bShowAny && ::get_flag( maData.mnFlags, EXC_CHTEXT_SHOWSYMBOL );
+
+ // create API struct for label values, set API label separator
namespace cssc = ::com::sun::star::chart2;
cssc::DataPointLabel aPointLabel( bShowValue, bShowPercent, bShowCateg, bShowSymbol );
rPropSet.SetProperty( EXC_CHPROP_LABEL, aPointLabel );
+ String aSep = mxLabelProps.is() ? mxLabelProps->maSeparator : String( sal_Unicode( '\n' ) );
+ if( aSep.Len() == 0 )
+ aSep = CREATE_STRING( "; " );
+ rPropSet.SetStringProperty( EXC_CHPROP_LABELSEPARATOR, aSep );
// text properties of attached label
if( bShowAny )
{
ConvertFont( rPropSet );
+ ConvertRotation( rPropSet, false );
// label placement
using namespace ::com::sun::star::chart::DataLabelPlacement;
sal_Int32 nPlacement = rTypeInfo.mnDefaultLabelPos;
@@ -1016,13 +1038,26 @@ Reference< XTitle > XclImpChText::CreateTitle() const
// more title formatting properties
ScfPropertySet aTitleProp( xTitle );
ConvertFrame( aTitleProp );
- ConvertRotationBase( GetChRoot(), aTitleProp );
+ ConvertRotation( aTitleProp, true );
}
}
}
return xTitle;
}
+void XclImpChText::ReadChFrLabelProps( XclImpStream& rStrm )
+{
+ if( GetBiff() == EXC_BIFF8 )
+ {
+ mxLabelProps.reset( new XclChFrLabelProps );
+ sal_uInt16 nSepLen;
+ rStrm.Ignore( 12 );
+ rStrm >> mxLabelProps->mnFlags >> nSepLen;
+ if( nSepLen > 0 )
+ mxLabelProps->maSeparator = rStrm.ReadUniString( nSepLen );
+ }
+}
+
namespace {
void lclUpdateText( XclImpChTextRef& rxText, XclImpChTextRef xDefText )
@@ -2593,25 +2628,38 @@ void XclImpChLabelRange::ReadChLabelRange( XclImpStream& rStrm )
void XclImpChLabelRange::Convert( ScfPropertySet& rPropSet, ScaleData& rScaleData, bool bMirrorOrient ) const
{
- namespace cssc = ::com::sun::star::chart2;
-
- // do not overlap text
- rPropSet.SetBoolProperty( EXC_CHPROP_TEXTOVERLAP, false );
- // do not break text into several lines
- rPropSet.SetBoolProperty( EXC_CHPROP_TEXTBREAK, false );
-
- // origin (max-cross not supported, fall back to auto-cross)
- bool bMaxCross = ::get_flag( maData.mnFlags, EXC_CHLABELRANGE_MAXCROSS );
- sal_uInt16 nCross = ::std::max< sal_uInt16 >( maData.mnCross, 1 );
- lclSetValueOrClearAny( rScaleData.Origin, static_cast< double >( nCross ), bMaxCross );
+ // do not overlap text unless all labels are visible
+ rPropSet.SetBoolProperty( EXC_CHPROP_TEXTOVERLAP, maData.mnLabelFreq == 1 );
+ // do not break text into several lines unless all labels are visible
+ rPropSet.SetBoolProperty( EXC_CHPROP_TEXTBREAK, maData.mnLabelFreq == 1 );
+ // do not stagger labels in two lines
+ namespace cssc = ::com::sun::star::chart;
+ rPropSet.SetProperty( EXC_CHPROP_ARRANGEORDER, cssc::ChartAxisArrangeOrderType_SIDE_BY_SIDE );
// reverse order
+ namespace cssc2 = ::com::sun::star::chart2;
bool bReverse = ::get_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE ) != bMirrorOrient;
- rScaleData.Orientation = bReverse ? cssc::AxisOrientation_REVERSE : cssc::AxisOrientation_MATHEMATICAL;
+ rScaleData.Orientation = bReverse ? cssc2::AxisOrientation_REVERSE : cssc2::AxisOrientation_MATHEMATICAL;
//! TODO #i58731# show n-th category
}
+void XclImpChLabelRange::ConvertAxisPosition( ScfPropertySet& rPropSet, bool b3dChart ) const
+{
+ /* Crossing mode (max-cross flag overrides other crossing settings). Excel
+ does not move the Y axis in 3D charts, regardless of actual settings.
+ But: the Y axis has to be moved to "end", if the X axis is mirrored,
+ to keep it at the left end of the chart. */
+ bool bMaxCross = ::get_flag( maData.mnFlags, b3dChart ? EXC_CHLABELRANGE_REVERSE : EXC_CHLABELRANGE_MAXCROSS );
+ namespace cssc = ::com::sun::star::chart;
+ cssc::ChartAxisPosition eAxisPos = bMaxCross ? cssc::ChartAxisPosition_END : cssc::ChartAxisPosition_VALUE;
+ rPropSet.SetProperty( EXC_CHPROP_CROSSOVERPOSITION, eAxisPos );
+
+ // crossing position
+ double fCrossingPos = b3dChart ? 1.0 : maData.mnCross;
+ rPropSet.SetProperty( EXC_CHPROP_CROSSOVERVALUE, fCrossingPos );
+}
+
// ----------------------------------------------------------------------------
XclImpChValueRange::XclImpChValueRange( const XclImpChRoot& rRoot ) :
@@ -2634,22 +2682,11 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co
// scaling algorithm
bool bLogScale = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE );
OUString aScalingService = bLogScale ? SERVICE_CHART2_LOGSCALING : SERVICE_CHART2_LINEARSCALING;
- Reference< XScaling > xScaling( ScfApiHelper::CreateInstance( aScalingService ), UNO_QUERY );
- Reference< XScaling > xLogScaling;
- if( xScaling.is() )
- {
- rScaleData.Scaling = xScaling;
- if( bLogScale )
- xLogScaling = xScaling->getInverseScaling();
- }
+ rScaleData.Scaling.set( ScfApiHelper::CreateInstance( aScalingService ), UNO_QUERY );
// min/max
- lclSetScaledValueOrClearAny( rScaleData.Minimum, maData.mfMin, xLogScaling, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN ) );
- lclSetScaledValueOrClearAny( rScaleData.Maximum, maData.mfMax, xLogScaling, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAX ) );
-
- // origin (max-cross overrides crossing settings, fall back to auto-cross)
- const sal_uInt16 nAutoCrossFlags = EXC_CHVALUERANGE_AUTOCROSS | EXC_CHVALUERANGE_MAXCROSS;
- lclSetScaledValueOrClearAny( rScaleData.Origin, maData.mfCross, xLogScaling, ::get_flag( maData.mnFlags, nAutoCrossFlags ) );
+ lclSetExpValueOrClearAny( rScaleData.Minimum, maData.mfMin, bLogScale, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN ) );
+ lclSetExpValueOrClearAny( rScaleData.Maximum, maData.mfMax, bLogScale, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAX ) );
// increment
bool bAutoMajor = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAJOR );
@@ -2660,19 +2697,44 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co
// minor increment
Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements;
rSubIncrementSeq.realloc( 1 );
- sal_Int32 nCount = 0;
- if( !bAutoMajor && !bAutoMinor && (0.0 < maData.mfMinorStep) && (maData.mfMinorStep <= maData.mfMajorStep) )
+ Any& rIntervalCount = rSubIncrementSeq[ 0 ].IntervalCount;
+ if( bLogScale )
{
- double fCount = maData.mfMajorStep / maData.mfMinorStep + 0.5;
- if( fCount < 1001.0 )
- nCount = static_cast< sal_Int32 >( fCount );
+ rIntervalCount <<= sal_Int32( 10 );
+ }
+ else
+ {
+ sal_Int32 nCount = 0;
+ if( !bAutoMajor && !bAutoMinor && (0.0 < maData.mfMinorStep) && (maData.mfMinorStep <= maData.mfMajorStep) )
+ {
+ double fCount = maData.mfMajorStep / maData.mfMinorStep + 0.5;
+ if( fCount < 1001.0 )
+ nCount = static_cast< sal_Int32 >( fCount );
+ }
+ lclSetValueOrClearAny( rIntervalCount, nCount, nCount == 0 );
}
- lclSetValueOrClearAny( rSubIncrementSeq[ 0 ].IntervalCount, nCount, nCount == 0 );
// reverse order
- namespace cssc = ::com::sun::star::chart2;
+ namespace cssc2 = ::com::sun::star::chart2;
bool bReverse = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_REVERSE ) != bMirrorOrient;
- rScaleData.Orientation = bReverse ? cssc::AxisOrientation_REVERSE : cssc::AxisOrientation_MATHEMATICAL;
+ rScaleData.Orientation = bReverse ? cssc2::AxisOrientation_REVERSE : cssc2::AxisOrientation_MATHEMATICAL;
+}
+
+void XclImpChValueRange::ConvertAxisPosition( ScfPropertySet& rPropSet ) const
+{
+ bool bMaxCross = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_MAXCROSS );
+ bool bAutoCross = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOCROSS );
+ bool bLogScale = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE );
+
+ // crossing mode (max-cross flag overrides other crossing settings)
+ namespace cssc = ::com::sun::star::chart;
+ cssc::ChartAxisPosition eAxisPos = bMaxCross ? cssc::ChartAxisPosition_END : cssc::ChartAxisPosition_VALUE;
+ rPropSet.SetProperty( EXC_CHPROP_CROSSOVERPOSITION, eAxisPos );
+
+ // crossing position
+ double fCrossingPos = bAutoCross ? 0.0 : maData.mfCross;
+ if( bLogScale ) fCrossingPos = pow( 10.0, fCrossingPos );
+ rPropSet.SetProperty( EXC_CHPROP_CROSSOVERVALUE, fCrossingPos );
}
// ----------------------------------------------------------------------------
@@ -2688,6 +2750,18 @@ sal_Int32 lclGetApiTickmarks( sal_uInt8 nXclTickPos )
return nApiTickmarks;
}
+::com::sun::star::chart::ChartAxisLabelPosition lclGetApiLabelPosition( sal_Int8 nXclLabelPos )
+{
+ using namespace ::com::sun::star::chart;
+ switch( nXclLabelPos )
+ {
+ case EXC_CHTICK_LOW: return ChartAxisLabelPosition_OUTSIDE_START;
+ case EXC_CHTICK_HIGH: return ChartAxisLabelPosition_OUTSIDE_END;
+ case EXC_CHTICK_NEXT: return ChartAxisLabelPosition_NEAR_AXIS;
+ }
+ return ChartAxisLabelPosition_NEAR_AXIS;
+}
+
} // namespace
XclImpChTick::XclImpChTick( const XclImpChRoot& rRoot ) :
@@ -2734,6 +2808,8 @@ void XclImpChTick::Convert( ScfPropertySet& rPropSet ) const
{
rPropSet.SetProperty( EXC_CHPROP_MAJORTICKS, lclGetApiTickmarks( maData.mnMajor ) );
rPropSet.SetProperty( EXC_CHPROP_MINORTICKS, lclGetApiTickmarks( maData.mnMinor ) );
+ rPropSet.SetProperty( EXC_CHPROP_LABELPOSITION, lclGetApiLabelPosition( maData.mnLabelPos ) );
+ rPropSet.SetProperty( EXC_CHPROP_MARKPOSITION, ::com::sun::star::chart::ChartAxisMarkPosition_AT_AXIS );
}
// ----------------------------------------------------------------------------
@@ -2822,8 +2898,10 @@ sal_uInt16 XclImpChAxis::GetRotation() const
return mxTick.is() ? mxTick->GetRotation() : EXC_CHART_AUTOROTATION;
}
-Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup, bool bPrimary ) const
+Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup, const XclImpChAxis* pCrossingAxis ) const
{
+ namespace cssc2 = ::com::sun::star::chart2;
+
// create the axis object (always)
Reference< XAxis > xAxis( ScfApiHelper::CreateInstance( SERVICE_CHART2_AXIS ), UNO_QUERY );
if( xAxis.is() )
@@ -2853,7 +2931,7 @@ Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup
else if( const XclImpChText* pDefText = GetChartData().GetDefaultText( EXC_CHTEXTTYPE_AXISLABEL ).get() )
pDefText->ConvertFont( aAxisProp );
// label text rotation
- ConvertRotationBase( GetChRoot(), aAxisProp );
+ ConvertRotationBase( GetChRoot(), aAxisProp, true );
// number format
sal_uInt32 nScNumFmt = GetNumFmtBuffer().GetScFormat( mnNumFmtIdx );
if( nScNumFmt != NUMBERFORMAT_ENTRY_NOT_FOUND )
@@ -2865,42 +2943,46 @@ Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup
const XclChExtTypeInfo& rTypeInfo = rTypeGroup.GetTypeInfo();
ScaleData aScaleData = xAxis->getScaleData();
// set axis type
- namespace ApiAxisType = ::com::sun::star::chart2::AxisType;
switch( GetAxisType() )
{
case EXC_CHAXIS_X:
if( rTypeInfo.mbCategoryAxis )
{
- aScaleData.AxisType = ApiAxisType::CATEGORY;
+ aScaleData.AxisType = cssc2::AxisType::CATEGORY;
aScaleData.Categories = rTypeGroup.CreateCategSequence();
}
else
- aScaleData.AxisType = ApiAxisType::REALNUMBER;
+ aScaleData.AxisType = cssc2::AxisType::REALNUMBER;
break;
case EXC_CHAXIS_Y:
aScaleData.AxisType = rTypeGroup.IsPercent() ?
- ApiAxisType::PERCENT : ApiAxisType::REALNUMBER;
+ cssc2::AxisType::PERCENT : cssc2::AxisType::REALNUMBER;
break;
case EXC_CHAXIS_Z:
- aScaleData.AxisType = ApiAxisType::SERIES;
+ aScaleData.AxisType = cssc2::AxisType::SERIES;
break;
}
// axis scaling settings, dependent on axis type
switch( aScaleData.AxisType )
{
- case ApiAxisType::CATEGORY:
- case ApiAxisType::SERIES:
+ case cssc2::AxisType::CATEGORY:
+ case cssc2::AxisType::SERIES:
// #i71684# radar charts have reversed rotation direction
mxLabelRange->Convert( aAxisProp, aScaleData, rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_RADAR );
break;
- case ApiAxisType::REALNUMBER:
- case ApiAxisType::PERCENT:
+ case cssc2::AxisType::REALNUMBER:
+ case cssc2::AxisType::PERCENT:
// #i85167# pie/donut charts have reversed rotation direction (at Y axis!)
mxValueRange->Convert( aScaleData, rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_PIE );
break;
default:
DBG_ERRORFILE( "XclImpChAxis::CreateAxis - unknown axis type" );
}
+
+ /* Do not set a value to the Origin member anymore (will be done via
+ new axis properties 'CrossoverPosition' and 'CrossoverValue'). */
+ aScaleData.Origin.clear();
+
// write back
xAxis->setScaleData( aScaleData );
@@ -2921,9 +3003,10 @@ Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup
mxMinorGrid->Convert( GetChRoot(), aSubGridProp, EXC_CHOBJTYPE_GRIDLINE );
}
- // axis position ------------------------------------------------------
+ // position of crossing axis ------------------------------------------
- aAxisProp.SetProperty( CREATE_OUSTRING( "CrossoverPosition" ), bPrimary ? ::com::sun::star::chart::ChartAxisPosition_START : ::com::sun::star::chart::ChartAxisPosition_END );
+ if( pCrossingAxis )
+ pCrossingAxis->ConvertAxisPosition( aAxisProp, rTypeGroup );
}
return xAxis;
}
@@ -2934,6 +3017,14 @@ void XclImpChAxis::ConvertWall( ScfPropertySet& rPropSet ) const
mxWallFrame->Convert( rPropSet );
}
+void XclImpChAxis::ConvertAxisPosition( ScfPropertySet& rPropSet, const XclImpChTypeGroup& rTypeGroup ) const
+{
+ if( ((GetAxisType() == EXC_CHAXIS_X) && rTypeGroup.GetTypeInfo().mbCategoryAxis) || (GetAxisType() == EXC_CHAXIS_Z) )
+ mxLabelRange->ConvertAxisPosition( rPropSet, rTypeGroup.Is3dChart() );
+ else
+ mxValueRange->ConvertAxisPosition( rPropSet );
+}
+
void XclImpChAxis::ReadChAxisLine( XclImpStream& rStrm )
{
XclImpChLineFormatRef* pxLineFmt = 0;
@@ -3041,13 +3132,13 @@ void XclImpChAxesSet::Finalize()
// invalid chart type groups are deleted now, check again with IsValidAxesSet()
if( IsValidAxesSet() )
{
- // create dummy X axis for charts supporting category ranges
- XclImpChTypeGroupRef xTypeGroup = GetFirstTypeGroup();
- if( !mxXAxis && xTypeGroup.is() && xTypeGroup->GetTypeInfo().mbCategoryAxis )
+ // always create missing axis objects
+ if( !mxXAxis )
mxXAxis.reset( new XclImpChAxis( GetChRoot(), EXC_CHAXIS_X ) );
- // create dummy Y axis for pie/doughnut charts
- if( !mxYAxis && xTypeGroup.is() && (xTypeGroup->GetTypeInfo().meTypeCateg == EXC_CHTYPECATEG_PIE) )
+ if( !mxYAxis )
mxYAxis.reset( new XclImpChAxis( GetChRoot(), EXC_CHAXIS_Y ) );
+ if( !mxZAxis && GetFirstTypeGroup()->Is3dDeepChart() )
+ mxZAxis.reset( new XclImpChAxis( GetChRoot(), EXC_CHAXIS_Z ) );
// finalize axes
if( mxXAxis.is() ) mxXAxis->Finalize();
@@ -3113,9 +3204,9 @@ void XclImpChAxesSet::Convert( Reference< XDiagram > xDiagram ) const
}
// create the axes with grids and axis titles and insert them into the diagram
- ConvertAxis( mxXAxis, mxXAxisTitle, xCoordSystem );
- ConvertAxis( mxYAxis, mxYAxisTitle, xCoordSystem );
- ConvertAxis( mxZAxis, mxZAxisTitle, xCoordSystem );
+ ConvertAxis( mxXAxis, mxXAxisTitle, xCoordSystem, mxYAxis.get() );
+ ConvertAxis( mxYAxis, mxYAxisTitle, xCoordSystem, mxXAxis.get() );
+ ConvertAxis( mxZAxis, mxZAxisTitle, xCoordSystem, 0 );
}
}
}
@@ -3217,12 +3308,12 @@ Reference< XCoordinateSystem > XclImpChAxesSet::CreateCoordSystem( Reference< XD
void XclImpChAxesSet::ConvertAxis(
XclImpChAxisRef xChAxis, XclImpChTextRef xChAxisTitle,
- Reference< XCoordinateSystem > xCoordSystem ) const
+ Reference< XCoordinateSystem > xCoordSystem, const XclImpChAxis* pCrossingAxis ) const
{
if( xChAxis.is() )
{
// create and attach the axis object
- Reference< XAxis > xAxis = CreateAxis( *xChAxis );
+ Reference< XAxis > xAxis = CreateAxis( *xChAxis, pCrossingAxis );
if( xAxis.is() )
{
// create and attach the axis title
@@ -3248,11 +3339,11 @@ void XclImpChAxesSet::ConvertAxis(
}
}
-Reference< XAxis > XclImpChAxesSet::CreateAxis( const XclImpChAxis& rChAxis ) const
+Reference< XAxis > XclImpChAxesSet::CreateAxis( const XclImpChAxis& rChAxis, const XclImpChAxis* pCrossingAxis ) const
{
Reference< XAxis > xAxis;
if( const XclImpChTypeGroup* pTypeGroup = GetFirstTypeGroup().get() )
- xAxis = rChAxis.CreateAxis( *pTypeGroup, GetAxesSetId() == EXC_CHAXESSET_PRIMARY );
+ xAxis = rChAxis.CreateAxis( *pTypeGroup, pCrossingAxis );
return xAxis;
}
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index 76253fcb1f2f..af8cbfdf229f 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -94,6 +94,16 @@ bool operator<( const XclChDataPointPos& rL, const XclChDataPointPos& rR )
((rL.mnSeriesIdx == rR.mnSeriesIdx) && (rL.mnPointIdx < rR.mnPointIdx));
}
+// ----------------------------------------------------------------------------
+
+XclChFrBlock::XclChFrBlock( sal_uInt16 nType ) :
+ mnType( nType ),
+ mnContext( 0 ),
+ mnValue1( 0 ),
+ mnValue2( 0 )
+{
+}
+
// Frame formatting ===========================================================
XclChFramePos::XclChFramePos() :
@@ -169,6 +179,13 @@ XclChObjectLink::XclChObjectLink() :
// ----------------------------------------------------------------------------
+XclChFrLabelProps::XclChFrLabelProps() :
+ mnFlags( 0 )
+{
+}
+
+// ----------------------------------------------------------------------------
+
XclChText::XclChText() :
maTextColor( COL_BLACK ),
mnHAlign( EXC_CHTEXT_ALIGN_CENTER ),
@@ -500,12 +517,12 @@ namespace csscd = ::com::sun::star::chart::DataLabelPlacement;
static const XclChTypeInfo spTypeInfos[] =
{
- // chart type chart type category record id service varied point color def label combi comb2d 3d polar area2d area3d 1stvis xcateg swap stack revers betw
+ // chart type chart type category record id service varied point color def label pos comb2d 3d polar area2d area3d 1stvis xcateg swap stack revers betw
{ EXC_CHTYPEID_BAR, EXC_CHTYPECATEG_BAR, EXC_ID_CHBAR, SERVICE_CHART2_COLUMN, EXC_CHVARPOINT_SINGLE, csscd::OUTSIDE, true, true, false, true, true, false, true, false, true, false, true },
{ EXC_CHTYPEID_HORBAR, EXC_CHTYPECATEG_BAR, EXC_ID_CHBAR, SERVICE_CHART2_COLUMN, EXC_CHVARPOINT_SINGLE, csscd::OUTSIDE, false, true, false, true, true, false, true, true, true, false, true },
- { EXC_CHTYPEID_LINE, EXC_CHTYPECATEG_LINE, EXC_ID_CHLINE, SERVICE_CHART2_LINE, EXC_CHVARPOINT_SINGLE, csscd::RIGHT, true, true, false, false, true, false, true, false, true, false, true },
+ { EXC_CHTYPEID_LINE, EXC_CHTYPECATEG_LINE, EXC_ID_CHLINE, SERVICE_CHART2_LINE, EXC_CHVARPOINT_SINGLE, csscd::RIGHT, true, true, false, false, true, false, true, false, true, false, false },
{ EXC_CHTYPEID_AREA, EXC_CHTYPECATEG_LINE, EXC_ID_CHAREA, SERVICE_CHART2_AREA, EXC_CHVARPOINT_NONE, csscd::CENTER, true, true, false, true, true, false, true, false, true, true, false },
- { EXC_CHTYPEID_STOCK, EXC_CHTYPECATEG_LINE, EXC_ID_CHLINE, SERVICE_CHART2_CANDLE, EXC_CHVARPOINT_NONE, csscd::RIGHT, true, false, false, false, false, false, true, false, true, false, true },
+ { EXC_CHTYPEID_STOCK, EXC_CHTYPECATEG_LINE, EXC_ID_CHLINE, SERVICE_CHART2_CANDLE, EXC_CHVARPOINT_NONE, csscd::RIGHT, true, false, false, false, false, false, true, false, true, false, false },
{ EXC_CHTYPEID_RADARLINE, EXC_CHTYPECATEG_RADAR, EXC_ID_CHRADARLINE, SERVICE_CHART2_NET, EXC_CHVARPOINT_SINGLE, csscd::TOP, false, false, true, false, true, false, true, false, false, false, false },
{ EXC_CHTYPEID_RADARAREA, EXC_CHTYPECATEG_RADAR, EXC_ID_CHRADARAREA, SERVICE_CHART2_NET, EXC_CHVARPOINT_NONE, csscd::TOP, false, false, true, true, true, false, true, false, false, false, false },
{ EXC_CHTYPEID_PIE, EXC_CHTYPECATEG_PIE, EXC_ID_CHPIE, SERVICE_CHART2_PIE, EXC_CHVARPOINT_MULTI, csscd::AVOID_OVERLAP, false, true, true, true, true, true, true, false, false, false, false },
@@ -664,8 +681,6 @@ const sal_Char* const sppcHatchNamesFilled[] = { "FillStyle", "HatchName", "Colo
/** Property names for bitmap area style. */
const sal_Char* const sppcBitmapNames[] = { "FillStyle", "FillBitmapName", "FillBitmapMode", 0 };
-/** Property names for text rotation properties. */
-const sal_Char* const sppcRotationNames[] = { "TextRotation", "StackCharacters", 0 };
/** Property names for legend properties. */
const sal_Char* const sppcLegendNames[] =
{ "Show", "AnchorPosition", "Expansion", "RelativePosition", 0 };
@@ -685,7 +700,6 @@ XclChPropSetHelper::XclChPropSetHelper() :
maHatchHlpCommon( sppcHatchNamesCommon ),
maHatchHlpFilled( sppcHatchNamesFilled ),
maBitmapHlp( sppcBitmapNames ),
- maRotationHlp( sppcRotationNames ),
maLegendHlp( sppcLegendNames )
{
}
@@ -934,13 +948,12 @@ void XclChPropSetHelper::ReadMarkerProperties(
}
}
-sal_uInt16 XclChPropSetHelper::ReadRotationProperties( const ScfPropertySet& rPropSet )
+sal_uInt16 XclChPropSetHelper::ReadRotationProperties( const ScfPropertySet& rPropSet, bool bSupportsStacked )
{
// chart2 handles rotation as double in the range [0,360)
- double fAngle(0);
- bool bStacked;
- maRotationHlp.ReadFromPropertySet( rPropSet );
- maRotationHlp >> fAngle >> bStacked;
+ double fAngle = 0.0;
+ rPropSet.GetProperty( fAngle, EXC_CHPROP_TEXTROTATION );
+ bool bStacked = bSupportsStacked && rPropSet.GetBoolProperty( EXC_CHPROP_STACKCHARACTERS );
return bStacked ? EXC_ROT_STACKED :
XclTools::GetXclRotation( static_cast< sal_Int32 >( fAngle * 100.0 + 0.5 ) );
}
@@ -1183,16 +1196,15 @@ void XclChPropSetHelper::WriteMarkerProperties(
}
void XclChPropSetHelper::WriteRotationProperties(
- ScfPropertySet& rPropSet, sal_uInt16 nRotation )
+ ScfPropertySet& rPropSet, sal_uInt16 nRotation, bool bSupportsStacked )
{
if( nRotation != EXC_CHART_AUTOROTATION )
{
// chart2 handles rotation as double in the range [0,360)
double fAngle = XclTools::GetScRotation( nRotation, 0 ) / 100.0;
- bool bStacked = nRotation == EXC_ROT_STACKED;
- maRotationHlp.InitializeWrite();
- maRotationHlp << fAngle << bStacked;
- maRotationHlp.WriteToPropertySet( rPropSet );
+ rPropSet.SetProperty( EXC_CHPROP_TEXTROTATION, fAngle );
+ if( bSupportsStacked )
+ rPropSet.SetProperty( EXC_CHPROP_STACKCHARACTERS, nRotation == EXC_ROT_STACKED );
}
}
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index 7f11a6ec173d..e8fab52ca819 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -661,8 +661,9 @@ void XclFontPropSetHelper::ReadFontProperties( XclFontData& rFontData,
fApiHeight, fApiWeight, eApiPosture, nApiUnderl, nApiStrikeout );
// font escapement
- sal_Int16 nApiEscapement;
- sal_Int8 nApiEscHeight;
+ sal_Int16 nApiEscapement = 0;
+ sal_Int8 nApiEscHeight = 0;
+ maHlpChEscapement.ReadFromPropertySet( rPropSet );
maHlpChEscapement >> nApiEscapement >> nApiEscHeight;
rFontData.SetApiEscapement( nApiEscapement );
}
@@ -724,6 +725,7 @@ void XclFontPropSetHelper::WriteFontProperties(
// font escapement
if( rFontData.GetScEscapement() != SVX_ESCAPEMENT_OFF )
{
+ maHlpChEscapement.InitializeWrite();
maHlpChEscapement << rFontData.GetApiEscapement() << EXC_API_ESC_HEIGHT;
maHlpChEscapement.WriteToPropertySet( rPropSet );
}
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index 854d848a1e22..8a724aab1457 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -70,7 +70,12 @@ namespace com { namespace sun { namespace star {
class XclExpChRootData;
class XclExpChChart;
-/** Base class for complex chart classes, provides access to other components of the chart. */
+/** Base class for complex chart classes, provides access to other components
+ of the chart.
+
+ Keeps also track of future record levels and writes the needed future
+ records on demand.
+ */
class XclExpChRoot : public XclExpRoot
{
public:
@@ -127,6 +132,14 @@ public:
/** Reads the pie rotation property and returns the converted angle. */
static sal_uInt16 ConvertPieRotation( const ScfPropertySet& rPropSet );
+protected:
+ /** Called from XclExpChGroupBase::Save, registers a new future record level. */
+ void RegisterFutureRecBlock( const XclChFrBlock& rFrBlock );
+ /** Called from XclExpChFutureRecordBase::Save, Initializes the current future record level. */
+ void InitializeFutureRecBlock( XclExpStream& rStrm );
+ /** Called from XclExpChGroupBase::Save, finalizes the current future record level. */
+ void FinalizeFutureRecBlock( XclExpStream& rStrm );
+
private:
typedef ScfRef< XclExpChRootData > XclExpChRootDataRef;
XclExpChRootDataRef mxChData; /// Reference to the root data object.
@@ -139,11 +152,11 @@ private:
A chart record group consists of a header record, followed by a CHBEGIN
record, followed by group sub records, and finished with a CHEND record.
*/
-class XclExpChGroupBase : public XclExpRecord
+class XclExpChGroupBase : public XclExpRecord, protected XclExpChRoot
{
public:
- /** @param bWriteBeginEnd true = write CHBEGIN/CHEND records enclosing sub records. */
explicit XclExpChGroupBase(
+ const XclExpChRoot& rRoot, sal_uInt16 nFrType,
sal_uInt16 nRecId, sal_Size nRecSize = 0 );
virtual ~XclExpChGroupBase();
@@ -153,6 +166,29 @@ public:
virtual bool HasSubRecords() const;
/** Derived classes implement writing any records embedded in this group. */
virtual void WriteSubRecords( XclExpStream& rStrm ) = 0;
+
+protected:
+ /** Sets context information for future record blocks. */
+ void SetFutureRecordContext( sal_uInt16 nFrContext,
+ sal_uInt16 nFrValue1 = 0, sal_uInt16 nFrValue2 = 0 );
+
+private:
+ XclChFrBlock maFrBlock; /// Future records block settings.
+};
+
+// ----------------------------------------------------------------------------
+
+/** Base class for chart future records. On saving, the record writes missing
+ CHFRBLOCKBEGIN records automatically.
+ */
+class XclExpChFutureRecordBase : public XclExpFutureRecord, protected XclExpChRoot
+{
+public:
+ explicit XclExpChFutureRecordBase( const XclExpChRoot& rRoot,
+ XclFutureRecType eRecType, sal_uInt16 nRecId, sal_Size nRecSize = 0 );
+
+ /** Writes missing CHFRBLOCKBEGIN records and this record. */
+ virtual void Save( XclExpStream& rStrm );
};
// Frame formatting ===========================================================
@@ -232,8 +268,7 @@ public:
explicit XclExpChEscherFormat( const XclExpChRoot& rRoot );
/** Converts complex area formatting from the passed property set. */
- void Convert( const XclExpChRoot& rRoot,
- const ScfPropertySet& rPropSet, XclChObjectType eObjType );
+ void Convert( const ScfPropertySet& rPropSet, XclChObjectType eObjType );
/** Returns true, if the object contains valid formatting data. */
bool IsValid() const;
@@ -247,7 +282,7 @@ public:
private:
/** Inserts a color from the contained Escher property set into the color palette. */
- sal_uInt32 RegisterColor( const XclExpChRoot& rRoot, sal_uInt16 nPropId );
+ sal_uInt32 RegisterColor( sal_uInt16 nPropId );
virtual void WriteBody( XclExpStream& rStrm );
@@ -301,7 +336,7 @@ private:
The CHFRAME group consists of: CHFRAME, CHBEGIN, CHLINEFORMAT,
CHAREAFORMAT, CHESCHERFORMAT group, CHEND.
*/
-class XclExpChFrame : public XclExpChGroupBase, public XclExpChFrameBase, protected XclExpChRoot
+class XclExpChFrame : public XclExpChGroupBase, public XclExpChFrameBase
{
public:
explicit XclExpChFrame( const XclExpChRoot& rRoot, XclChObjectType eObjType );
@@ -395,6 +430,29 @@ typedef ScfRef< XclExpChObjectLink > XclExpChObjectLinkRef;
// ----------------------------------------------------------------------------
+/** Additional data label settings in the future record CHFRLABELPROPS. */
+class XclExpChFrLabelProps : public XclExpChFutureRecordBase
+{
+public:
+ explicit XclExpChFrLabelProps( const XclExpChRoot& rRoot );
+
+ /** Converts separator and the passed data label flags. */
+ void Convert(
+ const ScfPropertySet& rPropSet, bool bShowSeries,
+ bool bShowCateg, bool bShowValue,
+ bool bShowPercent, bool bShowBubble );
+
+private:
+ virtual void WriteBody( XclExpStream& rStrm );
+
+private:
+ XclChFrLabelProps maData; /// Contents of the CHFRLABELPROPS record.
+};
+
+typedef ScfRef< XclExpChFrLabelProps > XclExpChFrLabelPropsRef;
+
+// ----------------------------------------------------------------------------
+
/** Base class for objects with font settings. Provides font conversion helper functions. */
class XclExpChFontBase
{
@@ -411,7 +469,7 @@ public:
/** Creates a CHFONT record from the passed font index, calls virtual function SetFont(). */
void ConvertFontBase( const XclExpChRoot& rRoot, const ScfPropertySet& rPropSet );
/** Converts rotation settings, calls virtual function SetRotation(). */
- void ConvertRotationBase( const XclExpChRoot& rRoot, const ScfPropertySet& rPropSet );
+ void ConvertRotationBase( const XclExpChRoot& rRoot, const ScfPropertySet& rPropSet, bool bSupportsStacked );
};
// ----------------------------------------------------------------------------
@@ -421,7 +479,7 @@ public:
The CHTEXT group consists of: CHTEXT, CHBEGIN, CHFRAMEPOS, CHFONT,
CHFORMATRUNS, CHSOURCELINK, CHSTRING, CHFRAME group, CHOBJECTLINK, and CHEND.
*/
-class XclExpChText : public XclExpChGroupBase, public XclExpChFontBase, protected XclExpChRoot
+class XclExpChText : public XclExpChGroupBase, public XclExpChFontBase
{
public:
typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > XTitleRef;
@@ -462,6 +520,7 @@ private:
XclExpChFrameRef mxFrame; /// Text object frame properties (CHFRAME group).
XclExpChFontRef mxFont; /// Index into font buffer (CHFONT record).
XclExpChObjectLinkRef mxObjLink; /// Link target for this text object.
+ XclExpChFrLabelPropsRef mxLabelProps; /// Extended data label properties (CHFRLABELPROPS record).
sal_uInt32 mnTextColorId; /// Text color identifier.
};
@@ -556,7 +615,7 @@ typedef ScfRef< XclExpChAttachedLabel > XclExpChAttLabelRef;
CHMARKERFORMAT, CHPIEFORMAT, CH3DDATAFORMAT, CHSERIESFORMAT,
CHATTACHEDLABEL, CHEND.
*/
-class XclExpChDataFormat : public XclExpChGroupBase, public XclExpChFrameBase, protected XclExpChRoot
+class XclExpChDataFormat : public XclExpChGroupBase, public XclExpChFrameBase
{
public:
explicit XclExpChDataFormat( const XclExpChRoot& rRoot,
@@ -647,7 +706,7 @@ typedef ScfRef< XclExpChSerErrorBar > XclExpChSerErrorBarRef;
CHDATAFORMAT groups, CHSERGROUP, CHSERPARENT, CHSERERRORBAR,
CHSERTRENDLINE, CHEND.
*/
-class XclExpChSeries : public XclExpChGroupBase, protected XclExpChRoot
+class XclExpChSeries : public XclExpChGroupBase
{
public:
typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > XDiagramRef;
@@ -776,7 +835,7 @@ typedef ScfRef< XclExpChChart3d > XclExpChChart3dRef;
The CHLEGEND group consists of: CHLEGEND, CHBEGIN, CHFRAME group,
CHTEXT group, CHEND.
*/
-class XclExpChLegend : public XclExpChGroupBase, protected XclExpChRoot
+class XclExpChLegend : public XclExpChGroupBase
{
public:
explicit XclExpChLegend( const XclExpChRoot& rRoot );
@@ -808,10 +867,10 @@ typedef ScfRef< XclExpChLegend > XclExpChLegendRef;
class XclExpChDropBar : public XclExpChGroupBase, public XclExpChFrameBase
{
public:
- explicit XclExpChDropBar( XclChObjectType eObjType );
+ explicit XclExpChDropBar( const XclExpChRoot& rRoot, XclChObjectType eObjType );
/** Converts and writes the contained frame data to the passed property set. */
- void Convert( const XclExpChRoot& rRoot, const ScfPropertySet& rPropSet );
+ void Convert( const ScfPropertySet& rPropSet );
/** Writes all embedded records. */
virtual void WriteSubRecords( XclExpStream& rStrm );
@@ -835,7 +894,7 @@ typedef ScfRef< XclExpChDropBar > XclExpChDropBarRef;
CHDROPBAR groups, CHCHARTLINE groups (CHCHARTLINE with CHLINEFORMAT),
CHDATAFORMAT group, CHEND.
*/
-class XclExpChTypeGroup : public XclExpChGroupBase, protected XclExpChRoot
+class XclExpChTypeGroup : public XclExpChGroupBase
{
public:
typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > XDiagramRef;
@@ -912,19 +971,15 @@ typedef ScfRef< XclExpChTypeGroup > XclExpChTypeGroupRef;
class XclExpChLabelRange : public XclExpRecord, protected XclExpChRoot
{
public:
- typedef ::com::sun::star::chart2::ScaleData ScaleData;
-
-public:
explicit XclExpChLabelRange( const XclExpChRoot& rRoot );
/** Converts category axis scaling settings. */
- void Convert( const ScaleData& rScaleData, bool bMirrorOrient );
+ void Convert( const ::com::sun::star::chart2::ScaleData& rScaleData, bool bMirrorOrient );
+ /** Converts position settings of a crossing axis at this axis. */
+ void ConvertAxisPosition( const ScfPropertySet& rPropSet );
/** Sets flag for tickmark position between categories or on categories. */
inline void SetTicksBetweenCateg( bool bTicksBetween )
{ ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_BETWEEN, bTicksBetween ); }
- /** Swaps flag for crossing axis at maximum position. */
- inline void SwapAxisMaxCross()
- { ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_MAXCROSS, !::get_flag( maData.mnFlags, EXC_CHLABELRANGE_MAXCROSS ) ); }
private:
virtual void WriteBody( XclExpStream& rStrm );
@@ -940,13 +995,12 @@ typedef ScfRef< XclExpChLabelRange > XclExpChLabelRangeRef;
class XclExpChValueRange : public XclExpRecord, protected XclExpChRoot
{
public:
- typedef ::com::sun::star::chart2::ScaleData ScaleData;
-
-public:
explicit XclExpChValueRange( const XclExpChRoot& rRoot );
/** Converts value axis scaling settings. */
- void Convert( const ScaleData& rScaleData );
+ void Convert( const ::com::sun::star::chart2::ScaleData& rScaleData );
+ /** Converts position settings of a crossing axis at this axis. */
+ void ConvertAxisPosition( const ScfPropertySet& rPropSet );
private:
virtual void WriteBody( XclExpStream& rStrm );
@@ -965,13 +1019,11 @@ public:
explicit XclExpChTick( const XclExpChRoot& rRoot );
/** Converts axis tick mark settings. */
- void Convert( const ScfPropertySet& rPropSet );
+ void Convert( const ScfPropertySet& rPropSet, const XclChExtTypeInfo& rTypeInfo, sal_uInt16 nAxisType );
/** Sets font color and color identifier to internal data structures. */
void SetFontColor( const Color& rColor, sal_uInt32 nColorId );
/** Sets text rotation to internal data structures. */
void SetRotation( sal_uInt16 nRotation );
- /** Sets position of axis labels relative to axis. */
- inline void SetLabelPos( sal_uInt8 nLabelPos ) { maData.mnLabelPos = nLabelPos; }
private:
virtual void WriteBody( XclExpStream& rStrm );
@@ -991,7 +1043,7 @@ typedef ScfRef< XclExpChTick > XclExpChTickRef;
CHVALUERANGE, CHFORMAT, CHTICK, CHFONT, CHAXISLINE groups (CHAXISLINE with
CHLINEFORMAT, CHAREAFORMAT, and CHESCHERFORMAT group), CHEND.
*/
-class XclExpChAxis : public XclExpChGroupBase, public XclExpChFontBase, protected XclExpChRoot
+class XclExpChAxis : public XclExpChGroupBase, public XclExpChFontBase
{
public:
typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > XDiagramRef;
@@ -1006,7 +1058,7 @@ public:
virtual void SetRotation( sal_uInt16 nRotation );
/** Converts formatting and scaling settings from the passed axis. */
- void Convert( XAxisRef xAxis, const XclChExtTypeInfo& rTypeInfo, sal_Int32 nApiAxesSetIdx );
+ void Convert( XAxisRef xAxis, XAxisRef xCrossingAxis, const XclChExtTypeInfo& rTypeInfo );
/** Converts and writes 3D wall/floor properties from the passed diagram. */
void ConvertWall( XDiagramRef xDiagram );
@@ -1044,7 +1096,7 @@ typedef ScfRef< XclExpChAxis > XclExpChAxisRef;
groups, CHTEXT groups, CHPLOTFRAME group (CHPLOTFRAME with CHFRAME group),
CHTYPEGROUP group, CHEND.
*/
-class XclExpChAxesSet : public XclExpChGroupBase, protected XclExpChRoot
+class XclExpChAxesSet : public XclExpChGroupBase
{
public:
typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > XDiagramRef;
@@ -1078,7 +1130,8 @@ private:
/** Converts a complete axis object including axis title. */
void ConvertAxis( XclExpChAxisRef& rxChAxis, sal_uInt16 nAxisType,
XclExpChTextRef& rxChAxisTitle, sal_uInt16 nTitleTarget,
- XCoordSystemRef xCoordSystem, const XclChExtTypeInfo& rTypeInfo );
+ XCoordSystemRef xCoordSystem, const XclChExtTypeInfo& rTypeInfo,
+ sal_Int32 nCrossingAxisDim );
virtual void WriteBody( XclExpStream& rStrm );
@@ -1106,7 +1159,7 @@ typedef ScfRef< XclExpChAxesSet > XclExpChAxesSetRef;
group, CHSERIES groups, CHPROPERTIES, CHDEFAULTTEXT groups (CHDEFAULTTEXT
with CHTEXT groups), CHUSEDAXESSETS, CHAXESSET groups, CHTEXT groups, CHEND.
*/
-class XclExpChChart : public XclExpChGroupBase, protected XclExpChRoot
+class XclExpChChart : public XclExpChGroupBase
{
public:
typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > XChartDocRef;
diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx
index 355541234651..8abd4d0c3eae 100644
--- a/sc/source/filter/inc/xerecord.hxx
+++ b/sc/source/filter/inc/xerecord.hxx
@@ -169,7 +169,7 @@ public:
/** Writes the record header and calls WriteBody(). */
virtual void Save( XclExpStream& rStrm );
-private:
+protected:
/** Writes the body of the record (without record header).
@descr Usually this method will be overwritten by derived classes. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -311,6 +311,21 @@ private:
const void* mpData; /// The record data.
};
+// Future records =============================================================
+
+class XclExpFutureRecord : public XclExpRecord
+{
+public:
+ explicit XclExpFutureRecord( XclFutureRecType eRecType,
+ sal_uInt16 nRecId, sal_Size nRecSize = 0 );
+
+ /** Writes the extended record header and calls WriteBody(). */
+ virtual void Save( XclExpStream& rStrm );
+
+private:
+ XclFutureRecType meRecType;
+};
+
// List of records ============================================================
/** A list of Excel record objects.
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index 901701a779bd..8383f58857d3 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -433,7 +433,7 @@ public:
/** Converts and writes the contained font settings to the passed property set. */
void ConvertFontBase( const XclImpChRoot& rRoot, ScfPropertySet& rPropSet ) const;
/** Converts and writes the contained rotation settings to the passed property set. */
- void ConvertRotationBase( const XclImpChRoot& rRoot, ScfPropertySet& rPropSet ) const;
+ void ConvertRotationBase( const XclImpChRoot& rRoot, ScfPropertySet& rPropSet, bool bSupportsStacked ) const;
};
// ----------------------------------------------------------------------------
@@ -500,6 +500,8 @@ public:
/** Converts and writes the contained font settings to the passed property set. */
void ConvertFont( ScfPropertySet& rPropSet ) const;
+ /** Converts and writes the contained rotation settings to the passed property set. */
+ void ConvertRotation( ScfPropertySet& rPropSet, bool bSupportsStacked ) const;
/** Converts and writes the contained frame data to the passed property set. */
void ConvertFrame( ScfPropertySet& rPropSet ) const;
/** Converts and writes the contained number format to the passed property set. */
@@ -512,13 +514,19 @@ public:
private:
using XclImpChRoot::ConvertFont;
+ /** Reads a CHFRLABELPROPS record. */
+ void ReadChFrLabelProps( XclImpStream& rStrm );
+
private:
+ typedef ScfRef< XclChFrLabelProps > XclChFrLabelPropsRef;
+
XclChText maData; /// Contents of the CHTEXT record.
XclChObjectLink maObjLink; /// Link target for this text object.
XclFormatRunVec maFormats; /// Formatting runs (CHFORMATRUNS record).
XclImpChSourceLinkRef mxSrcLink; /// Linked data (CHSOURCELINK with CHSTRING record).
XclImpChFrameRef mxFrame; /// Text object frame properties (CHFRAME group).
XclImpChFontRef mxFont; /// Index into font buffer (CHFONT record).
+ XclChFrLabelPropsRef mxLabelProps; /// Extended data label properties (CHFRLABELPROPS record).
};
typedef ScfRef< XclImpChText > XclImpChTextRef;
@@ -1100,6 +1108,8 @@ public:
void ReadChLabelRange( XclImpStream& rStrm );
/** Converts category axis scaling settings. */
void Convert( ScfPropertySet& rPropSet, ScaleData& rScaleData, bool bMirrorOrient ) const;
+ /** Converts position settings of this axis at a crossing axis. */
+ void ConvertAxisPosition( ScfPropertySet& rPropSet, bool b3dChart ) const;
private:
XclChLabelRange maData; /// Contents of the CHLABELRANGE record.
@@ -1120,6 +1130,8 @@ public:
void ReadChValueRange( XclImpStream& rStrm );
/** Converts value axis scaling settings. */
void Convert( ScaleData& rScaleData, bool bMirrorOrient ) const;
+ /** Converts position settings of this axis at a crossing axis. */
+ void ConvertAxisPosition( ScfPropertySet& rPropSet ) const;
private:
XclChValueRange maData; /// Contents of the CHVALUERANGE record.
@@ -1196,9 +1208,11 @@ public:
inline bool HasMinorGrid() const { return mxMinorGrid.is(); }
/** Creates an API axis object. */
- XAxisRef CreateAxis( const XclImpChTypeGroup& rTypeGroup, bool bPrimary ) const;
+ XAxisRef CreateAxis( const XclImpChTypeGroup& rTypeGroup, const XclImpChAxis* pCrossingAxis ) const;
/** Converts and writes 3D wall/floor properties to the passed property set. */
void ConvertWall( ScfPropertySet& rPropSet ) const;
+ /** Converts position settings of this axis at a crossing axis. */
+ void ConvertAxisPosition( ScfPropertySet& rPropSet, const XclImpChTypeGroup& rTypeGroup ) const;
private:
/** Reads a CHAXISLINE record specifying the target for following line properties. */
@@ -1282,9 +1296,9 @@ private:
XCoordSystemRef CreateCoordSystem( XDiagramRef xDiagram ) const;
/** Creates and inserts an axis into the container and registers the coordinate system. */
void ConvertAxis( XclImpChAxisRef xChAxis, XclImpChTextRef xChAxisTitle,
- XCoordSystemRef xCoordSystem ) const;
+ XCoordSystemRef xCoordSystem, const XclImpChAxis* pCrossingAxis ) const;
/** Creates and returns an API axis object. */
- XAxisRef CreateAxis( const XclImpChAxis& rChAxis ) const;
+ XAxisRef CreateAxis( const XclImpChAxis& rChAxis, const XclImpChAxis* pCrossingAxis ) const;
/** Writes all properties of the background area to the passed diagram. */
void ConvertBackground( XDiagramRef xDiagram ) const;
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 7038fc1c55cc..77e85eda32b9 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -74,11 +74,14 @@ namespace com { namespace sun { namespace star {
#define SERVICE_CHART2_TITLE CREATE_OUSTRING( "com.sun.star.chart2.Title" )
// property names
+#define EXC_CHPROP_ARRANGEORDER CREATE_OUSTRING( "ArrangeOrder" )
#define EXC_CHPROP_ATTAXISINDEX CREATE_OUSTRING( "AttachedAxisIndex" )
#define EXC_CHPROP_ATTRIBDATAPOINTS CREATE_OUSTRING( "AttributedDataPoints" )
#define EXC_CHPROP_BLACKDAY CREATE_OUSTRING( "BlackDay" )
#define EXC_CHPROP_COLOR CREATE_OUSTRING( "Color" )
#define EXC_CHPROP_CONNECTBARS CREATE_OUSTRING( "ConnectBars" )
+#define EXC_CHPROP_CROSSOVERPOSITION CREATE_OUSTRING( "CrossoverPosition" )
+#define EXC_CHPROP_CROSSOVERVALUE CREATE_OUSTRING( "CrossoverValue" )
#define EXC_CHPROP_CURVESTYLE CREATE_OUSTRING( "CurveStyle" )
#define EXC_CHPROP_D3DCAMERAGEOMETRY CREATE_OUSTRING( "D3DCameraGeometry" )
#define EXC_CHPROP_D3DSCENEAMBIENTCOLOR CREATE_OUSTRING( "D3DSceneAmbientColor" )
@@ -101,7 +104,10 @@ namespace com { namespace sun { namespace star {
#define EXC_CHPROP_JAPANESE CREATE_OUSTRING( "Japanese" )
#define EXC_CHPROP_LABEL CREATE_OUSTRING( "Label" )
#define EXC_CHPROP_LABELPLACEMENT CREATE_OUSTRING( "LabelPlacement" )
+#define EXC_CHPROP_LABELPOSITION CREATE_OUSTRING( "LabelPosition" )
+#define EXC_CHPROP_LABELSEPARATOR CREATE_OUSTRING( "LabelSeparator" )
#define EXC_CHPROP_MAJORTICKS CREATE_OUSTRING( "MajorTickmarks" )
+#define EXC_CHPROP_MARKPOSITION CREATE_OUSTRING( "MarkPosition" )
#define EXC_CHPROP_MINORTICKS CREATE_OUSTRING( "MinorTickmarks" )
#define EXC_CHPROP_MISSINGVALUETREATMENT CREATE_OUSTRING( "MissingValueTreatment" )
#define EXC_CHPROP_NEGATIVEERROR CREATE_OUSTRING( "NegativeError" )
@@ -123,12 +129,14 @@ namespace com { namespace sun { namespace star {
#define EXC_CHPROP_SHOWHIGHLOW CREATE_OUSTRING( "ShowHighLow" )
#define EXC_CHPROP_SHOWNEGATIVEERROR CREATE_OUSTRING( "ShowNegativeError" )
#define EXC_CHPROP_SHOWPOSITIVEERROR CREATE_OUSTRING( "ShowPositiveError" )
+#define EXC_CHPROP_STACKCHARACTERS CREATE_OUSTRING( "StackCharacters" )
#define EXC_CHPROP_STACKINGDIR CREATE_OUSTRING( "StackingDirection" )
#define EXC_CHPROP_STARTINGANGLE CREATE_OUSTRING( "StartingAngle" )
#define EXC_CHPROP_SWAPXANDYAXIS CREATE_OUSTRING( "SwapXAndYAxis" )
#define EXC_CHPROP_SYMBOL CREATE_OUSTRING( "Symbol" )
#define EXC_CHPROP_TEXTBREAK CREATE_OUSTRING( "TextBreak" )
#define EXC_CHPROP_TEXTOVERLAP CREATE_OUSTRING( "TextOverlap" )
+#define EXC_CHPROP_TEXTROTATION CREATE_OUSTRING( "TextRotation" )
#define EXC_CHPROP_USERINGS CREATE_OUSTRING( "UseRings" )
#define EXC_CHPROP_VARYCOLORSBY CREATE_OUSTRING( "VaryColorsByPoint" )
#define EXC_CHPROP_WEIGHT CREATE_OUSTRING( "Weight" )
@@ -162,6 +170,52 @@ const sal_Int32 EXC_CHART_AXESSET_NONE = -1; /// For internal use
const sal_Int32 EXC_CHART_AXESSET_PRIMARY = 0; /// API primary axes set index.
const sal_Int32 EXC_CHART_AXESSET_SECONDARY = 1; /// API secondary axes set index.
+// (0x0850) CHFRINFO ----------------------------------------------------------
+
+const sal_uInt16 EXC_ID_CHFRINFO = 0x0850;
+
+const sal_uInt8 EXC_CHFRINFO_EXCEL2000 = 9;
+const sal_uInt8 EXC_CHFRINFO_EXCELXP2003 = 10;
+const sal_uInt8 EXC_CHFRINFO_EXCEL2007 = 11;
+
+// (0x0852, 0x0853) CHFRBLOCKBEGIN, CHFRBLOCKEND ------------------------------
+
+const sal_uInt16 EXC_ID_CHFRBLOCKBEGIN = 0x0852;
+const sal_uInt16 EXC_ID_CHFRBLOCKEND = 0x0853;
+
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXESSET = 0;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_TEXT = 2;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXIS = 4;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_TYPEGROUP = 5;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_DATATABLE = 6;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_FRAME = 7;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_LEGEND = 9;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_LEGENDEX = 10;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_SERIES = 12;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_CHART = 13;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_DATAFORMAT = 14;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_DROPBAR = 15;
+const sal_uInt16 EXC_CHFRBLOCK_TYPE_UNKNOWN = 0xFFFF; /// For internal use only.
+
+const sal_uInt16 EXC_CHFRBLOCK_TEXT_TITLE = 0;
+const sal_uInt16 EXC_CHFRBLOCK_TEXT_DEFTEXT = 2;
+const sal_uInt16 EXC_CHFRBLOCK_TEXT_AXISTITLE = 4;
+const sal_uInt16 EXC_CHFRBLOCK_TEXT_DATALABEL = 5;
+
+const sal_uInt16 EXC_CHFRBLOCK_FRAME_STANDARD = 0;
+const sal_uInt16 EXC_CHFRBLOCK_FRAME_PLOTFRAME = 1;
+const sal_uInt16 EXC_CHFRBLOCK_FRAME_BACKGROUND = 2;
+
+// (0x086B) CHFRLABELPROPS ----------------------------------------------------
+
+const sal_uInt16 EXC_ID_CHFRLABELPROPS = 0x086B;
+
+const sal_uInt16 EXC_CHFRLABELPROPS_SHOWSERIES = 0x0001;
+const sal_uInt16 EXC_CHFRLABELPROPS_SHOWCATEG = 0x0002;
+const sal_uInt16 EXC_CHFRLABELPROPS_SHOWVALUE = 0x0004;
+const sal_uInt16 EXC_CHFRLABELPROPS_SHOWPERCENT = 0x0008;
+const sal_uInt16 EXC_CHFRLABELPROPS_SHOWBUBBLE = 0x0010;
+
// (0x1001) CHUNITS -----------------------------------------------------------
const sal_uInt16 EXC_ID_CHUNITS = 0x1001;
@@ -700,6 +754,20 @@ struct XclChDataPointPos
bool operator<( const XclChDataPointPos& rL, const XclChDataPointPos& rR );
+// ----------------------------------------------------------------------------
+
+/** Contains the type and context of a block of future records which are
+ guarded by CHFRBLOCKBEGIN and CHFRBLOCKEND records. */
+struct XclChFrBlock
+{
+ sal_uInt16 mnType; /// Type of the future record block.
+ sal_uInt16 mnContext; /// Context dependent on type.
+ sal_uInt16 mnValue1; /// Optional primary value for current context.
+ sal_uInt16 mnValue2; /// Optional secondary value for current context.
+
+ explicit XclChFrBlock( sal_uInt16 nType );
+};
+
// Frame formatting ===========================================================
struct XclChFramePos
@@ -798,6 +866,16 @@ struct XclChObjectLink
// ----------------------------------------------------------------------------
+struct XclChFrLabelProps
+{
+ String maSeparator; /// Separator between label values.
+ sal_uInt16 mnFlags; /// Flags indicating which values to be displayed.
+
+ explicit XclChFrLabelProps();
+};
+
+// ----------------------------------------------------------------------------
+
struct XclChText
{
XclChRectangle maRect; /// Position of the text object.
@@ -1282,7 +1360,8 @@ public:
sal_uInt16 nFormatIdx );
/** Reads rotation properties from the passed property set. */
sal_uInt16 ReadRotationProperties(
- const ScfPropertySet& rPropSet );
+ const ScfPropertySet& rPropSet,
+ bool bSupportsStacked );
/** Reads all legend properties from the passed property set. */
void ReadLegendProperties(
XclChLegend& rLegend,
@@ -1315,7 +1394,8 @@ public:
/** Writes rotation properties to the passed property set. */
void WriteRotationProperties(
ScfPropertySet& rPropSet,
- sal_uInt16 nRotation );
+ sal_uInt16 nRotation,
+ bool bSupportsStacked );
/** Writes all legend properties to the passed property set. */
void WriteLegendProperties(
ScfPropertySet& rPropSet,
@@ -1342,7 +1422,6 @@ private:
ScfPropSetHelper maHatchHlpCommon; /// Properties for hatches in common objects.
ScfPropSetHelper maHatchHlpFilled; /// Properties for hatches in filled series.
ScfPropSetHelper maBitmapHlp; /// Properties for bitmaps.
- ScfPropSetHelper maRotationHlp; /// Properties for text rotation.
ScfPropSetHelper maLegendHlp; /// Properties for legend.
};
diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx
index 2d3135bc0816..eebaa76e4702 100644
--- a/sc/source/filter/inc/xlconst.hxx
+++ b/sc/source/filter/inc/xlconst.hxx
@@ -230,6 +230,19 @@ const sal_uInt16 EXC_ID_USESELFS = 0x0160;
const sal_uInt16 EXC_ID_USERSVIEWBEGIN = 0x01AA;
const sal_uInt16 EXC_ID_USERSVIEWEND = 0x01AB;
+// (0x8xx) Future records -----------------------------------------------------
+
+/** Enumerates different header types of future records. */
+enum XclFutureRecType
+{
+ EXC_FUTUREREC_SIMPLE, /// Record identifier and empty flags field.
+ EXC_FUTUREREC_UNUSEDREF /// Record identifier, empty flags field, unused range address.
+};
+
+const sal_uInt16 EXC_FUTUREREC_EMPTYFLAGS = 0x0000;
+const sal_uInt16 EXC_FUTUREREC_HASREF = 0x0001;
+const sal_uInt16 EXC_FUTUREREC_ALERT = 0x0002;
+
// ============================================================================
#endif