1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tptable.hxx,v $
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
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
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
);
71 ScTablePage( Window
* pParent
, const SfxItemSet
& rCoreSet
);
72 virtual ~ScTablePage();
78 RadioButton aBtnTopDown
;
79 RadioButton aBtnLeftRight
;
80 FixedImage aBmpPageDir
;
83 Image aImgLeftRightHC
;
86 NumericField aEdPageNo
;
94 CheckBox aBtnDrawings
;
95 CheckBox aBtnFormulas
;
96 CheckBox aBtnNullVals
;
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
;
111 //------------------------------------
113 DECL_LINK( PageDirHdl
, RadioButton
* );
114 DECL_LINK( PageNoHdl
, CheckBox
* );
115 DECL_LINK( ScaleHdl
, ListBox
* );
118 #endif // SC_TPTABLE_HXX