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