summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-20 17:27:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-21 18:19:58 +0200
commit9940f077fdfc0c271aa66ad64578ae2236a2ca81 (patch)
treea52b00f3ba98d78f88a0d2aa5a02605746f8e6c7 /cui/source/dialogs
parentf19a599f6911f5ccd1049228454b6c6c8fd6d5cb (diff)
add Toggleable as a separate thing to a Button
and inherit ToggleButton from both it and Button Change-Id: If0e500aca8d0ffa087cb5e2bfc1786372fbff4eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115921 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/FontFeaturesDialog.cxx4
-rw-r--r--cui/source/dialogs/SpellDialog.cxx2
-rw-r--r--cui/source/dialogs/colorpicker.cxx6
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx6
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx4
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx10
-rw-r--r--cui/source/dialogs/hlinettp.cxx6
-rw-r--r--cui/source/dialogs/insdlg.cxx8
-rw-r--r--cui/source/dialogs/linkdlg.cxx2
-rw-r--r--cui/source/dialogs/passwdomdlg.cxx2
-rw-r--r--cui/source/dialogs/splitcelldlg.cxx2
-rw-r--r--cui/source/dialogs/toolbarmodedlg.cxx4
-rw-r--r--cui/source/dialogs/zoom.cxx12
14 files changed, 35 insertions, 35 deletions
diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx
index 04255cb13a6b..aaa9eb86136a 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -126,7 +126,7 @@ int FontFeaturesDialog::fillGrid(std::vector<vcl::font::Feature> const& rFontFea
Link<weld::ComboBox&, void> aComboBoxSelectHandler
= LINK(this, FontFeaturesDialog, ComboBoxSelectedHdl);
- Link<weld::ToggleButton&, void> aCheckBoxToggleHandler
+ Link<weld::Toggleable&, void> aCheckBoxToggleHandler
= LINK(this, FontFeaturesDialog, CheckBoxToggledHdl);
if (aDefinition.getType() == vcl::font::FeatureParameterType::ENUM)
@@ -172,7 +172,7 @@ void FontFeaturesDialog::updateFontPreview()
m_aPreviewWindow.SetFont(rPreviewFont, rPreviewFontCJK, rPreviewFontCTL);
}
-IMPL_LINK_NOARG(FontFeaturesDialog, CheckBoxToggledHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(FontFeaturesDialog, CheckBoxToggledHdl, weld::Toggleable&, void)
{
updateFontPreview();
}
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index a8e20608d285..338990b31628 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -448,7 +448,7 @@ IMPL_LINK( SpellDialog, ExtClickHdl, weld::Button&, rBtn, void )
}
}
-IMPL_LINK_NOARG(SpellDialog, CheckGrammarHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(SpellDialog, CheckGrammarHdl, weld::Toggleable&, void)
{
rParent.SetGrammarChecking(m_xCheckGrammarCB->get_active());
Impl_Restore(true);
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index a341c193c890..3f1bb0e8c53d 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -773,7 +773,7 @@ public:
DECL_LINK(ColorModifyMetricHdl, weld::MetricSpinButton&, void);
DECL_LINK(ColorModifySpinHdl, weld::SpinButton&, void);
DECL_LINK(ColorModifyEditHdl, weld::Entry&, void);
- DECL_LINK(ModeModifyHdl, weld::ToggleButton&, void);
+ DECL_LINK(ModeModifyHdl, weld::Toggleable&, void);
Color GetColor() const;
@@ -840,7 +840,7 @@ ColorPickerDialog::ColorPickerDialog(weld::Window* pParent, Color nColor, sal_In
m_xEDHex->connect_changed(LINK(this, ColorPickerDialog, ColorModifyEditHdl));
- Link<weld::ToggleButton&,void> aLink2 = LINK( this, ColorPickerDialog, ModeModifyHdl );
+ Link<weld::Toggleable&,void> aLink2 = LINK( this, ColorPickerDialog, ModeModifyHdl );
m_xRBRed->connect_toggled( aLink2 );
m_xRBGreen->connect_toggled( aLink2 );
m_xRBBlue->connect_toggled( aLink2 );
@@ -1120,7 +1120,7 @@ IMPL_LINK(ColorPickerDialog, ColorModifySpinHdl, weld::SpinButton&, rEdit, void)
}
-IMPL_LINK_NOARG(ColorPickerDialog, ModeModifyHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ColorPickerDialog, ModeModifyHdl, weld::Toggleable&, void)
{
ColorMode eMode = HUE;
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 2433d0d8445d..050dc31dc14b 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -240,14 +240,14 @@ short FmSearchDialog::run()
return nRet;
}
-IMPL_LINK(FmSearchDialog, OnToggledSearchRadio, weld::ToggleButton&, rButton, void)
+IMPL_LINK(FmSearchDialog, OnToggledSearchRadio, weld::Toggleable&, rButton, void)
{
if (!rButton.get_active())
return;
EnableSearchForDependees(true);
}
-IMPL_LINK(FmSearchDialog, OnToggledFieldRadios, weld::ToggleButton&, rButton, void)
+IMPL_LINK(FmSearchDialog, OnToggledFieldRadios, weld::Toggleable&, rButton, void)
{
if (!rButton.get_active())
return;
@@ -369,7 +369,7 @@ IMPL_LINK_NOARG(FmSearchDialog, OnFieldSelected, weld::ComboBox&, void)
m_arrContextFields[nCurrentContext] = m_plbField->get_active_text();
}
-IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, weld::ToggleButton&, rBox, void)
+IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, weld::Toggleable&, rBox, void)
{
bool bChecked = rBox.get_active();
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index f39aa3b32ea7..aa764baff52d 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -857,7 +857,7 @@ void TPGalleryThemeProperties::TakeFiles()
}
}
-IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickPreviewHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickPreviewHdl, weld::Toggleable&, void)
{
if ( !bInputAllowed )
return;
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index e5597dae8265..4f86d6e1a186 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -175,7 +175,7 @@ GraphicFilterMosaic::GraphicFilterMosaic(weld::Window* pParent, const Graphic& r
mxMtrWidth->grab_focus();
}
-IMPL_LINK_NOARG(GraphicFilterMosaic, CheckBoxModifyHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(GraphicFilterMosaic, CheckBoxModifyHdl, weld::Toggleable&, void)
{
GetModifyHdl().Call(nullptr);
}
@@ -276,7 +276,7 @@ GraphicFilterSolarize::GraphicFilterSolarize(weld::Window* pParent, const Graphi
mxCbxInvert->connect_toggled(LINK(this, GraphicFilterSolarize, CheckBoxModifyHdl));
}
-IMPL_LINK_NOARG(GraphicFilterSolarize, CheckBoxModifyHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(GraphicFilterSolarize, CheckBoxModifyHdl, weld::Toggleable&, void)
{
GetModifyHdl().Call(nullptr);
}
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 049a14b448ed..05d921dca867 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -205,7 +205,7 @@ namespace svx
void set_active(bool active) { m_xControl->set_active(active); }
bool get_active() const { return m_xControl->get_active(); }
- void connect_toggled(const Link<weld::ToggleButton&, void>& rLink) { m_xControl->connect_toggled(rLink); }
+ void connect_toggled(const Link<weld::Toggleable&, void>& rLink) { m_xControl->connect_toggled(rLink); }
private:
Size GetOptimalSize() const;
@@ -527,7 +527,7 @@ namespace svx
m_xFind->connect_clicked(rHdl);
}
- void HangulHanjaConversionDialog::SetConversionFormatChangedHdl( const Link<weld::ToggleButton&,void>& rHdl )
+ void HangulHanjaConversionDialog::SetConversionFormatChangedHdl( const Link<weld::Toggleable&,void>& rHdl )
{
m_xSimpleConversion->connect_toggled( rHdl );
m_xHangulBracketed->connect_toggled( rHdl );
@@ -538,7 +538,7 @@ namespace svx
m_xHangulBelow->connect_toggled( rHdl );
}
- void HangulHanjaConversionDialog::SetClickByCharacterHdl( const Link<weld::ToggleButton&,void>& _rHdl )
+ void HangulHanjaConversionDialog::SetClickByCharacterHdl( const Link<weld::Toggleable&,void>& _rHdl )
{
m_aClickByCharacterLink = _rHdl;
}
@@ -558,14 +558,14 @@ namespace svx
m_xReplaceAll->set_sensitive( m_bDocumentMode && bSameLen );
}
- IMPL_LINK(HangulHanjaConversionDialog, ClickByCharacterHdl, weld::ToggleButton&, rBox, void)
+ IMPL_LINK(HangulHanjaConversionDialog, ClickByCharacterHdl, weld::Toggleable&, rBox, void)
{
m_aClickByCharacterLink.Call(rBox);
bool bByCharacter = rBox.get_active();
m_xSuggestions->DisplayListBox( !bByCharacter );
}
- IMPL_LINK(HangulHanjaConversionDialog, OnConversionDirectionClicked, weld::ToggleButton&, rBox, void)
+ IMPL_LINK(HangulHanjaConversionDialog, OnConversionDirectionClicked, weld::Toggleable&, rBox, void)
{
weld::CheckButton* pOtherBox = nullptr;
if (&rBox == m_xHangulOnly.get())
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 21762ec0c5e1..afa7b3e4e602 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -67,7 +67,7 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent,
m_xRbtLinktypInternet->set_active(true);
// set handlers
- Link<weld::ToggleButton&, void> aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) );
+ Link<weld::Toggleable&, void> aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) );
m_xRbtLinktypInternet->connect_toggled( aLink );
m_xRbtLinktypFTP->connect_toggled( aLink );
m_xCbAnonymous->connect_toggled( LINK ( this, SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl ) );
@@ -314,7 +314,7 @@ INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() const
|* Click on Radiobutton : Internet or FTP
|*
|************************************************************************/
-IMPL_LINK(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::ToggleButton&, rButton, void)
+IMPL_LINK(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::Toggleable&, rButton, void)
{
if (!rButton.get_active())
return;
@@ -327,7 +327,7 @@ IMPL_LINK(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::ToggleButton&,
|* Click on Checkbox : Anonymous user
|*
|************************************************************************/
-IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl, weld::Toggleable&, void)
{
// disable login-editfields if checked
if ( m_xCbAnonymous->get_active() )
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 266710a83e4c..29c8d7cfb081 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -105,7 +105,7 @@ IMPL_LINK_NOARG(SvInsertOleDlg, BrowseHdl, weld::Button&, void)
}
}
-IMPL_LINK(SvInsertOleDlg, RadioHdl, weld::ToggleButton&, rButton, void)
+IMPL_LINK(SvInsertOleDlg, RadioHdl, weld::Toggleable&, rButton, void)
{
if (!rButton.get_active())
return;
@@ -140,7 +140,7 @@ SvInsertOleDlg::SvInsertOleDlg(weld::Window* pParent, const Reference<embed::XSt
m_xLbObjecttype->get_height_rows(6));
m_xLbObjecttype->connect_row_activated(LINK(this, SvInsertOleDlg, DoubleClickHdl));
m_xBtnFilepath->connect_clicked(LINK( this, SvInsertOleDlg, BrowseHdl));
- Link<weld::ToggleButton&,void> aLink( LINK( this, SvInsertOleDlg, RadioHdl ) );
+ Link<weld::Toggleable&,void> aLink( LINK( this, SvInsertOleDlg, RadioHdl ) );
m_xRbNewObject->connect_toggled( aLink );
m_xRbObjectFromfile->connect_toggled( aLink );
m_xRbNewObject->set_active(true);
@@ -361,7 +361,7 @@ void SfxInsertFloatingFrameDialog::Init()
m_xNMMarginHeight = m_xBuilder->weld_spin_button("height");
m_xCBMarginHeightDefault = m_xBuilder->weld_check_button("defaultheight");
- Link<weld::ToggleButton&, void> aLink(LINK(this, SfxInsertFloatingFrameDialog, CheckHdl));
+ Link<weld::Toggleable&, void> aLink(LINK(this, SfxInsertFloatingFrameDialog, CheckHdl));
m_xCBMarginWidthDefault->connect_toggled(aLink);
m_xCBMarginHeightDefault->connect_toggled(aLink);
@@ -548,7 +548,7 @@ short SfxInsertFloatingFrameDialog::run()
return nRet;
}
-IMPL_LINK(SfxInsertFloatingFrameDialog, CheckHdl, weld::ToggleButton&, rButton, void)
+IMPL_LINK(SfxInsertFloatingFrameDialog, CheckHdl, weld::Toggleable&, rButton, void)
{
weld::CheckButton& rCB = dynamic_cast<weld::CheckButton&>(rButton);
if (&rCB == m_xCBMarginWidthDefault.get())
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index b452526e8376..dedac54049d7 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -221,7 +221,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, LinksDoubleClickHdl, weld::TreeView&, bool )
return true;
}
-IMPL_LINK(SvBaseLinksDlg, ToggleHdl, weld::ToggleButton&, rButton, void)
+IMPL_LINK(SvBaseLinksDlg, ToggleHdl, weld::Toggleable&, rButton, void)
{
if (!rButton.get_active())
return;
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index 9f7986482596..d84595ac89a7 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -159,7 +159,7 @@ bool PasswordToOpenModifyDialog::IsRecommendToOpenReadonly() const
return m_xOpenReadonlyCB->get_active();
}
-IMPL_LINK_NOARG(PasswordToOpenModifyDialog, ReadonlyOnOffHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(PasswordToOpenModifyDialog, ReadonlyOnOffHdl, weld::Toggleable&, void)
{
bool bEnable = m_xOpenReadonlyCB->get_active();
m_xPasswdToModifyED->set_sensitive(bEnable);
diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx
index 45511a59b794..14146b44c373 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -50,7 +50,7 @@ SvxSplitTableDlg::SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical,
}
}
-IMPL_LINK(SvxSplitTableDlg, ToggleHdl, weld::ToggleButton&, rButton, void)
+IMPL_LINK(SvxSplitTableDlg, ToggleHdl, weld::Toggleable&, rButton, void)
{
if (!rButton.get_active())
return;
diff --git a/cui/source/dialogs/toolbarmodedlg.cxx b/cui/source/dialogs/toolbarmodedlg.cxx
index 4f5df939e948..e3064451cae3 100644
--- a/cui/source/dialogs/toolbarmodedlg.cxx
+++ b/cui/source/dialogs/toolbarmodedlg.cxx
@@ -98,7 +98,7 @@ ToolbarmodeDialog::ToolbarmodeDialog(weld::Window* pParent)
{
static_assert(SAL_N_ELEMENTS(m_pRadioButtons) == SAL_N_ELEMENTS(TOOLBARMODES_ARRAY));
- Link<weld::ToggleButton&, void> aLink = LINK(this, ToolbarmodeDialog, SelectToolbarmode);
+ Link<weld::Toggleable&, void> aLink = LINK(this, ToolbarmodeDialog, SelectToolbarmode);
const OUString sCurrentMode = GetCurrentMode();
for (tools::ULong i = 0; i < SAL_N_ELEMENTS(m_pRadioButtons); i++)
@@ -161,7 +161,7 @@ void ToolbarmodeDialog::UpdateImage(std::u16string_view sFileName)
}
}
-IMPL_LINK_NOARG(ToolbarmodeDialog, SelectToolbarmode, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(ToolbarmodeDialog, SelectToolbarmode, weld::Toggleable&, void)
{
const int i = GetActiveRadioButton();
if (i > -1)
diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx
index 54b40e55857f..90999d96798a 100644
--- a/cui/source/dialogs/zoom.cxx
+++ b/cui/source/dialogs/zoom.cxx
@@ -138,14 +138,14 @@ SvxZoomDialog::SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet)
, m_xBookModeChk(m_xBuilder->weld_check_button("bookmode"))
, m_xOKBtn(m_xBuilder->weld_button("ok"))
{
- Link<weld::ToggleButton&, void> aLink = LINK(this, SvxZoomDialog, UserHdl);
+ Link<weld::Toggleable&, void> aLink = LINK(this, SvxZoomDialog, UserHdl);
m_x100Btn->connect_toggled(aLink);
m_xOptimalBtn->connect_toggled(aLink);
m_xPageWidthBtn->connect_toggled(aLink);
m_xWholePageBtn->connect_toggled(aLink);
m_xUserBtn->connect_toggled(aLink);
- Link<weld::ToggleButton&, void> aViewLayoutLink = LINK(this, SvxZoomDialog, ViewLayoutUserHdl);
+ Link<weld::Toggleable&, void> aViewLayoutLink = LINK(this, SvxZoomDialog, ViewLayoutUserHdl);
m_xAutomaticBtn->connect_toggled(aViewLayoutLink);
m_xSingleBtn->connect_toggled(aViewLayoutLink);
m_xColumnsBtn->connect_toggled(aViewLayoutLink);
@@ -154,7 +154,7 @@ SvxZoomDialog::SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet)
= LINK(this, SvxZoomDialog, ViewLayoutSpinHdl);
m_xColumnsEdit->connect_value_changed(aViewLayoutSpinLink);
- Link<weld::ToggleButton&, void> aViewLayoutCheckLink
+ Link<weld::Toggleable&, void> aViewLayoutCheckLink
= LINK(this, SvxZoomDialog, ViewLayoutCheckHdl);
m_xBookModeChk->connect_toggled(aViewLayoutCheckLink);
@@ -273,7 +273,7 @@ SvxZoomDialog::SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet)
}
}
-IMPL_LINK_NOARG(SvxZoomDialog, UserHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(SvxZoomDialog, UserHdl, weld::Toggleable&, void)
{
m_bModified = true;
@@ -296,7 +296,7 @@ IMPL_LINK_NOARG(SvxZoomDialog, SpinHdl, weld::MetricSpinButton&, void)
m_bModified = true;
}
-IMPL_LINK_NOARG(SvxZoomDialog, ViewLayoutUserHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(SvxZoomDialog, ViewLayoutUserHdl, weld::Toggleable&, void)
{
m_bModified = true;
@@ -332,7 +332,7 @@ IMPL_LINK_NOARG(SvxZoomDialog, ViewLayoutSpinHdl, weld::SpinButton&, void)
m_bModified = true;
}
-IMPL_LINK_NOARG(SvxZoomDialog, ViewLayoutCheckHdl, weld::ToggleButton&, void)
+IMPL_LINK_NOARG(SvxZoomDialog, ViewLayoutCheckHdl, weld::Toggleable&, void)
{
if (!m_xColumnsBtn->get_active())
return;