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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_TPUSRLST_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_TPUSRLST_HXX
23 #include <sfx2/tabdlg.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/lstbox.hxx>
26 #include <vcl/vclmedit.hxx>
33 class ScTpUserLists
: public SfxTabPage
35 friend class VclPtr
<ScTpUserLists
>;
37 static VclPtr
<SfxTabPage
> Create ( vcl::Window
* pParent
,
38 const SfxItemSet
* rAttrSet
);
39 virtual bool FillItemSet ( SfxItemSet
* rCoreAttrs
) SAL_OVERRIDE
;
40 virtual void Reset ( const SfxItemSet
* rCoreAttrs
) SAL_OVERRIDE
;
41 using SfxTabPage::DeactivatePage
;
42 virtual sfxpg
DeactivatePage ( SfxItemSet
* pSet
= NULL
) SAL_OVERRIDE
;
45 ScTpUserLists( vcl::Window
* pParent
,
46 const SfxItemSet
& rArgSet
);
47 virtual ~ScTpUserLists();
48 virtual void dispose() SAL_OVERRIDE
;
51 VclPtr
<FixedText
> mpFtLists
;
52 VclPtr
<ListBox
> mpLbLists
;
53 VclPtr
<FixedText
> mpFtEntries
;
54 VclPtr
<VclMultiLineEdit
> mpEdEntries
;
55 VclPtr
<FixedText
> mpFtCopyFrom
;
56 VclPtr
<Edit
> mpEdCopyFrom
;
58 VclPtr
<PushButton
> mpBtnNew
;
59 VclPtr
<PushButton
> mpBtnDiscard
;
61 VclPtr
<PushButton
> mpBtnAdd
;
62 VclPtr
<PushButton
> mpBtnModify
;
64 VclPtr
<PushButton
> mpBtnRemove
;
66 VclPtr
<PushButton
> mpBtnCopy
;
68 const OUString aStrQueryRemove
;
69 const OUString aStrCopyList
;
70 const OUString aStrCopyFrom
;
71 const OUString aStrCopyErr
;
73 const sal_uInt16 nWhichUserLists
;
74 ScUserList
* pUserLists
;
77 ScViewData
* pViewData
;
78 ScRangeUtil
* pRangeUtil
;
79 OUString aStrSelectedArea
;
87 size_t UpdateUserListBox ();
88 void UpdateEntries ( size_t nList
);
89 static void MakeListStr ( OUString
& rListStr
);
90 void AddNewList ( const OUString
& rEntriesStr
);
91 void RemoveList ( size_t nList
);
92 void ModifyList ( size_t nSelList
,
93 const OUString
& rEntriesStr
);
94 void CopyListFromArea ( const ScRefAddress
& rStartPos
,
95 const ScRefAddress
& rEndPos
);
98 DECL_LINK( LbSelectHdl
, ListBox
* );
99 DECL_LINK( BtnClickHdl
, PushButton
* );
100 DECL_LINK( EdEntriesModHdl
, VclMultiLineEdit
* );
103 #endif // INCLUDED_SC_SOURCE_UI_INC_TPUSRLST_HXX
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */