nss: upgrade to release 3.73
[LibreOffice.git] / sc / source / ui / inc / tpusrlst.hxx
blobc237da9a9fb28c008f5cc4bab125cd830a0cfe6f
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 INCLUDED_SC_SOURCE_UI_INC_TPUSRLST_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_TPUSRLST_HXX
23 #include <sfx2/tabdlg.hxx>
25 class ScUserList;
26 class ScDocument;
27 class ScViewData;
28 class ScRefAddress;
30 class ScTpUserLists : public SfxTabPage
32 public:
33 ScTpUserLists(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rArgSet);
34 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController,
35 const SfxItemSet* rAttrSet);
36 virtual ~ScTpUserLists() override;
37 virtual bool FillItemSet ( SfxItemSet* rCoreAttrs ) override;
38 virtual void Reset ( const SfxItemSet* rCoreAttrs ) override;
39 virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override;
41 private:
42 std::unique_ptr<weld::Label> mxFtLists;
43 std::unique_ptr<weld::TreeView> mxLbLists;
44 std::unique_ptr<weld::Label> mxFtEntries;
45 std::unique_ptr<weld::TextView> mxEdEntries;
46 std::unique_ptr<weld::Label> mxFtCopyFrom;
47 std::unique_ptr<weld::Entry> mxEdCopyFrom;
48 std::unique_ptr<weld::Button> mxBtnNew;
49 std::unique_ptr<weld::Button> mxBtnDiscard;
50 std::unique_ptr<weld::Button> mxBtnAdd;
51 std::unique_ptr<weld::Button> mxBtnModify;
52 std::unique_ptr<weld::Button> mxBtnRemove;
53 std::unique_ptr<weld::Button> mxBtnCopy;
55 const OUString aStrQueryRemove;
56 const OUString aStrCopyList;
57 const OUString aStrCopyFrom;
58 const OUString aStrCopyErr;
60 const sal_uInt16 nWhichUserLists;
61 std::unique_ptr<ScUserList> pUserLists;
63 ScDocument* pDoc;
64 ScViewData* pViewData;
65 OUString aStrSelectedArea;
67 bool bModifyMode;
68 bool bCancelMode;
69 bool bCopyDone;
70 sal_Int32 nCancelPos;
72 void Init ();
73 size_t UpdateUserListBox ();
74 void UpdateEntries ( size_t nList );
75 static void MakeListStr ( OUString& rListStr );
76 void AddNewList ( const OUString& rEntriesStr );
77 void RemoveList ( size_t nList );
78 void ModifyList ( size_t nSelList,
79 const OUString& rEntriesStr );
80 void CopyListFromArea ( const ScRefAddress& rStartPos,
81 const ScRefAddress& rEndPos );
83 // Handler:
84 DECL_LINK( LbSelectHdl, weld::TreeView&, void );
85 DECL_LINK( BtnClickHdl, weld::Button&, void );
86 DECL_LINK( EdEntriesModHdl, weld::TextView&, void);
89 #endif // INCLUDED_SC_SOURCE_UI_INC_TPUSRLST_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */