include/svl/itempool.hxx          |    2 +-
 sc/source/ui/pagedlg/hfedtdlg.cxx |    4 ++--
 sw/source/ui/misc/pgfnote.cxx     |    6 +++---
 sw/source/ui/misc/pggrid.cxx      |    4 ++--
 sw/source/uibase/frmdlg/colex.cxx |    6 +++---
 5 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit bdb66b740681e9d3a94fbd0226ae1a4f1663e589
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Feb 15 11:56:52 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Feb 15 14:32:53 2022 +0100

    fix SfxItemPool::GetWhich change
    
    In
        commit 339fde9d905135e24b2f4e204009ee289d678b0c
        Author: Noel Grandin <noel.gran...@collabora.co.uk>
        Date:   Tue Feb 15 08:56:13 2022 +0200
        add typed GetWhich operations
    I got the parameter type wrong
    
    Change-Id: I7b1d86bc06da7feb3238f5033bbffbd166cd4fdd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129959
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index ba07c6befc51..e85451ecb738 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -185,7 +185,7 @@ public:
     void                            SetItemInfos( const SfxItemInfo *pInfos );
     sal_uInt16                      GetWhich( sal_uInt16 nSlot, bool bDeep = 
true ) const;
     template<class T>
-    TypedWhichId<T>                 GetWhich( sal_uInt16 nSlot, bool bDeep = 
true ) const
+    TypedWhichId<T>                 GetWhich( TypedWhichId<T> nSlot, bool 
bDeep = true ) const
     { return TypedWhichId<T>(GetWhich(sal_uInt16(nSlot), bDeep)); }
     sal_uInt16                      GetSlotId( sal_uInt16 nWhich ) const;
     sal_uInt16                      GetTrueWhich( sal_uInt16 nSlot, bool bDeep 
= true ) const;
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx 
b/sc/source/ui/pagedlg/hfedtdlg.cxx
index 820115749880..b4e111b9c3c3 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -222,9 +222,9 @@ ScHFEditActiveDlg::ScHFEditActiveDlg(
     :   ScHFEditDlg( pParent, rCoreSet, rPageStyle,
         "modules/scalc/ui/headerfooterdialog.ui", "HeaderFooterDialog" )
 {
-    const SvxPageItem&  rPageItem = static_cast<const SvxPageItem&>(
+    const SvxPageItem&  rPageItem =
                 rCoreSet.Get(
-                    rCoreSet.GetPool()->GetWhich(SID_ATTR_PAGE) ));
+                    rCoreSet.GetPool()->GetWhich(SID_ATTR_PAGE) );
 
     bool bRightPage = SvxPageUsage::Left != rPageItem.GetPageUsage();
 
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 741cd51802d4..452aab1874d1 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -267,12 +267,12 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
     {
         const SfxItemSet& rHeaderSet = static_cast<const 
SvxSetItem*>(pItem)->GetItemSet();
         const SfxBoolItem& rHeaderOn =
-            static_cast<const SfxBoolItem&>(rHeaderSet.Get( 
rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) ));
+            rHeaderSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) );
 
         if ( rHeaderOn.GetValue() )
         {
             const SvxSizeItem& rSizeItem =
-                static_cast<const 
SvxSizeItem&>(rHeaderSet.Get(rSet.GetPool()->GetWhich(SID_ATTR_PAGE_SIZE)));
+                rHeaderSet.Get(rSet.GetPool()->GetWhich(SID_ATTR_PAGE_SIZE));
             lMaxHeight -= rSizeItem.GetSize().Height();
         }
     }
@@ -286,7 +286,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
         if ( rFooterOn.GetValue() )
         {
             const SvxSizeItem& rSizeItem =
-                static_cast<const SvxSizeItem&>(rFooterSet.Get( 
rSet.GetPool()->GetWhich( SID_ATTR_PAGE_SIZE ) ));
+                rFooterSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_SIZE ) 
);
             lMaxHeight -= rSizeItem.GetSize().Height();
         }
     }
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 875bee7ad331..c06f5e91c2fe 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -282,12 +282,12 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& 
rSet)
         {
             const SfxItemSet& rExtraSet = static_cast<const 
SvxSetItem*>(pItem)->GetItemSet();
             const SfxBoolItem& rOn =
-                static_cast<const SfxBoolItem&>(rExtraSet.Get( 
rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) ));
+                rExtraSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) );
 
             if ( rOn.GetValue() )
             {
                 const SvxSizeItem& rSizeItem =
-                    static_cast<const 
SvxSizeItem&>(rExtraSet.Get(rSet.GetPool()->GetWhich(SID_ATTR_PAGE_SIZE)));
+                    
rExtraSet.Get(rSet.GetPool()->GetWhich(SID_ATTR_PAGE_SIZE));
                 nDistanceUL += rSizeItem.GetSize().Height();
             }
         }
diff --git a/sw/source/uibase/frmdlg/colex.cxx 
b/sw/source/uibase/frmdlg/colex.cxx
index d1fb2bd9c952..0b11ab168ab4 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -99,12 +99,12 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
     {
         const SfxItemSet& rHeaderSet = static_cast<const 
SvxSetItem*>(pItem)->GetItemSet();
         const SfxBoolItem& rHeaderOn =
-            static_cast<const SfxBoolItem&>(rHeaderSet.Get( pPool->GetWhich( 
SID_ATTR_PAGE_ON ) ) );
+            rHeaderSet.Get( pPool->GetWhich( SID_ATTR_PAGE_ON ) );
 
         if ( rHeaderOn.GetValue() )
         {
             const SvxSizeItem& rSize =
-                static_cast<const 
SvxSizeItem&>(rHeaderSet.Get(pPool->GetWhich(SID_ATTR_PAGE_SIZE)));
+                rHeaderSet.Get(pPool->GetWhich(SID_ATTR_PAGE_SIZE));
 
             const SvxULSpaceItem& rUL = static_cast<const 
SvxULSpaceItem&>(rHeaderSet.Get(
                                         pPool->GetWhich(SID_ATTR_ULSPACE)));
@@ -142,7 +142,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
         if ( rFooterOn.GetValue() )
         {
             const SvxSizeItem& rSize =
-                static_cast<const SvxSizeItem&>(rFooterSet.Get( 
pPool->GetWhich( SID_ATTR_PAGE_SIZE ) ));
+                rFooterSet.Get( pPool->GetWhich( SID_ATTR_PAGE_SIZE ) );
 
             const SvxULSpaceItem& rUL = static_cast<const 
SvxULSpaceItem&>(rFooterSet.Get(
                                         pPool->GetWhich( SID_ATTR_ULSPACE ) ));

Reply via email to