diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-29 17:19:12 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-29 17:19:12 +0100 |
commit | 1ba9b792ccd6a27b56709917374a1ea03c0a000a (patch) | |
tree | 2d1d5ba767da41ae80d4ef797500fdb570096526 /sd | |
parent | 4f2d4e20a8fe59ad4c0c8ee55ec13654556b30eb (diff) |
Rewrite some (trivial) assignments inside if/while conditions: sd
Change-Id: I55472a12ad235e6a560d60671559a158eefb7c8f
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 304194b268c7..55279ace6cbe 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2436,10 +2436,12 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj if ( pTextObj->Count() == 1 ) { PPTParagraphObj* pPara = pTextObj->First(); - PPTPortionObj* pPor = nullptr; - if ( pPara && pPara->GetTextSize() == 0 && (pPor = pPara->First())) + if ( pPara && pPara->GetTextSize() == 0 ) { - pPor->ApplyTo(aSet, (SdrPowerPointImport&)*this, pTextObj->GetDestinationInstance()); + if ( PPTPortionObj * pPor = pPara->First() ) + { + pPor->ApplyTo(aSet, (SdrPowerPointImport&)*this, pTextObj->GetDestinationInstance()); + } } } pPresObj->SetMergedItemSet(aSet); diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 2f61531c714a..32e4fa64a665 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -332,7 +332,8 @@ uno::Sequence<beans::PropertyValue> for( size_t i = 0; i < SAL_N_ELEMENTS( aURLPropertyNames ); i++ ) { XPropertyListRef pList = pDoc->GetPropertyList( (XPropertyListType) i ); - if( ( bHasEmbed = pList.is() && pList->IsEmbedInDocument() ) ) + bHasEmbed = pList.is() && pList->IsEmbedInDocument(); + if( bHasEmbed ) break; } if( !bHasEmbed ) |