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: validate.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_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
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
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
);
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
* );
81 CheckBox maCbAllow
; /// Allow blank cells.
82 CheckBox maCbShow
; /// Show selection list in cell.
83 CheckBox maCbSort
; /// Sort selection list in cell.
88 MultiLineEdit maEdList
; /// Entries for explicit list
91 FixedText maFtHint
; /// Hint text for cell range validity.
98 sal_Unicode mcFmlaSep
; /// List separator in formulas.
102 //==================================================================
104 class ScTPValidationHelp
: public SfxTabPage
107 TriStateBox aTsbHelp
;
108 FixedLine aFlContent
;
111 FixedText aFtInputHelp
;
112 MultiLineEdit aEdInputHelp
;
114 const SfxItemSet
& mrArgSet
;
118 // Handler ------------------------
119 // DECL_LINK( SelectHdl, ListBox * );
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
136 TriStateBox aTsbShow
;
137 FixedLine aFlContent
;
140 PushButton aBtnSearch
;
144 MultiLineEdit aEdError
;
146 const SfxItemSet
& mrArgSet
;
150 // Handler ------------------------
151 DECL_LINK( SelectActionHdl
, ListBox
* );
152 DECL_LINK( ClickSearchHdl
, PushButton
* );
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