summaryrefslogtreecommitdiff
path: root/reportbuilder/java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-15 14:43:35 +0200
committerNoel Grandin <noel@peralex.com>2014-10-16 08:15:48 +0200
commit973eb2f6db60c0939299a968a3121e3310e6d1f5 (patch)
tree9eece355c20bc4d930e7e58943fc2d33bedfcfd0 /reportbuilder/java
parentfa652cdd2314f485359119a8ff081a7afd1c01b0 (diff)
java: reduce the depth of some deeply nested if blocks
Change-Id: I3c0c7f08d4d8ea594e72fc0d9b93d085d4ab4bf5
Diffstat (limited to 'reportbuilder/java')
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java48
1 files changed, 24 insertions, 24 deletions
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java
index ca4dbd9a9764..1029b14b24b8 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java
@@ -143,37 +143,37 @@ public class ChartRawReportTarget extends OfficeDocumentReportTarget
return;
}
final String namespace = ReportTargetUtil.getNamespaceFromAttribute(attrs);
- if (!isFilteredNamespace(namespace))
+ if (isFilteredNamespace(namespace))
+ return;
+
+ final String elementType = ReportTargetUtil.getElemenTypeFromAttribute(attrs);
+ // if this is the report namespace, write out a table definition ..
+ if (OfficeNamespaces.TABLE_NS.equals(namespace))
{
- final String elementType = ReportTargetUtil.getElemenTypeFromAttribute(attrs);
- // if this is the report namespace, write out a table definition ..
- if (OfficeNamespaces.TABLE_NS.equals(namespace))
- {
- if (OfficeToken.TABLE.equals(elementType) || OfficeToken.TABLE_ROWS.equals(elementType))
- {
- return;
- }
- else if (isFiltered(elementType))
- {
- inFilterElements = false;
- if (tableCount > 1)
- {
- return;
- }
- }
- }
- else if (OfficeNamespaces.CHART_NS.equals(namespace) && "chart".equals(elementType))
+ if (OfficeToken.TABLE.equals(elementType) || OfficeToken.TABLE_ROWS.equals(elementType))
{
return;
}
- if (inFilterElements && tableCount > 1)
+ else if (isFiltered(elementType))
{
- return;
+ inFilterElements = false;
+ if (tableCount > 1)
+ {
+ return;
+ }
}
- final XmlWriter xmlWriter = getXmlWriter();
- xmlWriter.writeCloseTag();
- --closeTags;
}
+ else if (OfficeNamespaces.CHART_NS.equals(namespace) && "chart".equals(elementType))
+ {
+ return;
+ }
+ if (inFilterElements && tableCount > 1)
+ {
+ return;
+ }
+ final XmlWriter xmlWriter = getXmlWriter();
+ xmlWriter.writeCloseTag();
+ --closeTags;
}
@Override