update dev300-m58
[ooovba.git] / sw / source / ui / fldui / fldpage.hxx
blob7595daa35e7e278ae9826c1e65682a63652e2915
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fldpage.hxx,v $
10 * $Revision: 1.8 $
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 ************************************************************************/
30 #ifndef _SWFLDPAGE_HXX
31 #define _SWFLDPAGE_HXX
33 #include <sfx2/tabdlg.hxx>
34 #include <fldmgr.hxx>
36 class ListBox;
38 /*--------------------------------------------------------------------
39 Beschreibung:
40 --------------------------------------------------------------------*/
42 const int coLBCount = 3;
44 class SwFldPage : public SfxTabPage
46 String m_aLstStrArr[ coLBCount ];
47 SwFldMgr m_aMgr;
48 SwField *m_pCurFld;
49 SwWrtShell* m_pWrtShell;
50 USHORT m_nPageId;
51 USHORT m_nTypeSel;
52 USHORT m_nSelectionSel;
53 BOOL m_bFldEdit;
54 BOOL m_bInsert;
55 BOOL m_bFldDlgHtmlMode;
56 BOOL m_bRefresh;
57 BOOL m_bFirstHTMLInit;
59 protected:
61 USHORT GetTypeSel() const { return m_nTypeSel;}
62 void SetTypeSel(USHORT nSet) { m_nTypeSel = nSet;}
63 USHORT GetSelectionSel() const { return m_nSelectionSel;}
64 void SetSelectionSel(USHORT nSet){ m_nSelectionSel = nSet;}
65 BOOL IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;}
66 BOOL IsRefresh() const { return m_bRefresh;}
67 SwField* GetCurField() { return m_pCurFld;}
68 SwWrtShell* GetWrtShell() { return m_pWrtShell;}
70 DECL_LINK( InsertHdl, Button *pBtn = 0 );
71 DECL_LINK( NumFormatHdl, ListBox *pBtn = 0 );
73 void Init();
74 void SavePos( const ListBox* pLst1,
75 const ListBox* pLst2 = 0,
76 const ListBox* pLst3 = 0);
77 void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0,
78 ListBox* pLst3 = 0 );
79 void EnableInsert(BOOL bEnable = TRUE);
80 inline BOOL IsFldEdit() const { return m_bFldEdit; }
82 // Feld einfuegen
83 BOOL InsertFld( USHORT nTypeId,
84 USHORT nSubType,
85 const String& rPar1,
86 const String& rPar2,
87 ULONG nFormatId,
88 sal_Unicode cDelim = ' ',
89 BOOL bIsAutomaticLanguage = TRUE);
91 using SfxTabPage::ActivatePage;
93 public:
94 SwFldPage( Window *pParent,
95 const ResId &rId,
96 const SfxItemSet &rAttrSet );
98 virtual ~SwFldPage();
100 virtual void ActivatePage();
102 inline SwFldMgr& GetFldMgr() { return m_aMgr; }
103 void SetWrtShell( SwWrtShell* m_pWrtShell );
104 void EditNewField( BOOL bOnlyActivate = FALSE );
105 virtual USHORT GetGroup() = 0;
109 #endif