diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-01 08:55:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-01 09:12:45 +0100 |
commit | f1bf33a26b20a2fd0aa941cce5ad40e3737e0eb4 (patch) | |
tree | 663edef3f2b66ce62615baf382fd5f339fe052a4 /starmath/source/dialog.cxx | |
parent | f8238187bad40d0a4b8eccbae9f99eca4aa10f7a (diff) |
use SfxItemSet::GetItemIfSet in starmath
Change-Id: Iaef2a2c507acfdabc6280e6cc8179319ea9d8a94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130735
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source/dialog.cxx')
-rw-r--r-- | starmath/source/dialog.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
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<SmPrintSize>(static_cast<const SfxUInt16Item &>(rSet->Get(SID_PRINTSIZE)).GetValue()); + SmPrintSize ePrintSize = static_cast<SmPrintSize>(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<const SfxUInt16Item &>(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<const SfxUInt16Item &>(rSet->Get(SID_SMEDITWINDOWZOOM)).GetValue(), FieldUnit::PERCENT); + m_xSmZoom->set_value(rSet->Get(SID_SMEDITWINDOWZOOM).GetValue(), FieldUnit::PERCENT); - m_xTitle->set_active(static_cast<const SfxBoolItem &>(rSet->Get(SID_PRINTTITLE)).GetValue()); - m_xNoRightSpaces->set_active(static_cast<const SfxBoolItem &>(rSet->Get(SID_NO_RIGHT_SPACES)).GetValue()); - m_xSaveOnlyUsedSymbols->set_active(static_cast<const SfxBoolItem &>(rSet->Get(SID_SAVE_ONLY_USED_SYMBOLS)).GetValue()); - m_xAutoCloseBrackets->set_active(static_cast<const SfxBoolItem &>(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<SfxTabPage> SmPrintOptionsTabPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) |