22 #include <com/sun/star/i18n/XBreakIterator.hpp>
23 #include <com/sun/star/i18n/ScriptType.hpp>
24 #include <com/sun/star/drawing/FillStyle.hpp>
25 #include <com/sun/star/drawing/XShapes.hpp>
26 #include <com/sun/star/chart/XChartDocument.hpp>
27 #include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
28 #include <com/sun/star/chart/ChartAxisPosition.hpp>
29 #include <com/sun/star/chart/ChartLegendExpansion.hpp>
30 #include <com/sun/star/chart/DataLabelPlacement.hpp>
31 #include <com/sun/star/chart/ErrorBarStyle.hpp>
32 #include <com/sun/star/chart/MissingValueTreatment.hpp>
33 #include <com/sun/star/chart/TimeInterval.hpp>
34 #include <com/sun/star/chart/TimeUnit.hpp>
35 #include <com/sun/star/chart/XAxisSupplier.hpp>
36 #include <com/sun/star/chart/XDiagramPositioning.hpp>
37 #include <com/sun/star/chart2/XChartDocument.hpp>
38 #include <com/sun/star/chart2/XDiagram.hpp>
39 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
40 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
41 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
42 #include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
43 #include <com/sun/star/chart2/XTitled.hpp>
44 #include <com/sun/star/chart2/XColorScheme.hpp>
45 #include <com/sun/star/chart2/data/XDataSource.hpp>
46 #include <com/sun/star/chart2/AxisType.hpp>
47 #include <com/sun/star/chart2/CurveStyle.hpp>
48 #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
49 #include <com/sun/star/chart2/DataPointLabel.hpp>
50 #include <com/sun/star/chart2/LegendPosition.hpp>
51 #include <com/sun/star/chart2/RelativePosition.hpp>
52 #include <com/sun/star/chart2/RelativeSize.hpp>
53 #include <com/sun/star/chart2/StackingDirection.hpp>
54 #include <com/sun/star/chart2/TickmarkStyle.hpp>
59 #include <document.hxx>
60 #include <compiler.hxx>
61 #include <tokenarray.hxx>
71 using ::com::sun::star::uno::Any;
72 using ::com::sun::star::uno::Reference;
73 using ::com::sun::star::uno::Sequence;
74 using ::com::sun::star::uno::UNO_QUERY;
75 using ::com::sun::star::uno::UNO_QUERY_THROW;
76 using ::com::sun::star::uno::UNO_SET_THROW;
77 using ::com::sun::star::uno::Exception;
78 using ::com::sun::star::beans::XPropertySet;
79 using ::com::sun::star::i18n::XBreakIterator;
80 using ::com::sun::star::frame::XModel;
81 using ::com::sun::star::drawing::XShape;
82 using ::com::sun::star::drawing::XShapes;
84 using ::com::sun::star::chart2::IncrementData;
85 using ::com::sun::star::chart2::RelativePosition;
86 using ::com::sun::star::chart2::RelativeSize;
87 using ::com::sun::star::chart2::ScaleData;
88 using ::com::sun::star::chart2::SubIncrement;
89 using ::com::sun::star::chart2::XAxis;
90 using ::com::sun::star::chart2::XChartDocument;
91 using ::com::sun::star::chart2::XChartTypeContainer;
92 using ::com::sun::star::chart2::XColorScheme;
93 using ::com::sun::star::chart2::XCoordinateSystem;
94 using ::com::sun::star::chart2::XCoordinateSystemContainer;
95 using ::com::sun::star::chart2::XChartType;
96 using ::com::sun::star::chart2::XDataSeries;
97 using ::com::sun::star::chart2::XDataSeriesContainer;
98 using ::com::sun::star::chart2::XDiagram;
99 using ::com::sun::star::chart2::XFormattedString;
100 using ::com::sun::star::chart2::XLegend;
101 using ::com::sun::star::chart2::XRegressionCurve;
102 using ::com::sun::star::chart2::XRegressionCurveContainer;
103 using ::com::sun::star::chart2::XTitle;
104 using ::com::sun::star::chart2::XTitled;
106 using ::com::sun::star::chart2::data::XDataSequence;
107 using ::com::sun::star::chart2::data::XDataSource;
108 using ::com::sun::star::chart2::data::XLabeledDataSequence;
110 using ::formula::FormulaToken;
111 using ::formula::FormulaTokenArrayPlainIterator;
113 namespace cssc = ::com::sun::star::chart;
114 namespace cssc2 = ::com::sun::star::chart2;
132 template<
typename Type >
142 template<
typename ValueType,
typename KeyType>
160 template<
typename Type >
161 bool lclIsAutoAnyOrGetValue(
Type& rValue,
const Any& rAny )
163 return !rAny.hasValue() || !(rAny >>= rValue);
166 bool lclIsAutoAnyOrGetScaledValue(
double& rfValue,
const Any& rAny,
bool bLogScale )
168 bool bIsAuto = lclIsAutoAnyOrGetValue( rfValue, rAny );
169 if( !bIsAuto && bLogScale )
170 rfValue =
log( rfValue ) /
log( 10.0 );
174 sal_uInt16 lclGetTimeValue(
const XclExpRoot& rRoot,
double fSerialDate, sal_uInt16 nTimeUnit )
186 OSL_ENSURE(
false,
"lclGetTimeValue - unexpected time unit" );
191 bool lclConvertTimeValue(
const XclExpRoot& rRoot, sal_uInt16& rnValue,
const Any& rAny, sal_uInt16 nTimeUnit )
193 double fSerialDate = 0;
194 bool bAuto = lclIsAutoAnyOrGetValue( fSerialDate, rAny );
196 rnValue = lclGetTimeValue( rRoot, fSerialDate, nTimeUnit );
200 sal_uInt16 lclGetTimeUnit( sal_Int32 nApiTimeUnit )
202 switch( nApiTimeUnit )
207 default: OSL_ENSURE(
false,
"lclGetTimeUnit - unexpected time unit" );
212 bool lclConvertTimeInterval( sal_uInt16& rnValue, sal_uInt16& rnTimeUnit,
const Any& rAny )
214 cssc::TimeInterval aInterval;
215 bool bAuto = lclIsAutoAnyOrGetValue( aInterval, rAny );
219 rnTimeUnit = lclGetTimeUnit( aInterval.TimeUnit );
263 rStrm << sal_uInt16( 0x0850 ) << sal_uInt16( 0x085A ) << sal_uInt16( 0x0861 ) << sal_uInt16( 0x0861 ) << sal_uInt16( 0x086A ) << sal_uInt16( 0x086B );
269 OSL_ENSURE( rUnwrittenFrBlock.mnType !=
EXC_CHFRBLOCK_TYPE_UNKNOWN,
"XclExpChRootData::InitializeFutureRecBlock - unknown future record block type" );
270 lclWriteChFrBlockRecord( rStrm, rUnwrittenFrBlock,
true );
274 maUnwrittenFrBlocks.clear();
315 return mxChData->mxTypeInfoProv->GetTypeInfo( eType );
320 return mxChData->mxTypeInfoProv->GetTypeInfoFromService( rServiceName );
325 return mxChData->mxFmtInfoProv->GetFormatInfo( eObjType );
346 OSL_ENSURE(
GetPalette().
IsSystemColor( nSysColorIdx ),
"XclExpChRoot::SetSystemColor - invalid color index" );
375 rLineFmt, *
mxChData->mxLineDashTable, rPropSet, ePropMode );
401 sal_Int32 nApiRot = 0;
403 return static_cast< sal_uInt16
>( (450 - (nApiRot % 360)) % 360 );
408 mxChData->RegisterFutureRecBlock( rFrBlock );
413 mxChData->InitializeFutureRecBlock( rStrm );
418 mxChData->FinalizeFutureRecBlock( rStrm );
422 sal_uInt16 nFrType, sal_uInt16 nRecId, std::size_t nRecSize ) :
500 switch( eDefFrameType )
510 OSL_FAIL(
"XclExpChLineFormat::SetDefault - unknown frame type" );
564 xLineFmt->Convert( rRoot, rPropSet, eObjType );
618 switch( eDefFrameType )
628 OSL_FAIL(
"XclExpChAreaFormat::SetDefault - unknown frame type" );
700 sal_uInt32 nBGRValue;
704 Color aColor( nBGRValue & 0xff, (nBGRValue >> 8) & 0xff, (nBGRValue >> 16) & 0xff );
712 OSL_ENSURE(
maData.
mxEscherSet,
"XclExpChEscherFormat::WriteBody - missing property container" );
734 mxLineFmt->Convert( rRoot, rPropSet, eObjType );
740 bool bComplexFill =
mxAreaFmt->Convert( rRoot, rPropSet, eObjType );
839 xFrame->Convert( rPropSet );
840 if( xFrame->IsDeleteable() )
851 void lclAddDoubleRefData(
857 aComplexRef.
InitRange(
ScRange(nScCol1,nScRow1,nScTab1,nScCol2,nScRow2,nScTab2));
860 if( orArray.
GetLen() > 0 )
863 OSL_ENSURE( (rToken.GetType() == ::formula::svDoubleRef) || (rToken.GetType() == ::formula::svExternalDoubleRef),
864 "lclAddDoubleRefData - double reference token expected");
865 if( rToken.GetType() == ::formula::svExternalDoubleRef )
867 rToken.GetIndex(), rToken.GetString(), aComplexRef);
892 OUString aRangeRepr = xDataSeq->getSourceRangeRepresentation();
894 std::unique_ptr<ScTokenArray> pArray(aComp.
CompileString(aRangeRepr));
899 sal_uInt32 nValueCount = 0;
900 FormulaTokenArrayPlainIterator aIter(*pArray);
901 for(
const FormulaToken* pToken = aIter.First(); pToken; pToken = aIter.Next() )
903 switch( pToken->GetType() )
905 case ::formula::svSingleRef:
906 case ::formula::svExternalSingleRef:
914 case ::formula::svDoubleRef:
915 case ::formula::svExternalDoubleRef:
921 for (
SCTAB nScTab = aAbs1.
Tab(); nScTab <= aAbs2.
Tab(); ++nScTab)
924 if (bSplitToColumns && (aAbs1.
Col() < aAbs2.
Col()) && (aAbs1.
Row() < aAbs2.
Row()))
925 for (
SCCOL nScCol = aAbs1.
Col(); nScCol <= aAbs2.
Col(); ++nScCol)
926 lclAddDoubleRefData(aArray, *pToken, nScTab, nScCol, aAbs1.
Row(), nScTab, nScCol, aAbs2.
Row());
928 lclAddDoubleRefData(aArray, *pToken, nScTab, aAbs1.
Col(), aAbs1.
Row(), nScTab, aAbs2.
Col(), aAbs2.
Row());
930 sal_uInt32 nTabs =
static_cast<sal_uInt32
>(aAbs2.
Tab() - aAbs1.
Tab() + 1);
931 sal_uInt32 nCols =
static_cast<sal_uInt32
>(aAbs2.
Col() - aAbs1.
Col() + 1);
932 sal_uInt32 nRows =
static_cast<sal_uInt32
>(aAbs2.
Row() - aAbs1.
Row() + 1);
933 nValueCount += nCols * nRows * nTabs;
956 if( rStringSeq.hasElements() )
960 namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
963 for(
const Reference< XFormattedString >& rString : rStringSeq )
970 OUString aText = rString->getString();
977 sal_Int32 nPortionPos = 0;
978 sal_Int32 nTextLen = aText.getLength();
979 while( nPortionPos < nTextLen )
982 sal_Int16 nScript = xBreakIt->getScriptType( aText, nPortionPos );
983 sal_Int32 nPortionEnd = xBreakIt->endOfScript( aText, nPortionPos, nScript );
986 if( nScript == ApiScriptType::WEAK )
987 nScript = nLastScript;
990 sal_uInt16 nXclPortionStart =
mxString->Len();
993 if( nXclPortionStart < mxString->Len() )
996 sal_uInt16& rnFontIdx = (nScript == ApiScriptType::COMPLEX) ? nCmplxFontIdx :
997 ((nScript == ApiScriptType::ASIAN) ? nAsianFontIdx : nWstrnFontIdx);
1004 mxString->AppendFormat( nXclPortionStart, rnFontIdx );
1008 nLastScript = nScript;
1009 nPortionPos = nPortionEnd;
1017 OSL_ENSURE( !rFormats.empty() && (rFormats.front().mnChar == 0),
1018 "XclExpChSourceLink::ConvertStringSequenc - missing leading format" );
1020 if( rFormats.size() == 1 )
1021 nFontIdx =
mxString->RemoveLeadingFont();
1022 else if( !rFormats.empty() )
1023 nFontIdx = rFormats.front().mnFontIdx;
1034 sal_Int32 nApiNumFmt = 0;
1056 mxString->WriteFormats( rStrm,
true );
1065 rStrm << sal_uInt16( 0 ) << *
mxString;
1104 bool bShowCateg,
bool bShowValue,
bool bShowPercent,
bool bShowBubble )
1134 SetFont( xFont, pFont->GetFontData().maColor, pFont->GetFontColorId() );
1190 sal_uInt16 nFontIdx =
mxSrcLink->ConvertStringSequence( xTitle->getText() );
1194 OUString aSubTitle =
"\n" + *pSubTitle;
1211 Reference< cssc::XChartDocument > xChart1Doc(
GetChartDocument(), UNO_QUERY_THROW );
1212 Reference< XShape > xTitleShape( xChart1Doc->getTitle(), UNO_SET_THROW );
1213 css::awt::Point aPos = xTitleShape->getPosition();
1214 css::awt::Size aSize = xTitleShape->getSize();
1215 css::awt::Rectangle aRect( aPos.X, aPos.Y, aSize.Width, aSize.Height );
1222 sal_Int32 nDefPosY = 85;
1251 cssc2::DataPointLabel aPointLabel;
1259 OSL_ENSURE( (
GetBiff() ==
EXC_BIFF8) || !bIsBubble,
"XclExpChText::ConvertDataLabel - bubble charts only in BIFF8" );
1262 bool bShowValue = !bIsBubble && aPointLabel.ShowNumber;
1263 bool bShowPercent = bIsPie && aPointLabel.ShowNumberInPercent;
1264 bool bShowCateg = aPointLabel.ShowCategoryName;
1265 bool bShowBubble = bIsBubble && aPointLabel.ShowNumber;
1266 bool bShowAny = bShowValue || bShowPercent || bShowCateg || bShowBubble;
1272 mxLabelProps->Convert( rPropSet, bShowCateg, bShowValue, bShowPercent, bShowBubble );
1276 if( bShowPercent ) bShowValue =
false;
1277 if( bShowValue ) bShowCateg =
false;
1278 if( bShowValue || bShowCateg ) bShowBubble =
false;
1296 sal_Int32 nPlacement = 0;
1300 using namespace cssc::DataLabelPlacement;
1305 else switch( nPlacement )
1320 default: OSL_FAIL(
"XclExpChText::ConvertDataLabel - unknown label placement type" );
1326 if( bShowValue || bShowPercent )
1328 mxSrcLink->ConvertNumFmt( rPropSet, bShowPercent );
1353 mxSrcLink->ConvertNumFmt( rPropSet,
false );
1360 sal_uInt16 nFlags = 0;
1373 lclSaveRecord( rStrm,
mxFont );
1377 lclSaveRecord( rStrm,
mxFrame );
1405 const OUString* pSubTitle =
nullptr )
1407 Reference< XTitle > xTitle;
1409 xTitle = xTitled->getTitleObject();
1412 xText->ConvertTitle( xTitle, nTarget, pSubTitle );
1500 double fApiDist(0.0);
1502 SetValue( limit_cast< sal_uInt16 >( fApiDist * 100.0, 0, 100 ) );
1512 sal_Int32 nApiType(0);
1516 using namespace cssc2::DataPointGeometry3D;
1536 OSL_FAIL(
"XclExpCh3dDataFormat::Convert - unknown 3D bar format" );
1639 if( !xRegCurve.is() )
1646 if( aService ==
"com.sun.star.chart2.LinearRegressionCurve" )
1651 else if( aService ==
"com.sun.star.chart2.ExponentialRegressionCurve" )
1655 else if( aService ==
"com.sun.star.chart2.LogarithmicRegressionCurve" )
1659 else if( aService ==
"com.sun.star.chart2.PotentialRegressionCurve" )
1663 else if( aService ==
"com.sun.star.chart2.PolynomialRegressionCurve" )
1670 else if( aService ==
"com.sun.star.chart2.MovingAverageRegressionCurve" )
1684 bool bIsForceIntercept =
false;
1686 if (bIsForceIntercept)
1695 ScfPropertySet aEquationProp( xRegCurve->getEquationProperties() );
1703 mxLabel->ConvertTrendLineEquation( aEquationProp, aPointPos );
1732 sal_Int32 nBarStyle = 0;
1738 case cssc::ErrorBarStyle::ABSOLUTE:
1742 case cssc::ErrorBarStyle::RELATIVE:
1746 case cssc::ErrorBarStyle::STANDARD_DEVIATION:
1750 case cssc::ErrorBarStyle::STANDARD_ERROR:
1753 case cssc::ErrorBarStyle::FROM_DATA:
1758 if( xDataSource.is() )
1762 Reference< XDataSequence > xValueSeq;
1764 const Sequence< Reference< XLabeledDataSequence > > aLabeledSeqVec = xDataSource->getDataSequences();
1765 for(
const Reference< XLabeledDataSequence >& rLabeledSeq : aLabeledSeqVec )
1767 Reference< XDataSequence > xTmpValueSeq = rLabeledSeq->getValues();
1772 xValueSeq = xTmpValueSeq;
1776 if( xValueSeq.is() )
1805 ScfPropertySet lclGetPointPropSet( Reference< XDataSeries >
const & xDataSeries, sal_Int32 nPointIdx )
1810 aPropSet.
Set( xDataSeries->getDataPointByIndex( nPointIdx ) );
1814 OSL_FAIL(
"lclGetPointPropSet - no data point property set" );
1824 mnSeriesIdx( nSeriesIdx ),
1836 Reference< XDiagram >
const & xDiagram, Reference< XDataSeries >
const & xDataSeries,
1837 const XclChExtTypeInfo& rTypeInfo, sal_uInt16 nGroupIdx, sal_uInt16 nFormatIdx )
1841 if( xDataSource.is() )
1843 Reference< XDataSequence > xYValueSeq, xTitleSeq, xXValueSeq, xBubbleSeq;
1846 const Sequence< Reference< XLabeledDataSequence > > aLabeledSeqVec = xDataSource->getDataSequences();
1847 for(
const Reference< XLabeledDataSequence >& rLabeledSeq : aLabeledSeqVec )
1849 Reference< XDataSequence > xTmpValueSeq = rLabeledSeq->getValues();
1856 xYValueSeq = xTmpValueSeq;
1857 if( !xTitleSeq.is() )
1858 xTitleSeq = rLabeledSeq->getLabel();
1862 xXValueSeq = xTmpValueSeq;
1866 xBubbleSeq = xTmpValueSeq;
1867 xTitleSeq = rLabeledSeq->getLabel();
1872 bOk = xYValueSeq.is();
1880 mxTitleLink->ConvertDataSequence( xTitleSeq,
true );
1893 mxSeriesFmt->ConvertDataSeries( aSeriesProp, rTypeInfo );
1911 Reference< XColorScheme > xColorScheme = xDiagram->getDefaultColorScheme();
1912 if( xColorScheme.is() )
1914 static const OUStringLiteral aFillStyleName =
u"FillStyle";
1915 static const OUStringLiteral aColorName =
u"Color";
1916 namespace cssd = ::com::sun::star::drawing;
1917 for( sal_Int32 nPointIdx = 0; nPointIdx < nMaxPointCount; ++nPointIdx )
1919 aPointPos.
mnPointIdx =
static_cast< sal_uInt16
>( nPointIdx );
1920 ScfPropertySet aPointProp = lclGetPointPropSet( xDataSeries, nPointIdx );
1922 cssd::FillStyle
eFillStyle = cssd::FillStyle_NONE;
1923 if( aPointProp.
GetProperty( eFillStyle, aFillStyleName ) &&
1924 (eFillStyle == cssd::FillStyle_SOLID) &&
1927 aPointProp.
SetProperty( aColorName, xColorScheme->getColorByIndex( nPointIdx ) );
1934 Sequence< sal_Int32 > aPointIndexes;
1937 for(
const sal_Int32 nPointIndex : std::as_const(aPointIndexes) )
1939 if (nPointIndex >= nMaxPointCount)
1941 aPointPos.
mnPointIdx =
static_cast< sal_uInt16
>( nPointIndex );
1942 ScfPropertySet aPointProp = lclGetPointPropSet( xDataSeries, nPointIndex );
1944 xPointFmt->ConvertDataSeries( aPointProp, rTypeInfo );
1955 std::u16string_view rValueRole, sal_uInt16 nGroupIdx, sal_uInt16 nFormatIdx,
bool bCloseSymbol )
1959 if( xDataSource.is() )
1961 Reference< XDataSequence > xYValueSeq, xTitleSeq;
1964 const Sequence< Reference< XLabeledDataSequence > > aLabeledSeqVec = xDataSource->getDataSequences();
1965 for(
const Reference< XLabeledDataSequence >& rLabeledSeq : aLabeledSeqVec )
1967 Reference< XDataSequence > xTmpValueSeq = rLabeledSeq->getValues();
1972 xYValueSeq = xTmpValueSeq;
1973 xTitleSeq = rLabeledSeq->getLabel();
1978 bOk = xYValueSeq.is();
1985 mxTitleLink->ConvertDataSequence( xTitleSeq,
true );
1989 mxSeriesFmt->ConvertStockSeries( aSeriesProp, bCloseSymbol );
2031 if( xCategSeq.is() )
2063 Reference< XRegressionCurveContainer > xRegCurveCont( xDataSeries, UNO_QUERY );
2064 if( xRegCurveCont.is() )
2066 const Sequence< Reference< XRegressionCurve > > aRegCurveSeq = xRegCurveCont->getRegressionCurves();
2067 for(
const Reference< XRegressionCurve >& rRegCurve : aRegCurveSeq )
2070 if( xSeries && !xSeries->ConvertTrendLine( *
this, rRegCurve ) )
2080 if( rPropSet.
GetProperty( xErrorBar, rBarPropName ) && xErrorBar.is() )
2089 const OUString& rShowPropName,
sal_uInt8 nBarId )
2094 if( xSeries && !xSeries->ConvertErrorBar( *
this, rPropSet, nBarId ) )
2116 sal_Int32 nApiAxesSetIdx,
bool bSwappedAxesSet,
bool bHasXLabels )
2118 if( !xChartType.is() )
2130 Sequence< sal_Int32 > aInt32Seq;
2206 OSL_FAIL(
"XclExpChType::WriteBody - unknown chart type" );
2217 sal_Int32 nRotationY = 0;
2219 sal_Int32 nRotationX = 0;
2221 sal_Int32 nPerspective = 15;
2227 if( nRotationY < 0 ) nRotationY += 360;
2274 mxText->ConvertLegend( rPropSet );
2277 Any aRelPosAny, aRelSizeAny;
2280 cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_CUSTOM;
2282 if( aRelPosAny.has< RelativePosition >() || ((eApiExpand == cssc::ChartLegendExpansion_CUSTOM) && aRelSizeAny.has<
RelativeSize >()) )
2292 Reference< cssc::XChartDocument > xChart1Doc(
GetChartDocument(), UNO_QUERY_THROW );
2293 Reference< XShape > xChart1Legend( xChart1Doc->getLegend(), UNO_SET_THROW );
2298 css::awt::Point aLegendPos = xChart1Legend->getPosition();
2303 css::awt::Size aLegendSize = xChart1Legend->getSize();
2308 eApiExpand = cssc::ChartLegendExpansion_CUSTOM;
2315 mxFrame->SetAutoFlags(
false,
false );
2319 OSL_FAIL(
"XclExpChLegend::Convert - cannot get legend shape" );
2321 eApiExpand = cssc::ChartLegendExpansion_HIGH;
2326 cssc2::LegendPosition eApiPos = cssc2::LegendPosition_LINE_END;
2335 OSL_FAIL(
"XclExpChLegend::Convert - unrecognized legend position" );
2337 eApiExpand = cssc::ChartLegendExpansion_HIGH;
2351 lclSaveRecord( rStrm,
mxText );
2352 lclSaveRecord( rStrm,
mxFrame );
2381 rStrm << sal_uInt16(100);
2393 Reference< XDiagram >
const & xDiagram, Reference< XChartType >
const & xChartType,
2394 sal_Int32 nApiAxesSetIdx,
bool b3dChart,
bool bSwappedAxesSet,
bool bHasXLabels )
2397 maType.
Convert( xDiagram, xChartType, nApiAxesSetIdx, bSwappedAxesSet, bHasXLabels );
2401 cssc2::CurveStyle eCurveStyle;
2403 (eCurveStyle != cssc2::CurveStyle_LINES);
2418 Reference< XDiagram >
const & xDiagram, Reference< XChartType >
const & xChartType,
2419 sal_Int32 nGroupAxesSetIdx,
bool bPercent,
bool bConnectBars )
2421 Reference< XDataSeriesContainer > xSeriesCont( xChartType, UNO_QUERY );
2422 if( !xSeriesCont.is() )
2425 std::vector< Reference< XDataSeries > > aSeriesVec;
2428 const Sequence< Reference< XDataSeries > > aSeriesSeq = xSeriesCont->getDataSeries();
2429 for(
const Reference< XDataSeries >& rSeries : aSeriesSeq )
2432 sal_Int32 nSeriesAxesSetIdx(0);
2434 aSeriesVec.push_back( rSeries );
2438 if( aSeriesVec.empty() )
2443 cssc2::StackingDirection eStacking;
2445 eStacking = cssc2::StackingDirection_NO_STACKING;
2464 ::std::reverse( aSeriesVec.begin(), aSeriesVec.end() );
2468 if( (eStacking == cssc2::StackingDirection_NO_STACKING) &&
Is3dWallChart() )
2475 for(
const auto& rxSeries : aSeriesVec )
2487 for(
size_t nIdx = 0, nSize =
maSeries.
GetSize(); nIdx < nSize; ++nIdx )
2505 lclSaveRecord( rStrm,
mxUpBar );
2519 Reference< XDiagram >
const & xDiagram, Reference< XDataSeries >
const & xDataSeries )
2533 Reference< XChartType >
const & xChartType, Reference< XDataSeries >
const & xDataSeries )
2553 if( !(bHasOpen && bHasClose) )
2562 mxUpBar->Convert( aWhiteProp );
2571 std::u16string_view rValueRole,
bool bCloseSymbol )
2578 bOk = xSeries->ConvertStockSeries( xDataSeries,
2608 cssc::TimeIncrement aTimeIncrement;
2615 bool bAutoBase = !rScaleData.TimeIncrement.TimeResolution.has< cssc::TimeIncrement >();
2619 sal_Int32 nApiTimeUnit = 0;
2620 bool bValidBaseUnit = aTimeIncrement.TimeResolution >>= nApiTimeUnit;
2621 OSL_ENSURE( bValidBaseUnit,
"XclExpChLabelRange::Convert - cannot get base time unit" );
2642 double fOrigin = 0.0;
2643 if( !lclIsAutoAnyOrGetValue( fOrigin, rScaleData.Origin ) )
2647 if( (rScaleData.Orientation == cssc2::AxisOrientation_REVERSE) != bMirrorOrient )
2653 cssc::ChartAxisPosition eAxisPos = cssc::ChartAxisPosition_VALUE;
2655 double fCrossingPos = 1.0;
2661 case cssc::ChartAxisPosition_ZERO:
2662 case cssc::ChartAxisPosition_START:
2666 case cssc::ChartAxisPosition_END:
2669 case cssc::ChartAxisPosition_VALUE:
2721 bool bAutoMin = lclIsAutoAnyOrGetScaledValue(
maData.
mfMin, rScaleData.Minimum, bLogScale );
2723 bool bAutoMax = lclIsAutoAnyOrGetScaledValue(
maData.
mfMax, rScaleData.Maximum, bLogScale );
2727 bool bAutoCross = lclIsAutoAnyOrGetScaledValue(
maData.
mfCross, rScaleData.Origin, bLogScale );
2731 const IncrementData& rIncrementData = rScaleData.IncrementData;
2735 const Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements;
2741 const bool bAutoMinor = bLogScale || bAutoMajor || !rSubIncrementSeq.hasElements() ||
2742 lclIsAutoAnyOrGetValue( nCount, rSubIncrementSeq[ 0 ].IntervalCount ) || (nCount < 1) || (nCount == 5);
2754 cssc::ChartAxisPosition eAxisPos = cssc::ChartAxisPosition_VALUE;
2755 double fCrossingPos = 0.0;
2761 case cssc::ChartAxisPosition_ZERO:
2762 case cssc::ChartAxisPosition_START:
2765 case cssc::ChartAxisPosition_END:
2768 case cssc::ChartAxisPosition_VALUE:
2789 sal_uInt8 lclGetXclTickPos( sal_Int32 nApiTickmarks )
2791 using namespace cssc2::TickmarkStyle;
2810 sal_Int32 nApiTickmarks = 0;
2835 cssc::ChartAxisLabelPosition eApiLabelPos = cssc::ChartAxisLabelPosition_NEAR_AXIS;
2837 switch( eApiLabelPos )
2839 case cssc::ChartAxisLabelPosition_NEAR_AXIS:
2878 Reference< XAxis > lclGetApiAxis( Reference< XCoordinateSystem >
const & xCoordSystem,
2879 sal_Int32 nApiAxisDim, sal_Int32 nApiAxesSetIdx )
2881 Reference< XAxis > xAxis;
2882 if( (nApiAxisDim >= 0) && xCoordSystem.is() )
try
2884 xAxis = xCoordSystem->getAxisByDimension( nApiAxisDim, nApiAxesSetIdx );
2892 Reference< cssc::XAxis > lclGetApiChart1Axis( Reference< XChartDocument >
const & xChartDoc,
2893 sal_Int32 nApiAxisDim, sal_Int32 nApiAxesSetIdx )
2895 Reference< cssc::XAxis > xChart1Axis;
2898 Reference< cssc::XChartDocument > xChart1Doc( xChartDoc, UNO_QUERY_THROW );
2899 Reference< cssc::XAxisSupplier > xChart1AxisSupp( xChart1Doc->getDiagram(), UNO_QUERY_THROW );
2900 switch( nApiAxesSetIdx )
2903 xChart1Axis = xChart1AxisSupp->getAxis( nApiAxisDim );
2906 xChart1Axis = xChart1AxisSupp->getSecondaryAxis( nApiAxisDim );
2929 mxTick->SetFontColor( rColor, nColorId );
2935 mxTick->SetRotation( nRotation );
2939 Reference< cssc::XAxis >
const & xChart1Axis,
const XclChExtTypeInfo& rTypeInfo )
2965 if( aCrossingProp.
Is() )
2974 if( aCrossingProp.
Is() )
2989 sal_Int32 nApiNumFmt = 0;
2992 bool bLinkNumberFmtToSource =
false;
3007 Sequence< Reference< XPropertySet > > aSubGridPropSeq = xAxis->getSubGridProperties();
3008 if( aSubGridPropSeq.hasElements() )
3018 if( !xDiagram.is() )
3046 lclSaveRecord( rStrm,
mxTick );
3047 lclSaveRecord( rStrm,
mxFont );
3080 sal_uInt16 nGroupIdx = nFirstGroupIdx;
3081 Reference< XCoordinateSystemContainer > xCoordSysCont( xDiagram, UNO_QUERY );
3082 if( xCoordSysCont.is() )
3084 Sequence< Reference< XCoordinateSystem > > aCoordSysSeq = xCoordSysCont->getCoordinateSystems();
3085 if( aCoordSysSeq.hasElements() )
3089 Reference< XCoordinateSystem > xCoordSystem = aCoordSysSeq[ 0 ];
3093 bool b3dChart = xCoordSystem.is() && (xCoordSystem->getDimension() == 3);
3097 Reference< XAxis > xApiYAxis = lclGetApiAxis( xCoordSystem,
EXC_CHART_AXIS_Y, nApiAxesSetIdx );
3098 bool bPercent = xApiYAxis.is() && (xApiYAxis->getScaleData().AxisType ==
ApiAxisType::PERCENT);
3109 Reference< XAxis > xApiXAxis = lclGetApiAxis( xCoordSystem,
EXC_CHART_AXIS_X, nApiAxesSetIdx );
3115 Reference< XChartTypeContainer > xChartTypeCont( xCoordSystem, UNO_QUERY );
3116 if( xChartTypeCont.is() )
3118 const Sequence< Reference< XChartType > > aChartTypeSeq = xChartTypeCont->getChartTypes();
3119 for(
const Reference< XChartType >& rChartType : aChartTypeSeq )
3122 xTypeGroup->ConvertType( xDiagram, rChartType, nApiAxesSetIdx, b3dChart, bSwappedAxesSet, bHasXLabels );
3127 if( xLastGroup && !(xTypeGroup->IsCombinable2d() && xLastGroup->IsCombinable2d()) )
3129 xLastGroup->ConvertSeries( xDiagram, rChartType, nApiAxesSetIdx, bPercent, bConnectBars );
3133 xTypeGroup->ConvertSeries( xDiagram, rChartType, nApiAxesSetIdx, bPercent, bConnectBars );
3134 if( xTypeGroup->IsValidGroup() )
3152 if( pGroup->Is3dDeepChart() )
3159 const ScaleData aScaleData = xApiXAxis->getScaleData();
3167 Reference< XLegend > xLegend = xDiagram->getLegend();
3171 pGroup->ConvertLegend( aLegendProp );
3182 if( xTypeGroup && xTypeGroup->Is3dWallChart() )
3186 mxXAxis->ConvertWall( xDiagram );
3188 mxYAxis->ConvertWall( xDiagram );
3201 Reference< cssc::XChartDocument > xChart1Doc(
GetChartDocument(), UNO_QUERY_THROW );
3202 Reference< cssc::XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW );
3204 if( !xPositioning->isAutomaticDiagramPositioning() )
3213 mxFramePos->GetFramePosData().maRect = bPieChart ?
maData.
maRect :
3227 return xTypeGroup && xTypeGroup->Is3dChart();
3233 lclSaveRecord( rStrm,
mxXAxis );
3234 lclSaveRecord( rStrm,
mxYAxis );
3235 lclSaveRecord( rStrm,
mxZAxis );
3260 Reference< XCoordinateSystem >
const & xCoordSystem,
const XclChExtTypeInfo& rTypeInfo,
3261 sal_Int32 nCrossingAxisDim )
3265 sal_Int32 nApiAxisDim = rxChAxis->GetApiAxisDimension();
3267 Reference< XAxis > xAxis = lclGetApiAxis( xCoordSystem, nApiAxisDim, nApiAxesSetIdx );
3268 Reference< XAxis > xCrossingAxis = lclGetApiAxis( xCoordSystem, nCrossingAxisDim, nApiAxesSetIdx );
3269 Reference< cssc::XAxis > xChart1Axis = lclGetApiChart1Axis(
GetChartDocument(), nApiAxisDim, nApiAxesSetIdx );
3270 rxChAxis->Convert( xAxis, xCrossingAxis, xChart1Axis, rTypeInfo );
3273 Reference< XTitled > xTitled( xAxis, UNO_QUERY );
3274 rxChAxisTitle = lclCreateTitle(
GetChRoot(), xTitled, nTitleTarget );
3285 OUString& rSubTitle)
3287 Reference< css::chart::XChartDocument > xChartDoc1(xChartDoc, UNO_QUERY);
3288 if (!xChartDoc1.is())
3296 Any any = xProp->getPropertyValue(
"String");
3302 Reference< XChartDocument >
const & xChartDoc,
const tools::Rectangle& rChartRect ) :
3320 if( !xChartDoc.is() )
3323 Reference< XDiagram > xDiagram = xChartDoc->getFirstDiagram();
3338 Reference< XTitled > xTitled( xChartDoc, UNO_QUERY );
3342 !aSubTitle.isEmpty() ? &aSubTitle : nullptr );
3345 sal_uInt16 nFreeGroupIdx =
mxPrimAxesSet->Convert( xDiagram, 0 );
3347 mxSecnAxesSet->Convert( xDiagram, nFreeGroupIdx );
3351 sal_Int32 nMissingValues = 0;
3354 using namespace cssc::MissingValueTreatment;
3355 switch( nMissingValues )
3370 sal_uInt16 nSeriesIdx =
static_cast< sal_uInt16
>(
maSeries.
GetSize() );
3401 lclSaveRecord( rStrm,
mxFrame );
3412 sal_uInt16 nUsedAxesSets =
mxSecnAxesSet->IsValidAxesSet() ? 2 : 1;
3419 lclSaveRecord( rStrm,
mxTitle );
3429 const Reference< XModel >& rxModel,
const Size& rChartSize ) :
3436 Reference< XShapes > xShapes;
3471 Reference< XChartDocument > xChartDoc( xModel, UNO_QUERY );
void SetValue(const Type &rValue)
Sets a new record value.
virtual void WriteSubRecords(XclExpStream &rStrm) override
Writes all embedded records.
XclChPropertyMode
Specifies the type of a formatting.
const sal_uInt16 EXC_CHSERGROUP_NONE
SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator > & GetBreakIterator()
XclFontPropSetHelper & GetFontPropSetHelper() const
Returns the property set helper for fonts.
const sal_uInt8 EXC_CHPROPS_EMPTY_SKIP
Manual plot area layout in CHFRAMEPOS record.
formula::FormulaToken * AddDoubleReference(const ScComplexRefData &rRef)
This class stores an unformatted or formatted string for Excel export.
XclExpChAxis(const XclExpChRoot &rRoot, sal_uInt16 nAxisType)
const sal_uInt16 EXC_CHDATERANGE_AUTOMAJOR
XclExpChTextRef mxXAxisTitle
The Z axis (CHAXIS group).
sal_uInt16 mnValueCount
Number of category entries.
XclExpChFrLabelProps(const XclExpChRoot &rRoot)
const sal_uInt16 EXC_ID_CHPICFORMAT
true = 2d wall/gridlines, no floor.
virtual void Save(XclExpStream &rStrm) override
Writes the complete record list.
XclExpChSeriesRef CreateSeries()
Creates, registers and returns a new data series object.
const sal_uInt16 EXC_ID_CHLINE
const sal_uInt16 EXC_CHTEXT_POS_DEFAULT
Data point caption is category name.
const XclChTypeInfo & GetTypeInfo() const
Returns the chart type info struct for the contained chart type.
const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXESSET
formula::FormulaToken * AddExternalDoubleReference(sal_uInt16 nFileId, const svl::SharedString &rTabName, const ScComplexRefData &rRef)
const sal_Int32 EXC_CHART_TOTALUNITS
API secondary axes set index.
virtual void WriteSubRecords(XclExpStream &rStrm) override
Writes all embedded records.
XclExpChFrameRef mxPlotFrame
The Z axis title (CHTEXT group).
const XclExpChRoot & GetChRoot() const
Returns this root instance - for code readability in derived classes.
XclChFrBlockVector maUnwrittenFrBlocks
Stack of future record levels already written out.
const sal_uInt8 EXC_CHTICK_OUTSIDE
const sal_uInt16 EXC_ID_CHBAR
Text boxes (titles, data point labels).
const sal_uInt8 EXC_CH3DDATAFORMAT_STRAIGHT
Circular base.
XclExpChGroupBase(const XclExpChRoot &rRoot, sal_uInt16 nFrType, sal_uInt16 nRecId, std::size_t nRecSize=0)
XclExpChDropBarRef mxDownBar
White dropbars (CHDROPBAR group).
const sal_uInt16 EXC_CHAXESSET_PRIMARY
sal_uInt8 mnEmptyMode
Additional flags.
constexpr OUStringLiteral EXC_CHPROP_SHOWHIGHLOW
XclExpChSourceLinkRef mxSrcLink
Relative text frame position (CHFRAMEPOS record).
void RegisterFutureRecBlock(const XclChFrBlock &rFrBlock)
Called from XclExpChGroupBase::Save, registers a new future record level.
XclExpChFramePosRef mxFramePos
Contents of the CHAXESSET record.
const sal_uInt16 EXC_ID_CHAREAFORMAT
sal_uInt8 mnBackMode
Position of labels relative to axis.
constexpr OUStringLiteral EXC_CHPROP_LABELPOSITION
Base class for complex chart classes, provides access to other components of the chart.
const sal_uInt16 EXC_ID_CHSERIES
const sal_uInt16 EXC_ID_CHFRAMEPOS
void RegisterFutureRecBlock(const XclChFrBlock &rFrBlock)
Registers a new future record level.
void SetStacked(bool bPercent)
Sets stacking mode (standard or percent) for the series in this chart type group. ...
void CreateErrorBars(const ScfPropertySet &rPropSet, const OUString &rBarPropName, sal_uInt8 nPosBarId, sal_uInt8 nNegBarId)
Tries to create positive and negative error bar series objects (called at parent series).
XclChLabelRange maLabelData
const sal_Int32 EXC_CHART_AXESSET_SECONDARY
API primary axes set index.
constexpr OUStringLiteral EXC_CHPROP_MISSINGVALUETREATMENT
XclTokenArrayRef mxLinkFmla
Contents of the CHSOURCELINK record.
XclExpChSourceLinkRef mxValueLink
Link data for series title.
bool ConvertDataSeries(css::uno::Reference< css::chart2::XDiagram > const &xDiagram, css::uno::Reference< css::chart2::XDataSeries > const &xDataSeries, const XclChExtTypeInfo &rTypeInfo, sal_uInt16 nGroupIdx, sal_uInt16 nFormatIdx)
Converts the passed data series (source links and formatting).
Stores global data needed in various classes of the Chart export filter.
const sal_uInt8 EXC_CHSERERR_YPLUS
Contains all page (print) settings records for a chart object.
const sal_uInt16 EXC_ID_CHFRBLOCKBEGIN
const sal_uInt16 EXC_CHTEXT_POS_AUTO
const sal_uInt8 EXC_CHSERERR_CUSTOM
Represents a complete substream of records enclosed into a pair of BOF/EOF records.
This class is used to export Excel record streams.
const sal_uInt8 EXC_CHSERERR_STDERR
Contains information for a chart type.
sal_uInt16 GetAxisType() const
Returns the type of this axis.
XclChFrameType
Enumerates different types to handle missing frame objects.
const sal_uInt8 EXC_CHSRCLINK_WORKSHEET
bool Convert(XclExpChSourceLink &rValueLink, sal_uInt16 &rnValueCount, const ScfPropertySet &rPropSet)
Converts the passed error bar settings, returns true if error bar type is supported.
Background area of a cell.
const sal_uInt16 EXC_CHLEGEND_STACKED
void FinalizeFutureRecBlock(XclExpStream &rStrm)
Called from XclExpChGroupBase::Save, finalizes the current future record level.
constexpr OUStringLiteral EXC_CHPROP_CROSSOVERPOSITION
virtual void Save(XclExpStream &rStrm) override
Saves the header record.
sal_Int32 mnDefaultLabelPos
Mode for varying point colors.
const sal_uInt16 EXC_CHFRBLOCK_TYPE_LEGEND
const sal_uInt16 EXC_CHDATERANGE_DAYS
Recognize date/text automatically.
const sal_uInt16 EXC_ID_CHPLOTFRAME
sal_uInt16 mnBackMode
Vertical alignment.
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).
Record identifier and empty flags field.
void ConvertLineFormat(XclChLineFormat &rLineFmt, const ScfPropertySet &rPropSet, XclChPropertyMode ePropMode) const
Reads all line properties from the passed property set.
const sal_uInt8 EXC_CH3DDATAFORMAT_CIRC
Rectangular base.
void AppendRecord(RecType *pRec)
Appends a record to the list.
bool Convert(css::uno::Reference< css::chart2::XRegressionCurve > const &xRegCurve, sal_uInt16 nSeriesIdx)
Converts the passed trend line, returns true if trend line type is supported.
XclExpChType maType
Contents of the CHTYPEGROUP record.
virtual bool HasSubRecords() const
Derived classes return whether there are any records embedded in this group.
XclExpChLabelRange(const XclExpChRoot &rRoot)
const sal_uInt8 EXC_CHTICK_INSIDE
const sal_uInt16 EXC_CHTEXT_AUTOGEN
Label text generated from chart data.
const sal_uInt16 EXC_ID_CHFORMATRUNS
XclExpChSerErrorBar(const XclExpChRoot &rRoot, sal_uInt8 nBarType)
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.
constexpr OUStringLiteral EXC_CHPROP_ANCHORPOSITION
Represents the CHTYPEGROUP record group describing a group of series.
virtual void WriteSubRecords(XclExpStream &rStrm) override
Writes all embedded records.
const sal_uInt8 EXC_CHSRCLINK_DIRECTLY
Bar charts (horizontal or vertical).
const sal_uInt16 EXC_CHATTLABEL_SHOWPERCENT
XclExpChChart(const XclExpRoot &rRoot, css::uno::Reference< css::chart2::XChartDocument > const &xChartDoc, const tools::Rectangle &rChartRect)
XclExpRecordList< XclExpChText > maLabels
Chart title (CHTEXT group).
std::map< sal_uInt16, std::unique_ptr< XclExpChLineFormat > > m_ChartLines
Black dropbars (CHDROPBAR group).
XclExpChAxesSet(const XclExpChRoot &rRoot, sal_uInt16 nAxesSetId)
const sal_uInt8 EXC_CHSRCLINK_TITLE
bool IsSystemColor(const Color &rColor, sal_uInt16 nSysColorIdx) const
Returns true, if the passed color equals to the specified system color.
sal_Int32 CalcChartYFromHmm(sal_Int32 nPosY) const
Converts the passed vertical coordinate from 1/100 mm to Excel chart units.
virtual ~XclExpChRoot() override
virtual void SetFont(XclExpChFontRef xFont, const Color &rColor, sal_uInt32 nColorId) override
Sets font color and color identifier to internal data structures.
void SetDefaultFrameBase(const XclExpChRoot &rRoot, XclChFrameType eDefFrameType, bool bIsFrame)
Sets the frame formatting to the specified default type.
virtual void SetFont(XclExpChFontRef xFont, const Color &rColor, sal_uInt32 nColorId) override
Sets font color and color identifier to internal data structures.
const sal_uInt16 EXC_ID_CHTEXT
No default text available.
const sal_uInt16 EXC_CHFRAMEPOS_CHARTSIZE
Reference< XFrame > xFrame
const sal_uInt8 EXC_CHTEXT_ALIGN_TOPLEFT
sal_uInt16 Insert(const XclFontData &rFontData, XclExpColorType eColorType, bool bAppFont=false)
Inserts a new font with the passed font data into the buffer if not present.
XclExpChFrameRef mxWallFrame
Minor grid line format (CHLINEFORMAT record).
double mfForecastBack
Counter to forecast forward.
const sal_uInt16 EXC_CHAXISLINE_AXISLINE
const sal_uInt16 EXC_CHVALUERANGE_MAXCROSS
Axis direction reversed.
High/low lines in stock charts.
const sal_uInt16 EXC_CHTEXT_POS_MOVED
constexpr OUStringLiteral EXC_CHPROP_EXPTIMEINCREMENT
virtual void SetRotation(sal_uInt16 nRotation) override
Sets text rotation to internal data structures.
const sal_uInt16 EXC_CHOBJLINK_TITLE
No link target.
const sal_uInt8 EXC_CHSERTREND_EXPONENTIAL
If order is 1, trend line is linear.
const sal_uInt16 EXC_CHBAR_HORIZONTAL
static void AppendString(XclExpString &rXclString, const XclExpRoot &rRoot, std::u16string_view rString)
Appends an unformatted string to an Excel string object.
const sal_uInt16 EXC_CHTEXT_POS_AXIS
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
Base class for chart future records.
const sal_uInt16 EXC_ID_CHCHART
void CreateDataSeries(css::uno::Reference< css::chart2::XDiagram > const &xDiagram, css::uno::Reference< css::chart2::XDataSeries > const &xDataSeries)
Creates all data series of any chart type except stock charts.
constexpr OUStringLiteral EXC_CHPROP_ROTATIONHORIZONTAL
This struct helps reading and writing Excel fonts.
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
bool CreateStockSeries(css::uno::Reference< css::chart2::XDataSeries > const &xDataSeries, std::u16string_view rValueRole, bool bCloseSymbol)
Creates a single data series of a stock chart.
std::unique_ptr< ScTokenArray > CompileString(const OUString &rFormula)
Tokenize formula expression string into an array of tokens.
Represents the CHDROPBAR record group describing pos/neg bars in line charts.
constexpr OUStringLiteral PERCENT(u"Percent")
constexpr OUStringLiteral EXC_CHPROP_CURVESTYLE
sal_uInt16 mnFlags
Crossing position of other axis.
const sal_uInt16 EXC_CHCHARTLINE_CONNECT
Hi-lo lines.
Base class for chart record groups.
const sal_uInt16 EXC_CHATTLABEL_SHOWVALUE
constexpr OUStringLiteral EXC_CHPROP_COLOR
XclExpFormulaCompiler & GetFormulaCompiler() const
Returns the formula compiler to produce formula token arrays.
sal_uInt16 mnRotation
Additional flags.
constexpr OUStringLiteral EXC_CHPROP_OVERLAPSEQ
XclChFrBlockVector maWrittenFrBlocks
The chart data object.
sal_uInt8 mnShowEquation
Polynomial order or moving average counter.
XclExpStringRef mxString
Formula with link to source data.
const sal_uInt16 EXC_CHLEGEND_AUTOSERIES
const sal_uInt16 EXC_ID_CHRADARLINE
constexpr OUStringLiteral EXC_CHPROP_SHOWNEGATIVEERROR
XclExpChFrLabelPropsRef mxLabelProps
Link target for this text object.
sal_uInt64 Seek(sal_uInt64 nPos)
const sal_uInt16 EXC_CHRADAR_AXISLABELS
virtual void WriteSubRecords(XclExpStream &rStrm) override
Writes all embedded records.
const sal_uInt16 EXC_CHTEXT_POS_ABOVE
bool GetBoolProperty(const OUString &rPropName) const
Gets the specified Boolean property from the property set.
XclExpChTextRef mxYAxisTitle
The X axis title (CHTEXT group).
XclExpChSeriesList maSeries
Extended chart type info.
XclExpChart(const XclExpRoot &rRoot, css::uno::Reference< css::frame::XModel > const &xModel, const tools::Rectangle &rChartRect)
const sal_uInt16 EXC_ID_CHMARKERFORMAT
void Convert(const ScfPropertySet &rPropSet)
Converts all legend settings from the passed property set.
sal_uInt8 mnLabelPos
Type of tick marks of minor grid.
const sal_uInt8 EXC_CHPROPS_EMPTY_INTERPOLATE
Plot empty values as zero.
const sal_uInt16 EXC_CHFRBLOCK_TYPE_TEXT
const sal_uInt16 EXC_ID_CH3DDATAFORMAT
Data point connector line.
XclExpChartDrawing(const XclExpRoot &rRoot, const css::uno::Reference< css::frame::XModel > &rxModel, const Size &rChartSize)
sal_uInt16 mnParentIdx
0-based series index.
::std::vector< XclChFrBlock > XclChFrBlockVector
XclExpChFrameRef mxFrame
List of series data (CHSERIES groups).
virtual void Save(XclExpStream &rStrm) override
Writes the entire record group.
constexpr OUStringLiteral EXC_CHPROP_STARTINGANGLE
const sal_uInt16 EXC_CHVALUERANGE_LOGSCALE
constexpr OUStringLiteral EXC_CHPROP_MAJORTICKS
const sal_uInt8 EXC_CHLEGEND_TOP
const sal_uInt16 EXC_CHATTLABEL_SHOWCATEGPERC
sal_uInt16 GetGroupIdx() const
Returns the index of this chart type group format.
std::shared_ptr< T > make_shared(Args &&...args)
sal_uInt16 mnMaxDate
Minimum value on axis.
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
sal_uInt16 Convert(css::uno::Reference< css::chart2::XDiagram > const &xDiagram, sal_uInt16 nFirstGroupIdx)
Converts the passed diagram to chart record data.
constexpr OUStringLiteral EXC_CHPROP_ROLE
const sal_uInt16 EXC_ID_CHPIEFORMAT
constexpr OUStringLiteral EXC_CHPROP_MINORTICKS
const sal_uInt16 EXC_CHSERIES_INVALID
Maximum valid series index.
XclExpChType(const XclExpChRoot &rRoot)
XclExpChObjectLink(sal_uInt16 nLinkTarget, const XclChDataPointPos &rPointPos)
sal_Int32 mnY
X position of the object in 1/4000 of chart width.
XclExpChSourceLinkRef mxBubbleLink
Link data for series category names.
virtual ~XclExpChGroupBase() override
Missing frame represents automatic formatting.
constexpr OUStringLiteral EXC_CHPROP_CURVENAME
XclExpChValueRangeRef mxValueRange
Category scaling (CHLABELRANGE record).
XclExpChDataFormatRef mxSeriesFmt
Link data for series bubble sizes.
const sal_uInt16 EXC_CHCHART3D_REAL3D
sal_uInt16 ConvertFont(const ScfPropertySet &rPropSet, sal_Int16 nScript) const
Reads font properties from the passed property set.
constexpr OUStringLiteral EXC_CHPROP_SHOWCORRELATION
const sal_uInt16 EXC_CHTICK_AUTOCOLOR
void ConvertRotationBase(const ScfPropertySet &rPropSet, bool bSupportsStacked)
Converts rotation settings, calls virtual function SetRotation().
void ConvertFontBase(const XclExpChRoot &rRoot, sal_uInt16 nFontIdx)
Creates a CHFONT record from the passed font index, calls virtual function SetFont().
sal_uInt8 mnBarType
Number of custom error values.
XclExpChRootData(XclExpChChart &rChartData)
Stack of future record levels not yet written out.
sal_uInt16 mnTarget
Position of the data point.
sal_uInt16 mnMinorStep
Time unit for major step.
OUString GetStringProperty(const OUString &rPropName) const
Gets the specified Boolean property from the property set.
const sal_uInt16 EXC_CHTEXT_POS_OUTSIDE
constexpr OUStringLiteral EXC_CHPROP_ROTATIONVERTICAL
XclExpChDataFormatRef mxDataFmt
Contents of the CHSERTRENDLINE record.
const sal_uInt16 EXC_ID_CHFONT
virtual ~XclExpChFontBase()
sal_uInt16 mnValueType
Data type for category entries.
const sal_uInt16 EXC_FORMAT_NOTFOUND
constexpr OUStringLiteral EXC_CHPROP_EXPANSION
const XclExpFont * GetFont(sal_uInt16 nXclFont) const
Returns the specified font from font list.
XclFutureRecType
Enumerates different header types of future records.
sal_uInt16 GetRecId() const
Returns the current record ID.
sal_Int32 mnHeight
Width of the object in 1/4000 of chart width.
const sal_uInt16 EXC_ID_CHAXESSET
XclExpChFramePosRef mxFramePos
Contents of the CHTEXT record.
constexpr OUStringLiteral EXC_CHPROP_STACKINGDIR
const sal_uInt16 EXC_CHVALUERANGE_AUTOMAX
const sal_uInt16 EXC_CHOBJLINK_ZAXIS
Data series/point.
void SetDataLabel(XclExpChTextRef const &xText)
Stores a CHTEXT group that describes a data point label.
XclExpChFutureRecordBase(const XclExpChRoot &rRoot, XclFutureRecType eRecType, sal_uInt16 nRecId, std::size_t nRecSize)
constexpr tools::Long Width() const
sal_uInt32 mnTextColorId
Extended data label properties (CHFRLABELPROPS record).
void Convert(const ScfPropertySet &rPropSet)
Converts and writes the contained frame data to the passed property set.
const sal_uInt16 EXC_ID_CHDROPBAR
constexpr OUStringLiteral EXC_CHPROP_RELATIVESIZE
XclExpChSourceLinkRef mxCategLink
Link data for series values.
XclExpChTextRef mxTitle
Secondary axes set (CHAXESSET group).
XclExpChAxesSetRef mxPrimAxesSet
Chart properties (CHPROPERTIES record).
const sal_uInt16 EXC_CHFRBLOCK_TYPE_CHART
sal_uInt16 mnFlags
Separator between label values.
constexpr OUStringLiteral EXC_CHPROP_NUMBERFORMAT
Access to global data from other classes.
constexpr OUStringLiteral EXC_CHPROP_INTERCEPT_VALUE
const sal_uInt16 EXC_FONT_APP
Extended chart type information and access functions.
sal_uInt16 mnFlags
Background mode: transparent, opaque.
sal_uInt16 mnMajorStep
Maximum value on axis.
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
const sal_uInt16 EXC_ID_CHTYPEGROUP
Additional data label settings in the future record CHFRLABELPROPS.
RecType * GetLastRecord() const
Returns reference to the last existing record or empty reference, if list is empty.
sal_uInt16 mnPieHole
Rotation angle of first pie (CHPIE).
void Convert(const ScfPropertySet &rPropSet, bool bShowCateg, bool bShowValue, bool bShowPercent, bool bShowBubble)
Converts separator and the passed data label flags.
XclExpChDropBarRef mxUpBar
Chart legend (CHLEGEND group).
PropertiesInfo aProperties
constexpr OUStringLiteral EXC_CHPROP_EXTRAPOLATE_FORWARD
const sal_uInt16 EXC_FONT_NOTFOUND
Application font index.
XclChPropSetHelper & GetChartPropSetHelper() const
Returns the property set helper for the chart filters.
std::shared_ptr< XclExpObjectManager > mxObjMgr
const sal_uInt16 EXC_ID_CHAXIS
Connector lines in stacked bar charts.
Series formatting in a chart supporting area formatting.
constexpr OUStringLiteral EXC_CHPROP_VARYCOLORSBY
constexpr OUStringLiteral EXC_CHPROP_RIGHTANGLEDAXES
const sal_uInt16 EXC_CHDATAFORMAT_MAXPOINTCOUNT
sal_uInt16 GetMonth() const
const sal_uInt16 EXC_ID_CHDATAFORMAT
Invalid series index (for internal use).
void ConvertTrendLineEquation(const ScfPropertySet &rPropSet, const XclChDataPointPos &rPointPos)
Converts all settings of the passed trend line equation box.
Omit flags on empty string (default: read/write always). BIFF8 only.
const sal_uInt16 EXC_CHPROPS_MANPLOTAREA
Do not resize chart with window.
const sal_uInt16 EXC_ID_CHESCHERFORMAT
const sal_uInt16 EXC_CHDATERANGE_AUTODATE
Other axis crosses at own maximum.
constexpr OUStringLiteral EXC_CHPROP_EXTRAPOLATE_BACKWARD
XclChObjectType meObjType
sal_uInt8 mnSourceType
Type of the error bar (X/Y).
sal_uInt16 mnFlags
Space between series.
sal_uInt16 mnNumFmtIdx
Wall/floor format (sub records of CHFRAME group).
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
virtual ~XclExpChartDrawing() override
sal_uInt16 mnRecId
Chart type category this type belongs to.
const sal_uInt8 EXC_CHSERTREND_LOGARITHMIC
Represents the CHLEGEND record group describing the chart legend.
bool mbReverseSeries
true = Series can be stacked on each other.
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
const sal_uInt16 EXC_ID_CHFRLABELPROPS
const sal_uInt8 EXC_CHLEGEND_LEFT
const sal_uInt16 EXC_ID_CHOBJECTLINK
::std::vector< XclFormatRun > XclFormatRunVec
A vector with all formatting runs for a rich-string.
sal_uInt16 GetFreeFormatIdx() const
Returns an unused format index to be used for the next created series.
sal_uInt8 mnDockMode
Position of the legend.
Represents the CHCHART3D record that contains 3D view settings.
const sal_uInt8 EXC_CHSRCLINK_DEFAULT
void Convert(const ScfPropertySet &rPropSet, const XclChExtTypeInfo &rTypeInfo, sal_uInt16 nAxisType)
Converts axis tick mark settings.
const sal_uInt16 EXC_ID_CHATTACHEDLABEL
const sal_uInt16 EXC_CHFRBLOCK_TEXT_AXISTITLE
const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXIS
constexpr OUStringLiteral EXC_CHPROP_RELATIVEPOSITION
const sal_Int32 EXC_CHART_AXIS_Y
API X axis index.
sal_uInt32 InsertColor(const Color &rColor, XclExpColorType eType, sal_uInt16 nAutoDefault=0)
Inserts the color into the list and updates weighting.
constexpr OUStringLiteral EXC_CHPROP_GEOMETRY3D
XclExpChLegendRef mxLegend
3D settings (CHCHART3D record).
sal_uInt8 mnLineEnd
Type of source values.
bool IsSeriesFrameFormat() const
Returns true, if this chart type supports area formatting for its series.
XclExpChSerErrorBarRef mxErrorBar
Trend line settings (CHSERTRENDLINE record).
const sal_uInt16 EXC_CHTEXT_SHOWCATEGPERC
Automatic text background mode (transparent/opaque).
constexpr OUStringLiteral EXC_CHPROP_ATTRIBDATAPOINTS
sal_uInt8 mnVAlign
Horizontal alignment.
bool ReadAreaProperties(XclChAreaFormat &rAreaFmt, const ScfPropertySet &rPropSet, XclChPropertyMode ePropMode)
Reads solid area properties from the passed property set.
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
XclExpChFrameRef mxFrame
Legend text format (CHTEXT group).
void Convert(const css::chart2::ScaleData &rScaleData, const ScfPropertySet &rChart1Axis, bool bMirrorOrient)
Converts category axis scaling settings.
OUString GetServiceName() const
Returns the service name provided via the XServiceName interface, or an empty string on error...
bool IsDeleteable() const
Returns true, if the frame object can be deleted because it contains default formats.
const sal_uInt16 EXC_ID_CHFRBLOCKEND
constexpr OUStringLiteral EXC_CHPROP_ROLE_XVALUES
XclChRectangle CalcChartRectFromHmm(const css::awt::Rectangle &rRect) const
Converts the passed rectangle from 1/100 mm to Excel chart units.
Contains the type and context of a block of future records which are guarded by CHFRBLOCKBEGIN and CH...
const sal_uInt8 EXC_CHLEGEND_NOTDOCKED
const sal_uInt16 EXC_CHSCATTER_BUBBLES
Bubble width refers to value.
bool mbTicksBetweenCateg
true = Insert unstacked series in reverse order.
const sal_uInt8 EXC_CHTICK_HIGH
Below diagram/right of diagram.
constexpr OUStringLiteral EXC_CHPROP_OFFSET
sal_uInt16 mnTickFreq
Frequency of labels.
AxisType
The method of calculating the axis min or max value.
void ConvertString(const OUString &aString)
constexpr OUStringLiteral EXC_CHPROP_POSITIVEERROR
double mfMax
Minimum value on axis.
sal_Int16 GetYear() const
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
sal_uInt32 mnTextColorId
Contents of the CHTICK record.
sal_uInt16 mnTLMode
Object dependent position data.
XclChObjectType
Enumerates different object types for specific automatic formatting behaviour.
const sal_uInt16 EXC_CHDATERANGE_AUTOMIN
const sal_uInt16 EXC_ID_CHSERIESFORMAT
Line end: t-shape.
constexpr OUStringLiteral EXC_CHPROP_PERSPECTIVE
const sal_uInt16 EXC_ID_CHSERTRENDLINE
void ConvertCategSequence(css::uno::Reference< css::chart2::data::XLabeledDataSequence > const &xCategSeq)
Converts and inserts category ranges for all inserted series.
XclExpChChart & mrChartData
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &stream, const ParamIfsResult &rRes)
Radar charts (linear or filled).
Represents the CHSERIES record group describing a data series in a chart.
constexpr OUStringLiteral EXC_CHPROP_WEIGHT
XclExpChSeriesList maSeries
Position of the chart on the sheet (CHCHART record).
double mfMinorStep
Distance for major grid lines.
const sal_uInt16 EXC_ID_CHCHARTLINE
Stores all data of an Excel font and provides export of FONT records.
XclExpRecordList< XclExpChDataFormat > maPointFmts
CHDATAFORMAT group for series format.
const sal_uInt16 EXC_ID_CHAREA
virtual void WriteSubRecords(XclExpStream &rStrm) override
Writes all embedded records.
MS Excel 5.0, MS Excel 7.0 (95)
A record with a single value of type Type.
void ReadLineProperties(XclChLineFormat &rLineFmt, XclChObjectTable &rDashTable, const ScfPropertySet &rPropSet, XclChPropertyMode ePropMode)
Reads all line properties from the passed property set.
const sal_uInt8 EXC_CHSERERR_YMINUS
virtual void Save(XclExpStream &rStrm) override
Writes the CHSOURCELINK record and optionally a CHSTRING record with explicit string data...
const sal_uInt16 EXC_CHFRBLOCK_TEXT_TITLE
For internal use only.
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
void CreateAllStockSeries(css::uno::Reference< css::chart2::XChartType > const &xChartType, css::uno::Reference< css::chart2::XDataSeries > const &xDataSeries)
Creates all data series of a stock chart.
bool IsDefault() const
Returns true, if the frame object contains default formats.
const sal_uInt16 EXC_CHCHARTLINE_HILO
Drop lines.
const sal_uInt16 EXC_CHLINEFORMAT_NONE
sal_uInt16 GetColorIndex(sal_uInt32 nColorId) const
Returns the Excel palette index of the color with passed color ID.
const sal_uInt16 EXC_CHFRBLOCK_TEXT_DATALABEL
const sal_uInt16 EXC_ID_PROTECT
const sal_uInt16 EXC_ID_CHSOURCELINK
constexpr OUStringLiteral EXC_CHPROP_ERRORBARY
XclExpChAxesSetRef mxSecnAxesSet
Primary axes set (CHAXESSET group).
const sal_uInt16 EXC_CHAXESSET_SECONDARY
XclExpChTick(const XclExpChRoot &rRoot)
DateTime GetDateTimeFromDouble(double fValue) const
Converts a floating-point value to a date/time value.
const sal_uInt8 EXC_CHLEGEND_RIGHT
Represents the CHSERTRENDLINE record containing settings for a trend line.
const sal_uInt16 EXC_CHTYPEGROUP_VARIEDCOLORS
void WriteFrameRecords(XclExpStream &rStrm)
Writes all contained frame records to the passed stream.
const sal_uInt16 EXC_CHFRAME_AUTOSIZE
const sal_uInt16 EXC_CHLINE_STACKED
void SetManualPlotArea()
Sets the plot area position and size to manual mode.
void InitializeFutureRecBlock(XclExpStream &rStrm)
Called from XclExpChFutureRecordBase::Save, Initializes the current future record level...
Floor formatting in 3d charts.
const sal_uInt16 EXC_ID_CHDATERANGE
const XclChExtTypeInfo & GetTypeInfo() const
Returns the chart type info struct for the contained chart type.
sal_uInt16 Insert(sal_uInt32 nScNumFmt)
Inserts a number format into the format buffer.
constexpr OUStringLiteral EXC_CHPROP_ROLE_CLOSEVALUES
void SetFlag3D(bool bVal)
const sal_uInt16 EXC_CHTEXT_SHOWVALUE
Legend symbol for data point caption.
void ConvertFrameBase(const XclExpChRoot &rRoot, const ScfPropertySet &rPropSet, XclChObjectType eObjType)
Converts frame formatting properties from the passed property set.
const sal_uInt16 EXC_CHDATERANGE_YEARS
#define STREAM_SEEK_TO_BEGIN
XclExpChSerTrendLine(const XclExpChRoot &rRoot)
const sal_uInt16 EXC_CHFRLABELPROPS_SHOWBUBBLE
sal_uInt16 mnSeriesIdx
Chart type group (CHTYPEGROUP group) this series is assigned to.
const sal_uInt16 EXC_COLOR_CHWINDOWTEXT
System button background color (face color).
const sal_uInt8 EXC_CHPROPS_EMPTY_ZERO
Skip empty values.
void ConvertCategSequence(css::uno::Reference< css::chart2::data::XLabeledDataSequence > const &xCategSeq)
Converts and inserts category ranges for all inserted series.
const sal_uInt16 EXC_CHFRLABELPROPS_SHOWCATEG
8-bit string length field (default: 16-bit).
const sal_uInt8 EXC_CHSERERR_FIXED
XclExpPalette & GetPalette() const
Returns the color buffer.
const sal_uInt16 EXC_ID_CHPROPERTIES
Color GetDefColor(sal_uInt16 nXclIndex) const
Returns the default color for a (non-zero-based) Excel color or COL_AUTO on error.
bool ConvertAreaFormat(XclChAreaFormat &rAreaFmt, const ScfPropertySet &rPropSet, XclChPropertyMode ePropMode) const
Reads solid area properties from the passed property set.
const sal_uInt16 EXC_CHTEXT_SHOWCATEG
Show bubble size.
const sal_uInt8 EXC_CHSERERR_XPLUS
For internal use only.
sal_Int32 GetApiAxesSetIndex() const
Returns the axes set index used by the chart API.
const sal_uInt16 EXC_ID_CHLABELRANGE
This bit is always set in BIFF5+.
XclExpChLabelRangeRef mxLabelRange
Contents of the CHAXIS record.
sal_uInt16 mnValueCount
Fixed value for several source types.
void RemoveRecord(size_t nPos)
Removes the record at the specified position from the list.
XclExpChText(const XclExpChRoot &rRoot)
const sal_uInt16 EXC_ID_CHTICK
For internal use only.
XclExpNumFmtBuffer & GetNumFmtBuffer() const
Returns the number format buffer.
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
const sal_Int32 EXC_CHART_AXIS_X
For internal use only.
const sal_uInt8 EXC_CHSERERR_XMINUS
bool IsDefaultFrameBase(XclChFrameType eDefFrameType) const
Returns true, if the frame contains default formatting (as if the frame is missing).
sal_uInt16 mnLabelFreq
Crossing position of other axis.
XclChExtTypeInfo maTypeInfo
Chart type (e.g. CHBAR, CHLINE, ...).
sal_uInt16 mnEyeDist
Elevation (-90...+90deg).
const sal_uInt16 EXC_ID_CHSERPARENT
constexpr OUStringLiteral EXC_CHPROP_LABELSEPARATOR
static void lcl_getChartSubTitle(const Reference< XChartDocument > &xChartDoc, OUString &rSubTitle)
sal_uInt16 GetBaseYear() const
Returns the base year depending on the current null date (1900 or 1904).
virtual void SetRotation(sal_uInt16 nRotation) override
Sets text rotation to internal data structures.
const sal_uInt16 EXC_CHVALUERANGE_AUTOCROSS
const sal_uInt16 EXC_CHFRBLOCK_TYPE_FRAME
XclExpChChart3dRef mxChart3d
List of series data (CHSERIES groups).
void InitializeFutureRecBlock(XclExpStream &rStrm)
Initializes the current future record level (writes all unwritten CHFRBLOCKBEGIN records).
constexpr OUStringLiteral EXC_CHPROP_SHOWEQUATION
Stores all used colors in the document.
const sal_Int32 EXC_CHART_AXIS_NONE
Automatic rotation, e.g. axis labels (internal use only).
const sal_Int32 EXC_CHART_AXESSET_PRIMARY
For internal use only.
XclExpChValueRange(const XclExpChRoot &rRoot)
XclExpChFontRef mxFont
Axis ticks (CHTICK record).
sal_uInt16 mnMinorUnit
Distance for minor grid lines.
const sal_uInt16 EXC_CHDATERANGE_AUTOMINOR
static sal_uInt16 ConvertPieRotation(const ScfPropertySet &rPropSet)
Reads the pie rotation property and returns the converted angle.
const sal_uInt16 EXC_CHTEXT_SHOWSYMBOL
Automatic text color.
constexpr OUStringLiteral EXC_CHPROP_BLACKDAY
sal_uInt16 mnFlags
Crossing position of other axis.
void SetSystemColor(Color &rColor, sal_uInt32 &rnColorId, sal_uInt16 nSysColorIdx) const
Sets a system color and the respective color identifier.
void EndRecord()
Checks and corrects real record length.
sal_uInt16 mnAxesSetId
Position of the axes set (inner plot area).
XclExpChLineFormatRef mxAxisLine
Index into font buffer (CHFONT record).
const sal_uInt16 EXC_CHFRBLOCK_TYPE_UNKNOWN
static OUString GetServiceName(const css::uno::Reference< css::uno::XInterface > &xInt)
Returns the service name provided via the XServiceName interface, or an empty string on error...
const sal_uInt16 EXC_CHFRAMEPOS_ABSSIZE_POINTS
sal_Int16 mnElevation
Rotation (0...359deg).
bool GetColorProperty(Color &rColor, const OUString &rPropName) const
Gets the specified color property from the property set.
const sal_uInt16 EXC_CHPICFORMAT_NONE
XclChTypeInfo maTypeInfo
Contents of the chart type record.
const sal_uInt16 EXC_CHAXISLINE_MAJORGRID
Axis line itself.
XclExpChEscherFormatRef mxEscherFmt
Area format (CHAREAFORMAT record).
sal_Int32 CalcChartXFromHmm(sal_Int32 nPosX) const
Converts the passed horizontal coordinate from 1/100 mm to Excel chart units.
const sal_uInt16 EXC_CHFRLABELPROPS_SHOWPERCENT
const sal_uInt16 EXC_CHPROPS_SHOWVISIBLEONLY
Manual series allocation.
const sal_uInt16 EXC_CHDATERANGE_AUTOMAX
const sal_uInt16 EXC_ID_CHLEGEND
Varied colors for points.
sal_uInt16 mnFlags
Bubble type in bubble chart (CHSCATTER).
static sal_Int16 GetLeadingScriptType(const XclExpRoot &rRoot, const OUString &rString)
Returns the script type first text portion different to WEAK, or the system default script type...
const sal_uInt16 EXC_CHTEXT_SHOWBUBBLE
Data point caption as percent.
const sal_uInt16 EXC_CHFRBLOCK_TYPE_SERIES
sal_uInt8 mnHAlign
Text color.
const sal_uInt16 EXC_CHFRLABELPROPS_SHOWVALUE
void FinalizeFutureRecBlock(XclExpStream &rStrm)
Finalizes the current future record level (writes CHFRBLOCKEND record if needed). ...
sal_uInt16 mnBubbleType
Bubble size in bubble chart (CHSCATTER).
bool Is3dChart() const
Returns true, if the chart is three-dimensional.
rtl::Reference< XclExpRecordBase > mxObjRecs
bool IsSystemColor(sal_uInt16 nXclIndex) const
Returns true, if the passed Excel color index is a system color.
const sal_uInt16 EXC_ID_CHUNITS
The CHATTACHEDLABEL record that contains the type of a data point label.
sal_uInt16 mnFlags
Frequency of ticks.
sal_uInt16 mnMajorUnit
Distance for major grid lines.
constexpr OUStringLiteral EXC_CHPROP_ROLE_LOWVALUES
constexpr OUStringLiteral EXC_CHPROP_GAPWIDTHSEQ
XclExpChRoot(const XclExpRoot &rRoot, XclExpChChart &rChartData)
RecType * GetFirstRecord() const
Returns reference to the first existing record or empty reference, if list is empty.
const sal_uInt16 EXC_CHBAR_PERCENT
const sal_uInt8 EXC_CHFRINFO_EXCELXP2003
const sal_uInt16 EXC_CHCHART3D_AUTOHEIGHT
false = Z axis, true = clustered/stacked.
const sal_uInt16 EXC_CHMARKERFORMAT_NOSYMBOL
XclChObjectType meObjType
Contents of the CHFRAME record.
const sal_uInt16 EXC_CHSERIESFORMAT_SMOOTHED
const sal_uInt8 EXC_CHSERTREND_MOVING_AVG
const sal_uInt8 EXC_CHLEGEND_BOTTOM
XclExpChTypeGroupRef GetFirstTypeGroup() const
Returns first inserted chart type group.
Represents the group of DFF and OBJ records containing all drawing shapes embedded in the chart objec...
void CopyFromStream(SvStream &rInStrm, sal_uInt64 nBytes=STREAM_SEEK_TO_END)
Copies nBytes bytes from current position of the stream rInStrm.
constexpr OUStringLiteral EXC_CHPROP_SWAPXANDYAXIS
void ConvertLegend(const ScfPropertySet &rPropSet)
Creates a legend object and converts all legend settings.
sal_uInt16 mnFlags
Link type (directly, linked to worksheet, ...).
sal_uInt16 mnDepthGap
Depth relative to width.
sal_uInt16 mnFlags
Format type of the frame.
sal_uInt16 mnNumFmtIdx
Additional flags.
const sal_uInt16 EXC_CHLEGEND_DOCKED
Represents the CHCHART record group describing the chart contents.
sal_Int32 mnWidth
Y position of the object in 1/4000 of chart height.
constexpr OUStringLiteral EXC_CHPROP_SHOW
void AppendNewRecord(XclExpRecordBase *pRec)
Appends a newly created record to the list.
XclExpChChart & GetChartData() const
Returns a reference to the parent chart data object.
sal_uInt8 mnOrder
Type of the trend line.
const sal_uInt8 EXC_CHTICK_NEXT
Above diagram/left of diagram.
const sal_uInt16 EXC_CHLINEFORMAT_AUTO
const sal_uInt16 EXC_CHLINEFORMAT_SOLID
void SetFontColor(const Color &rColor, sal_uInt32 nColorId)
Sets font color and color identifier to internal data structures.
XclChTypeId
Enumerates all kinds of different chart types.
sal_uInt16 mnBubbleCount
Number of value entries.
bool Is3dChart() const
Returns true, if the chart is three-dimensional.
const sal_uInt16 EXC_CHFRBLOCK_TYPE_DATAFORMAT
const sal_uInt16 EXC_CHTEXT_POS_LEFT
virtual void WriteSubRecords(XclExpStream &rStrm) override
Writes all embedded records.
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
sal_Int16 GetDefApiScript() const
Returns the default script type, e.g.
constexpr OUStringLiteral EXC_CHPROP_NUMBERFORMAT_LINKSRC
const XclExpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
XclExpChRootDataRef mxChData
sal_uInt16 mnValue2
Optional primary value for current context.
const sal_uInt16 EXC_CHFRBLOCK_TYPE_TYPEGROUP
const sal_uInt16 EXC_CHATTLABEL_SHOWCATEG
Smoothed line.
Line charts (line, area, stock charts).
#define ESCHER_Prop_fillBackColor
XclExpValueRecord< sal_uInt16 > XclExpUInt16Record
A record containing an unsigned 16-bit value.
const sal_uInt16 EXC_ID_CHSERERRORBAR
bool Is() const
Returns true, if the contained XPropertySet interface is valid.
const sal_uInt8 EXC_CHSERERR_STDDEV
void Convert(const css::chart2::ScaleData &rScaleData)
Converts value axis scaling settings.
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
virtual void WriteSubRecords(XclExpStream &rStrm) override
Writes all embedded records.
XclExpChTypeGroupRef GetLastTypeGroup() const
Returns last inserted chart type group.
XclExpChTextRef mxLabel
Formatting settings of the trend line.
void ReadFontProperties(XclFontData &rFontData, const ScfPropertySet &rPropSet, XclFontPropSetType eType, sal_Int16 nScript=-1)
Reads all font properties from the passed property set.
const sal_uInt16 EXC_CHCHART3D_HASWALLS
true = automatic height to width ratio.
sal_uInt8 mnMajor
Tick labels color.
constexpr OUStringLiteral EXC_CHPROP_LABEL
const sal_uInt16 EXC_CHAXIS_Z
sal_uInt16 mnGroupIdx
Error bar settings (CHSERERRORBAR record).
sal_uInt16 mnRotation
Gap between bars (CHBAR).
constexpr OUStringLiteral EXC_CHPROP_ROLE_HIGHVALUES
constexpr OUStringLiteral EXC_CHPROP_ADDITIONALSHAPES
#define ESCHER_Prop_fillColor
virtual formula::FormulaToken * AddOpCode(OpCode eCode) override
sal_uInt16 mnCross
Time unit for axis values.
RecType * GetRecord(size_t nPos) const
Returns reference to an existing record or empty reference on error.
void InitFromParent(const XclExpChSeries &rParent)
Initializes members of this series to represent a child of the passed series.