Kaydet (Commit) d6ce95ae authored tarafından Michael Stahl's avatar Michael Stahl

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

... for formattedtext in header/footer"

This reverts commit b0e3c6b8.
This reverts commit fc92c1ab.

The other fix from the libreoffice-4-1 branch seems to work better.

Change-Id: Idc5d7543c11dff74977729dab5afd978197dab6a
üst 458f22c3
......@@ -99,39 +99,30 @@ public class FormattedTextLayoutController
DataSourceException
{
final FormattedTextElement element = (FormattedTextElement) getNode();
// 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 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)
......
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