26 #include <com/sun/star/frame/XModel.hpp>
27 #include <com/sun/star/drawing/Direction3D.hpp>
28 #include <com/sun/star/drawing/ProjectionMode.hpp>
29 #include <com/sun/star/drawing/ShadeMode.hpp>
30 #include <com/sun/star/drawing/XShape.hpp>
31 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
32 #include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
33 #include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
34 #include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
35 #include <com/sun/star/chart/ChartAxisPosition.hpp>
36 #include <com/sun/star/chart/ChartLegendExpansion.hpp>
37 #include <com/sun/star/chart/TimeInterval.hpp>
38 #include <com/sun/star/chart/TimeUnit.hpp>
39 #include <com/sun/star/chart/XChartDocument.hpp>
40 #include <com/sun/star/chart/XDiagramPositioning.hpp>
41 #include <com/sun/star/chart/DataLabelPlacement.hpp>
42 #include <com/sun/star/chart/ErrorBarStyle.hpp>
43 #include <com/sun/star/chart/MissingValueTreatment.hpp>
44 #include <com/sun/star/chart2/LinearRegressionCurve.hpp>
45 #include <com/sun/star/chart2/ExponentialRegressionCurve.hpp>
46 #include <com/sun/star/chart2/LogarithmicRegressionCurve.hpp>
47 #include <com/sun/star/chart2/PotentialRegressionCurve.hpp>
48 #include <com/sun/star/chart2/PolynomialRegressionCurve.hpp>
49 #include <com/sun/star/chart2/MovingAverageRegressionCurve.hpp>
50 #include <com/sun/star/chart2/CartesianCoordinateSystem2d.hpp>
51 #include <com/sun/star/chart2/CartesianCoordinateSystem3d.hpp>
52 #include <com/sun/star/chart2/FormattedString.hpp>
53 #include <com/sun/star/chart2/LogarithmicScaling.hpp>
54 #include <com/sun/star/chart2/LinearScaling.hpp>
55 #include <com/sun/star/chart2/PolarCoordinateSystem2d.hpp>
56 #include <com/sun/star/chart2/PolarCoordinateSystem3d.hpp>
57 #include <com/sun/star/chart2/XChartDocument.hpp>
58 #include <com/sun/star/chart2/XDiagram.hpp>
59 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
60 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
61 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
62 #include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
63 #include <com/sun/star/chart2/XTitled.hpp>
64 #include <com/sun/star/chart2/AxisType.hpp>
65 #include <com/sun/star/chart2/CurveStyle.hpp>
66 #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
67 #include <com/sun/star/chart2/DataPointLabel.hpp>
68 #include <com/sun/star/chart2/LegendPosition.hpp>
69 #include <com/sun/star/chart2/StackingDirection.hpp>
70 #include <com/sun/star/chart2/TickmarkStyle.hpp>
71 #include <com/sun/star/chart2/RelativePosition.hpp>
72 #include <com/sun/star/chart2/RelativeSize.hpp>
73 #include <com/sun/star/chart2/data/XDataProvider.hpp>
74 #include <com/sun/star/chart2/data/XDataReceiver.hpp>
75 #include <com/sun/star/chart2/data/XDataSink.hpp>
76 #include <com/sun/star/chart2/data/LabeledDataSequence.hpp>
85 #include <document.hxx>
87 #include <tokenarray.hxx>
88 #include <compiler.hxx>
91 #include <globstr.hrc>
101 using ::com::sun::star::uno::Any;
102 using ::com::sun::star::uno::Reference;
103 using ::com::sun::star::uno::Sequence;
104 using ::com::sun::star::uno::UNO_QUERY;
105 using ::com::sun::star::uno::UNO_QUERY_THROW;
106 using ::com::sun::star::uno::UNO_SET_THROW;
107 using ::com::sun::star::uno::Exception;
108 using ::com::sun::star::beans::XPropertySet;
109 using ::com::sun::star::frame::XModel;
110 using ::com::sun::star::util::XNumberFormatsSupplier;
111 using ::com::sun::star::drawing::XDrawPage;
112 using ::com::sun::star::drawing::XDrawPageSupplier;
113 using ::com::sun::star::drawing::XShape;
117 using ::com::sun::star::chart2::data::XDataProvider;
118 using ::com::sun::star::chart2::data::XDataReceiver;
119 using ::com::sun::star::chart2::data::XDataSequence;
120 using ::com::sun::star::chart2::data::XDataSink;
121 using ::com::sun::star::chart2::data::XLabeledDataSequence;
122 using ::com::sun::star::chart2::data::LabeledDataSequence;
124 using ::formula::FormulaToken;
125 using ::formula::FormulaTokenArrayPlainIterator;
126 using ::std::unique_ptr;
128 namespace cssc = ::com::sun::star::chart;
129 namespace cssc2 = ::com::sun::star::chart2;
144 void lclSetValueOrClearAny( Any& rAny,
double fValue,
bool bClear )
152 void lclSetExpValueOrClearAny( Any& rAny,
double fValue,
bool bLogScale,
bool bClear )
154 if( !bClear && bLogScale )
155 fValue = pow( 10.0, fValue );
156 lclSetValueOrClearAny( rAny, fValue, bClear );
159 double lclGetSerialDay(
const XclImpRoot& rRoot, sal_uInt16 nValue, sal_uInt16 nTimeUnit )
170 OSL_ENSURE(
false,
"lclGetSerialDay - unexpected time unit" );
175 void lclConvertTimeValue(
const XclImpRoot& rRoot, Any& rAny, sal_uInt16 nValue,
bool bAuto, sal_uInt16 nTimeUnit )
180 rAny <<= lclGetSerialDay( rRoot, nValue, nTimeUnit );
183 sal_Int32 lclGetApiTimeUnit( sal_uInt16 nTimeUnit )
190 default: OSL_ENSURE(
false,
"lclGetApiTimeUnit - unexpected time unit" );
192 return cssc::TimeUnit::DAY;
195 void lclConvertTimeInterval( Any& rInterval, sal_uInt16 nValue,
bool bAuto, sal_uInt16 nTimeUnit )
197 if( bAuto || (nValue == 0) )
200 rInterval <<= cssc::TimeInterval( nValue, lclGetApiTimeUnit( nTimeUnit ) );
232 return mxChData->mxTypeInfoProv->GetTypeInfo( eType );
237 return mxChData->mxTypeInfoProv->GetTypeInfoFromRecId( nRecId );
242 return mxChData->mxFmtInfoProv->GetFormatInfo( eObjType );
270 xChartDoc->lockControllers();
273 Reference< XDataReceiver > xDataRec( xChartDoc, UNO_QUERY );
274 if( pDocShell && xDataRec.is() )
277 Reference< XDataProvider > xDataProv(
280 xDataRec->attachDataProvider( xDataProv );
282 Reference< XNumberFormatsSupplier > xNumFmtSupp( pDocShell->
GetModel(), UNO_QUERY );
283 if( xNumFmtSupp.is() )
284 xDataRec->attachNumberFormatsSupplier( xNumFmtSupp );
294 xModel->unlockControllers();
302 return mxChData->mxChartDoc->getDataProvider();
307 return mxChData->GetTitleShape( rTitleKey );
312 return static_cast< sal_Int32
>(
mxChData->mfUnitSizeX * nPosX +
mxChData->mnBorderGapX + 0.5 );
317 return static_cast< sal_Int32
>(
mxChData->mfUnitSizeY * nPosY +
mxChData->mnBorderGapY + 0.5 );
322 return css::awt::Rectangle(
334 return static_cast<double>(nPosX) / nWidth;
342 return static_cast<double >(nPosY) / nHeight;
359 rPropSet, *
mxChData->mxLineDashTable, rLineFmt, ePropMode );
374 rEscherFmt, pPicFmt, nDffFillType, ePropMode );
378 sal_uInt16 nFontIdx,
const Color* pFontColor )
const
385 sal_Int32 nApiRot = (450 - (nAngle % 360)) % 360;
410 sal_uInt16 nRecId = rStrm.
GetRecId();
430 sal_uInt16 nRecId = rStrm.
GetRecId();
569 mxAreaFmt = std::make_shared<XclImpChAreaFormat>();
582 mxAreaFmt = std::make_shared<XclImpChAreaFormat>( aAreaFmt );
587 OSL_FAIL(
"XclImpChFrameBase::XclImpChFrameBase - unknown frame type" );
600 mxAreaFmt = std::make_shared<XclImpChAreaFormat>();
614 mxLineFmt->Convert( rRoot, rPropSet, eObjType, nFormatIdx );
624 mxEscherFmt->Convert( rRoot, rPropSet, eObjType, bUsePicFmt );
626 mxAreaFmt->Convert( rRoot, rPropSet, eObjType, nFormatIdx );
692 mxAreaFmt = std::make_shared<XclImpChAreaFormat>( aAreaFmt );
706 Reference< XLabeledDataSequence > lclCreateLabeledDataSequence(
711 Reference< XDataSequence > xValueSeq;
713 xValueSeq = xValueLink->CreateDataSequence( rValueRole );
714 Reference< XDataSequence > xTitleSeq;
719 Reference< XLabeledDataSequence > xLabeledSeq;
720 if( xValueSeq.is() || xTitleSeq.is() )
722 if( xLabeledSeq.is() )
725 xLabeledSeq->setValues( xValueSeq );
727 xLabeledSeq->setLabel( xTitleSeq );
765 mxString = std::make_shared<XclImpString>();
774 mxString = std::make_shared<XclImpString>();
786 sal_uInt32 nCellCount = 0;
790 for(
const FormulaToken* pToken = aIter.First(); pToken; pToken = aIter.Next() )
792 switch( pToken->GetType() )
794 case ::formula::svSingleRef:
795 case ::formula::svExternalSingleRef:
799 case ::formula::svDoubleRef:
800 case ::formula::svExternalDoubleRef:
806 sal_uInt32 nTabs =
static_cast<sal_uInt32
>(aAbs2.
Tab() - aAbs1.
Tab() + 1);
807 sal_uInt32 nCols =
static_cast<sal_uInt32
>(aAbs2.
Col() - aAbs1.
Col() + 1);
808 sal_uInt32 nRows =
static_cast<sal_uInt32
>(aAbs2.
Row() - aAbs1.
Row() + 1);
809 nCellCount += nCols * nRows * nTabs;
816 return limit_cast< sal_uInt16 >( nCellCount );
825 rPropSet.
SetProperty( aPropName, static_cast< sal_Int32 >( nScNumFmt ) );
833 Reference< XDataSequence > xDataSeq;
840 OUStringBuffer aRangeRep;
844 xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aRangeRep.makeStringAndClear() );
858 OUString aString(
"\"");
859 xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aString +
mxString->GetText() + aString );
871 const XclImpChRoot& rRoot, sal_uInt16 nLeadFontIdx,
const Color& rLeadFontColor )
const
873 ::std::vector< Reference< XFormattedString > > aStringVec;
880 xFmtStr->setString( aIt.GetPortionText() );
884 sal_uInt16 nFontIdx = aIt.GetPortionFont();
887 rRoot.
ConvertFont( aStringProp, nLeadFontIdx, &rLeadFontColor );
892 aStringVec.emplace_back(xFmtStr );
905 for (FormulaToken*
p = aIter.First();
p;
p = aIter.Next())
976 mxFramePos = std::make_shared<XclImpChFramePos>();
980 mxFont = std::make_shared<XclImpChFont>();
981 mxFont->ReadChFont( rStrm );
993 mxFrame->ReadRecordGroup( rStrm );
1077 mxSrcLink->ConvertNumFmt( rPropSet, bPercent );
1091 bool bShowCateg = !bShowNone &&
::get_flag( nShowFlags, SHOWANYCATEG );
1092 bool bShowPercent = !bShowNone &&
::get_flag( nShowFlags, SHOWANYPERCENT );
1093 bool bShowValue = !bShowNone &&
::get_flag( nShowFlags, SHOWANYVALUE );
1094 bool bShowBubble = !bShowNone &&
::get_flag( nShowFlags, SHOWANYBUBBLE );
1098 bShowValue = bShowBubble;
1101 bool bShowAny = bShowValue || bShowPercent || bShowCateg;
1105 cssc2::DataPointLabel aPointLabel( bShowValue, bShowPercent, bShowCateg, bShowSymbol,
false );
1108 if( aSep.isEmpty() )
1119 using namespace cssc::DataLabelPlacement;
1134 sal_Int32 nGlobalPlacement = 0;
1137 nPlacement = nGlobalPlacement;
1141 if( bShowPercent || bShowValue )
1147 Reference< XTitle > xTitle;
1151 Sequence< Reference< XFormattedString > > aStringSeq(
1153 if( aStringSeq.hasElements() )
1160 xTitle->setText( aStringSeq );
1177 "XclImpChText::ConvertTitlePosition - unexpected frame position mode" );
1201 Reference< XShape > xTitleShape(
GetTitleShape( rTitleKey ), UNO_SET_THROW );
1203 css::awt::Size aTitleSize = xTitleShape->getSize();
1207 double fSin = fabs( sin( fRad ) );
1209 css::awt::Point aTitlePos(
1213 if( nScRot > 18000_deg100 )
1214 aTitlePos.X +=
static_cast< sal_Int32
>( fSin * aTitleSize.Height + 0.5 );
1216 else if( nScRot > 0_deg100 )
1217 aTitlePos.Y +=
static_cast< sal_Int32
>( fSin * aTitleSize.Width + 0.5 );
1219 xTitleShape->setPosition( aTitlePos );
1245 rxText->UpdateText( xDefText );
1248 rxText = std::make_shared<XclImpChText>(*xDefText);
1258 if( !rxTitle->HasString() )
1259 rxTitle->SetString( rAutoTitle );
1260 if( rxTitle->HasString() )
1261 rxTitle->UpdateText(pDefText);
1290 ScfPropertySet& rPropSet, sal_uInt16 nFormatIdx, sal_Int16 nLineWeight )
const
1298 switch( nLineWeight )
1334 double fApiDist = ::std::min< double >(
mnPieDist / 100.0, 1.0 );
1356 using namespace ::com::sun::star::chart2::DataPointGeometry3D;
1382 xLabel = std::make_shared<XclImpChText>( *pParent );
1384 xLabel = std::make_shared<XclImpChText>(
GetChRoot() );
1385 xLabel->UpdateDataLabel(
1410 mxMarkerFmt = std::make_shared<XclImpChMarkerFormat>();
1414 mxPieFmt = std::make_shared<XclImpChPieFormat>();
1415 mxPieFmt->ReadChPieFormat( rStrm );
1418 mxSeriesFmt = std::make_shared<XclImpChSeriesFormat>();
1422 mx3dDataFmt = std::make_shared<XclImpCh3dDataFormat>();
1475 mxAreaFmt = std::make_shared<XclImpChAreaFormat>();
1477 mxMarkerFmt = std::make_shared<XclImpChMarkerFormat>();
1539 rPropSet.
SetProperty< sal_Int32 >(
"BorderWidth", 0 );
1549 mxLabel->ConvertDataLabel( rPropSet, rTypeInfo, pGlobalPropSet );
1597 mxLabel->UpdateText(pDefText);
1621 Reference< XRegressionCurve > xRegCurve;
1660 if (bForceIntercept)
1673 pLabel->ConvertFont( aLabelProp );
1674 pLabel->ConvertFrame( aLabelProp );
1675 pLabel->ConvertNumFmt( aLabelProp,
false );
1722 switch( pPrimaryBar->maData.mnSourceType )
1745 Reference< XDataSink > xDataSink( xErrorBar, UNO_QUERY );
1746 if( xDataSink.is() )
1749 ::std::vector< Reference< XLabeledDataSequence > > aLabeledSeqVec;
1754 if( xValueSeq.is() )
1755 aLabeledSeqVec.push_back( xValueSeq );
1760 Reference< XLabeledDataSequence > xValueSeq = pNegBar->CreateValueSequence();
1761 if( xValueSeq.is() )
1762 aLabeledSeqVec.push_back( xValueSeq );
1765 if( aLabeledSeqVec.empty() )
1777 if( pPrimaryBar->mxDataFmt && xErrorBar.is() )
1787 mnSeriesIdx( nSeriesIdx ),
1789 mbLabelDeleted( false )
1839 sal_uInt16 nPointIdx = xDataFmt->GetPointPos().mnPointIdx;
1852 pTypeGroup->SetUsedFormatIndex(xDataFmt->GetFormatIdx());
1861 XclImpChDataFormatMap::iterator itr =
maPointFmts.lower_bound(nPointIdx);
1865 itr =
maPointFmts.insert(itr, XclImpChDataFormatMap::value_type(nPointIdx, xDataFmt));
1874 sal_uInt16 nPointIdx = xLabel->GetPointPos().mnPointIdx;
1879 XclImpChTextMap::iterator itr =
maLabels.lower_bound(nPointIdx);
1883 itr =
maLabels.insert(itr, XclImpChTextMap::value_type(nPointIdx, xLabel));
1889 OSL_ENSURE( !
HasParentSeries(),
"XclImpChSeries::AddChildSeries - not allowed for child series" );
1890 if (&rSeries ==
this)
1892 SAL_WARN(
"sc.filter",
"self add attempt");
1902 m_ErrorBars.insert(std::make_pair(it.first, std::make_unique<XclImpChSerErrorBar>(*it.second)));
1922 xLabel = itr->second;
1934 trendLine->SetTrendlineName(
mxTitleLink->GetString());
1950 sal_uInt16 nFormatIdx = pTypeGroup->PopUnusedFormatIndex();
1957 sal_uInt16 nPointIdx =
label.first;
1967 XclImpChDataFormatMap::iterator itr =
maPointFmts.lower_bound(nPointIdx);
1974 itr, XclImpChDataFormatMap::value_type(nPointIdx, p));
1978 p->SetDataLabel(
label.second);
1984 mxSeriesFmt->UpdateSeriesFormat( pTypeGroup->GetTypeInfo(), pTypeGroup->GetGroupFormat().get() );
1988 pointFormat.second->UpdatePointFormat( pTypeGroup->GetTypeInfo(),
mxSeriesFmt.get() );
1995 ScfPropertySet lclGetPointPropSet( Reference< XDataSeries >
const & xDataSeries, sal_uInt16 nPointIdx )
2000 aPropSet.
Set( xDataSeries->getDataPointByIndex( static_cast< sal_Int32 >( nPointIdx ) ) );
2004 OSL_FAIL(
"lclGetPointPropSet - no data point property set" );
2018 return lclCreateLabeledDataSequence(
mxCategLink, rCategRole );
2023 Reference< XDataSeries > xDataSeries;
2032 Reference< XDataSink > xDataSink( xDataSeries, UNO_QUERY );
2033 if( xDataSink.is() )
2036 ::std::vector< Reference< XLabeledDataSequence > > aLabeledSeqVec;
2038 Reference< XLabeledDataSequence > xYValueSeq =
2040 if( xYValueSeq.is() )
2041 aLabeledSeqVec.push_back( xYValueSeq );
2045 Reference< XLabeledDataSequence > xXValueSeq =
2047 if( xXValueSeq.is() )
2048 aLabeledSeqVec.push_back( xXValueSeq );
2052 Reference< XLabeledDataSequence > xSizeValueSeq =
2054 if( xSizeValueSeq.is() )
2055 aLabeledSeqVec.push_back( xSizeValueSeq );
2059 if( !aLabeledSeqVec.empty() )
2076 if( xErrorBarX.is() )
2079 if( xErrorBarY.is() )
2088 for( sal_uInt16 nPointIdx = 0, nPointCount =
mxValueLink->GetCellCount(); nPointIdx < nPointCount; ++nPointIdx )
2090 ScfPropertySet aPointProp = lclGetPointPropSet( xDataSeries, nPointIdx );
2098 ScfPropertySet aPointProp = lclGetPointPropSet( xDataSeries, pointFormat.first );
2099 pointFormat.second->Convert( aPointProp, rTypeInfo, &aSeriesProp );
2120 xSrcLink->ReadChSourceLink( rStrm );
2121 switch( xSrcLink->GetDestType() )
2149 xTrendLine->ReadChSerTrendLine( rStrm );
2156 pErrorBar->ReadChSerErrorBar(rStrm);
2157 sal_uInt8 nBarType = pErrorBar->GetBarType();
2158 m_ErrorBars.insert(std::make_pair(nBarType, std::move(pErrorBar)));
2170 Reference< XRegressionCurveContainer > xRegCurveCont( xDataSeries, UNO_QUERY );
2171 if( !xRegCurveCont.is() )
2178 Reference< XRegressionCurve > xRegCurve = trendLine->CreateRegressionCurve();
2179 if( xRegCurve.is() )
2181 xRegCurveCont->addRegressionCurve( xRegCurve );
2186 OSL_FAIL(
"XclImpChSeries::ConvertTrendLines - cannot add regression curve" );
2193 XclImpChSerErrorBarMap::const_iterator itrPosBar =
m_ErrorBars.find(nPosBarId);
2194 XclImpChSerErrorBarMap::const_iterator itrNegBar =
m_ErrorBars.find(nNegBarId);
2195 XclImpChSerErrorBarMap::const_iterator itrEnd =
m_ErrorBars.end();
2196 if (itrPosBar == itrEnd || itrNegBar == itrEnd)
2220 sal_uInt16 nRecId = rStrm.
GetRecId();
2221 bool bKnownType =
true;
2316 bool bStacked =
false;
2336 bool bPercent =
false;
2364 Reference< XCoordinateSystem > xCoordSystem;
2368 xCoordSystem = css::chart2::PolarCoordinateSystem3d::create(xContext);
2370 xCoordSystem = css::chart2::PolarCoordinateSystem2d::create(xContext);
2375 xCoordSystem = css::chart2::CartesianCoordinateSystem3d::create(xContext);
2377 xCoordSystem = css::chart2::CartesianCoordinateSystem2d::create(xContext);
2387 return xCoordSystem;
2401 Sequence< sal_Int32 > aInt32Seq( 2 );
2441 namespace cssd = ::com::sun::star::drawing;
2446 sal_Int32 nRotationY = 0;
2447 sal_Int32 nRotationX = 0;
2448 sal_Int32 nPerspective = 15;
2449 bool bRightAngled =
false;
2450 cssd::ProjectionMode eProjMode = cssd::ProjectionMode_PERSPECTIVE;
2451 Color aAmbientColor, aLightColor;
2464 bool bParallel = bRightAngled || (nPerspective == 0);
2465 eProjMode = bParallel ? cssd::ProjectionMode_PARALLEL : cssd::ProjectionMode_PERSPECTIVE;
2467 aAmbientColor =
Color( 204, 204, 204 );
2469 aLightColor =
Color( 102, 102, 102 );
2481 bRightAngled =
false;
2482 eProjMode = cssd::ProjectionMode_PARALLEL;
2484 aAmbientColor =
Color( 179, 179, 179 );
2486 aLightColor =
Color( 76, 76, 76 );
2533 mxFramePos = std::make_shared<XclImpChFramePos>();
2538 mxText->ReadRecordGroup( rStrm );
2542 mxFrame->ReadRecordGroup( rStrm );
2566 mxFrame->Convert( aLegendProp );
2569 mxText->ConvertFont( aLegendProp );
2575 cssc2::LegendPosition eApiPos = cssc2::LegendPosition_LINE_END;
2576 cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_CUSTOM;
2580 eApiPos = cssc2::LegendPosition_LINE_START;
2581 eApiExpand = cssc::ChartLegendExpansion_HIGH;
2586 eApiPos = cssc2::LegendPosition_LINE_END;
2587 eApiExpand = cssc::ChartLegendExpansion_HIGH;
2590 eApiPos = cssc2::LegendPosition_PAGE_START;
2591 eApiExpand = cssc::ChartLegendExpansion_WIDE;
2594 eApiPos = cssc2::LegendPosition_PAGE_END;
2595 eApiExpand = cssc::ChartLegendExpansion_WIDE;
2609 RelativePosition aRelPos(
2612 css::drawing::Alignment_TOP_LEFT );
2618 eApiPos = cssc2::LegendPosition_LINE_END;
2627 eApiExpand = cssc::ChartLegendExpansion_CUSTOM;
2637 cssc::ChartLegendExpansion_HIGH, cssc::ChartLegendExpansion_WIDE );
2647 mnDropBar( nDropBar ),
2690 mxChart3d = std::make_shared<XclImpChChart3d>();
2695 mxLegend->ReadRecordGroup( rStrm );
2752 OSL_ENSURE( !
maUnusedFormats.empty(),
"XclImpChTypeGroup::PopUnusedFormatIndex - no more format indexes available" );
2772 return (aConLine !=
m_ChartLines.end() && aConLine->second.HasLine());
2796 OSL_ENSURE(
IsValidGroup(),
"XclImpChTypeGroup::CreateChartType - type group without series" );
2820 Reference< XLabeledDataSequence > xLabeledSeq;
2832 p->ReadRecordGroup(rStrm);
2838 p->ReadRecordGroup(rStrm);
2858 xDataFmt->ReadRecordGroup( rStrm );
2866 Reference< XDataSeries >
const & xSeries, sal_Int32 nApiAxesSetIdx )
const
2868 Reference< XDataSeriesContainer > xSeriesCont( xChartType, UNO_QUERY );
2869 if( !(xSeriesCont.is() && xSeries.is()) )
2873 cssc2::StackingDirection eStacking = cssc2::StackingDirection_NO_STACKING;
2876 eStacking = cssc2::StackingDirection_Y_STACKING;
2878 eStacking = cssc2::StackingDirection_Z_STACKING;
2888 xSeriesCont->addDataSeries( xSeries );
2892 OSL_FAIL(
"XclImpChTypeGroup::InsertDataSeries - cannot add data series" );
2898 bool bSpline =
false;
2901 Reference< XDataSeries > xDataSeries = elem->CreateDataSeries();
2903 bSpline |= elem->HasSpline();
2917 Reference< XDataSink > xDataSink( xDataSeries, UNO_QUERY );
2918 if( !xDataSink.is() )
2922 ::std::vector< Reference< XLabeledDataSequence > > aLabeledSeqVec;
2923 OSL_ENSURE(
maSeries.size() >= 3,
"XclImpChTypeGroup::CreateChartType - missing stock series" );
2924 int nRoleIdx = (
maSeries.size() == 3) ? 1 : 0;
2925 for(
const auto& rxSeries :
maSeries )
2936 Reference< XLabeledDataSequence > xDataSeq = rxSeries->CreateValueSequence( aRole );
2938 aLabeledSeqVec.push_back( xDataSeq );
2965 itr->second->Convert(
GetChRoot(), aBarProp);
2973 itr->second->Convert(
GetChRoot(), aBarProp);
3025 cssc::TimeIncrement& rTimeIncrement = rScaleData.TimeIncrement;
3030 rTimeIncrement.TimeResolution.clear();
3046 rScaleData.Orientation = bReverse ? cssc2::AxisOrientation_REVERSE : cssc2::AxisOrientation_MATHEMATICAL;
3058 cssc::ChartAxisPosition eAxisPos = bMaxCross ? cssc::ChartAxisPosition_END : cssc::ChartAxisPosition_VALUE;
3114 IncrementData& rIncrementData = rScaleData.IncrementData;
3115 lclSetValueOrClearAny( rIncrementData.Distance,
maData.
mfMajorStep, bAutoMajor );
3117 Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements;
3118 rSubIncrementSeq.realloc( 1 );
3119 Any& rIntervalCount = rSubIncrementSeq[ 0 ].IntervalCount;
3120 rIntervalCount.clear();
3124 rIntervalCount <<= sal_Int32( 9 );
3129 if( (1.0 <= fCount) && (fCount < 1001.0) )
3130 rIntervalCount <<= static_cast< sal_Int32 >( fCount );
3132 else if( bAutoMinor )
3135 rIntervalCount <<= static_cast< sal_Int32 >( 5 );
3140 rScaleData.Orientation = bReverse ? cssc2::AxisOrientation_REVERSE : cssc2::AxisOrientation_MATHEMATICAL;
3150 cssc::ChartAxisPosition eAxisPos = bMaxCross ? cssc::ChartAxisPosition_END : cssc::ChartAxisPosition_VALUE;
3155 if( bLogScale ) fCrossingPos = pow( 10.0, fCrossingPos );
3161 sal_Int32 lclGetApiTickmarks(
sal_uInt8 nXclTickPos )
3163 using namespace ::com::sun::star::chart2::TickmarkStyle;
3167 return nApiTickmarks;
3170 cssc::ChartAxisLabelPosition lclGetApiLabelPosition(
sal_Int8 nXclLabelPos )
3173 switch( nXclLabelPos )
3175 case EXC_CHTICK_LOW:
return ChartAxisLabelPosition_OUTSIDE_START;
3179 return ChartAxisLabelPosition_NEAR_AXIS;
3271 mxTick->ReadChTick( rStrm );
3274 mxFont = std::make_shared<XclImpChFont>();
3275 mxFont->ReadChFont( rStrm );
3341 mxTick->Convert( aAxisProp );
3359 bool bLinkNumberFmtToSource =
true;
3366 bLinkNumberFmtToSource =
false;
3376 ScaleData aScaleData = xAxis->getScaleData();
3383 aScaleData.AxisType = cssc2::AxisType::CATEGORY;
3387 aScaleData.AxisType = cssc2::AxisType::REALNUMBER;
3390 aScaleData.AxisType = rTypeGroup.
IsPercent() ?
3394 aScaleData.AxisType = cssc2::AxisType::SERIES;
3398 switch( aScaleData.AxisType )
3400 case cssc2::AxisType::CATEGORY:
3401 case cssc2::AxisType::SERIES:
3406 SAL_WARN(
"sc.filter",
"missing LabelRange");
3408 case cssc2::AxisType::REALNUMBER:
3414 SAL_WARN(
"sc.filter",
"missing ValueRange");
3417 OSL_FAIL(
"XclImpChAxis::CreateAxis - unknown axis type" );
3422 aScaleData.Origin.clear();
3425 xAxis->setScaleData( aScaleData );
3435 Sequence< Reference< XPropertySet > > aSubGridPropSeq = xAxis->getSubGridProperties();
3436 if( aSubGridPropSeq.hasElements() )
3466 SAL_WARN(
"sc.filter",
"missing LabelRange");
3473 SAL_WARN(
"sc.filter",
"missing ValueRange");
3480 bool bWallFrame =
false;
3491 bool bLoop = pxLineFmt || bWallFrame;
3504 (*pxLineFmt)->ReadChLineFormat( rStrm );
3546 mxFramePos = std::make_shared<XclImpChFramePos>();
3573 xTypeGroup->Finalize();
3574 if( xTypeGroup->IsValidGroup() )
3575 aValidGroups.emplace(typeGroup.first, xTypeGroup);
3577 maTypeGroups.swap( aValidGroups );
3599 OUString aAutoTitle(
ScResId(STR_AXISTITLE));
3600 lclFinalizeTitle(
mxXAxisTitle, pDefText, aAutoTitle );
3601 lclFinalizeTitle(
mxYAxisTitle, pDefText, aAutoTitle );
3602 lclFinalizeTitle(
mxZAxisTitle, pDefText, aAutoTitle );
3611 XclImpChTypeGroupMap::const_iterator itr =
maTypeGroups.find(nGroupIdx);
3628 xLegend = rEntry.second->GetLegend();
3651 if( !xCoordSystem.is() )
3657 Reference< XCoordinateSystemContainer > xCoordSystemCont( xDiagram, UNO_QUERY_THROW );
3658 Sequence< Reference< XCoordinateSystem > > aCoordSystems = xCoordSystemCont->getCoordinateSystems();
3659 if( !aCoordSystems.hasElements() )
3660 xCoordSystemCont->addCoordinateSystem( xCoordSystem );
3664 OSL_FAIL(
"XclImpChAxesSet::Convert - cannot insert coordinate system" );
3686 xAxis->ReadRecordGroup( rStrm );
3688 switch( xAxis->GetAxisType() )
3699 xText->ReadRecordGroup( rStrm );
3701 switch( xText->GetLinkTarget() )
3721 xTypeGroup->ReadRecordGroup( rStrm );
3722 sal_uInt16 nGroupIdx = xTypeGroup->GetGroupIdx();
3723 XclImpChTypeGroupMap::iterator itr =
maTypeGroups.lower_bound(nGroupIdx);
3726 itr->second = xTypeGroup;
3729 itr, XclImpChTypeGroupMap::value_type(nGroupIdx, xTypeGroup));
3734 Reference< XCoordinateSystem > xCoordSystem;
3739 Reference< XCoordinateSystemContainer > xCoordSystemCont( xDiagram, UNO_QUERY );
3740 if( xCoordSystemCont.is() )
3742 Sequence< Reference< XCoordinateSystem > > aCoordSystems = xCoordSystemCont->getCoordinateSystems();
3743 OSL_ENSURE( aCoordSystems.getLength() <= 1,
"XclImpChAxesSet::CreateCoordSystem - too many existing coordinate systems" );
3744 if( aCoordSystems.hasElements() )
3745 xCoordSystem = aCoordSystems[ 0 ];
3749 if( !xCoordSystem.is() )
3754 xCoordSystem = xTypeGroup->CreateCoordSystem();
3757 xTypeGroup->ConvertChart3d( aDiaProp );
3763 Reference< XChartTypeContainer > xChartTypeCont( xCoordSystem, UNO_QUERY );
3764 if( xChartTypeCont.is() )
3771 Reference< XChartType > xChartType = rEntry.second->CreateChartType( xDiagram, nApiAxesSetIdx );
3772 if( xChartType.is() )
3773 xChartTypeCont->addChartType( xChartType );
3777 OSL_FAIL(
"XclImpChAxesSet::CreateCoordSystem - cannot add chart type" );
3782 return xCoordSystem;
3787 Reference< XCoordinateSystem >
const & xCoordSystem,
const XclImpChAxis* pCrossingAxis )
const
3793 Reference< XAxis > xAxis =
CreateAxis( *xChAxis, pCrossingAxis );
3798 if( xChAxisTitle )
try
3800 Reference< XTitled > xTitled( xAxis, UNO_QUERY_THROW );
3801 Reference< XTitle > xTitle( xChAxisTitle->CreateTitle(), UNO_SET_THROW );
3802 xTitled->setTitleObject( xTitle );
3806 OSL_FAIL(
"XclImpChAxesSet::ConvertAxis - cannot set axis title" );
3812 sal_Int32 nApiAxisDim = xChAxis->GetApiAxisDimension();
3814 xCoordSystem->setAxisByDimension( nApiAxisDim, xAxis, nApiAxesSetIdx );
3818 OSL_FAIL(
"XclImpChAxesSet::ConvertAxis - cannot set axis" );
3824 Reference< XAxis > xAxis;
3826 xAxis = rChAxis.
CreateAxis( *pTypeGroup, pCrossingAxis );
3833 if( xTypeGroup && xTypeGroup->Is3dWallChart() )
3839 mxXAxis->ConvertWall( aWallProp );
3844 mxYAxis->ConvertWall( aFloorProp );
3880 mxFrame->ReadRecordGroup( rStrm );
3909 pText->ReadRecordGroup(rStrm);
3910 m_DefTexts.insert(std::make_pair(nTextId, std::move(pText)));
3917 xDataFmt->ReadRecordGroup( rStrm );
3921 XclImpChDataFormatMap::iterator itr =
maDataFmts.lower_bound(rPos);
3925 itr, XclImpChDataFormatMap::value_type(rPos, xDataFmt));
3936 mxFrame->UpdateObjFrame( rLineData, rFillData );
3942 if( !xTypeGroup ) xTypeGroup =
mxSecnAxesSet->GetTypeGroup( nGroupIdx );
3943 if( !xTypeGroup ) xTypeGroup =
mxPrimAxesSet->GetFirstTypeGroup();
3960 XclImpChTextMap::const_iterator
const itr =
m_DefTexts.find(nDefTextId);
3961 return itr ==
m_DefTexts.end() ?
nullptr : itr->second.get();
3980 mxFrame->Convert( aFrameProp );
3986 Reference< XTitled > xTitled( xChartDoc, UNO_QUERY_THROW );
3987 Reference< XTitle > xTitle(
mxTitle->CreateTitle(), UNO_SET_THROW );
3988 xTitled->setTitleObject( xTitle );
3997 xChartDoc->setFirstDiagram( xDiagram );
4005 xDiagram->setLegend(
mxLegend->CreateLegend() );
4009 Reference< cssc::XChartDocument > xChart1Doc( xChartDoc, UNO_QUERY );
4010 if( xChart1Doc.is() )
4012 Reference< cssc::XDiagram > xDiagram1 = xChart1Doc->getDiagram();
4025 const XclChFramePos& rFramePos = xPlotAreaPos->GetFramePosData();
4028 Reference< cssc::XDiagramPositioning > xPositioning( xDiagram1, UNO_QUERY_THROW );
4033 xPositioning->setDiagramPositionExcludingAxes( aDiagramRect );
4034 else if( pFirstTypeGroup && pFirstTypeGroup->
Is3dChart() )
4035 xPositioning->setDiagramPositionIncludingAxesAndAxisTitles( aDiagramRect );
4037 xPositioning->setDiagramPositionIncludingAxes( aDiagramRect );
4057 if(!pChartCollection)
4060 ::std::unique_ptr< ::std::vector< ScTokenRef > > xRefTokens( new ::std::vector< ScTokenRef > );
4061 for(
const auto& rxSeries :
maSeries )
4062 rxSeries->FillAllSourceLinks( *xRefTokens );
4063 if( !xRefTokens->empty() )
4065 ::std::unique_ptr< ScChartListener > xListener(
new ScChartListener( rObjName, rDoc, std::move(xRefTokens) ) );
4066 xListener->SetUsed(
true );
4067 xListener->StartListeningTo();
4068 pChartCollection->
insert( xListener.release() );
4074 sal_uInt16 nNewSeriesIdx =
static_cast< sal_uInt16
>(
maSeries.size() );
4076 xSeries->ReadRecordGroup( rStrm );
4089 xAxesSet->ReadRecordGroup( rStrm );
4090 switch( xAxesSet->GetAxesSetId() )
4100 xText->ReadRecordGroup( rStrm );
4101 switch( xText->GetLinkTarget() )
4108 sal_uInt16 nSeriesIdx = xText->GetPointPos().mnSeriesIdx;
4110 maSeries[ nSeriesIdx ]->SetDataLabel( xText );
4142 if( xSeries->HasParentSeries() )
4146 if( xSeries->GetParentIdx() < maSeries.size() )
4147 maSeries[ xSeries->GetParentIdx() ]->AddChildSeries( *xSeries );
4153 pTypeGroup->AddSeries( xSeries );
4168 for(
const auto& [rPos, rDataFmt] :
maDataFmts )
4170 sal_uInt16 nSeriesIdx = rPos.mnSeriesIdx;
4172 maSeries[ nSeriesIdx ]->SetDataFormat( rDataFmt );
4179 rxSeries->FinalizeDataFormats();
4185 OUString aAutoTitle;
4191 if(
mxTitle || (!aAutoTitle.isEmpty()) )
4195 if( aAutoTitle.isEmpty() )
4196 aAutoTitle =
ScResId(STR_CHARTTITLE);
4213 using namespace cssc::MissingValueTreatment;
4214 sal_Int32 nMissingValues = LEAVE_GAP;
4251 Reference< XDrawPageSupplier > xDrawPageSupp( rxModel, UNO_QUERY_THROW );
4252 Reference< XDrawPage > xDrawPage( xDrawPageSupp->getDrawPage(), UNO_SET_THROW );
4253 pSdrPage = ::GetSdrPageFromXDrawPage( xDrawPage );
4254 pSdrModel = pSdrPage ? &pSdrPage->getSdrModelFromSdrPage() :
nullptr;
4261 if( pSdrModel && pSdrPage )
4288 mbOwnTab( bOwnTab ),
4289 mbIsPivotChart( false )
4380 mxChartData->UpdateObjFrame( rLineData, rFillData );
4392 Reference< XChartDocument > xChartDoc( xModel, UNO_QUERY );
4393 if( xChartDoc.is() )
4396 mxChartData->Convert( xChartDoc, rDffConv, rObjName, rChartRect );
virtual void ReadSubRecord(XclImpStream &rStrm) override
Reads a record from the CHTYPEGROUP group (called by base class).
void UpdateDataLabel(bool bCateg, bool bValue, bool bPercent)
Updates display type of this data point label text object.
XclChPropertyMode
Specifies the type of a formatting.
const sal_uInt16 EXC_CHSERGROUP_NONE
const sal_uInt8 EXC_CHPROPS_EMPTY_SKIP
Manual plot area layout in CHFRAMEPOS record.
XclImpChLegendRef mxLegend
3D settings (CHCHART3D record).
virtual void ReadHeaderRecord(XclImpStream &rStrm) override
Reads the CHCHART record (called by base class).
XclImpChType(const XclImpChRoot &rRoot)
XclImpChSourceLinkRef mxSrcLink
Relative text frame position (CHFRAMEPOS record).
void ConvertAxisPosition(ScfPropertySet &rPropSet) const
Converts position settings of this axis at a crossing axis.
const sal_uInt16 EXC_CHDATERANGE_AUTOMAJOR
sal_uInt16 mnValueCount
Number of category entries.
void AddChildSeries(const XclImpChSeries &rSeries)
Adds error bar settings from the passed series to the own series.
void ReadCodeName(XclImpStream &rStrm, bool bGlobals)
Reads the CODENAME record and inserts the codename into the document.
void ReadChLegendException(XclImpStream &rStrm)
const sal_uInt16 EXC_ID_CHPICFORMAT
true = 2d wall/gridlines, no floor.
const sal_uInt16 EXC_CHLINEFORMAT_DASHDOT
const sal_uInt16 EXC_ID_CHLINE
const sal_uInt16 EXC_CHTEXT_POS_DEFAULT
Data point caption is category name.
void ConvertNumFmt(ScfPropertySet &rPropSet, bool bPercent) const
Converts and writes the contained number format to the passed property set.
void ConvertRotation(ScfPropertySet &rPropSet, bool bSupportsStacked) const
Converts and writes the contained rotation settings to the passed property set.
void Convert(ScfPropertySet &rPropSet) const
Converts and writes the contained data to the passed property set.
double CalcRelativeFromChartY(sal_Int32 nPosY) const
Converts the passed vertical coordinate from Excel chart units into a relative position.
const sal_Int32 EXC_CHART_TOTALUNITS
API secondary axes set index.
virtual Color GetFontColor() const override
Returns the leading font color for the text object.
#define EXC_CHPROP_ATTAXISINDEX
void ConvertAxis(XclImpChAxisRef const &xChAxis, XclImpChTextRef const &xChAxisTitle, css::uno::Reference< css::chart2::XCoordinateSystem > const &xCoordSystem, const XclImpChAxis *pCrossingAxis) const
Creates and inserts an axis into the container and registers the coordinate system.
void ReadWindow2(XclImpStream &rStrm, bool bChart)
Reads a WINDOW2 record.
void ReadChSerParent(XclImpStream &rStrm)
Reads a CHSERPARENT record specifying the parent series of this series.
virtual sal_uInt16 GetRotation() const override
Returns the rotation value for the text object.
const sal_uInt8 EXC_CHTICK_OUTSIDE
#define EXC_CHPROP_ROTATIONVERTICAL
const sal_uInt16 EXC_ID_CHBAR
Text boxes (titles, data point labels).
void ReadPageBreaks(XclImpStream &rStrm)
Reads a HORIZONTALPAGEBREAKS or VERTICALPAGEBREAKS record.
const sal_uInt8 EXC_CH3DDATAFORMAT_STRAIGHT
Circular base.
sal_uInt16 GetNextRecId()
Returns the record ID of the following record.
bool Is3dChart() const
Returns true, if the chart is three-dimensional.
css::uno::Reference< css::beans::XPropertySet > CreateErrorBar(sal_uInt8 nPosBarId, sal_uInt8 nNegBarId) const
Tries to create an error bar API object from the specified Excel error bars.
No varied colors supported.
void InsertDataSeries(css::uno::Reference< css::chart2::XChartType > const &xChartType, css::uno::Reference< css::chart2::XDataSeries > const &xSeries, sal_Int32 nApiAxesSetIdx) const
Inserts the passed series into the chart type.
XclImpChFramePosRef mxFramePos
Formatting runs (CHFORMATRUNS record).
const sal_uInt8 EXC_OBJ_LINE_MEDTRANS
const sal_uInt16 EXC_CHAXESSET_PRIMARY
void ReadCenter(XclImpStream &rStrm)
Reads a HCENTER or VCENTER record.
sal_uInt8 mnEmptyMode
Additional flags.
void ReadFormats(XclImpStream &rStrm)
Reads and appends the formatting information (run count and runs) from stream.
#define SERVICE_CHART2_DATASERIES
void WriteLineProperties(ScfPropertySet &rPropSet, XclChObjectTable &rDashTable, const XclChLineFormat &rLineFmt, XclChPropertyMode ePropMode)
Writes all line properties to the passed property set.
XclImpChAttachedLabel(const XclImpChRoot &rRoot)
std::shared_ptr< XclImpChSeries > XclImpChSeriesRef
const sal_uInt16 EXC_ID_CHAREAFORMAT
#define EXC_CHPROP_SHOWPOSITIVEERROR
const sal_uInt16 EXC_CHAXESSET_NONE
sal_uInt8 mnBackMode
Position of labels relative to axis.
XclImpChLabelRangeRef mxLabelRange
Contents of the CHAXIS record.
#define EXC_CHPROP_MOVING_AVERAGE_PERIOD
sal_uInt16 GetAxesSetId() const
Returns the index of the axes set (primary/secondary).
const sal_uInt16 EXC_ID_CHSERIES
Contains all view settings for a single sheet.
bool IsValidGroup() const
Returns true, if this chart type group contains at least one valid series.
virtual void ReadHeaderRecord(XclImpStream &rStrm) override
Reads the CHLEGEND record (called by base class).
bool HasVarPointFormat() const
Returns true, if points of a series show varying automatic area format.
#define EXC_CHPROP_EXTRAPOLATE_BACKWARD
XclImpTabViewSettings & GetTabViewSettings() const
Returns the view settings of the current sheet.
void ConvertWall(ScfPropertySet &rPropSet) const
Converts and writes 3D wall/floor properties to the passed property set.
const sal_uInt16 EXC_ID_CHFRAMEPOS
void ConvertFrame(ScfPropertySet &rPropSet) const
Converts and writes the contained frame data to the passed property set.
XclImpNumFmtBuffer & GetNumFmtBuffer() const
Returns the number format buffer.
#define EXC_CHPROP_EXPANSION
XclImpChEscherFormatRef mxEscherFmt
Area format (CHAREAFORMAT record).
#define EXC_CHPROP_ARRANGEORDER
virtual ~XclImpChChart() override
std::shared_ptr< XclImpChSerTrendLine > XclImpChSerTrendLineRef
const sal_uInt8 EXC_CHSERERR_YPLUS
void ConvertChart3d(ScfPropertySet &rPropSet) const
Converts and writes all 3D settings to the passed diagram.
XclImpChTextRef mxText
Legend frame position (CHFRAMEPOS record).
const sal_uInt16 EXC_CHTEXT_POS_AUTO
XclImpChAreaFormatRef mxAreaFmt
Line format (CHLINEFORMAT record).
const XclChFormatInfo & GetFormatInfo(XclChObjectType eObjType) const
Returns an info struct about auto formatting for the passed object type.
sal_uInt16 GetRecId() const
Returns the current record ID.
const sal_uInt8 EXC_CHSERERR_CUSTOM
const sal_uInt16 EXC_CHLEGENDEXCEPTION_DELETED
const sal_uInt8 EXC_CHSERERR_STDERR
Contains information for a chart type.
Color GetFontAutoColor() const
Returns the default text color for charts.
#define EXC_CHPROP_TEXTBREAK
const sal_uInt8 EXC_CHSRCLINK_WORKSHEET
bool HasCategoryLabels() const
Returns true, if chart type has category labels enabled (may be disabled in radar charts)...
#define EXC_CHPROP_ROLE_CLOSEVALUES
const sal_uInt16 EXC_CHLEGEND_STACKED
void SetSeriesData(XclImpChSourceLinkRef const &xValueLink, XclImpChDataFormatRef const &xDataFmt)
Sets link and formatting information for the error bars.
sal_Int32 mnDefaultLabelPos
Mode for varying point colors.
bool HasLine() const
Returns true, if the line style is set to something visible.
const sal_uInt16 EXC_CHDATERANGE_DAYS
Recognize date/text automatically.
const sal_uInt16 EXC_ID_CHPLOTFRAME
sal_uInt16 mnBackMode
Vertical alignment.
void ReadChTypeGroup(XclImpStream &rStrm)
Reads a CHTYPEGROUP record group containing chart type and chart settings.
XclChTypeInfo maTypeInfo
Record identifier for chart type.
void Convert(css::uno::Reference< css::frame::XModel > const &xModel, XclImpDffConverter &rDffConv, const OUString &rObjName, const tools::Rectangle &rChartRect) const
Creates the chart object in the passed component.
sal_uInt16 mnRX
Y offset in top row (1/256 of row height).
#define EXC_CHPROP_ERRORBARSTYLE
XclImpChDataFormatRef CreateDataFormat(sal_uInt16 nPointIdx, sal_uInt16 nFormatIdx)
Creates a new CHDATAFORMAT group with the specified point index.
void ConvertAxisPosition(ScfPropertySet &rPropSet, bool b3dChart) const
Converts position settings of this axis at a crossing axis.
sal_uInt16 mnRelHeight
Eye distance to chart (0...100).
const sal_uInt16 EXC_ID_CHFORMAT
const sal_uInt16 EXC_CHSERIES_MAXSERIES
const sal_uInt16 EXC_CHOBJLINK_YAXIS
Chart title.
sal_uInt16 mnBubbleSize
Hole size in donut chart (CHPIE).
#define EXC_CHPROP_SHOWFIRST
#define EXC_CHPROP_NEGATIVEERROR
XclFormatRunVec maFormats
Link target for this text object.
bool insert(ScChartListener *pListener)
bool IsManualPlotArea() const
Returns true, if the plot area has benn moved and/or resized manually.
const sal_uInt8 EXC_CHTICK_INSIDE
const sal_uInt16 EXC_ID_CHFORMATRUNS
ScAddress toAbs(const ScSheetLimits &rLimits, const ScAddress &rPos) const
const sal_uInt16 EXC_CHTEXT_POS_RIGHT
Series formatting in a chart supporting line formatting only.
bool IsAutoArea() const
Returns true, if the area format is set to automatic.
XclImpChDataFormatRef mxSeriesFmt
Link data for series bubble sizes.
#define EXC_CHPROP_MARKPOSITION
static void ConvertPieRotation(ScfPropertySet &rPropSet, sal_uInt16 nAngle)
Writes the pie rotation property for the passed angle.
void SetTextFormats(const XclFormatRunVec &rFormats)
Sets formatting runs read from a CHFORMATRUNS record.
virtual sal_uInt16 GetFontIndex() const override
Returns the leading font index for the text object.
void Convert(css::uno::Reference< css::chart2::XDiagram > const &xDiagram) const
Creates a coordinate system and converts all series and axis settings.
XclImpChDataFormatMap maPointFmts
CHDATAFORMAT group for series format.
Bar charts (horizontal or vertical).
void WriteEscherProperties(ScfPropertySet &rPropSet, XclChObjectTable &rGradientTable, XclChObjectTable &rBitmapTable, const XclChEscherFormat &rEscherFmt, const XclChPicFormat *pPicFmt, sal_uInt32 nDffFillType, XclChPropertyMode ePropMode)
Writes gradient or bitmap area properties to the passed property set.
XclImpChAxesSetRef mxSecnAxesSet
Primary axes set (CHAXESSET group).
#define EXC_CHPROP_EXTRAPOLATE_FORWARD
const sal_uInt16 EXC_CHATTLABEL_SHOWPERCENT
bool mbOwnTab
Drawing container for embedded shapes.
bool mbIsPivotChart
true = own sheet; false = embedded object.
const sal_uInt8 EXC_CHSRCLINK_TITLE
sal_uInt16 mnBarDist
Drop bar identifier, needed for auto format.
const sal_uInt16 EXC_ID_CHTEXT
No default text available.
void ConvertAxisPosition(ScfPropertySet &rPropSet, const XclImpChTypeGroup &rTypeGroup) const
Converts position settings of this axis at a crossing axis.
XclImpChValueRangeRef mxValueRange
Category scaling (CHLABELRANGE record).
#define SERVICE_CHART2_AXIS
double mfForecastBack
Counter to forecast forward.
const sal_uInt16 EXC_CHAXISLINE_AXISLINE
void SetDataLabel(const XclImpChTextRef &xLabel)
Sets a label text (CHTEXT group) attached to a series or data point.
const sal_uInt16 EXC_CHVALUERANGE_MAXCROSS
Axis direction reversed.
High/low lines in stock charts.
void ReadChDataFormat(XclImpStream &rStrm)
Reads a CHDATAFORMAT group containing series and point formatting.
XclChObjectType meObjType
Contents of the CHFRAME record.
const sal_uInt16 EXC_CHOBJLINK_TITLE
No link target.
XclImpChLineFormatRef mxAxisLine
Index into font buffer (CHFONT record).
const sal_uInt8 EXC_CHSERTREND_EXPONENTIAL
If order is 1, trend line is linear.
const sal_uInt16 EXC_CHBAR_HORIZONTAL
const sal_uInt16 EXC_CHTEXT_POS_AXIS
#define EXC_CHPROP_CURVENAME
const sal_uInt16 EXC_ID_CHCHART
css::uno::Reference< css::chart2::data::XLabeledDataSequence > CreateValueSequence() const
Creates a labeled data sequence object from value data link.
sal_uInt16 mnNumFmtIdx
Wall/floor format (sub records of CHFRAME group).
XclImpChSerTrendLine(const XclImpChRoot &rRoot)
constexpr OUStringLiteral PERCENT(u"Percent")
const sal_uInt16 EXC_CHDATAFORMAT_DEFAULT
Maximum number of data points.
sal_uInt16 mnFlags
Crossing position of other axis.
const sal_uInt16 EXC_CHCHARTLINE_CONNECT
Hi-lo lines.
void ConvertRotationBase(ScfPropertySet &rPropSet, bool bSupportsStacked) const
Converts and writes the contained rotation settings to the passed property set.
const sal_uInt16 EXC_CHATTLABEL_SHOWVALUE
#define EXC_CHPROP_D3DSCENESHADEMODE
sal_uInt16 mnRotation
Additional flags.
#define EXC_CHPROP_CROSSOVERVALUE
std::shared_ptr< XclImpChLegend > XclImpChLegendRef
XclImpChChart & GetChartData() const
Returns a reference to the parent chart data object.
sal_uInt8 mnShowEquation
Polynomial order or moving average counter.
#define EXC_CHPROP_LABELSEPARATOR
const sal_uInt16 EXC_ID_CHRADARLINE
XclImpChSeriesVec maSeries
Extended chart type info.
const sal_uInt16 EXC_CHRADAR_AXISLABELS
void ReadChDropBar(XclImpStream &rStrm)
Reads a CHDROPBAR record group.
const std::size_t EXC_CHART_PROGRESS_SIZE
void SC_DLLPUBLIC join(const ScDocument *pDoc,::std::vector< ScTokenRef > &rTokens, const ScTokenRef &pToken, const ScAddress &rPos)
const sal_uInt16 EXC_CHTEXT_POS_ABOVE
XclImpChFrameRef mxPlotFrame
The Z axis title (CHTEXT group).
void Finalize(bool bStockChart)
Final processing after reading the entire chart.
XclImpChChart3dRef mxChart3d
First series in this chart type group (CHSERIES groups).
const sal_uInt16 EXC_ID_CHMARKERFORMAT
void Convert(ScfPropertySet &rPropSet, bool b3dWallChart) const
Converts and writes the contained data to the passed property set.
sal_uInt8 mnLabelPos
Type of tick marks of minor grid.
static void SkipBlock(XclImpStream &rStrm)
Helper to skip a CHBEGIN/CHEND block, includes nested blocks.
const sal_uInt8 EXC_CHPROPS_EMPTY_INTERPOLATE
Plot empty values as zero.
void Finalize()
Final processing after reading the entire chart.
const sal_uInt16 EXC_ID_CH3DDATAFORMAT
#define DFF_Prop_fillType
XclImpChAxesSet(const XclImpChRoot &rRoot, sal_uInt16 nAxesSetId)
Data point connector line.
std::shared_ptr< XclImpChAxis > XclImpChAxisRef
void TraceChartLegendPosition()
XclChExtTypeInfo maTypeInfo
Chart type (e.g. CHBAR, CHLINE, ...).
static void WriteRotationProperties(ScfPropertySet &rPropSet, sal_uInt16 nRotation, bool bSupportsStacked)
Writes rotation properties to the passed property set.
const sal_uInt16 EXC_ID8_IMGDATA
Color GetFontColor() const
Returns the leading font color for the axis labels.
void ImplConvertObjects(XclImpDffConverter &rDffConv, SdrModel &rSdrModel, SdrPage &rSdrPage)
Converts all objects and inserts them into the current drawing page.
XclImpChType maType
Contents of the CHTYPEGROUP record.
void ReadChSourceLink(XclImpStream &rStrm)
Reads a CHSOURCELINK record.
void Progress(std::size_t nDelta=1)
Increase the progress bar by the passed value.
#define EXC_CHPROP_INCLUDEHIDDENCELLS
const sal_uInt16 EXC_CHVALUERANGE_LOGSCALE
Represents the CHSERIES record group describing a data series in a chart.
XclImpChSeriesRef mxFirstSeries
Series attached to this chart type group (CHSERIES groups).
void ConvertTitlePosition(const XclChTextKey &rTitleKey) const
Converts the manual position of the specified title.
XclChObjectLink maObjLink
Contents of the CHTEXT record.
XclImpChChart(const XclImpRoot &rRo