diff options
Diffstat (limited to 'chart2/source/controller/chartapiwrapper')
5 files changed, 37 insertions, 3 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index fcc17fefeebc..397527f3ea9d 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -95,6 +95,7 @@ enum eServiceType SERVICE_NAME_DONUT_DIAGRAM, SERVICE_NAME_LINE_DIAGRAM, SERVICE_NAME_NET_DIAGRAM, + SERVICE_NAME_FILLED_NET_DIAGRAM, SERVICE_NAME_PIE_DIAGRAM, SERVICE_NAME_STOCK_DIAGRAM, SERVICE_NAME_XY_DIAGRAM, @@ -124,6 +125,7 @@ tServiceNameMap & lcl_getStaticServiceNameMap() ( C2U( "com.sun.star.chart.DonutDiagram" ), SERVICE_NAME_DONUT_DIAGRAM ) ( C2U( "com.sun.star.chart.LineDiagram" ), SERVICE_NAME_LINE_DIAGRAM ) ( C2U( "com.sun.star.chart.NetDiagram" ), SERVICE_NAME_NET_DIAGRAM ) + ( C2U( "com.sun.star.chart.FilledNetDiagram" ), SERVICE_NAME_FILLED_NET_DIAGRAM ) ( 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 ) @@ -1341,6 +1343,14 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( bCreateDiagram = true; } break; + case SERVICE_NAME_FILLED_NET_DIAGRAM: + if( xManagerFact.is()) + { + xTemplate.set( + xManagerFact->createInstance( + C2U( "com.sun.star.chart2.template.FilledNet" )), uno::UNO_QUERY ); + bCreateDiagram = true; + } case SERVICE_NAME_PIE_DIAGRAM: if( xManagerFact.is()) { diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index fe1359aab7f3..4a02d9aa99e5 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -538,6 +538,10 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) if( aName.indexOf( C2U("Scatter") ) != -1 ) return C2U( "com.sun.star.chart.XYDiagram" ); + // "FilledNet" "StackedFilledNet" "PercentStackedFilledNet" + if( aName.indexOf( C2U("FilledNet") ) != -1 ) + return C2U( "com.sun.star.chart.FilledNetDiagram" ); + // "Net" "NetSymbol" "NetLine" "StackedNet" "StackedNetSymbol" // "StackedNetLine" "PercentStackedNet" "PercentStackedNetSymbol" // "PercentStackedNetLine" @@ -591,6 +595,9 @@ const tMakeStringStringMap& lcl_getChartTypeNameMap() ( ::rtl::OUString::createFromAscii( "com.sun.star.chart2.ScatterChartType" ) , ::rtl::OUString::createFromAscii( "com.sun.star.chart.XYDiagram" ) ) + ( ::rtl::OUString::createFromAscii( "com.sun.star.chart2.FilledNetChartType" ) + , ::rtl::OUString::createFromAscii( "com.sun.star.chart.FilledNetDiagram" ) ) + ( ::rtl::OUString::createFromAscii( "com.sun.star.chart2.NetChartType" ) , ::rtl::OUString::createFromAscii( "com.sun.star.chart.NetDiagram" ) ) diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index e0e9511cf71d..a84dbc0cfc4d 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -505,7 +505,7 @@ const std::vector< WrappedProperty* > TitleWrapper::createWrappedProperties() ::std::vector< ::chart::WrappedProperty* > aWrappedProperties; aWrappedProperties.push_back( new WrappedTitleStringProperty( m_spChart2ModelContact->m_xContext ) ); - aWrappedProperties.push_back( new WrappedTextRotationProperty() ); + aWrappedProperties.push_back( new WrappedTextRotationProperty( m_eTitleType==TitleHelper::Y_AXIS_TITLE || m_eTitleType==TitleHelper::X_AXIS_TITLE ) ); aWrappedProperties.push_back( new WrappedStackedTextProperty() ); WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this ); WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties ); diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx index bd505d6edac5..07532a4ecf22 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx @@ -33,7 +33,9 @@ #include "WrappedTextRotationProperty.hxx" #include "macros.hxx" +#include <com/sun/star/beans/XPropertyState.hpp> +using namespace ::com::sun::star; using ::com::sun::star::uno::Any; using ::rtl::OUString; @@ -43,13 +45,23 @@ namespace chart { //............................................................................. -WrappedTextRotationProperty::WrappedTextRotationProperty() +WrappedTextRotationProperty::WrappedTextRotationProperty( bool bDirectState ) : ::chart::WrappedProperty( C2U( "TextRotation" ), C2U( "TextRotation" ) ) + , m_bDirectState( bDirectState ) { } WrappedTextRotationProperty::~WrappedTextRotationProperty() { } + +beans::PropertyState WrappedTextRotationProperty::getPropertyState( const uno::Reference< beans::XPropertyState >& xInnerPropertyState ) const + throw (beans::UnknownPropertyException, uno::RuntimeException) +{ + if( m_bDirectState ) + return beans::PropertyState_DIRECT_VALUE; + return WrappedProperty::getPropertyState( xInnerPropertyState ); +} + Any WrappedTextRotationProperty::convertInnerToOuterValue( const Any& rInnerValue ) const { Any aRet; diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx index 38a516bbc1b9..54fbf38e53d7 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx +++ b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx @@ -40,12 +40,17 @@ namespace chart class WrappedTextRotationProperty : public WrappedProperty { public: - WrappedTextRotationProperty(); + WrappedTextRotationProperty( bool bDirectState=false ); virtual ~WrappedTextRotationProperty(); + virtual ::com::sun::star::beans::PropertyState getPropertyState( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const + throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + protected: virtual ::com::sun::star::uno::Any convertInnerToOuterValue( const ::com::sun::star::uno::Any& rInnerValue ) const; virtual ::com::sun::star::uno::Any convertOuterToInnerValue( const ::com::sun::star::uno::Any& rOuterValue ) const; + + bool m_bDirectState; }; //............................................................................. |