1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <sfx2/tabdlg.hxx>
29 class ScTpUserLists
: public SfxTabPage
32 ScTpUserLists(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rArgSet
);
33 static std::unique_ptr
<SfxTabPage
> Create(weld::Container
* pPage
, weld::DialogController
* pController
,
34 const SfxItemSet
* rAttrSet
);
35 virtual ~ScTpUserLists() override
;
37 virtual OUString
GetAllStrings() override
;
39 virtual bool FillItemSet ( SfxItemSet
* rCoreAttrs
) override
;
40 virtual void Reset ( const SfxItemSet
* rCoreAttrs
) override
;
41 virtual DeactivateRC
DeactivatePage ( SfxItemSet
* pSet
) override
;
44 std::unique_ptr
<weld::Label
> mxFtLists
;
45 std::unique_ptr
<weld::TreeView
> mxLbLists
;
46 std::unique_ptr
<weld::Label
> mxFtEntries
;
47 std::unique_ptr
<weld::TextView
> mxEdEntries
;
48 std::unique_ptr
<weld::Label
> mxFtCopyFrom
;
49 std::unique_ptr
<weld::Entry
> mxEdCopyFrom
;
50 std::unique_ptr
<weld::Button
> mxBtnNew
;
51 std::unique_ptr
<weld::Button
> mxBtnDiscard
;
52 std::unique_ptr
<weld::Button
> mxBtnAdd
;
53 std::unique_ptr
<weld::Button
> mxBtnModify
;
54 std::unique_ptr
<weld::Button
> mxBtnRemove
;
55 std::unique_ptr
<weld::Button
> mxBtnCopy
;
57 const OUString aStrQueryRemove
;
58 const OUString aStrCopyList
;
59 const OUString aStrCopyFrom
;
60 const OUString aStrCopyErr
;
62 const sal_uInt16 nWhichUserLists
;
63 std::unique_ptr
<ScUserList
> pUserLists
;
66 ScViewData
* pViewData
;
67 OUString aStrSelectedArea
;
75 size_t UpdateUserListBox ();
76 void UpdateEntries ( size_t nList
);
77 static void MakeListStr ( OUString
& rListStr
);
78 void AddNewList ( const OUString
& rEntriesStr
);
79 void RemoveList ( size_t nList
);
80 void ModifyList ( size_t nSelList
,
81 const OUString
& rEntriesStr
);
82 void CopyListFromArea ( const ScRefAddress
& rStartPos
,
83 const ScRefAddress
& rEndPos
);
86 DECL_LINK( LbSelectHdl
, weld::TreeView
&, void );
87 DECL_LINK( BtnClickHdl
, weld::Button
&, void );
88 DECL_LINK( EdEntriesModHdl
, weld::TextView
&, void);
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */