diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-05-20 15:53:27 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-05-20 15:53:27 +0000 |
commit | 2cfedd90802345b33cb12676e691a898e2757099 (patch) | |
tree | 6f02bd7a463e681b1c2e290719b8c3faa8500e39 /wizards/com/sun/star/wizards/report | |
parent | e492240eaecde5d5520beca70cbcfdc27b8d5304 (diff) |
INTEGRATION: CWS wizards241fix01_DEV300 (1.40.40.1.2); FILE MERGED
2008/04/30 08:35:09 lla 1.40.40.1.2.1: #i87709# restored from old 2.3 version
Diffstat (limited to 'wizards/com/sun/star/wizards/report')
-rw-r--r-- | wizards/com/sun/star/wizards/report/Dataimport.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index 0e96ac28ebf1..91182e728dbe 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: Dataimport.java,v $ - * $Revision: 1.42 $ + * $Revision: 1.43 $ * * This file is part of OpenOffice.org. * @@ -243,7 +243,26 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi bgetConnection = CurReportDocument.CurDBMetaData.getConnection(CurProperties); int nCommandType = com.sun.star.sdb.CommandType.COMMAND; boolean bexecute = false; - if (bgetConnection){ + if (bgetConnection) + { + // LLA: restored from old 2.3 Version + if ((CurReportDocument.CurDBMetaData.getCommandType() == CommandType.QUERY) && + (CurReportDocument.CurDBMetaData.Command.equals(""))) + { + CurReportDocument.CurDBMetaData.oSQLQueryComposer = new SQLQueryComposer(CurReportDocument.CurDBMetaData); + DBMetaData.CommandObject oCommand = CurReportDocument.CurDBMetaData.getQueryByName(sQueryName); + if (CurReportDocument.CurDBMetaData.hasEscapeProcessing(oCommand.xPropertySet)) + { + CurReportDocument.CurDBMetaData.Command = (String) oCommand.xPropertySet.getPropertyValue("Command"); + CurReportDocument.CurDBMetaData.oSQLQueryComposer.xQueryAnalyzer.setQuery(CurReportDocument.CurDBMetaData.Command); + CurReportDocument.CurDBMetaData.oSQLQueryComposer.prependSortingCriteria(); + } + else + { + nCommandType = com.sun.star.sdb.CommandType.QUERY; + CurReportDocument.CurDBMetaData.Command = sQueryName; + } + } bexecute = CurReportDocument.CurDBMetaData.executeCommand(nCommandType); //sMsgQueryCreationImpossible + (char) 13 + sMsgEndAutopilot, sFieldNameList, true); if (bexecute){ bexecute = CurReportDocument.CurDBMetaData.getFields(sFieldNameList, true); |