Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef SC_TPTABLE_HXX
21 : #define SC_TPTABLE_HXX
22 :
23 : #include <sfx2/tabdlg.hxx>
24 : #include <vcl/fixed.hxx>
25 : #include <vcl/lstbox.hxx>
26 : #include <vcl/field.hxx>
27 :
28 : //===================================================================
29 :
30 : /** A vcl/NumericField that additionally supports empty text.
31 : @descr Value 0 is set as empty text, and empty text is returned as 0. */
32 0 : class EmptyNumericField : public NumericField
33 : {
34 : public:
35 : inline explicit EmptyNumericField( Window* pParent, WinBits nWinStyle ) :
36 : NumericField( pParent, nWinStyle ) {}
37 0 : inline explicit EmptyNumericField( Window* pParent, const ResId& rResId ) :
38 0 : NumericField( pParent, rResId ) {}
39 :
40 : virtual void Modify();
41 : virtual void SetValue( sal_Int64 nValue );
42 : virtual sal_Int64 GetValue() const;
43 : };
44 :
45 : //===================================================================
46 :
47 : class ScTablePage : public SfxTabPage
48 : {
49 : public:
50 : static SfxTabPage* Create ( Window* pParent,
51 : const SfxItemSet& rCoreSet );
52 : static sal_uInt16* GetRanges ();
53 : virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet );
54 : virtual void Reset ( const SfxItemSet& rCoreSet );
55 : using SfxTabPage::DeactivatePage;
56 : virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
57 : virtual void DataChanged ( const DataChangedEvent& rDCEvt );
58 :
59 : private:
60 : ScTablePage( Window* pParent, const SfxItemSet& rCoreSet );
61 : virtual ~ScTablePage();
62 :
63 : void ShowImage();
64 :
65 : private:
66 : FixedLine aFlPageDir;
67 : RadioButton aBtnTopDown;
68 : RadioButton aBtnLeftRight;
69 : FixedImage aBmpPageDir;
70 : Image aImgLeftRight;
71 : Image aImgTopDown;
72 : CheckBox aBtnPageNo;
73 : NumericField aEdPageNo;
74 :
75 : FixedLine aFlPrint;
76 : CheckBox aBtnHeaders;
77 : CheckBox aBtnGrid;
78 : CheckBox aBtnNotes;
79 : CheckBox aBtnObjects;
80 : CheckBox aBtnCharts;
81 : CheckBox aBtnDrawings;
82 : CheckBox aBtnFormulas;
83 : CheckBox aBtnNullVals;
84 :
85 : FixedLine aFlScale;
86 : FixedText aFtScaleMode;
87 : ListBox aLbScaleMode;
88 : FixedText aFtScaleAll;
89 : MetricField aEdScaleAll;
90 : FixedText aFtScalePageWidth;
91 : EmptyNumericField aEdScalePageWidth;
92 : FixedText aFtScalePageHeight;
93 : EmptyNumericField aEdScalePageHeight;
94 : FixedText aFtScalePageNum;
95 : NumericField aEdScalePageNum;
96 :
97 : private:
98 : //------------------------------------
99 : // Handler:
100 : DECL_LINK(PageDirHdl, void *);
101 : DECL_LINK( PageNoHdl, CheckBox* );
102 : DECL_LINK(ScaleHdl, void *);
103 : };
104 :
105 : #endif // SC_TPTABLE_HXX
106 :
107 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|