LibreOffice Module sw (master) 1
insfnote.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_UIBASE_INC_INSFNOTE_HXX
20#define INCLUDED_SW_SOURCE_UIBASE_INC_INSFNOTE_HXX
21
22#include <vcl/weld.hxx>
23
24class SwWrtShell;
25
26class VclFrame;
27
29{
31
32 // everything for the character(s)
33 OUString m_aFontName;
34 rtl_TextEncoding m_eCharSet;
36 bool m_bEdit;
37
38 std::unique_ptr<weld::Widget> m_xNumberFrame;
39 std::unique_ptr<weld::RadioButton> m_xNumberAutoBtn;
40 std::unique_ptr<weld::RadioButton> m_xNumberCharBtn;
41 std::unique_ptr<weld::Entry> m_xNumberCharEdit;
42 std::unique_ptr<weld::Button> m_xNumberExtChar;
43
44 // everything for the selection footnote/endnote
45 std::unique_ptr<weld::RadioButton> m_xFootnoteBtn;
46 std::unique_ptr<weld::RadioButton> m_xEndNoteBtn;
47
48 std::unique_ptr<weld::Button> m_xOkBtn;
49 std::unique_ptr<weld::Button> m_xPrevBT;
50 std::unique_ptr<weld::Button> m_xNextBT;
51
52 DECL_LINK(NumberToggleHdl, weld::Toggleable&, void);
53 DECL_LINK(NumberEditHdl, weld::Entry&, void);
54 DECL_LINK(NumberExtCharHdl, weld::Button&, void);
55 DECL_LINK(NextPrevHdl, weld::Button&, void);
56
57 void Apply();
58
59 void Init();
60
61public:
62 SwInsFootNoteDlg(weld::Window * pParent, SwWrtShell &rSh, bool bEd);
63 virtual ~SwInsFootNoteDlg() COVERITY_NOEXCEPT_FALSE override;
64
65 const OUString& GetFontName() const { return m_aFontName; }
66 bool IsEndNote() const { return m_xEndNoteBtn->get_active(); }
67 OUString GetStr() const
68 {
69 if (m_xNumberCharBtn->get_active())
70 return m_xNumberCharEdit->get_text();
71 return OUString();
72 }
73 virtual short run() override
74 {
75 short nRet = GenericDialogController::run();
76 if (nRet == RET_OK)
77 Apply();
78 return nRet;
79 }
80};
81
82#endif
83
84/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~SwInsFootNoteDlg() COVERITY_NOEXCEPT_FALSE override
Definition: insfnote.cxx:179
bool m_bExtCharAvailable
Definition: insfnote.hxx:35
DECL_LINK(NumberExtCharHdl, weld::Button &, void)
rtl_TextEncoding m_eCharSet
Definition: insfnote.hxx:34
const OUString & GetFontName() const
Definition: insfnote.hxx:65
OUString GetStr() const
Definition: insfnote.hxx:67
std::unique_ptr< weld::Widget > m_xNumberFrame
Definition: insfnote.hxx:38
std::unique_ptr< weld::RadioButton > m_xNumberAutoBtn
Definition: insfnote.hxx:39
std::unique_ptr< weld::RadioButton > m_xNumberCharBtn
Definition: insfnote.hxx:40
DECL_LINK(NumberEditHdl, weld::Entry &, void)
SwInsFootNoteDlg(weld::Window *pParent, SwWrtShell &rSh, bool bEd)
Definition: insfnote.cxx:143
std::unique_ptr< weld::Button > m_xNextBT
Definition: insfnote.hxx:50
std::unique_ptr< weld::RadioButton > m_xEndNoteBtn
Definition: insfnote.hxx:46
bool IsEndNote() const
Definition: insfnote.hxx:66
DECL_LINK(NumberToggleHdl, weld::Toggleable &, void)
std::unique_ptr< weld::RadioButton > m_xFootnoteBtn
Definition: insfnote.hxx:45
std::unique_ptr< weld::Button > m_xPrevBT
Definition: insfnote.hxx:49
virtual short run() override
Definition: insfnote.hxx:73
OUString m_aFontName
Definition: insfnote.hxx:33
std::unique_ptr< weld::Entry > m_xNumberCharEdit
Definition: insfnote.hxx:41
SwWrtShell & m_rSh
Definition: insfnote.hxx:30
std::unique_ptr< weld::Button > m_xOkBtn
Definition: insfnote.hxx:48
std::unique_ptr< weld::Button > m_xNumberExtChar
Definition: insfnote.hxx:42
DECL_LINK(NextPrevHdl, weld::Button &, void)
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
RET_OK