xref: /trunk/main/sc/source/ui/inc/tabpages.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_TABPAGES_HXX
29 #define SC_TABPAGES_HXX
30 
31 #ifndef _GROUP_HXX //autogen
32 #include <vcl/group.hxx>
33 #endif
34 #include <svtools/stdctrl.hxx>
35 #include <sfx2/tabdlg.hxx>
36 
37 //========================================================================
38 
39 class ScTabPageProtection : public SfxTabPage
40 {
41 public:
42     static  SfxTabPage* Create          ( Window*               pParent,
43                                           const SfxItemSet&     rAttrSet );
44     static  sal_uInt16*     GetRanges       ();
45     virtual sal_Bool        FillItemSet     ( SfxItemSet& rCoreAttrs );
46     virtual void        Reset           ( const SfxItemSet& );
47 
48 protected:
49     using SfxTabPage::DeactivatePage;
50     virtual int         DeactivatePage  ( SfxItemSet* pSet = NULL );
51 
52 private:
53                 ScTabPageProtection( Window*            pParent,
54                                      const SfxItemSet&  rCoreAttrs );
55                 ~ScTabPageProtection();
56 
57 private:
58     FixedLine   aFlProtect;
59     TriStateBox aBtnHideCell;
60     TriStateBox aBtnProtect;
61     TriStateBox aBtnHideFormula;
62     FixedInfo   aTxtHint;
63 
64     FixedLine   aFlPrint;
65     TriStateBox aBtnHidePrint;
66     FixedInfo   aTxtHint2;
67 
68                                     // aktueller Status:
69     sal_Bool        bTriEnabled;        //  wenn vorher Dont-Care
70     sal_Bool        bDontCare;          //  alles auf TriState
71     sal_Bool        bProtect;           //  einzelne Einstellungen ueber TriState sichern
72     sal_Bool        bHideForm;
73     sal_Bool        bHideCell;
74     sal_Bool        bHidePrint;
75 
76     // Handler:
77     DECL_LINK( ButtonClickHdl, TriStateBox* pBox );
78     void        UpdateButtons();
79 };
80 
81 
82 
83 #endif // SC_TABPAGES_HXX
84