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