21#include <osl/diagnose.h>
74 if (rBox.get_active())
75 m_xPageNumEdit->set_value(1);
77 m_xPageNumEdit->set_text(OUString());
83 m_xPageNumBox->set_active(
true);
93 if (m_xPageNumBox->get_active())
96 const int nPos = m_xPageCollBox->get_active();
100 pPageDesc = m_rSh.FindPageDescByName(m_xPageCollBox->get_active_text(),
true);
102 pPageDesc = &m_rSh.GetPageDesc(m_rSh.GetCurPageDesc());
104 OSL_ENSURE(pPageDesc,
"Page description not found.");
105 const sal_uInt16 nUserPage = sal_uInt16(m_xPageNumEdit->get_value());
118 VclButtonsType::Ok,
SwResId(STR_ILLEGAL_PAGENUM)));
120 m_xPageNumEdit->grab_focus();
129 : GenericDialogController(pParent,
"modules/swriter/ui/insertbreak.ui",
"BreakDialog")
130 , m_xLineBtn(m_xBuilder->weld_radio_button(
"linerb"))
131 , m_xLineClearText(m_xBuilder->weld_label(
"clearft"))
132 , m_xLineClearBox(m_xBuilder->weld_combo_box(
"clearlb"))
133 , m_xColumnBtn(m_xBuilder->weld_radio_button(
"columnrb"))
134 , m_xPageBtn(m_xBuilder->weld_radio_button(
"pagerb"))
135 , m_xPageCollText(m_xBuilder->weld_label(
"styleft"))
136 , m_xPageCollBox(m_xBuilder->weld_combo_box(
"stylelb"))
137 , m_xPageNumBox(m_xBuilder->weld_check_button(
"pagenumcb"))
138 , m_xPageNumEdit(m_xBuilder->weld_spin_button(
"pagenumsb"))
139 , m_xOkBtn(m_xBuilder->weld_button(
"ok"))
142 , m_bHtmlMode(0 != ::
GetHtmlMode(rS.GetView().GetDocShell()))
162 OUString aFormatName;
Reference< XExecutableDialog > m_xDialog
IMPL_LINK_NOARG(SwBreakDlg, ToggleHdl, weld::Toggleable &, void)
IMPL_LINK(SwBreakDlg, PageNumHdl, weld::Toggleable &, rBox, void)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
std::unique_ptr< weld::RadioButton > m_xLineBtn
std::unique_ptr< weld::ComboBox > m_xPageCollBox
std::unique_ptr< weld::RadioButton > m_xColumnBtn
SwBreakDlg(weld::Window *pParent, SwWrtShell &rSh)
::std::optional< sal_uInt16 > m_oPgNum
std::unique_ptr< weld::RadioButton > m_xPageBtn
std::optional< SwLineBreakClear > m_eClear
std::unique_ptr< weld::Button > m_xOkBtn
std::unique_ptr< weld::CheckButton > m_xPageNumBox
std::unique_ptr< weld::Label > m_xPageCollText
std::unique_ptr< weld::Label > m_xLineClearText
std::unique_ptr< weld::ComboBox > m_xLineClearBox
std::unique_ptr< weld::SpinButton > m_xPageNumEdit
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
size_t GetPageDescCnt() const
const SwPageDesc & GetPageDesc(size_t i) const
const OUString & GetName() const
UseOnPage GetUseOn() const
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
Used by the UI to modify the document model.
#define LINK(Instance, Class, Member)
@ RES_POOLPAGE_LANDSCAPE
Landscape page style.
OUString SwResId(TranslateId aId)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)