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