update dev300-m58
[ooovba.git] / chart2 / source / controller / dialogs / tp_ErrorBars.cxx
blob1019a9eb4c9887ec9d80dd2d772a3ef0e47a010d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tp_ErrorBars.cxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_chart2.hxx"
34 #include "tp_ErrorBars.hxx"
35 #include "ResId.hxx"
36 #include "TabPages.hrc"
37 #include "TabPageNotifiable.hxx"
39 using namespace ::com::sun::star;
41 //.............................................................................
42 namespace chart
44 //.............................................................................
46 ErrorBarsTabPage::ErrorBarsTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
47 SfxTabPage( pParent, SchResId( TP_YERRORBAR ), rInAttrs ),
48 m_aErrorBarResources(
49 this,
50 // the parent is the tab control, of which the parent is the dialog
51 dynamic_cast< Dialog * >( pParent->GetParent() ),
52 rInAttrs, /* bNoneAvailable = */ false )
54 FreeResource();
57 ErrorBarsTabPage::~ErrorBarsTabPage()
61 SfxTabPage* ErrorBarsTabPage::Create(
62 Window* pParent, const SfxItemSet& rOutAttrs )
64 return new ErrorBarsTabPage( pParent, rOutAttrs );
67 BOOL ErrorBarsTabPage::FillItemSet( SfxItemSet& rOutAttrs )
69 return m_aErrorBarResources.FillItemSet( rOutAttrs );
72 void ErrorBarsTabPage::Reset( const SfxItemSet& rInAttrs )
74 m_aErrorBarResources.Reset( rInAttrs );
77 void ErrorBarsTabPage::DataChanged( const DataChangedEvent& rDCEvt )
79 SfxTabPage::DataChanged( rDCEvt );
81 if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
82 m_aErrorBarResources.FillValueSets();
85 void ErrorBarsTabPage::SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth )
87 m_aErrorBarResources.SetAxisMinorStepWidthForErrorBarDecimals( fMinorStepWidth );
90 void ErrorBarsTabPage::SetErrorBarType( ErrorBarResources::tErrorBarType eNewType )
92 m_aErrorBarResources.SetErrorBarType( eNewType );
95 void ErrorBarsTabPage::SetChartDocumentForRangeChoosing(
96 const uno::Reference< chart2::XChartDocument > & xChartDocument )
98 m_aErrorBarResources.SetChartDocumentForRangeChoosing( xChartDocument );
101 //.............................................................................
102 } //namespace chart
103 //.............................................................................