LibreOffice Module chart2 (master) 1
VCoordinateSystem.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
20#include <BaseGFXHelper.hxx>
21#include <DateHelper.hxx>
22#include <VCoordinateSystem.hxx>
26#include <GridProperties.hxx>
27#include <ChartModel.hxx>
28#include <ScaleAutomatism.hxx>
29#include <ShapeFactory.hxx>
31#include <ObjectIdentifier.hxx>
33#include <Axis.hxx>
34#include "VAxisBase.hxx"
35#include <defines.hxx>
37#include <com/sun/star/chart/TimeUnit.hpp>
38#include <com/sun/star/chart2/AxisType.hpp>
40#include <rtl/math.hxx>
42
43#include <algorithm>
44#include <limits>
45#include <utility>
46
47namespace chart
48{
49using namespace ::com::sun::star;
50using namespace ::com::sun::star::chart2;
51using ::com::sun::star::uno::Reference;
52using ::com::sun::star::uno::Sequence;
53
54std::unique_ptr<VCoordinateSystem> VCoordinateSystem::createCoordinateSystem(
55 const rtl::Reference< BaseCoordinateSystem >& xCooSysModel )
56{
57 if( !xCooSysModel.is() )
58 return nullptr;
59
60 OUString aViewServiceName = xCooSysModel->getViewServiceName();
61
62 //@todo: in future the coordinatesystems should be instantiated via service factory
63 std::unique_ptr<VCoordinateSystem> pRet;
64 if( aViewServiceName == CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME )
65 pRet.reset( new VCartesianCoordinateSystem(xCooSysModel) );
66 else if( aViewServiceName == CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME )
67 pRet.reset( new VPolarCoordinateSystem(xCooSysModel) );
68 if(!pRet)
69 pRet.reset( new VCoordinateSystem(xCooSysModel) );
70 return pRet;
71}
72
74 : m_xCooSysModel(std::move(xCooSys))
75 , m_eLeftWallPos(CuboidPlanePosition_Left)
76 , m_eBackWallPos(CuboidPlanePosition_Back)
77 , m_eBottomPos(CuboidPlanePosition_Bottom)
78 , m_aExplicitScales(3)
79 , m_aExplicitIncrements(3)
80{
81 if( !m_xCooSysModel.is() || m_xCooSysModel->getDimension()<3 )
82 {
83 m_aExplicitScales[2].Minimum = 1.0;
84 m_aExplicitScales[2].Maximum = 2.0;
85 m_aExplicitScales[2].Orientation = AxisOrientation_MATHEMATICAL;
86 }
87}
89{
90}
91
93 , const rtl::Reference< SvxShapeGroupAnyD >& xFinalTarget
94 , rtl::Reference<SvxShapeGroupAnyD>& xLogicTargetForSeriesBehindAxis )
95{
96 OSL_PRECOND(xLogicTarget.is()&&xFinalTarget.is(),"no proper initialization parameters");
97 //is only allowed to be called once
98
99 sal_Int32 nDimensionCount = m_xCooSysModel->getDimension();
100 //create group shape for grids first thus axes are always painted above grids
101 if(nDimensionCount==2)
102 {
103 //create and add to target
105 xLogicTargetForSeriesBehindAxis = ShapeFactory::createGroup2D( xLogicTarget );
107 }
108 else
109 {
110 //create and added to target
112 xLogicTargetForSeriesBehindAxis = ShapeFactory::createGroup3D( xLogicTarget );
114 }
115 m_xFinalTarget = xFinalTarget;
116}
117
118void VCoordinateSystem::setParticle( const OUString& rCooSysParticle )
119{
120 m_aCooSysParticle = rCooSysParticle;
121}
122
124 const drawing::HomogenMatrix& rMatrix )
125{
126 m_aMatrixSceneToScreen = rMatrix;
127
128 //correct transformation for axis
129 for (auto const& elem : m_aAxisMap)
130 {
131 VAxisBase* pVAxis = elem.second.get();
132 if( pVAxis )
133 {
134 if(pVAxis->getDimensionCount()==2)
136 }
137 }
138}
139
140//better performance for big data
142 const awt::Size& rPageSize, const awt::Size& rPageResolution )
143{
144 uno::Sequence<sal_Int32> aResolution(
145 std::max<sal_Int32>(m_xCooSysModel->getDimension(), 2));
146 auto aResolutionRange = asNonConstRange(aResolution);
147 for( auto& i : aResolutionRange )
148 i = 1000;
149
153
154 double fCoosysWidth = fabs(aScale.getX()*FIXED_SIZE_FOR_3D_CHART_VOLUME);
155 double fCoosysHeight = fabs(aScale.getY()*FIXED_SIZE_FOR_3D_CHART_VOLUME);
156
157 double fPageWidth = rPageSize.Width;
158 double fPageHeight = rPageSize.Height;
159
160 //factor 2 to avoid rounding problems
161 sal_Int32 nXResolution = static_cast<sal_Int32>(2.0*static_cast<double>(rPageResolution.Width)*fCoosysWidth/fPageWidth);
162 sal_Int32 nYResolution = static_cast<sal_Int32>(2.0*static_cast<double>(rPageResolution.Height)*fCoosysHeight/fPageHeight);
163
164 if( nXResolution < 10 )
165 nXResolution = 10;
166 if( nYResolution < 10 )
167 nYResolution = 10;
168
170 std::swap(nXResolution,nYResolution);
171
172 //2D
173 if( aResolution.getLength() == 2 )
174 {
175 aResolutionRange[0]=nXResolution;
176 aResolutionRange[1]=nYResolution;
177 }
178 else
179 {
180 //this maybe can be optimized further ...
181 sal_Int32 nMaxResolution = std::max( nXResolution, nYResolution );
182 nMaxResolution*=2;
183 for( auto& i : asNonConstRange(aResolution) )
184 i = nMaxResolution;
185 }
186
187 return aResolution;
188}
189
190rtl::Reference< Axis > VCoordinateSystem::getAxisByDimension( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const
191{
192 if( m_xCooSysModel.is() )
193 return m_xCooSysModel->getAxisByDimension2( nDimensionIndex, nAxisIndex );
194 return nullptr;
195}
196
197std::vector< rtl::Reference< ::chart::GridProperties > > VCoordinateSystem::getGridListFromAxis( const rtl::Reference< Axis >& xAxis )
198{
199 std::vector< rtl::Reference< ::chart::GridProperties > > aRet;
200
201 if( xAxis.is() )
202 {
203 aRet.push_back( xAxis->getGridProperties2() );
204 std::vector<rtl::Reference<::chart::GridProperties>> aSubGrids = xAxis->getSubGridProperties2();
205 aRet.insert( aRet.end(), aSubGrids.begin(), aSubGrids.end() );
206 }
207
208 return aRet;
209}
210
211void VCoordinateSystem::impl_adjustDimension( sal_Int32& rDimensionIndex )
212{
213 rDimensionIndex = std::clamp<sal_Int32>(rDimensionIndex, 0, 2);
214}
215
216void VCoordinateSystem::impl_adjustDimensionAndIndex( sal_Int32& rDimensionIndex, sal_Int32& rAxisIndex ) const
217{
218 impl_adjustDimension( rDimensionIndex );
219
220 if( rAxisIndex < 0 || rAxisIndex > getMaximumAxisIndexByDimension(rDimensionIndex) )
221 rAxisIndex = 0;
222}
223
224void VCoordinateSystem::setExplicitCategoriesProvider( ExplicitCategoriesProvider* pExplicitCategoriesProvider /*takes ownership*/ )
225{
226 m_apExplicitCategoriesProvider.reset(pExplicitCategoriesProvider);
227}
228
230{
232}
233
234std::vector< ExplicitScaleData > VCoordinateSystem::getExplicitScales( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const
235{
236 std::vector< ExplicitScaleData > aRet(m_aExplicitScales);
237
238 impl_adjustDimensionAndIndex( nDimensionIndex, nAxisIndex );
239 aRet[nDimensionIndex]=getExplicitScale( nDimensionIndex, nAxisIndex );
240
241 return aRet;
242}
243
244std::vector< ExplicitIncrementData > VCoordinateSystem::getExplicitIncrements( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const
245{
246 std::vector< ExplicitIncrementData > aRet(m_aExplicitIncrements);
247
248 impl_adjustDimensionAndIndex( nDimensionIndex, nAxisIndex );
249 aRet[nDimensionIndex]=getExplicitIncrement( nDimensionIndex, nAxisIndex );
250
251 return aRet;
252}
253
254ExplicitScaleData VCoordinateSystem::getExplicitScale( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const
255{
257
258 impl_adjustDimensionAndIndex( nDimensionIndex, nAxisIndex );
259
260 if( nAxisIndex == 0)
261 {
262 aRet = m_aExplicitScales[nDimensionIndex];
263 }
264 else
265 {
266 tFullAxisIndex aFullAxisIndex( nDimensionIndex, nAxisIndex );
267 tFullExplicitScaleMap::const_iterator aIt = m_aSecondaryExplicitScales.find( aFullAxisIndex );
268 if( aIt != m_aSecondaryExplicitScales.end() )
269 aRet = aIt->second;
270 else
271 aRet = m_aExplicitScales[nDimensionIndex];
272 }
273
274 return aRet;
275}
276
277ExplicitIncrementData VCoordinateSystem::getExplicitIncrement( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) const
278{
280
281 impl_adjustDimensionAndIndex( nDimensionIndex, nAxisIndex );
282
283 if( nAxisIndex == 0)
284 {
285 aRet = m_aExplicitIncrements[nDimensionIndex];
286 }
287 else
288 {
289 tFullAxisIndex aFullAxisIndex( nDimensionIndex, nAxisIndex );
290 tFullExplicitIncrementMap::const_iterator aIt = m_aSecondaryExplicitIncrements.find( aFullAxisIndex );
291 if( aIt != m_aSecondaryExplicitIncrements.end() )
292 aRet = aIt->second;
293 else
294 aRet = m_aExplicitIncrements[nDimensionIndex];
295 }
296
297 return aRet;
298}
299
300OUString VCoordinateSystem::createCIDForAxis( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex )
301{
302 OUString aAxisParticle( ObjectIdentifier::createParticleForAxis( nDimensionIndex, nAxisIndex ) );
304}
305OUString VCoordinateSystem::createCIDForGrid( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex )
306{
307 OUString aGridParticle( ObjectIdentifier::createParticleForGrid( nDimensionIndex, nAxisIndex ) );
309}
310
311sal_Int32 VCoordinateSystem::getMaximumAxisIndexByDimension( sal_Int32 nDimensionIndex ) const
312{
313 sal_Int32 nRet = 0;
314 for (auto const& elem : m_aSecondaryExplicitScales)
315 {
316 if(elem.first.first==nDimensionIndex)
317 {
318 sal_Int32 nLocalIdx = elem.first.second;
319 if( nRet < nLocalIdx )
320 nRet = nLocalIdx;
321 }
322 }
323 return nRet;
324}
325
327 const rtl::Reference<::chart::ChartModel> & /* xChartDoc */,
328 const awt::Size& /* rFontReferenceSize */,
329 const awt::Rectangle& /* rMaximumSpaceForLabels */,
330 bool /* bLimitSpaceForLabels */,
331 std::vector<std::unique_ptr<VSeriesPlotter>>& /*rSeriesPlotterList*/,
332 uno::Reference<uno::XComponentContext> const& /*rComponentContext*/)
333{
334}
335
337{
338}
340{
341}
342
343void VCoordinateSystem::prepareAutomaticAxisScaling( ScaleAutomatism& rScaleAutomatism, sal_Int32 nDimIndex, sal_Int32 nAxisIndex )
344{
345 bool bDateAxisX = (rScaleAutomatism.getScale().AxisType == AxisType::DATE) && (nDimIndex == 0);
346 if( bDateAxisX )
347 {
348 // This is a date X dimension. Determine proper time resolution.
349 sal_Int32 nTimeResolution = css::chart::TimeUnit::MONTH;
350 if( !(rScaleAutomatism.getScale().TimeIncrement.TimeResolution >>= nTimeResolution) )
351 {
353 rScaleAutomatism.setAutomaticTimeResolution( nTimeResolution );
354 }
355 m_aMergedMinMaxSupplier.setTimeResolutionOnXAxis( nTimeResolution, rScaleAutomatism.getNullDate() );
356 }
357
358 double fMin = std::numeric_limits<double>::infinity();
359 double fMax = -std::numeric_limits<double>::infinity();
360 if( nDimIndex == 0 )
361 {
362 // x dimension
365 }
366 else if( nDimIndex == 1 )
367 {
368 // y dimension
369 ExplicitScaleData aScale = getExplicitScale( 0, 0 );
370 double fMaximum = aScale.Maximum;
371 if (!aScale.m_bShiftedCategoryPosition && aScale.AxisType == AxisType::DATE)
372 {
373 // tdf#146066 Increase maximum date value by one month/year,
374 // because the automatic scaling of the Y axis was incorrect when the last Y value was the highest value.
375 Date aMaxDate(aScale.NullDate);
376 aMaxDate.AddDays(::rtl::math::approxFloor(fMaximum));
377 switch (aScale.TimeResolution)
378 {
379 case css::chart::TimeUnit::MONTH:
380 aMaxDate = DateHelper::GetDateSomeMonthsAway(aMaxDate, 1);
381 break;
382 case css::chart::TimeUnit::YEAR:
383 aMaxDate = DateHelper::GetDateSomeYearsAway(aMaxDate, 1);
384 break;
385 }
386 fMaximum = aMaxDate - aScale.NullDate;
387 }
388 fMin = m_aMergedMinMaxSupplier.getMinimumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex);
389 fMax = m_aMergedMinMaxSupplier.getMaximumYInRange(aScale.Minimum, fMaximum, nAxisIndex);
390 }
391 else if( nDimIndex == 2 )
392 {
393 // z dimension
396 }
397
398 //merge our values with those already contained in rScaleAutomatism
399 rScaleAutomatism.expandValueRange( fMin, fMax );
400
401 rScaleAutomatism.setAutoScalingOptions(
406
407 if (bDateAxisX)
408 return;
409
410 VAxisBase* pVAxis = getVAxis(nDimIndex, nAxisIndex);
411 if( pVAxis )
413}
414
415VAxisBase* VCoordinateSystem::getVAxis( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex )
416{
417 VAxisBase* pRet = nullptr;
418
419 tFullAxisIndex aFullAxisIndex( nDimensionIndex, nAxisIndex );
420
421 tVAxisMap::const_iterator aIt = m_aAxisMap.find( aFullAxisIndex );
422 if (aIt != m_aAxisMap.cend())
423 pRet = aIt->second.get();
424
425 return pRet;
426}
427
429 sal_Int32 nDimensionIndex
430 , sal_Int32 nAxisIndex
431 , const ExplicitScaleData& rExplicitScale
432 , const ExplicitIncrementData& rExplicitIncrement )
433{
434 impl_adjustDimension( nDimensionIndex );
435
436 if( nAxisIndex==0 )
437 {
438 m_aExplicitScales[nDimensionIndex]=rExplicitScale;
439 m_aExplicitIncrements[nDimensionIndex]=rExplicitIncrement;
440 }
441 else
442 {
443 tFullAxisIndex aFullAxisIndex( nDimensionIndex, nAxisIndex );
444 m_aSecondaryExplicitScales[aFullAxisIndex] = rExplicitScale;
445 m_aSecondaryExplicitIncrements[aFullAxisIndex] = rExplicitIncrement;
446 }
447}
448
450{
451 m_eLeftWallPos = eLeftWallPos;
452 m_eBackWallPos = eBackWallPos;
453 m_eBottomPos = eBottomPos;
454}
455
457{
458 for (auto const&[unused, pVAxis] : m_aAxisMap)
459 {
460 (void)unused;
461 if (pVAxis)
462 {
463 if (pVAxis->getDimensionCount() == 2)
464 pVAxis->setTransformationSceneToScreen(m_aMatrixSceneToScreen);
465 pVAxis->createMaximumLabels();
466 }
467 }
468}
470{
471 for (auto const&[unused, pVAxis] : m_aAxisMap)
472 {
473 (void)unused;
474 if (pVAxis)
475 {
476 if (pVAxis->getDimensionCount() == 2)
477 pVAxis->setTransformationSceneToScreen(m_aMatrixSceneToScreen);
478 pVAxis->createLabels();
479 }
480 }
481}
482
484{
485 for (auto const&[unused, pVAxis] : m_aAxisMap)
486 {
487 (void)unused;
488 if (pVAxis)
489 {
490 if (pVAxis->getDimensionCount() == 2)
491 pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
492 pVAxis->updatePositions();
493 }
494 }
495}
496
498{
499 for (auto const&[aFullAxisIndex, pVAxis] : m_aAxisMap)
500 {
501 if (pVAxis)
502 {
503 auto const&[nDimensionIndex, nAxisIndex] = aFullAxisIndex;
504
505 if (pVAxis->getDimensionCount() == 2)
506 pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
507
508 if (nAxisIndex == 0)
509 {
510 if (nDimensionIndex == 0)
511 {
512 if( m_aExplicitScales[1].AxisType!=AxisType::CATEGORY )
513 pVAxis->setExtraLinePositionAtOtherAxis(
514 m_aExplicitScales[1].Origin );
515 }
516 else if (nDimensionIndex == 1)
517 {
518 if( m_aExplicitScales[0].AxisType!=AxisType::CATEGORY )
519 pVAxis->setExtraLinePositionAtOtherAxis(
520 m_aExplicitScales[0].Origin );
521 }
522 }
523
524 pVAxis->createShapes();
525 }
526 }
527}
529{
530}
532{
533 m_aMergedMinMaxSupplier.addMinimumAndMaximumSupplier(pMinimumAndMaximumSupplier);
534}
535
537{
538 return m_aMergedMinMaxSupplier.hasMinimumAndMaximumSupplier(pMinimumAndMaximumSupplier);
539}
540
542{
544}
545
547{
548 bool bSwapXAndY = false;
549 if( m_xCooSysModel.is()) try
550 {
551 m_xCooSysModel->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXAndY;
552 }
553 catch( const uno::Exception& )
554 {
555 TOOLS_WARN_EXCEPTION("chart2", "" );
556 }
557 return bSwapXAndY;
558}
559
561{
562 return ( m_xCooSysModel.is() && m_xCooSysModel->getDimension() == 3 );
563}
565{
566 m_aSeriesNamesForZAxis = rSeriesNames;
567}
568
570 const rtl::Reference< Axis >& xAxis
571 , const rtl::Reference<::chart::ChartModel>& xChartDoc)
572{
573 return ExplicitValueProvider::getExplicitNumberFormatKeyForAxis(
574 xAxis, m_xCooSysModel, xChartDoc);
575}
576
577} //namespace chart
578
579/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void AddDays(sal_Int32 nAddDays)
TYPE getX() const
TYPE getY() const
static Date GetDateSomeYearsAway(const Date &rD, sal_Int32 nYearDistance)
Definition: DateHelper.cxx:46
static Date GetDateSomeMonthsAway(const Date &rD, sal_Int32 nMonthDistance)
Definition: DateHelper.cxx:39
virtual double getMaximumYInRange(double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex) override
bool hasMinimumAndMaximumSupplier(MinimumAndMaximumSupplier *pMinimumAndMaximumSupplier)
void addMinimumAndMaximumSupplier(MinimumAndMaximumSupplier *pMinimumAndMaximumSupplier)
virtual bool isExpandIfValuesCloseToBorder(sal_Int32 nDimensionIndex) override
virtual double getMinimumYInRange(double fMinimumX, double fMaximumX, sal_Int32 nAxisIndex) override
virtual bool isExpandBorderToIncrementRhythm(sal_Int32 nDimensionIndex) override
virtual tools::Long calculateTimeResolutionOnXAxis() override
virtual void setTimeResolutionOnXAxis(tools::Long nTimeResolution, const Date &rNullDate) override
virtual bool isExpandNarrowValuesTowardZero(sal_Int32 nDimensionIndex) override
virtual bool isExpandWideValuesToZero(sal_Int32 nDimensionIndex) override
static OUString createClassifiedIdentifierForParticles(std::u16string_view rParentParticle, std::u16string_view rChildParticle, std::u16string_view rDragMethodServiceName=std::u16string_view(), std::u16string_view rDragParameterString=std::u16string_view())
static OUString createParticleForAxis(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex)
static OUString createParticleForGrid(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex)
This class implements the calculation of automatic axis limits.
const css::chart2::ScaleData & getScale() const
void setAutoScalingOptions(bool bExpandBorderToIncrementRhythm, bool bExpandIfValuesCloseToBorder, bool bExpandWideValuesToZero, bool bExpandNarrowValuesTowardZero)
Sets additional auto scaling options.
void setMaximumAutoMainIncrementCount(sal_Int32 nMaximumAutoMainIncrementCount)
Sets the maximum allowed number of automatic main increments.
const Date & getNullDate() const
void setAutomaticTimeResolution(sal_Int32 nTimeResolution)
Sets the time resolution to be used in case it is not set explicitly within the scale.
void expandValueRange(double fMinimum, double fMaximum)
Expands own value range with the passed minimum and maximum.
static rtl::Reference< Svx3DSceneObject > createGroup3D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const OUString &aName=OUString())
static rtl::Reference< SvxShapeGroup > createGroup2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const OUString &aName=OUString())
virtual sal_Int32 estimateMaximumAutoMainIncrementCount()
Definition: VAxisBase.cxx:114
sal_Int32 getDimensionCount() const
Return the number of dimensions the diagram has.
Definition: VAxisBase.cxx:124
virtual void setTransformationSceneToScreen(const css::drawing::HomogenMatrix &rMatrix) override
ExplicitCategoriesProvider * getExplicitCategoriesProvider()
virtual void updateScalesAndIncrementsOnAxes()
std::vector< ExplicitIncrementData > getExplicitIncrements(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
MergedMinimumAndMaximumSupplier m_aMergedMinMaxSupplier
Collection of min-max suppliers which are basically different chart types present in the same coordin...
virtual void createVAxisList(const rtl::Reference<::chart::ChartModel > &xChartDoc, const css::awt::Size &rFontReferenceSize, const css::awt::Rectangle &rMaximumSpaceForLabels, bool bLimitSpaceForLabels, std::vector< std::unique_ptr< VSeriesPlotter > > &rSeriesPlotterList, css::uno::Reference< css::uno::XComponentContext > const &rComponentContext)
Create "view" axis objects 'VAxis' from the coordinate system model.
void setParticle(const OUString &rCooSysParticle)
static std::vector< rtl::Reference< ::chart::GridProperties > > getGridListFromAxis(const rtl::Reference< ::chart::Axis > &xAxis)
std::unique_ptr< ExplicitCategoriesProvider > m_apExplicitCategoriesProvider
void addMinimumAndMaximumSupplier(MinimumAndMaximumSupplier *pMinimumAndMaximumSupplier)
sal_Int32 getMaximumAxisIndexByDimension(sal_Int32 nDimensionIndex) const
rtl::Reference< SvxShapeGroupAnyD > m_xLogicTargetForGrids
void setExplicitScaleAndIncrement(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex, const ExplicitScaleData &rExplicitScale, const ExplicitIncrementData &rExplicitIncrement)
void setExplicitCategoriesProvider(ExplicitCategoriesProvider *)
VAxisBase * getVAxis(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex)
std::vector< ExplicitScaleData > getExplicitScales(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
OUString createCIDForGrid(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex)
static void impl_adjustDimension(sal_Int32 &rDimensionIndex)
void impl_adjustDimensionAndIndex(sal_Int32 &rDimensionIndex, sal_Int32 &rAxisIndex) const
void setSeriesNamesForAxis(const css::uno::Sequence< OUString > &rSeriesNames)
css::uno::Sequence< OUString > m_aSeriesNamesForZAxis
void set3DWallPositions(CuboidPlanePosition eLeftWallPos, CuboidPlanePosition eBackWallPos, CuboidPlanePosition eBottomPos)
void initPlottingTargets(const rtl::Reference< SvxShapeGroupAnyD > &xLogicTarget, const rtl::Reference< SvxShapeGroupAnyD > &xFinalTarget, rtl::Reference< SvxShapeGroupAnyD > &xLogicTargetForSeriesBehindAxis)
VCoordinateSystem(rtl::Reference< ::chart::BaseCoordinateSystem > xCooSys)
ExplicitScaleData getExplicitScale(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
ExplicitIncrementData getExplicitIncrement(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
sal_Int32 getNumberFormatKeyForAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference<::chart::ChartModel > &xChartDoc)
void prepareAutomaticAxisScaling(ScaleAutomatism &rScaleAutomatism, sal_Int32 nDimIndex, sal_Int32 nAxisIndex)
It sets the scaling parameters for the passed ScaleAutomatism object.
CuboidPlanePosition m_eLeftWallPos
OUString createCIDForAxis(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex)
rtl::Reference< ::chart::Axis > getAxisByDimension(sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
std::vector< ExplicitIncrementData > m_aExplicitIncrements
bool hasMinimumAndMaximumSupplier(MinimumAndMaximumSupplier *pMinimumAndMaximumSupplier)
tFullExplicitScaleMap m_aSecondaryExplicitScales
std::pair< sal_Int32, sal_Int32 > tFullAxisIndex
rtl::Reference< SvxShapeGroupAnyD > m_xLogicTargetForAxes
static std::unique_ptr< VCoordinateSystem > createCoordinateSystem(const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSysModel)
void setTransformationSceneToScreen(const css::drawing::HomogenMatrix &rMatrix)
virtual css::uno::Sequence< sal_Int32 > getCoordinateSystemResolution(const css::awt::Size &rPageSize, const css::awt::Size &rPageResolution)
css::drawing::HomogenMatrix m_aMatrixSceneToScreen
std::vector< ExplicitScaleData > m_aExplicitScales
rtl::Reference< ::chart::BaseCoordinateSystem > m_xCooSysModel
CuboidPlanePosition m_eBackWallPos
rtl::Reference< SvxShapeGroupAnyD > m_xFinalTarget
tFullExplicitIncrementMap m_aSecondaryExplicitIncrements
CuboidPlanePosition m_eBottomPos
constexpr double FIXED_SIZE_FOR_3D_CHART_VOLUME
Definition: defines.hxx:22
#define TOOLS_WARN_EXCEPTION(area, stream)
OOO_DLLPUBLIC_CHARTTOOLS::basegfx::B3DHomMatrix HomogenMatrixToB3DHomMatrix(const css::drawing::HomogenMatrix &rHomogenMatrix)
OOO_DLLPUBLIC_CHARTTOOLS::basegfx::B3DTuple GetScaleFromMatrix(const ::basegfx::B3DHomMatrix &rB3DMatrix)
CuboidPlanePosition
@ CuboidPlanePosition_Left
@ CuboidPlanePosition_Back
@ CuboidPlanePosition_Bottom
int i
AxisType
constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME
constexpr OUStringLiteral CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME
describes how tickmarks are positioned on the scale of an axis.
This structure contains the explicit values for a scale like Minimum and Maximum.