diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-16 14:01:19 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-16 16:44:41 +0200 |
commit | 336afaa77fa2b8d08871de7b90e27c0ada32a81e (patch) | |
tree | 9f0db4100a6651484b35334fbcac34e7cedf0fbd /svl | |
parent | 973424ab312bfe38caa486304f5d9dae2cd59069 (diff) |
Reorder to only get item state when necessary
Change-Id: I58baca984d2e95a0c9753b761be800f8edac9274
Reviewed-on: https://gerrit.libreoffice.org/77578
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/itemset.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 4841123eed0a..75709c3f4072 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -656,9 +656,10 @@ void SfxItemSet::PutExtended void SfxItemSet::MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo ) { // special case: exactly one sal_uInt16 which is already included? - SfxItemState eItemState = GetItemState(nFrom, false); - if ( nFrom == nTo && ( eItemState == SfxItemState::DEFAULT || eItemState == SfxItemState::SET ) ) - return; + if (nFrom == nTo) + if (SfxItemState eItemState = GetItemState(nFrom, false); + eItemState == SfxItemState::DEFAULT || eItemState == SfxItemState::SET) + return; #ifdef DBG_UTIL assert(nFrom <= nTo); |