[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - reportbuilder/java
Michael Stahl
mstahl at redhat.com
Tue Dec 16 12:32:32 PST 2014
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java | 3
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java | 57 ++++------
2 files changed, 26 insertions(+), 34 deletions(-)
New commits:
commit 760ad24e1d44e9f86caf5e8fb9b8f69899ed0716
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Dec 12 17:32:46 2014 +0100
fdo#87044: reportbuilder: Revert "fdo#67930 don't use variables ...
... for formattedtext in header/footer"
This reverts commit b0e3c6b8fa548defd5a3af2b8bf88b0b49589753.
This reverts commit fc92c1abebcfe9b18649d35b76bf22e001e332da.
The other fix from the libreoffice-4-1 branch seems to work better.
Change-Id: Idc5d7543c11dff74977729dab5afd978197dab6a
(cherry picked from commit d6ce95ae2288859fe74d601f1bdaf616ab1ee7f0)
fdo#67930 work around fdo#68024
don't emit string-value attribute
Change-Id: I3668b88437451523f2b6bb3c2c82e1929f7ba3d8
Reviewed-on: https://gerrit.libreoffice.org/5371
Tested-by: Miklos Vajna <vmiklos at suse.cz>
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
(cherry picked from commit 76408b0f0d7e91cddb8b056069a2ee547109b156)
(cherry picked from commit 1e10f6d229587ffc2a955c225b489645f8016e23)
Reviewed-on: https://gerrit.libreoffice.org/13458
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
index b4c5180..21849f2 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
@@ -172,7 +172,8 @@ public class FormatValueUtility
{
variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, VALUE_TYPE, "string");
}
- variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, STRING_VALUE, String.valueOf(value));
+ // work around fdo#68024
+ //variableSection.setAttribute(OfficeNamespaces.OFFICE_NS, STRING_VALUE, String.valueOf(value));
}
else
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java
index 603f821..cd09775 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java
@@ -102,39 +102,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)
More information about the Libreoffice-commits
mailing list