21 #include <osl/diagnose.h>
32 #include <strings.hrc>
49 if (nPos != 0 && nPos != -1)
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();
99 if (nPos != 0 && nPos != -1)
100 pPageDesc = rSh.FindPageDescByName(m_xPageCollBox->get_active_text(),
true);
102 pPageDesc = &rSh.GetPageDesc(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 , bHtmlMode(0 != ::
GetHtmlMode(rS.GetView().GetDocShell()))
156 for (
size_t i = 0;
i < nCount; ++
i)
162 OUString aFormatName;
206 if (nPos == 0 || nPos == -1)
#define LINK(Instance, Class, Member)
std::unique_ptr< weld::Label > m_xPageCollText
size_t GetPageDescCnt() const
SwBreakDlg(weld::Window *pParent, SwWrtShell &rSh)
UseOnPage GetUseOn() const
const OUString & GetName() const
std::optional< SwLineBreakClear > m_eClear
Used by the UI to modify the document model.
OUString SwResId(TranslateId aId)
std::unique_ptr< weld::RadioButton > m_xLineBtn
std::unique_ptr< weld::RadioButton > m_xColumnBtn
std::unique_ptr< weld::Label > m_xLineClearText
const SwPageDesc & GetPageDesc(size_t i) const
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
std::unique_ptr< weld::ComboBox > m_xLineClearBox
std::unique_ptr< weld::SpinButton > m_xPageNumEdit
std::unique_ptr< weld::CheckButton > m_xPageNumBox
IMPL_LINK_NOARG(SwBreakDlg, ToggleHdl, weld::Toggleable &, void)
std::unique_ptr< weld::Button > m_xOkBtn
Reference< XExecutableDialog > m_xDialog
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
std::unique_ptr< weld::RadioButton > m_xPageBtn
std::unique_ptr< weld::ComboBox > m_xPageCollBox
::std::optional< sal_uInt16 > oPgNum
IMPL_LINK(SwBreakDlg, PageNumHdl, weld::Toggleable &, rBox, void)
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)