Mark some visible strings in ui files as translatable
[LibreOffice.git] / sw / source / ui / fldui / fldpage.hxx
blobaad057822b6bd0bc11c40648854ebb93242a0369
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 bool IsCurrentPage() const;
62 void EnableInsert(bool bEnable, bool bIsCurrentPage);
63 bool IsFieldEdit() const { return m_bFieldEdit; }
65 // insert field
66 void InsertField(SwFieldTypesEnum nTypeId,
67 sal_uInt16 nSubType,
68 const OUString& rPar1,
69 const OUString& rPar2,
70 sal_uInt32 nFormatId,
71 sal_Unicode cDelim = ' ',
72 bool bIsAutomaticLanguage = true);
74 public:
75 SwFieldPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription,
76 const OUString& rID, const SfxItemSet *pAttrSet);
78 virtual ~SwFieldPage() override;
80 virtual void Activate() override;
82 SwFieldMgr& GetFieldMgr() { return m_aMgr; }
83 void SetWrtShell( SwWrtShell* m_pWrtShell );
84 void EditNewField( bool bOnlyActivate = false );
85 virtual sal_uInt16 GetGroup() = 0;
88 #endif
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */