From a162b21c2b393534a9f6433c9b2b674aaaecf1a7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 11 Aug 2017 11:51:09 +0100 Subject: improve scoping a little Change-Id: Ie2e86852f7c4754070d3eb7e8981d674f04a6d80 --- cui/source/tabpages/backgrnd.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cui') diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 87aa1afad9f1..b3684632209e 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -594,11 +594,11 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) sal_uInt16 nWhich = GetWhich( nSlot ); const SfxPoolItem* pOld = GetOldItem( *rCoreSet, nSlot ); - SfxItemState eOldItemState = rCoreSet->GetItemState(nSlot, false); - const SfxItemSet& rOldSet = GetItemSet(); - - if ( pOld ) + if (pOld) { + SfxItemState eOldItemState = rCoreSet->GetItemState(nSlot, false); + const SfxItemSet& rOldSet = GetItemSet(); + const SvxBrushItem& rOldItem = static_cast(*pOld); SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); const bool bIsBrush = ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) ); -- cgit