Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef SC_TPTABLE_HXX
30 : : #define SC_TPTABLE_HXX
31 : :
32 : : #include <sfx2/tabdlg.hxx>
33 : : #include <vcl/fixed.hxx>
34 : : #include <vcl/lstbox.hxx>
35 : : #include <vcl/field.hxx>
36 : :
37 : : //===================================================================
38 : :
39 : : /** A vcl/NumericField that additionally supports empty text.
40 : : @descr Value 0 is set as empty text, and empty text is returned as 0. */
41 : 0 : class EmptyNumericField : public NumericField
42 : : {
43 : : public:
44 : : inline explicit EmptyNumericField( Window* pParent, WinBits nWinStyle ) :
45 : : NumericField( pParent, nWinStyle ) {}
46 : 0 : inline explicit EmptyNumericField( Window* pParent, const ResId& rResId ) :
47 : 0 : NumericField( pParent, rResId ) {}
48 : :
49 : : virtual void Modify();
50 : : virtual void SetValue( sal_Int64 nValue );
51 : : virtual sal_Int64 GetValue() const;
52 : : };
53 : :
54 : : //===================================================================
55 : :
56 : : class ScTablePage : public SfxTabPage
57 : : {
58 : : public:
59 : : static SfxTabPage* Create ( Window* pParent,
60 : : const SfxItemSet& rCoreSet );
61 : : static sal_uInt16* GetRanges ();
62 : : virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
63 : : virtual void Reset ( const SfxItemSet& rCoreSet );
64 : : using SfxTabPage::DeactivatePage;
65 : : virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
66 : : virtual void DataChanged ( const DataChangedEvent& rDCEvt );
67 : :
68 : : private:
69 : : ScTablePage( Window* pParent, const SfxItemSet& rCoreSet );
70 : : virtual ~ScTablePage();
71 : :
72 : : void ShowImage();
73 : :
74 : : private:
75 : : FixedLine aFlPageDir;
76 : : RadioButton aBtnTopDown;
77 : : RadioButton aBtnLeftRight;
78 : : FixedImage aBmpPageDir;
79 : : Image aImgLeftRight;
80 : : Image aImgTopDown;
81 : : CheckBox aBtnPageNo;
82 : : NumericField aEdPageNo;
83 : :
84 : : FixedLine aFlPrint;
85 : : CheckBox aBtnHeaders;
86 : : CheckBox aBtnGrid;
87 : : CheckBox aBtnNotes;
88 : : CheckBox aBtnObjects;
89 : : CheckBox aBtnCharts;
90 : : CheckBox aBtnDrawings;
91 : : CheckBox aBtnFormulas;
92 : : CheckBox aBtnNullVals;
93 : :
94 : : FixedLine aFlScale;
95 : : FixedText aFtScaleMode;
96 : : ListBox aLbScaleMode;
97 : : FixedText aFtScaleAll;
98 : : MetricField aEdScaleAll;
99 : : FixedText aFtScalePageWidth;
100 : : EmptyNumericField aEdScalePageWidth;
101 : : FixedText aFtScalePageHeight;
102 : : EmptyNumericField aEdScalePageHeight;
103 : : FixedText aFtScalePageNum;
104 : : NumericField aEdScalePageNum;
105 : :
106 : : private:
107 : : //------------------------------------
108 : : // Handler:
109 : : DECL_LINK(PageDirHdl, void *);
110 : : DECL_LINK( PageNoHdl, CheckBox* );
111 : : DECL_LINK(ScaleHdl, void *);
112 : : };
113 : :
114 : : #endif // SC_TPTABLE_HXX
115 : :
116 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|