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 #pragma once
21 
22 #include <vcl/weld.hxx>
23 
24 class ScTableProtection;
25 
27 {
28 public:
29  ScTableProtectionDlg() = delete;
30  explicit ScTableProtectionDlg(weld::Window* pParent);
31  virtual ~ScTableProtectionDlg() override;
32 
34 
35  void WriteData(ScTableProtection& rData) const;
36 
37 private:
38  void Init();
39 
40  void EnableOptionalWidgets(bool bEnable);
41 
44  OUString m_aInsertColumns;
45  OUString m_aInsertRows;
46  OUString m_aDeleteColumns;
47  OUString m_aDeleteRows;
48 
49  std::unique_ptr<weld::CheckButton> m_xBtnProtect;
50  std::unique_ptr<weld::Container> m_xPasswords;
51  std::unique_ptr<weld::Container> m_xOptions;
52  std::unique_ptr<weld::Entry> m_xPassword1Edit;
53  std::unique_ptr<weld::Entry> m_xPassword2Edit;
54  std::unique_ptr<weld::TreeView> m_xOptionsListBox;
55  std::unique_ptr<weld::Button> m_xBtnOk;
56  std::unique_ptr<weld::Label> m_xProtected;
57  std::unique_ptr<weld::Label> m_xUnprotected;
58  std::unique_ptr<weld::Label> m_xInsertColumns;
59  std::unique_ptr<weld::Label> m_xInsertRows;
60  std::unique_ptr<weld::Label> m_xDeleteColumns;
61  std::unique_ptr<weld::Label> m_xDeleteRows;
62 
63  void InsertEntry(const OUString& rTxt);
64 
65  DECL_LINK(OKHdl, weld::Button&, void);
66  DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
67  DECL_LINK(PasswordModifyHdl, weld::Entry&, void);
68 };
69 
70 /* 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