merge the formfield patch from ooo-build
[ooovba.git] / sc / source / ui / inc / tptable.hxx
blob3783d5297a5abe6b851f0fccfdf2c1c67cfd8052
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: tptable.hxx,v $
10 * $Revision: 1.9 $
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 #ifndef SC_TPTABLE_HXX
32 #define SC_TPTABLE_HXX
34 #include <sfx2/tabdlg.hxx>
35 #include <vcl/fixed.hxx>
36 #include <vcl/lstbox.hxx>
37 #include <vcl/field.hxx>
39 //===================================================================
41 /** A vcl/NumericField that additionally supports empty text.
42 @descr Value 0 is set as empty text, and empty text is returned as 0. */
43 class EmptyNumericField : public NumericField
45 public:
46 inline explicit EmptyNumericField( Window* pParent, WinBits nWinStyle ) :
47 NumericField( pParent, nWinStyle ) {}
48 inline explicit EmptyNumericField( Window* pParent, const ResId& rResId ) :
49 NumericField( pParent, rResId ) {}
51 virtual void Modify();
52 virtual void SetValue( sal_Int64 nValue );
53 virtual sal_Int64 GetValue() const;
56 //===================================================================
58 class ScTablePage : public SfxTabPage
60 public:
61 static SfxTabPage* Create ( Window* pParent,
62 const SfxItemSet& rCoreSet );
63 static USHORT* GetRanges ();
64 virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
65 virtual void Reset ( const SfxItemSet& rCoreSet );
66 using SfxTabPage::DeactivatePage;
67 virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
68 virtual void DataChanged ( const DataChangedEvent& rDCEvt );
70 private:
71 ScTablePage( Window* pParent, const SfxItemSet& rCoreSet );
72 virtual ~ScTablePage();
74 void ShowImage();
76 private:
77 FixedLine aFlPageDir;
78 RadioButton aBtnTopDown;
79 RadioButton aBtnLeftRight;
80 FixedImage aBmpPageDir;
81 Image aImgLeftRight;
82 Image aImgTopDown;
83 Image aImgLeftRightHC;
84 Image aImgTopDownHC;
85 CheckBox aBtnPageNo;
86 NumericField aEdPageNo;
88 FixedLine aFlPrint;
89 CheckBox aBtnHeaders;
90 CheckBox aBtnGrid;
91 CheckBox aBtnNotes;
92 CheckBox aBtnObjects;
93 CheckBox aBtnCharts;
94 CheckBox aBtnDrawings;
95 CheckBox aBtnFormulas;
96 CheckBox aBtnNullVals;
98 FixedLine aFlScale;
99 FixedText aFtScaleMode;
100 ListBox aLbScaleMode;
101 FixedText aFtScaleAll;
102 MetricField aEdScaleAll;
103 FixedText aFtScalePageWidth;
104 EmptyNumericField aEdScalePageWidth;
105 FixedText aFtScalePageHeight;
106 EmptyNumericField aEdScalePageHeight;
107 FixedText aFtScalePageNum;
108 NumericField aEdScalePageNum;
110 private:
111 //------------------------------------
112 // Handler:
113 DECL_LINK( PageDirHdl, RadioButton* );
114 DECL_LINK( PageNoHdl, CheckBox* );
115 DECL_LINK( ScaleHdl, ListBox* );
118 #endif // SC_TPTABLE_HXX