1*de7b3f82SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*de7b3f82SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*de7b3f82SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*de7b3f82SAndrew Rist * distributed with this work for additional information 6*de7b3f82SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*de7b3f82SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*de7b3f82SAndrew Rist * "License"); you may not use this file except in compliance 9*de7b3f82SAndrew Rist * with the License. You may obtain a copy of the License at 10*de7b3f82SAndrew Rist * 11*de7b3f82SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*de7b3f82SAndrew Rist * 13*de7b3f82SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*de7b3f82SAndrew Rist * software distributed under the License is distributed on an 15*de7b3f82SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*de7b3f82SAndrew Rist * KIND, either express or implied. See the License for the 17*de7b3f82SAndrew Rist * specific language governing permissions and limitations 18*de7b3f82SAndrew Rist * under the License. 19*de7b3f82SAndrew Rist * 20*de7b3f82SAndrew Rist *************************************************************/ 21*de7b3f82SAndrew Rist 22*de7b3f82SAndrew Rist 23cdf0e10cSrcweir #ifndef _CHART2_DLG_OBJECTPROPERTIES_HXX 24cdf0e10cSrcweir #define _CHART2_DLG_OBJECTPROPERTIES_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "ObjectIdentifier.hxx" 27cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 28cdf0e10cSrcweir // header for typedef ChangeType 29cdf0e10cSrcweir #include <svx/tabarea.hxx> 30cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormatsSupplier.hpp> 31cdf0e10cSrcweir 32cdf0e10cSrcweir //............................................................................. 33cdf0e10cSrcweir namespace chart 34cdf0e10cSrcweir { 35cdf0e10cSrcweir //............................................................................. 36cdf0e10cSrcweir 37cdf0e10cSrcweir class ObjectPropertiesDialogParameter 38cdf0e10cSrcweir { 39cdf0e10cSrcweir public: 40cdf0e10cSrcweir ObjectPropertiesDialogParameter( const rtl::OUString& rObjectCID ); 41cdf0e10cSrcweir virtual ~ObjectPropertiesDialogParameter(); 42cdf0e10cSrcweir 43cdf0e10cSrcweir void init( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel ); 44cdf0e10cSrcweir ObjectType getObjectType() const; 45cdf0e10cSrcweir rtl::OUString getLocalizedName() const; 46cdf0e10cSrcweir 47cdf0e10cSrcweir bool HasGeometryProperties() const; 48cdf0e10cSrcweir bool HasStatisticProperties() const; 49cdf0e10cSrcweir bool ProvidesSecondaryYAxis() const; 50cdf0e10cSrcweir bool ProvidesOverlapAndGapWidth() const; 51cdf0e10cSrcweir bool ProvidesBarConnectors() const; 52cdf0e10cSrcweir bool HasAreaProperties() const; 53cdf0e10cSrcweir bool HasSymbolProperties() const; 54cdf0e10cSrcweir bool HasNumberProperties() const; 55cdf0e10cSrcweir bool ProvidesStartingAngle() const; 56cdf0e10cSrcweir bool ProvidesMissingValueTreatments() const; 57cdf0e10cSrcweir 58cdf0e10cSrcweir bool HasScaleProperties() const; 59cdf0e10cSrcweir bool CanAxisLabelsBeStaggered() const; 60cdf0e10cSrcweir bool IsSupportingAxisPositioning() const; 61cdf0e10cSrcweir bool ShowAxisOrigin() const; 62cdf0e10cSrcweir bool IsCrossingAxisIsCategoryAxis() const; 63cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< rtl::OUString >& GetCategories() const; 64cdf0e10cSrcweir 65cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > 66cdf0e10cSrcweir getDocument() const; 67cdf0e10cSrcweir 68cdf0e10cSrcweir bool IsComplexCategoriesAxis() const; 69cdf0e10cSrcweir 70cdf0e10cSrcweir private: 71cdf0e10cSrcweir rtl::OUString m_aObjectCID; 72cdf0e10cSrcweir ObjectType m_eObjectType; 73cdf0e10cSrcweir bool m_bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles) 74cdf0e10cSrcweir 75cdf0e10cSrcweir rtl::OUString m_aLocalizedName; 76cdf0e10cSrcweir 77cdf0e10cSrcweir bool m_bHasGeometryProperties; 78cdf0e10cSrcweir bool m_bHasStatisticProperties; 79cdf0e10cSrcweir bool m_bProvidesSecondaryYAxis; 80cdf0e10cSrcweir bool m_bProvidesOverlapAndGapWidth; 81cdf0e10cSrcweir bool m_bProvidesBarConnectors; 82cdf0e10cSrcweir bool m_bHasAreaProperties; 83cdf0e10cSrcweir bool m_bHasSymbolProperties; 84cdf0e10cSrcweir bool m_bHasNumberProperties; 85cdf0e10cSrcweir bool m_bProvidesStartingAngle; 86cdf0e10cSrcweir bool m_bProvidesMissingValueTreatments; 87cdf0e10cSrcweir 88cdf0e10cSrcweir bool m_bHasScaleProperties; 89cdf0e10cSrcweir bool m_bCanAxisLabelsBeStaggered; 90cdf0e10cSrcweir 91cdf0e10cSrcweir bool m_bSupportingAxisPositioning; 92cdf0e10cSrcweir bool m_bShowAxisOrigin; 93cdf0e10cSrcweir bool m_bIsCrossingAxisIsCategoryAxis; 94cdf0e10cSrcweir ::com::sun::star::uno::Sequence< rtl::OUString > m_aCategories; 95cdf0e10cSrcweir 96cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > m_xChartDocument; 97cdf0e10cSrcweir 98cdf0e10cSrcweir bool m_bComplexCategoriesAxis; 99cdf0e10cSrcweir }; 100cdf0e10cSrcweir 101cdf0e10cSrcweir /************************************************************************* 102cdf0e10cSrcweir |* 103cdf0e10cSrcweir |* dialog for properties of different chart object 104cdf0e10cSrcweir |* 105cdf0e10cSrcweir \************************************************************************/ 106cdf0e10cSrcweir 107cdf0e10cSrcweir class ViewElementListProvider; 108cdf0e10cSrcweir 109cdf0e10cSrcweir class SchAttribTabDlg : public SfxTabDialog 110cdf0e10cSrcweir { 111cdf0e10cSrcweir private: 112cdf0e10cSrcweir ObjectType eObjectType; 113cdf0e10cSrcweir bool bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles) 114cdf0e10cSrcweir sal_uInt16 nDlgType; 115cdf0e10cSrcweir sal_uInt16 nPageType; 116cdf0e10cSrcweir 117cdf0e10cSrcweir const ObjectPropertiesDialogParameter * const m_pParameter; 118cdf0e10cSrcweir const ViewElementListProvider* const m_pViewElementListProvider; 119cdf0e10cSrcweir SvNumberFormatter* m_pNumberFormatter; 120cdf0e10cSrcweir 121cdf0e10cSrcweir SfxItemSet* m_pSymbolShapeProperties; 122cdf0e10cSrcweir Graphic* m_pAutoSymbolGraphic; 123cdf0e10cSrcweir 124cdf0e10cSrcweir double m_fAxisMinorStepWidthForErrorBarDecimals; 125cdf0e10cSrcweir bool m_bOKPressed; 126cdf0e10cSrcweir 127cdf0e10cSrcweir virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage); 128cdf0e10cSrcweir 129cdf0e10cSrcweir Link m_aOriginalOKClickHdl; 130cdf0e10cSrcweir DECL_LINK( OKPressed, void * ); 131cdf0e10cSrcweir 132cdf0e10cSrcweir public: 133cdf0e10cSrcweir SchAttribTabDlg(Window* pParent, const SfxItemSet* pAttr, 134cdf0e10cSrcweir const ObjectPropertiesDialogParameter* pDialogParameter, 135cdf0e10cSrcweir const ViewElementListProvider* pViewElementListProvider, 136cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 137cdf0e10cSrcweir ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier ); 138cdf0e10cSrcweir virtual ~SchAttribTabDlg(); 139cdf0e10cSrcweir 140cdf0e10cSrcweir //pSymbolShapeProperties: Properties to be set on the symbollist shapes 141cdf0e10cSrcweir //pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected 142cdf0e10cSrcweir //this class takes ownership over both parameter 143cdf0e10cSrcweir void setSymbolInformation( SfxItemSet* pSymbolShapeProperties, Graphic* pAutoSymbolGraphic ); 144cdf0e10cSrcweir 145cdf0e10cSrcweir void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth ); 146cdf0e10cSrcweir 147cdf0e10cSrcweir bool DialogWasClosedWithOK() const; 148cdf0e10cSrcweir }; 149cdf0e10cSrcweir 150cdf0e10cSrcweir //............................................................................. 151cdf0e10cSrcweir } //namespace chart 152cdf0e10cSrcweir //............................................................................. 153cdf0e10cSrcweir 154cdf0e10cSrcweir #endif 155cdf0e10cSrcweir 156