31#include <lineinfo.hxx>
61 xStyleSheet->MergeIndentAttrsOfListStyle(
rSet );
62 xStyleSheet->SetItemSet(
rSet);
67 "modules/swriter/ui/linenumbering.ui",
"LineNumberingDialog")
68 , m_pSh(rVw.GetWrtShellPtr())
69 , m_xBodyContent(m_xBuilder->weld_widget(
"content"))
70 , m_xDivIntervalFT(m_xBuilder->weld_widget(
"every"))
71 , m_xDivIntervalNF(m_xBuilder->weld_spin_button(
"linesspin"))
72 , m_xDivRowsFT(m_xBuilder->weld_widget(
"lines"))
73 , m_xNumIntervalNF(m_xBuilder->weld_spin_button(
"intervalspin"))
74 , m_xCharStyleLB(m_xBuilder->weld_combo_box(
"styledropdown"))
76 , m_xPosLB(m_xBuilder->weld_combo_box(
"positiondropdown"))
77 , m_xOffsetMF(m_xBuilder->weld_metric_spin_button(
"spacingspin",
FieldUnit::
CM))
78 , m_xDivisorED(m_xBuilder->weld_entry(
"textentry"))
79 , m_xCountEmptyLinesCB(m_xBuilder->weld_check_button(
"blanklines"))
80 , m_xCountFrameLinesCB(m_xBuilder->weld_check_button(
"linesintextframes"))
81 , m_xRestartEachPageCB(m_xBuilder->weld_check_button(
"restarteverynewpage"))
82 , m_xNumberingOnCB(m_xBuilder->weld_check_button(
"shownumbering"))
83 , m_xNumberingOnFooterHeader(m_xBuilder->weld_check_button(
"showfooterheadernumbering"))
85 , m_xNumIntervalFT(m_xBuilder->weld_widget(
"interval"))
86 , m_xNumRowsFT(m_xBuilder->weld_widget(
"intervallines"))
115 if (!sStyleName.isEmpty())
132 if (nOffset == USHRT_MAX)
186 OUString sCharFormatName(m_xCharStyleLB->get_active_text());
187 SwCharFormat *pCharFormat = m_pSh->FindCharFormatByName(sCharFormatName);
193 pBase = pPool->
Find(sCharFormatName, SfxStyleFamily::Char);
195 pBase = &pPool->
Make(sCharFormatName, SfxStyleFamily::Char);
211 aInf.
SetPosFromLeft(o3tl::narrowing<sal_uInt16>(m_xOffsetMF->denormalize(m_xOffsetMF->get_value(FieldUnit::TWIP))));
214 aInf.
SetCountBy(o3tl::narrowing<sal_uInt16>(m_xNumIntervalNF->get_value()));
220 aInf.
SetDividerCountBy(o3tl::narrowing<sal_uInt16>(m_xDivIntervalNF->get_value()));
229 m_pSh->SetLineNumberInfo(aInf);
234 if( m_xNumberingOnFooterHeader->get_active())
245 bool bEnable = m_xNumberingOnCB->get_active() && !m_xDivisorED->get_text().isEmpty();
247 m_xDivIntervalFT->set_sensitive(bEnable);
248 m_xDivIntervalNF->set_sensitive(bEnable);
249 m_xDivRowsFT->set_sensitive(bEnable);
255 bool bEnable = m_xNumberingOnCB->get_active();
256 m_xBodyContent->set_sensitive(bEnable);
257 ModifyHdl(*m_xDivisorED);
Reference< XExecutableDialog > m_xDialog
Access to the style pool.
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
void SetNumberingType(SvxNumType nSet)
SvxNumType GetNumberingType() const
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
const SwLineNumberInfo & GetLineNumberInfo() const
< purpose of derivation from SwClient: character style for displaying the numbers.
void SetPaintLineNumbers(bool b)
void SetPos(LineNumberPosition eP)
const OUString & GetDivider() const
void SetDividerCountBy(sal_uInt16 n)
sal_uInt16 GetCountBy() const
const SvxNumberType & GetNumType() const
void SetDivider(const OUString &r)
bool IsRestartEachPage() const
void SetCharFormat(SwCharFormat *)
void SetCountBlankLines(bool b)
SwCharFormat * GetCharFormat(IDocumentStylePoolAccess &rIDSPA) const
void SetRestartEachPage(bool b)
bool IsPaintLineNumbers() const
void SetNumType(SvxNumberType aNew)
void SetCountBy(sal_uInt16 n)
bool IsCountBlankLines() const
void SetPosFromLeft(sal_uInt16 n)
sal_uInt16 GetPosFromLeft() const
bool IsCountInFlys() const
sal_uInt16 GetDividerCountBy() const
void SetCountInFlys(bool b)
LineNumberPosition GetPos() const
std::unique_ptr< weld::CheckButton > m_xCountFrameLinesCB
std::unique_ptr< weld::Widget > m_xDivRowsFT
std::unique_ptr< weld::Widget > m_xDivIntervalFT
virtual ~SwLineNumberingDlg() override
std::unique_ptr< weld::SpinButton > m_xNumIntervalNF
std::unique_ptr< weld::Button > m_xOKButton
SwLineNumberingDlg(const SwView &rVw)
std::unique_ptr< weld::CheckButton > m_xNumberingOnCB
std::unique_ptr< SwNumberingTypeListBox > m_xFormatLB
std::unique_ptr< weld::Widget > m_xNumRowsFT
std::unique_ptr< weld::CheckButton > m_xCountEmptyLinesCB
std::unique_ptr< weld::ComboBox > m_xPosLB
std::unique_ptr< weld::SpinButton > m_xDivIntervalNF
std::unique_ptr< weld::MetricSpinButton > m_xOffsetMF
std::unique_ptr< weld::Entry > m_xDivisorED
std::unique_ptr< weld::CheckButton > m_xRestartEachPageCB
std::unique_ptr< weld::Widget > m_xNumIntervalFT
std::unique_ptr< weld::ComboBox > m_xCharStyleLB
std::unique_ptr< weld::CheckButton > m_xNumberingOnFooterHeader
IDocumentStylePoolAccess & getIDocumentStylePoolAccess()
Provides access to the document style pool interface.
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
const SwView & GetView() const
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
constexpr TypedWhichId< SwFormatLineNumber > RES_LINENUMBER(122)
std::unique_ptr< weld::Button > m_xOKButton
IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl, weld::Button &, void)
static rtl::Reference< SwDocStyleSheet > lcl_getDocStyleSheet(const OUString &rName, SwWrtShell *pSh)
static void lcl_setLineNumbering(const OUString &rName, SwWrtShell *pSh, bool bLineNumber)
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
OUString SwResId(TranslateId aId)