Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / controller / inc / dlg_ObjectProperties.hxx
blob4df60ef2b74bede315c98249979d21faa753f621
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_OBJECTPROPERTIES_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_OBJECTPROPERTIES_HXX
22 #include <ObjectIdentifier.hxx>
23 #include <sfx2/tabdlg.hxx>
25 namespace com { namespace sun { namespace star { namespace util { class XNumberFormatsSupplier; } } } }
26 class Graphic;
28 namespace chart
31 class ObjectPropertiesDialogParameter final
33 public:
34 ObjectPropertiesDialogParameter( const OUString& rObjectCID );
35 ~ObjectPropertiesDialogParameter();
37 void init( const css::uno::Reference< css::frame::XModel >& xModel );
38 ObjectType getObjectType() const { return m_eObjectType;}
39 const OUString& getLocalizedName() const { return m_aLocalizedName;}
41 bool HasGeometryProperties() const { return m_bHasGeometryProperties;}
42 bool HasStatisticProperties() const { return m_bHasStatisticProperties;}
43 bool ProvidesSecondaryYAxis() const { return m_bProvidesSecondaryYAxis;}
44 bool ProvidesOverlapAndGapWidth() const { return m_bProvidesOverlapAndGapWidth;}
45 bool ProvidesBarConnectors() const { return m_bProvidesBarConnectors;}
46 bool HasAreaProperties() const { return m_bHasAreaProperties;}
47 bool HasSymbolProperties() const { return m_bHasSymbolProperties;}
48 bool HasNumberProperties() const { return m_bHasNumberProperties;}
49 bool ProvidesStartingAngle() const { return m_bProvidesStartingAngle;}
50 bool ProvidesMissingValueTreatments() const { return m_bProvidesMissingValueTreatments;}
52 bool HasScaleProperties() const { return m_bHasScaleProperties;}
53 bool CanAxisLabelsBeStaggered() const { return m_bCanAxisLabelsBeStaggered;}
54 bool IsSupportingAxisPositioning() const { return m_bSupportingAxisPositioning;}
55 bool ShowAxisOrigin() const { return m_bShowAxisOrigin;}
56 bool IsCrossingAxisIsCategoryAxis() const { return m_bIsCrossingAxisIsCategoryAxis;}
57 const css::uno::Sequence< OUString >& GetCategories() const { return m_aCategories;}
59 const css::uno::Reference< css::chart2::XChartDocument >&
60 getDocument() const { return m_xChartDocument;}
62 bool IsComplexCategoriesAxis() const { return m_bComplexCategoriesAxis;}
64 sal_Int32 getNbPoints() const { return m_nNbPoints;}
66 private:
67 OUString m_aObjectCID;
68 ObjectType m_eObjectType;
69 bool m_bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles)
71 OUString m_aLocalizedName;
73 bool m_bHasGeometryProperties;
74 bool m_bHasStatisticProperties;
75 bool m_bProvidesSecondaryYAxis;
76 bool m_bProvidesOverlapAndGapWidth;
77 bool m_bProvidesBarConnectors;
78 bool m_bHasAreaProperties;
79 bool m_bHasSymbolProperties;
80 bool m_bHasNumberProperties;
81 bool m_bProvidesStartingAngle;
82 bool m_bProvidesMissingValueTreatments;
84 bool m_bHasScaleProperties;
85 bool m_bCanAxisLabelsBeStaggered;
87 bool m_bSupportingAxisPositioning;
88 bool m_bShowAxisOrigin;
89 bool m_bIsCrossingAxisIsCategoryAxis;
90 css::uno::Sequence< OUString > m_aCategories;
92 css::uno::Reference< css::chart2::XChartDocument > m_xChartDocument;
94 bool m_bComplexCategoriesAxis;
96 sal_Int32 m_nNbPoints;
99 /*************************************************************************
101 |* dialog for properties of different chart object
103 \************************************************************************/
105 class ViewElementListProvider;
107 class SchAttribTabDlg : public SfxTabDialogController
109 private:
110 const ObjectPropertiesDialogParameter * const m_pParameter;
111 const ViewElementListProvider* const m_pViewElementListProvider;
112 SvNumberFormatter* m_pNumberFormatter;
114 std::unique_ptr<SfxItemSet> m_pSymbolShapeProperties;
115 std::unique_ptr<Graphic> m_pAutoSymbolGraphic;
117 double m_fAxisMinorStepWidthForErrorBarDecimals;
118 bool m_bOKPressed;
120 DECL_LINK(OKPressed, weld::Button&, void);
122 virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
124 public:
125 SchAttribTabDlg(weld::Window* pParent, const SfxItemSet* pAttr,
126 const ObjectPropertiesDialogParameter* pDialogParameter,
127 const ViewElementListProvider* pViewElementListProvider,
128 const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
129 virtual ~SchAttribTabDlg() override;
131 //pSymbolShapeProperties: Properties to be set on the symbollist shapes
132 //pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected
133 void setSymbolInformation( std::unique_ptr<SfxItemSet> pSymbolShapeProperties, std::unique_ptr<Graphic> pAutoSymbolGraphic );
135 void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
137 bool DialogWasClosedWithOK() const { return m_bOKPressed;}
140 } //namespace chart
142 #endif
144 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */