nss: upgrade to release 3.73
[LibreOffice.git] / chart2 / source / controller / inc / dlg_ObjectProperties.hxx
blob3a7e87fbe6dcaff67c4c79a2b574f2994f57edde
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 #pragma once
21 #include <ObjectIdentifier.hxx>
22 #include <sfx2/tabdlg.hxx>
24 namespace com::sun::star::util { class XNumberFormatsSupplier; }
25 class Graphic;
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;}
50 bool IsPieChartDataPoint() const { return m_bIsPieChartDataPoint;}
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 bool IsSupportingCategoryPositioning() const { return m_bSupportingCategoryPositioning;}
58 const css::uno::Sequence< OUString >& GetCategories() const { return m_aCategories;}
60 const css::uno::Reference< css::chart2::XChartDocument >&
61 getDocument() const { return m_xChartDocument;}
63 bool IsComplexCategoriesAxis() const { return m_bComplexCategoriesAxis;}
65 sal_Int32 getNbPoints() const { return m_nNbPoints;}
67 private:
68 OUString m_aObjectCID;
69 ObjectType m_eObjectType;
70 bool m_bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles)
72 OUString m_aLocalizedName;
74 bool m_bHasGeometryProperties;
75 bool m_bHasStatisticProperties;
76 bool m_bProvidesSecondaryYAxis;
77 bool m_bProvidesOverlapAndGapWidth;
78 bool m_bProvidesBarConnectors;
79 bool m_bHasAreaProperties;
80 bool m_bHasSymbolProperties;
81 bool m_bHasNumberProperties;
82 bool m_bProvidesStartingAngle;
83 bool m_bProvidesMissingValueTreatments;
84 bool m_bIsPieChartDataPoint;
86 bool m_bHasScaleProperties;
87 bool m_bCanAxisLabelsBeStaggered;
89 bool m_bSupportingAxisPositioning;
90 bool m_bShowAxisOrigin;
91 bool m_bIsCrossingAxisIsCategoryAxis;
92 bool m_bSupportingCategoryPositioning;
93 css::uno::Sequence< OUString > m_aCategories;
95 css::uno::Reference< css::chart2::XChartDocument > m_xChartDocument;
97 bool m_bComplexCategoriesAxis;
99 sal_Int32 m_nNbPoints;
102 /*************************************************************************
104 |* dialog for properties of different chart object
106 \************************************************************************/
108 class ViewElementListProvider;
110 class SchAttribTabDlg : public SfxTabDialogController
112 private:
113 const ObjectPropertiesDialogParameter * const m_pParameter;
114 const ViewElementListProvider* const m_pViewElementListProvider;
115 SvNumberFormatter* m_pNumberFormatter;
117 std::unique_ptr<SfxItemSet> m_pSymbolShapeProperties;
118 std::unique_ptr<Graphic> m_pAutoSymbolGraphic;
120 double m_fAxisMinorStepWidthForErrorBarDecimals;
121 bool m_bOKPressed;
123 DECL_LINK(OKPressed, weld::Button&, void);
125 virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
127 public:
128 SchAttribTabDlg(weld::Window* pParent, const SfxItemSet* pAttr,
129 const ObjectPropertiesDialogParameter* pDialogParameter,
130 const ViewElementListProvider* pViewElementListProvider,
131 const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
132 virtual ~SchAttribTabDlg() override;
134 //pSymbolShapeProperties: Properties to be set on the symbollist shapes
135 //pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected
136 void setSymbolInformation( std::unique_ptr<SfxItemSet> pSymbolShapeProperties, std::unique_ptr<Graphic> pAutoSymbolGraphic );
138 void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
140 bool DialogWasClosedWithOK() const { return m_bOKPressed;}
143 } //namespace chart
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */