android: Update app-specific/MIME type icons
[LibreOffice.git] / sw / source / ui / fldui / fldpage.hxx
blobfbfa8cf2ba53497eef24a1a0868a678cf387abf7
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 INCLUDED_SW_SOURCE_UI_FLDUI_FLDPAGE_HXX
20 #define INCLUDED_SW_SOURCE_UI_FLDUI_FLDPAGE_HXX
22 #include <sfx2/tabdlg.hxx>
23 #include <fldmgr.hxx>
25 #define FIELD_COLUMN_WIDTH 19
27 const int coLBCount = 3;
29 class SwFieldPage : public SfxTabPage
31 OUString m_aLstStrArr[ coLBCount ];
32 SwFieldMgr m_aMgr;
33 SwField *m_pCurField;
34 SwWrtShell* m_pWrtShell;
35 sal_Int32 m_nTypeSel;
36 sal_Int32 m_nSelectionSel;
37 bool m_bFieldEdit;
38 bool m_bInsert;
39 bool m_bFieldDlgHtmlMode;
40 bool m_bRefresh;
41 bool m_bFirstHTMLInit;
43 protected:
45 sal_Int32 GetTypeSel() const { return m_nTypeSel;}
46 void SetTypeSel(sal_Int32 nSet) { m_nTypeSel = nSet;}
47 sal_Int32 GetSelectionSel() const { return m_nSelectionSel;}
48 void SetSelectionSel(sal_Int32 nSet){ m_nSelectionSel = nSet;}
49 bool IsFieldDlgHtmlMode() const { return m_bFieldDlgHtmlMode;}
50 bool IsRefresh() const { return m_bRefresh;}
51 SwField* GetCurField() { return m_pCurField;}
52 SwWrtShell* GetWrtShell() { return m_pWrtShell;}
54 DECL_LINK( TreeViewInsertHdl, weld::TreeView&, bool );
55 DECL_LINK( NumFormatHdl, weld::TreeView&, bool );
56 void InsertHdl(weld::Widget*);
58 void Init();
59 void SavePos( const weld::TreeView& rLst1);
60 void RestorePos( weld::TreeView& rLst1 );
61 void EnableInsert(bool bEnable);
62 bool IsFieldEdit() const { return m_bFieldEdit; }
64 // insert field
65 void InsertField(SwFieldTypesEnum nTypeId,
66 sal_uInt16 nSubType,
67 const OUString& rPar1,
68 const OUString& rPar2,
69 sal_uInt32 nFormatId,
70 sal_Unicode cDelim = ' ',
71 bool bIsAutomaticLanguage = true);
73 public:
74 SwFieldPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription,
75 const OUString& rID, const SfxItemSet *pAttrSet);
77 virtual ~SwFieldPage() override;
79 virtual void Activate() override;
81 SwFieldMgr& GetFieldMgr() { return m_aMgr; }
82 void SetWrtShell( SwWrtShell* m_pWrtShell );
83 void EditNewField( bool bOnlyActivate = false );
84 virtual sal_uInt16 GetGroup() = 0;
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */