Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Legacy reports (not Sun/Oracle Report Builder ones) created by the
wizard in LibreOffice 3.5 or later fail to open (in LibreOffice 3.5
and later): show empty data.

To correct i#98163, LibO 3.5 leaves the Command hidden control value
empty, this is the signal that on opening, it should fetch the current
definition of the query (in QueryName hidden control); that change is
inherited from a OO.org 3.4 CWS...

The problem was within the prependSortCriteria() method call. It tries
to use (deeper withing subobjects) metadata about columns that gets
initialised only at ->execute time, and thus all this code raised an
exception (null pointer). So I moved it to after the execute(), but
then we have to ->execute again so that it gets taken into
account... Hmmm... There is probably a better solution, but this one
works for now.


Please apply to libreoffice-3-5 branch.

-- 
Lionel
From 183ac99a1ceebd08f750963dce6170656a201626 Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Tue, 5 Jun 2012 21:30:40 +0200
Subject: [PATCH] fdo#47473 try to set new order only after field columns are
 available

Change-Id: If8ba8f4e12aaebadec86a7f445a6d32bd363106d
---
 .../wizards/report/ReportTextImplementation.java   |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java 
b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
index c45d282..94b4e40 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
@@ -279,7 +279,6 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
                         {
                             getRecordParser().Command = (String) 
oCommand.getPropertySet().getPropertyValue(PropertyNames.COMMAND);
                             
getRecordParser().getSQLQueryComposer().m_xQueryAnalyzer.setQuery(getRecordParser().Command);
-                            getRecordParser().getSQLQueryComposer().prependSortingCriteria();
                             getRecordParser().Command = 
getRecordParser().getSQLQueryComposer().getQuery();
                         }
                         else
@@ -293,6 +292,12 @@ public class ReportTextImplementation extends ReportImplementationHelper 
impleme
                     if (bexecute)
                     {
                         bexecute = getRecordParser().getFields(sFieldNameList, true);
+                        if (bexecute && 
getRecordParser().hasEscapeProcessing(oCommand.getPropertySet()))
+                        {
+                            getRecordParser().getSQLQueryComposer().prependSortingCriteria();
+                            getRecordParser().Command = 
getRecordParser().getSQLQueryComposer().getQuery();
+                            bexecute = getRecordParser().executeCommand(nCommandType);
+                        }
                     }
                     return bexecute;
                 }
-- 
1.7.9


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.