svl/source/items/itemset.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 336afaa77fa2b8d08871de7b90e27c0ada32a81e Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Aug 16 14:01:19 2019 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Aug 16 16:44:41 2019 +0200 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.kagan...@collabora.com> 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits