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_UI_PROTECTION_DLG_HXX 25 #define SC_UI_PROTECTION_DLG_HXX 26 27 #include <vcl/dialog.hxx> 28 #include <vcl/button.hxx> 29 #include <vcl/fixed.hxx> 30 #include <vcl/edit.hxx> 31 #include <svx/checklbx.hxx> 32 33 class Window; 34 class ScTableProtection; 35 36 class ScTableProtectionDlg : public ModalDialog 37 { 38 public: 39 explicit ScTableProtectionDlg(Window* pParent); 40 virtual ~ScTableProtectionDlg(); 41 42 virtual short Execute(); 43 44 void SetDialogData(const ScTableProtection& rData); 45 46 void WriteData(ScTableProtection& rData) const; 47 48 private: 49 ScTableProtectionDlg(); // disabled 50 51 void Init(); 52 53 void EnableOptionalWidgets(bool bEnable = true); 54 55 CheckBox maBtnProtect; 56 57 FixedText maPassword1Text; 58 Edit maPassword1Edit; 59 FixedText maPassword2Text; 60 Edit maPassword2Edit; 61 62 FixedLine maOptionsLine; 63 FixedText maOptionsText; 64 SvxCheckListBox maOptionsListBox; 65 66 OKButton maBtnOk; 67 CancelButton maBtnCancel; 68 HelpButton maBtnHelp; 69 70 String maSelectLockedCells; 71 String maSelectUnlockedCells; 72 73 DECL_LINK( OKHdl, OKButton* ); 74 DECL_LINK( CheckBoxHdl, CheckBox* ); 75 DECL_LINK( PasswordModifyHdl, Edit* ); 76 }; 77 78 #endif 79