[PATCH] fdo#47473 try to set new order only after field columns are available

Lionel Elie Mamane lionel at mamane.lu
Tue Jun 5 12:30:40 PDT 2012


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


--SLDf9lqlvOQaIe6s--


More information about the LibreOffice mailing list