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_RES_ERRORBAR_HXX 28*cdf0e10cSrcweir #define CHART2_RES_ERRORBAR_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include <vcl/button.hxx> 31*cdf0e10cSrcweir #include <vcl/fixed.hxx> 32*cdf0e10cSrcweir #include <vcl/field.hxx> 33*cdf0e10cSrcweir #include <vcl/lstbox.hxx> 34*cdf0e10cSrcweir #include <svtools/valueset.hxx> 35*cdf0e10cSrcweir #include <svl/itemset.hxx> 36*cdf0e10cSrcweir #include <svx/chrtitem.hxx> 37*cdf0e10cSrcweir #include "chartview/ChartSfxItemIds.hxx" 38*cdf0e10cSrcweir #include "RangeSelectionButton.hxx" 39*cdf0e10cSrcweir #include "RangeSelectionListener.hxx" 40*cdf0e10cSrcweir #include "RangeEdit.hxx" 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir #include <com/sun/star/chart2/XChartDocument.hpp> 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir #include <memory> 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir class Dialog; 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir //............................................................................. 49*cdf0e10cSrcweir namespace chart 50*cdf0e10cSrcweir { 51*cdf0e10cSrcweir //............................................................................. 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir class RangeSelectionHelper; 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir class ErrorBarResources : public RangeSelectionListenerParent 56*cdf0e10cSrcweir { 57*cdf0e10cSrcweir public: 58*cdf0e10cSrcweir enum tErrorBarType 59*cdf0e10cSrcweir { 60*cdf0e10cSrcweir ERROR_BAR_X, 61*cdf0e10cSrcweir ERROR_BAR_Y 62*cdf0e10cSrcweir }; 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir ErrorBarResources( 65*cdf0e10cSrcweir Window* pParent, Dialog * pParentDialog, const SfxItemSet& rInAttrst, 66*cdf0e10cSrcweir bool bNoneAvailable, 67*cdf0e10cSrcweir tErrorBarType eType = ERROR_BAR_Y ); 68*cdf0e10cSrcweir virtual ~ErrorBarResources(); 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth ); 71*cdf0e10cSrcweir void SetErrorBarType( tErrorBarType eNewType ); 72*cdf0e10cSrcweir void SetChartDocumentForRangeChoosing( 73*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 74*cdf0e10cSrcweir ::com::sun::star::chart2::XChartDocument > & xChartDocument ); 75*cdf0e10cSrcweir void Reset(const SfxItemSet& rInAttrs); 76*cdf0e10cSrcweir sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const; 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir void FillValueSets(); 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir // ____ RangeSelectionListenerParent ____ 81*cdf0e10cSrcweir virtual void listeningFinished( const ::rtl::OUString & rNewRange ); 82*cdf0e10cSrcweir virtual void disposingRangeSelection(); 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir private: 85*cdf0e10cSrcweir // category 86*cdf0e10cSrcweir FixedLine m_aFlErrorCategory; 87*cdf0e10cSrcweir RadioButton m_aRbNone; 88*cdf0e10cSrcweir RadioButton m_aRbConst; 89*cdf0e10cSrcweir RadioButton m_aRbPercent; 90*cdf0e10cSrcweir RadioButton m_aRbFunction; 91*cdf0e10cSrcweir RadioButton m_aRbRange; 92*cdf0e10cSrcweir ListBox m_aLbFunction; 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir // parameters 95*cdf0e10cSrcweir FixedLine m_aFlParameters; 96*cdf0e10cSrcweir FixedText m_aFtPositive; 97*cdf0e10cSrcweir MetricField m_aMfPositive; 98*cdf0e10cSrcweir RangeEdit m_aEdRangePositive; 99*cdf0e10cSrcweir RangeSelectionButton m_aIbRangePositive; 100*cdf0e10cSrcweir FixedText m_aFtNegative; 101*cdf0e10cSrcweir MetricField m_aMfNegative; 102*cdf0e10cSrcweir RangeEdit m_aEdRangeNegative; 103*cdf0e10cSrcweir RangeSelectionButton m_aIbRangeNegative; 104*cdf0e10cSrcweir CheckBox m_aCbSyncPosNeg; 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir // indicator 107*cdf0e10cSrcweir FixedLine m_aFlIndicate; 108*cdf0e10cSrcweir RadioButton m_aRbBoth; 109*cdf0e10cSrcweir RadioButton m_aRbPositive; 110*cdf0e10cSrcweir RadioButton m_aRbNegative; 111*cdf0e10cSrcweir FixedImage m_aFiBoth; 112*cdf0e10cSrcweir FixedImage m_aFiPositive; 113*cdf0e10cSrcweir FixedImage m_aFiNegative; 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir SvxChartKindError m_eErrorKind; 116*cdf0e10cSrcweir SvxChartIndicate m_eIndicate; 117*cdf0e10cSrcweir SvxChartRegress m_eTrendLineType; 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir bool m_bErrorKindUnique; 120*cdf0e10cSrcweir bool m_bIndicatorUnique; 121*cdf0e10cSrcweir bool m_bPlusUnique; 122*cdf0e10cSrcweir bool m_bMinusUnique; 123*cdf0e10cSrcweir bool m_bRangePosUnique; 124*cdf0e10cSrcweir bool m_bRangeNegUnique; 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir bool m_bNoneAvailable; 127*cdf0e10cSrcweir 128*cdf0e10cSrcweir tErrorBarType m_eErrorBarType; 129*cdf0e10cSrcweir sal_uInt16 m_nConstDecimalDigits; 130*cdf0e10cSrcweir sal_Int64 m_nConstSpinSize; 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir Window * m_pParentWindow; 133*cdf0e10cSrcweir Dialog * m_pParentDialog; 134*cdf0e10cSrcweir ::std::auto_ptr< RangeSelectionHelper > 135*cdf0e10cSrcweir m_apRangeSelectionHelper; 136*cdf0e10cSrcweir Edit * m_pCurrentRangeChoosingField; 137*cdf0e10cSrcweir bool m_bHasInternalDataProvider; 138*cdf0e10cSrcweir bool m_bDisableDataTableDialog; 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir DECL_LINK( CategoryChosen, void * ); 141*cdf0e10cSrcweir DECL_LINK( SynchronizePosAndNeg, void * ); 142*cdf0e10cSrcweir DECL_LINK( PosValueChanged, void * ); 143*cdf0e10cSrcweir DECL_LINK( IndicatorChanged, void * ); 144*cdf0e10cSrcweir DECL_LINK( ChooseRange, RangeSelectionButton * ); 145*cdf0e10cSrcweir DECL_LINK( RangeChanged, Edit * ); 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir void UpdateControlStates(); 148*cdf0e10cSrcweir bool isRangeFieldContentValid( Edit & rEdit ); 149*cdf0e10cSrcweir }; 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir //............................................................................. 152*cdf0e10cSrcweir } //namespace chart 153*cdf0e10cSrcweir //............................................................................. 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir #endif 156