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 #ifndef _SVX_OPTCHART_HXX 25 #define _SVX_OPTCHART_HXX 26 27 // header for SfxTabPage 28 #include <sfx2/tabdlg.hxx> 29 #include <vcl/fixed.hxx> 30 // header for ValueSet 31 #include <svtools/valueset.hxx> 32 // header for ColorLB 33 #include <svx/dlgctrl.hxx> 34 // header for PushButton 35 #ifndef _SV_BUTTON_HXX 36 #include <vcl/button.hxx> 37 #endif 38 // header for XColorList 39 #include <svx/xtable.hxx> 40 41 #include "cfgchart.hxx" 42 43 class ChartColorLB : public ColorLB 44 { 45 public: ChartColorLB(Window * pParent,ResId Id)46 ChartColorLB( Window* pParent, ResId Id ) : ColorLB( pParent, Id ) {} ChartColorLB(Window * pParent,WinBits aWB)47 ChartColorLB( Window* pParent, WinBits aWB ) : ColorLB( pParent, aWB ) {} 48 49 void FillBox( const SvxChartColorTable & rTab ); 50 }; 51 52 53 class SvxDefaultColorOptPage : public SfxTabPage 54 { 55 private: 56 FixedLine aGbChartColors; 57 ChartColorLB aLbChartColors; 58 FixedLine aGbColorBox; 59 ValueSet aValSetColorBox; 60 PushButton aPBDefault; 61 62 SvxChartOptions* pChartOptions; 63 SvxChartColorTableItem* pColorConfig; 64 XColorListSharedPtr maColorTab; 65 66 DECL_LINK( ResetToDefaults, void * ); 67 DECL_LINK( ListClickedHdl, ChartColorLB * ); 68 DECL_LINK( BoxClickedHdl, ValueSet * ); 69 70 void FillColorBox(); 71 long GetColorIndex( const Color& rCol ); 72 73 public: 74 SvxDefaultColorOptPage( Window* pParent, const SfxItemSet& rInAttrs ); 75 virtual ~SvxDefaultColorOptPage(); 76 77 void Construct(); 78 79 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); 80 virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs ); 81 virtual void Reset( const SfxItemSet& rInAttrs ); 82 }; 83 84 #endif // _SVX_OPTCHART_HXX 85 86