39using ::com::sun::star::uno::Reference;
40using ::com::sun::star::uno::Sequence;
48 m_aPageSize( aPageSize ),
50 m_bUseAutoScale( getAutoResizeState( xChartDoc ) == AUTO_RESIZE_YES )
70 awt::Size aOldRefSize;
72 xTitleProp->getPropertyValue(
"ReferencePageSize") >>= aOldRefSize );
89 catch (
const uno::Exception&)
102 std::vector< rtl::Reference< DataSeries > > aSeries =
103 xDiagram->getDataSeries();
105 for (
auto const& elem : aSeries)
114 for( sal_Int32
idx : std::as_const(aPointIndexes) )
116 elem->getDataPointByIndex(
idx ) );
119 catch (
const uno::Exception&)
131 bool bAdaptFontSizes )
136 static constexpr OUStringLiteral aRefSizeName =
u"ReferencePageSize";
141 awt::Size aOldRefSize;
142 bool bHasOldRefSize( xProp->getPropertyValue( aRefSizeName ) >>= aOldRefSize );
146 if( ! bHasOldRefSize )
147 xProp->setPropertyValue( aRefSizeName,
uno::Any( aRefSize ));
153 xProp->setPropertyValue( aRefSizeName,
uno::Any());
156 if( bAdaptFontSizes )
161 catch (
const uno::Exception&)
177 if( xProp->getPropertyValue(
"ReferencePageSize" ).hasValue())
182 catch (
const uno::Exception&)
192 rInOutState = eSingleState;
195 eSingleState != rInOutState )
261 std::vector< rtl::Reference< DataSeries > > aSeries =
262 xDiagram->getDataSeries();
264 for (
auto const& elem : aSeries)
277 for( sal_Int32
idx : std::as_const(aPointIndexes) )
280 elem->getDataPointByIndex(
idx ), eResult );
286 catch (
const uno::Exception&)
rtl::Reference<::chart::ChartModel > m_xChartDoc
static std::vector< rtl::Reference< ::chart::Axis > > getAllAxesOfDiagram(const rtl::Reference< ::chart::Diagram > &xDiagram, bool bOnlyVisible=false)
SAL_DLLPRIVATE void setValuesAtPropertySet(const css::uno::Reference< css::beans::XPropertySet > &xProp, bool bAdaptFontSizes=true)
Sets the ReferencePageSize according to the internal settings of this class at the XPropertySet,...
SAL_DLLPRIVATE void setValuesAtTitle(const css::uno::Reference< css::chart2::XTitle > &xTitle)
Sets the ReferencePageSize according to the internal settings of this class at the XTitle,...
static SAL_DLLPRIVATE void getAutoResizeFromPropSet(const css::uno::Reference< css::beans::XPropertySet > &xProp, AutoResizeState &rInOutState)
Retrieves the auto-resize state from the given propertyset.
const css::awt::Size & getPageSize() const
rtl::Reference<::chart::ChartModel > m_xChartDoc
SAL_DLLPRIVATE bool useAutoScale() const
void toggleAutoResizeState()
sets or resets the auto-resize at all objects that support this feature for text to the opposite of t...
ReferenceSizeProvider(css::awt::Size aPageSize, const rtl::Reference<::chart::ChartModel > &xChartDoc)
SAL_DLLPRIVATE void setAutoResizeState(AutoResizeState eNewState)
sets the auto-resize at all objects that support this feature for text.
static AutoResizeState getAutoResizeState(const rtl::Reference<::chart::ChartModel > &xChartDoc)
Retrieves the state auto-resize from all objects that support this feature.
void setValuesAtAllDataSeries()
Sets the internal value at all data series in the currently set model.
static SAL_DLLPRIVATE void impl_getAutoResizeFromTitled(const css::uno::Reference< css::chart2::XTitled > &xTitled, AutoResizeState &rInOutState)
SAL_DLLPRIVATE void impl_setValuesAtTitled(const css::uno::Reference< css::chart2::XTitled > &xTitled)
static void adaptFontSizes(const css::uno::Reference< css::beans::XPropertySet > &xTargetProperties, const css::awt::Size &rOldReferenceSize, const css::awt::Size &rNewReferenceSize)
#define DBG_UNHANDLED_EXCEPTION(...)
@ PROP_DATASERIES_ATTRIBUTED_DATA_POINTS