1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef CHART_PIECHARTTYPETEMPLATE_HXX 24 #define CHART_PIECHARTTYPETEMPLATE_HXX 25 26 #include "OPropertySet.hxx" 27 #include "MutexContainer.hxx" 28 #include <comphelper/uno3.hxx> 29 30 #include "ChartTypeTemplate.hxx" 31 #include <com/sun/star/chart2/PieChartOffsetMode.hpp> 32 33 namespace chart 34 { 35 36 class PieChartTypeTemplate : 37 public MutexContainer, 38 public ChartTypeTemplate, 39 public ::property::OPropertySet 40 { 41 public: 42 PieChartTypeTemplate( 43 ::com::sun::star::uno::Reference< 44 ::com::sun::star::uno::XComponentContext > const & xContext, 45 const ::rtl::OUString & rServiceName, 46 ::com::sun::star::chart2::PieChartOffsetMode eMode, 47 bool bRings = false, 48 sal_Int32 nDim = 2 ); 49 virtual ~PieChartTypeTemplate(); 50 51 /// XServiceInfo declarations 52 APPHELPER_XSERVICEINFO_DECL() 53 54 /// merge XInterface implementations 55 DECLARE_XINTERFACE() 56 /// merge XTypeProvider implementations 57 DECLARE_XTYPEPROVIDER() 58 59 protected: 60 // ____ OPropertySet ____ 61 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const 62 throw(::com::sun::star::beans::UnknownPropertyException); 63 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); 64 65 // ____ XPropertySet ____ 66 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL 67 getPropertySetInfo() 68 throw (::com::sun::star::uno::RuntimeException); 69 70 // ____ XChartTypeTemplate ____ 71 virtual sal_Bool SAL_CALL matchesTemplate( 72 const ::com::sun::star::uno::Reference< 73 ::com::sun::star::chart2::XDiagram >& xDiagram, 74 sal_Bool bAdaptProperties ) 75 throw (::com::sun::star::uno::RuntimeException); 76 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > SAL_CALL 77 getChartTypeForNewSeries( const ::com::sun::star::uno::Sequence< 78 ::com::sun::star::uno::Reference< 79 ::com::sun::star::chart2::XChartType > >& aFormerlyUsedChartTypes ) 80 throw (::com::sun::star::uno::RuntimeException); 81 virtual void SAL_CALL applyStyle( 82 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries, 83 ::sal_Int32 nChartTypeGroupIndex, 84 ::sal_Int32 nSeriesIndex, 85 ::sal_Int32 nSeriesCount ) 86 throw (::com::sun::star::uno::RuntimeException); 87 virtual void SAL_CALL resetStyles( 88 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram ) 89 throw (::com::sun::star::uno::RuntimeException); 90 91 // ____ ChartTypeTemplate ____ 92 virtual sal_Int32 getDimension() const; 93 94 virtual void adaptDiagram( 95 const ::com::sun::star::uno::Reference< 96 ::com::sun::star::chart2::XDiagram > & xDiagram ); 97 98 virtual sal_Int32 getAxisCountByDimension( sal_Int32 nDimension ); 99 // virtual void createAxes( 100 // const ::com::sun::star::uno::Sequence< 101 // ::com::sun::star::uno::Reference< 102 // ::com::sun::star::chart2::XCoordinateSystem > > & rCoordSys ); 103 104 virtual void adaptAxes( 105 const ::com::sun::star::uno::Sequence< 106 ::com::sun::star::uno::Reference< 107 ::com::sun::star::chart2::XCoordinateSystem > > & rCoordSys ); 108 109 virtual void adaptScales( 110 const ::com::sun::star::uno::Sequence< 111 ::com::sun::star::uno::Reference< 112 ::com::sun::star::chart2::XCoordinateSystem > > & aCooSysSeq, 113 const ::com::sun::star::uno::Reference< 114 ::com::sun::star::chart2::data::XLabeledDataSequence > & xCategories ); 115 116 virtual void createChartTypes( 117 const ::com::sun::star::uno::Sequence< 118 ::com::sun::star::uno::Sequence< 119 ::com::sun::star::uno::Reference< 120 ::com::sun::star::chart2::XDataSeries > > >& aSeriesSeq, 121 const ::com::sun::star::uno::Sequence< 122 ::com::sun::star::uno::Reference< 123 ::com::sun::star::chart2::XCoordinateSystem > > & rCoordSys, 124 const ::com::sun::star::uno::Sequence< 125 ::com::sun::star::uno::Reference< 126 ::com::sun::star::chart2::XChartType > > & aOldChartTypesSeq 127 ); 128 129 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > 130 getChartTypeForIndex( sal_Int32 nChartTypeIndex ); 131 }; 132 133 } // namespace chart 134 135 // CHART_PIECHARTTYPETEMPLATE_HXX 136 #endif 137