LibreOffice Module sw (master) 1
fldpage.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_SW_SOURCE_UI_FLDUI_FLDPAGE_HXX
20#define INCLUDED_SW_SOURCE_UI_FLDUI_FLDPAGE_HXX
21
22#include <sfx2/tabdlg.hxx>
23#include <fldmgr.hxx>
24
25#define FIELD_COLUMN_WIDTH 19
26
27const int coLBCount = 3;
28
29class SwFieldPage : public SfxTabPage
30{
35 sal_Int32 m_nTypeSel;
36 sal_Int32 m_nSelectionSel;
42
43protected:
44
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;}
50 bool IsRefresh() const { return m_bRefresh;}
53
54 DECL_LINK( TreeViewInsertHdl, weld::TreeView&, bool );
55 DECL_LINK( NumFormatHdl, weld::TreeView&, bool );
57
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; }
63
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);
72
73public:
74 SwFieldPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription,
75 const OUString& rID, const SfxItemSet *pAttrSet);
76
77 virtual ~SwFieldPage() override;
78
79 virtual void Activate() override;
80
83 void EditNewField( bool bOnlyActivate = false );
84 virtual sal_uInt16 GetGroup() = 0;
85};
86
87#endif
88
89/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void InsertField(SwFieldTypesEnum nTypeId, sal_uInt16 nSubType, const OUString &rPar1, const OUString &rPar2, sal_uInt32 nFormatId, sal_Unicode cDelim=' ', bool bIsAutomaticLanguage=true)
Definition: fldpage.cxx:116
sal_Int32 GetTypeSel() const
Definition: fldpage.hxx:45
void SetWrtShell(SwWrtShell *m_pWrtShell)
Definition: fldpage.cxx:344
void Init()
Definition: fldpage.cxx:64
bool m_bRefresh
Definition: fldpage.hxx:40
void SavePos(const weld::TreeView &rLst1)
Definition: fldpage.cxx:280
bool m_bInsert
Definition: fldpage.hxx:38
void SetTypeSel(sal_Int32 nSet)
Definition: fldpage.hxx:46
virtual ~SwFieldPage() override
Definition: fldpage.cxx:59
void EditNewField(bool bOnlyActivate=false)
Definition: fldpage.cxx:105
OUString m_aLstStrArr[coLBCount]
Definition: fldpage.hxx:31
SwFieldMgr & GetFieldMgr()
Definition: fldpage.hxx:81
bool IsFieldEdit() const
Definition: fldpage.hxx:62
bool m_bFieldEdit
Definition: fldpage.hxx:37
SwField * m_pCurField
Definition: fldpage.hxx:33
bool IsFieldDlgHtmlMode() const
Definition: fldpage.hxx:49
void RestorePos(weld::TreeView &rLst1)
Definition: fldpage.cxx:290
void InsertHdl(weld::Widget *)
Definition: fldpage.cxx:305
SwWrtShell * m_pWrtShell
Definition: fldpage.hxx:34
sal_Int32 GetSelectionSel() const
Definition: fldpage.hxx:47
void EnableInsert(bool bEnable)
Definition: fldpage.cxx:322
DECL_LINK(NumFormatHdl, weld::TreeView &, bool)
bool IsRefresh() const
Definition: fldpage.hxx:50
SwField * GetCurField()
Definition: fldpage.hxx:51
SwFieldMgr m_aMgr
Definition: fldpage.hxx:32
bool m_bFieldDlgHtmlMode
Definition: fldpage.hxx:39
SwWrtShell * GetWrtShell()
Definition: fldpage.hxx:52
virtual void Activate() override
Definition: fldpage.cxx:99
sal_Int32 m_nTypeSel
Definition: fldpage.hxx:35
virtual sal_uInt16 GetGroup()=0
sal_Int32 m_nSelectionSel
Definition: fldpage.hxx:36
SwFieldPage(weld::Container *pPage, weld::DialogController *pController, const OUString &rUIXMLDescription, const OUString &rID, const SfxItemSet *pAttrSet)
Definition: fldpage.cxx:44
DECL_LINK(TreeViewInsertHdl, weld::TreeView &, bool)
void SetSelectionSel(sal_Int32 nSet)
Definition: fldpage.hxx:48
bool m_bFirstHTMLInit
Definition: fldpage.hxx:41
Base class of all fields.
Definition: fldbas.hxx:296
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:98
const int coLBCount
Definition: fldpage.hxx:27
sal_uInt16 sal_Unicode