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 #ifndef _CHART2_DLG_INSERT_ERRORBARS_HXX 24 #define _CHART2_DLG_INSERT_ERRORBARS_HXX 25 26 #include <vcl/dialog.hxx> 27 #include <vcl/button.hxx> 28 #include <svl/itemset.hxx> 29 #include <memory> 30 #include <com/sun/star/frame/XModel.hpp> 31 32 #include "res_ErrorBar.hxx" 33 34 //............................................................................. 35 namespace chart 36 { 37 //............................................................................. 38 39 class InsertErrorBarsDialog : public ModalDialog 40 { 41 public: 42 InsertErrorBarsDialog( Window* pParent, const SfxItemSet& rMyAttrs, 43 const ::com::sun::star::uno::Reference< 44 ::com::sun::star::chart2::XChartDocument > & xChartDocument, 45 ErrorBarResources::tErrorBarType eType = ErrorBarResources::ERROR_BAR_Y ); 46 virtual ~InsertErrorBarsDialog(); 47 48 void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth ); 49 50 static double getAxisMinorStepWidthForErrorBarDecimals( 51 const ::com::sun::star::uno::Reference< 52 ::com::sun::star::frame::XModel >& xChartModel, 53 const ::com::sun::star::uno::Reference< 54 ::com::sun::star::uno::XInterface >& xChartView, 55 const ::rtl::OUString& rSelectedObjectCID ); 56 57 void FillItemSet( SfxItemSet& rOutAttrs ); 58 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 59 60 private: 61 const SfxItemSet & rInAttrs; 62 63 OKButton aBtnOK; 64 CancelButton aBtnCancel; 65 HelpButton aBtnHelp; 66 67 ::std::auto_ptr< ErrorBarResources > m_apErrorBarResources; 68 }; 69 70 //............................................................................. 71 } //namespace chart 72 //............................................................................. 73 74 #endif 75