Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / chart2 / source / controller / inc / dlg_ObjectProperties.hxx
blobafa83bc6f56c96cc7214a85490696eae9b847506
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>
24 #include <svx/dlgctrl.hxx>
25 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
27 namespace chart
30 class ObjectPropertiesDialogParameter final
32 public:
33 ObjectPropertiesDialogParameter( const OUString& rObjectCID );
34 ~ObjectPropertiesDialogParameter();
36 void init( const css::uno::Reference< css::frame::XModel >& xModel );
37 ObjectType getObjectType() const { return m_eObjectType;}
38 const OUString& getLocalizedName() const { return m_aLocalizedName;}
40 bool HasGeometryProperties() const { return m_bHasGeometryProperties;}
41 bool HasStatisticProperties() const { return m_bHasStatisticProperties;}
42 bool ProvidesSecondaryYAxis() const { return m_bProvidesSecondaryYAxis;}
43 bool ProvidesOverlapAndGapWidth() const { return m_bProvidesOverlapAndGapWidth;}
44 bool ProvidesBarConnectors() const { return m_bProvidesBarConnectors;}
45 bool HasAreaProperties() const { return m_bHasAreaProperties;}
46 bool HasSymbolProperties() const { return m_bHasSymbolProperties;}
47 bool HasNumberProperties() const { return m_bHasNumberProperties;}
48 bool ProvidesStartingAngle() const { return m_bProvidesStartingAngle;}
49 bool ProvidesMissingValueTreatments() const { return m_bProvidesMissingValueTreatments;}
51 bool HasScaleProperties() const { return m_bHasScaleProperties;}
52 bool CanAxisLabelsBeStaggered() const { return m_bCanAxisLabelsBeStaggered;}
53 bool IsSupportingAxisPositioning() const { return m_bSupportingAxisPositioning;}
54 bool ShowAxisOrigin() const { return m_bShowAxisOrigin;}
55 bool IsCrossingAxisIsCategoryAxis() const { return m_bIsCrossingAxisIsCategoryAxis;}
56 const css::uno::Sequence< OUString >& GetCategories() const { return m_aCategories;}
58 const css::uno::Reference< css::chart2::XChartDocument >&
59 getDocument() const { return m_xChartDocument;}
61 bool IsComplexCategoriesAxis() const { return m_bComplexCategoriesAxis;}
63 sal_Int32 getNbPoints() const { return m_nNbPoints;}
65 private:
66 OUString m_aObjectCID;
67 ObjectType m_eObjectType;
68 bool m_bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles)
70 OUString m_aLocalizedName;
72 bool m_bHasGeometryProperties;
73 bool m_bHasStatisticProperties;
74 bool m_bProvidesSecondaryYAxis;
75 bool m_bProvidesOverlapAndGapWidth;
76 bool m_bProvidesBarConnectors;
77 bool m_bHasAreaProperties;
78 bool m_bHasSymbolProperties;
79 bool m_bHasNumberProperties;
80 bool m_bProvidesStartingAngle;
81 bool m_bProvidesMissingValueTreatments;
83 bool m_bHasScaleProperties;
84 bool m_bCanAxisLabelsBeStaggered;
86 bool m_bSupportingAxisPositioning;
87 bool m_bShowAxisOrigin;
88 bool m_bIsCrossingAxisIsCategoryAxis;
89 css::uno::Sequence< OUString > m_aCategories;
91 css::uno::Reference< css::chart2::XChartDocument > m_xChartDocument;
93 bool m_bComplexCategoriesAxis;
95 sal_Int32 m_nNbPoints;
98 /*************************************************************************
100 |* dialog for properties of different chart object
102 \************************************************************************/
104 class ViewElementListProvider;
106 class SchAttribTabDlg : public SfxTabDialog
108 private:
109 sal_uInt16 nDlgType;
111 const ObjectPropertiesDialogParameter * const m_pParameter;
112 const ViewElementListProvider* const m_pViewElementListProvider;
113 SvNumberFormatter* m_pNumberFormatter;
115 SfxItemSet* m_pSymbolShapeProperties;
116 Graphic* m_pAutoSymbolGraphic;
118 double m_fAxisMinorStepWidthForErrorBarDecimals;
119 bool m_bOKPressed;
121 virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage) override;
123 Link<Button*,void> m_aOriginalOKClickHdl;
124 DECL_LINK( OKPressed, Button*, void );
126 public:
127 SchAttribTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr,
128 const ObjectPropertiesDialogParameter* pDialogParameter,
129 const ViewElementListProvider* pViewElementListProvider,
130 const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
131 virtual ~SchAttribTabDlg() override;
132 virtual void dispose() override;
134 //pSymbolShapeProperties: Properties to be set on the symbollist shapes
135 //pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected
136 //this class takes ownership over both parameter
137 void setSymbolInformation( SfxItemSet* pSymbolShapeProperties, Graphic* pAutoSymbolGraphic );
139 void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
141 bool DialogWasClosedWithOK() const { return m_bOKPressed;}
144 } //namespace chart
146 #endif
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */