diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-29 17:18:43 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-29 17:18:43 +0100 |
commit | 20b6e18ecbb3e6e5ffa18cb3230b56933f03c602 (patch) | |
tree | a300fa82f0beec6341d3bd346b4c6fae70e43296 /svtools | |
parent | db37370d2c92e32e46d679fdf4630d293e475b9d (diff) |
Rewrite some (trivial) assignments inside if/while conditions: svtools
Change-Id: If7843583924d2ecebe65aef1843e510fa974d877
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/embedtransfer.cxx | 3 | ||||
-rw-r--r-- | svtools/source/misc/transfer.cxx | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index 1a867e22e240..d23ff4b6571d 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -139,7 +139,8 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo if ( bDeleteStream ) delete pStream; - if( ( bRet = ( aSeq.getLength() > 0 ) ) ) + bRet = ( aSeq.getLength() > 0 ); + if( bRet ) { SetAny( uno::Any(aSeq), rFlavor ); } diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 1f7fcb7ad3ff..ed84be3ecdc6 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -1714,14 +1714,16 @@ bool TransferableDataHelper::GetGraphic( const css::datatransfer::DataFlavor& rF // try to get PNG first BitmapEx aBmpEx; - if( ( bRet = GetBitmapEx( aFlavor, aBmpEx ) ) ) + bRet = GetBitmapEx( aFlavor, aBmpEx ); + if( bRet ) rGraphic = aBmpEx; } else if (SotExchange::GetFormatDataFlavor(SotClipboardFormatId::JPEG, aFlavor) && TransferableDataHelper::IsEqual(aFlavor, rFlavor)) { BitmapEx aBitmapEx; - if ((bRet = GetBitmapEx(aFlavor, aBitmapEx))) + bRet = GetBitmapEx(aFlavor, aBitmapEx); + if (bRet) rGraphic = aBitmapEx; } else if(SotExchange::GetFormatDataFlavor( SotClipboardFormatId::BITMAP, aFlavor ) && @@ -1729,7 +1731,8 @@ bool TransferableDataHelper::GetGraphic( const css::datatransfer::DataFlavor& rF { BitmapEx aBmpEx; - if( ( bRet = GetBitmapEx( aFlavor, aBmpEx ) ) ) + bRet = GetBitmapEx( aFlavor, aBmpEx ); + if( bRet ) rGraphic = aBmpEx; } else if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::GDIMETAFILE, aFlavor ) && @@ -1737,7 +1740,8 @@ bool TransferableDataHelper::GetGraphic( const css::datatransfer::DataFlavor& rF { GDIMetaFile aMtf; - if( ( bRet = GetGDIMetaFile( aFlavor, aMtf ) ) ) + bRet = GetGDIMetaFile( aFlavor, aMtf ); + if( bRet ) rGraphic = aMtf; } else |