summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-29 17:19:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-29 17:19:53 +0100
commit40e1595de748dbcc700dae46cc81031d927865cc (patch)
tree1e17c0f3613771570e05a9921374c3c8d0e7d21c /oox
parent542174a24e00ab81430a4028f49222dddb3e284f (diff)
Rewrite some (trivial) assignments inside if/while conditions: oox
Change-Id: I75de45677603800baec18d03114418181c4393c2
Diffstat (limited to 'oox')
-rw-r--r--oox/source/vml/vmlinputstream.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx
index 554b15b2805c..57204c3efbb1 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -93,19 +93,23 @@ void lclProcessAttribs( OStringBuffer& rBuffer, const sal_Char* pcBeg, const sal
{
// pcNameBeg points to begin of attribute name, find equality sign
const sal_Char* pcEqualSign = lclFindCharacter( pcNameBeg, pcEnd, '=' );
- if ((bOk = (pcEqualSign < pcEnd)))
+ bOk = (pcEqualSign < pcEnd);
+ if (bOk)
{
// find end of attribute name (ignore whitespace between name and equality sign)
const sal_Char* pcNameEnd = lclTrimWhiteSpaceFromEnd( pcNameBeg, pcEqualSign );
- if( (bOk = (pcNameBeg < pcNameEnd)) )
+ bOk = (pcNameBeg < pcNameEnd);
+ if( bOk )
{
// find begin of attribute value (must be single or double quote)
const sal_Char* pcValueBeg = lclFindNonWhiteSpace( pcEqualSign + 1, pcEnd );
- if( (bOk = (pcValueBeg < pcEnd) && ((*pcValueBeg == '\'') || (*pcValueBeg == '"'))) )
+ bOk = (pcValueBeg < pcEnd) && ((*pcValueBeg == '\'') || (*pcValueBeg == '"'));
+ if( bOk )
{
// find end of attribute value (matching quote character)
const sal_Char* pcValueEnd = lclFindCharacter( pcValueBeg + 1, pcEnd, *pcValueBeg );
- if( (bOk = (pcValueEnd < pcEnd)) )
+ bOk = (pcValueEnd < pcEnd);
+ if( bOk )
{
++pcValueEnd;
OString aAttribName( pcNameBeg, static_cast< sal_Int32 >( pcNameEnd - pcNameBeg ) );
@@ -120,8 +124,12 @@ void lclProcessAttribs( OStringBuffer& rBuffer, const sal_Char* pcBeg, const sal
aAttributes[ pcNameBeg ] = aAttribData;
// continue with next attribute (skip whitespace after this attribute)
pcNameBeg = pcValueEnd;
- if( (pcNameBeg < pcEnd) && ((bOk = lclIsWhiteSpace( *pcNameBeg ))) )
- pcNameBeg = lclFindNonWhiteSpace( pcNameBeg + 1, pcEnd );
+ if( pcNameBeg < pcEnd )
+ {
+ bOk = lclIsWhiteSpace( *pcNameBeg );
+ if( bOk )
+ pcNameBeg = lclFindNonWhiteSpace( pcNameBeg + 1, pcEnd );
+ }
}
}
}