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: fldpage.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 ************************************************************************/
30 #ifndef _SWFLDPAGE_HXX
31 #define _SWFLDPAGE_HXX
33 #include <sfx2/tabdlg.hxx>
38 /*--------------------------------------------------------------------
40 --------------------------------------------------------------------*/
42 const int coLBCount
= 3;
44 class SwFldPage
: public SfxTabPage
46 String m_aLstStrArr
[ coLBCount
];
49 SwWrtShell
* m_pWrtShell
;
52 USHORT m_nSelectionSel
;
55 BOOL m_bFldDlgHtmlMode
;
57 BOOL m_bFirstHTMLInit
;
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 );
74 void SavePos( const ListBox
* pLst1
,
75 const ListBox
* pLst2
= 0,
76 const ListBox
* pLst3
= 0);
77 void RestorePos( ListBox
* pLst1
, ListBox
* pLst2
= 0,
79 void EnableInsert(BOOL bEnable
= TRUE
);
80 inline BOOL
IsFldEdit() const { return m_bFldEdit
; }
83 BOOL
InsertFld( USHORT nTypeId
,
88 sal_Unicode cDelim
= ' ',
89 BOOL bIsAutomaticLanguage
= TRUE
);
91 using SfxTabPage::ActivatePage
;
94 SwFldPage( Window
*pParent
,
96 const SfxItemSet
&rAttrSet
);
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;