xref: /AOO41X/main/sc/source/ui/inc/tabpages.hxx (revision 38d50f7b14e1cf975d8c6468d9633894cd59b523)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SC_TABPAGES_HXX
25 #define SC_TABPAGES_HXX
26 
27 #ifndef _GROUP_HXX //autogen
28 #include <vcl/group.hxx>
29 #endif
30 #include <svtools/stdctrl.hxx>
31 #include <sfx2/tabdlg.hxx>
32 
33 //========================================================================
34 
35 class ScTabPageProtection : public SfxTabPage
36 {
37 public:
38     static  SfxTabPage* Create          ( Window*               pParent,
39                                           const SfxItemSet&     rAttrSet );
40     static  sal_uInt16*     GetRanges       ();
41     virtual sal_Bool        FillItemSet     ( SfxItemSet& rCoreAttrs );
42     virtual void        Reset           ( const SfxItemSet& );
43 
44 protected:
45     using SfxTabPage::DeactivatePage;
46     virtual int         DeactivatePage  ( SfxItemSet* pSet = NULL );
47 
48 private:
49                 ScTabPageProtection( Window*            pParent,
50                                      const SfxItemSet&  rCoreAttrs );
51                 ~ScTabPageProtection();
52 
53 private:
54     FixedLine   aFlProtect;
55     TriStateBox aBtnHideCell;
56     TriStateBox aBtnProtect;
57     TriStateBox aBtnHideFormula;
58     FixedInfo   aTxtHint;
59 
60     FixedLine   aFlPrint;
61     TriStateBox aBtnHidePrint;
62     FixedInfo   aTxtHint2;
63 
64                                     // aktueller Status:
65     sal_Bool        bTriEnabled;        //  wenn vorher Dont-Care
66     sal_Bool        bDontCare;          //  alles auf TriState
67     sal_Bool        bProtect;           //  einzelne Einstellungen ueber TriState sichern
68     sal_Bool        bHideForm;
69     sal_Bool        bHideCell;
70     sal_Bool        bHidePrint;
71 
72     // Handler:
73     DECL_LINK( ButtonClickHdl, TriStateBox* pBox );
74     void        UpdateButtons();
75 };
76 
77 
78 
79 #endif // SC_TABPAGES_HXX
80