LibreOffice Module chart2 (master) 1
ChartTypeDialogController.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
21#include <ChartTypeManager.hxx>
22#include <ChartTypeTemplate.hxx>
23#include <ResId.hxx>
24#include <strings.hrc>
25#include <bitmaps.hlst>
26#include <ChartModelHelper.hxx>
27#include <DataSeries.hxx>
28#include <DiagramHelper.hxx>
29#include <Diagram.hxx>
31#include <AxisHelper.hxx>
32#include <unonames.hxx>
34#include <ChartModel.hxx>
35
36#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
37
38#include <svtools/valueset.hxx>
39#include <vcl/image.hxx>
40#include <vcl/settings.hxx>
41
43
44namespace chart
45{
46using namespace ::com::sun::star;
47using namespace ::com::sun::star::chart2;
48
50 : nSubTypeIndex( 1 )
51 , bXAxisWithValues( false )
52 , b3DLook( false )
53 , bSymbols( true )
54 , bLines( true )
55 , eStackMode( GlobalStackMode_NONE )
56 , eCurveStyle( CurveStyle_LINES )
57 , nCurveResolution(20)
58 , nSplineOrder(3)
59 , nGeometry3D(DataPointGeometry3D::CUBOID)
61 , bSortByXValues(false)
62 , mbRoundedEdge(false)
63{
64}
65
66ChartTypeParameter::ChartTypeParameter( sal_Int32 SubTypeIndex, bool HasXAxisWithValues
67 , bool Is3DLook, GlobalStackMode nStackMode
68 , bool HasSymbols, bool HasLines
69 , CurveStyle nCurveStyle )
70 : nSubTypeIndex( SubTypeIndex )
71 , bXAxisWithValues( HasXAxisWithValues )
72 , b3DLook( Is3DLook )
73 , bSymbols( HasSymbols )
74 , bLines( HasLines )
75 , eStackMode( nStackMode )
76 , eCurveStyle( nCurveStyle )
77 , nCurveResolution(20)
78 , nSplineOrder(3)
79 , nGeometry3D(DataPointGeometry3D::CUBOID)
81 , bSortByXValues(false)
82 , mbRoundedEdge(false)
83{
84}
85
87{
88 return mapsToSimilarService( rParameter, 0 );
89}
90bool ChartTypeParameter::mapsToSimilarService( const ChartTypeParameter& rParameter, sal_Int32 nTheHigherTheLess ) const
91{
92 sal_Int32 nMax=7;
93 if(nTheHigherTheLess>nMax)
94 return true;
95 if( bXAxisWithValues!=rParameter.bXAxisWithValues )
96 return nTheHigherTheLess>nMax-1;
97 if( b3DLook!=rParameter.b3DLook )
98 return nTheHigherTheLess>nMax-2;
99 if( eStackMode!=rParameter.eStackMode )
100 return nTheHigherTheLess>nMax-3;
101 if( nSubTypeIndex!=rParameter.nSubTypeIndex )
102 return nTheHigherTheLess>nMax-4;
103 if( bSymbols!=rParameter.bSymbols )
104 return nTheHigherTheLess>nMax-5;
105 if( bLines!=rParameter.bLines )
106 return nTheHigherTheLess>nMax-6;
107 return true;
108}
109
111 : bSupportsXAxisWithValues(false)
112 , bSupports3D(true)
113{
114}
115
117{
118}
119
120bool ChartTypeDialogController::isSubType( const OUString& rServiceName )
121{
123 tTemplateServiceChartTypeParameterMap::const_iterator aIt( rTemplateMap.find( rServiceName ));
124 return aIt != rTemplateMap.end();
125}
127 const OUString& rServiceName
128 , const uno::Reference< beans::XPropertySet >& xTemplateProps )
129{
132 tTemplateServiceChartTypeParameterMap::const_iterator aIt( rTemplateMap.find( rServiceName ));
133 if( aIt != rTemplateMap.end())
134 aRet = (*aIt).second;
135 if( xTemplateProps.is() )
136 {
137 try
138 {
139 xTemplateProps->getPropertyValue( CHART_UNONAME_CURVE_STYLE ) >>= aRet.eCurveStyle;
140 xTemplateProps->getPropertyValue( CHART_UNONAME_CURVE_RESOLUTION ) >>= aRet.nCurveResolution;
141 xTemplateProps->getPropertyValue( CHART_UNONAME_SPLINE_ORDER ) >>= aRet.nSplineOrder;
142 }
143 catch( uno::Exception & ex )
144 {
145 //not all templates need to support CurveStyle, CurveResolution or SplineOrder
146 ex.Context.is();//to have debug information without compilation warnings
147 }
148
149 try
150 {
151 xTemplateProps->getPropertyValue( "Geometry3D" ) >>= aRet.nGeometry3D;
152 }
153 catch( uno::Exception& ex )
154 {
155 //not all templates need to support Geometry3D
156 ex.Context.is();//to have debug information without compilation warnings
157 }
158 }
159 return aRet;
160}
162{
163}
165{
166 switch( rParameter.nSubTypeIndex )
167 {
168 case 2:
170 break;
171 case 3:
173 break;
174 case 4:
176 break;
177 default:
179 break;
180 }
181}
183{
184 bool bFoundSomeMatch=false;
185
187 if( rParameter.b3DLook && !bSupports3D )
188 rParameter.b3DLook = false;
189 if(!rParameter.b3DLook && rParameter.eStackMode==GlobalStackMode_STACK_Z)
190 rParameter.eStackMode = GlobalStackMode_NONE;
191
193 for( sal_Int32 nMatchPrecision=0; nMatchPrecision<7 && !bFoundSomeMatch; nMatchPrecision++ )
194 {
195 for (auto const& elem : rMap)
196 {
197 if( rParameter.mapsToSimilarService( elem.second, nMatchPrecision ) )
198 {
199 //remind some values
200 ThreeDLookScheme aScheme = rParameter.eThreeDLookScheme;
201 sal_Int32 nCurveResolution = rParameter.nCurveResolution;
202 sal_Int32 nSplineOrder = rParameter.nSplineOrder;
203 CurveStyle eCurveStyle = rParameter.eCurveStyle;
204 sal_Int32 nGeometry3D = rParameter.nGeometry3D;
205 bool bSortByXValues = rParameter.bSortByXValues;
206 bool bRoundedEdge = rParameter.mbRoundedEdge;
207
208 rParameter = elem.second;
209
210 //some values should not be changed with charttype
211 rParameter.eThreeDLookScheme = aScheme;
212 rParameter.nCurveResolution = nCurveResolution;
213 rParameter.nSplineOrder =nSplineOrder;
214 rParameter.eCurveStyle = eCurveStyle;
215 rParameter.nGeometry3D = nGeometry3D;
216 rParameter.bSortByXValues = bSortByXValues;
217 rParameter.mbRoundedEdge = bRoundedEdge;
218
219 bFoundSomeMatch = true;
220 break;
221 }
222 }
223 }
224 if(!bFoundSomeMatch)
225 {
226 if(!rMap.empty())
227 rParameter = (*rMap.begin()).second;
228 else
229 rParameter = ChartTypeParameter();
230 }
231}
233{
234 ChartTypeParameter aParameter(rParameter);
235 if( aParameter.bXAxisWithValues )
236 aParameter.eStackMode = GlobalStackMode_NONE;
237 if(!aParameter.b3DLook && aParameter.eStackMode==GlobalStackMode_STACK_Z)
238 aParameter.eStackMode = GlobalStackMode_NONE;
240 for (auto const& elem : rMap)
241 {
242 if( aParameter.mapsToSameService(elem.second) )
243 return elem.first;
244 }
245
246 OSL_FAIL( "ChartType not implemented yet - use fallback to similar type" );
247 for( sal_Int32 nMatchPrecision=1; nMatchPrecision<8; nMatchPrecision++ )
248 {
249 for (auto const& elem : rMap)
250 {
251 if( aParameter.mapsToSimilarService(elem.second, nMatchPrecision) )
252 return elem.first;
253 }
254 }
255 return OUString();
256}
258 const ChartTypeParameter& rParameter
259 , const rtl::Reference< ChartTypeManager >& xTemplateManager ) const
260{
262
263 OUString aServiceName( getServiceNameForParameter( rParameter ) );
264 if(!aServiceName.isEmpty())
265 {
266 xTemplate = xTemplateManager->createTemplate( aServiceName );
267 if(xTemplate.is())
268 {
269 uno::Reference< beans::XPropertySet > xTemplateProps( static_cast<cppu::OWeakObject*>(xTemplate.get()), uno::UNO_QUERY );
270 if(xTemplateProps.is())
271 {
272 try
273 {
274 xTemplateProps->setPropertyValue( CHART_UNONAME_CURVE_STYLE , uno::Any(rParameter.eCurveStyle) );
275 xTemplateProps->setPropertyValue( CHART_UNONAME_CURVE_RESOLUTION , uno::Any(rParameter.nCurveResolution) );
276 xTemplateProps->setPropertyValue( CHART_UNONAME_SPLINE_ORDER , uno::Any(rParameter.nSplineOrder) );
277 }
278 catch( uno::Exception & ex )
279 {
280 //not all templates need to support CurveStyle, CurveResolution or SplineOrder
281 ex.Context.is();//to have debug information without compilation warnings
282 }
283 try
284 {
285 xTemplateProps->setPropertyValue( "Geometry3D" , uno::Any(rParameter.nGeometry3D) );
286 }
287 catch( uno::Exception & ex )
288 {
289 //not all templates need to support Geometry3D
290 ex.Context.is();//to have debug information without compilation warnings
291 }
292
293 try
294 {
295 setTemplateProperties( xTemplateProps );
296 }
297 catch( const uno::Exception & )
298 {
299 DBG_UNHANDLED_EXCEPTION("chart2");
300 }
301 }
302 }
303 }
304 return xTemplate;
305}
306
308 , const rtl::Reference<::chart::ChartModel>& xChartModel )
309{
310 rtl::Reference< ::chart::ChartTypeManager > xTemplateManager = xChartModel->getTypeManager();
311 rtl::Reference< ::chart::ChartTypeTemplate > xTemplate( getCurrentTemplate( rParameter, xTemplateManager ) );
312 if(!xTemplate.is())
313 return;
314
315 // locked controllers
316 ControllerLockGuardUNO aCtrlLockGuard( xChartModel );
317 rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
318 Diagram::tTemplateWithServiceName aTemplateWithService;
319 if (xDiagram)
320 aTemplateWithService = xDiagram->getTemplate( xTemplateManager );
321 if( aTemplateWithService.xChartTypeTemplate.is())
322 aTemplateWithService.xChartTypeTemplate->resetStyles2( xDiagram );
323 xTemplate->changeDiagram( xDiagram );
326 if( rParameter.b3DLook )
327 xDiagram->setScheme( rParameter.eThreeDLookScheme );
328
329 if (xDiagram.is())
330 {
331 xDiagram->setPropertyValue(CHART_UNONAME_SORT_BY_XVALUES, uno::Any(rParameter.bSortByXValues));
332 }
333}
335{
336 rSubTypeList.Clear();
337}
339{
340 return false;
341}
343{
344 return false;
345}
347{
348 return false;
349}
351{
352 return false;
353}
355{
356 return false;
357}
358
360{
361}
363{
364}
366 , const uno::Reference< beans::XPropertySet >& /*xTemplateProps*/ ) const
367{
368}
370{
371}
372
374{
375}
377{
378}
380{
381 return true;
382}
384{
385 return true;
386}
388{
389 if(rParameter.nSubTypeIndex>3 && !rParameter.b3DLook)
390 {
391 rParameter.nSubTypeIndex=1;
392 }
393}
395{
396}
398{
399}
401{
402 return SchResId(STR_TYPE_COLUMN);
403}
404
406{
407 return BMP_TYPE_COLUMN;
408}
409
411{
412 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
413 {"com.sun.star.chart2.template.Column" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE)},
414 {"com.sun.star.chart2.template.StackedColumn" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y)},
415 {"com.sun.star.chart2.template.PercentStackedColumn" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT)},
416 {"com.sun.star.chart2.template.ThreeDColumnFlat" , ChartTypeParameter(1,false,true,GlobalStackMode_NONE)},
417 {"com.sun.star.chart2.template.StackedThreeDColumnFlat" , ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y)},
418 {"com.sun.star.chart2.template.PercentStackedThreeDColumnFlat" , ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT)},
419 {"com.sun.star.chart2.template.ThreeDColumnDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}};
420 return s_aTemplateMap;
421}
423{
424 rSubTypeList.Clear();
425
426 if( rParameter.b3DLook )
427 {
428 switch(rParameter.nGeometry3D)
429 {
430 case DataPointGeometry3D::CYLINDER:
431 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_SAEULE_3D_1));
432 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_SAEULE_3D_2));
433 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_SAEULE_3D_3));
434 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_SAEULE_3D_4));
435 break;
436 case DataPointGeometry3D::CONE:
437 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_KEGEL_3D_1));
438 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_KEGEL_3D_2));
439 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_KEGEL_3D_3));
440 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_KEGEL_3D_4));
441 break;
442 case DataPointGeometry3D::PYRAMID:
443 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_PYRAMID_3D_1));
444 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_PYRAMID_3D_2));
445 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_PYRAMID_3D_3));
446 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_PYRAMID_3D_4));
447 break;
448 default: //DataPointGeometry3D::CUBOID:
449 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMNS_3D_1));
450 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMNS_3D_2));
451 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_COLUMNS_3D_3));
452 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_COLUMNS_3D));
453 break;
454 }
455 }
456 else
457 {
458 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMNS_2D_1));
459 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMNS_2D_2));
460 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_COLUMNS_2D_3));
461 }
462
463 rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) );
464 rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) );
465 rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) );
466 rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) );
467}
468
470{
471}
472
474{
475}
476
478{
479 return SchResId(STR_TYPE_BAR);
480}
481
483{
484 return BMP_TYPE_BAR;
485}
486
488{
489 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
490 {"com.sun.star.chart2.template.Bar" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE)},
491 {"com.sun.star.chart2.template.StackedBar" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y)},
492 {"com.sun.star.chart2.template.PercentStackedBar" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT)},
493 {"com.sun.star.chart2.template.ThreeDBarFlat" , ChartTypeParameter(1,false,true,GlobalStackMode_NONE)},
494 {"com.sun.star.chart2.template.StackedThreeDBarFlat" , ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y)},
495 {"com.sun.star.chart2.template.PercentStackedThreeDBarFlat" , ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT)},
496 {"com.sun.star.chart2.template.ThreeDBarDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}};
497 return s_aTemplateMap;
498}
500{
501 rSubTypeList.Clear();
502
503 if( rParameter.b3DLook )
504 {
505 switch(rParameter.nGeometry3D)
506 {
507 case DataPointGeometry3D::CYLINDER:
508 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_ROEHRE_3D_1));
509 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_ROEHRE_3D_2));
510 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_ROEHRE_3D_3));
511 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_ROEHRE_3D_4));
512 break;
513 case DataPointGeometry3D::CONE:
514 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_KEGELQ_3D_1));
515 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_KEGELQ_3D_2));
516 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_KEGELQ_3D_3));
517 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_KEGELQ_3D_4));
518 break;
519 case DataPointGeometry3D::PYRAMID:
520 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_1));
521 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_2));
522 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_3));
523 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_4));
524 break;
525 default: //DataPointGeometry3D::CUBOID:
526 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BARS_3D_1));
527 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_BARS_3D_2));
528 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_BARS_3D_3));
529 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_BARS_3D));
530 break;
531 }
532 }
533 else
534 {
535 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BARS_2D_1));
536 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_BARS_2D_2));
537 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_BARS_2D_3));
538 }
539 rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) );
540 rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) );
541 rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) );
542 rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) );
543}
544
546{
547}
548
550{
551}
552
554{
555 return SchResId(STR_TYPE_PIE);
556}
557
559{
560 return BMP_TYPE_PIE;
561}
562
564{
565 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
566 {"com.sun.star.chart2.template.Pie" , ChartTypeParameter(1,false,false)},
567 {"com.sun.star.chart2.template.PieAllExploded" , ChartTypeParameter(2,false,false)},
568 {"com.sun.star.chart2.template.Donut" , ChartTypeParameter(3,false,false)},
569 {"com.sun.star.chart2.template.DonutAllExploded" , ChartTypeParameter(4,false,false)},
570 {"com.sun.star.chart2.template.ThreeDPie" , ChartTypeParameter(1,false,true)},
571 {"com.sun.star.chart2.template.ThreeDPieAllExploded" , ChartTypeParameter(2,false,true)},
572 {"com.sun.star.chart2.template.ThreeDDonut" , ChartTypeParameter(3,false,true)},
573 {"com.sun.star.chart2.template.ThreeDDonutAllExploded" , ChartTypeParameter(4,false,true)}};
574 return s_aTemplateMap;
575}
577{
578 rSubTypeList.Clear();
579
580 if( rParameter.b3DLook )
581 {
582 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_CIRCLES_3D));
583 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_CIRCLES_3D_EXPLODED));
584 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_DONUT_3D));
585 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_DONUT_3D_EXPLODED));
586 }
587 else
588 {
589 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_CIRCLES_2D));
590 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_CIRCLES_2D_EXPLODED));
591 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_DONUT_2D));
592 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_DONUT_2D_EXPLODED));
593 }
594 rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) );
595 rSubTypeList.SetItemText( 2, SchResId( STR_PIE_EXPLODED ) );
596 rSubTypeList.SetItemText( 3, SchResId( STR_DONUT ) );
597 rSubTypeList.SetItemText( 4, SchResId( STR_DONUT_EXPLODED ) );
598}
599
601{
602 return true;
603}
604
606{
607 if(rParameter.eStackMode==GlobalStackMode_STACK_Z)
608 rParameter.eStackMode = GlobalStackMode_NONE;
609}
610
612{
613}
614
616{
617}
618
620{
621 return SchResId(STR_TYPE_LINE);
622}
623
625{
626 return BMP_TYPE_LINE;
627}
628
630{
631 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
632 {"com.sun.star.chart2.template.Symbol" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE,true,false)},
633 {"com.sun.star.chart2.template.StackedSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y,true,false)},
634 {"com.sun.star.chart2.template.PercentStackedSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y_PERCENT,true,false)},
635 {"com.sun.star.chart2.template.LineSymbol" , ChartTypeParameter(2,false,false,GlobalStackMode_NONE,true,true)},
636 {"com.sun.star.chart2.template.StackedLineSymbol" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y,true,true)},
637 {"com.sun.star.chart2.template.PercentStackedLineSymbol" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y_PERCENT,true,true)},
638 {"com.sun.star.chart2.template.Line" , ChartTypeParameter(3,false,false,GlobalStackMode_NONE,false,true)},
639 {"com.sun.star.chart2.template.StackedLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y,false,true)},
640 {"com.sun.star.chart2.template.PercentStackedLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT,false,true)},
641 {"com.sun.star.chart2.template.StackedThreeDLine" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Y,false,true)},
642 {"com.sun.star.chart2.template.PercentStackedThreeDLine" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Y_PERCENT,false,true)},
643 {"com.sun.star.chart2.template.ThreeDLineDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z,false,true)}};
644 return s_aTemplateMap;
645}
647{
648 rSubTypeList.Clear();
649
650 switch( rParameter.eCurveStyle )
651 {
652 case CurveStyle_CUBIC_SPLINES:
653 case CurveStyle_B_SPLINES:
654 if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z )
655 {
656 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XCATEGORY));
657 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_SMOOTH));
658 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_SMOOTH));
659 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_SMOOTH));
660 }
661 else
662 {
663 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_STACKED));
664 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_STACKED_SMOOTH));
665 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_STACKED_SMOOTH));
666 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_STACKED_SMOOTH));
667 }
668 break;
669 case CurveStyle_STEP_START:
670 case CurveStyle_STEP_END:
671 case CurveStyle_STEP_CENTER_X:
672 case CurveStyle_STEP_CENTER_Y:
673 if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z )
674 {
675 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XCATEGORY));
676 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_STEPPED));
677 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_STEPPED));
678 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_STEPPED));
679 }
680 else
681 {
682 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_STACKED));
683 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_STACKED_STEPPED));
684 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_STACKED_STEPPED));
685 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_STACKED_STEPPED));
686 }
687 break;
688 default: // includes CurveStyle_LINES
689 //direct lines
690 if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z )
691 {
692 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XCATEGORY));
693 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XCATEGORY));
694 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XCATEGORY));
695 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XCATEGORY));
696 }
697 else
698 {
699 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_STACKED));
700 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_STACKED));
701 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_STACKED));
702 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_STACKED));
703 }
704 }
705
706 rSubTypeList.SetItemText( 1, SchResId( STR_POINTS_ONLY ) );
707 rSubTypeList.SetItemText( 2, SchResId( STR_POINTS_AND_LINES ) );
708 rSubTypeList.SetItemText( 3, SchResId( STR_LINES_ONLY ) );
709 rSubTypeList.SetItemText( 4, SchResId( STR_LINES_3D ) );
710}
712{
713 return true;
714}
716{
717 return true;
718}
720{
721 rParameter.b3DLook = false;
722
723 switch( rParameter.nSubTypeIndex )
724 {
725 case 2:
726 rParameter.bSymbols = true;
727 rParameter.bLines = true;
728 break;
729 case 3:
730 rParameter.bSymbols = false;
731 rParameter.bLines = true;
732 break;
733 case 4:
734 rParameter.bSymbols = false;
735 rParameter.bLines = true;
736 rParameter.b3DLook = true;
737 if( rParameter.eStackMode == GlobalStackMode_NONE )
739 break;
740 default:
741 rParameter.bSymbols = true;
742 rParameter.bLines = false;
743 break;
744 }
745
746 if(!rParameter.b3DLook && rParameter.eStackMode == GlobalStackMode_STACK_Z )
747 rParameter.eStackMode = GlobalStackMode_NONE;
748}
750{
751 if( rParameter.b3DLook && rParameter.eStackMode == GlobalStackMode_NONE )
753
755}
756
758{
760}
761
763{
764}
765
767{
768 return SchResId(STR_TYPE_XY);
769}
770
772{
773 return BMP_TYPE_XY;
774}
775
777{
778 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
779 {"com.sun.star.chart2.template.ScatterSymbol" , ChartTypeParameter(1,true,false,GlobalStackMode_NONE,true,false)},
780 {"com.sun.star.chart2.template.ScatterLineSymbol" , ChartTypeParameter(2,true,false,GlobalStackMode_NONE,true,true)},
781 {"com.sun.star.chart2.template.ScatterLine" , ChartTypeParameter(3,true,false,GlobalStackMode_NONE,false,true)},
782 {"com.sun.star.chart2.template.ThreeDScatter" , ChartTypeParameter(4,true,true,GlobalStackMode_NONE,false,true)}};
783 return s_aTemplateMap;
784}
785
787{
788 rSubTypeList.Clear();
789
790 switch (rParameter.eCurveStyle)
791 {
792 case CurveStyle_CUBIC_SPLINES:
793 case CurveStyle_B_SPLINES:
794 {
795 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XVALUES));
796 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XVALUES_SMOOTH));
797 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XVALUES_SMOOTH));
798 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XVALUES_SMOOTH));
799 break;
800 }
801 case CurveStyle_STEP_START:
802 case CurveStyle_STEP_END:
803 case CurveStyle_STEP_CENTER_X:
804 case CurveStyle_STEP_CENTER_Y:
805 {
806 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XVALUES));
807 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XVALUES_STEPPED));
808 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XVALUES_STEPPED));
809 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XVALUES_STEPPED));
810 break;
811 }
812 default: // includes CurveStyle_LINES
813 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XVALUES));
814 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XVALUES));
815 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XVALUES));
816 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XVALUES));
817 }
818
819 rSubTypeList.SetItemText( 1, SchResId( STR_POINTS_ONLY ) );
820 rSubTypeList.SetItemText( 2, SchResId( STR_POINTS_AND_LINES ) );
821 rSubTypeList.SetItemText( 3, SchResId( STR_LINES_ONLY ) );
822 rSubTypeList.SetItemText( 4, SchResId( STR_LINES_3D ) );
823}
825{
826 return true;
827}
829{
830 return true;
831}
833{
835 rParameter.b3DLook = false;
836 rParameter.bXAxisWithValues = true;
837
838 switch( rParameter.nSubTypeIndex )
839 {
840 case 2:
841 rParameter.bSymbols = true;
842 rParameter.bLines = true;
843 break;
844 case 3:
845 rParameter.bSymbols = false;
846 rParameter.bLines = true;
847 break;
848 case 4:
849 rParameter.bSymbols = false;
850 rParameter.bLines = true;
851 rParameter.b3DLook = true;
853 break;
854 default:
855 rParameter.bSymbols = true;
856 rParameter.bLines = false;
857 break;
858 }
859}
860
862{
863}
864
866{
867}
868
870{
871 return SchResId(STR_TYPE_AREA);
872}
873
875{
876 return BMP_TYPE_AREA;
877}
878
880{
881 return true;
882}
883
885{
886 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
887 {"com.sun.star.chart2.template.Area" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE)},
888 {"com.sun.star.chart2.template.ThreeDArea" , ChartTypeParameter(1,false,true,GlobalStackMode_STACK_Z)},
889 {"com.sun.star.chart2.template.StackedArea" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y)},
890 {"com.sun.star.chart2.template.StackedThreeDArea" , ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y)},
891 {"com.sun.star.chart2.template.PercentStackedArea" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT)},
892 {"com.sun.star.chart2.template.PercentStackedThreeDArea" , ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT)}};
893 return s_aTemplateMap;
894}
895
897{
898 rSubTypeList.Clear();
899
900 if( rParameter.b3DLook )
901 {
902 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_AREAS_3D));
903 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_AREAS_3D_1));
904 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_AREAS_3D_2));
905 }
906 else
907 {
908 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_AREAS_2D_1));
909 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_AREAS_2D));
910 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_AREAS_2D_3));
911 }
912
913 rSubTypeList.SetItemText( 1, SchResId( rParameter.b3DLook ? STR_DEEP : STR_NORMAL ) );
914 rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) );
915 rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) );
916}
918{
919 rParameter.eCurveStyle = CurveStyle_LINES;
920
921 if( rParameter.nSubTypeIndex>3 )
922 rParameter.nSubTypeIndex = 1;
923 switch( rParameter.nSubTypeIndex )
924 {
925 case 2:
927 break;
928 case 3:
930 break;
931 default:
932 if( rParameter.b3DLook )
934 else
936 break;
937 }
938}
940{
941 if( rParameter.b3DLook && rParameter.eStackMode == GlobalStackMode_NONE )
943
945}
946
948{
949 bSupports3D = false;
950}
951
953{
954}
955
957{
958 return SchResId(STR_TYPE_NET);
959}
960
962{
963 return BMP_TYPE_NET;
964}
965
967{
968 return true;
969}
970
972{
973 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
974 //@todo need templates with symbols only
975 {"com.sun.star.chart2.template.NetSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_NONE,true,false)},
976 {"com.sun.star.chart2.template.StackedNetSymbol" , ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y,true,false)},
977 {"com.sun.star.chart2.template.PercentStackedNetSymbol" ,ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y_PERCENT,true,false)},
978
979 {"com.sun.star.chart2.template.Net" , ChartTypeParameter(2,false,false,GlobalStackMode_NONE,true,true)},
980 {"com.sun.star.chart2.template.StackedNet" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y,true,true)},
981 {"com.sun.star.chart2.template.PercentStackedNet" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y_PERCENT,true,true)},
982
983 {"com.sun.star.chart2.template.NetLine" , ChartTypeParameter(3,false,false,GlobalStackMode_NONE,false,true)},
984 {"com.sun.star.chart2.template.StackedNetLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y,false,true)},
985 {"com.sun.star.chart2.template.PercentStackedNetLine" , ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT,false,true)},
986
987 {"com.sun.star.chart2.template.FilledNet" , ChartTypeParameter(4,false,false,GlobalStackMode_NONE,false,false)},
988 {"com.sun.star.chart2.template.StackedFilledNet" , ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y,false,false)},
989 {"com.sun.star.chart2.template.PercentStackedFilledNet" ,ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y_PERCENT,false,false)}};
990 return s_aTemplateMap;
991}
993{
994 rSubTypeList.Clear();
995
996 if( rParameter.eStackMode == GlobalStackMode_NONE )
997 {
998 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_NET_SYMB));
999 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_NET_LINESYMB));
1000 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_NET));
1001 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_NET_FILL));
1002 }
1003 else
1004 {
1005 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_NET_SYMB_STACK));
1006 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_NET_LINESYMB_STACK));
1007 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_NET_STACK));
1008 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_NET_FILL_STACK));
1009 }
1010
1011 rSubTypeList.SetItemText( 1, SchResId( STR_POINTS_ONLY ) );
1012 rSubTypeList.SetItemText( 2, SchResId( STR_POINTS_AND_LINES ) );
1013 rSubTypeList.SetItemText( 3, SchResId( STR_LINES_ONLY ) );
1014 rSubTypeList.SetItemText( 4, SchResId( STR_FILLED ) );
1015}
1017{
1018 rParameter.b3DLook = false;
1019 if(rParameter.eStackMode==GlobalStackMode_STACK_Z)
1020 rParameter.eStackMode = GlobalStackMode_NONE;
1021
1022 switch( rParameter.nSubTypeIndex )
1023 {
1024 case 2:
1025 rParameter.bSymbols = true;
1026 rParameter.bLines = true;
1027 break;
1028 case 3:
1029 rParameter.bSymbols = false;
1030 rParameter.bLines = true;
1031 break;
1032 case 4:
1033 rParameter.bSymbols = false;
1034 rParameter.bLines = false;
1035 break;
1036 default:
1037 rParameter.bSymbols = true;
1038 rParameter.bLines = false;
1039 break;
1040 }
1041}
1043{
1044 bSupports3D = false;
1045}
1046
1048{
1049}
1050
1052{
1053 return SchResId(STR_TYPE_STOCK);
1054}
1055
1057{
1058 return BMP_TYPE_STOCK;
1059}
1060
1062{
1063 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
1064 {"com.sun.star.chart2.template.StockLowHighClose" , ChartTypeParameter(1)},
1065 {"com.sun.star.chart2.template.StockOpenLowHighClose" , ChartTypeParameter(2)},
1066 {"com.sun.star.chart2.template.StockVolumeLowHighClose" , ChartTypeParameter(3)},
1067 {"com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ,ChartTypeParameter(4)}};
1068 return s_aTemplateMap;
1069}
1070
1072{
1073 rSubTypeList.Clear();
1074 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_STOCK_1));
1075 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_STOCK_2));
1076 rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_STOCK_3));
1077 rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_STOCK_4));
1078
1079 rSubTypeList.SetItemText( 1, SchResId(STR_STOCK_1) );
1080 rSubTypeList.SetItemText( 2, SchResId(STR_STOCK_2) );
1081 rSubTypeList.SetItemText( 3, SchResId(STR_STOCK_3) );
1082 rSubTypeList.SetItemText( 4, SchResId(STR_STOCK_4) );
1083}
1084
1086{
1087 rParameter.b3DLook = false;
1088 rParameter.eStackMode = GlobalStackMode_NONE;
1089}
1090
1092{
1093 bSupports3D = false;
1094}
1095
1097{
1098 return SchResId(STR_TYPE_COMBI_COLUMN_LINE);
1099}
1100
1102{
1103 return BMP_TYPE_COLUMN_LINE;
1104}
1105
1107{
1108 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
1109 {"com.sun.star.chart2.template.ColumnWithLine" , ChartTypeParameter(1)},
1110 {"com.sun.star.chart2.template.StackedColumnWithLine" , ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y)}};
1111 return s_aTemplateMap;
1112}
1113
1115{
1116 rSubTypeList.Clear();
1117 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMN_LINE));
1118 rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMN_LINE_STACKED));
1119
1120 rSubTypeList.SetItemText(1, SchResId(STR_LINE_COLUMN));
1121 rSubTypeList.SetItemText(2, SchResId(STR_LINE_STACKEDCOLUMN));
1122}
1123
1125{
1127 {
1128 m_xFT_NumberOfLines = pBuilder->weld_label("nolinesft");
1129 }
1131 {
1132 m_xMF_NumberOfLines = pBuilder->weld_spin_button("nolines");
1133
1134 m_xMF_NumberOfLines->set_increments(1, 10);
1135 m_xMF_NumberOfLines->set_range(1, 100);
1136
1137 m_xMF_NumberOfLines->connect_value_changed( LINK( this, CombiColumnLineChartDialogController, ChangeLineCountHdl ) );
1138 }
1139
1140 m_xFT_NumberOfLines->show();
1141 m_xMF_NumberOfLines->show();
1142}
1143
1145{
1147 m_xFT_NumberOfLines->hide();
1149 m_xMF_NumberOfLines->hide();
1150}
1151
1153 const rtl::Reference<::chart::ChartModel>& xChartModel
1154 , const uno::Reference< beans::XPropertySet >& xTemplateProps ) const
1155{
1157 return;
1158
1159 rtl::Reference< Diagram > xDiagram = xChartModel->getFirstChartDiagram();
1160 if(!xDiagram.is())
1161 return;
1162
1163 sal_Int32 nNumLines = 0;
1164
1165 if(xTemplateProps.is())
1166 {
1167 try
1168 {
1169 xTemplateProps->getPropertyValue( "NumberOfLines" ) >>= nNumLines;
1170 }
1171 catch( const uno::Exception & )
1172 {
1173 DBG_UNHANDLED_EXCEPTION("chart2");
1174 }
1175 }
1176 if( nNumLines < 0 )
1177 nNumLines = 0;
1178 m_xMF_NumberOfLines->set_value(nNumLines);
1179
1180 sal_Int32 nMaxLines = ChartModelHelper::getDataSeries( xChartModel ).size() - 1;
1181 if( nMaxLines < 0 )
1182 nMaxLines = 0;
1183 m_xMF_NumberOfLines->set_max(nMaxLines);
1184}
1186{
1187 if( xTemplateProps.is() )
1188 {
1189 sal_Int32 nNumLines = m_xMF_NumberOfLines->get_value();
1190 xTemplateProps->setPropertyValue( "NumberOfLines" , uno::Any(nNumLines) );
1191 }
1192}
1193
1195{
1196 if( m_pChangeListener )
1197 m_pChangeListener->stateChanged();
1198}
1200{
1201 rParameter.b3DLook = false;
1202 if(rParameter.eStackMode==GlobalStackMode_STACK_Z)
1203 rParameter.eStackMode = GlobalStackMode_NONE;
1204
1205 switch( rParameter.nSubTypeIndex )
1206 {
1207 case 2:
1209 break;
1210 default:
1212 break;
1213 }
1214}
1215
1217{
1218}
1219
1221{
1222}
1223
1225{
1226 return SchResId(STR_TYPE_BUBBLE);
1227}
1228
1230{
1231 return BMP_TYPE_BUBBLE;
1232}
1233
1235{
1236 static tTemplateServiceChartTypeParameterMap s_aTemplateMap{
1237 {"com.sun.star.chart2.template.Bubble" , ChartTypeParameter(1,true)}};
1238 return s_aTemplateMap;
1239}
1241{
1242 rSubTypeList.Clear();
1243 rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BUBBLE_1));
1244
1245 rSubTypeList.SetItemText( 1, SchResId(STR_BUBBLE_1) );
1246}
1248{
1249 rParameter.b3DLook = false;
1250 rParameter.eStackMode = GlobalStackMode_NONE;
1251}
1252} //namespace chart
1253
1254/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static bool GetMathLayoutRTL()
void InsertItem(sal_uInt16 nItemId, const Image &rImage)
void SetItemText(sal_uInt16 nItemId, const OUString &rStr)
void Clear()
virtual void adjustParameterToMainType(ChartTypeParameter &rParameter) override
virtual bool shouldShow_3DLookControl() const override
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual void adjustParameterToSubType(ChartTypeParameter &rParameter) override
static rtl::Reference< ::chart::BaseCoordinateSystem > getCoordinateSystemByIndex(const rtl::Reference< ::chart::Diagram > &xDiagram, sal_Int32 nIndex)
Definition: AxisHelper.cxx:550
static void setRTLAxisLayout(const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys)
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual void adjustParameterToSubType(ChartTypeParameter &rParameter) override
static std::vector< rtl::Reference< ::chart::DataSeries > > getDataSeries(const rtl::Reference< ::chart::ChartModel > &xModel)
virtual void fillExtraControls(const rtl::Reference<::chart::ChartModel > &xChartModel, const css::uno::Reference< css::beans::XPropertySet > &xTemplateProps) const
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter)
void commitToModel(const ChartTypeParameter &rParameter, const rtl::Reference<::chart::ChartModel > &xChartModel)
virtual bool shouldShow_SortByXValuesResourceGroup() const
OUString getServiceNameForParameter(const ChartTypeParameter &rParameter) const
rtl::Reference<::chart::ChartTypeTemplate > getCurrentTemplate(const ChartTypeParameter &rParameter, const rtl::Reference<::chart::ChartTypeManager > &xTemplateManager) const
virtual void showExtraControls(weld::Builder *pBuilder)
virtual void adjustParameterToSubType(ChartTypeParameter &rParameter)
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const =0
virtual void adjustSubTypeAndEnableControls(ChartTypeParameter &rParameter)
virtual void setTemplateProperties(const css::uno::Reference< css::beans::XPropertySet > &xTemplateProps) const
ChartTypeParameter getChartTypeParameterForService(const OUString &rServiceName, const css::uno::Reference< css::beans::XPropertySet > &xTemplateProps)
virtual void adjustParameterToMainType(ChartTypeParameter &rParameter)
bool isSubType(const OUString &rServiceName)
css::chart2::CurveStyle eCurveStyle
bool mapsToSameService(const ChartTypeParameter &rParameter) const
bool mapsToSimilarService(const ChartTypeParameter &rParameter, sal_Int32 nTheHigherTheLess) const
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual void adjustSubTypeAndEnableControls(ChartTypeParameter &rParameter) override
virtual void showExtraControls(weld::Builder *pBuilder) override
virtual void fillExtraControls(const rtl::Reference<::chart::ChartModel > &xChartModel, const css::uno::Reference< css::beans::XPropertySet > &xTemplateProps) const override
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual void adjustParameterToSubType(ChartTypeParameter &rParameter) override
std::unique_ptr< weld::SpinButton > m_xMF_NumberOfLines
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual void setTemplateProperties(const css::uno::Reference< css::beans::XPropertySet > &xTemplateProps) const override
This guard calls lockControllers at the given Model in the CTOR and unlockControllers in the DTOR.
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual bool shouldShow_SplineControl() const override
virtual void adjustParameterToMainType(ChartTypeParameter &rParameter) override
virtual void adjustParameterToSubType(ChartTypeParameter &rParameter) override
virtual bool shouldShow_StackingControl() const override
virtual bool shouldShow_StackingControl() const override
virtual void adjustParameterToSubType(ChartTypeParameter &rParameter) override
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual void adjustParameterToSubType(ChartTypeParameter &rParameter) override
virtual bool shouldShow_3DLookControl() const override
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual void adjustParameterToSubType(ChartTypeParameter &rParameter) override
virtual void adjustParameterToSubType(ChartTypeParameter &rParameter) override
virtual bool shouldShow_SplineControl() const override
virtual const tTemplateServiceChartTypeParameterMap & getTemplateMap() const override
virtual void fillSubTypeList(ValueSet &rSubTypeList, const ChartTypeParameter &rParameter) override
virtual bool shouldShow_SortByXValuesResourceGroup() const override
virtual std::unique_ptr< Label > weld_label(const OUString &id)=0
virtual std::unique_ptr< SpinButton > weld_spin_button(const OUString &id)=0
#define DBG_UNHANDLED_EXCEPTION(...)
std::map< OUString, ChartTypeParameter > tTemplateServiceChartTypeParameterMap
ThreeDLookScheme
OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(TranslateId aId)
Definition: ResId.cxx:24
IMPL_LINK_NOARG(SplinePropertiesDialog, SplineTypeListBoxHdl, weld::ComboBox &, void)
rtl::Reference< ::chart::ChartTypeTemplate > xChartTypeTemplate
Definition: Diagram.hxx:314
constexpr OUStringLiteral CHART_UNONAME_SPLINE_ORDER
Definition: unonames.hxx:16
constexpr OUStringLiteral CHART_UNONAME_CURVE_STYLE
Definition: unonames.hxx:18
constexpr OUStringLiteral CHART_UNONAME_CURVE_RESOLUTION
Definition: unonames.hxx:19
constexpr OUStringLiteral CHART_UNONAME_SORT_BY_XVALUES
Definition: unonames.hxx:14