diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2024-02-18 19:17:48 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2024-02-18 21:37:52 +0100 |
commit | cebbd5795d6256fb346ac8d70c15daceca48c554 (patch) | |
tree | 40e5c20c2728c67a64f1156b1ca6099e4d16a081 /sc/source | |
parent | d367142731f09c7be03ce1707e3aeab3c55b4f21 (diff) |
ITEM: Rename for more control over SlotID usages
Change-Id: I51585f1c15984a066262023184f668662853d20f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163556
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutDialog.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/consdlg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/filtdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pfiltdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/sfiltdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsubt.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drawsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/hfedtdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/view/viewutil.cxx | 2 |
16 files changed, 38 insertions, 38 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index e6f735aa11b7..0e44963b5b04 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -475,7 +475,7 @@ void ScModule::Execute( SfxRequest& rReq ) case SID_ATTR_CHAR_CTL_LANGUAGE: { const SfxPoolItem* pItem; - if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( GetPool().GetWhich(nSlot), true, &pItem ) ) + if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( GetPool().GetWhichIDFromSlotID(nSlot), true, &pItem ) ) { ScDocShell* pDocSh = dynamic_cast<ScDocShell*>( SfxObjectShell::Current() ); if ( pDocSh ) diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 51b0eda00b2f..cd84cf8b248c 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -477,7 +477,7 @@ void ScPivotLayoutDialog::ApplyChanges() SetDispatcherLock(false); SwitchToDocument(); - sal_uInt16 nWhichPivot = SC_MOD()->GetPool().GetWhich(SID_PIVOT_TABLE); + sal_uInt16 nWhichPivot = SC_MOD()->GetPool().GetWhichIDFromSlotID(SID_PIVOT_TABLE); ScPivotItem aPivotItem(nWhichPivot, &aSaveData, &aDestinationRange, bToNewSheet); mpViewData->GetViewShell()->SetDialogDPObject(std::make_unique<ScDPObject>(maPivotTableObject)); diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index d0921f3eb96e..de1910cb4396 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -71,14 +71,14 @@ ScConsolidateDlg::ScConsolidateDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::W , aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ) , theConsData ( static_cast<const ScConsolidateItem&>( rArgSet.Get( rArgSet.GetPool()-> - GetWhich( SID_CONSOLIDATE ) ) + GetWhichIDFromSlotID( SID_CONSOLIDATE ) ) ).GetData() ) , rViewData ( static_cast<ScTabViewShell*>(SfxViewShell::Current())-> GetViewData() ) , rDoc ( static_cast<ScTabViewShell*>(SfxViewShell::Current())-> GetViewData().GetDocument() ) , nAreaDataCount ( 0 ) - , nWhichCons ( rArgSet.GetPool()->GetWhich( SID_CONSOLIDATE ) ) + , nWhichCons ( rArgSet.GetPool()->GetWhichIDFromSlotID( SID_CONSOLIDATE ) ) , bDlgLostFocus ( false ) , m_xLbFunc(m_xBuilder->weld_combo_box("func")) , m_xLbConsAreas(m_xBuilder->weld_tree_view("consareas")) diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index ca9a59ec566f..73dd94696a17 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -61,7 +61,7 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa , aStrColumn(ScResId(SCSTR_COLUMN_LETTER)) , aStrFontColor(ScResId(SCSTR_FILTER_FONT_COLOR_COND)) , aStrBackgroundColor(ScResId(SCSTR_FILTER_BACKGROUND_COLOR_COND)) - , nWhichQuery(rArgSet.GetPool()->GetWhich(SID_QUERY)) + , nWhichQuery(rArgSet.GetPool()->GetWhichIDFromSlotID(SID_QUERY)) , theQueryData(static_cast<const ScQueryItem&>(rArgSet.Get(nWhichQuery)).GetQueryData()) , pViewData(nullptr) , pDoc(nullptr) diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index e87d676b595c..544db7640a5b 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -43,7 +43,7 @@ ScPivotFilterDlg::ScPivotFilterDlg(weld::Window* pParent, const SfxItemSet& rArg , aStrEmpty(ScResId(SCSTR_FILTER_EMPTY)) , aStrNotEmpty(ScResId(SCSTR_FILTER_NOTEMPTY)) , aStrColumn(ScResId(SCSTR_COLUMN_LETTER)) - , nWhichQuery(rArgSet.GetPool()->GetWhich(SID_QUERY)) + , nWhichQuery(rArgSet.GetPool()->GetWhichIDFromSlotID(SID_QUERY)) , theQueryData(static_cast<const ScQueryItem&>(rArgSet.Get(nWhichQuery)).GetQueryData()) , pViewData(nullptr) , pDoc(nullptr) diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 3aeb3192372e..f30efbe89f19 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -55,7 +55,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, we : ScAnyRefDlgController(pB, pCW, pParent, "modules/scalc/ui/advancedfilterdialog.ui", "AdvancedFilterDialog") , aStrUndefined ( ScResId(SCSTR_UNDEFINED) ) - , nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) ) + , nWhichQuery ( rArgSet.GetPool()->GetWhichIDFromSlotID( SID_QUERY ) ) , theQueryData ( static_cast<const ScQueryItem&>( rArgSet.Get( nWhichQuery )).GetQueryData() ) , pViewData(nullptr) diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 49390a404f35..a6050ecf8b3f 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -79,7 +79,7 @@ ScTabPageSortFields::ScTabPageSortFields(weld::Container* pPage, weld::DialogCon aStrRowLabel ( ScResId( SCSTR_ROW_LABEL ) ), aStrColLabel ( ScResId( SCSTR_COL_LABEL ) ), - nWhichSort ( rArgSet.GetPool()->GetWhich( SID_SORT ) ), + nWhichSort ( rArgSet.GetPool()->GetWhichIDFromSlotID( SID_SORT ) ), pViewData ( nullptr ), aSortData ( rArgSet.Get( nWhichSort ).GetSortData() ), nFieldCount ( 0 ), @@ -496,7 +496,7 @@ ScTabPageSortOptions::ScTabPageSortOptions(weld::Container* pPage, weld::DialogC , aStrCommentsColLabel(ScResId(SCSTR_NOTES_COL_LABEL)) , aStrImgRowLabel(ScResId(SCSTR_IMAGES_ROW_LABEL)) , aStrImgColLabel(ScResId(SCSTR_IMAGES_COL_LABEL)) - , nWhichSort(rArgSet.GetPool()->GetWhich(SID_SORT)) + , nWhichSort(rArgSet.GetPool()->GetWhichIDFromSlotID(SID_SORT)) , aSortData(rArgSet.Get(nWhichSort).GetSortData()) , pViewData(nullptr) , pDoc(nullptr) diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index b7e5b9bc4a3f..dd8fabc534e7 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -44,7 +44,7 @@ ScTpSubTotalGroup::ScTpSubTotalGroup(weld::Container* pPage, weld::DialogControl , aStrColumn(ScResId(SCSTR_COLUMN_LETTER)) , pViewData(nullptr) , pDoc(nullptr) - , nWhichSubTotals(rArgSet.GetPool()->GetWhich(SID_SUBTOTALS)) + , nWhichSubTotals(rArgSet.GetPool()->GetWhichIDFromSlotID(SID_SUBTOTALS)) , rSubTotalData(rArgSet.Get(nWhichSubTotals).GetSubTotalData()) , nFieldCount(0) , mxLbGroup(m_xBuilder->weld_combo_box("group_by")) @@ -442,7 +442,7 @@ ScTpSubTotalOptions::ScTpSubTotalOptions(weld::Container* pPage, weld::DialogCon &rArgSet ), pViewData ( nullptr ), pDoc ( nullptr ), - nWhichSubTotals ( rArgSet.GetPool()->GetWhich( SID_SUBTOTALS ) ), + nWhichSubTotals ( rArgSet.GetPool()->GetWhichIDFromSlotID( SID_SUBTOTALS ) ), rSubTotalData ( rArgSet.Get( nWhichSubTotals ).GetSubTotalData() ) , m_xBtnPagebreak(m_xBuilder->weld_check_button("pagebreak")) , m_xBtnCase(m_xBuilder->weld_check_button("case")) diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 30dc4eb57014..00477ab1107d 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1188,11 +1188,11 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (aLangText == "LANGUAGE_NONE") { pNewSet->Put(SvxLanguageItem(LANGUAGE_NONE, - pItemPool->GetWhich(SID_ATTR_CHAR_LANGUAGE))); + pItemPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_LANGUAGE))); pNewSet->Put(SvxLanguageItem(LANGUAGE_NONE, - pItemPool->GetWhich(SID_ATTR_CHAR_CJK_LANGUAGE))); + pItemPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_CJK_LANGUAGE))); pNewSet->Put(SvxLanguageItem(LANGUAGE_NONE, - pItemPool->GetWhich(SID_ATTR_CHAR_CTL_LANGUAGE))); + pItemPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_CTL_LANGUAGE))); } else { @@ -1201,13 +1201,13 @@ void ScDocShell::Execute( SfxRequest& rReq ) SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType); if (nScriptType == SvtScriptType::LATIN) pNewSet->Put(SvxLanguageItem(nLangType, - pItemPool->GetWhich(SID_ATTR_CHAR_LANGUAGE))); + pItemPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_LANGUAGE))); if (nScriptType == SvtScriptType::COMPLEX) pNewSet->Put(SvxLanguageItem(nLangType, - pItemPool->GetWhich(SID_ATTR_CHAR_CTL_LANGUAGE))); + pItemPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_CTL_LANGUAGE))); if (nScriptType == SvtScriptType::ASIAN) pNewSet->Put(SvxLanguageItem(nLangType, - pItemPool->GetWhich(SID_ATTR_CHAR_CJK_LANGUAGE))); + pItemPool->GetWhichIDFromSlotID(SID_ATTR_CHAR_CJK_LANGUAGE))); } pViewShell->ApplyAttributes(*pNewSet, rOldSet); pBindings->Invalidate(SID_LANGUAGE_STATUS); @@ -2271,15 +2271,15 @@ void ScDocShell::GetState( SfxItemSet &rSet ) if (pSelAttrs) { const SfxItemSet& rItemSet = pSelAttrs->GetItemSet(); - nLangWhich = rItemSet.GetPool()->GetWhich(SID_ATTR_CHAR_LANGUAGE); + nLangWhich = rItemSet.GetPool()->GetWhichIDFromSlotID(SID_ATTR_CHAR_LANGUAGE); if (SfxItemState::SET == rItemSet.GetItemState(nLangWhich)) eLatin = static_cast<const SvxLanguageItem&>(rItemSet.Get(nLangWhich)).GetLanguage(); - nLangWhich = rItemSet.GetPool()->GetWhich(SID_ATTR_CHAR_CJK_LANGUAGE); + nLangWhich = rItemSet.GetPool()->GetWhichIDFromSlotID(SID_ATTR_CHAR_CJK_LANGUAGE); if (SfxItemState::SET == rItemSet.GetItemState(nLangWhich)) eCjk = static_cast<const SvxLanguageItem&>(rItemSet.Get(nLangWhich)).GetLanguage(); - nLangWhich = rItemSet.GetPool()->GetWhich(SID_ATTR_CHAR_CTL_LANGUAGE); + nLangWhich = rItemSet.GetPool()->GetWhichIDFromSlotID(SID_ATTR_CHAR_CTL_LANGUAGE); if (SfxItemState::SET == rItemSet.GetItemState(nLangWhich)) eCtl = static_cast<const SvxLanguageItem&>(rItemSet.Get(nLangWhich)).GetLanguage(); diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 33be79c566d9..c520f8cb931d 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -418,7 +418,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) void ScDrawShell::ExecuteMacroAssign(SdrObject* pObj, weld::Window* pWin) { - SvxMacroItem aItem ( SfxGetpApp()->GetPool().GetWhich( SID_ATTR_MACROITEM ) ); + SvxMacroItem aItem ( SfxGetpApp()->GetPool().GetWhichIDFromSlotID( SID_ATTR_MACROITEM ) ); ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true ); if ( !pInfo->GetMacro().isEmpty() ) { diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index a36691161c1a..8daf5a7c355b 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -943,7 +943,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); - sal_uInt16 nWhich = rPool.GetWhich( nSlot ); + sal_uInt16 nWhich = rPool.GetWhichIDFromSlotID( nSlot ); aSetItem.PutItemForScriptType( nScript, pArgs->Get( nWhich ) ); pView->SetAttributes( aSetItem.GetItemSet() ); @@ -963,7 +963,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) else if( nSlot == SID_ATTR_PARA_LINESPACE ) { SvxLineSpacingItem aLineSpaceItem = static_cast<const SvxLineSpacingItem&>(pArgs->Get( - GetPool().GetWhich(nSlot))); + GetPool().GetWhichIDFromSlotID(nSlot))); SfxItemSetFixed<EE_PARA_SBL, EE_PARA_SBL> aAttr( GetPool() ); aAttr.Put( aLineSpaceItem ); pView->SetAttributes( aAttr ); @@ -971,7 +971,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) else if( nSlot == SID_ATTR_PARA_ULSPACE ) { SvxULSpaceItem aULSpaceItem = static_cast<const SvxULSpaceItem&>(pArgs->Get( - GetPool().GetWhich(nSlot))); + GetPool().GetWhichIDFromSlotID(nSlot))); SfxItemSetFixed<EE_PARA_ULSPACE, EE_PARA_ULSPACE> aAttr( GetPool() ); aULSpaceItem.SetWhich(EE_PARA_ULSPACE); aAttr.Put( aULSpaceItem ); diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx index 6b873e8f5760..de77c9e7cb09 100644 --- a/sc/source/ui/pagedlg/hfedtdlg.cxx +++ b/sc/source/ui/pagedlg/hfedtdlg.cxx @@ -224,7 +224,7 @@ ScHFEditActiveDlg::ScHFEditActiveDlg( { const SvxPageItem& rPageItem = rCoreSet.Get( - rCoreSet.GetPool()->GetWhich(SID_ATTR_PAGE) ); + rCoreSet.GetPool()->GetWhichIDFromSlotID(SID_ATTR_PAGE) ); bool bRightPage = SvxPageUsage::Left != rPageItem.GetPageUsage(); diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index b54837ea763a..4892147c55f9 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2830,7 +2830,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxAllItemSet aSet( GetPool() ); aSet.Put( SfxBoolItem( FN_PARAM_1, false ) ); - aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) ); + aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhichIDFromSlotID(SID_ATTR_CHAR_FONT) ) ); SfxViewFrame& rViewFrame = pTabViewShell->GetViewFrame(); auto xFrame = rViewFrame.GetFrame().GetFrameInterface(); VclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pTabViewShell->GetFrameWeld(), aSet, xFrame)); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index f9e3fededd5a..bafbb20d645d 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -1029,7 +1029,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); - sal_uInt16 nWhich = rPool.GetWhich( nSlot ); + sal_uInt16 nWhich = rPool.GetWhichIDFromSlotID( nSlot ); aSetItem.PutItemForScriptType( nScript, pArgs->Get( nWhich ) ); aSet.Put( aSetItem.GetItemSet(), false ); @@ -1041,7 +1041,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) { if (pArgs) { - aSet.Put( pArgs->Get( pArgs->GetPool()->GetWhich( nSlot ) ) ); + aSet.Put( pArgs->Get( pArgs->GetPool()->GetWhichIDFromSlotID( nSlot ) ) ); rBindings.Invalidate( nSlot ); } } @@ -1112,7 +1112,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_UNDERLINE: if ( pArgs ) { - const SvxTextLineItem& rTextLineItem = static_cast< const SvxTextLineItem& >( pArgs->Get( pArgs->GetPool()->GetWhich(nSlot) ) ); + const SvxTextLineItem& rTextLineItem = static_cast< const SvxTextLineItem& >( pArgs->Get( pArgs->GetPool()->GetWhichIDFromSlotID(nSlot) ) ); eNew = rTextLineItem.GetLineStyle(); } else @@ -1190,7 +1190,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) { if(pArgs) { - aSet.Put ( pArgs->Get(pArgs->GetPool()->GetWhich(nSlot))); + aSet.Put ( pArgs->Get(pArgs->GetPool()->GetWhichIDFromSlotID(nSlot))); rBindings.Invalidate( nSlot ); } } diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index b426fae68722..c57aa34a57ce 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -595,7 +595,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq ) if( pSet ) { const SfxPoolItem* pItem = nullptr; - if( pSet->GetItemState(GetPool().GetWhich(nSlot), true, &pItem ) == SfxItemState::SET ) + if( pSet->GetItemState(GetPool().GetWhichIDFromSlotID(nSlot), true, &pItem ) == SfxItemState::SET ) { switch ( nSlot ) @@ -1006,7 +1006,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) case SID_ATTR_CHAR_PREVIEW_FONT: { SfxItemPool& rPool = GetPool(); - sal_uInt16 nWhich = rPool.GetWhich( nSlot ); + sal_uInt16 nWhich = rPool.GetWhichIDFromSlotID( nSlot ); const SvxFontItem& rFont = static_cast<const SvxFontItem&>(pNewAttrs->Get( nWhich )); SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, rPool ); SvtScriptType nScript = pTabViewShell->GetSelectionScriptType(); @@ -1035,14 +1035,14 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) case SID_ATTR_CHAR_CONTOUR: case SID_ATTR_CHAR_SHADOWED: case SID_ATTR_CHAR_RELIEF: - pTabViewShell->ApplyAttr( pNewAttrs->Get( pNewAttrs->GetPool()->GetWhich( nSlot ) ) ); + pTabViewShell->ApplyAttr( pNewAttrs->Get( pNewAttrs->GetPool()->GetWhichIDFromSlotID( nSlot ) ) ); rBindings.Invalidate( nSlot ); rBindings.Update( nSlot ); break; case SID_ATTR_CHAR_COLOR: case SID_SCATTR_PROTECTION : { - pTabViewShell->ApplyAttr( pNewAttrs->Get( pNewAttrs->GetPool()->GetWhich( nSlot) ), false); + pTabViewShell->ApplyAttr( pNewAttrs->Get( pNewAttrs->GetPool()->GetWhichIDFromSlotID( nSlot) ), false); rBindings.Invalidate( nSlot ); rBindings.Update( nSlot ); @@ -1060,7 +1060,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); - sal_uInt16 nWhich = rPool.GetWhich( nSlot ); + sal_uInt16 nWhich = rPool.GetWhichIDFromSlotID( nSlot ); aSetItem.PutItemForScriptType( nScript, pNewAttrs->Get( nWhich ) ); pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() ); @@ -1237,7 +1237,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) SvxBrushItem aBrushItem( pTabViewShell->GetSelectionPattern()-> GetItem( ATTR_BACKGROUND ) ); const SvxBrushItem& rNewBrushItem = static_cast<const SvxBrushItem&>( - pNewAttrs->Get( GetPool().GetWhich(nSlot) ) ); + pNewAttrs->Get( GetPool().GetWhichIDFromSlotID(nSlot) ) ); aBrushItem.SetColor(rNewBrushItem.GetColor()); aBrushItem.setComplexColor(rNewBrushItem.getComplexColor()); pTabViewShell->ApplyAttr( aBrushItem ); @@ -1462,7 +1462,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) break; case SID_ATTR_BRUSH: { - rSet.Put( rBrushItem.CloneSetWhich(GetPool().GetWhich(nWhich)) ); + rSet.Put( rBrushItem.CloneSetWhich(GetPool().GetWhichIDFromSlotID(nWhich)) ); } break; case SID_SCATTR_CELLPROTECTION: diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 379c7dd8d9aa..9c345e4bf969 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -322,7 +322,7 @@ void ScViewUtil::ExecuteCharMap(const SvxFontItem& rOldFont, SfxViewFrame& rFrame = rShell.GetViewFrame(); SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() ); aSet.Put( SfxBoolItem( FN_PARAM_1, false ) ); - aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) ); + aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhichIDFromSlotID( SID_ATTR_CHAR_FONT ) ) ); auto xFrame = rFrame.GetFrame().GetFrameInterface(); VclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rShell.GetFrameWeld(), aSet, xFrame)); pDlg->StartExecuteAsync( |