Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / protectiondlg.hxx
blobad1afb98382876701da925c379a16305647795d0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SC_UI_PROTECTION_DLG_HXX
21 #define SC_UI_PROTECTION_DLG_HXX
23 #include <vcl/dialog.hxx>
24 #include <vcl/button.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/edit.hxx>
27 #include <vcl/layout.hxx>
28 #include <svx/checklbx.hxx>
30 class Window;
31 class ScTableProtection;
33 class ScTableProtectionDlg : public ModalDialog
35 public:
36 explicit ScTableProtectionDlg(Window* pParent);
37 virtual ~ScTableProtectionDlg();
39 virtual short Execute();
41 void SetDialogData(const ScTableProtection& rData);
43 void WriteData(ScTableProtection& rData) const;
45 private:
46 ScTableProtectionDlg(); // disabled
48 void Init();
50 void EnableOptionalWidgets(bool bEnable = true);
52 CheckBox* m_pBtnProtect;
54 VclContainer* m_pPasswords;
55 VclContainer* m_pOptions;
56 Edit* m_pPassword1Edit;
57 Edit* m_pPassword2Edit;
59 SvxCheckListBox* m_pOptionsListBox;
61 OKButton* m_pBtnOk;
63 OUString m_aSelectLockedCells;
64 OUString m_aSelectUnlockedCells;
66 DECL_LINK( OKHdl, void* );
67 DECL_LINK( CheckBoxHdl, CheckBox* );
68 DECL_LINK( PasswordModifyHdl, void* );
71 #endif
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */