Kaydet (Commit) 08715e24 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

Revert "fdo#87044: reportbuilder: Revert "fdo#67930 don't use variables ..."

This reverts commit d6ce95ae.

Not necessary to fix fdo#87044, commit
1e10f6d2 is sufficient. Since the code
that is reintroduced leads to an overly complex and fragile document
structure, I'd rather not have it.
üst 8ecf956d
...@@ -99,30 +99,39 @@ public class FormattedTextLayoutController ...@@ -99,30 +99,39 @@ public class FormattedTextLayoutController
DataSourceException DataSourceException
{ {
final FormattedTextElement element = (FormattedTextElement) getNode(); final FormattedTextElement element = (FormattedTextElement) getNode();
final VariablesCollection vc = getVariablesCollection(); // LEM 20130812 I have absolutely no clue why it wants to go via
if (vc != null) // a variable like that. It complicates things, is fragile
{ // (because the variable-set is done in *every* detail section
final String name = vc.addVariable(element); // again and again. This in itself is not that bad, but when
final AttributeMap variablesGet = new AttributeMap(); // the detail section is of height zero, the "set" is never done...
variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, // and this whole schema fails). For now, keep the code in case
Element.TYPE_ATTRIBUTE, "variable-get"); // something break. If we survive the 4.2 cycle (in its entirety)
variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE, // without regression traced to this, then remove it (for 4.4 or
Element.NAMESPACE_ATTRIBUTE, OfficeNamespaces.TEXT_NS); // something like that).
variablesGet.setAttribute(OfficeNamespaces.TEXT_NS, "name", name); // final VariablesCollection vc = getVariablesCollection();
// if (vc != null)
final String dataStyleName = computeValueStyle(); // {
if (dataStyleName != null) // final String name = vc.addVariable(element);
{ // final AttributeMap variablesGet = new AttributeMap();
variablesGet.setAttribute(OfficeNamespaces.STYLE_NS, "data-style-name", dataStyleName); // variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE,
} // Element.TYPE_ATTRIBUTE, "variable-get");
// variablesGet.setAttribute(JFreeReportInfo.REPORT_NAMESPACE,
final String valueType = computeValueType(); // Element.NAMESPACE_ATTRIBUTE, OfficeNamespaces.TEXT_NS);
variablesGet.setAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE_TYPE, valueType); // variablesGet.setAttribute(OfficeNamespaces.TEXT_NS, "name", name);
target.startElement(variablesGet);
// final String dataStyleName = computeValueStyle();
target.endElement(variablesGet); // if (dataStyleName != null)
} // {
else // 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()); final DataFlags df = FormatValueUtility.computeDataFlag(element, getFlowController());
if (df != null) if (df != null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment