[Libreoffice-commits] core.git: editeng/source sfx2/source svl/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Thu Sep 1 06:38:32 UTC 2016


 editeng/source/rtf/rtfitem.cxx   |    2 +-
 sfx2/source/control/bindings.cxx |    2 +-
 svl/source/items/itempool.cxx    |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 95bfa2c03d9dacd73670071c8108285dfc0f7830
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Wed Aug 31 19:59:29 2016 +0200

    use SfxItemPool::IsSlot instead of custom implementation
    
    Change-Id: I435fb78f10f361120ee1865465dab93aa4661806
    Reviewed-on: https://gerrit.libreoffice.org/28565
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index fe64409..1e4efcf 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1758,7 +1758,7 @@ void SvxRTFParser::RTFPardPlain( bool const bPard, SfxItemSet** ppSet )
                 // Item set and different -> Set the Default Pool
                 if( !*pPtr )
                     ;
-                else if( SFX_WHICH_MAX < *pPtr )
+                else if (SfxItemPool::IsSlot(*pPtr))
                     pAkt->aAttrSet.ClearItem( *pPtr );
                 else if( IsChkStyleAttr() )
                     pAkt->aAttrSet.Put( pDfltSet->Get( *pPtr ) );
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index a068ab3..3b782f1 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1361,7 +1361,7 @@ void SfxBindings::UpdateControllers_Impl
             pCache->SetState( SfxItemState::DONTCARE, reinterpret_cast<SfxPoolItem *>(-1) );
         }
         else if ( SfxItemState::DEFAULT == eState &&
-                    rFound.nWhichId > SFX_WHICH_MAX )
+                  SfxItemPool::IsSlot(rFound.nWhichId) )
         {
             // no Status or Default but without Pool
             SfxVoidItem aVoid(0);
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index fc250c3..90a75fa 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -621,7 +621,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
         nWhich = rItem.Which();
 
     // Find correct Secondary Pool
-    bool bSID = nWhich > SFX_WHICH_MAX;
+    bool bSID = IsSlot(nWhich);
     if ( !bSID && !IsInRange(nWhich) )
     {
         if ( pImpl->mpSecondary )
@@ -767,7 +767,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
 
     // Find correct Secondary Pool
     const sal_uInt16 nWhich = rItem.Which();
-    bool bSID = nWhich > SFX_WHICH_MAX;
+    bool bSID = IsSlot(nWhich);
     if ( !bSID && !IsInRange(nWhich) )
     {
         if ( pImpl->mpSecondary )


More information about the Libreoffice-commits mailing list