1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dlg_ObjectProperties.hxx,v $
10 * $Revision: 1.11.42.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CHART2_DLG_OBJECTPROPERTIES_HXX
31 #define _CHART2_DLG_OBJECTPROPERTIES_HXX
33 #include "ObjectIdentifier.hxx"
34 #include <sfx2/tabdlg.hxx>
35 // header for typedef ChangeType
36 #include <svx/tabarea.hxx>
37 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
39 //.............................................................................
42 //.............................................................................
44 class ObjectPropertiesDialogParameter
47 ObjectPropertiesDialogParameter( const rtl::OUString
& rObjectCID
);
48 virtual ~ObjectPropertiesDialogParameter();
50 void init( const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& xModel
);
51 ObjectType
getObjectType() const;
52 rtl::OUString
getLocalizedName() const;
54 bool HasGeometryProperties() const;
55 bool HasStatisticProperties() const;
56 bool ProvidesSecondaryYAxis() const;
57 bool ProvidesOverlapAndGapWidth() const;
58 bool ProvidesBarConnectors() const;
59 bool HasAreaProperties() const;
60 bool HasSymbolProperties() const;
61 bool HasNumberProperties() const;
62 bool ProvidesStartingAngle() const;
63 bool ProvidesMissingValueTreatments() const;
65 bool HasScaleProperties() const;
66 bool CanAxisLabelsBeStaggered() const;
67 bool IsSupportingAxisPositioning() const;
68 bool ShowAxisOrigin() const;
69 bool IsCrossingAxisIsCategoryAxis() const;
70 const ::com::sun::star::uno::Sequence
< rtl::OUString
>& GetCategories() const;
72 ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartDocument
>
76 rtl::OUString m_aObjectCID
;
77 ObjectType m_eObjectType
;
78 bool m_bAffectsMultipleObjects
;//is true if more than one object of the given type will be changed (e.g. all axes or all titles)
80 rtl::OUString m_aLocalizedName
;
82 bool m_bHasGeometryProperties
;
83 bool m_bHasStatisticProperties
;
84 bool m_bProvidesSecondaryYAxis
;
85 bool m_bProvidesOverlapAndGapWidth
;
86 bool m_bProvidesBarConnectors
;
87 bool m_bHasAreaProperties
;
88 bool m_bHasSymbolProperties
;
89 bool m_bHasNumberProperties
;
90 bool m_bProvidesStartingAngle
;
91 bool m_bProvidesMissingValueTreatments
;
93 bool m_bHasScaleProperties
;
94 bool m_bCanAxisLabelsBeStaggered
;
96 bool m_bSupportingAxisPositioning
;
97 bool m_bShowAxisOrigin
;
98 bool m_bIsCrossingAxisIsCategoryAxis
;
99 ::com::sun::star::uno::Sequence
< rtl::OUString
> m_aCategories
;
101 ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartDocument
> m_xChartDocument
;
104 /*************************************************************************
106 |* dialog for properties of different chart object
108 \************************************************************************/
110 class ViewElementListProvider
;
112 class SchAttribTabDlg
: public SfxTabDialog
115 ObjectType eObjectType
;
116 bool bAffectsMultipleObjects
;//is true if more than one object of the given type will be changed (e.g. all axes or all titles)
120 const ObjectPropertiesDialogParameter
* const m_pParameter
;
121 const ViewElementListProvider
* const m_pViewElementListProvider
;
122 SvNumberFormatter
* m_pNumberFormatter
;
124 SfxItemSet
* m_pSymbolShapeProperties
;
125 Graphic
* m_pAutoSymbolGraphic
;
127 double m_fAxisMinorStepWidthForErrorBarDecimals
;
130 virtual void PageCreated(USHORT nId
, SfxTabPage
& rPage
);
132 Link m_aOriginalOKClickHdl
;
133 DECL_LINK( OKPressed
, void * );
136 SchAttribTabDlg(Window
* pParent
, const SfxItemSet
* pAttr
,
137 const ObjectPropertiesDialogParameter
* pDialogParameter
,
138 const ViewElementListProvider
* pViewElementListProvider
,
139 const ::com::sun::star::uno::Reference
<
140 ::com::sun::star::util::XNumberFormatsSupplier
>& xNumberFormatsSupplier
);
141 virtual ~SchAttribTabDlg();
143 //pSymbolShapeProperties: Properties to be set on the symbollist shapes
144 //pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected
145 //this class takes ownership over both parameter
146 void setSymbolInformation( SfxItemSet
* pSymbolShapeProperties
, Graphic
* pAutoSymbolGraphic
);
148 void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth
);
150 bool DialogWasClosedWithOK() const;
153 //.............................................................................
155 //.............................................................................