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 SC_TPUSRLST_HXX
21 #define SC_TPUSRLST_HXX
23 #include <sfx2/tabdlg.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/lstbox.hxx>
26 #include <vcl/vclmedit.hxx>
28 //========================================================================
35 class ScTpUserLists
: public SfxTabPage
38 static SfxTabPage
* Create ( Window
* pParent
,
39 const SfxItemSet
& rAttrSet
);
40 virtual sal_Bool
FillItemSet ( SfxItemSet
& rCoreAttrs
);
41 virtual void Reset ( const SfxItemSet
& rCoreAttrs
);
42 using SfxTabPage::DeactivatePage
;
43 virtual int DeactivatePage ( SfxItemSet
* pSet
= NULL
);
46 ScTpUserLists( Window
* pParent
,
47 const SfxItemSet
& rArgSet
);
53 FixedText
* mpFtEntries
;
54 VclMultiLineEdit
* mpEdEntries
;
55 FixedText
* mpFtCopyFrom
;
59 PushButton
* mpBtnDiscard
;
62 PushButton
* mpBtnModify
;
64 PushButton
* mpBtnRemove
;
66 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
;
84 sal_uInt16 nCancelPos
;
89 sal_uInt16
UpdateUserListBox ();
90 void UpdateEntries ( size_t nList
);
91 void MakeListStr ( OUString
& rListStr
);
92 void AddNewList ( const OUString
& rEntriesStr
);
93 void RemoveList ( size_t nList
);
94 void ModifyList ( sal_uInt16 nSelList
,
95 const OUString
& rEntriesStr
);
96 void CopyListFromArea ( const ScRefAddress
& rStartPos
,
97 const ScRefAddress
& rEndPos
);
100 DECL_LINK( LbSelectHdl
, ListBox
* );
101 DECL_LINK( BtnClickHdl
, PushButton
* );
102 DECL_LINK( EdEntriesModHdl
, VclMultiLineEdit
* );
108 #endif // SC_TPUSRLST_HXX
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */