bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / fldui / fldpage.hxx
blob69813f611bf33da331be9233cb6d7bf4406789e0
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 .
19 #ifndef _SWFLDPAGE_HXX
20 #define _SWFLDPAGE_HXX
22 #include <sfx2/tabdlg.hxx>
23 #include <fldmgr.hxx>
25 class ListBox;
27 const int coLBCount = 3;
29 class SwFldPage : public SfxTabPage
31 String m_aLstStrArr[ coLBCount ];
32 SwFldMgr m_aMgr;
33 SwField *m_pCurFld;
34 SwWrtShell* m_pWrtShell;
35 sal_uInt16 m_nPageId;
36 sal_uInt16 m_nTypeSel;
37 sal_uInt16 m_nSelectionSel;
38 bool m_bFldEdit;
39 sal_Bool m_bInsert;
40 sal_Bool m_bFldDlgHtmlMode;
41 sal_Bool m_bRefresh;
42 sal_Bool m_bFirstHTMLInit;
44 protected:
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 *);
58 void Init();
59 void SavePos( const ListBox* pLst1,
60 const ListBox* pLst2 = 0,
61 const ListBox* pLst3 = 0);
62 void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0,
63 ListBox* pLst3 = 0 );
64 void EnableInsert(sal_Bool bEnable = sal_True);
65 inline bool IsFldEdit() const { return m_bFldEdit; }
67 // insert field
68 sal_Bool InsertFld( sal_uInt16 nTypeId,
69 sal_uInt16 nSubType,
70 const String& rPar1,
71 const String& rPar2,
72 sal_uLong nFormatId,
73 sal_Unicode cDelim = ' ',
74 sal_Bool bIsAutomaticLanguage = sal_True);
76 using SfxTabPage::ActivatePage;
78 public:
79 SwFldPage( Window *pParent,
80 const ResId &rId,
81 const SfxItemSet &rAttrSet );
83 virtual ~SwFldPage();
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;
94 #endif
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */