From f1bf33a26b20a2fd0aa941cce5ad40e3737e0eb4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 1 Mar 2022 08:55:22 +0200 Subject: use SfxItemSet::GetItemIfSet in starmath Change-Id: Iaef2a2c507acfdabc6280e6cc8179319ea9d8a94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130735 Tested-by: Jenkins Reviewed-by: Noel Grandin --- starmath/source/dialog.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'starmath/source/dialog.cxx') diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 1c63416e57c1..559a7e55c789 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -210,7 +210,7 @@ bool SmPrintOptionsTabPage::FillItemSet(SfxItemSet* rSet) void SmPrintOptionsTabPage::Reset(const SfxItemSet* rSet) { - SmPrintSize ePrintSize = static_cast(static_cast(rSet->Get(SID_PRINTSIZE)).GetValue()); + SmPrintSize ePrintSize = static_cast(rSet->Get(SID_PRINTSIZE).GetValue()); m_xSizeNormal->set_active(ePrintSize == PRINT_SIZE_NORMAL); m_xSizeScaled->set_active(ePrintSize == PRINT_SIZE_SCALED); @@ -218,15 +218,15 @@ void SmPrintOptionsTabPage::Reset(const SfxItemSet* rSet) m_xZoom->set_sensitive(m_xSizeZoomed->get_active()); - m_xZoom->set_value(static_cast(rSet->Get(SID_PRINTZOOM)).GetValue(), FieldUnit::PERCENT); + m_xZoom->set_value(rSet->Get(SID_PRINTZOOM).GetValue(), FieldUnit::PERCENT); m_xSmZoom->set_sensitive(true); - m_xSmZoom->set_value(static_cast(rSet->Get(SID_SMEDITWINDOWZOOM)).GetValue(), FieldUnit::PERCENT); + m_xSmZoom->set_value(rSet->Get(SID_SMEDITWINDOWZOOM).GetValue(), FieldUnit::PERCENT); - m_xTitle->set_active(static_cast(rSet->Get(SID_PRINTTITLE)).GetValue()); - m_xNoRightSpaces->set_active(static_cast(rSet->Get(SID_NO_RIGHT_SPACES)).GetValue()); - m_xSaveOnlyUsedSymbols->set_active(static_cast(rSet->Get(SID_SAVE_ONLY_USED_SYMBOLS)).GetValue()); - m_xAutoCloseBrackets->set_active(static_cast(rSet->Get(SID_AUTO_CLOSE_BRACKETS)).GetValue()); + m_xTitle->set_active(rSet->Get(SID_PRINTTITLE).GetValue()); + m_xNoRightSpaces->set_active(rSet->Get(SID_NO_RIGHT_SPACES).GetValue()); + m_xSaveOnlyUsedSymbols->set_active(rSet->Get(SID_SAVE_ONLY_USED_SYMBOLS).GetValue()); + m_xAutoCloseBrackets->set_active(rSet->Get(SID_AUTO_CLOSE_BRACKETS).GetValue()); } std::unique_ptr SmPrintOptionsTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) -- cgit