LibreOffice Module sc (master)  1
protectiondlg.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_PROTECTIONDLG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_PROTECTIONDLG_HXX
22 
23 #include <vcl/weld.hxx>
24 
25 class ScTableProtection;
26 
28 {
29 public:
30  ScTableProtectionDlg() = delete;
31  explicit ScTableProtectionDlg(weld::Window* pParent);
32  virtual ~ScTableProtectionDlg() override;
33 
35 
36  void WriteData(ScTableProtection& rData) const;
37 
38 private:
39  void Init();
40 
41  void EnableOptionalWidgets(bool bEnable);
42 
45  OUString m_aInsertColumns;
46  OUString m_aInsertRows;
47  OUString m_aDeleteColumns;
48  OUString m_aDeleteRows;
49 
50  std::unique_ptr<weld::CheckButton> m_xBtnProtect;
51  std::unique_ptr<weld::Container> m_xPasswords;
52  std::unique_ptr<weld::Container> m_xOptions;
53  std::unique_ptr<weld::Entry> m_xPassword1Edit;
54  std::unique_ptr<weld::Entry> m_xPassword2Edit;
55  std::unique_ptr<weld::TreeView> m_xOptionsListBox;
56  std::unique_ptr<weld::Button> m_xBtnOk;
57  std::unique_ptr<weld::Label> m_xProtected;
58  std::unique_ptr<weld::Label> m_xUnprotected;
59  std::unique_ptr<weld::Label> m_xInsertColumns;
60  std::unique_ptr<weld::Label> m_xInsertRows;
61  std::unique_ptr<weld::Label> m_xDeleteColumns;
62  std::unique_ptr<weld::Label> m_xDeleteRows;
63 
64  void InsertEntry(const OUString& rTxt);
65 
66  DECL_LINK(OKHdl, weld::Button&, void);
67  DECL_LINK(CheckBoxHdl, weld::ToggleButton&, void);
68  DECL_LINK(PasswordModifyHdl, weld::Entry&, void);
69 };
70 
71 #endif
72 
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sheet protection state container
std::unique_ptr< weld::CheckButton > m_xBtnProtect
std::unique_ptr< weld::Container > m_xOptions
void EnableOptionalWidgets(bool bEnable)
const ContentProperties & rData
std::unique_ptr< weld::Label > m_xProtected
std::unique_ptr< weld::Label > m_xInsertColumns
std::unique_ptr< weld::Label > m_xUnprotected
OUString m_aSelectUnlockedCells
DECL_LINK(OKHdl, weld::Button &, void)
std::unique_ptr< weld::Container > m_xPasswords
std::unique_ptr< weld::Label > m_xInsertRows
std::unique_ptr< weld::Entry > m_xPassword1Edit
void InsertEntry(const OUString &rTxt)
void SetDialogData(const ScTableProtection &rData)
std::unique_ptr< weld::Label > m_xDeleteRows
std::unique_ptr< weld::Label > m_xDeleteColumns
std::unique_ptr< weld::Entry > m_xPassword2Edit
std::unique_ptr< weld::Button > m_xBtnOk
ScTableProtectionDlg()=delete
virtual ~ScTableProtectionDlg() override
std::unique_ptr< weld::TreeView > m_xOptionsListBox
void WriteData(ScTableProtection &rData) const