57#include <com/sun/star/chart2/AxisType.hpp>
58#include <com/sun/star/chart2/XAxis.hpp>
62#include <svx/svxids.hrc>
68#include <svx/dialogs.hrc>
86using ::com::sun::star::uno::Reference;
87using ::com::sun::star::uno::Sequence;
88using ::com::sun::star::uno::Exception;
89using ::com::sun::star::beans::XPropertySet;
92 : m_aObjectCID(
std::move( aObjectCID ))
94 , m_bAffectsMultipleObjects(false)
95 , m_bHasGeometryProperties(false)
96 , m_bHasStatisticProperties(false)
97 , m_bProvidesSecondaryYAxis(false)
98 , m_bProvidesOverlapAndGapWidth(false)
99 , m_bProvidesBarConnectors(false)
100 , m_bHasAreaProperties(false)
101 , m_bHasSymbolProperties(false)
102 , m_bHasNumberProperties(false)
103 , m_bProvidesStartingAngle(false)
104 , m_bProvidesMissingValueTreatments(false)
105 , m_bIsPieChartDataPoint(false)
106 , m_bHasScaleProperties(false)
107 , m_bCanAxisLabelsBeStaggered(false)
108 , m_bSupportingAxisPositioning(false)
109 , m_bShowAxisOrigin(false)
110 , m_bIsCrossingAxisIsCategoryAxis(false)
111 , m_bSupportingCategoryPositioning(false)
112 , m_bComplexCategoriesAxis( false )
128 sal_Int32 nDimensionCount = 0;
130 nDimensionCount = xDiagram->getDimension();
135 if( bHasSeriesProperties || bHasDataPointproperties )
142 if( bHasSeriesProperties )
171 ScaleData
aData( xAxis->getScaleData() );
172 if(
aData.AxisType == chart2::AxisType::SERIES )
174 if(
aData.AxisType != chart2::AxisType::SERIES )
180 if( xCrossingMainAxis.is() )
182 ScaleData aScale( xCrossingMainAxis->getScaleData() );
191 sal_Int32 nCooSysIndex=0;
192 sal_Int32 nDimensionIndex=0;
193 sal_Int32 nAxisIndex=0;
204 if ( nDimensionIndex == 0 && (
aData.AxisType == chart2::AxisType::CATEGORY ||
aData.AxisType == chart2::AxisType::DATE ) )
225 const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aDataSeqs( xSeries->getDataSequences2());
227 bool bXValuesFound =
false, bYValuesFound =
false;
229 for( std::size_t
i=0;
230 ! (bXValuesFound && bYValuesFound) &&
i<aDataSeqs.size();
238 if( xProp->getPropertyValue(
"Role" ) >>= aRole )
240 if( !bXValuesFound && aRole ==
"values-x" )
243 bXValuesFound =
true;
245 else if( !bYValuesFound && aRole ==
"values-y" )
248 bYValuesFound =
true;
257 if( !bXValuesFound && bYValuesFound )
261 aXValues.realloc( aYValues.getLength() );
262 auto pXValues = aXValues.getArray();
263 for( sal_Int32
i=0;
i<aXValues.getLength(); ++
i )
265 bXValuesFound =
true;
268 if( bXValuesFound && bYValuesFound &&
269 aXValues.hasElements() &&
270 aYValues.hasElements() )
321 std::optional<Graphic> oAutoSymbolGraphic )
338 , m_pParameter( pDialogParameter )
339 , m_pViewElementListProvider( pViewElementListProvider )
340 , m_pNumberFormatter(nullptr)
341 , m_fAxisMinorStepWidthForErrorBarDecimals(0.1)
342 , m_bOKPressed(false)
521 else if (rId ==
"area")
532 else if (rId ==
"transparent")
538 else if (rId ==
"fontname")
543 else if (rId ==
"effects")
548 else if (rId ==
"axislabel")
555 else if (rId ==
"axispos")
570 else if (rId ==
"scale")
579 else if (rId ==
"datalabels")
585 else if (rId ==
"numberformat")
590 else if (rId ==
"xerrorbar")
593 OSL_ASSERT( pTabPage );
601 else if (rId ==
"yerrorbar")
604 OSL_ASSERT( pTabPage );
612 else if (rId ==
"options")
619 else if (rId ==
"trendline")
622 if(pTrendlineTabPage)
Reference< XExecutableDialog > m_xDialog
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void AddTabPage(const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
virtual weld::Button & GetOKButton() const override
SfxItemSet * GetInputSetImpl()
virtual void PageCreated(const SfxAllItemSet &aSet)
static bool IsCTLFontEnabled()
static rtl::Reference< ::chart::Axis > getCrossingMainAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys)
static rtl::Reference< ::chart::BaseCoordinateSystem > getCoordinateSystemOfAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::Diagram > &xDiagram)
static rtl::Reference< ::chart::ChartType > getFirstChartTypeWithSeriesAttachedToAxisIndex(const rtl::Reference< ::chart::Diagram > &xDiagram, const sal_Int32 nAttachedAxisIndex)
static bool getIndicesForAxis(const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSys, sal_Int32 &rOutDimensionIndex, sal_Int32 &rOutAxisIndex)
void SetNumFormatter(SvNumberFormatter *pFormatter)
void SetCrossingAxisIsCategoryAxis(bool bCrossingAxisIsCategoryAxis)
void SupportCategoryPositioning(bool bSupportCategoryPositioning)
void SupportAxisPositioning(bool bSupportAxisPositioning)
void SetCategories(const css::uno::Sequence< OUString > &rCategories)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
static rtl::Reference< ChartType > getChartTypeOfSeries(const rtl::Reference<::chart::ChartModel > &xModel, const rtl::Reference< ::chart::DataSeries > &xGivenDataSeries)
static bool isSupportingAxisPositioning(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex)
static bool isSupportingBaseValue(const rtl::Reference< ::chart::ChartType > &xChartType)
static css::uno::Sequence< sal_Int32 > getSupportedMissingValueTreatments(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingAreaProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingBarConnectors(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingCategoryPositioning(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingOverlapAndGapWidthProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingStatisticProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingStartingAngle(const rtl::Reference< ::chart::ChartType > &xChartType)
static bool isSupportingGeometryProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingSymbolProperties(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static bool isSupportingSecondaryAxis(const rtl::Reference< ::chart::ChartType > &xChartType, sal_Int32 nDimensionCount)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
void SetNumberFormatter(SvNumberFormatter *pFormatter)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
static css::uno::Sequence< OUString > getExplicitSimpleCategories(ChartModel &rModel)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
void SetAxisMinorStepWidthForErrorBarDecimals(double fMinorStepWidth)
void SetErrorBarType(ErrorBarResources::tErrorBarType eNewType)
void SetChartDocumentForRangeChoosing(const rtl::Reference<::chart::ChartModel > &xChartDocument)
bool hasComplexCategories() const
static rtl::Reference< ::chart::DataSeries > getDataSeriesForCID(std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel > &xChartModel)
static std::u16string_view getParticleID(std::u16string_view rCID)
static rtl::Reference< ::chart::Axis > getAxisForCID(std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel > &xChartModel)
static OUString getName_ObjectForSeries(ObjectType eObjectType, std::u16string_view rSeriesCID, const rtl::Reference<::chart::ChartModel > &xChartDocument)
static OUString getName(ObjectType eObjectType, bool bPlural=false)
static OUString getAxisName(std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel > &xChartModel)
static OUString getGridName(std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel > &xChartModel)
static OUString getTitleName(std::u16string_view rObjectCID, const rtl::Reference<::chart::ChartModel > &xChartModel)
static OUString getName_ObjectForAllSeries(ObjectType eObjectType)
bool m_bHasSymbolProperties
bool m_bProvidesBarConnectors
bool ProvidesBarConnectors() const
bool m_bIsCrossingAxisIsCategoryAxis
bool m_bAffectsMultipleObjects
bool m_bHasAreaProperties
bool IsSupportingAxisPositioning() const
bool ProvidesOverlapAndGapWidth() const
bool m_bSupportingCategoryPositioning
bool m_bHasScaleProperties
bool m_bProvidesMissingValueTreatments
bool m_bSupportingAxisPositioning
bool HasAreaProperties() const
bool HasNumberProperties() const
void init(const rtl::Reference<::chart::ChartModel > &xModel)
bool m_bIsPieChartDataPoint
bool IsCrossingAxisIsCategoryAxis() const
bool ProvidesStartingAngle() const
bool HasGeometryProperties() const
ObjectType getObjectType() const
bool ProvidesMissingValueTreatments() const
rtl::Reference<::chart::ChartModel > m_xChartDocument
const css::uno::Sequence< OUString > & GetCategories() const
bool m_bComplexCategoriesAxis
ObjectPropertiesDialogParameter(OUString aObjectCID)
bool HasSymbolProperties() const
bool m_bCanAxisLabelsBeStaggered
bool m_bProvidesOverlapAndGapWidth
bool m_bHasStatisticProperties
bool IsPieChartDataPoint() const
~ObjectPropertiesDialogParameter()
css::uno::Sequence< OUString > m_aCategories
bool CanAxisLabelsBeStaggered() const
bool m_bProvidesStartingAngle
bool IsSupportingCategoryPositioning() const
bool ShowAxisOrigin() const
bool HasScaleProperties() const
bool m_bHasNumberProperties
bool ProvidesSecondaryYAxis() const
OUString m_aLocalizedName
sal_Int32 getNbPoints() const
bool m_bHasGeometryProperties
const OUString & getLocalizedName() const
bool IsComplexCategoriesAxis() const
const rtl::Reference<::chart::ChartModel > & getDocument() const
bool m_bProvidesSecondaryYAxis
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
void SetNumFormatter(SvNumberFormatter *pFormatter)
void ShowAxisOrigin(bool bShowOrigin)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
static std::unique_ptr< SfxTabPage > CreateWithoutRotation(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
const ObjectPropertiesDialogParameter *const m_pParameter
SchAttribTabDlg(weld::Window *pParent, const SfxItemSet *pAttr, const ObjectPropertiesDialogParameter *pDialogParameter, const ViewElementListProvider *pViewElementListProvider, const css::uno::Reference< css::util::XNumberFormatsSupplier > &xNumberFormatsSupplier)
virtual void PageCreated(const OUString &rId, SfxTabPage &rPage) override
virtual ~SchAttribTabDlg() override
std::optional< Graphic > m_oAutoSymbolGraphic
const ViewElementListProvider *const m_pViewElementListProvider
std::optional< SfxItemSet > m_oSymbolShapeProperties
SvNumberFormatter * m_pNumberFormatter
void setSymbolInformation(SfxItemSet &&rSymbolShapeProperties, std::optional< Graphic > oAutoSymbolGraphic)
double m_fAxisMinorStepWidthForErrorBarDecimals
void SetAxisMinorStepWidthForErrorBarDecimals(double fMinorStepWidth)
void ShowStaggeringControls(bool bShowStaggeringControls)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
void Init(bool bProvidesSecondaryYAxis, bool bProvidesOverlapAndGapWidth, bool bProvidesBarConnectors)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
void SetNumFormatter(SvNumberFormatter *pFormatter)
void SetNbPoints(sal_Int32 nNbPoints)
XGradientListRef GetGradientList() const
XPatternListRef GetPatternList() const
XLineEndListRef GetLineEndList() const
XBitmapListRef GetBitmapList() const
XColorListRef GetColorTable() const
FontList * getFontList() const
SdrObjList * GetSymbolList() const
XDashListRef GetDashList() const
XHatchListRef GetHatchList() const
#define DBG_UNHANDLED_EXCEPTION(...)
#define LINK(Instance, Class, Member)
constexpr OUStringLiteral aData
bool IsAsianTypographyEnabled()
std::pair< std::vector< double >, std::vector< double > > tDoubleVectorPair
tDoubleVectorPair cleanup(const css::uno::Sequence< double > &rXValues, const css::uno::Sequence< double > &rYValues, Pred aPred)
takes the given x- and y-values and copies them into the resulting pair, which contains x-values in t...
@ OBJECTTYPE_LEGEND_ENTRY
@ OBJECTTYPE_DATA_ERRORS_X
@ OBJECTTYPE_DATA_STOCK_LOSS
@ OBJECTTYPE_DIAGRAM_FLOOR
@ OBJECTTYPE_DATA_STOCK_RANGE
@ OBJECTTYPE_DATA_ERRORS_Y
@ OBJECTTYPE_AXIS_UNITLABEL
@ OBJECTTYPE_DATA_CURVE_EQUATION
@ OBJECTTYPE_DATA_STOCK_GAIN
@ OBJECTTYPE_DATA_AVERAGE_LINE
@ OBJECTTYPE_DATA_ERRORS_Z
@ OBJECTTYPE_DIAGRAM_WALL
const sal_uInt16 nNoArrowNoShadowDlg
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Sequence< double > DataSequenceToDoubleSequence(const css::uno::Reference< css::chart2::data::XDataSequence > &xDataSequence)
chart2::XDataSequence -> uno::Sequence< double >
OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(TranslateId aId)
IMPL_LINK(StackingResourceGroup, StackingChangeHdl, weld::Toggleable &, rRadio, void)