[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - 2 commits - cui/source extras/source sw/source sw/uiconfig
Caolán McNamara
caolanm at redhat.com
Mon Jun 4 20:46:06 UTC 2018
cui/source/tabpages/textattr.cxx | 81 -----
extras/source/glade/libreoffice-catalog.xml.in | 3
sw/source/ui/dialog/uiregionsw.cxx | 289 +++++++++------------
sw/source/ui/misc/docfnote.cxx | 2
sw/source/ui/misc/impfnote.hxx | 2
sw/source/ui/misc/linenum.cxx | 2
sw/source/ui/misc/outline.cxx | 2
sw/source/uibase/inc/linenum.hxx | 2
sw/source/uibase/inc/numberingtypelistbox.hxx | 24 -
sw/source/uibase/inc/outline.hxx | 2
sw/source/uibase/inc/regionsw.hxx | 52 +--
sw/source/uibase/misc/numberingtypelistbox.cxx | 155 -----------
sw/uiconfig/swriter/ui/footnotesendnotestabpage.ui | 88 +-----
13 files changed, 190 insertions(+), 514 deletions(-)
New commits:
commit 65e17de0adfca4b5e076d4000e6f6f8fa6b2e462
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 2 19:40:31 2018 +0100
SwNumberingTypeListBox fully replaced now
Change-Id: I7610cf8f602c6939dc994dd4c418d9e07aaf6b20
Reviewed-on: https://gerrit.libreoffice.org/55217
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/55252
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 9f2e7f334ba6..c0510143c38e 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1831,7 +1831,7 @@ SwSectionFootnoteEndTabPage::SwSectionFootnoteEndTabPage(TabPageParent pParent,
, m_xFootnoteNtNumFormatCB(m_xBuilder->weld_check_button("ftnntnumfmt"))
, m_xFootnotePrefixFT(m_xBuilder->weld_label("ftnprefix_label"))
, m_xFootnotePrefixED(m_xBuilder->weld_entry("ftnprefix"))
- , m_xFootnoteNumViewBox(new NumberingTypeListBox(m_xBuilder->weld_combo_box_text("ftnnumviewbox")))
+ , m_xFootnoteNumViewBox(new SwNumberingTypeListBox(m_xBuilder->weld_combo_box_text("ftnnumviewbox")))
, m_xFootnoteSuffixFT(m_xBuilder->weld_label("ftnsuffix_label"))
, m_xFootnoteSuffixED(m_xBuilder->weld_entry("ftnsuffix"))
, m_xEndNtAtTextEndCB(m_xBuilder->weld_check_button("endntattextend"))
@@ -1841,7 +1841,7 @@ SwSectionFootnoteEndTabPage::SwSectionFootnoteEndTabPage(TabPageParent pParent,
, m_xEndNtNumFormatCB(m_xBuilder->weld_check_button("endntnumfmt"))
, m_xEndPrefixFT(m_xBuilder->weld_label("endprefix_label"))
, m_xEndPrefixED(m_xBuilder->weld_entry("endprefix"))
- , m_xEndNumViewBox(new NumberingTypeListBox(m_xBuilder->weld_combo_box_text("endnumviewbox")))
+ , m_xEndNumViewBox(new SwNumberingTypeListBox(m_xBuilder->weld_combo_box_text("endnumviewbox")))
, m_xEndSuffixFT(m_xBuilder->weld_label("endsuffix_label"))
, m_xEndSuffixED(m_xBuilder->weld_entry("endsuffix"))
{
@@ -1919,7 +1919,7 @@ void SwSectionFootnoteEndTabPage::ResetState( bool bFootnote,
weld::CheckButton *pNtAtTextEndCB, *pNtNumCB, *pNtNumFormatCB;
weld::Label *pPrefixFT, *pSuffixFT;
weld::Entry *pPrefixED, *pSuffixED;
- NumberingTypeListBox *pNumViewBox;
+ SwNumberingTypeListBox *pNumViewBox;
weld::Label *pOffsetText;
weld::SpinButton *pOffsetField;
@@ -2011,7 +2011,7 @@ IMPL_LINK( SwSectionFootnoteEndTabPage, FootEndHdl, weld::ToggleButton&, rBox, v
m_xFootnoteNtNumFormatCB.get() == &rBox ;
weld::CheckButton *pNumBox, *pNumFormatBox, *pEndBox;
- NumberingTypeListBox* pNumViewBox;
+ SwNumberingTypeListBox* pNumViewBox;
weld::Label *pOffsetText;
weld::SpinButton *pOffsetField;
weld::Label *pPrefixFT, *pSuffixFT;
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 4de40de6f68a..73ebbb95f970 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -72,7 +72,7 @@ SwEndNoteOptionPage::SwEndNoteOptionPage(TabPageParent pParent, bool bEN,
, pSh(nullptr)
, bPosDoc(false)
, bEndNote(bEN)
- , m_xNumViewBox(new NumberingTypeListBox(m_xBuilder->weld_combo_box_text("numberinglb")))
+ , m_xNumViewBox(new SwNumberingTypeListBox(m_xBuilder->weld_combo_box_text("numberinglb")))
, m_xOffsetLbl(m_xBuilder->weld_label("offset"))
, m_xOffsetField(m_xBuilder->weld_spin_button("offsetnf"))
, m_xNumCountBox(m_xBuilder->weld_combo_box_text("countinglb"))
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index 7bc3e9a20d8f..8c192a620ca7 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -35,7 +35,7 @@ class SwEndNoteOptionPage : public SfxTabPage
bool bPosDoc;
bool bEndNote;
- std::unique_ptr<NumberingTypeListBox> m_xNumViewBox;
+ std::unique_ptr<SwNumberingTypeListBox> m_xNumViewBox;
std::unique_ptr<weld::Label> m_xOffsetLbl;
std::unique_ptr<weld::SpinButton> m_xOffsetField;
std::unique_ptr<weld::ComboBoxText> m_xNumCountBox;
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 046b1a21e20f..281dd9dd0d77 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -72,7 +72,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(const SwView& rVw)
, m_xDivRowsFT(m_xBuilder->weld_widget("lines"))
, m_xNumIntervalNF(m_xBuilder->weld_spin_button("intervalspin"))
, m_xCharStyleLB(m_xBuilder->weld_combo_box_text("styledropdown"))
- , m_xFormatLB(new NumberingTypeListBox(m_xBuilder->weld_combo_box_text("formatdropdown")))
+ , m_xFormatLB(new SwNumberingTypeListBox(m_xBuilder->weld_combo_box_text("formatdropdown")))
, m_xPosLB(m_xBuilder->weld_combo_box_text("positiondropdown"))
, m_xOffsetMF(m_xBuilder->weld_metric_spin_button("spacingspin", FUNIT_CM))
, m_xDivisorED(m_xBuilder->weld_entry("textentry"))
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 7595495ba044..bd66fa969d03 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -393,7 +393,7 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(TabPageParent pPage,
, nActLevel(1)
, m_xLevelLB(m_xBuilder->weld_tree_view("level"))
, m_xCollBox(m_xBuilder->weld_combo_box_text("style"))
- , m_xNumberBox(new NumberingTypeListBox(m_xBuilder->weld_combo_box_text("numbering")))
+ , m_xNumberBox(new SwNumberingTypeListBox(m_xBuilder->weld_combo_box_text("numbering")))
, m_xCharFormatLB(m_xBuilder->weld_combo_box_text("charstyle"))
, m_xAllLevelFT(m_xBuilder->weld_label("sublevelsft"))
, m_xAllLevelNF(m_xBuilder->weld_spin_button("sublevelsnf"))
diff --git a/sw/source/uibase/inc/linenum.hxx b/sw/source/uibase/inc/linenum.hxx
index 6290c17bd2dc..127fb10efb27 100644
--- a/sw/source/uibase/inc/linenum.hxx
+++ b/sw/source/uibase/inc/linenum.hxx
@@ -35,7 +35,7 @@ private:
std::unique_ptr<weld::Widget> m_xDivRowsFT;
std::unique_ptr<weld::SpinButton> m_xNumIntervalNF;
std::unique_ptr<weld::ComboBoxText> m_xCharStyleLB;
- std::unique_ptr<NumberingTypeListBox> m_xFormatLB;
+ std::unique_ptr<SwNumberingTypeListBox> m_xFormatLB;
std::unique_ptr<weld::ComboBoxText> m_xPosLB;
std::unique_ptr<weld::MetricSpinButton> m_xOffsetMF;
std::unique_ptr<weld::Entry> m_xDivisorED;
diff --git a/sw/source/uibase/inc/numberingtypelistbox.hxx b/sw/source/uibase/inc/numberingtypelistbox.hxx
index fc4c48890805..030196ccbb24 100644
--- a/sw/source/uibase/inc/numberingtypelistbox.hxx
+++ b/sw/source/uibase/inc/numberingtypelistbox.hxx
@@ -41,14 +41,14 @@ namespace o3tl {
struct SwNumberingTypeListBox_Impl;
-class SW_DLLPUBLIC NumberingTypeListBox
+class SW_DLLPUBLIC SwNumberingTypeListBox
{
std::unique_ptr<weld::ComboBoxText> m_xWidget;
std::unique_ptr<SwNumberingTypeListBox_Impl> m_xImpl;
public:
- NumberingTypeListBox(weld::ComboBoxText* pWidget);
- ~NumberingTypeListBox();
+ SwNumberingTypeListBox(weld::ComboBoxText* pWidget);
+ ~SwNumberingTypeListBox();
void connect_changed(const Link<weld::ComboBoxText&, void>& rLink) { m_xWidget->connect_changed(rLink); }
diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx
index a9b8e6d5d529..223d6f226d4f 100644
--- a/sw/source/uibase/inc/outline.hxx
+++ b/sw/source/uibase/inc/outline.hxx
@@ -88,7 +88,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage
std::unique_ptr<weld::TreeView> m_xLevelLB;
std::unique_ptr<weld::ComboBoxText> m_xCollBox;
- std::unique_ptr<NumberingTypeListBox> m_xNumberBox;
+ std::unique_ptr<SwNumberingTypeListBox> m_xNumberBox;
std::unique_ptr<weld::ComboBoxText> m_xCharFormatLB;
std::unique_ptr<weld::Label> m_xAllLevelFT;
std::unique_ptr<weld::SpinButton> m_xAllLevelNF;
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index df0642a2e140..c87c838541b7 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -198,7 +198,7 @@ class SwSectionFootnoteEndTabPage : public SfxTabPage
std::unique_ptr<weld::CheckButton> m_xFootnoteNtNumFormatCB;
std::unique_ptr<weld::Label> m_xFootnotePrefixFT;
std::unique_ptr<weld::Entry> m_xFootnotePrefixED;
- std::unique_ptr<NumberingTypeListBox> m_xFootnoteNumViewBox;
+ std::unique_ptr<SwNumberingTypeListBox> m_xFootnoteNumViewBox;
std::unique_ptr<weld::Label> m_xFootnoteSuffixFT;
std::unique_ptr<weld::Entry> m_xFootnoteSuffixED;
std::unique_ptr<weld::CheckButton> m_xEndNtAtTextEndCB;
@@ -208,7 +208,7 @@ class SwSectionFootnoteEndTabPage : public SfxTabPage
std::unique_ptr<weld::CheckButton> m_xEndNtNumFormatCB;
std::unique_ptr<weld::Label> m_xEndPrefixFT;
std::unique_ptr<weld::Entry> m_xEndPrefixED;
- std::unique_ptr<NumberingTypeListBox> m_xEndNumViewBox;
+ std::unique_ptr<SwNumberingTypeListBox> m_xEndNumViewBox;
std::unique_ptr<weld::Label> m_xEndSuffixFT;
std::unique_ptr<weld::Entry> m_xEndSuffixED;
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx
index ad3b37db48f7..1f314adfeac0 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -38,7 +38,7 @@ struct SwNumberingTypeListBox_Impl
uno::Reference<text::XNumberingTypeInfo> xInfo;
};
-NumberingTypeListBox::NumberingTypeListBox(weld::ComboBoxText* pWidget)
+SwNumberingTypeListBox::SwNumberingTypeListBox(weld::ComboBoxText* pWidget)
: m_xWidget(pWidget)
, m_xImpl(new SwNumberingTypeListBox_Impl)
{
@@ -47,11 +47,11 @@ NumberingTypeListBox::NumberingTypeListBox(weld::ComboBoxText* pWidget)
m_xImpl->xInfo.set(xDefNum, uno::UNO_QUERY);
}
-NumberingTypeListBox::~NumberingTypeListBox()
+SwNumberingTypeListBox::~SwNumberingTypeListBox()
{
}
-void NumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags)
+void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags)
{
m_xWidget->clear();
uno::Sequence<sal_Int16> aTypes;
@@ -136,7 +136,7 @@ void NumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags)
}
}
-SvxNumType NumberingTypeListBox::GetSelectedNumberingType()
+SvxNumType SwNumberingTypeListBox::GetSelectedNumberingType()
{
SvxNumType nRet = SVX_NUM_CHARS_UPPER_LETTER;
int nSelPos = m_xWidget->get_active();
@@ -149,7 +149,7 @@ SvxNumType NumberingTypeListBox::GetSelectedNumberingType()
return nRet;
}
-bool NumberingTypeListBox::SelectNumberingType(SvxNumType nType)
+bool SwNumberingTypeListBox::SelectNumberingType(SvxNumType nType)
{
int nPos = m_xWidget->find_id(OUString::number(nType));
m_xWidget->set_active(nPos);
commit 43eb2e8e60b5221ebbc074916514619c63e22ee1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 2 19:37:35 2018 +0100
weld SwSectionFootnoteEndTabPage
Change-Id: Ib4246a2f90780a005e79e2d071b43a5629a3242c
Reviewed-on: https://gerrit.libreoffice.org/55216
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit cd08397eedbe347784a3ac569481a17a8391e7b2)
Reviewed-on: https://gerrit.libreoffice.org/55236
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 9cb423211176..d1ccabc9a9f9 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -368,87 +368,6 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
rAttrs->Put( makeSdrTextWordWrapItem( TRISTATE_TRUE == eState ) );
}
- eState = m_xTsbContour->get_state();
- if( m_xTsbContour->get_state_changed_from_saved() )
- {
- rAttrs->Put( makeSdrTextContourFrameItem( TRISTATE_TRUE == eState ) );
- }
-
- eState = m_xTsbFitToSize->get_state();
- if( m_xTsbFitToSize->get_state_changed_from_saved() )
- {
- drawing::TextFitToSizeType eFTS;
- switch( eState )
- {
- default: ; //prevent warning
- OSL_FAIL( "svx::SvxTextAttrPage::FillItemSet(), unhandled state!" );
- SAL_FALLTHROUGH;
- case TRISTATE_FALSE: eFTS = drawing::TextFitToSizeType_AUTOFIT; break;
- case TRISTATE_TRUE: eFTS = drawing::TextFitToSizeType_PROPORTIONAL; break;
- }
- rAttrs->Put( SdrTextFitToSizeTypeItem( eFTS ) );
- }
-
- // centered
- RectPoint eRP = m_aCtlPosition.GetActualRP();
- SdrTextVertAdjust eTVA, eOldTVA;
- SdrTextHorzAdjust eTHA, eOldTHA;
-
- switch( eRP )
- {
- default:
- case RectPoint::LT: eTVA = SDRTEXTVERTADJUST_TOP;
- eTHA = SDRTEXTHORZADJUST_LEFT; break;
- case RectPoint::LM: eTVA = SDRTEXTVERTADJUST_CENTER;
- eTHA = SDRTEXTHORZADJUST_LEFT; break;
- case RectPoint::LB: eTVA = SDRTEXTVERTADJUST_BOTTOM;
- eTHA = SDRTEXTHORZADJUST_LEFT; break;
- case RectPoint::MT: eTVA = SDRTEXTVERTADJUST_TOP;
- eTHA = SDRTEXTHORZADJUST_CENTER; break;
- case RectPoint::MM: eTVA = SDRTEXTVERTADJUST_CENTER;
- eTHA = SDRTEXTHORZADJUST_CENTER; break;
- case RectPoint::MB: eTVA = SDRTEXTVERTADJUST_BOTTOM;
- eTHA = SDRTEXTHORZADJUST_CENTER; break;
- case RectPoint::RT: eTVA = SDRTEXTVERTADJUST_TOP;
- eTHA = SDRTEXTHORZADJUST_RIGHT; break;
- case RectPoint::RM: eTVA = SDRTEXTVERTADJUST_CENTER;
- eTHA = SDRTEXTHORZADJUST_RIGHT; break;
- case RectPoint::RB: eTVA = SDRTEXTVERTADJUST_BOTTOM;
- eTHA = SDRTEXTHORZADJUST_RIGHT; break;
- }
-
- // #103516# Do not change values if adjust controls were disabled.
- bool bIsDisabled(m_aCtlPosition.IsCompletelyDisabled());
-
- if(!bIsDisabled)
- {
- if( m_xTsbFullWidth->get_state() == TRISTATE_TRUE )
- {
- if (IsTextDirectionLeftToRight())
- eTHA = SDRTEXTHORZADJUST_BLOCK;
- else
- eTVA = SDRTEXTVERTADJUST_BLOCK;
- }
-
- if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE )
- {
- eOldTVA = rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ).GetValue();
- if( eOldTVA != eTVA )
- rAttrs->Put( SdrTextVertAdjustItem( eTVA ) );
- }
- else
- rAttrs->Put( SdrTextVertAdjustItem( eTVA ) );
-
- if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SfxItemState::DONTCARE )
- {
- eOldTHA = rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ).GetValue();
- if( eOldTHA != eTHA )
- rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) );
- }
- else
- rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) );
- }
-
return true;
}
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 04fbd09c5a22..37e57b1c4c83 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -440,9 +440,6 @@
<glade-widget-class title="Chart Light Button" name="chartcontrollerlo-LightButton"
generic-name="ChartLightButton" parent="GtkButton"
icon-name="widget-gtk-button"/>
- <glade-widget-class title="Numbering Type ListBox" name="swlo-SwNumberingTypeListBox"
- generic-name="NumberingTypeListBox" parent="GtkComboBox"
- icon-name="widget-gtk-combobox"/>
<glade-widget-class title="Bookmark Combo" name="swuilo-BookmarkCombo"
generic-name="BookmarkComboBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 025f9b90ecde..9f2e7f334ba6 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1822,81 +1822,50 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
m_sFilterName = m_sFilePasswd = aEmptyOUStr;
}
-SwSectionFootnoteEndTabPage::SwSectionFootnoteEndTabPage( vcl::Window *pParent,
- const SfxItemSet &rAttrSet)
- : SfxTabPage( pParent, "FootnotesEndnotesTabPage", "modules/swriter/ui/footnotesendnotestabpage.ui", &rAttrSet )
-
-{
- get(m_pFootnoteNtAtTextEndCB,"ftnntattextend");
-
- get(m_pFootnoteNtNumCB,"ftnntnum");
- get(m_pFootnoteOffsetLbl,"ftnoffset_label");
- get(m_pFootnoteOffsetField,"ftnoffset");
-
- get(m_pFootnoteNtNumFormatCB,"ftnntnumfmt");
- get(m_pFootnotePrefixFT,"ftnprefix_label");
- get(m_pFootnotePrefixED,"ftnprefix");
- get(m_pFootnoteNumViewBox,"ftnnumviewbox");
- get(m_pFootnoteSuffixFT,"ftnsuffix_label");
- get(m_pFootnoteSuffixED,"ftnsuffix");
-
- get(m_pEndNtAtTextEndCB,"endntattextend");
-
- get(m_pEndNtNumCB,"endntnum");
- get(m_pEndOffsetLbl,"endoffset_label");
- get(m_pEndOffsetField,"endoffset");
-
- get(m_pEndNtNumFormatCB,"endntnumfmt");
- get(m_pEndPrefixFT,"endprefix_label");
- get(m_pEndPrefixED,"endprefix");
- get(m_pEndNumViewBox,"endnumviewbox");
- get(m_pEndSuffixFT,"endsuffix_label");
- get(m_pEndSuffixED,"endsuffix");
-
- Link<Button*,void> aLk( LINK( this, SwSectionFootnoteEndTabPage, FootEndHdl));
- m_pFootnoteNtAtTextEndCB->SetClickHdl( aLk );
- m_pFootnoteNtNumCB->SetClickHdl( aLk );
- m_pEndNtAtTextEndCB->SetClickHdl( aLk );
- m_pEndNtNumCB->SetClickHdl( aLk );
- m_pFootnoteNtNumFormatCB->SetClickHdl( aLk );
- m_pEndNtNumFormatCB->SetClickHdl( aLk );
+SwSectionFootnoteEndTabPage::SwSectionFootnoteEndTabPage(TabPageParent pParent, const SfxItemSet &rAttrSet)
+ : SfxTabPage(pParent, "modules/swriter/ui/footnotesendnotestabpage.ui", "FootnotesEndnotesTabPage", &rAttrSet)
+ , m_xFootnoteNtAtTextEndCB(m_xBuilder->weld_check_button("ftnntattextend"))
+ , m_xFootnoteNtNumCB(m_xBuilder->weld_check_button("ftnntnum"))
+ , m_xFootnoteOffsetLbl(m_xBuilder->weld_label("ftnoffset_label"))
+ , m_xFootnoteOffsetField(m_xBuilder->weld_spin_button("ftnoffset"))
+ , m_xFootnoteNtNumFormatCB(m_xBuilder->weld_check_button("ftnntnumfmt"))
+ , m_xFootnotePrefixFT(m_xBuilder->weld_label("ftnprefix_label"))
+ , m_xFootnotePrefixED(m_xBuilder->weld_entry("ftnprefix"))
+ , m_xFootnoteNumViewBox(new NumberingTypeListBox(m_xBuilder->weld_combo_box_text("ftnnumviewbox")))
+ , m_xFootnoteSuffixFT(m_xBuilder->weld_label("ftnsuffix_label"))
+ , m_xFootnoteSuffixED(m_xBuilder->weld_entry("ftnsuffix"))
+ , m_xEndNtAtTextEndCB(m_xBuilder->weld_check_button("endntattextend"))
+ , m_xEndNtNumCB(m_xBuilder->weld_check_button("endntnum"))
+ , m_xEndOffsetLbl(m_xBuilder->weld_label("endoffset_label"))
+ , m_xEndOffsetField(m_xBuilder->weld_spin_button("endoffset"))
+ , m_xEndNtNumFormatCB(m_xBuilder->weld_check_button("endntnumfmt"))
+ , m_xEndPrefixFT(m_xBuilder->weld_label("endprefix_label"))
+ , m_xEndPrefixED(m_xBuilder->weld_entry("endprefix"))
+ , m_xEndNumViewBox(new NumberingTypeListBox(m_xBuilder->weld_combo_box_text("endnumviewbox")))
+ , m_xEndSuffixFT(m_xBuilder->weld_label("endsuffix_label"))
+ , m_xEndSuffixED(m_xBuilder->weld_entry("endsuffix"))
+{
+ m_xFootnoteNumViewBox->Reload(SwInsertNumTypes::Extended);
+ m_xEndNumViewBox->Reload(SwInsertNumTypes::Extended);
+
+ Link<weld::ToggleButton&,void> aLk( LINK( this, SwSectionFootnoteEndTabPage, FootEndHdl));
+ m_xFootnoteNtAtTextEndCB->connect_toggled( aLk );
+ m_xFootnoteNtNumCB->connect_toggled( aLk );
+ m_xEndNtAtTextEndCB->connect_toggled( aLk );
+ m_xEndNtNumCB->connect_toggled( aLk );
+ m_xFootnoteNtNumFormatCB->connect_toggled( aLk );
+ m_xEndNtNumFormatCB->connect_toggled( aLk );
}
SwSectionFootnoteEndTabPage::~SwSectionFootnoteEndTabPage()
{
- disposeOnce();
-}
-
-void SwSectionFootnoteEndTabPage::dispose()
-{
- m_pFootnoteNtAtTextEndCB.clear();
- m_pFootnoteNtNumCB.clear();
- m_pFootnoteOffsetLbl.clear();
- m_pFootnoteOffsetField.clear();
- m_pFootnoteNtNumFormatCB.clear();
- m_pFootnotePrefixFT.clear();
- m_pFootnotePrefixED.clear();
- m_pFootnoteNumViewBox.clear();
- m_pFootnoteSuffixFT.clear();
- m_pFootnoteSuffixED.clear();
- m_pEndNtAtTextEndCB.clear();
- m_pEndNtNumCB.clear();
- m_pEndOffsetLbl.clear();
- m_pEndOffsetField.clear();
- m_pEndNtNumFormatCB.clear();
- m_pEndPrefixFT.clear();
- m_pEndPrefixED.clear();
- m_pEndNumViewBox.clear();
- m_pEndSuffixFT.clear();
- m_pEndSuffixED.clear();
- SfxTabPage::dispose();
}
bool SwSectionFootnoteEndTabPage::FillItemSet( SfxItemSet* rSet )
{
- SwFormatFootnoteAtTextEnd aFootnote( m_pFootnoteNtAtTextEndCB->IsChecked()
- ? ( m_pFootnoteNtNumCB->IsChecked()
- ? ( m_pFootnoteNtNumFormatCB->IsChecked()
+ SwFormatFootnoteAtTextEnd aFootnote( m_xFootnoteNtAtTextEndCB->get_active()
+ ? ( m_xFootnoteNtNumCB->get_active()
+ ? ( m_xFootnoteNtNumFormatCB->get_active()
? FTNEND_ATTXTEND_OWNNUMANDFMT
: FTNEND_ATTXTEND_OWNNUMSEQ )
: FTNEND_ATTXTEND )
@@ -1905,20 +1874,20 @@ bool SwSectionFootnoteEndTabPage::FillItemSet( SfxItemSet* rSet )
switch( aFootnote.GetValue() )
{
case FTNEND_ATTXTEND_OWNNUMANDFMT:
- aFootnote.SetNumType( m_pFootnoteNumViewBox->GetSelectedNumberingType() );
- aFootnote.SetPrefix( m_pFootnotePrefixED->GetText().replaceAll("\\t", "\t") ); // fdo#65666
- aFootnote.SetSuffix( m_pFootnoteSuffixED->GetText().replaceAll("\\t", "\t") );
+ aFootnote.SetNumType( m_xFootnoteNumViewBox->GetSelectedNumberingType() );
+ aFootnote.SetPrefix( m_xFootnotePrefixED->get_text().replaceAll("\\t", "\t") ); // fdo#65666
+ aFootnote.SetSuffix( m_xFootnoteSuffixED->get_text().replaceAll("\\t", "\t") );
SAL_FALLTHROUGH;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- aFootnote.SetOffset( static_cast< sal_uInt16 >( m_pFootnoteOffsetField->GetValue()-1 ) );
+ aFootnote.SetOffset( static_cast< sal_uInt16 >( m_xFootnoteOffsetField->get_value()-1 ) );
break;
default: break;
}
- SwFormatEndAtTextEnd aEnd( m_pEndNtAtTextEndCB->IsChecked()
- ? ( m_pEndNtNumCB->IsChecked()
- ? ( m_pEndNtNumFormatCB->IsChecked()
+ SwFormatEndAtTextEnd aEnd( m_xEndNtAtTextEndCB->get_active()
+ ? ( m_xEndNtNumCB->get_active()
+ ? ( m_xEndNtNumFormatCB->get_active()
? FTNEND_ATTXTEND_OWNNUMANDFMT
: FTNEND_ATTXTEND_OWNNUMSEQ )
: FTNEND_ATTXTEND )
@@ -1927,13 +1896,13 @@ bool SwSectionFootnoteEndTabPage::FillItemSet( SfxItemSet* rSet )
switch( aEnd.GetValue() )
{
case FTNEND_ATTXTEND_OWNNUMANDFMT:
- aEnd.SetNumType( m_pEndNumViewBox->GetSelectedNumberingType() );
- aEnd.SetPrefix( m_pEndPrefixED->GetText().replaceAll("\\t", "\t") );
- aEnd.SetSuffix( m_pEndSuffixED->GetText().replaceAll("\\t", "\t") );
+ aEnd.SetNumType( m_xEndNumViewBox->GetSelectedNumberingType() );
+ aEnd.SetPrefix( m_xEndPrefixED->get_text().replaceAll("\\t", "\t") );
+ aEnd.SetSuffix( m_xEndSuffixED->get_text().replaceAll("\\t", "\t") );
SAL_FALLTHROUGH;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- aEnd.SetOffset( static_cast< sal_uInt16 >( m_pEndOffsetField->GetValue()-1 ) );
+ aEnd.SetOffset( static_cast< sal_uInt16 >( m_xEndOffsetField->get_value()-1 ) );
break;
default: break;
}
@@ -1947,79 +1916,79 @@ bool SwSectionFootnoteEndTabPage::FillItemSet( SfxItemSet* rSet )
void SwSectionFootnoteEndTabPage::ResetState( bool bFootnote,
const SwFormatFootnoteEndAtTextEnd& rAttr )
{
- CheckBox *pNtAtTextEndCB, *pNtNumCB, *pNtNumFormatCB;
- FixedText*pPrefixFT, *pSuffixFT;
- Edit *pPrefixED, *pSuffixED;
- SwNumberingTypeListBox *pNumViewBox;
- FixedText* pOffsetText;
- NumericField *pOffsetField;
+ weld::CheckButton *pNtAtTextEndCB, *pNtNumCB, *pNtNumFormatCB;
+ weld::Label *pPrefixFT, *pSuffixFT;
+ weld::Entry *pPrefixED, *pSuffixED;
+ NumberingTypeListBox *pNumViewBox;
+ weld::Label *pOffsetText;
+ weld::SpinButton *pOffsetField;
if( bFootnote )
{
- pNtAtTextEndCB = m_pFootnoteNtAtTextEndCB;
- pNtNumCB = m_pFootnoteNtNumCB;
- pNtNumFormatCB = m_pFootnoteNtNumFormatCB;
- pPrefixFT = m_pFootnotePrefixFT;
- pPrefixED = m_pFootnotePrefixED;
- pSuffixFT = m_pFootnoteSuffixFT;
- pSuffixED = m_pFootnoteSuffixED;
- pNumViewBox = m_pFootnoteNumViewBox;
- pOffsetText = m_pFootnoteOffsetLbl;
- pOffsetField = m_pFootnoteOffsetField;
+ pNtAtTextEndCB = m_xFootnoteNtAtTextEndCB.get();
+ pNtNumCB = m_xFootnoteNtNumCB.get();
+ pNtNumFormatCB = m_xFootnoteNtNumFormatCB.get();
+ pPrefixFT = m_xFootnotePrefixFT.get();
+ pPrefixED = m_xFootnotePrefixED.get();
+ pSuffixFT = m_xFootnoteSuffixFT.get();
+ pSuffixED = m_xFootnoteSuffixED.get();
+ pNumViewBox = m_xFootnoteNumViewBox.get();
+ pOffsetText = m_xFootnoteOffsetLbl.get();
+ pOffsetField = m_xFootnoteOffsetField.get();
}
else
{
- pNtAtTextEndCB = m_pEndNtAtTextEndCB;
- pNtNumCB = m_pEndNtNumCB;
- pNtNumFormatCB = m_pEndNtNumFormatCB;
- pPrefixFT = m_pEndPrefixFT;
- pPrefixED = m_pEndPrefixED;
- pSuffixFT = m_pEndSuffixFT;
- pSuffixED = m_pEndSuffixED;
- pNumViewBox = m_pEndNumViewBox;
- pOffsetText = m_pEndOffsetLbl;
- pOffsetField = m_pEndOffsetField;
+ pNtAtTextEndCB = m_xEndNtAtTextEndCB.get();
+ pNtNumCB = m_xEndNtNumCB.get();
+ pNtNumFormatCB = m_xEndNtNumFormatCB.get();
+ pPrefixFT = m_xEndPrefixFT.get();
+ pPrefixED = m_xEndPrefixED.get();
+ pSuffixFT = m_xEndSuffixFT.get();
+ pSuffixED = m_xEndSuffixED.get();
+ pNumViewBox = m_xEndNumViewBox.get();
+ pOffsetText = m_xEndOffsetLbl.get();
+ pOffsetField = m_xEndOffsetField.get();
}
const sal_uInt16 eState = rAttr.GetValue();
switch( eState )
{
case FTNEND_ATTXTEND_OWNNUMANDFMT:
- pNtNumFormatCB->SetState( TRISTATE_TRUE );
+ pNtNumFormatCB->set_state( TRISTATE_TRUE );
SAL_FALLTHROUGH;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- pNtNumCB->SetState( TRISTATE_TRUE );
+ pNtNumCB->set_state( TRISTATE_TRUE );
SAL_FALLTHROUGH;
case FTNEND_ATTXTEND:
- pNtAtTextEndCB->SetState( TRISTATE_TRUE );
+ pNtAtTextEndCB->set_state( TRISTATE_TRUE );
// no break;
}
pNumViewBox->SelectNumberingType( rAttr.GetNumType() );
- pOffsetField->SetValue( rAttr.GetOffset() + 1 );
- pPrefixED->SetText( rAttr.GetPrefix().replaceAll("\t", "\\t") );
- pSuffixED->SetText( rAttr.GetSuffix().replaceAll("\t", "\\t") );
+ pOffsetField->set_value( rAttr.GetOffset() + 1 );
+ pPrefixED->set_text( rAttr.GetPrefix().replaceAll("\t", "\\t") );
+ pSuffixED->set_text( rAttr.GetSuffix().replaceAll("\t", "\\t") );
switch( eState )
{
case FTNEND_ATPGORDOCEND:
- pNtNumCB->Enable( false );
+ pNtNumCB->set_sensitive( false );
SAL_FALLTHROUGH;
case FTNEND_ATTXTEND:
- pNtNumFormatCB->Enable( false );
- pOffsetField->Enable( false );
- pOffsetText->Enable( false );
+ pNtNumFormatCB->set_sensitive( false );
+ pOffsetField->set_sensitive( false );
+ pOffsetText->set_sensitive( false );
SAL_FALLTHROUGH;
case FTNEND_ATTXTEND_OWNNUMSEQ:
pNumViewBox->Enable( false );
- pPrefixFT->Enable( false );
- pPrefixED->Enable( false );
- pSuffixFT->Enable( false );
- pSuffixED->Enable( false );
+ pPrefixFT->set_sensitive( false );
+ pPrefixED->set_sensitive( false );
+ pSuffixFT->set_sensitive( false );
+ pSuffixED->set_sensitive( false );
// no break;
}
}
@@ -2033,61 +2002,61 @@ void SwSectionFootnoteEndTabPage::Reset( const SfxItemSet* rSet )
VclPtr<SfxTabPage> SwSectionFootnoteEndTabPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrSet)
{
- return VclPtr<SwSectionFootnoteEndTabPage>::Create(pParent.pParent, *rAttrSet);
+ return VclPtr<SwSectionFootnoteEndTabPage>::Create(pParent, *rAttrSet);
}
-IMPL_LINK( SwSectionFootnoteEndTabPage, FootEndHdl, Button *, pBox, void )
+IMPL_LINK( SwSectionFootnoteEndTabPage, FootEndHdl, weld::ToggleButton&, rBox, void )
{
- bool bFoot = m_pFootnoteNtAtTextEndCB == pBox || m_pFootnoteNtNumCB == pBox ||
- m_pFootnoteNtNumFormatCB == pBox ;
+ bool bFoot = m_xFootnoteNtAtTextEndCB.get() == &rBox || m_xFootnoteNtNumCB.get() == &rBox ||
+ m_xFootnoteNtNumFormatCB.get() == &rBox ;
- CheckBox *pNumBox, *pNumFormatBox, *pEndBox;
- SwNumberingTypeListBox* pNumViewBox;
- FixedText* pOffsetText;
- NumericField *pOffsetField;
- FixedText*pPrefixFT, *pSuffixFT;
- Edit *pPrefixED, *pSuffixED;
+ weld::CheckButton *pNumBox, *pNumFormatBox, *pEndBox;
+ NumberingTypeListBox* pNumViewBox;
+ weld::Label *pOffsetText;
+ weld::SpinButton *pOffsetField;
+ weld::Label *pPrefixFT, *pSuffixFT;
+ weld::Entry *pPrefixED, *pSuffixED;
if( bFoot )
{
- pEndBox = m_pFootnoteNtAtTextEndCB;
- pNumBox = m_pFootnoteNtNumCB;
- pNumFormatBox = m_pFootnoteNtNumFormatCB;
- pNumViewBox = m_pFootnoteNumViewBox;
- pOffsetText = m_pFootnoteOffsetLbl;
- pOffsetField = m_pFootnoteOffsetField;
- pPrefixFT = m_pFootnotePrefixFT;
- pSuffixFT = m_pFootnoteSuffixFT;
- pPrefixED = m_pFootnotePrefixED;
- pSuffixED = m_pFootnoteSuffixED;
+ pEndBox = m_xFootnoteNtAtTextEndCB.get();
+ pNumBox = m_xFootnoteNtNumCB.get();
+ pNumFormatBox = m_xFootnoteNtNumFormatCB.get();
+ pNumViewBox = m_xFootnoteNumViewBox.get();
+ pOffsetText = m_xFootnoteOffsetLbl.get();
+ pOffsetField = m_xFootnoteOffsetField.get();
+ pPrefixFT = m_xFootnotePrefixFT.get();
+ pSuffixFT = m_xFootnoteSuffixFT.get();
+ pPrefixED = m_xFootnotePrefixED.get();
+ pSuffixED = m_xFootnoteSuffixED.get();
}
else
{
- pEndBox = m_pEndNtAtTextEndCB;
- pNumBox = m_pEndNtNumCB;
- pNumFormatBox = m_pEndNtNumFormatCB;
- pNumViewBox = m_pEndNumViewBox;
- pOffsetText = m_pEndOffsetLbl;
- pOffsetField = m_pEndOffsetField;
- pPrefixFT = m_pEndPrefixFT;
- pSuffixFT = m_pEndSuffixFT;
- pPrefixED = m_pEndPrefixED;
- pSuffixED = m_pEndSuffixED;
- }
-
- bool bEnableAtEnd = TRISTATE_TRUE == pEndBox->GetState();
- bool bEnableNum = bEnableAtEnd && TRISTATE_TRUE == pNumBox->GetState();
- bool bEnableNumFormat = bEnableNum && TRISTATE_TRUE == pNumFormatBox->GetState();
-
- pNumBox->Enable( bEnableAtEnd );
- pOffsetText->Enable( bEnableNum );
- pOffsetField->Enable( bEnableNum );
- pNumFormatBox->Enable( bEnableNum );
+ pEndBox = m_xEndNtAtTextEndCB.get();
+ pNumBox = m_xEndNtNumCB.get();
+ pNumFormatBox = m_xEndNtNumFormatCB.get();
+ pNumViewBox = m_xEndNumViewBox.get();
+ pOffsetText = m_xEndOffsetLbl.get();
+ pOffsetField = m_xEndOffsetField.get();
+ pPrefixFT = m_xEndPrefixFT.get();
+ pSuffixFT = m_xEndSuffixFT.get();
+ pPrefixED = m_xEndPrefixED.get();
+ pSuffixED = m_xEndSuffixED.get();
+ }
+
+ bool bEnableAtEnd = TRISTATE_TRUE == pEndBox->get_state();
+ bool bEnableNum = bEnableAtEnd && TRISTATE_TRUE == pNumBox->get_state();
+ bool bEnableNumFormat = bEnableNum && TRISTATE_TRUE == pNumFormatBox->get_state();
+
+ pNumBox->set_sensitive( bEnableAtEnd );
+ pOffsetText->set_sensitive( bEnableNum );
+ pOffsetField->set_sensitive( bEnableNum );
+ pNumFormatBox->set_sensitive( bEnableNum );
pNumViewBox->Enable( bEnableNumFormat );
- pPrefixED->Enable( bEnableNumFormat );
- pSuffixED->Enable( bEnableNumFormat );
- pPrefixFT->Enable( bEnableNumFormat );
- pSuffixFT->Enable( bEnableNumFormat );
+ pPrefixED->set_sensitive( bEnableNumFormat );
+ pSuffixED->set_sensitive( bEnableNumFormat );
+ pPrefixFT->set_sensitive( bEnableNumFormat );
+ pSuffixFT->set_sensitive( bEnableNumFormat );
}
SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
diff --git a/sw/source/uibase/inc/numberingtypelistbox.hxx b/sw/source/uibase/inc/numberingtypelistbox.hxx
index b6c83f14e5c1..fc4c48890805 100644
--- a/sw/source/uibase/inc/numberingtypelistbox.hxx
+++ b/sw/source/uibase/inc/numberingtypelistbox.hxx
@@ -41,23 +41,6 @@ namespace o3tl {
struct SwNumberingTypeListBox_Impl;
-class SW_DLLPUBLIC SwNumberingTypeListBox : public ListBox
-{
- std::unique_ptr<SwNumberingTypeListBox_Impl> pImpl;
-
-public:
- SwNumberingTypeListBox( vcl::Window* pWin, WinBits nStyle );
- virtual ~SwNumberingTypeListBox() override;
- virtual void dispose() override;
-
- virtual bool set_property(const OString &rKey, const OUString &rValue) override;
-
- void Reload(SwInsertNumTypes nTypeFlags);
-
- SvxNumType GetSelectedNumberingType();
- bool SelectNumberingType(SvxNumType nType);
-};
-
class SW_DLLPUBLIC NumberingTypeListBox
{
std::unique_ptr<weld::ComboBoxText> m_xWidget;
@@ -73,6 +56,7 @@ public:
SvxNumType GetSelectedNumberingType();
bool SelectNumberingType(SvxNumType nType);
void SetNoSelection() { m_xWidget->set_active(-1); }
+ void Enable(bool bEnable) { m_xWidget->set_sensitive(bEnable); }
};
#endif
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index 83480447d891..df0642a2e140 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -191,39 +191,33 @@ public:
class SwSectionFootnoteEndTabPage : public SfxTabPage
{
- VclPtr<CheckBox> m_pFootnoteNtAtTextEndCB;
-
- VclPtr<CheckBox> m_pFootnoteNtNumCB;
- VclPtr<FixedText> m_pFootnoteOffsetLbl;
- VclPtr<NumericField> m_pFootnoteOffsetField;
-
- VclPtr<CheckBox> m_pFootnoteNtNumFormatCB;
- VclPtr<FixedText> m_pFootnotePrefixFT;
- VclPtr<Edit> m_pFootnotePrefixED;
- VclPtr<SwNumberingTypeListBox> m_pFootnoteNumViewBox;
- VclPtr<FixedText> m_pFootnoteSuffixFT;
- VclPtr<Edit> m_pFootnoteSuffixED;
-
- VclPtr<CheckBox> m_pEndNtAtTextEndCB;
-
- VclPtr<CheckBox> m_pEndNtNumCB;
- VclPtr<FixedText> m_pEndOffsetLbl;
- VclPtr<NumericField> m_pEndOffsetField;
-
- VclPtr<CheckBox> m_pEndNtNumFormatCB;
- VclPtr<FixedText> m_pEndPrefixFT;
- VclPtr<Edit> m_pEndPrefixED;
- VclPtr<SwNumberingTypeListBox> m_pEndNumViewBox;
- VclPtr<FixedText> m_pEndSuffixFT;
- VclPtr<Edit> m_pEndSuffixED;
-
- DECL_LINK( FootEndHdl, Button*, void );
+ std::unique_ptr<weld::CheckButton> m_xFootnoteNtAtTextEndCB;
+ std::unique_ptr<weld::CheckButton> m_xFootnoteNtNumCB;
+ std::unique_ptr<weld::Label> m_xFootnoteOffsetLbl;
+ std::unique_ptr<weld::SpinButton> m_xFootnoteOffsetField;
+ std::unique_ptr<weld::CheckButton> m_xFootnoteNtNumFormatCB;
+ std::unique_ptr<weld::Label> m_xFootnotePrefixFT;
+ std::unique_ptr<weld::Entry> m_xFootnotePrefixED;
+ std::unique_ptr<NumberingTypeListBox> m_xFootnoteNumViewBox;
+ std::unique_ptr<weld::Label> m_xFootnoteSuffixFT;
+ std::unique_ptr<weld::Entry> m_xFootnoteSuffixED;
+ std::unique_ptr<weld::CheckButton> m_xEndNtAtTextEndCB;
+ std::unique_ptr<weld::CheckButton> m_xEndNtNumCB;
+ std::unique_ptr<weld::Label> m_xEndOffsetLbl;
+ std::unique_ptr<weld::SpinButton> m_xEndOffsetField;
+ std::unique_ptr<weld::CheckButton> m_xEndNtNumFormatCB;
+ std::unique_ptr<weld::Label> m_xEndPrefixFT;
+ std::unique_ptr<weld::Entry> m_xEndPrefixED;
+ std::unique_ptr<NumberingTypeListBox> m_xEndNumViewBox;
+ std::unique_ptr<weld::Label> m_xEndSuffixFT;
+ std::unique_ptr<weld::Entry> m_xEndSuffixED;
+
+ DECL_LINK(FootEndHdl, weld::ToggleButton&, void);
void ResetState( bool bFootnote, const SwFormatFootnoteEndAtTextEnd& );
public:
- SwSectionFootnoteEndTabPage( vcl::Window *pParent, const SfxItemSet &rAttrSet );
+ SwSectionFootnoteEndTabPage(TabPageParent pParent, const SfxItemSet &rAttrSet);
virtual ~SwSectionFootnoteEndTabPage() override;
- virtual void dispose() override;
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx
index c4bc802155ca..ad3b37db48f7 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -38,151 +38,6 @@ struct SwNumberingTypeListBox_Impl
uno::Reference<text::XNumberingTypeInfo> xInfo;
};
-SwNumberingTypeListBox::SwNumberingTypeListBox( vcl::Window* pWin, WinBits nStyle ) :
- ListBox(pWin, nStyle),
- pImpl(new SwNumberingTypeListBox_Impl)
-{
- uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference<text::XDefaultNumberingProvider> xDefNum = text::DefaultNumberingProvider::create(xContext);
-
- pImpl->xInfo.set(xDefNum, uno::UNO_QUERY);
-}
-
-bool SwNumberingTypeListBox::set_property(const OString &rKey, const OUString &rValue)
-{
- if (rKey == "type")
- Reload(static_cast<SwInsertNumTypes>(rValue.toInt32()));
- else
- return ListBox::set_property(rKey, rValue);
- return true;
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void makeSwNumberingTypeListBox(VclPtr<vcl::Window> & rRet, VclPtr<vcl::Window> & pParent, VclBuilder::stringmap &)
-{
- VclPtrInstance<SwNumberingTypeListBox> pListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP);
- pListBox->EnableAutoSize(true);
- rRet = pListBox;
-}
-
-SwNumberingTypeListBox::~SwNumberingTypeListBox()
-{
- disposeOnce();
-}
-
-void SwNumberingTypeListBox::dispose()
-{
- pImpl.reset();
- ListBox::dispose();
-}
-
-void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags)
-{
- Clear();
- uno::Sequence<sal_Int16> aTypes;
- const sal_Int16* pTypes = nullptr;
- if(nTypeFlags & SwInsertNumTypes::Extended)
- {
- if(pImpl->xInfo.is())
- {
- aTypes = pImpl->xInfo->getSupportedNumberingTypes();
- pTypes = aTypes.getConstArray();
- }
- }
-
- for(size_t i = 0; i < SvxNumberingTypeTable::Count(); i++)
- {
- sal_IntPtr nValue = SvxNumberingTypeTable::GetValue(i);
- bool bInsert = true;
- sal_Int32 nPos = LISTBOX_APPEND;
- switch(nValue)
- {
- case style::NumberingType::NUMBER_NONE:
- bInsert = bool(nTypeFlags & SwInsertNumTypes::NoNumbering);
- nPos = 0;
-
- break;
- case style::NumberingType::CHAR_SPECIAL:
- bInsert = bool(nTypeFlags & SwInsertNumTypes::Bullet);
-
- break;
- case style::NumberingType::PAGE_DESCRIPTOR:
- bInsert = bool(nTypeFlags & SwInsertNumTypes::PageStyleNumbering);
-
- break;
- case style::NumberingType::BITMAP:
- bInsert = bool(nTypeFlags & SwInsertNumTypes::Bitmap );
-
- break;
- case style::NumberingType::BITMAP | LINK_TOKEN:
- bInsert = false;
-
- break;
- default:
- if (nValue > style::NumberingType::CHARS_LOWER_LETTER_N)
- {
- // Insert only if offered by i18n framework per configuration.
- bInsert = false;
- if (pTypes)
- {
- for(sal_Int32 nType = 0; nType < aTypes.getLength(); nType++)
- {
- if (pTypes[nType] == nValue)
- {
- bInsert = true;
- break; // for
- }
- }
- }
- }
- }
- if(bInsert)
- {
- sal_Int32 nEntry = InsertEntry(SvxNumberingTypeTable::GetString(i), nPos);
- SetEntryData( nEntry, reinterpret_cast<void*>(nValue) );
- }
- }
- if(nTypeFlags & SwInsertNumTypes::Extended)
- {
- if(pTypes)
- {
- for(sal_Int32 nType = 0; nType < aTypes.getLength(); nType++)
- {
- sal_Int16 nCurrent = pTypes[nType];
- if(nCurrent > style::NumberingType::CHARS_LOWER_LETTER_N)
- {
- if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos(reinterpret_cast<void*>(static_cast<sal_uLong>(nCurrent))))
- {
- OUString aIdent = pImpl->xInfo->getNumberingIdentifier( nCurrent );
- sal_Int32 nPos = InsertEntry(aIdent);
- SetEntryData(nPos, reinterpret_cast<void*>(static_cast<sal_uLong>(nCurrent)));
- }
- }
- }
- }
- SelectEntryPos(0);
- }
-}
-
-SvxNumType SwNumberingTypeListBox::GetSelectedNumberingType()
-{
- SvxNumType nRet = SVX_NUM_CHARS_UPPER_LETTER;
- sal_Int32 nSelPos = GetSelectedEntryPos();
- if(LISTBOX_ENTRY_NOTFOUND != nSelPos)
- nRet = static_cast<SvxNumType>(reinterpret_cast<sal_uLong>(GetEntryData(nSelPos)));
-#if OSL_DEBUG_LEVEL > 0
- else
- OSL_FAIL("SwNumberingTypeListBox not selected");
-#endif
- return nRet;
-}
-
-bool SwNumberingTypeListBox::SelectNumberingType(SvxNumType nType)
-{
- sal_Int32 nPos = GetEntryPos(reinterpret_cast<void*>(static_cast<sal_uLong>(nType)));
- SelectEntryPos( nPos );
- return LISTBOX_ENTRY_NOTFOUND != nPos;
-}
-
NumberingTypeListBox::NumberingTypeListBox(weld::ComboBoxText* pWidget)
: m_xWidget(pWidget)
, m_xImpl(new SwNumberingTypeListBox_Impl)
diff --git a/sw/uiconfig/swriter/ui/footnotesendnotestabpage.ui b/sw/uiconfig/swriter/ui/footnotesendnotestabpage.ui
index 7c846fa4c5d9..bd4e527399d3 100644
--- a/sw/uiconfig/swriter/ui/footnotesendnotestabpage.ui
+++ b/sw/uiconfig/swriter/ui/footnotesendnotestabpage.ui
@@ -1,13 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
- <!-- interface-requires gtk+ 3.0 -->
- <!-- interface-requires LibreOffice 1.0 -->
+ <requires lib="gtk+" version="3.18"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
<property name="upper">9999</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="lower">1</property>
+ <property name="upper">9999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkBox" id="FootnotesEndnotesTabPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -58,8 +64,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -73,13 +77,12 @@
<object class="GtkSpinButton" id="ftnoffset">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="activates_default">True</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -87,24 +90,20 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="footnotesendnotestabpage|ftnoffset_label">_Start at:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">ftnoffset</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -122,8 +121,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -138,42 +135,36 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="max_length">50</property>
+ <property name="activates_default">True</property>
<property name="width_chars">6</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ftnsuffix_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="footnotesendnotestabpage|ftnsuffix_label">Aft_er:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">ftnsuffix</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="swlo-SwNumberingTypeListBox" id="ftnnumviewbox">
+ <object class="GtkComboBoxText" id="ftnnumviewbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="type">16</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -181,13 +172,12 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="max_length">50</property>
+ <property name="activates_default">True</property>
<property name="width_chars">6</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -195,32 +185,26 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">24</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="footnotesendnotestabpage|ftnprefix_label">Be_fore:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">ftnprefix</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -237,8 +221,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -298,8 +280,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -324,8 +304,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -339,13 +317,12 @@
<object class="GtkSpinButton" id="endoffset">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment">adjustment1</property>
+ <property name="activates_default">True</property>
+ <property name="adjustment">adjustment2</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -353,24 +330,20 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="footnotesendnotestabpage|endoffset_label">_Start at:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">endoffset</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -388,8 +361,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -404,42 +375,36 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="max_length">50</property>
+ <property name="activates_default">True</property>
<property name="width_chars">6</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="endsuffix_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="footnotesendnotestabpage|endsuffix_label">Aft_er:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">endsuffix</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="swlo-SwNumberingTypeListBox" id="endnumviewbox">
+ <object class="GtkComboBoxText" id="endnumviewbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="type">16</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -447,13 +412,12 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="max_length">50</property>
+ <property name="activates_default">True</property>
<property name="width_chars">6</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -461,32 +425,26 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">24</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="footnotesendnotestabpage|endprefix_label">Be_fore:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">endprefix</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
More information about the Libreoffice-commits
mailing list