1*cde9e8dcSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*cde9e8dcSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*cde9e8dcSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*cde9e8dcSAndrew Rist  * distributed with this work for additional information
6*cde9e8dcSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*cde9e8dcSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*cde9e8dcSAndrew Rist  * "License"); you may not use this file except in compliance
9*cde9e8dcSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*cde9e8dcSAndrew Rist  *
11*cde9e8dcSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*cde9e8dcSAndrew Rist  *
13*cde9e8dcSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*cde9e8dcSAndrew Rist  * software distributed under the License is distributed on an
15*cde9e8dcSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*cde9e8dcSAndrew Rist  * KIND, either express or implied.  See the License for the
17*cde9e8dcSAndrew Rist  * specific language governing permissions and limitations
18*cde9e8dcSAndrew Rist  * under the License.
19*cde9e8dcSAndrew Rist  *
20*cde9e8dcSAndrew Rist  *************************************************************/
21*cde9e8dcSAndrew Rist 
22*cde9e8dcSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_chart2.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "tp_ErrorBars.hxx"
28cdf0e10cSrcweir #include "ResId.hxx"
29cdf0e10cSrcweir #include "TabPages.hrc"
30cdf0e10cSrcweir #include "TabPageNotifiable.hxx"
31cdf0e10cSrcweir 
32cdf0e10cSrcweir using namespace ::com::sun::star;
33cdf0e10cSrcweir 
34cdf0e10cSrcweir //.............................................................................
35cdf0e10cSrcweir namespace chart
36cdf0e10cSrcweir {
37cdf0e10cSrcweir //.............................................................................
38cdf0e10cSrcweir 
ErrorBarsTabPage(Window * pParent,const SfxItemSet & rInAttrs)39cdf0e10cSrcweir ErrorBarsTabPage::ErrorBarsTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
40cdf0e10cSrcweir         SfxTabPage( pParent, SchResId( TP_YERRORBAR ), rInAttrs ),
41cdf0e10cSrcweir         m_aErrorBarResources(
42cdf0e10cSrcweir             this,
43cdf0e10cSrcweir             // the parent is the tab control, of which the parent is the dialog
44cdf0e10cSrcweir             dynamic_cast< Dialog * >( pParent->GetParent() ),
45cdf0e10cSrcweir             rInAttrs, /* bNoneAvailable = */ false )
46cdf0e10cSrcweir {
47cdf0e10cSrcweir     FreeResource();
48cdf0e10cSrcweir }
49cdf0e10cSrcweir 
~ErrorBarsTabPage()50cdf0e10cSrcweir ErrorBarsTabPage::~ErrorBarsTabPage()
51cdf0e10cSrcweir {
52cdf0e10cSrcweir }
53cdf0e10cSrcweir 
Create(Window * pParent,const SfxItemSet & rOutAttrs)54cdf0e10cSrcweir SfxTabPage* ErrorBarsTabPage::Create(
55cdf0e10cSrcweir     Window* pParent, const SfxItemSet& rOutAttrs )
56cdf0e10cSrcweir {
57cdf0e10cSrcweir     return new ErrorBarsTabPage( pParent, rOutAttrs );
58cdf0e10cSrcweir }
59cdf0e10cSrcweir 
FillItemSet(SfxItemSet & rOutAttrs)60cdf0e10cSrcweir sal_Bool ErrorBarsTabPage::FillItemSet( SfxItemSet& rOutAttrs )
61cdf0e10cSrcweir {
62cdf0e10cSrcweir     return m_aErrorBarResources.FillItemSet( rOutAttrs );
63cdf0e10cSrcweir }
64cdf0e10cSrcweir 
Reset(const SfxItemSet & rInAttrs)65cdf0e10cSrcweir void ErrorBarsTabPage::Reset( const SfxItemSet& rInAttrs )
66cdf0e10cSrcweir {
67cdf0e10cSrcweir     m_aErrorBarResources.Reset( rInAttrs );
68cdf0e10cSrcweir }
69cdf0e10cSrcweir 
DataChanged(const DataChangedEvent & rDCEvt)70cdf0e10cSrcweir void ErrorBarsTabPage::DataChanged( const DataChangedEvent& rDCEvt )
71cdf0e10cSrcweir {
72cdf0e10cSrcweir     SfxTabPage::DataChanged( rDCEvt );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
75cdf0e10cSrcweir         m_aErrorBarResources.FillValueSets();
76cdf0e10cSrcweir }
77cdf0e10cSrcweir 
SetAxisMinorStepWidthForErrorBarDecimals(double fMinorStepWidth)78cdf0e10cSrcweir void ErrorBarsTabPage::SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth )
79cdf0e10cSrcweir {
80cdf0e10cSrcweir     m_aErrorBarResources.SetAxisMinorStepWidthForErrorBarDecimals( fMinorStepWidth );
81cdf0e10cSrcweir }
82cdf0e10cSrcweir 
SetErrorBarType(ErrorBarResources::tErrorBarType eNewType)83cdf0e10cSrcweir void ErrorBarsTabPage::SetErrorBarType( ErrorBarResources::tErrorBarType eNewType )
84cdf0e10cSrcweir {
85cdf0e10cSrcweir     m_aErrorBarResources.SetErrorBarType( eNewType );
86cdf0e10cSrcweir }
87cdf0e10cSrcweir 
SetChartDocumentForRangeChoosing(const uno::Reference<chart2::XChartDocument> & xChartDocument)88cdf0e10cSrcweir void ErrorBarsTabPage::SetChartDocumentForRangeChoosing(
89cdf0e10cSrcweir     const uno::Reference< chart2::XChartDocument > & xChartDocument )
90cdf0e10cSrcweir {
91cdf0e10cSrcweir     m_aErrorBarResources.SetChartDocumentForRangeChoosing( xChartDocument );
92cdf0e10cSrcweir }
93cdf0e10cSrcweir 
94cdf0e10cSrcweir //.............................................................................
95cdf0e10cSrcweir } //namespace chart
96cdf0e10cSrcweir //.............................................................................
97