diff options
35 files changed, 351 insertions, 29 deletions
diff --git a/chart2/inc/bitmaps.hlst b/chart2/inc/bitmaps.hlst index d5c7b75ff4c1..f0eabe5d53eb 100644 --- a/chart2/inc/bitmaps.hlst +++ b/chart2/inc/bitmaps.hlst @@ -13,6 +13,7 @@ inline constexpr OUString BMP_TYPE_COLUMN = u"chart2/res/typecolumn_16.png"_ustr inline constexpr OUString BMP_TYPE_BAR = u"chart2/res/typebar_16.png"_ustr; inline constexpr OUString BMP_TYPE_HISTOGRAM = u"chart2/res/typehistogram_16.png"_ustr; inline constexpr OUString BMP_TYPE_PIE = u"chart2/res/typepie_16.png"_ustr; +inline constexpr OUString BMP_TYPE_OFPIE = u"chart2/res/typeofpie_16.png"_ustr; inline constexpr OUString BMP_TYPE_LINE = u"chart2/res/typepointline_16.png"_ustr; inline constexpr OUString BMP_TYPE_XY = u"chart2/res/typexy_16.png"_ustr; inline constexpr OUString BMP_TYPE_AREA = u"chart2/res/typearea_16.png"_ustr; diff --git a/chart2/inc/strings.hrc b/chart2/inc/strings.hrc index f671a404a6d5..c6292baa97f5 100644 --- a/chart2/inc/strings.hrc +++ b/chart2/inc/strings.hrc @@ -162,6 +162,7 @@ #define STR_HISTOGRAM NC_("STR_HISTOGRAM", "Histogram Chart") #define STR_TYPE_AREA NC_("STR_TYPE_AREA", "Area") #define STR_TYPE_PIE NC_("STR_TYPE_PIE", "Pie") +#define STR_TYPE_OFPIE NC_("STR_TYPE_PIE", "Of-Pie") #define STR_PIE_EXPLODED NC_("STR_PIE_EXPLODED", "Exploded Pie Chart") #define STR_BAR_OF_PIE NC_("STR_BAR_OF_PIE", "Bar-of-pie Chart") #define STR_PIE_OF_PIE NC_("STR_PIE_OF_PIE", "Pie-of-pie Chart") diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 12b8b1f07943..1623eecb2364 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -104,6 +104,7 @@ enum PROP_DIAGRAM_STARTING_ANGLE, PROP_DIAGRAM_OF_PIE_TYPE, + PROP_DIAGRAM_COMPOSITE_SIZE, PROP_DIAGRAM_RIGHT_ANGLED_AXES, PROP_DIAGRAM_PERSPECTIVE, @@ -235,6 +236,11 @@ void lcl_AddPropertiesToVector( cppu::UnoType<chart2::PieChartSubType>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "CompositeSize", + PROP_DIAGRAM_COMPOSITE_SIZE, + cppu::UnoType<sal_Int32>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT ); //new for 3D charts rOutProperties.emplace_back( "RightAngledAxes", diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index 211d54a0e80c..dd5f67ed99cb 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -25,6 +25,7 @@ #include <bitmaps.hlst> #include <ChartModelHelper.hxx> #include <DataSeries.hxx> +#include <DataSeriesHelper.hxx> #include <Diagram.hxx> #include <ControllerLockGuard.hxx> #include <AxisHelper.hxx> @@ -592,6 +593,10 @@ void HistogramChartDialogController::adjustParameterToSubType(ChartTypeParameter } } +//========= +// PieChartDialogController +//========= + PieChartDialogController::PieChartDialogController() { } @@ -617,8 +622,6 @@ const tTemplateServiceChartTypeParameterMap& PieChartDialogController::getTempla {"com.sun.star.chart2.template.PieAllExploded" , ChartTypeParameter(2,false,false)}, {"com.sun.star.chart2.template.Donut" , ChartTypeParameter(3,false,false)}, {"com.sun.star.chart2.template.DonutAllExploded" , ChartTypeParameter(4,false,false)}, - {"com.sun.star.chart2.template.BarOfPie" , ChartTypeParameter(5,false,false)}, - {"com.sun.star.chart2.template.PieOfPie" , ChartTypeParameter(6,false,false)}, {"com.sun.star.chart2.template.ThreeDPie" , ChartTypeParameter(1,false,true)}, {"com.sun.star.chart2.template.ThreeDPieAllExploded" , ChartTypeParameter(2,false,true)}, {"com.sun.star.chart2.template.ThreeDDonut" , ChartTypeParameter(3,false,true)}, @@ -642,15 +645,11 @@ void PieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Ch rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_CIRCLES_2D_EXPLODED)); rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_DONUT_2D)); rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_DONUT_2D_EXPLODED)); - rSubTypeList.InsertItem(5, Image(StockImage::Yes, BMP_BAR_OF_PIE)); - rSubTypeList.InsertItem(6, Image(StockImage::Yes, BMP_PIE_OF_PIE)); } rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) ); rSubTypeList.SetItemText( 2, SchResId( STR_PIE_EXPLODED ) ); rSubTypeList.SetItemText( 3, SchResId( STR_DONUT ) ); rSubTypeList.SetItemText( 4, SchResId( STR_DONUT_EXPLODED ) ); - rSubTypeList.SetItemText( 5, SchResId( STR_BAR_OF_PIE ) ); - rSubTypeList.SetItemText( 6, SchResId( STR_PIE_OF_PIE ) ); } bool PieChartDialogController::shouldShow_3DLookControl() const @@ -664,6 +663,158 @@ void PieChartDialogController::adjustParameterToSubType( ChartTypeParameter& rPa rParameter.eStackMode = GlobalStackMode_NONE; } +//========= +// OfPieChartDialogController +//========= + +OfPieChartDialogController::OfPieChartDialogController() +{ +} + +OfPieChartDialogController::~OfPieChartDialogController() +{ +} + +OUString OfPieChartDialogController::getName() +{ + return SchResId(STR_TYPE_OFPIE); +} + +OUString OfPieChartDialogController::getImage() +{ + return BMP_TYPE_OFPIE; +} + +const tTemplateServiceChartTypeParameterMap& OfPieChartDialogController::getTemplateMap() const +{ + static tTemplateServiceChartTypeParameterMap s_aTemplateMap{ + {"com.sun.star.chart2.template.BarOfPie" , ChartTypeParameter(1,false,false)}, + {"com.sun.star.chart2.template.PieOfPie" , ChartTypeParameter(2,false,false)}}; + return s_aTemplateMap; +} +void OfPieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) +{ + rSubTypeList.Clear(); + + rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BAR_OF_PIE)); + rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_PIE_OF_PIE)); + rSubTypeList.SetItemText( 1, SchResId( STR_BAR_OF_PIE ) ); + rSubTypeList.SetItemText( 2, SchResId( STR_PIE_OF_PIE ) ); +} + +bool OfPieChartDialogController::shouldShow_3DLookControl() const +{ + // Maybe a TODO? + return false; +} + +void OfPieChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) +{ + if(rParameter.eStackMode==GlobalStackMode_STACK_Z) + rParameter.eStackMode = GlobalStackMode_NONE; +} + +void OfPieChartDialogController::showExtraControls(weld::Builder* pBuilder) +{ + if (!m_xFT_CompositeSize) + { + m_xFT_CompositeSize = pBuilder->weld_label(u"compositesizeft"_ustr); + assert(m_xFT_CompositeSize); + } + if (!m_xMF_CompositeSize) + { + m_xMF_CompositeSize = pBuilder->weld_spin_button(u"compositesize"_ustr); + assert(m_xMF_CompositeSize); + + m_xMF_CompositeSize->set_increments(1, 10); + m_xMF_CompositeSize->set_range(2, 100); + + m_xMF_CompositeSize->connect_value_changed( LINK( this, + OfPieChartDialogController, ChangeCompositeSizeHdl ) ); + m_xMF_CompositeSize->set_sensitive(true); + } + + m_xFT_CompositeSize->show(); + m_xMF_CompositeSize->show(); +} + +void OfPieChartDialogController::hideExtraControls() const +{ + if (m_xFT_CompositeSize) + m_xFT_CompositeSize->hide(); + if (m_xMF_CompositeSize) + m_xMF_CompositeSize->hide(); +} + +void OfPieChartDialogController::fillExtraControls( + const rtl::Reference<::chart::ChartModel>& xChartModel + , const uno::Reference< beans::XPropertySet >& xTemplateProps ) const +{ + if (!m_xMF_CompositeSize) + return; + + rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram(); + if(!xDiagram.is()) + return; + + sal_Int32 nCompositeSize = 2; + + if(xTemplateProps.is()) + { + try + { + xTemplateProps->getPropertyValue( u"CompositeSize"_ustr ) >>= nCompositeSize; + } + catch( const uno::Exception & ) + { + DBG_UNHANDLED_EXCEPTION("chart2"); + } + } + if( nCompositeSize < 2 ) + nCompositeSize = 2; + m_xMF_CompositeSize->set_value(nCompositeSize); + + // Limit based on number of entries in the series + const std::vector< rtl::Reference< DataSeries > > dataSeriesVec = + ChartModelHelper::getDataSeries( xChartModel); + if (!dataSeriesVec.empty()) { + const rtl::Reference<DataSeries> ds = dataSeriesVec[0]; + const DataSeries::tDataSequenceContainer data = ds->getDataSequences2(); + const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aValuesSeries( + DataSeriesHelper::getAllDataSequencesByRole( data , u"values"_ustr ) ); + + assert(!aValuesSeries.empty()); + + const uno::Reference< chart2::data::XDataSequence > xSeq( aValuesSeries.front()->getValues() ); + + // Allow all but one entry to be aggregated in the composite wedge + sal_Int32 nMaxCompositeSize = xSeq->getData().getLength() - 1; + + if( nMaxCompositeSize < 2 ) + nMaxCompositeSize = 2; + m_xMF_CompositeSize->set_max(nMaxCompositeSize); + } +} + +void OfPieChartDialogController::setTemplateProperties( const uno::Reference< beans::XPropertySet >& xTemplateProps ) const +{ + if( xTemplateProps.is()) + { + sal_Int32 nCompositeSize = m_xMF_CompositeSize->get_value(); + xTemplateProps->setPropertyValue( u"CompositeSize"_ustr , uno::Any(nCompositeSize) ); + } +} + +IMPL_LINK_NOARG(OfPieChartDialogController, ChangeCompositeSizeHdl, weld::SpinButton&, void) +{ + if( m_pChangeListener ) + m_pChangeListener->stateChanged(); +} + +//========= +// LineChartDialogController +//========= + LineChartDialogController::LineChartDialogController() { } diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index f469505438af..811c4df19017 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -76,7 +76,11 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle m_xSubTypeList->SetStyle(m_xSubTypeList->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_FLATVALUESET | WB_3DLOOK ); - m_xSubTypeList->SetColCount(6); + // Set number of columns in chart type selector. + // TODO: Ideally this would not be hard-coded, but determined + // programmatically based on the maximum number of chart types across all + // controllers. + m_xSubTypeList->SetColCount(4); m_xSubTypeList->SetLineCount(1); bool bEnableComplexChartTypes = true; @@ -97,6 +101,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle m_aChartTypeDialogControllerList.push_back(std::make_unique<BarChartDialogController>()); m_aChartTypeDialogControllerList.push_back(std::make_unique<HistogramChartDialogController>()); m_aChartTypeDialogControllerList.push_back(std::make_unique<PieChartDialogController>()); + m_aChartTypeDialogControllerList.push_back(std::make_unique<OfPieChartDialogController>()); m_aChartTypeDialogControllerList.push_back(std::make_unique<AreaChartDialogController>()); m_aChartTypeDialogControllerList.push_back(std::make_unique<LineChartDialogController>()); if (bEnableComplexChartTypes) diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx b/chart2/source/controller/sidebar/ChartTypePanel.cxx index 2328298d8ba2..e89b269f9c1c 100644 --- a/chart2/source/controller/sidebar/ChartTypePanel.cxx +++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx @@ -86,6 +86,7 @@ ChartTypePanel::ChartTypePanel(weld::Widget* pParent, ::chart::ChartController* m_aChartTypeDialogControllerList.push_back(std::make_unique<ColumnChartDialogController>()); m_aChartTypeDialogControllerList.push_back(std::make_unique<BarChartDialogController>()); m_aChartTypeDialogControllerList.push_back(std::make_unique<PieChartDialogController>()); + m_aChartTypeDialogControllerList.push_back(std::make_unique<OfPieChartDialogController>()); m_aChartTypeDialogControllerList.push_back(std::make_unique<AreaChartDialogController>()); m_aChartTypeDialogControllerList.push_back(std::make_unique<LineChartDialogController>()); if (bEnableComplexChartTypes) diff --git a/chart2/source/inc/ChartType.hxx b/chart2/source/inc/ChartType.hxx index fa55cf05694f..302e2187aff1 100644 --- a/chart2/source/inc/ChartType.hxx +++ b/chart2/source/inc/ChartType.hxx @@ -42,7 +42,8 @@ enum { PROP_PIECHARTTYPE_USE_RINGS, PROP_PIECHARTTYPE_3DRELATIVEHEIGHT, - PROP_PIECHARTTYPE_SUBTYPE // none, of-bar, of-pie + PROP_PIECHARTTYPE_SUBTYPE, // none, of-bar, of-pie + PROP_PIECHARTTYPE_COMPOSITESIZE }; diff --git a/chart2/source/inc/ChartTypeDialogController.hxx b/chart2/source/inc/ChartTypeDialogController.hxx index 72c584a89095..cbeeb8b59406 100644 --- a/chart2/source/inc/ChartTypeDialogController.hxx +++ b/chart2/source/inc/ChartTypeDialogController.hxx @@ -209,6 +209,38 @@ public: virtual bool shouldShow_3DLookControl() const override; }; +class OfPieChartDialogController final : public ChartTypeDialogController +{ +public: + OfPieChartDialogController(); + virtual ~OfPieChartDialogController() override; + + virtual OUString getName() override; + virtual OUString getImage() override; + virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; + virtual void fillSubTypeList(ValueSet& rSubTypeList, + const ChartTypeParameter& rParameter) override; + virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; + + virtual bool shouldShow_3DLookControl() const override; + + virtual void showExtraControls(weld::Builder* pBuilder) override; + virtual void hideExtraControls() const override; + virtual void fillExtraControls( + const rtl::Reference<::chart::ChartModel>& xChartModel, + const css::uno::Reference<css::beans::XPropertySet>& xTemplateProps) const override; + + virtual void setTemplateProperties( + const css::uno::Reference<css::beans::XPropertySet>& xTemplateProps) const override; + +private: + DECL_LINK(ChangeCompositeSizeHdl, weld::SpinButton&, void); + +private: + std::unique_ptr<weld::Label> m_xFT_CompositeSize; + std::unique_ptr<weld::SpinButton> m_xMF_CompositeSize; +}; + class LineChartDialogController final : public ChartTypeDialogController { public: diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index 8db74c180c9a..4ec856c822f0 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -395,47 +395,53 @@ rtl::Reference< ::chart::ChartTypeTemplate > ChartTypeManager::createTemplate( case TEMPLATE_PIE: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_NONE )); + chart2::PieChartOffsetMode_NONE, false, + chart2::PieChartSubType_NONE, 2 )); break; case TEMPLATE_PIEALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, chart2::PieChartOffsetMode_ALL_EXPLODED, false, - chart2::PieChartSubType_NONE )); + chart2::PieChartSubType_NONE, 2 )); break; case TEMPLATE_DONUT: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, true, chart2::PieChartSubType_NONE )); + chart2::PieChartOffsetMode_NONE, true, + chart2::PieChartSubType_NONE, 2 )); break; case TEMPLATE_DONUTALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, chart2::PieChartOffsetMode_ALL_EXPLODED, true, - chart2::PieChartSubType_NONE )); + chart2::PieChartSubType_NONE, 2 )); break; case TEMPLATE_BAROFPIE: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_BAR )); + chart2::PieChartOffsetMode_NONE, false, + chart2::PieChartSubType_BAR, 2 )); break; case TEMPLATE_PIEOFPIE: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_PIE )); + chart2::PieChartOffsetMode_NONE, false, + chart2::PieChartSubType_PIE, 2 )); break; case TEMPLATE_THREEDPIE: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, false, chart2::PieChartSubType_NONE, 3 )); + chart2::PieChartOffsetMode_NONE, false, + chart2::PieChartSubType_NONE, 2, 3 )); break; case TEMPLATE_THREEDPIEALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, chart2::PieChartOffsetMode_ALL_EXPLODED, false, - chart2::PieChartSubType_NONE, 3 )); + chart2::PieChartSubType_NONE, 2, 3 )); break; case TEMPLATE_THREEDDONUT: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, - chart2::PieChartOffsetMode_NONE, true, chart2::PieChartSubType_NONE, 3 )); + chart2::PieChartOffsetMode_NONE, true, + chart2::PieChartSubType_NONE, 2, 3 )); break; case TEMPLATE_THREEDDONUTALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, chart2::PieChartOffsetMode_ALL_EXPLODED, true, - chart2::PieChartSubType_NONE, 3 )); + chart2::PieChartSubType_NONE, 2, 3 )); break; case TEMPLATE_SCATTERLINESYMBOL: diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx index 63d43587d935..224b37a88865 100644 --- a/chart2/source/model/template/PieChartType.cxx +++ b/chart2/source/model/template/PieChartType.cxx @@ -47,6 +47,7 @@ namespace ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, ::chart::PROP_PIECHARTTYPE_USE_RINGS, false ); ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, ::chart::PROP_PIECHARTTYPE_3DRELATIVEHEIGHT, 100 ); ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, ::chart::PROP_PIECHARTTYPE_SUBTYPE, chart2::PieChartSubType_NONE ); + ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, ::chart::PROP_PIECHARTTYPE_COMPOSITESIZE, 2 ); return aOutMap; }(); return aStaticDefaults; @@ -70,7 +71,11 @@ namespace { u"SubPieType"_ustr, ::chart::PROP_PIECHARTTYPE_SUBTYPE, cppu::UnoType<chart2::PieChartSubType>::get(), - beans::PropertyAttribute::MAYBEDEFAULT } + beans::PropertyAttribute::MAYBEDEFAULT }, + { u"CompositeSize"_ustr, + ::chart::PROP_PIECHARTTYPE_COMPOSITESIZE, + cppu::UnoType<sal_Int32>::get(), + beans::PropertyAttribute::MAYBEVOID } }; std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 2fa609d0d84e..0ae474623f37 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -55,7 +55,8 @@ enum PROP_PIE_TEMPLATE_OFFSET_MODE, PROP_PIE_TEMPLATE_DIMENSION, PROP_PIE_TEMPLATE_USE_RINGS, - PROP_PIE_TEMPLATE_SUB_PIE_TYPE + PROP_PIE_TEMPLATE_SUB_PIE_TYPE, + PROP_PIE_TEMPLATE_COMPOSITE_SIZE }; ::chart::tPropertyValueMap& StaticPieChartTypeTemplateDefaults() @@ -68,6 +69,7 @@ enum ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_PIE_TEMPLATE_DIMENSION, 2 ); ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_PIE_TEMPLATE_USE_RINGS, false ); ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_PIE_TEMPLATE_SUB_PIE_TYPE, chart2::PieChartSubType_NONE ); + ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_PIE_TEMPLATE_COMPOSITE_SIZE, 2 ); return aOutMap; }(); return aStaticDefaults; @@ -103,6 +105,11 @@ enum PROP_PIE_TEMPLATE_SUB_PIE_TYPE, cppu::UnoType<chart2::PieChartSubType>::get(), beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT }, + { u"CompositeSize"_ustr, + PROP_PIE_TEMPLATE_COMPOSITE_SIZE, + cppu::UnoType<sal_Int32>::get(), + beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT } }; @@ -133,6 +140,7 @@ PieChartTypeTemplate::PieChartTypeTemplate( chart2::PieChartOffsetMode eMode, bool bRings, chart2::PieChartSubType eSubType, + sal_Int32 nCompositeSize, sal_Int32 nDim /* = 2 */ ) : ChartTypeTemplate( xContext, rServiceName ) { @@ -140,6 +148,7 @@ PieChartTypeTemplate::PieChartTypeTemplate( setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_DIMENSION, uno::Any( nDim )); setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_USE_RINGS, uno::Any( bRings )); setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_SUB_PIE_TYPE, uno::Any( eSubType )); + setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_COMPOSITE_SIZE, uno::Any( nCompositeSize )); } PieChartTypeTemplate::~PieChartTypeTemplate() @@ -265,6 +274,8 @@ void PieChartTypeTemplate::createChartTypes( PROP_PIECHARTTYPE_USE_RINGS, getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); // "UseRings" xCT->setFastPropertyValue( PROP_PIECHARTTYPE_SUBTYPE, getFastPropertyValue( PROP_PIE_TEMPLATE_SUB_PIE_TYPE )); // "SubType" + xCT->setFastPropertyValue( + PROP_PIECHARTTYPE_COMPOSITESIZE, getFastPropertyValue( PROP_PIE_TEMPLATE_COMPOSITE_SIZE )); // "CompositeSize" rCoordSys[0]->setChartTypes( std::vector{xCT} ); if( !aSeriesSeq.empty() ) diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx b/chart2/source/model/template/PieChartTypeTemplate.hxx index b603392e7009..5e5d2539969d 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.hxx +++ b/chart2/source/model/template/PieChartTypeTemplate.hxx @@ -39,6 +39,7 @@ public: css::chart2::PieChartOffsetMode eMode, bool bRings, css::chart2::PieChartSubType eSubType, + sal_Int32 nCompositeSize, sal_Int32 nDim = 2 ); virtual ~PieChartTypeTemplate() override; diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index 58193df880d6..2db56c84a5bd 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -195,6 +195,7 @@ PieChart::PieChart( const rtl::Reference<ChartType>& xChartTypeModel , m_bUseRings(false) , m_bSizeExcludesLabelsAndExplodedSegments(bExcludingPositioning) , m_eSubType(PieChartSubType_NONE) + , m_nCompositeSize(2) , m_fMaxOffset(std::numeric_limits<double>::quiet_NaN()) { PlotterBase::m_pPosHelper = &m_aPosHelper; @@ -227,6 +228,14 @@ PieChart::PieChart( const rtl::Reference<ChartType>& xChartTypeModel { TOOLS_WARN_EXCEPTION("chart2", "" ); } + try + { + xChartTypeModel->getFastPropertyValue(PROP_PIECHARTTYPE_COMPOSITESIZE) >>= m_nCompositeSize; // "CompositeSize" + } + catch( const uno::Exception& ) + { + TOOLS_WARN_EXCEPTION("chart2", "" ); + } } PieChart::~PieChart() @@ -963,7 +972,7 @@ void PieChart::createShapes() PieDataSrcBase *pDataSrc = nullptr; PieDataSrc normalPieSrc; - OfPieDataSrc ofPieSrc; + OfPieDataSrc ofPieSrc(m_nCompositeSize); // Default to regular pie if too few points for of-pie ::css::chart2::PieChartSubType eSubType = @@ -2218,26 +2227,29 @@ sal_Int32 OfPieDataSrc::getNPoints(const VDataSeries* pSeries, enum SubPieType eType) const { if (eType == SubPieType::LEFT) { - return pSeries->getTotalPointCount() - 2; + return pSeries->getTotalPointCount() - m_nCompositeSize + 1; } else { assert(eType == SubPieType::RIGHT); - return 3; + return m_nCompositeSize; } } double OfPieDataSrc::getData(const VDataSeries* pSeries, sal_Int32 nPtIdx, enum SubPieType eType) const { - const sal_Int32 n = pSeries->getTotalPointCount() - 3; + const sal_Int32 n = pSeries->getTotalPointCount() - m_nCompositeSize; if (eType == SubPieType::LEFT) { // nPtIdx should be in [0, n] if (nPtIdx < n) { return fabs(pSeries->getYValue( nPtIdx )); } else { + // composite wedge assert(nPtIdx == n); - return fabs(pSeries->getYValue(n)) + - fabs(pSeries->getYValue(n+1)) + - fabs(pSeries->getYValue(n+2)); + double total = 0; + for (sal_Int32 i = n; i < n + m_nCompositeSize; ++i) { + total += pSeries->getYValue(i); + } + return total; } } else { assert(eType == SubPieType::RIGHT); @@ -2250,7 +2262,7 @@ uno::Reference< beans::XPropertySet > OfPieDataSrc::getProps( enum SubPieType eType) const { const sal_Int32 nPts = pSeries->getTotalPointCount(); - const sal_Int32 n = nPts - 3; + const sal_Int32 n = nPts - m_nCompositeSize; if (eType == SubPieType::LEFT) { // nPtIdx should be in [0, n] if (nPtIdx < n) { diff --git a/chart2/source/view/charttypes/PieChart.hxx b/chart2/source/view/charttypes/PieChart.hxx index a7b158435d17..6f29ea7e894c 100644 --- a/chart2/source/view/charttypes/PieChart.hxx +++ b/chart2/source/view/charttypes/PieChart.hxx @@ -101,6 +101,10 @@ public: class OfPieDataSrc : public PieDataSrcBase { public: + OfPieDataSrc(sal_Int32 nCompositeSize): + m_nCompositeSize(nCompositeSize) + {} + // Minimum sensible number of data points static constexpr sal_Int32 minPoints = 4; @@ -113,6 +117,8 @@ public: virtual uno::Reference< beans::XPropertySet > getProps( const VDataSeries* pSeries, sal_Int32 nPtIdx, enum SubPieType eType) const; +private: + sal_Int32 m_nCompositeSize; }; //======================= @@ -256,6 +262,7 @@ private: //member bool m_bUseRings; bool m_bSizeExcludesLabelsAndExplodedSegments; ::css::chart2::PieChartSubType m_eSubType; + sal_Int32 m_nCompositeSize; struct PieLabelInfo { diff --git a/chart2/uiconfig/ui/sidebartype.ui b/chart2/uiconfig/ui/sidebartype.ui index 131a1c5eea5d..9d6c348631e1 100644 --- a/chart2/uiconfig/ui/sidebartype.ui +++ b/chart2/uiconfig/ui/sidebartype.ui @@ -244,6 +244,34 @@ </packing> </child> <child> + <object class="GtkLabel" id="compositesizeft"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">start</property> + <property name="label" translatable="yes" context="sidebartype|compositesizeft">_Number of lines</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">compositesize</property> + <property name="ellipsize">end</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">8</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="compositesize"> + <property name="can-focus">True</property> + <property name="no-show-all">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> + <property name="adjustment">adjustment1</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">8</property> + </packing> + </child> + <child> <object class="GtkComboBox" id="cmb_chartType"> <property name="visible">True</property> <property name="can-focus">False</property> diff --git a/chart2/uiconfig/ui/tp_ChartType.ui b/chart2/uiconfig/ui/tp_ChartType.ui index 68decb08f0d7..bdd9427768b1 100644 --- a/chart2/uiconfig/ui/tp_ChartType.ui +++ b/chart2/uiconfig/ui/tp_ChartType.ui @@ -443,6 +443,51 @@ <property name="top-attach">4</property> </packing> </child> + <child> + <!-- n-columns=2 n-rows=1 --> + <object class="GtkGrid" id="grid10"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="column-spacing">6</property> + <child> + <object class="GtkLabel" id="compositesizeft"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="label" translatable="yes" context="tp_ChartType|compositesizeft">_Size of composite wedge</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">compositesize</property> + <property name="ellipsize">end</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="compositesize"> + <property name="can-focus">True</property> + <property name="no-show-all">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> + <property name="adjustment">adjustment1</property> + <child internal-child="accessible"> + <object class="AtkObject" id="compositesize-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="tp_ChartType|extended_tip|compositesize">Set the number of entries in an of-pie chart composite wedge.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">0</property> + </packing> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">4</property> + </packing> + </child> </object> <packing> <property name="left-attach">0</property> diff --git a/icon-themes/breeze/chart2/res/typeofpie_16.png b/icon-themes/breeze/chart2/res/typeofpie_16.png Binary files differnew file mode 100644 index 000000000000..1e9ce75ebd45 --- /dev/null +++ b/icon-themes/breeze/chart2/res/typeofpie_16.png diff --git a/icon-themes/breeze_dark/chart2/res/typeofpie_16.png b/icon-themes/breeze_dark/chart2/res/typeofpie_16.png Binary files differnew file mode 100644 index 000000000000..b8b503d4a09d --- /dev/null +++ b/icon-themes/breeze_dark/chart2/res/typeofpie_16.png diff --git a/icon-themes/breeze_dark_svg/chart2/res/typeofpie_16.svg b/icon-themes/breeze_dark_svg/chart2/res/typeofpie_16.svg new file mode 100644 index 000000000000..a8c84d34be14 --- /dev/null +++ b/icon-themes/breeze_dark_svg/chart2/res/typeofpie_16.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2c-3.3137167 0-6 2.6862833-6 6 0 3.313717 2.6862833 6 6 6 3.313717 0 6-2.686283 6-6 0-3.3137167-2.686283-6-6-6zm0 1v5h5c0 2.761424-2.238576 5-5 5-2.7614237 0-5-2.238576-5-5 0-2.7614237 2.2385763-5 5-5z" fill="#eff0f1"/></svg>
\ No newline at end of file diff --git a/icon-themes/breeze_svg/chart2/res/typeofpie_16.svg b/icon-themes/breeze_svg/chart2/res/typeofpie_16.svg new file mode 100644 index 000000000000..1bb84d0b8cb3 --- /dev/null +++ b/icon-themes/breeze_svg/chart2/res/typeofpie_16.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2c-3.3137167 0-6 2.6862833-6 6 0 3.313717 2.6862833 6 6 6 3.313717 0 6-2.686283 6-6 0-3.3137167-2.686283-6-6-6zm0 1v5h5c0 2.761424-2.238576 5-5 5-2.7614237 0-5-2.238576-5-5 0-2.7614237 2.2385763-5 5-5z" fill="#232629"/></svg>
\ No newline at end of file diff --git a/icon-themes/colibre/chart2/res/typeofpie_16.png b/icon-themes/colibre/chart2/res/typeofpie_16.png Binary files differnew file mode 100644 index 000000000000..fa57e3626b46 --- /dev/null +++ b/icon-themes/colibre/chart2/res/typeofpie_16.png diff --git a/icon-themes/colibre_dark/chart2/res/typeofpie_16.png b/icon-themes/colibre_dark/chart2/res/typeofpie_16.png Binary files differnew file mode 100644 index 000000000000..418afebb9e59 --- /dev/null +++ b/icon-themes/colibre_dark/chart2/res/typeofpie_16.png diff --git a/icon-themes/colibre_dark_svg/chart2/res/typeofpie_16.svg b/icon-themes/colibre_dark_svg/chart2/res/typeofpie_16.svg new file mode 100644 index 000000000000..56ac469d8654 --- /dev/null +++ b/icon-themes/colibre_dark_svg/chart2/res/typeofpie_16.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m7.2832031 7-.2832031.2890625-5.140625 5.1406255a7.5 7.5 0 0 0 .2324219.263671l.0859375.085938a7.5 7.5 0 0 0 5.3222656 2.220703 7.5 7.5 0 0 0 7.5-7.5 7.5 7.5 0 0 0 -.017578-.5h-6.982422z" fill="#83beec"/><path d="m7.703125 8-4.4316406 4.431641c1.1771537 1.010693 2.6770037 1.566988 4.2285156 1.568359 3.39356-.0032 6.213567-2.616493 6.474609-6h-5.974609z" fill="#0063b1"/><path d="m7 7.2890625-5.15625 5.1562495.7070312.707032 5.1523438-5.152344h.296875 7v-1h-7-.7173835z" fill="#797774"/><path d="m7.5 0a7.5 7.5 0 0 0 -7.5 7.5 7.5 7.5 0 0 0 2.5644531 5.638672l5.1386719-5.138672.296875-.2753906v-.7246094-6.97460937a7.5 7.5 0 0 0 -.5-.02539063z" fill="#fafafa"/><path d="m7 1.0214844c-3.3850032.2611585-5.9988378 3.0834532-6 6.4785156.00222 1.549247.5577291 3.046756 1.5664062 4.222656l4.4335938-4.4335935zm1 .00391c-5.3333333 9.9830734-2.6666667 4.9915365 0 0z" fill="#797774"/><path d="m7.5 0a7.5 7.5 0 0 0 -.5.01757813v7.98242187h7.974609a7.5 7.5 0 0 0 .025391-.5 7.5 7.5 0 0 0 -7.5-7.5z" fill="#f8db8f"/><path d="m8 1.0253906v5.9746094h5.978516a6.5 6.5 0 0 0 -5.978516-5.9746094z" fill="#ed8733"/></svg>
\ No newline at end of file diff --git a/icon-themes/colibre_svg/chart2/res/typeofpie_16.svg b/icon-themes/colibre_svg/chart2/res/typeofpie_16.svg new file mode 100644 index 000000000000..c95bab407637 --- /dev/null +++ b/icon-themes/colibre_svg/chart2/res/typeofpie_16.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m7.2832031 7-.2832031.2890625-5.140625 5.1406255a7.5 7.5 0 0 0 .2324219.263671l.0859375.085938a7.5 7.5 0 0 0 5.3222656 2.220703 7.5 7.5 0 0 0 7.5-7.5 7.5 7.5 0 0 0 -.017578-.5h-6.982422z" fill="#0063b1"/><path d="m7.703125 8-4.4316406 4.431641c1.1771537 1.010693 2.6770037 1.566988 4.2285156 1.568359 3.39356-.0032 6.213567-2.616493 6.474609-6h-5.974609z" fill="#83beec"/><path d="m7 7.2890625-5.15625 5.1562495.7070312.707032 5.1523438-5.152344h.296875 7v-1h-7-.7173835z" fill="#797774"/><path d="m7.5 0a7.5 7.5 0 0 0 -7.5 7.5 7.5 7.5 0 0 0 2.5644531 5.638672l5.1386719-5.138672.296875-.2753906v-.7246094-6.97460937a7.5 7.5 0 0 0 -.5-.02539063z" fill="#3a3a38"/><path d="m7 1.0214844c-3.3850032.2611585-5.9988378 3.0834532-6 6.4785156.00222 1.549247.5577291 3.046756 1.5664062 4.222656l4.4335938-4.4335935zm1 .00391c-5.3333333 9.9830734-2.6666667 4.9915365 0 0z" fill="#797774"/><path d="m7.5 0a7.5 7.5 0 0 0 -.5.01757813v7.98242187h7.974609a7.5 7.5 0 0 0 .025391-.5 7.5 7.5 0 0 0 -7.5-7.5z" fill="#ed8733"/><path d="m8 1.0253906v5.9746094h5.978516a6.5 6.5 0 0 0 -5.978516-5.9746094z" fill="#f8db8f"/></svg>
\ No newline at end of file diff --git a/icon-themes/elementary/chart2/res/typeofpie_16.png b/icon-themes/elementary/chart2/res/typeofpie_16.png Binary files differnew file mode 100644 index 000000000000..0187a3c90c11 --- /dev/null +++ b/icon-themes/elementary/chart2/res/typeofpie_16.png diff --git a/icon-themes/elementary_svg/chart2/res/typeofpie_16.svg b/icon-themes/elementary_svg/chart2/res/typeofpie_16.svg new file mode 100644 index 000000000000..3daefa25fe62 --- /dev/null +++ b/icon-themes/elementary_svg/chart2/res/typeofpie_16.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a"><stop offset="0" stop-color="#fff"/><stop offset=".65377" stop-color="#fff" stop-opacity=".23529"/><stop offset="1" stop-color="#fff" stop-opacity=".15686"/><stop offset="1" stop-color="#fff" stop-opacity=".39216"/></linearGradient><linearGradient id="b" gradientTransform="matrix(1.3831826 0 0 1.4143822 -27.376666 31.99754)" gradientUnits="userSpaceOnUse" x1=".813559" x2="8" y1="3.5" y2="6.998038"><stop offset="0" stop-color="#9bdb4d"/><stop offset="1" stop-color="#68b723"/></linearGradient><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="10" x2="16" y1="8.5" y2="4.5"><stop offset="0" stop-color="#ffa154"/><stop offset="1" stop-color="#f37329"/></linearGradient><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="5" x2="15" y1="8.5" y2="16"><stop offset="0" stop-color="#cd9ef7"/><stop offset="1" stop-color="#a56de2"/></linearGradient><linearGradient id="e" gradientUnits="userSpaceOnUse" x1="8" x2="8" xlink:href="#a" y1="8.5" y2="15"/><linearGradient id="f" gradientUnits="userSpaceOnUse" x1="5" x2="5" xlink:href="#a" y1="1" y2="7.236048"/><linearGradient id="g" gradientUnits="userSpaceOnUse" x1="11.5" x2="11.5" xlink:href="#a" y1=".5" y2="6"/><g stroke-linecap="round" stroke-linejoin="round"><path d="m7.5.51757812a7.5 7.5 0 0 0 -7 7.48242188 7.5 7.5 0 0 0 2.3925781 5.478516l4.6074219-4.978516z" fill="url(#b)" stroke="#507525" stroke-opacity=".580882"/><path d="m8 .5a7.5 7.5 0 0 0 -.5.01757812v7.98242188h7.974609a7.5 7.5 0 0 0 .025391-.5 7.5 7.5 0 0 0 -7.5-7.5z" fill="url(#c)" stroke="#703224" stroke-opacity=".639706"/><path d="m7.5 8.5-4.6074219 4.978516a7.5 7.5 0 0 0 5.1074219 2.021484 7.5 7.5 0 0 0 7.474609-7z" fill="url(#d)" stroke="#7239b3"/><g fill="none"><path d="m7.9375 9.5-3.5058594 3.787109c1.0660469.716808 2.2848559 1.210373 3.5703125 1.212891 1.6268611-.002897 3.2441829-.643801 4.4316409-1.755859.918496-.860176 1.463903-2.022787 1.763672-3.244141z" stroke="url(#e)"/><path d="m6.5 1.796875c-1.2220596.3001585-2.3858637.844157-3.2460938 1.7636719-1.1130886 1.1897998-1.7537122 2.8101619-1.7539062 4.4394531.00306 1.4312363.6074777 2.777245 1.4824219 3.908203l3.5175781-3.8007811z" stroke="url(#f)"/><path d="m8.4765625 1.5722656v5.9511719h5.9511715c-.119826-1.5388017-.722275-3.0445412-1.814453-4.1367187-1.092177-1.0921776-2.597917-1.6946272-4.1367185-1.8144532z" stroke="url(#g)" stroke-opacity=".639706"/></g></g></svg>
\ No newline at end of file diff --git a/icon-themes/sifr/chart2/res/typeofpie_16.png b/icon-themes/sifr/chart2/res/typeofpie_16.png Binary files differnew file mode 100644 index 000000000000..8f1800ec2e9c --- /dev/null +++ b/icon-themes/sifr/chart2/res/typeofpie_16.png diff --git a/icon-themes/sifr_dark/chart2/res/typeofpie_16.png b/icon-themes/sifr_dark/chart2/res/typeofpie_16.png Binary files differnew file mode 100644 index 000000000000..f59a9f920365 --- /dev/null +++ b/icon-themes/sifr_dark/chart2/res/typeofpie_16.png diff --git a/icon-themes/sifr_dark_svg/chart2/res/typeofpie_16.svg b/icon-themes/sifr_dark_svg/chart2/res/typeofpie_16.svg new file mode 100644 index 000000000000..b60a4c00b672 --- /dev/null +++ b/icon-themes/sifr_dark_svg/chart2/res/typeofpie_16.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#efefef"><path d="m14 7.5c0-3.6-2.9-6.5-6.5-6.5s-6.5 2.9-6.5 6.5 2.9 6.5 6.5 6.5c.17 0 .3336709-.007907.5 0v-6h5.98c.02-.17.02-.33.02-.5z"/><path d="m9 9v6c.9 0 1.77-.33 2.54-.74 1.92-1.02 3.26-2.96 3.46-5.26z" opacity=".35"/></g></svg>
\ No newline at end of file diff --git a/icon-themes/sifr_svg/chart2/res/typeofpie_16.svg b/icon-themes/sifr_svg/chart2/res/typeofpie_16.svg new file mode 100644 index 000000000000..0a1bc513c127 --- /dev/null +++ b/icon-themes/sifr_svg/chart2/res/typeofpie_16.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#2e3436"><path d="m14 7.5c0-3.6-2.9-6.5-6.5-6.5s-6.5 2.9-6.5 6.5 2.9 6.5 6.5 6.5c.17 0 .3336709-.007907.5 0v-6h5.98c.02-.17.02-.33.02-.5z"/><path d="m9 9v6c.9 0 1.77-.33 2.54-.74 1.92-1.02 3.26-2.96 3.46-5.26z" opacity=".35"/></g></svg>
\ No newline at end of file diff --git a/icon-themes/sukapura/chart2/res/typeofpie_16.png b/icon-themes/sukapura/chart2/res/typeofpie_16.png Binary files differnew file mode 100644 index 000000000000..ecffdbe00908 --- /dev/null +++ b/icon-themes/sukapura/chart2/res/typeofpie_16.png diff --git a/icon-themes/sukapura_dark/chart2/res/typeofpie_16.png b/icon-themes/sukapura_dark/chart2/res/typeofpie_16.png Binary files differnew file mode 100644 index 000000000000..2e75d2dac6e8 --- /dev/null +++ b/icon-themes/sukapura_dark/chart2/res/typeofpie_16.png diff --git a/icon-themes/sukapura_dark_svg/chart2/res/typeofpie_16.svg b/icon-themes/sukapura_dark_svg/chart2/res/typeofpie_16.svg new file mode 100644 index 000000000000..272f82fecacd --- /dev/null +++ b/icon-themes/sukapura_dark_svg/chart2/res/typeofpie_16.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m16 8a8 8 0 0 1 -7.9976777 8 8 8 0 0 1 -8.00232095-7.9953553 8 8 0 0 1 7.99303165-8.00464167l.006967 7.99999697z" fill="#0a84ff"/><path d="m8 8-5.6542969 5.654297a8 8 0 0 0 5.65625 2.345703 8 8 0 0 0 7.9980469-8z" fill="#ff9f0a"/><path d="m7.9921875 0 .0078125 8h8a8 8 0 0 0 -8-8 8 8 0 0 0 -.0078125 0zm-3.7246094.9296875a8 8 0 0 0 -.59375.3417969 8 8 0 0 1 .59375-.3417969zm-4.1113281 8.6054687a8 8 0 0 0 .13671875.6074218 8 8 0 0 1 -.13671875-.6074218z" fill="#28d74b"/></svg>
\ No newline at end of file diff --git a/icon-themes/sukapura_svg/chart2/res/typeofpie_16.svg b/icon-themes/sukapura_svg/chart2/res/typeofpie_16.svg new file mode 100644 index 000000000000..899500755e6d --- /dev/null +++ b/icon-themes/sukapura_svg/chart2/res/typeofpie_16.svg @@ -0,0 +1 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m16 8a8 8 0 0 1 -7.9976777 8 8 8 0 0 1 -8.00232095-7.9953553 8 8 0 0 1 7.99303165-8.00464167l.006967 7.99999697z" fill="#007aff"/><path d="m8 8-5.6542969 5.654297a8 8 0 0 0 5.65625 2.345703 8 8 0 0 0 7.9980469-8z" fill="#ff9500"/><path d="m7.9921875 0 .0078125 8h8a8 8 0 0 0 -8-8 8 8 0 0 0 -.0078125 0zm-3.7246094.9296875a8 8 0 0 0 -.59375.3417969 8 8 0 0 1 .59375-.3417969zm-4.1113281 8.6054687a8 8 0 0 0 .13671875.6074218 8 8 0 0 1 -.13671875-.6074218z" fill="#28cd41"/></svg>
\ No newline at end of file diff --git a/sw/qa/uitest/chart/tdf138556.py b/sw/qa/uitest/chart/tdf138556.py index 7bddbf7c7227..910b24ebcc4d 100644 --- a/sw/qa/uitest/chart/tdf138556.py +++ b/sw/qa/uitest/chart/tdf138556.py @@ -27,7 +27,7 @@ class tdf138556( UITestCase ): #TODO: test other subtypes with self.ui_test.execute_dialog_through_action( xChart, "COMMAND", mkPropertyValues({ "COMMAND" : "DiagramType" })) as xDialog: xChartType = xDialog.getChild( "charttype" ) - xStockType = xChartType.getChild( "9" ) + xStockType = xChartType.getChild( "10" ) xStockType.executeAction( "SELECT", tuple()) #Insert Data Series |