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 SC_TPTABLE_HXX 25 #define SC_TPTABLE_HXX 26 27 #include <sfx2/tabdlg.hxx> 28 #include <vcl/fixed.hxx> 29 #include <vcl/lstbox.hxx> 30 #include <vcl/field.hxx> 31 32 //=================================================================== 33 34 /** A vcl/NumericField that additionally supports empty text. 35 @descr Value 0 is set as empty text, and empty text is returned as 0. */ 36 class EmptyNumericField : public NumericField 37 { 38 public: EmptyNumericField(Window * pParent,WinBits nWinStyle)39 inline explicit EmptyNumericField( Window* pParent, WinBits nWinStyle ) : 40 NumericField( pParent, nWinStyle ) {} EmptyNumericField(Window * pParent,const ResId & rResId)41 inline explicit EmptyNumericField( Window* pParent, const ResId& rResId ) : 42 NumericField( pParent, rResId ) {} 43 44 virtual void Modify(); 45 virtual void SetValue( sal_Int64 nValue ); 46 virtual sal_Int64 GetValue() const; 47 }; 48 49 //=================================================================== 50 51 class ScTablePage : public SfxTabPage 52 { 53 public: 54 static SfxTabPage* Create ( Window* pParent, 55 const SfxItemSet& rCoreSet ); 56 static sal_uInt16* GetRanges (); 57 virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet ); 58 virtual void Reset ( const SfxItemSet& rCoreSet ); 59 using SfxTabPage::DeactivatePage; 60 virtual int DeactivatePage ( SfxItemSet* pSet = NULL ); 61 virtual void DataChanged ( const DataChangedEvent& rDCEvt ); 62 63 private: 64 ScTablePage( Window* pParent, const SfxItemSet& rCoreSet ); 65 virtual ~ScTablePage(); 66 67 void ShowImage(); 68 69 private: 70 FixedLine aFlPageDir; 71 RadioButton aBtnTopDown; 72 RadioButton aBtnLeftRight; 73 FixedImage aBmpPageDir; 74 Image aImgLeftRight; 75 Image aImgTopDown; 76 Image aImgLeftRightHC; 77 Image aImgTopDownHC; 78 CheckBox aBtnPageNo; 79 NumericField aEdPageNo; 80 81 FixedLine aFlPrint; 82 CheckBox aBtnHeaders; 83 CheckBox aBtnGrid; 84 CheckBox aBtnNotes; 85 CheckBox aBtnObjects; 86 CheckBox aBtnCharts; 87 CheckBox aBtnDrawings; 88 CheckBox aBtnFormulas; 89 CheckBox aBtnNullVals; 90 91 FixedLine aFlScale; 92 FixedText aFtScaleMode; 93 ListBox aLbScaleMode; 94 FixedText aFtScaleAll; 95 MetricField aEdScaleAll; 96 FixedText aFtScalePageWidth; 97 EmptyNumericField aEdScalePageWidth; 98 FixedText aFtScalePageHeight; 99 EmptyNumericField aEdScalePageHeight; 100 FixedText aFtScalePageNum; 101 NumericField aEdScalePageNum; 102 103 private: 104 //------------------------------------ 105 // Handler: 106 DECL_LINK( PageDirHdl, RadioButton* ); 107 DECL_LINK( PageNoHdl, CheckBox* ); 108 DECL_LINK( ScaleHdl, ListBox* ); 109 }; 110 111 #endif // SC_TPTABLE_HXX 112