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