59 pPage->FillItemSet( &aDummySet );
60 pPage = GetTabPage(
"endnotes");
62 pPage->FillItemSet( &aDummySet );
63 SfxTabDialogController::OkHdl(rBtn);
69 bEN ? OUString(
"modules/swriter/ui/endnotepage.ui") : OUString(
"modules/swriter/ui/footnotepage.ui"),
70 bEN ? OString(
"EndnotePage") : OString(
"FootnotePage"),
76 , m_xOffsetLbl(m_xBuilder->weld_label(
"offset"))
77 , m_xOffsetField(m_xBuilder->weld_spin_button(
"offsetnf"))
78 , m_xNumCountBox(m_xBuilder->weld_combo_box(
"countinglb"))
79 , m_xPrefixED(m_xBuilder->weld_entry(
"prefix"))
80 , m_xSuffixED(m_xBuilder->weld_entry(
"suffix"))
81 , m_xPosFT(m_xBuilder->weld_label(
"pos"))
82 , m_xPosPageBox(m_xBuilder->weld_radio_button(
"pospagecb"))
83 , m_xPosChapterBox(m_xBuilder->weld_radio_button(
"posdoccb"))
84 , m_xStylesContainer(m_xBuilder->weld_widget(
"allstyles"))
85 , m_xParaTemplBox(m_xBuilder->weld_combo_box(
"parastylelb"))
86 , m_xPageTemplLbl(m_xBuilder->weld_label(
"pagestyleft"))
87 , m_xPageTemplBox(m_xBuilder->weld_combo_box(
"pagestylelb"))
88 , m_xFootnoteCharAnchorTemplBox(m_xBuilder->weld_combo_box(
"charanchorstylelb"))
89 , m_xFootnoteCharTextTemplBox(m_xBuilder->weld_combo_box(
"charstylelb"))
90 , m_xContEdit(m_xBuilder->weld_entry(
"conted"))
91 , m_xContFromEdit(m_xBuilder->weld_entry(
"contfromed"))
116 if (dynamic_cast<SwWebDocShell*>( pDocSh) )
150 m_xNumViewBox->SelectNumberingType( pInf->m_aFormat.GetNumberingType());
152 m_xPrefixED->set_text(pInf->GetPrefix().replaceAll(
"\t",
"\\t"));
153 m_xSuffixED->set_text(pInf->GetSuffix().replaceAll(
"\t",
"\\t"));
160 pCharFormat = pInf->GetAnchorCharFormat( *
pSh->
GetDoc() );
171 pStyle = pStyleSheetPool->
Next();
186 OSL_ENSURE(!pColl->
IsDefault(),
"default style for footnotes is wrong");
202 for(
size_t i = 0;
i < nCount; ++
i)
215 return std::make_unique<SwEndNoteOptionPage>(pPage, pController,
true, *rSet);
266 if (m_xNumCountBox->find_text(aNumPage) == -1)
268 m_xNumCountBox->insert_text(
FTNNUM_PAGE, aNumPage);
270 SelectNumbering(eNum);
272 m_xPageTemplLbl->set_sensitive(
false);
273 m_xPageTemplBox->set_sensitive(
false);
279 if (m_xNumCountBox->get_count() - 1 != m_xNumCountBox->get_active())
282 m_xOffsetField->set_value(1);
284 m_xOffsetLbl->set_sensitive(bEnable);
285 m_xOffsetField->set_sensitive(bEnable);
296 m_xNumCountBox->remove_text(aNumPage);
297 m_xNumCountBox->remove_text(aNumChapter);
298 m_xPageTemplLbl->set_sensitive(
true);
299 m_xPageTemplBox->set_sensitive(
true);
306 for(sal_uInt16
i = 0;
i< nChCount;
i++)
309 if(rChFormat.
GetName() == rCharFormatName )
311 pFormat = &rChFormat;
319 pBase = pPool->
Find(rCharFormatName, SfxStyleFamily::Char);
321 pBase = &pPool->
Make(rCharFormatName, SfxStyleFamily::Char);
332 pInf->m_aFormat.SetNumberingType(
m_xNumViewBox->GetSelectedNumberingType() );
333 pInf->SetPrefix(
m_xPrefixED->get_text().replaceAll(
"\\t",
"\t"));
334 pInf->SetSuffix(
m_xSuffixED->get_text().replaceAll(
"\\t",
"\t"));
347 OSL_ENSURE(pColl,
"paragraph style not found");
348 pInf->SetFootnoteTextColl(*pColl);
384 return std::make_unique<SwFootNoteOptionPage>(pPage, pController, *rSet);
const SwEndNoteInfo & GetEndNoteInfo() const
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(SwEndNoteOptionPage, PosPageHdl, weld::Button &, void)
void SetFootnoteInfo(const SwFootnoteInfo &rInfo)
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
std::unique_ptr< weld::Entry > m_xPrefixED
Represents the style of a paragraph.
size_t GetPageDescCnt() const
std::unique_ptr< weld::RadioButton > m_xPosChapterBox
std::unique_ptr< weld::ComboBox > m_xFootnoteCharAnchorTemplBox
std::unique_ptr< weld::Entry > m_xContFromEdit
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
SwFootnoteNum GetNumbering() const
void SetShell(SwViewShell *pSh)
void SetEndNoteInfo(const SwEndNoteInfo &rInfo)
static SfxObjectShell * Current()
std::unique_ptr< weld::Entry > m_xContEdit
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::Entry > m_xSuffixED
std::unique_ptr< SwNumberingTypeListBox > m_xNumViewBox
const OUString & GetName() const
IMPL_LINK(SwFootNoteOptionDlg, OkHdl, weld::Button &, rBtn, void)
Used by the UI to modify the document model.
std::unique_ptr< weld::ComboBox > m_xNumCountBox
const SwView & GetView() const
SwEndNoteOptionPage(weld::Container *pPage, weld::DialogController *pController, bool bEndNote, const SfxItemSet &rSet)
const OUString & GetName() const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
sal_uInt16 GetCharFormatCount() const
CHAR.
std::unique_ptr< weld::ComboBox > m_xFootnoteCharTextTemplBox
SwDoc * GetDoc()
returns Doc. But be careful!
std::unique_ptr< weld::ComboBox > m_xParaTemplBox
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
const SwPageDesc & GetPageDesc(size_t i) const
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
SwDocShell * GetDocShell()
static SwCharFormat * lcl_GetCharFormat(SwWrtShell *pSh, const OUString &rCharFormatName)
std::unique_ptr< weld::Label > m_xPageTemplLbl
const SwFootnoteInfo & GetFootnoteInfo() const
Footnote attributes global to document.
virtual ~SwEndNoteOptionPage() override
std::unique_ptr< weld::SpinButton > m_xOffsetField
SfxStyleSheetBase * Next()
void AddTabPage(const OString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
virtual void Reset(const SfxItemSet *) override
void SetShell(SwWrtShell &rShell)
virtual weld::Button & GetOKButton() const override
std::unique_ptr< weld::ComboBox > m_xPageTemplBox
SwPageDesc * FindPageDescByName(const OUString &rName, bool bGetFromPool=false, size_t *pPos=nullptr)
void SelectNumbering(SwFootnoteNum eNum)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
std::unique_ptr< weld::Widget > m_xStylesContainer
std::unique_ptr< weld::RadioButton > m_xPosPageBox
SwTextFormatColl * GetParaStyle(const OUString &rCollName, GetStyle eCreate=GETSTYLE_NOCREATE)
SwCharFormat & GetCharFormat(sal_uInt16 nFormat) const