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
25
27{
28public:
30 explicit ScTableProtectionDlg(weld::Window* pParent);
31 virtual ~ScTableProtectionDlg() override;
32
33 void SetDialogData(const ScTableProtection& rData);
34
35 void WriteData(ScTableProtection& rData) const;
36
37private:
38 void Init();
39
40 void EnableOptionalWidgets(bool bEnable);
41
45 OUString m_aInsertRows;
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: */
OUString m_aSelectUnlockedCells
std::unique_ptr< weld::Label > m_xInsertRows
std::unique_ptr< weld::Button > m_xBtnOk
std::unique_ptr< weld::Label > m_xDeleteColumns
std::unique_ptr< weld::CheckButton > m_xBtnProtect
std::unique_ptr< weld::Label > m_xProtected
void InsertEntry(const OUString &rTxt)
void SetDialogData(const ScTableProtection &rData)
std::unique_ptr< weld::Label > m_xDeleteRows
std::unique_ptr< weld::Container > m_xOptions
void EnableOptionalWidgets(bool bEnable)
void WriteData(ScTableProtection &rData) const
virtual ~ScTableProtectionDlg() override
std::unique_ptr< weld::TreeView > m_xOptionsListBox
DECL_LINK(OKHdl, weld::Button &, void)
DECL_LINK(CheckBoxHdl, weld::Toggleable &, void)
ScTableProtectionDlg()=delete
std::unique_ptr< weld::Entry > m_xPassword1Edit
std::unique_ptr< weld::Label > m_xInsertColumns
std::unique_ptr< weld::Entry > m_xPassword2Edit
std::unique_ptr< weld::Label > m_xUnprotected
std::unique_ptr< weld::Container > m_xPasswords
DECL_LINK(PasswordModifyHdl, weld::Entry &, void)
sheet protection state container