summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-07-02 19:17:43 +0000
committerRelease Engineers <releng@openoffice.org>2009-07-02 19:17:43 +0000
commit44569a657c4282757443ae06efc6441e571a0409 (patch)
treebf446449db3c764a11e9a327f03f9468fc31e9f5 /chart2/source/controller
parentbe14833d0fe6be523299e09a72ae61d93a04bc04 (diff)
CWS-TOOLING: integrate CWS bubblechart
2009-06-17 08:41:14 +0200 hde r273051 : i101635: added new charttype bubble 2009-06-17 08:39:37 +0200 hde r273050 : i101635: created new testcase tCreateNewBubbleChart 2009-06-17 08:38:07 +0200 hde r273049 : i101635: created new testcase tCreateNewBubbleChart 2009-06-15 15:22:32 +0200 hde r272991 : 101635 2009-06-11 12:44:01 +0200 iha r272864 : rebase to dev300m50 2009-06-10 23:27:54 +0200 iha r272841 : CWS-TOOLING: rebase CWS bubblechart to trunk@272827 (milestone: DEV300:m50) 2009-06-04 18:07:35 +0200 iha r272649 : #i64689# Bubble Chart 2009-06-04 17:26:44 +0200 iha r272647 : #i64689# Bubble Chart 2009-06-04 11:24:25 +0200 iha r272618 : #i64689# add more spacing between bubbles and data labels 2009-05-26 18:05:23 +0200 ufi r272314 : i101637 2009-04-22 14:37:50 +0200 iha r271115 : #i64689# bubble chart 2009-04-21 17:52:23 +0200 iha r271052 : #i64689# bubble chart 2009-04-21 17:50:48 +0200 iha r271051 : #i76728# type icon for xy chart 2009-04-21 17:25:52 +0200 iha r271049 : #i76728# type icon for xy chart 2009-04-09 11:18:09 +0200 iha r270685 : #i100977# autoscaling works not correct if missing values should be treated as zero 2009-04-08 16:39:43 +0200 iha r270656 : #i64689# bubble chart - missing value treatment 2009-04-08 15:13:25 +0200 iha r270655 : #i64689# bubble chart - remove unused code 2009-04-08 15:12:19 +0200 iha r270653 : #i64689# bubble chart - determine sereis length correctly on export 2009-04-08 14:22:43 +0200 iha r270650 : #i64689# bubble chart - remove unused code 2009-04-08 14:12:09 +0200 iha r270646 : #i64689# bubble chart - export domains even if no main sequence was found 2009-04-08 14:11:07 +0200 iha r270645 : #i64689# bubble chart - don't replace missing size values with 1.0 2009-04-07 16:20:22 +0200 iha r270602 : #i64689# bubble chart - do not offer percent values for data label display for xy and bubble chart 2009-04-07 16:17:42 +0200 iha r270601 : remove superfluous code 2009-04-06 16:39:32 +0200 iha r270569 : #i64689# bubble chart -correct automatic numberformat detection for axis, data table and data label + transport data label numberformat during copy paste in addition to axis numberformat 2009-04-02 17:33:33 +0200 iha r270427 : use input string for formatting in data table during edit 2009-04-02 16:00:29 +0200 iha r270413 : #i64689# bubble chart - when creating a new series within the data table give it the same number format as the former series, thus the new bubble size values can be edited with the same format immidiately 2009-04-02 11:25:33 +0200 iha r270385 : #i64689# bubble chart -correct automatic numberformat detection for axis, data table and data label + transport data label numberformat during copy paste in addition to axis numberformat 2009-04-01 11:32:03 +0200 iha r270312 : #i64689# bubble chart - add further parameter for view creation 2009-03-31 17:52:08 +0200 iha r270291 : #i64689# bubble chart - scale bubble size with diagram size 2009-03-31 13:38:13 +0200 iha r270278 : #i64689# bubble chart - wrong size for small values < 1 2009-03-27 19:11:07 +0100 iha r270169 : #i64689# bubble chart 2009-03-27 19:07:11 +0100 iha r270168 : #i64689# bubble chart - remove unused code 2009-03-27 18:33:57 +0100 iha r270167 : #i64689# bubble chart - create no shape for invalid sizes 2009-03-27 15:18:21 +0100 iha r270157 : #i76728# type icon for xy chart 2009-03-27 14:34:38 +0100 iha r270156 : #i64689# bubble chart - correct scaling 2009-03-27 14:27:27 +0100 iha r270155 : #i64689# bubble chart - images 2009-03-27 14:25:45 +0100 iha r270154 : #i64689# bubble chart - images 2009-03-27 11:38:57 +0100 iha r270142 : #i64689# bubble chart - values-size is the main series 2009-03-27 11:30:20 +0100 iha r270140 : #i64689# correct order of sequences after load thus switching charttypes afterwards produces expected results now 2009-03-26 10:22:55 +0100 iha r270056 : #i64689# bubble chart 2009-03-24 17:45:15 +0100 iha r269984 : #i64689# bubble chart - user properties from points (not only from the series) 2009-03-24 15:10:57 +0100 dr r269954 : #i64989# export bubble charts to xls 2009-03-24 14:55:29 +0100 dr r269952 : #i64989# import bubble charts from xls 2009-03-24 14:54:46 +0100 dr r269950 : #i64989# import bubble charts from ooxml 2009-03-23 18:59:08 +0100 iha r269895 : further cleanups possible with new member m_aGlobalSeriesImportInfo 2009-03-23 16:54:04 +0100 iha r269886 : #i64689# bubble chart - a single sequence must be interpreted as sizes because of ODF specification 2009-03-23 16:50:43 +0100 iha r269885 : #i64689# save&load bubble chart 2009-03-20 19:30:29 +0100 iha r269826 : CWS-TOOLING: rebase CWS bubblechart to trunk@269781 (milestone: DEV300:m44) 2009-03-19 11:30:33 +0100 iha r269732 : #i64689# rename SchXMLCategoriesDomainContext to SchXMLCategoriesContext avoid confusion with domains 2009-03-18 17:11:13 +0100 iha r269693 : #i64689# add charttype bubble 2009-03-18 17:09:22 +0100 iha r269692 : #i64689# remove unused code 2009-03-13 12:18:26 +0100 iha r269467 : #i64689# corrected lineends 2009-03-12 11:25:14 +0100 iha r269376 : #i64689# bubble chart (part 1)
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx11
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx12
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx13
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx11
-rw-r--r--chart2/source/controller/dialogs/Bitmaps.hrc28
-rw-r--r--chart2/source/controller/dialogs/Bitmaps.src14
-rw-r--r--chart2/source/controller/dialogs/Bitmaps_HC.hrc26
-rw-r--r--chart2/source/controller/dialogs/Bitmaps_HC.src14
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.cxx36
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.hxx13
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx8
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx38
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx2
-rw-r--r--chart2/source/controller/dialogs/ObjectNameProvider.cxx9
-rw-r--r--chart2/source/controller/dialogs/Strings.src5
-rw-r--r--chart2/source/controller/dialogs/Strings_ChartTypes.src9
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx13
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx1
-rw-r--r--chart2/source/controller/inc/DataPointItemConverter.hxx1
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx11
-rw-r--r--chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx4
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx5
25 files changed, 256 insertions, 43 deletions
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index 4b44b2e0593d..3d930f72f0af 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -177,6 +177,17 @@ sal_Int32 Chart2ModelContact::getExplicitNumberFormatKeyForAxis(
, Reference< util::XNumberFormatsSupplier >( m_xChartModel.get(), uno::UNO_QUERY ) );
}
+sal_Int32 Chart2ModelContact::getExplicitNumberFormatKeyForSeries(
+ const Reference< chart2::XDataSeries >& xSeries )
+{
+ return ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel(
+ uno::Reference< beans::XPropertySet >( xSeries, uno::UNO_QUERY ),
+ xSeries,
+ -1 /*-1 for whole series*/,
+ ChartModelHelper::findDiagram( m_xChartModel )
+ );
+}
+
//-----------------------------------------------------------------------------
awt::Size Chart2ModelContact::GetPageSize() const
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
index b8ce668dff28..0cc8a16bafff 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
@@ -34,6 +34,7 @@
#include <com/sun/star/chart2/ExplicitIncrementData.hpp>
#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/XTitle.hpp>
#include <cppuhelper/weakref.hxx>
@@ -87,6 +88,9 @@ public:
sal_Int32 getExplicitNumberFormatKeyForAxis(
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis );
+ sal_Int32 getExplicitNumberFormatKeyForSeries(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries );
+
/** Returns the size of the page in logic coordinates. This value is used
for setting an appropriate "ReferencePageSize" for FontHeights.
*/
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 3e3b7254f578..fcc17fefeebc 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -98,6 +98,7 @@ enum eServiceType
SERVICE_NAME_PIE_DIAGRAM,
SERVICE_NAME_STOCK_DIAGRAM,
SERVICE_NAME_XY_DIAGRAM,
+ SERVICE_NAME_BUBBLE_DIAGRAM,
SERVICE_NAME_DASH_TABLE,
SERVICE_NAME_GARDIENT_TABLE,
@@ -126,6 +127,7 @@ tServiceNameMap & lcl_getStaticServiceNameMap()
( C2U( "com.sun.star.chart.PieDiagram" ), SERVICE_NAME_PIE_DIAGRAM )
( C2U( "com.sun.star.chart.StockDiagram" ), SERVICE_NAME_STOCK_DIAGRAM )
( C2U( "com.sun.star.chart.XYDiagram" ), SERVICE_NAME_XY_DIAGRAM )
+ ( C2U( "com.sun.star.chart.BubbleDiagram" ), SERVICE_NAME_BUBBLE_DIAGRAM )
( C2U( "com.sun.star.drawing.DashTable" ), SERVICE_NAME_DASH_TABLE )
( C2U( "com.sun.star.drawing.GradientTable" ), SERVICE_NAME_GARDIENT_TABLE )
@@ -1367,6 +1369,16 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
}
break;
+ case SERVICE_NAME_BUBBLE_DIAGRAM:
+ if( xManagerFact.is())
+ {
+ xTemplate.set(
+ xManagerFact->createInstance(
+ C2U( "com.sun.star.chart2.template.Bubble" )), uno::UNO_QUERY );
+ bCreateDiagram = true;
+ }
+ break;
+
case SERVICE_NAME_DASH_TABLE:
case SERVICE_NAME_GARDIENT_TABLE:
case SERVICE_NAME_HATCH_TABLE:
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index a6c18f9475dc..ce417155dc4f 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 "WrappedNumberFormatProperty.hxx"
#include "WrappedTextRotationProperty.hxx"
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
@@ -88,6 +89,7 @@ enum
PROP_SERIES_DATAPOINT_PERCENT_DIAGONAL,
PROP_SERIES_DATAPOINT_LABEL_SEPARATOR,
PROP_SERIES_NUMBERFORMAT,
+ PROP_SERIES_LINK_NUMBERFORMAT_TO_SOURCE,
PROP_SERIES_PERCENTAGE_NUMBERFORMAT,
PROP_SERIES_DATAPOINT_LABEL_PLACEMENT,
//other series properties
@@ -165,6 +167,13 @@ void lcl_AddPropertiesToVector_SeriesOnly(
::getCppuType( reinterpret_cast< sal_Int32 * >(0)),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT ));
+
+ rOutProperties.push_back(
+ Property( C2U( "LinkNumberFormatToSource" ),
+ PROP_SERIES_LINK_NUMBERFORMAT_TO_SOURCE,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
}
const uno::Sequence< Property > & lcl_GetPropertySequence( DataSeriesPointWrapper::eType _eType )
@@ -713,6 +722,10 @@ const std::vector< WrappedProperty* > DataSeriesPointWrapper::createWrappedPrope
{
WrappedStatisticProperties::addWrappedPropertiesForSeries( aWrappedProperties, m_spChart2ModelContact );
aWrappedProperties.push_back( new WrappedAttachedAxisProperty( m_spChart2ModelContact ) );
+
+ WrappedNumberFormatProperty* pWrappedNumberFormatProperty = new WrappedNumberFormatProperty( m_spChart2ModelContact );
+ aWrappedProperties.push_back( pWrappedNumberFormatProperty );
+ aWrappedProperties.push_back( new WrappedLinkNumberFormatProperty(pWrappedNumberFormatProperty) );
}
WrappedSymbolProperties::addWrappedPropertiesForSeries( aWrappedProperties, m_spChart2ModelContact );
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 5bd12775fbcd..fe1359aab7f3 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -549,6 +549,9 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName )
if( aName.indexOf( C2U("Stock") ) != -1 )
return C2U( "com.sun.star.chart.StockDiagram" );
+ if( aName.indexOf( C2U("Bubble") ) != -1 )
+ return C2U( "com.sun.star.chart.BubbleDiagram" );
+
// Note: this must be checked after Bar, Net and Scatter
// "Symbol" "StackedSymbol" "PercentStackedSymbol" "Line" "StackedLine"
@@ -594,6 +597,9 @@ const tMakeStringStringMap& lcl_getChartTypeNameMap()
( ::rtl::OUString::createFromAscii( "com.sun.star.chart2.CandleStickChartType" )
, ::rtl::OUString::createFromAscii( "com.sun.star.chart.StockDiagram" ) )
+ ( ::rtl::OUString::createFromAscii( "com.sun.star.chart2.BubbleChartType" )
+ , ::rtl::OUString::createFromAscii( "com.sun.star.chart.BubbleDiagram" ) )
+
;
return g_aChartTypeNameMap;
}
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
index 4110a6ef3b54..00101ef10f34 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
@@ -98,8 +98,15 @@ Any WrappedNumberFormatProperty::getPropertyValue( const Reference< beans::XProp
Any aRet( xInnerPropertySet->getPropertyValue( m_aInnerName ));
if( !aRet.hasValue() )
{
- Reference< chart2::XAxis > xAxis( xInnerPropertySet, uno::UNO_QUERY );
- sal_Int32 nKey = m_spChart2ModelContact->getExplicitNumberFormatKeyForAxis( xAxis );
+ sal_Int32 nKey = 0;
+ Reference< chart2::XDataSeries > xSeries( xInnerPropertySet, uno::UNO_QUERY );
+ if( xSeries.is() )
+ nKey = m_spChart2ModelContact->getExplicitNumberFormatKeyForSeries( xSeries );
+ else
+ {
+ Reference< chart2::XAxis > xAxis( xInnerPropertySet, uno::UNO_QUERY );
+ nKey = m_spChart2ModelContact->getExplicitNumberFormatKeyForAxis( xAxis );
+ }
aRet <<= nKey;
}
return aRet;
diff --git a/chart2/source/controller/dialogs/Bitmaps.hrc b/chart2/source/controller/dialogs/Bitmaps.hrc
index 58b1d540cc1a..07ed2eeec0d5 100644
--- a/chart2/source/controller/dialogs/Bitmaps.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps.hrc
@@ -34,23 +34,28 @@
#include <svtools/solar.hrc>
#endif
-// next free: 100
-
#ifndef STD_MASKCOLOR
#define STD_MASKCOLOR Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; }
#endif
//-----------------------------------------------------------------------------
// chart types
+// Images:
#define IMG_TYPE_COLUMN (RID_APP_START + 1)
#define IMG_TYPE_BAR (RID_APP_START + 2)
#define IMG_TYPE_PIE (RID_APP_START + 3)
-#define IMG_TYPE_LINE (RID_APP_START + 4)
-#define IMG_TYPE_AREA (RID_APP_START + 5)
-#define IMG_TYPE_NET (RID_APP_START + 6)
-#define IMG_TYPE_STOCK (RID_APP_START + 7)
-#define IMG_TYPE_COLUMN_LINE (RID_APP_START + 8)
+#define IMG_TYPE_AREA (RID_APP_START + 4)
+#define IMG_TYPE_LINE (RID_APP_START + 5)
+#define IMG_TYPE_XY (RID_APP_START + 6)
+#define IMG_TYPE_BUBBLE (RID_APP_START + 7)
+#define IMG_TYPE_NET (RID_APP_START + 8)
+#define IMG_TYPE_STOCK (RID_APP_START + 9)
+#define IMG_TYPE_COLUMN_LINE (RID_APP_START + 10)
+
+//-----------------------------------------------------------------------------
+//Chart Subtypes
+// Bitmaps:
//----------------------
// Column Chart Subtypes
@@ -185,7 +190,13 @@
#define BMP_COLUMN_LINE (RID_APP_START + 86)
#define BMP_COLUMN_LINE_STACKED (RID_APP_START + 87)
+//----------------------
+// Bubble Chart Subtypes
+#define BMP_BUBBLE_1 (RID_APP_START + 88)
+
//-----------------------------------------------------------------------------
+//further Images:
+
//SchStatisticTabPage and SchDataStatisticsDlg part 1
#define BMP_INDICATE_BOTH_VERTI (RID_APP_START + 89)
#define BMP_INDICATE_UP (RID_APP_START + 90)
@@ -201,9 +212,8 @@
#define BMP_REGRESSION_EXP (RID_APP_START + 95)
#define BMP_REGRESSION_POWER (RID_APP_START + 96)
-//-----------------------------------------------------------------------------
// hide-button for range-choosing
-#define IMG_SELECTRANGE (RID_APP_START + 9)
+#define IMG_SELECTRANGE (RID_APP_START + 100)
// CHART_BITMAPS_HRC
#endif
diff --git a/chart2/source/controller/dialogs/Bitmaps.src b/chart2/source/controller/dialogs/Bitmaps.src
index 2af607b6963c..35a897848fb1 100644
--- a/chart2/source/controller/dialogs/Bitmaps.src
+++ b/chart2/source/controller/dialogs/Bitmaps.src
@@ -49,6 +49,11 @@ Image IMG_TYPE_LINE
ImageBitmap = Bitmap { File = "typepointline_16.png" ; };
MaskColor = STD_MASKCOLOR;
};
+Image IMG_TYPE_XY
+{
+ ImageBitmap = Bitmap { File = "typexy_16.png" ; };
+ MaskColor = STD_MASKCOLOR;
+};
Image IMG_TYPE_AREA
{
ImageBitmap = Bitmap { File = "typearea_16.png" ; };
@@ -69,6 +74,15 @@ Image IMG_TYPE_COLUMN_LINE
ImageBitmap = Bitmap { File = "typecolumnline_16.png" ; };
MaskColor = STD_MASKCOLOR;
};
+Image IMG_TYPE_BUBBLE
+{
+ ImageBitmap = Bitmap { File = "typebubble_16.png" ; };
+ MaskColor = STD_MASKCOLOR;
+};
+Bitmap BMP_BUBBLE_1
+{
+ File = "bubble_52x60.png" ;
+};
Bitmap BMP_AREAS_2D
{
File = "areas_52x60.png" ;
diff --git a/chart2/source/controller/dialogs/Bitmaps_HC.hrc b/chart2/source/controller/dialogs/Bitmaps_HC.hrc
index 0b65579973c5..84a23ba426bc 100644
--- a/chart2/source/controller/dialogs/Bitmaps_HC.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps_HC.hrc
@@ -41,15 +41,22 @@
//-----------------------------------------------------------------------------
// chart types
+// Images:
#define IMG_TYPE_COLUMN_HC (RID_SCH_START + 1)
#define IMG_TYPE_BAR_HC (RID_SCH_START + 2)
#define IMG_TYPE_PIE_HC (RID_SCH_START + 3)
-#define IMG_TYPE_LINE_HC (RID_SCH_START + 4)
-#define IMG_TYPE_AREA_HC (RID_SCH_START + 5)
-#define IMG_TYPE_NET_HC (RID_SCH_START + 6)
-#define IMG_TYPE_STOCK_HC (RID_SCH_START + 7)
-#define IMG_TYPE_COLUMN_LINE_HC (RID_SCH_START + 8)
+#define IMG_TYPE_AREA_HC (RID_SCH_START + 4)
+#define IMG_TYPE_LINE_HC (RID_SCH_START + 5)
+#define IMG_TYPE_XY_HC (RID_SCH_START + 6)
+#define IMG_TYPE_BUBBLE_HC (RID_SCH_START + 7)
+#define IMG_TYPE_NET_HC (RID_SCH_START + 8)
+#define IMG_TYPE_STOCK_HC (RID_SCH_START + 9)
+#define IMG_TYPE_COLUMN_LINE_HC (RID_SCH_START + 10)
+
+//-----------------------------------------------------------------------------
+//Chart Subtypes
+// Bitmaps:
//----------------------
// Column Chart Subtypes
@@ -183,7 +190,13 @@
#define BMP_COLUMN_LINE_HC (RID_SCH_START + 86)
#define BMP_COLUMN_LINE_STACKED_HC (RID_SCH_START + 87)
+//----------------------
+// Bubble Chart Subtypes
+#define BMP_BUBBLE_1_HC (RID_SCH_START + 88)
+
//-----------------------------------------------------------------------------
+//further Images:
+
//SchStatisticTabPage and SchDataStatisticsDlg part 1
#define BMP_INDICATE_BOTH_VERTI_HC (RID_SCH_START + 89)
#define BMP_INDICATE_UP_HC (RID_SCH_START + 90)
@@ -199,6 +212,5 @@
#define BMP_REGRESSION_EXP_HC (RID_SCH_START + 95)
#define BMP_REGRESSION_POWER_HC (RID_SCH_START + 96)
-//-----------------------------------------------------------------------------
// hide-button for range-choosing
-#define IMG_SELECTRANGE_HC (RID_SCH_START + 9)
+#define IMG_SELECTRANGE_HC (RID_SCH_START + 100)
diff --git a/chart2/source/controller/dialogs/Bitmaps_HC.src b/chart2/source/controller/dialogs/Bitmaps_HC.src
index 1e2fe5f4ba14..0fb7ef5e5a1a 100644
--- a/chart2/source/controller/dialogs/Bitmaps_HC.src
+++ b/chart2/source/controller/dialogs/Bitmaps_HC.src
@@ -49,6 +49,11 @@ Image IMG_TYPE_LINE_HC
ImageBitmap = Bitmap { File = "typepointline_16.png" ; };
MaskColor = SC_HC_MASKCOLOR;
};
+Image IMG_TYPE_XY_HC
+{
+ ImageBitmap = Bitmap { File = "typexy_16.png" ; };
+ MaskColor = SC_HC_MASKCOLOR;
+};
Image IMG_TYPE_AREA_HC
{
ImageBitmap = Bitmap { File = "typearea_16.png" ; };
@@ -69,6 +74,15 @@ Image IMG_TYPE_COLUMN_LINE_HC
ImageBitmap = Bitmap { File = "typecolumnline_16.png" ; };
MaskColor = SC_HC_MASKCOLOR;
};
+Image IMG_TYPE_BUBBLE_HC
+{
+ ImageBitmap = Bitmap { File = "typebubble_16.png" ; };
+ MaskColor = SC_HC_MASKCOLOR;
+};
+Bitmap BMP_BUBBLE_1_HC
+{
+ File = "bubble_52x60_h.png" ;
+};
Bitmap BMP_AREAS_2D_HC
{
File = "areas_52x60_h.png" ;
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 79efe0b04919..de57e82e58da 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -808,7 +808,7 @@ String XYChartDialogController::getName()
}
Image XYChartDialogController::getImage( bool bIsHighContrast )
{
- return SELECT_IMAGE( IMG_TYPE_LINE );
+ return SELECT_IMAGE( IMG_TYPE_XY );
}
const tTemplateServiceChartTypeParameterMap& XYChartDialogController::getTemplateMap() const
{
@@ -1238,6 +1238,40 @@ void CombiColumnLineChartDialogController::adjustParameterToSubType( ChartTypePa
break;
}
}
+//--------------------------------------------------------------------------
+BubbleChartDialogController::BubbleChartDialogController()
+{
+}
+BubbleChartDialogController::~BubbleChartDialogController()
+{
+}
+String BubbleChartDialogController::getName()
+{
+ return String( SchResId( STR_TYPE_BUBBLE ));
+}
+Image BubbleChartDialogController::getImage( bool bIsHighContrast )
+{
+ return SELECT_IMAGE( IMG_TYPE_BUBBLE );
+}
+const tTemplateServiceChartTypeParameterMap& BubbleChartDialogController::getTemplateMap() const
+{
+ static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
+ tTemplateServiceChartTypeParameterMap
+ ( C2U( "com.sun.star.chart2.template.Bubble" ), ChartTypeParameter(1,true) ) ;
+ return m_aTemplateMap;
+}
+void BubbleChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, bool bIsHighContrast, const ChartTypeParameter& /*rParameter*/ )
+{
+ rSubTypeList.Clear();
+ rSubTypeList.InsertItem( 1, SELECT_BITMAP( BMP_BUBBLE_1 ) );
+
+ rSubTypeList.SetItemText( 1, String( SchResId( STR_BUBBLE_1 )) );
+}
+void BubbleChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
+{
+ rParameter.b3DLook = false;
+ rParameter.eStackMode = GlobalStackMode_NONE;
+}
//.............................................................................
} //namespace chart
//.............................................................................
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
index 0f6c7a8ae2c0..cdbda807813f 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
@@ -301,6 +301,19 @@ private:
MetricField* m_pMF_NumberOfLines;
};
+class BubbleChartDialogController : public ChartTypeDialogController
+{
+public:
+ BubbleChartDialogController();
+ virtual ~BubbleChartDialogController();
+
+ virtual String getName();
+ virtual Image getImage( bool bIsHighContrast );
+ virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const;
+ virtual void fillSubTypeList( ValueSet& rSubTypeList, bool bIsHighContrast, const ChartTypeParameter& rParameter );
+ virtual void adjustParameterToSubType( ChartTypeParameter& rParameter );
+};
+
//.............................................................................
} //namespace chart
//.............................................................................
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index cf61b88a63ac..0a9b58758de6 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -407,8 +407,7 @@ Image SeriesHeader::GetChartTypeImage(
}
else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_SCATTER ))
{
- // @todo: correct image for scatter chart type
- aResult = SELECT_IMAGE( IMG_TYPE_LINE, bHC );
+ aResult = SELECT_IMAGE( IMG_TYPE_XY, bHC );
}
else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_PIE ))
{
@@ -423,6 +422,10 @@ Image SeriesHeader::GetChartTypeImage(
// @todo: correct image for candle-stick type
aResult = SELECT_IMAGE( IMG_TYPE_STOCK, bHC );
}
+ else if( aChartTypeName.equals( CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE ))
+ {
+ aResult = SELECT_IMAGE( IMG_TYPE_BUBBLE, bHC );
+ }
return aResult;
}
@@ -1068,6 +1071,7 @@ sal_Bool DataBrowser::IsTabAllowed( sal_Bool bForward ) const
if( CellContainsNumbers( nRow, nCol ))
{
+ m_aNumberEditField.UseInputStringForFormatting();
m_aNumberEditField.SetFormatKey( GetNumberFormatKey( nRow, nCol ));
return m_rNumberEditController;
}
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index e612edc0901b..1db67c6721af 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -41,6 +41,8 @@
#include "macros.hxx"
#include "StatisticsHelper.hxx"
#include "ContainerHelper.hxx"
+#include "ChartTypeHelper.hxx"
+#include "chartview/ExplicitValueProvider.hxx"
#include <com/sun/star/container/XIndexReplace.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
@@ -329,6 +331,8 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
Reference< chart2::XDataSeries > xSeries;
if( static_cast< tDataColumnVector::size_type >( nAfterColumnIndex ) <= m_aColumns.size())
xSeries.set( m_aColumns[nAfterColumnIndex].m_xDataSeries );
+
+ sal_Int32 nSeriesNumberFormat = 0;
if( xSeries.is())
{
xChartType.set( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ));
@@ -337,6 +341,10 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
lcl_DataSeriesOfHeaderMatches( xSeries )));
if( aIt != m_aHeaders.end())
nStartCol = aIt->m_nEndColumn;
+
+ Reference< beans::XPropertySet > xSeriesProps( xSeries, uno::UNO_QUERY );
+ if( xSeriesProps.is() )
+ xSeriesProps->getPropertyValue( C2U( "NumberFormat" )) >>= nSeriesNumberFormat;
}
else
{
@@ -404,6 +412,14 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
}
}
}
+ if( nSeriesNumberFormat != 0 )
+ {
+ //give the new series the same number format as the former series especially for bubble charts thus the bubble size values can be edited with same format immidiately
+ Reference< beans::XPropertySet > xNewSeriesProps( xNewSeries, uno::UNO_QUERY );
+ if( xNewSeriesProps.is() )
+ xNewSeriesProps->setPropertyValue( C2U( "NumberFormat" ), uno::makeAny( nSeriesNumberFormat ) );
+ }
+
updateFromModel();
}
}
@@ -724,11 +740,15 @@ void DataBrowserModel::updateFromModel()
{
Reference< chart2::XChartTypeContainer > xCTCnt( aCooSysSeq[nCooSysIdx], uno::UNO_QUERY_THROW );
Sequence< Reference< chart2::XChartType > > aChartTypes( xCTCnt->getChartTypes());
+ sal_Int32 nXAxisNumberFormat = DataSeriesHelper::getNumberFormatKeyFromAxis( 0, aCooSysSeq[nCooSysIdx], 0, 0 );
+
for( sal_Int32 nCTIdx=0; nCTIdx<aChartTypes.getLength(); ++nCTIdx )
{
Reference< chart2::XDataSeriesContainer > xSeriesCnt( aChartTypes[nCTIdx], uno::UNO_QUERY );
if( xSeriesCnt.is())
{
+ rtl::OUString aRoleForDataLabelNumberFormat = ChartTypeHelper::getRoleOfSequenceForDataLabelNumberFormatDetection( aChartTypes[nCTIdx] );
+
Sequence< Reference< chart2::XDataSeries > > aSeries( xSeriesCnt->getDataSeries());
lcl_tSharedSeqVec aSharedSequences( lcl_getSharedSequences( aSeries ));
for( lcl_tSharedSeqVec::const_iterator aIt( aSharedSequences.begin());
@@ -741,16 +761,15 @@ void DataBrowserModel::updateFromModel()
// as the sequences are shared it should be ok to take the first series
// @todo: dimension index 0 for x-values used here. This is just a guess.
// Also, the axis index is 0, as there is usually only one x-axis
- aSharedSequence.m_nNumberFormatKey =
- DataSeriesHelper::getNumberFormatKeyFromAxis(
- aSeries[0], aCooSysSeq[nCooSysIdx], 0, 0 );
+ aSharedSequence.m_nNumberFormatKey = nXAxisNumberFormat;
m_aColumns.push_back( aSharedSequence );
++nHeaderStart;
}
for( sal_Int32 nSeriesIdx=0; nSeriesIdx<aSeries.getLength(); ++nSeriesIdx )
{
tDataColumnVector::size_type nStartColIndex = m_aColumns.size();
- Reference< chart2::data::XDataSource > xSource( aSeries[nSeriesIdx], uno::UNO_QUERY );
+ Reference< chart2::XDataSeries > xSeries( aSeries[nSeriesIdx] );
+ Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
if( xSource.is())
{
Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSeqs( xSource->getDataSequences());
@@ -768,9 +787,14 @@ void DataBrowserModel::updateFromModel()
{
sal_Int32 nSequenceNumberFormatKey = nYAxisNumberFormatKey;
OUString aRole = lcl_getRole( aLSeqs[nSeqIdx] );
- if( aRole.equals( C2U( "values-x" ) ) )
- nSequenceNumberFormatKey = DataSeriesHelper::getNumberFormatKeyFromAxis(
- aSeries[nSeriesIdx], aCooSysSeq[nCooSysIdx], 0, 0 );
+
+ if( aRole.equals( aRoleForDataLabelNumberFormat ) )
+ {
+ nSequenceNumberFormatKey = ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel(
+ Reference< beans::XPropertySet >( xSeries, uno::UNO_QUERY ), xSeries, -1, xDiagram );
+ }
+ else if( aRole.equals( C2U( "values-x" ) ) )
+ nSequenceNumberFormatKey = nXAxisNumberFormat;
if( ::std::find_if( aSharedSequences.begin(), aSharedSequences.end(),
lcl_RepresentationsOfLSeqMatch( aLSeqs[nSeqIdx] )) == aSharedSequences.end())
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 1a7e8675f5bc..69e693911c22 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -108,6 +108,7 @@ OUString lcl_ConvertRole( const OUString & rRoleString, bool bFromInternalToUI )
aTranslationMap[ C2U( "values-min" ) ] = OUString( String( ::chart::SchResId( STR_DATA_ROLE_MIN )));
aTranslationMap[ C2U( "values-x" ) ] = OUString( String( ::chart::SchResId( STR_DATA_ROLE_X )));
aTranslationMap[ C2U( "values-y" ) ] = OUString( String( ::chart::SchResId( STR_DATA_ROLE_Y )));
+ aTranslationMap[ C2U( "values-size" ) ] = OUString( String( ::chart::SchResId( STR_DATA_ROLE_SIZE )));
}
if( bFromInternalToUI )
@@ -155,6 +156,7 @@ void lcl_createRoleIndexMap( lcl_tRoleIndexMap & rOutMap )
rOutMap[ C2U( "values-min" ) ] = ++nIndex;
rOutMap[ C2U( "values-max" ) ] = ++nIndex;
rOutMap[ C2U( "values-last" ) ] = ++nIndex;
+ rOutMap[ C2U( "values-size" ) ] = ++nIndex;
}
struct lcl_DataSeriesContainerAppend : public
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 7ee4ae67761d..1ed974814ea7 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -109,7 +109,7 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
Sequence< Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() );
- rtl::OUString aX, aY, aY_Min, aY_Max, aY_First, aY_Last;
+ rtl::OUString aX, aY, aY_Min, aY_Max, aY_First, aY_Last, a_Size;
double fValue = 0;
uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( xChartModel, uno::UNO_QUERY );
@@ -170,6 +170,12 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
sal_Int32 nNumberFormatKey = xDataSequence->getNumberFormatKeyByIndex( nPointIndex );
aY_Last = aNumberFormatterWrapper.getFormattedString( nNumberFormatKey, fValue, nLabelColor, bColorChanged );
}
+ else if( aRole.equals(C2U("values-size")) )
+ {
+ aData[nPointIndex]>>= fValue;
+ sal_Int32 nNumberFormatKey = xDataSequence->getNumberFormatKeyByIndex( nPointIndex );
+ a_Size = aNumberFormatterWrapper.getFormattedString( nNumberFormatKey, fValue, nLabelColor, bColorChanged );
+ }
}
catch( uno::Exception& e )
{
@@ -201,6 +207,7 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
lcl_addText( aRet, aSeparator, aY_Min );
lcl_addText( aRet, aSeparator, aY_Max );
lcl_addText( aRet, aSeparator, aY_Last );
+ lcl_addText( aRet, aSeparator, a_Size );
return aRet;
}
diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src
index b08fe754513f..3b384915f2d0 100644
--- a/chart2/source/controller/dialogs/Strings.src
+++ b/chart2/source/controller/dialogs/Strings.src
@@ -471,6 +471,11 @@ String STR_DATA_ROLE_Y
Text [ en-US ] = "Y-Values" ;
};
+String STR_DATA_ROLE_SIZE
+{
+ Text [ en-US ] = "Bubble Sizes" ;
+};
+
String STR_DATA_ROLE_X_ERROR
{
Text [ en-US ] = "X-Error-Bars" ;
diff --git a/chart2/source/controller/dialogs/Strings_ChartTypes.src b/chart2/source/controller/dialogs/Strings_ChartTypes.src
index 1e18f0e8724f..2234f04a3fcd 100644
--- a/chart2/source/controller/dialogs/Strings_ChartTypes.src
+++ b/chart2/source/controller/dialogs/Strings_ChartTypes.src
@@ -140,4 +140,13 @@ String STR_DEEP
Text [ en-US ] = "Deep" ;
};
//-----------------------------------------------------------------------------
+String STR_TYPE_BUBBLE
+{
+ Text [ en-US ] = "Bubble" ;
+};
+String STR_BUBBLE_1
+{
+ Text [ en-US ] = "Bubble Chart" ;
+};
+//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index a93711151ac1..c6129629a51a 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -215,6 +215,13 @@ 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);
+ if( rInAttrs.GetItemState(SCHATTR_DATADESCR_NO_PERCENTVALUE, TRUE, &pPoolItem) == SFX_ITEM_SET )
+ {
+ bool bForbidPercentValue = (static_cast< const SfxBoolItem & >( rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE )).GetValue() );
+ if( bForbidPercentValue )
+ m_aCBPercent.Enable(false);
+ }
+
m_aDC_Dial.SetLinkedField( &m_aNF_Degrees );
}
@@ -286,14 +293,14 @@ IMPL_LINK( DataLabelResources, CheckHdl, CheckBox*, pBox )
void DataLabelResources::EnableControls()
{
- m_aCBSymbol.Enable( m_aCBNumber.IsChecked() || m_aCBPercent.IsChecked() || m_aCBCategory.IsChecked() );
+ m_aCBSymbol.Enable( m_aCBNumber.IsChecked() || (m_aCBPercent.IsChecked() && m_aCBPercent.IsEnabled()) || m_aCBCategory.IsChecked() );
//enable separator
{
long nNumberOfCheckedLabelParts = 0;
if( m_aCBNumber.IsChecked() )
++nNumberOfCheckedLabelParts;
- if( m_aCBPercent.IsChecked() )
+ if( m_aCBPercent.IsChecked() && m_aCBPercent.IsEnabled() )
++nNumberOfCheckedLabelParts;
if( m_aCBCategory.IsChecked() )
++nNumberOfCheckedLabelParts;
@@ -307,7 +314,7 @@ void DataLabelResources::EnableControls()
}
m_aPB_NumberFormatForValue.Enable( m_pNumberFormatter && m_aCBNumber.IsChecked() );
- m_aPB_NumberFormatForPercent.Enable( m_pNumberFormatter && m_aCBPercent.IsChecked() );
+ m_aPB_NumberFormatForPercent.Enable( m_pNumberFormatter && m_aCBPercent.IsChecked() && m_aCBPercent.IsEnabled() );
bool bEnableRotation = ( m_aCBNumber.IsChecked() || m_aCBPercent.IsChecked() || m_aCBCategory.IsChecked() );
m_aFL_Rotate.Enable( bEnableRotation );
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index f60637af4c44..b2d64400ef98 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -862,6 +862,7 @@ ChartTypeTabPage::ChartTypeTabPage( Window* pParent
m_aChartTypeDialogControllerList.push_back(new AreaChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new LineChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new XYChartDialogController() );
+ m_aChartTypeDialogControllerList.push_back(new BubbleChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new NetChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new CombiColumnLineChartDialogController() );
diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx
index a59170f4d699..4eec81bd20b5 100644
--- a/chart2/source/controller/inc/DataPointItemConverter.hxx
+++ b/chart2/source/controller/inc/DataPointItemConverter.hxx
@@ -103,6 +103,7 @@ private:
sal_Int32 m_nNumberFormat;
sal_Int32 m_nPercentNumberFormat;
::com::sun::star::uno::Sequence< sal_Int32 > m_aAvailableLabelPlacements;
+ bool m_bForbidPercentValue;
};
} // namespace wrapper
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 0c0ea2d0dbdd..af062cf3b93c 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -239,7 +239,8 @@ DataPointItemConverter::DataPointItemConverter(
m_nSpecialFillColor(nSpecialFillColor),
m_nNumberFormat(nNumberFormat),
m_nPercentNumberFormat(nPercentNumberFormat),
- m_aAvailableLabelPlacements()
+ m_aAvailableLabelPlacements(),
+ m_bForbidPercentValue(true)
{
m_aConverters.push_back( new GraphicPropertyItemConverter(
rPropertySet, rItemPool, rDrawModel, xNamedPropertyContainerFactory, eMapTo ));
@@ -257,6 +258,8 @@ DataPointItemConverter::DataPointItemConverter(
bool bAmbiguous = false;
sal_Bool bSwapXAndY = DiagramHelper::getVertical( xDiagram, bFound, bAmbiguous );
m_aAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements( xChartType, DiagramHelper::getDimension( xDiagram ), bSwapXAndY, xSeries );
+
+ m_bForbidPercentValue = AxisType::CATEGORY != ChartTypeHelper::getAxisType( xChartType, 0 );
}
DataPointItemConverter::~DataPointItemConverter()
@@ -648,6 +651,12 @@ void DataPointItemConverter::FillSpecialItem(
}
break;
+ case SCHATTR_DATADESCR_NO_PERCENTVALUE:
+ {
+ rOutItemSet.Put( SfxBoolItem( nWhichId, m_bForbidPercentValue ));
+ }
+ break;
+
case SCHATTR_STYLE_SYMBOL:
{
chart2::Symbol aSymbol;
diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index 9f300e8febc1..4b626e1be839 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -141,9 +141,8 @@ AllDataLabelItemConverter::AllDataLabelItemConverter(
uno::Reference< beans::XPropertySet > xObjectProperties( *aIt, uno::UNO_QUERY);
uno::Reference< uno::XComponentContext> xContext(0);//do not need Context for label properties
- sal_Int32 nNumberFormat=ExplicitValueProvider::getExplicitNumberFormatKeyForLabel( xObjectProperties, *aIt, -1/*nPointIndex*/,
- uno::Reference< beans::XPropertySet >( DiagramHelper::getAttachedAxis( *aIt, ChartModelHelper::findDiagram( xChartModel ) ), uno::UNO_QUERY ) );
- sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForLabel(
+ sal_Int32 nNumberFormat=ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( xObjectProperties, *aIt, -1/*nPointIndex*/, ChartModelHelper::findDiagram( xChartModel ) );
+ sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel(
xObjectProperties,uno::Reference< util::XNumberFormatsSupplier >(xChartModel, uno::UNO_QUERY));
m_aConverters.push_back( new ::chart::wrapper::DataPointItemConverter(
diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
index 0321df6035f2..dbefb0e7f025 100644
--- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
@@ -128,8 +128,6 @@ const USHORT nDataLabelWhichPairs[] =
SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE, /* 11432 svx/svxids.hrc */ \
SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, /* 40 sch/schattr.hxx*/ \
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,8 +143,6 @@ const USHORT nDataLabelWhichPairs[] =
SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE, /* 11432 svx/svxids.hrc */ \
SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, /* 40 sch/schattr.hxx*/ \
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*/ \
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 3b5b3d6fa7ba..530cd6f0aeb8 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -240,9 +240,8 @@ namespace
}
}
}
- sal_Int32 nNumberFormat=ExplicitValueProvider::getExplicitNumberFormatKeyForLabel( xObjectProperties, xSeries, nPointIndex,
- uno::Reference< beans::XPropertySet >( DiagramHelper::getAttachedAxis( xSeries, xDiagram ), uno::UNO_QUERY ) );
- sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForLabel(
+ sal_Int32 nNumberFormat=ExplicitValueProvider::getExplicitNumberFormatKeyForDataLabel( xObjectProperties, xSeries, nPointIndex, xDiagram );
+ sal_Int32 nPercentNumberFormat=ExplicitValueProvider::getExplicitPercentageNumberFormatKeyForDataLabel(
xObjectProperties,uno::Reference< util::XNumberFormatsSupplier >(xChartModel, uno::UNO_QUERY));
pItemConverter = new wrapper::DataPointItemConverter( xChartModel, xContext,