1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tpusrlst.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_TPUSRLST_HXX
32 #define SC_TPUSRLST_HXX
34 #include <sfx2/tabdlg.hxx>
35 #include <vcl/fixed.hxx>
36 #include <vcl/lstbox.hxx>
37 #include <svtools/svmedit.hxx>
39 //========================================================================
40 // Benutzerdefinierte Listen:
47 class ScTpUserLists
: public SfxTabPage
50 static SfxTabPage
* Create ( Window
* pParent
,
51 const SfxItemSet
& rAttrSet
);
52 static USHORT
* GetRanges ();
53 virtual BOOL
FillItemSet ( SfxItemSet
& rCoreAttrs
);
54 virtual void Reset ( const SfxItemSet
& rCoreAttrs
);
55 using SfxTabPage::DeactivatePage
;
56 virtual int DeactivatePage ( SfxItemSet
* pSet
= NULL
);
59 ScTpUserLists( Window
* pParent
,
60 const SfxItemSet
& rArgSet
);
67 MultiLineEdit aEdEntries
;
68 FixedText aFtCopyFrom
;
72 PushButton aBtnRemove
;
75 const String aStrQueryRemove
;
77 const String aStrCancel
;
79 const String aStrModify
;
80 const String aStrCopyList
;
81 const String aStrCopyFrom
;
82 const String aStrCopyErr
;
84 const USHORT nWhichUserLists
;
85 ScUserList
* pUserLists
;
88 ScViewData
* pViewData
;
89 ScRangeUtil
* pRangeUtil
;
90 String aStrSelectedArea
;
100 USHORT
UpdateUserListBox ();
101 void UpdateEntries ( USHORT nList
);
102 void MakeListStr ( String
& rListStr
);
103 void AddNewList ( const String
& rEntriesStr
);
104 void RemoveList ( USHORT nList
);
105 void ModifyList ( USHORT nSelList
,
106 const String
& rEntriesStr
);
107 void CopyListFromArea ( const ScRefAddress
& rStartPos
,
108 const ScRefAddress
& rEndPos
);
111 DECL_LINK( LbSelectHdl
, ListBox
* );
112 DECL_LINK( BtnClickHdl
, PushButton
* );
113 DECL_LINK( EdEntriesModHdl
, MultiLineEdit
* );
119 #endif // SC_TPUSRLST_HXX