Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / tptable.hxx
blob92d654c8da327fda5315a615d11f04b822c1bfe8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef SC_TPTABLE_HXX
21 #define SC_TPTABLE_HXX
23 #include <sfx2/tabdlg.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/lstbox.hxx>
26 #include <vcl/field.hxx>
28 //===================================================================
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 class EmptyNumericField : public NumericField
34 public:
35 inline explicit EmptyNumericField( Window* pParent, WinBits nWinStyle ) :
36 NumericField( pParent, nWinStyle ) {}
37 inline explicit EmptyNumericField( Window* pParent, const ResId& rResId ) :
38 NumericField( pParent, rResId ) {}
40 virtual void Modify();
41 virtual void SetValue( sal_Int64 nValue );
42 virtual sal_Int64 GetValue() const;
45 //===================================================================
47 class ScTablePage : public SfxTabPage
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 );
59 private:
60 ScTablePage( Window* pParent, const SfxItemSet& rCoreSet );
61 virtual ~ScTablePage();
63 void ShowImage();
65 private:
66 RadioButton* m_pBtnTopDown;
67 RadioButton* m_pBtnLeftRight;
68 FixedImage* m_pBmpPageDir;
69 CheckBox* m_pBtnPageNo;
70 NumericField* m_pEdPageNo;
72 CheckBox* m_pBtnHeaders;
73 CheckBox* m_pBtnGrid;
74 CheckBox* m_pBtnNotes;
75 CheckBox* m_pBtnObjects;
76 CheckBox* m_pBtnCharts;
77 CheckBox* m_pBtnDrawings;
78 CheckBox* m_pBtnFormulas;
79 CheckBox* m_pBtnNullVals;
81 ListBox* m_pLbScaleMode;
82 VclHBox* m_pBxScaleAll;
83 MetricField* m_pEdScaleAll;
84 VclGrid* m_pGrHeightWidth;
85 NumericField* m_pEdScalePageWidth;
86 NumericField* m_pEdScalePageHeight;
87 VclHBox* m_pBxScalePageNum;
88 NumericField* m_pEdScalePageNum;
90 private:
91 //------------------------------------
92 // Handler:
93 DECL_LINK(PageDirHdl, void *);
94 DECL_LINK( PageNoHdl, CheckBox* );
95 DECL_LINK(ScaleHdl, void *);
98 #endif // SC_TPTABLE_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */