LibreOffice Module sw (master) 1
javaedit.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#pragma once
20
21#include <vcl/weld.hxx>
22
23class SwWrtShell;
24class SwFieldMgr;
25class SwScriptField;
26
27namespace sfx2 { class FileDialogHelper; }
28
30{
31private:
32 OUString m_aText;
33 OUString m_aType;
34
35 bool m_bNew;
37
39 std::unique_ptr<SwFieldMgr> m_pMgr;
41 std::unique_ptr<sfx2::FileDialogHelper> m_pFileDlg;
42
43 std::unique_ptr<weld::Entry> m_xTypeED;
44 std::unique_ptr<weld::RadioButton> m_xUrlRB;
45 std::unique_ptr<weld::RadioButton> m_xEditRB;
46 std::unique_ptr<weld::Button> m_xUrlPB;
47 std::unique_ptr<weld::Entry> m_xUrlED;
48 std::unique_ptr<weld::TextView> m_xEditED;
49 std::unique_ptr<weld::Button> m_xOKBtn;
50 std::unique_ptr<weld::Button> m_xPrevBtn;
51 std::unique_ptr<weld::Button> m_xNextBtn;
52
53 DECL_LINK(OKHdl, weld::Button&, void);
54 DECL_LINK(PrevHdl, weld::Button&, void);
55 DECL_LINK(NextHdl, weld::Button&, void);
56 DECL_LINK(RadioButtonHdl, weld::Toggleable&, void);
57 DECL_LINK(InsertFileHdl, weld::Button&, void);
58 DECL_LINK(DlgClosedHdl, sfx2::FileDialogHelper *, void);
59
61 void CheckTravel();
62 void SetField();
63
64public:
65 SwJavaEditDialog(weld::Window* pParent, SwWrtShell* pWrtSh);
66 virtual ~SwJavaEditDialog() override;
67
68 const OUString& GetScriptText() const { return m_aText; }
69
70 const OUString& GetScriptType() const { return m_aType; }
71
72 bool IsUrl() const { return m_bIsUrl; }
73 bool IsNew() const { return m_bNew; }
74 bool IsUpdate() const;
75};
76
77/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const OUString & GetScriptType() const
Definition: javaedit.hxx:70
bool IsUrl() const
Definition: javaedit.hxx:72
DECL_LINK(DlgClosedHdl, sfx2::FileDialogHelper *, void)
std::unique_ptr< weld::Button > m_xPrevBtn
Definition: javaedit.hxx:50
std::unique_ptr< weld::Button > m_xOKBtn
Definition: javaedit.hxx:49
std::unique_ptr< weld::RadioButton > m_xEditRB
Definition: javaedit.hxx:45
DECL_LINK(InsertFileHdl, weld::Button &, void)
std::unique_ptr< weld::TextView > m_xEditED
Definition: javaedit.hxx:48
virtual ~SwJavaEditDialog() override
Definition: javaedit.cxx:74
DECL_LINK(NextHdl, weld::Button &, void)
std::unique_ptr< sfx2::FileDialogHelper > m_pFileDlg
Definition: javaedit.hxx:41
void UpdateFromRadioButtons()
Definition: javaedit.cxx:207
DECL_LINK(OKHdl, weld::Button &, void)
std::unique_ptr< SwFieldMgr > m_pMgr
Definition: javaedit.hxx:39
std::unique_ptr< weld::Button > m_xUrlPB
Definition: javaedit.hxx:46
DECL_LINK(PrevHdl, weld::Button &, void)
OUString m_aType
Definition: javaedit.hxx:33
OUString m_aText
Definition: javaedit.hxx:32
std::unique_ptr< weld::Entry > m_xTypeED
Definition: javaedit.hxx:43
std::unique_ptr< weld::RadioButton > m_xUrlRB
Definition: javaedit.hxx:44
bool IsNew() const
Definition: javaedit.hxx:73
SwWrtShell * m_pSh
Definition: javaedit.hxx:40
bool IsUpdate() const
Definition: javaedit.cxx:195
SwScriptField * m_pField
Definition: javaedit.hxx:38
void CheckTravel()
Definition: javaedit.cxx:109
std::unique_ptr< weld::Button > m_xNextBtn
Definition: javaedit.hxx:51
DECL_LINK(RadioButtonHdl, weld::Toggleable &, void)
const OUString & GetScriptText() const
Definition: javaedit.hxx:68
SwJavaEditDialog(weld::Window *pParent, SwWrtShell *pWrtSh)
Definition: javaedit.cxx:36
std::unique_ptr< weld::Entry > m_xUrlED
Definition: javaedit.hxx:47
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97