[Libreoffice-commits] core.git: cui/source

Caolán McNamara caolanm at redhat.com
Fri Aug 11 10:53:54 UTC 2017


 cui/source/tabpages/backgrnd.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a162b21c2b393534a9f6433c9b2b674aaaecf1a7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 11 11:51:09 2017 +0100

    improve scoping a little
    
    Change-Id: Ie2e86852f7c4754070d3eb7e8981d674f04a6d80

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<const SvxBrushItem&>(*pOld);
         SvxGraphicPosition  eOldPos     = rOldItem.GetGraphicPos();
         const bool          bIsBrush    = ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) );


More information about the Libreoffice-commits mailing list