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 .
19 #ifndef _SWFLDPAGE_HXX
20 #define _SWFLDPAGE_HXX
22 #include <sfx2/tabdlg.hxx>
27 const int coLBCount
= 3;
29 class SwFldPage
: public SfxTabPage
31 String m_aLstStrArr
[ coLBCount
];
34 SwWrtShell
* m_pWrtShell
;
36 sal_uInt16 m_nTypeSel
;
37 sal_uInt16 m_nSelectionSel
;
40 sal_Bool m_bFldDlgHtmlMode
;
42 sal_Bool m_bFirstHTMLInit
;
46 sal_uInt16
GetTypeSel() const { return m_nTypeSel
;}
47 void SetTypeSel(sal_uInt16 nSet
) { m_nTypeSel
= nSet
;}
48 sal_uInt16
GetSelectionSel() const { return m_nSelectionSel
;}
49 void SetSelectionSel(sal_uInt16 nSet
){ m_nSelectionSel
= nSet
;}
50 sal_Bool
IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode
;}
51 sal_Bool
IsRefresh() const { return m_bRefresh
;}
52 SwField
* GetCurField() { return m_pCurFld
;}
53 SwWrtShell
* GetWrtShell() { return m_pWrtShell
;}
55 DECL_LINK( InsertHdl
, Button
*pBtn
= 0 );
56 DECL_LINK(NumFormatHdl
, void *);
59 void SavePos( const ListBox
* pLst1
,
60 const ListBox
* pLst2
= 0,
61 const ListBox
* pLst3
= 0);
62 void RestorePos( ListBox
* pLst1
, ListBox
* pLst2
= 0,
64 void EnableInsert(sal_Bool bEnable
= sal_True
);
65 inline bool IsFldEdit() const { return m_bFldEdit
; }
68 sal_Bool
InsertFld( sal_uInt16 nTypeId
,
73 sal_Unicode cDelim
= ' ',
74 sal_Bool bIsAutomaticLanguage
= sal_True
);
76 using SfxTabPage::ActivatePage
;
79 SwFldPage( Window
*pParent
,
81 const SfxItemSet
&rAttrSet
);
85 virtual void ActivatePage();
87 inline SwFldMgr
& GetFldMgr() { return m_aMgr
; }
88 void SetWrtShell( SwWrtShell
* m_pWrtShell
);
89 void EditNewField( sal_Bool bOnlyActivate
= sal_False
);
90 virtual sal_uInt16
GetGroup() = 0;
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */