summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.cxx1
-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/ChartDataWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx29
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx26
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx54
-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/WrappedNumberFormatProperty.cxx11
-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/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.cxx45
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx46
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx59
-rw-r--r--chart2/source/controller/dialogs/DialogModel.hxx8
-rw-r--r--chart2/source/controller/dialogs/ObjectNameProvider.cxx9
-rw-r--r--chart2/source/controller/dialogs/Strings.src11
-rw-r--r--chart2/source/controller/dialogs/Strings_ChartTypes.src9
-rw-r--r--chart2/source/controller/dialogs/Strings_Statistic.src4
-rw-r--r--chart2/source/controller/dialogs/TabPages.hrc16
-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.cxx100
-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_ChartType.cxx1
-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/dialogs/tp_PolarOptions.cxx18
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.hrc4
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.hxx3
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.src18
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.cxx69
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.hrc48
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.hxx5
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.src27
-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/DataPointItemConverter.hxx1
-rw-r--r--chart2/source/controller/inc/HelpIds.hrc4
-rw-r--r--chart2/source/controller/inc/ItemConverter.hxx2
-rw-r--r--chart2/source/controller/inc/SeriesOptionsItemConverter.hxx3
-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.cxx41
-rw-r--r--chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx5
-rw-r--r--chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx10
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx35
-rw-r--r--chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx2
-rw-r--r--chart2/source/controller/main/ChartController.cxx5
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx5
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx25
-rw-r--r--chart2/source/controller/main/ChartRenderer.cxx5
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx28
-rw-r--r--chart2/source/controller/main/ChartWindow.hxx6
-rw-r--r--chart2/source/controller/main/ConfigurationAccess.cxx39
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx1
-rw-r--r--chart2/source/controller/makefile.mk1
75 files changed, 839 insertions, 1161 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/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/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..fcc17fefeebc 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"
@@ -56,6 +55,7 @@
#include "LegendWrapper.hxx"
#include "AreaWrapper.hxx"
#include "WrappedAddInProperty.hxx"
+#include "WrappedIgnoreProperty.hxx"
#include "ChartRenderer.hxx"
#include <com/sun/star/chart2/XTitled.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
@@ -70,6 +70,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/util/DateTime.hpp>
#include <vector>
#include <algorithm>
@@ -97,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,
@@ -125,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 )
@@ -151,7 +154,8 @@ enum
PROP_DOCUMENT_ADDIN,
PROP_DOCUMENT_BASEDIAGRAM,
PROP_DOCUMENT_ADDITIONAL_SHAPES,
- PROP_DOCUMENT_UPDATE_ADDIN
+ PROP_DOCUMENT_UPDATE_ADDIN,
+ PROP_DOCUMENT_NULL_DATE
};
void lcl_AddPropertiesToVector(
@@ -215,6 +219,13 @@ void lcl_AddPropertiesToVector(
PROP_DOCUMENT_UPDATE_ADDIN,
::getBooleanCppuType(),
beans::PropertyAttribute::BOUND ));
+
+ // table:null-date // i99104
+ rOutProperties.push_back(
+ Property( C2U( "NullDate" ),
+ PROP_DOCUMENT_NULL_DATE,
+ ::getCppuType( static_cast< const ::com::sun::star::util::DateTime * >(0)),
+ beans::PropertyAttribute::MAYBEVOID ));
}
const uno::Sequence< Property > & lcl_GetPropertySequence()
@@ -696,7 +707,6 @@ Any WrappedHasSubTitleProperty::getPropertyDefault( const Reference< beans::XPro
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
-
ChartDocumentWrapper::ChartDocumentWrapper(
const Reference< uno::XComponentContext > & xContext ) :
m_spChart2ModelContact( new Chart2ModelContact( xContext ) ),
@@ -899,7 +909,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"),
@@ -1359,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:
@@ -1632,6 +1652,7 @@ const std::vector< WrappedProperty* > ChartDocumentWrapper::createWrappedPropert
aWrappedProperties.push_back( new WrappedBaseDiagramProperty( *this ) );
aWrappedProperties.push_back( new WrappedAdditionalShapesProperty( *this ) );
aWrappedProperties.push_back( new WrappedRefreshAddInAllowedProperty( *this ) );
+ aWrappedProperties.push_back( new WrappedIgnoreProperty( C2U("NullDate"),Any() ) ); // i99104
return aWrappedProperties;
}
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index fc62b3b77223..ce417155dc4f 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -50,6 +50,8 @@
#include "WrappedDataCaptionProperties.hxx"
#include "WrappedSeriesAreaOrLineProperty.hxx"
#include "WrappedScaleTextProperties.hxx"
+#include "WrappedNumberFormatProperty.hxx"
+#include "WrappedTextRotationProperty.hxx"
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
// header for define DBG_ASSERT
@@ -87,10 +89,12 @@ 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
- PROP_SERIES_ATTACHED_AXIS
+ PROP_SERIES_ATTACHED_AXIS,
+ PROP_SERIES_DATAPOINT_TEXT_ROTATION
};
void lcl_AddPropertiesToVector_PointProperties(
@@ -145,6 +149,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(
@@ -156,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 )
@@ -704,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 );
@@ -750,6 +772,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/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index c8220254d94e..fe1359aab7f3 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -112,6 +112,7 @@ enum
PROP_DIAGRAM_DATAROW_SOURCE,
PROP_DIAGRAM_GROUP_BARS_PER_AXIS,
+ PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
PROP_DIAGRAM_SORT_BY_X_VALUES,
@@ -233,6 +234,13 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT ));
+ rOutProperties.push_back(
+ Property( C2U( "IncludeHiddenCells" ),
+ PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+
//new for XY charts
rOutProperties.push_back(
Property( C2U( "SortByXValues" ),
@@ -541,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"
@@ -586,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;
}
@@ -1970,6 +1984,44 @@ Any WrappedAutomaticSizeProperty::getPropertyDefault( const Reference< beans::XP
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
+//PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS
+class WrappedIncludeHiddenCellsProperty : public WrappedProperty
+{
+public:
+ WrappedIncludeHiddenCellsProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
+ virtual ~WrappedIncludeHiddenCellsProperty();
+
+ 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);
+
+private: //member
+ ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
+};
+
+WrappedIncludeHiddenCellsProperty::WrappedIncludeHiddenCellsProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
+ : WrappedProperty(C2U("IncludeHiddenCells"),C2U("IncludeHiddenCells"))
+ , m_spChart2ModelContact( spChart2ModelContact )
+{
+}
+
+WrappedIncludeHiddenCellsProperty::~WrappedIncludeHiddenCellsProperty()
+{
+}
+
+void WrappedIncludeHiddenCellsProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
+ throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ sal_Bool bNewValue = false;
+ if( ! (rOuterValue >>= bNewValue) )
+ throw lang::IllegalArgumentException( C2U("Property Dim3D requires boolean value"), 0, 0 );
+
+ ChartModelHelper::setIncludeHiddenCells( bNewValue, m_spChart2ModelContact->getChartModel() );
+}
+
+//-----------------------------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------------------------
+
// ____ XDiagramProvider ____
Reference< chart2::XDiagram > SAL_CALL DiagramWrapper::getDiagram()
throw (uno::RuntimeException)
@@ -2025,6 +2077,8 @@ const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties()
aWrappedProperties.push_back( new WrappedProperty( C2U( "StackedBarsConnected" ), C2U( "ConnectBars" ) ) );
aWrappedProperties.push_back( new WrappedSolidTypeProperty( m_spChart2ModelContact ) );
aWrappedProperties.push_back( new WrappedAutomaticSizeProperty() );
+ aWrappedProperties.push_back( new WrappedIncludeHiddenCellsProperty( m_spChart2ModelContact ) );
+
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/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/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/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 6dbce3afac61..0a9b58758de6 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;
@@ -442,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 ))
{
@@ -458,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;
}
@@ -1103,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;
}
@@ -1313,12 +1282,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..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>
@@ -103,7 +105,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 +281,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;
}
@@ -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();
}
}
@@ -708,7 +724,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;
@@ -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 28d9f6420419..69e693911c22 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"
@@ -110,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 )
@@ -157,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
@@ -328,26 +328,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 +723,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 +744,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/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 8da8700a4406..3b384915f2d0 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";
@@ -465,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/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/TabPages.hrc b/chart2/source/controller/dialogs/TabPages.hrc
index d56534257500..8c92c062ad14 100644
--- a/chart2/source/controller/dialogs/TabPages.hrc
+++ b/chart2/source/controller/dialogs/TabPages.hrc
@@ -83,22 +83,6 @@
#define CTL_BITMAP_PREVIEW 6
*/
-//#define TP_OPTIONS 908
-#define GRP_OPT_AXIS 1
-#define RBT_OPT_AXIS_1 2
-#define RBT_OPT_AXIS_2 3
-#define MT_GAP 4
-#define MT_OVERLAP 5
-#define FT_GAP 6
-#define FT_OVERLAP 7
-#define GB_BAR 8
-#define CB_CONNECTOR 9
-#define CB_BARS_SIDE_BY_SIDE 10
-#define FL_PLOT_MISSING_VALUES 11
-#define RB_DONT_PAINT 12
-#define RB_ASSUME_ZERO 13
-#define RB_CONTINUE_LINE 14
-
//------------
//from old chart tplabel.hrc
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..c6129629a51a 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,15 @@ 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 );
}
DataLabelResources::~DataLabelResources()
@@ -283,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;
@@ -304,7 +314,13 @@ 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 );
+ m_aDC_Dial.Enable( bEnableRotation );
+ m_aFT_Degrees.Enable( bEnableRotation );
+ m_aNF_Degrees.Enable( bEnableRotation );
}
BOOL DataLabelResources::FillItemSet( SfxItemSet& rOutAttrs ) const
@@ -344,6 +360,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 +406,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_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/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/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index 4c626d1dfb37..38d36d032921 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -32,7 +32,6 @@
#include "tp_PolarOptions.hxx"
#include "tp_PolarOptions.hrc"
#include "ResId.hxx"
-#include "TabPages.hrc"
#include "chartview/ChartSfxItemIds.hxx"
#include "NoWarningThisInCTOR.hxx"
@@ -51,7 +50,9 @@ PolarOptionsTabPage::PolarOptionsTabPage( Window* pWindow,const SfxItemSet& rInA
m_aFL_StartingAngle( this, SchResId( FL_STARTING_ANGLE ) ),
m_aAngleDial( this, SchResId( CT_ANGLE_DIAL ) ),
m_aFT_Degrees( this, SchResId( FT_ROTATION_DEGREES ) ),
- m_aNF_StartingAngle( this, SchResId( NF_STARTING_ANGLE ) )
+ m_aNF_StartingAngle( this, SchResId( NF_STARTING_ANGLE ) ),
+ m_aFL_PlotOptions( this, SchResId( FL_PLOT_OPTIONS_POLAR ) ),
+ m_aCB_IncludeHiddenCells( this, SchResId( CB_INCLUDE_HIDDEN_CELLS_POLAR ) )
{
FreeResource();
@@ -78,6 +79,9 @@ BOOL PolarOptionsTabPage::FillItemSet( SfxItemSet& rOutAttrs )
if( m_aCB_Clockwise.IsVisible() )
rOutAttrs.Put(SfxBoolItem(SCHATTR_CLOCKWISE,m_aCB_Clockwise.IsChecked()));
+ if (m_aCB_IncludeHiddenCells.IsVisible())
+ rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCB_IncludeHiddenCells.IsChecked()));
+
return TRUE;
}
@@ -108,6 +112,16 @@ void PolarOptionsTabPage::Reset(const SfxItemSet& rInAttrs)
{
m_aCB_Clockwise.Show(FALSE);
}
+ if (rInAttrs.GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, TRUE, &pPoolItem) == SFX_ITEM_SET)
+ {
+ bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+ m_aCB_IncludeHiddenCells.Check(bVal);
+ }
+ else
+ {
+ m_aCB_IncludeHiddenCells.Show(FALSE);
+ m_aFL_PlotOptions.Show(FALSE);
+ }
}
//.............................................................................
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hrc b/chart2/source/controller/dialogs/tp_PolarOptions.hrc
index a618616e1cfe..680c9d126211 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.hrc
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.hrc
@@ -28,9 +28,13 @@
*
************************************************************************/
+#include "ResourceIds.hrc"
+
#define CB_CLOCKWISE 1
+#define CB_INCLUDE_HIDDEN_CELLS_POLAR 2
#define FL_STARTING_ANGLE 1
+#define FL_PLOT_OPTIONS_POLAR 2
#define CT_ANGLE_DIAL 1
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hxx b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
index 5a816ab87385..02a5ec5ba25b 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.hxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.hxx
@@ -58,6 +58,9 @@ private:
svx::DialControl m_aAngleDial;
FixedText m_aFT_Degrees;
NumericField m_aNF_StartingAngle;
+
+ FixedLine m_aFL_PlotOptions;
+ CheckBox m_aCB_IncludeHiddenCells;
};
//.............................................................................
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.src b/chart2/source/controller/dialogs/tp_PolarOptions.src
index 7c442c3ef12e..273c5f59dd5d 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.src
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.src
@@ -28,7 +28,6 @@
*
************************************************************************/
-#include "TabPages.hrc"
#include "tp_PolarOptions.hrc"
#include "HelpIds.hrc"
@@ -47,8 +46,8 @@ TabPage TP_POLAROPTIONS
};
FixedLine FL_STARTING_ANGLE
{
- Pos = MAP_APPFONT ( 12 , 21 ) ;
- Size = MAP_APPFONT ( 242 , 12 ) ;
+ Pos = MAP_APPFONT ( 6 , 21 ) ;
+ Size = MAP_APPFONT ( 248 , 12 ) ;
Text [ en-US ] = "Starting angle" ;
};
Control CT_ANGLE_DIAL
@@ -75,4 +74,17 @@ TabPage TP_POLAROPTIONS
Maximum = 359 ;
SpinSize = 5 ;
};
+ FixedLine FL_PLOT_OPTIONS_POLAR
+ {
+ Pos = MAP_APPFONT ( 6 , 90 ) ;
+ Size = MAP_APPFONT ( 248 , 8 ) ;
+ Text [ en-US ] = "Plot options";
+ };
+ CheckBox CB_INCLUDE_HIDDEN_CELLS_POLAR
+ {
+ Pos = MAP_APPFONT ( 12 , 104 ) ;
+ Size = MAP_APPFONT ( 200 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Include ~values from hidden cells";
+ };
};
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index 855665f4fd02..cc8ac2139639 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -31,9 +31,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_chart2.hxx"
#include "tp_SeriesToAxis.hxx"
+#include "tp_SeriesToAxis.hrc"
#include "ResId.hxx"
-#include "TabPages.hrc"
#include "chartview/ChartSfxItemIds.hxx"
#include "NoWarningThisInCTOR.hxx"
@@ -43,6 +43,8 @@
#include <svtools/intitem.hxx>
//SfxIntegerListItem
#include <svtools/ilstitem.hxx>
+#include <svtools/controldims.hrc>
+
#include <com/sun/star/chart/MissingValueTreatment.hpp>
//.............................................................................
@@ -63,10 +65,12 @@ SchOptionTabPage::SchOptionTabPage(Window* pWindow,const SfxItemSet& rInAttrs) :
aMTOverlap(this,SchResId(MT_OVERLAP)),
aCBConnect(this,SchResId(CB_CONNECTOR)),
aCBAxisSideBySide(this,SchResId(CB_BARS_SIDE_BY_SIDE)),
- m_aFL_EmptyCells(this,SchResId(FL_PLOT_MISSING_VALUES)),
+ m_aFL_PlotOptions(this,SchResId(FL_PLOT_OPTIONS)),
+ m_aFT_MissingValues(this,SchResId(FT_MISSING_VALUES)),
m_aRB_DontPaint(this,SchResId(RB_DONT_PAINT)),
m_aRB_AssumeZero(this,SchResId(RB_ASSUME_ZERO)),
m_aRB_ContinueLine(this,SchResId(RB_CONTINUE_LINE)),
+ m_aCBIncludeHiddenCells(this,SchResId(CB_INCLUDE_HIDDEN_CELLS)),
m_bProvidesSecondaryYAxis(true),
m_bProvidesOverlapAndGapWidth(false)
{
@@ -123,6 +127,9 @@ BOOL SchOptionTabPage::FillItemSet(SfxItemSet& rOutAttrs)
else if(m_aRB_ContinueLine.IsChecked())
rOutAttrs.Put(SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT,::com::sun::star::chart::MissingValueTreatment::CONTINUE));
+ if (m_aCBIncludeHiddenCells.IsVisible())
+ rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCBIncludeHiddenCells.IsChecked()));
+
return TRUE;
}
@@ -212,13 +219,26 @@ void SchOptionTabPage::Reset(const SfxItemSet& rInAttrs)
}
else
{
+ m_aFT_MissingValues.Show(FALSE);
m_aRB_DontPaint.Show(FALSE);
m_aRB_AssumeZero.Show(FALSE);
m_aRB_ContinueLine.Show(FALSE);
- m_aFL_EmptyCells.Show(FALSE);
}
}
+ // Include hidden cells
+ if (rInAttrs.GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, TRUE, &pPoolItem) == SFX_ITEM_SET)
+ {
+ bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
+ m_aCBIncludeHiddenCells.Check(bVal);
+ }
+ else
+ {
+ m_aCBIncludeHiddenCells.Show(FALSE);
+ if(!m_aFT_MissingValues.IsVisible())
+ m_aFL_PlotOptions.Show(FALSE);
+ }
+
AdaptControlPositionsAndVisibility();
}
@@ -231,6 +251,17 @@ void SchOptionTabPage::Init( bool bProvidesSecondaryYAxis, bool bProvidesOverlap
AdaptControlPositionsAndVisibility();
}
+void lcl_offsetControl(Control& rCtrl, long nXOffset, long nYOffset )
+{
+ Point aPos = rCtrl.GetPosPixel();
+ rCtrl.SetPosPixel( Point(aPos.getX() + nXOffset, aPos.getY() + nYOffset) );
+}
+
+void lcl_optimzeRadioButtonSize( RadioButton& rCtrl )
+{
+ rCtrl.SetSizePixel( rCtrl.CalcMinimumSize() );
+}
+
void SchOptionTabPage::AdaptControlPositionsAndVisibility()
{
aRbtAxis1.Show(m_bProvidesSecondaryYAxis);
@@ -254,20 +285,30 @@ void SchOptionTabPage::AdaptControlPositionsAndVisibility()
else
aPos = aGrpBar.GetPosPixel();
- long nDiffX = aRbtAxis1.GetPosPixel().getX() - aGrpAxis.GetPosPixel().getX();
- long nDiffY = aRbtAxis1.GetPosPixel().getY() - aGrpAxis.GetPosPixel().getY();
- long nDiffY1 = aRbtAxis2.GetPosPixel().getY() - aRbtAxis1.GetPosPixel().getY();
-
- m_aFL_EmptyCells.SetPosPixel( aPos );
- m_aRB_DontPaint.SetPosPixel( Point( aPos.getX() + nDiffX, aPos.getY() + nDiffY ) );
- m_aRB_AssumeZero.SetPosPixel( Point( aPos.getX() + nDiffX, aPos.getY() + nDiffY + nDiffY1 ) );
- m_aRB_ContinueLine.SetPosPixel( Point( aPos.getX() + nDiffX, aPos.getY() + nDiffY + nDiffY1 * 2 ) );
+ long nYOffset = aPos.getY() - m_aFL_PlotOptions.GetPosPixel().getY();
+ lcl_offsetControl(m_aFL_PlotOptions, 0, nYOffset);
+ lcl_offsetControl(m_aFT_MissingValues, 0, nYOffset);
+ lcl_offsetControl(m_aRB_DontPaint, 0, nYOffset);
+ lcl_offsetControl(m_aRB_AssumeZero, 0, nYOffset);
+ lcl_offsetControl(m_aRB_ContinueLine, 0, nYOffset);
+ lcl_offsetControl(m_aCBIncludeHiddenCells, 0, nYOffset);
}
- if( !m_aRB_DontPaint.IsVisible() )
+ m_aFT_MissingValues.SetSizePixel( m_aFT_MissingValues.CalcMinimumSize() );
+ lcl_optimzeRadioButtonSize( m_aRB_DontPaint );
+ lcl_optimzeRadioButtonSize( m_aRB_AssumeZero );
+ lcl_optimzeRadioButtonSize( m_aRB_ContinueLine );
+
+ Size aControlDistance( m_aFT_MissingValues.LogicToPixel( Size(RSC_SP_CTRL_DESC_X,RSC_SP_CTRL_GROUP_Y), MapMode(MAP_APPFONT) ) );
+ long nXOffset = m_aFT_MissingValues.GetPosPixel().getX() + m_aFT_MissingValues.GetSizePixel().getWidth() + aControlDistance.getWidth() - m_aRB_DontPaint.GetPosPixel().getX();
+ lcl_offsetControl(m_aRB_DontPaint, nXOffset, 0);
+ lcl_offsetControl(m_aRB_AssumeZero, nXOffset, 0);
+ lcl_offsetControl(m_aRB_ContinueLine, nXOffset, 0);
+
+ if( !m_aFT_MissingValues.IsVisible() )
{
- m_aRB_ContinueLine.SetPosPixel( m_aRB_AssumeZero.GetPosPixel() );
- m_aRB_AssumeZero.SetPosPixel( m_aRB_DontPaint.GetPosPixel() );
+ //for example for stock charts
+ m_aCBIncludeHiddenCells.SetPosPixel( m_aFT_MissingValues.GetPosPixel() );
}
}
//.............................................................................
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hrc b/chart2/source/controller/dialogs/tp_SeriesToAxis.hrc
new file mode 100644
index 000000000000..2a39c313ca3c
--- /dev/null
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hrc
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * 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: ,v $
+ * $Revision: $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "ResourceIds.hrc"
+
+#define GRP_OPT_AXIS 1
+#define RBT_OPT_AXIS_1 2
+#define RBT_OPT_AXIS_2 3
+#define MT_GAP 4
+#define MT_OVERLAP 5
+#define FT_GAP 6
+#define FT_OVERLAP 7
+#define GB_BAR 8
+#define CB_CONNECTOR 9
+#define CB_BARS_SIDE_BY_SIDE 10
+#define FL_PLOT_OPTIONS 11
+#define FT_MISSING_VALUES 12
+#define RB_DONT_PAINT 13
+#define RB_ASSUME_ZERO 14
+#define RB_CONTINUE_LINE 15
+#define CB_INCLUDE_HIDDEN_CELLS 16
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
index c066e637fb2e..10fcae66c1e3 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx
@@ -74,11 +74,14 @@ private: //member
CheckBox aCBConnect;
CheckBox aCBAxisSideBySide;
- FixedLine m_aFL_EmptyCells;
+ FixedLine m_aFL_PlotOptions;
+ FixedText m_aFT_MissingValues;
RadioButton m_aRB_DontPaint;
RadioButton m_aRB_AssumeZero;
RadioButton m_aRB_ContinueLine;
+ CheckBox m_aCBIncludeHiddenCells;
+
DECL_LINK(EnableHdl, RadioButton * );
sal_Int32 m_nAllSeriesAxisIndex;
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.src b/chart2/source/controller/dialogs/tp_SeriesToAxis.src
index f79028488230..0686e45f25b3 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.src
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.src
@@ -28,7 +28,7 @@
*
************************************************************************/
#include "HelpIds.hrc"
-#include "TabPages.hrc"
+#include "tp_SeriesToAxis.hrc"
TabPage TP_OPTIONS
{
@@ -120,7 +120,7 @@ TabPage TP_OPTIONS
Pos = MAP_APPFONT ( 12 , 97 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
- Text [ en-US ] = "Connection Lines";
+ Text [ en-US ] = "Connection lines";
};
CheckBox CB_BARS_SIDE_BY_SIDE
@@ -131,16 +131,23 @@ TabPage TP_OPTIONS
Text [ en-US ] = "Show ~bars side by side";
};
- FixedLine FL_PLOT_MISSING_VALUES
+ FixedLine FL_PLOT_OPTIONS
{
Pos = MAP_APPFONT ( 6 , 113 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
+ Text [ en-US ] = "Plot options";
+ };
+
+ FixedText FT_MISSING_VALUES
+ {
+ Pos = MAP_APPFONT ( 12 , 127 ) ;
+ Size = MAP_APPFONT ( 80 , 8 ) ;
Text [ en-US ] = "Plot missing values";
};
RadioButton RB_DONT_PAINT
{
- Pos = MAP_APPFONT ( 12 , 127 ) ;
+ Pos = MAP_APPFONT ( 82 , 127 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Leave gap";
@@ -148,7 +155,7 @@ TabPage TP_OPTIONS
RadioButton RB_ASSUME_ZERO
{
- Pos = MAP_APPFONT ( 12 , 141 ) ;
+ Pos = MAP_APPFONT ( 82 , 141 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Assume zero";
@@ -156,9 +163,17 @@ TabPage TP_OPTIONS
RadioButton RB_CONTINUE_LINE
{
- Pos = MAP_APPFONT ( 12 , 155 ) ;
+ Pos = MAP_APPFONT ( 82 , 155 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Continue line";
};
+
+ CheckBox CB_INCLUDE_HIDDEN_CELLS
+ {
+ Pos = MAP_APPFONT ( 12 , 172 ) ;
+ Size = MAP_APPFONT ( 200 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Include ~values from hidden cells";
+ };
};
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/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/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/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx
index 9f21d00dd0a1..e55456519cd1 100644
--- a/chart2/source/controller/inc/ItemConverter.hxx
+++ b/chart2/source/controller/inc/ItemConverter.hxx
@@ -38,8 +38,6 @@
// for pair
#include <utility>
-struct SfxItemPropertyMap;
-
namespace comphelper
{
diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
index 1702673a6462..0f4a9869fcc9 100644
--- a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
+++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
@@ -93,6 +93,9 @@ private:
::com::sun::star::uno::Sequence< sal_Int32 > m_aSupportedMissingValueTreatments;
sal_Int32 m_nMissingValueTreatment;
+
+ bool m_bSupportingPlottingOfHiddenCells;
+ bool m_bIncludeHiddenCells;
};
} // namespace wrapper
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..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()
@@ -521,6 +524,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;
@@ -630,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;
@@ -657,6 +684,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/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 00a535fe5eaf..dbefb0e7f025 100644
--- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
+++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx
@@ -128,8 +128,8 @@ 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
};
@@ -143,8 +143,7 @@ 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*/ \
SCHATTR_SYMBOL_SIZE,SCHATTR_SYMBOL_SIZE, /* 97 sch/schattr.hxx*/ \
@@ -163,7 +162,8 @@ const USHORT nDataPointWhichPairs[] =
SCHATTR_STARTING_ANGLE,SCHATTR_STARTING_ANGLE, \
SCHATTR_CLOCKWISE,SCHATTR_CLOCKWISE, \
SCHATTR_MISSING_VALUE_TREATMENT,SCHATTR_MISSING_VALUE_TREATMENT, \
- SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS,SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS
+ SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS,SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, \
+ SCHATTR_INCLUDE_HIDDEN_CELLS,SCHATTR_INCLUDE_HIDDEN_CELLS
const USHORT nSeriesOptionsWhichPairs[] =
{
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index de4fe9f2d745..f30bb4aeda57 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -93,6 +93,8 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
, m_bClockwise(false)
, m_aSupportedMissingValueTreatments()
, m_nMissingValueTreatment(0)
+ , m_bSupportingPlottingOfHiddenCells(false)
+ , m_bIncludeHiddenCells(true)
{
try
{
@@ -159,6 +161,23 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter(
m_aSupportedMissingValueTreatments = ChartTypeHelper::getSupportedMissingValueTreatments( xChartType );
m_nMissingValueTreatment = DiagramHelper::getCorrectedMissingValueTreatment(
ChartModelHelper::findDiagram(m_xChartModel), xChartType );
+
+ uno::Reference< XChartDocument > xChartDoc( m_xChartModel, uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xProp( xChartDoc->getDataProvider(), uno::UNO_QUERY );
+ if( xProp.is() )
+ {
+ try
+ {
+ //test whether the data provider offers this property
+ xProp->getPropertyValue(C2U("IncludeHiddenCells"));
+ //if not exception is thrown the property is offered
+ m_bSupportingPlottingOfHiddenCells = true;
+ xDiagramProperties->getPropertyValue( C2U("IncludeHiddenCells") ) >>= m_bIncludeHiddenCells;
+ }
+ catch( const beans::UnknownPropertyException& )
+ {
+ }
+ }
}
catch( uno::Exception ex )
{
@@ -341,6 +360,16 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( USHORT nWhichId, const SfxIte
}
}
break;
+ case SCHATTR_INCLUDE_HIDDEN_CELLS:
+ {
+ if( m_bSupportingPlottingOfHiddenCells )
+ {
+ bool bIncludeHiddenCells = static_cast<const SfxBoolItem &>(rItemSet.Get(nWhichId)).GetValue();
+ if (bIncludeHiddenCells != m_bIncludeHiddenCells)
+ bChanged = ChartModelHelper::setIncludeHiddenCells( bIncludeHiddenCells, m_xChartModel );
+ }
+ }
+ break;
}
return bChanged;
}
@@ -412,6 +441,12 @@ void SeriesOptionsItemConverter::FillSpecialItem(
rOutItemSet.Put( SfxIntegerListItem( nWhichId, aList ) );
break;
}
+ case SCHATTR_INCLUDE_HIDDEN_CELLS:
+ {
+ if( m_bSupportingPlottingOfHiddenCells )
+ rOutItemSet.Put( SfxBoolItem(nWhichId, m_bIncludeHiddenCells) );
+ break;
+ }
default:
break;
}
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/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 8368e76baa82..7728104afc0f 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -468,7 +468,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
{
//the view has become dirty, we should repaint it if we have a window
if( m_pChartWindow )
- m_pChartWindow->Invalidate();
+ m_pChartWindow->ForceInvalidate();
}
else if( rEvent.NewMode.equals(C2U("invalid")) )
{
@@ -478,8 +478,11 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
if( m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit() )
this->EndTextEdit();
if( m_pDrawViewWrapper )
+ {
m_pDrawViewWrapper->UnmarkAll();
//m_pDrawViewWrapper->hideMarkHandles(); todo??
+ m_pDrawViewWrapper->HideSdrPage();
+ }
}
else
{
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,
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 27cfc441be8a..e1f83550bd5d 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -39,11 +39,10 @@
#include "macros.hxx"
#include "ControllerLockGuard.hxx"
#include "AccessibleTextHelper.hxx"
+#include "chartview/DrawModelWrapper.hxx"
#include <svx/svdotext.hxx>
-// header for class SvxCharacterMap
-#include <svx/charmap.hxx>
// header for define RET_OK
#include <vcl/msgbox.hxx>
// header for class SdrOutliner
@@ -55,6 +54,8 @@
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <svtools/stritem.hxx>
+#include <svx/fontitem.hxx>
//.............................................................................
namespace chart
@@ -174,16 +175,26 @@ void SAL_CALL ChartController::executeDispatch_InsertSpecialCharacter()
SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT( pFact, "No dialog factory" );
- AbstractSvxCharacterMap * pDlg = pFact->CreateSvxCharacterMap( m_pChartWindow, RID_SVXDLG_CHARMAP, FALSE );
- DBG_ASSERT( pDlg, "Couldn't create SvxCharacterMap dialog" );
+
+ SfxAllItemSet aSet( m_pDrawModelWrapper->GetItemPool() );
+ aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
//set fixed current font
- pDlg->SetFont( m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont() );
- pDlg->DisableFontSelection(); //maybe not necessary in future
+ aSet.Put( SfxBoolItem( FN_PARAM_2, TRUE ) ); //maybe not necessary in future
+ Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
+ aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) );
+
+ SfxAbstractDialog * pDlg = pFact->CreateSfxDialog( m_pChartWindow, aSet, getFrame(), RID_SVXDLG_CHARMAP );
+ DBG_ASSERT( pDlg, "Couldn't create SvxCharacterMap dialog" );
if( pDlg->Execute() == RET_OK )
{
- String aString( pDlg->GetCharacters() );
+ const SfxItemSet* pSet = pDlg->GetOutputItemSet();
+ const SfxPoolItem* pItem=0;
+ String aString;
+ if ( pSet && pSet->GetItemState( SID_CHARMAP, TRUE, &pItem) == SFX_ITEM_SET &&
+ pItem->ISA(SfxStringItem) )
+ aString = dynamic_cast<const SfxStringItem*>(pItem)->GetValue();
OutlinerView* pOutlinerView = m_pDrawViewWrapper->GetTextEditOutlinerView();
SdrOutliner* pOutliner = m_pDrawViewWrapper->getOutliner();
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/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index 5c9e201aebd8..10b999df8f43 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -60,6 +60,7 @@ namespace chart
ChartWindow::ChartWindow( WindowController* pWindowController, Window* pParent, WinBits nStyle )
: Window(pParent, nStyle)
, m_pWindowController( pWindowController )
+ , m_bInPaint(false)
{
this->SetSmartHelpId( SmartId( HID_SCH_WIN_DOCUMENT ) );
this->SetMapMode( MapMode(MAP_100TH_MM) );
@@ -67,7 +68,7 @@ ChartWindow::ChartWindow( WindowController* pWindowController, Window* pParent,
// chart does not depend on exact pixel painting => enable antialiased drawing
SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | GetAntialiasing() );
EnableRTL( FALSE );
- if( pParent )
+ if( pParent )
pParent->EnableRTL( FALSE );// #i96215# necessary for a correct position of the context menu in rtl mode
}
@@ -92,10 +93,12 @@ void ChartWindow::PrePaint()
void ChartWindow::Paint( const Rectangle& rRect )
{
+ m_bInPaint = true;
if( m_pWindowController )
m_pWindowController->execute_Paint( rRect );
else
Window::Paint( rRect );
+ m_bInPaint = false;
}
void ChartWindow::MouseButtonDown(const MouseEvent& rMEvt)
@@ -243,6 +246,29 @@ void ChartWindow::adjustHighContrastMode()
SetDrawMode( bUseContrast ? nContrastMode : DRAWMODE_DEFAULT );
}
+void ChartWindow::ForceInvalidate()
+{
+ ::Window::Invalidate();
+}
+void ChartWindow::Invalidate( USHORT nFlags )
+{
+ if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
+ return;
+ ::Window::Invalidate( nFlags );
+}
+void ChartWindow::Invalidate( const Rectangle& rRect, USHORT nFlags )
+{
+ if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
+ return;
+ ::Window::Invalidate( rRect, nFlags );
+}
+void ChartWindow::Invalidate( const Region& rRegion, USHORT nFlags )
+{
+ if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts"
+ return;
+ ::Window::Invalidate( rRegion, nFlags );
+}
+
//.............................................................................
} //namespace chart
//.............................................................................
diff --git a/chart2/source/controller/main/ChartWindow.hxx b/chart2/source/controller/main/ChartWindow.hxx
index 41cc7b514a07..543c0b13ffdc 100644
--- a/chart2/source/controller/main/ChartWindow.hxx
+++ b/chart2/source/controller/main/ChartWindow.hxx
@@ -70,10 +70,16 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual void RequestHelp( const HelpEvent& rHEvt );
+ void ForceInvalidate();
+ virtual void Invalidate( USHORT nFlags = 0 );
+ virtual void Invalidate( const Rectangle& rRect, USHORT nFlags = 0 );
+ virtual void Invalidate( const Region& rRegion, USHORT nFlags = 0 );
+
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
private:
WindowController* m_pWindowController;
+ bool m_bInPaint;
void adjustHighContrastMode();
};
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/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index d572ec2b2f42..bde946fac5b6 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -52,6 +52,7 @@
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XRegressionCurve.hpp>
+#include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
// only needed until #i68864# is fixed
#include <com/sun/star/frame/XLayoutManager.hpp>
diff --git a/chart2/source/controller/makefile.mk b/chart2/source/controller/makefile.mk
index 38eaec110f74..d2d399d22cff 100644
--- a/chart2/source/controller/makefile.mk
+++ b/chart2/source/controller/makefile.mk
@@ -93,7 +93,6 @@ SHL1STDLIBS= $(CHARTTOOLS) \
$(SVXLIB) \
$(TKLIB) \
$(TOOLSLIB) \
- $(I18NISOLANGLIB) \
$(VCLLIB) \
$(SFXLIB) \
$(UNOTOOLSLIB) \