summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2014-12-17 10:58:19 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2014-12-17 11:01:17 +0100
commit08715e24c13d21767544725292d8dbf1c2381479 (patch)
tree62066f2122270a42850a07c974f74712bbcf6773 /reportbuilder
parent8ecf956d79878c9b24f5ddc51d6b723a76d334f5 (diff)
Revert "fdo#87044: reportbuilder: Revert "fdo#67930 don't use variables ..."
This reverts commit d6ce95ae2288859fe74d601f1bdaf616ab1ee7f0. Not necessary to fix fdo#87044, commit 1e10f6d229587ffc2a955c225b489645f8016e23 is sufficient. Since the code that is reintroduced leads to an overly complex and fragile document structure, I'd rather not have it.
Diffstat (limited to 'reportbuilder')
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java57
1 files changed, 33 insertions, 24 deletions
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java
index afd8a59e6978..8c1f619c8240 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java
@@ -99,30 +99,39 @@ public class FormattedTextLayoutController
DataSourceException
{
final FormattedTextElement element = (FormattedTextElement) getNode();
- final VariablesCollection vc = getVariablesCollection();
- if (vc != null)
- {
- final String name = vc.addVariable(element);
- final AttributeMap variablesGet = new AttributeMap();
- variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE,
- Element.TYPE_ATTRIBUTE, "variable-get");
- variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE,
- Element.NAMESPACE_ATTRIBUTE, OfficeNamespaces.TEXT_NS);
- variablesGet.setAttribute(OfficeNamespaces.TEXT_NS, "name", name);
-
- final String dataStyleName = computeValueStyle();
- if (dataStyleName != null)
- {
- variablesGet.setAttribute(OfficeNamespaces.STYLE_NS, "data-style-name", dataStyleName);
- }
-
- final String valueType = computeValueType();
- variablesGet.setAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE_TYPE, valueType);
- target.startElement(variablesGet);
-
- target.endElement(variablesGet);
- }
- else
+ // LEM 20130812 I have absolutely no clue why it wants to go via
+ // a variable like that. It complicates things, is fragile
+ // (because the variable-set is done in *every* detail section
+ // again and again. This in itself is not that bad, but when
+ // the detail section is of height zero, the "set" is never done...
+ // and this whole schema fails). For now, keep the code in case
+ // something break. If we survive the 4.2 cycle (in its entirety)
+ // without regression traced to this, then remove it (for 4.4 or
+ // something like that).
+ // final VariablesCollection vc = getVariablesCollection();
+ // if (vc != null)
+ // {
+ // final String name = vc.addVariable(element);
+ // final AttributeMap variablesGet = new AttributeMap();
+ // variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE,
+ // Element.TYPE_ATTRIBUTE, "variable-get");
+ // variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE,
+ // Element.NAMESPACE_ATTRIBUTE, OfficeNamespaces.TEXT_NS);
+ // variablesGet.setAttribute(OfficeNamespaces.TEXT_NS, "name", name);
+
+ // final String dataStyleName = computeValueStyle();
+ // if (dataStyleName != null)
+ // {
+ // variablesGet.setAttribute(OfficeNamespaces.STYLE_NS, "data-style-name", dataStyleName);
+ // }
+
+ // final String valueType = computeValueType();
+ // variablesGet.setAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE_TYPE, valueType);
+ // target.startElement(variablesGet);
+
+ // target.endElement(variablesGet);
+ // }
+ // else
{
final DataFlags df = FormatValueUtility.computeDataFlag(element, getFlowController());
if (df != null)