update dev300-m58
[ooovba.git] / sc / source / ui / inc / validate.hxx
blob6b611733bd022730916984d973aedd9a470a0b65
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: validate.hxx,v $
10 * $Revision: 1.5 $
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_VALIDATE_HXX
32 #define SC_VALIDATE_HXX
34 #include <sfx2/tabdlg.hxx>
35 #include <vcl/edit.hxx>
36 #include <vcl/fixed.hxx>
37 #include <vcl/lstbox.hxx>
38 #include <svtools/svmedit.hxx>
41 // ============================================================================
43 /** The "Validity" tab dialog. */
44 class ScValidationDlg : public SfxTabDialog
46 public:
47 explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet );
48 virtual ~ScValidationDlg();
52 // ============================================================================
54 /** The tab page "Criteria" from the Validation dialog. */
55 class ScTPValidationValue : public SfxTabPage
57 public:
58 explicit ScTPValidationValue( Window* pParent, const SfxItemSet& rArgSet );
59 virtual ~ScTPValidationValue();
61 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rArgSet );
62 static USHORT* GetRanges();
64 virtual BOOL FillItemSet( SfxItemSet& rArgSet );
65 virtual void Reset( const SfxItemSet& rArgSet );
67 private:
68 void Init();
70 String GetFirstFormula() const;
71 String GetSecondFormula() const;
73 void SetFirstFormula( const String& rFmlaStr );
74 void SetSecondFormula( const String& rFmlaStr );
76 DECL_LINK( SelectHdl, ListBox* );
77 DECL_LINK( CheckHdl, CheckBox* );
79 FixedText maFtAllow;
80 ListBox maLbAllow;
81 CheckBox maCbAllow; /// Allow blank cells.
82 CheckBox maCbShow; /// Show selection list in cell.
83 CheckBox maCbSort; /// Sort selection list in cell.
84 FixedText maFtValue;
85 ListBox maLbValue;
86 FixedText maFtMin;
87 Edit maEdMin;
88 MultiLineEdit maEdList; /// Entries for explicit list
89 FixedText maFtMax;
90 Edit maEdMax;
91 FixedText maFtHint; /// Hint text for cell range validity.
93 String maStrMin;
94 String maStrMax;
95 String maStrValue;
96 String maStrRange;
97 String maStrList;
98 sal_Unicode mcFmlaSep; /// List separator in formulas.
102 //==================================================================
104 class ScTPValidationHelp : public SfxTabPage
106 private:
107 TriStateBox aTsbHelp;
108 FixedLine aFlContent;
109 FixedText aFtTitle;
110 Edit aEdtTitle;
111 FixedText aFtInputHelp;
112 MultiLineEdit aEdInputHelp;
114 const SfxItemSet& mrArgSet;
116 void Init();
118 // Handler ------------------------
119 // DECL_LINK( SelectHdl, ListBox * );
121 public:
122 ScTPValidationHelp( Window* pParent, const SfxItemSet& rArgSet );
123 ~ScTPValidationHelp();
125 static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet );
126 static USHORT* GetRanges ();
127 virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
128 virtual void Reset ( const SfxItemSet& rArgSet );
131 //==================================================================
133 class ScTPValidationError : public SfxTabPage
135 private:
136 TriStateBox aTsbShow;
137 FixedLine aFlContent;
138 FixedText aFtAction;
139 ListBox aLbAction;
140 PushButton aBtnSearch;
141 FixedText aFtTitle;
142 Edit aEdtTitle;
143 FixedText aFtError;
144 MultiLineEdit aEdError;
146 const SfxItemSet& mrArgSet;
148 void Init();
150 // Handler ------------------------
151 DECL_LINK( SelectActionHdl, ListBox * );
152 DECL_LINK( ClickSearchHdl, PushButton * );
154 public:
155 ScTPValidationError( Window* pParent, const SfxItemSet& rArgSet );
156 ~ScTPValidationError();
158 static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet );
159 static USHORT* GetRanges ();
160 virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
161 virtual void Reset ( const SfxItemSet& rArgSet );
165 #endif // SC_VALIDATE_HXX