Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / tpusrlst.hxx
blob665aab801506c67f99bd946bafac2634b496debf
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 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 //========================================================================
30 class ScUserList;
31 class ScDocument;
32 class ScViewData;
33 class ScRangeUtil;
35 class ScTpUserLists : public SfxTabPage
37 public:
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 );
45 private:
46 ScTpUserLists( Window* pParent,
47 const SfxItemSet& rArgSet );
48 ~ScTpUserLists();
50 private:
51 FixedText* mpFtLists;
52 ListBox* mpLbLists;
53 FixedText* mpFtEntries;
54 VclMultiLineEdit* mpEdEntries;
55 FixedText* mpFtCopyFrom;
56 Edit* mpEdCopyFrom;
58 PushButton* mpBtnNew;
59 PushButton* mpBtnDiscard;
61 PushButton* mpBtnAdd;
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;
76 ScDocument* pDoc;
77 ScViewData* pViewData;
78 ScRangeUtil* pRangeUtil;
79 OUString aStrSelectedArea;
81 sal_Bool bModifyMode;
82 sal_Bool bCancelMode;
83 sal_Bool bCopyDone;
84 sal_uInt16 nCancelPos;
86 #ifdef _TPUSRLST_CXX
87 private:
88 void Init ();
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 );
99 // Handler:
100 DECL_LINK( LbSelectHdl, ListBox* );
101 DECL_LINK( BtnClickHdl, PushButton* );
102 DECL_LINK( EdEntriesModHdl, VclMultiLineEdit* );
103 #endif
108 #endif // SC_TPUSRLST_HXX
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */