summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Antoni Buj i Gelonch <robert.buj@gmail.com>2014-10-29 17:11:50 +0100
committerNoel Grandin <noelgrandin@gmail.com>2014-10-30 08:49:01 +0000
commit9eabc1fc3b2efa3303860d33dddd013f39582861 (patch)
treeb5f7788c4fa3bab2ce7b0eb882998b024573c62c
parent1e7382cb45759908cd3d639c839dcd5633dbadd1 (diff)
java: Questionable use of non-short-circuit logic
Change-Id: Ied831cb5d6645e2696ff2d3d57843fc7a1f82f7e Reviewed-on: https://gerrit.libreoffice.org/12137 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--qadevOOo/runner/util/XMLTools.java3
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java
index 7dea190ed372..64330a10bbf6 100644
--- a/qadevOOo/runner/util/XMLTools.java
+++ b/qadevOOo/runner/util/XMLTools.java
@@ -424,7 +424,8 @@ public class XMLTools {
* all necessary tags and character data was found.
*/
public boolean checkTags() {
- allOK &= isWellFormed() ;
+ if (!isWellFormed())
+ allOK = false ;
Iterator<String> badTags = tags.keySet().iterator() ;
Iterator<String> badChars = chars.keySet().iterator() ;
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java
index 00319ce2f856..fb1687a578a4 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java
@@ -118,7 +118,7 @@ public class InBlocksLabelsAbove extends ColumnarTwoColumns
aRectFields = insertFormattedField(xSection, sFieldName, aRectFields, nFieldWidth, aSOTextField);
nLastHeight = Math.max(nLastHeight, aRectFields.Height);
int nNextX = aRectFields.X + nFieldWidth;
- if (nNextX > (getPageWidth() - getRightPageIndent()) & nCount > 1)
+ if ((nNextX > (getPageWidth() - getRightPageIndent())) && nCount > 1)
{
int nHeight = (aSOLabel.getHeight(LayoutConstants.LabelHeight) + Math.max(aSOTextField.getHeight(LayoutConstants.FormattedFieldHeight), nLastHeight));
nLastHeight = 0;