diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-08-31 22:44:53 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-09-01 06:38:56 +0000 |
commit | eac1468db541feafcbabb88b59d3e555845bd3b2 (patch) | |
tree | 0ef3cbffd5e5fc94ade1556160f6d8bbe9f0d94b | |
parent | use SfxItemPool::IsSlot instead of custom implementation (diff) | |
download | core-eac1468db541feafcbabb88b59d3e555845bd3b2.tar.gz core-eac1468db541feafcbabb88b59d3e555845bd3b2.zip |
use IsStaticDefaultItem from poolitem.hxx instead of custom checks
Change-Id: Ic49a940d83e5b8944bd724203bb2045bb1eb22b9
Reviewed-on: https://gerrit.libreoffice.org/28567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/itempool.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index f64a6328c73c..5a9707c18e09 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -954,8 +954,8 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, { // if new items are default-items, overwrite the old items: - bool bDefNewOuter = ( SFX_ITEMS_STATICDEFAULT == pNewOuter->GetKind() ); - bool bDefNewInner = ( SFX_ITEMS_STATICDEFAULT == pNewInner->GetKind() ); + bool bDefNewOuter = IsStaticDefaultItem(pNewOuter); + bool bDefNewInner = IsStaticDefaultItem(pNewInner); ApplyPatternLines( aNewAttrs, bDefNewOuter ? pOldOuter : pNewOuter, diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 90a75fac1ffd..ecde96afe014 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -795,7 +795,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem ) assert(rItem.GetRefCount() && "RefCount == 0, Remove impossible"); // Static Defaults are just there - if ( rItem.GetKind() == SFX_ITEMS_STATICDEFAULT && + if ( IsStaticDefaultItem(&rItem) && &rItem == *( pImpl->ppStaticDefaults + GetIndex_Impl(nWhich) ) ) return; |