diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 20 | ||||
-rw-r--r-- | cui/source/tabpages/align.cxx | 12 |
2 files changed, 16 insertions, 16 deletions
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index fb64eecdfd97..77d335f109c2 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -322,8 +322,8 @@ void SvxHyperlinkTabPageBase::DisableClose(bool _bDisable) // Click on imagebutton : Script IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, weld::Button&, void) { - SvxHyperlinkItem *pHyperlinkItem = const_cast<SvxHyperlinkItem*>(static_cast<const SvxHyperlinkItem *>( - GetItemSet().GetItem (SID_HYPERLINK_GETLINK))); + SvxHyperlinkItem *pHyperlinkItem = const_cast<SvxHyperlinkItem*>( + GetItemSet().GetItem (SID_HYPERLINK_GETLINK)); if (!pHyperlinkItem || pHyperlinkItem->GetMacroEvents() == HyperDialogEvent::NONE) return; @@ -371,16 +371,16 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, weld::Button&, voi // Get Macro-Infos HyperDialogEvent SvxHyperlinkTabPageBase::GetMacroEvents() const { - const SvxHyperlinkItem *pHyperlinkItem = static_cast<const SvxHyperlinkItem *>( - GetItemSet().GetItem (SID_HYPERLINK_GETLINK)); + const SvxHyperlinkItem *pHyperlinkItem = + GetItemSet().GetItem (SID_HYPERLINK_GETLINK); return pHyperlinkItem ? pHyperlinkItem->GetMacroEvents() : HyperDialogEvent(); } SvxMacroTableDtor* SvxHyperlinkTabPageBase::GetMacroTable() { - const SvxHyperlinkItem *pHyperlinkItem = static_cast<const SvxHyperlinkItem *>( - GetItemSet().GetItem (SID_HYPERLINK_GETLINK)); + const SvxHyperlinkItem *pHyperlinkItem = + GetItemSet().GetItem (SID_HYPERLINK_GETLINK); return const_cast<SvxMacroTableDtor*>(pHyperlinkItem->GetMacroTable()); } @@ -445,8 +445,8 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& rItemSet) // Set dialog-fields from create-itemset maStrInitURL.clear(); - const SvxHyperlinkItem *pHyperlinkItem = static_cast<const SvxHyperlinkItem *>( - rItemSet.GetItem (SID_HYPERLINK_GETLINK)); + const SvxHyperlinkItem *pHyperlinkItem = + rItemSet.GetItem (SID_HYPERLINK_GETLINK); if ( pHyperlinkItem ) { @@ -486,8 +486,8 @@ void SvxHyperlinkTabPageBase::ActivatePage( const SfxItemSet& rItemSet ) { // Set dialog-fields from input-itemset - const SvxHyperlinkItem *pHyperlinkItem = static_cast<const SvxHyperlinkItem *>( - rItemSet.GetItem (SID_HYPERLINK_GETLINK)); + const SvxHyperlinkItem *pHyperlinkItem = + rItemSet.GetItem (SID_HYPERLINK_GETLINK); if ( pHyperlinkItem ) { diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 3db4e5c20ca5..837566e29d22 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -273,19 +273,19 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false)) rSet->InvalidateItem(nWhich); - nWhich = GetWhich(SID_ATTR_ALIGN_LOCKPOS); + TypedWhichId<SvxRotateModeItem> nWhichLockPos(GetWhich(SID_ATTR_ALIGN_LOCKPOS)); if (m_aVsRefEdge.IsValueChangedFromSaved()) { switch (m_aVsRefEdge.GetSelectedItemId()) { case IID_CELLLOCK: - rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_STANDARD, nWhich)); + rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_STANDARD, nWhichLockPos)); break; case IID_TOPLOCK: - rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_TOP, nWhich)); + rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_TOP, nWhichLockPos)); break; case IID_BOTTOMLOCK: - rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_BOTTOM, nWhich)); + rSet->Put(SvxRotateModeItem(SvxRotateMode::SVX_ROTATE_MODE_BOTTOM, nWhichLockPos)); break; default: m_aVsRefEdge.SetNoSelection(); @@ -293,8 +293,8 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) } bChanged = true; } - else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false)) - rSet->InvalidateItem(nWhich); + else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhichLockPos, false)) + rSet->InvalidateItem(nWhichLockPos); nWhich = GetWhich(SID_ATTR_ALIGN_STACKED); if (m_xCbStacked->get_state_changed_from_saved()) |