wizards/source/access2base/Database.xba    |   11 ++++++++---
 wizards/source/access2base/DoCmd.xba       |    8 +++++---
 wizards/source/access2base/acConstants.xba |    3 +++
 3 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit 0daed9b52fb74b090295a8e079664956785e02c2
Author: Jean-Pierre Ledure <j...@ledure.be>
Date:   Sun Dec 6 18:09:10 2015 +0100

    Access2Base - First steps OutPutTo calc and csv
    
    + bug correction on dlgFormat dialog - check user input
    
    Change-Id: I126f99dbc587342772a601df8b9dd03cfe4850ac

diff --git a/wizards/source/access2base/Database.xba 
b/wizards/source/access2base/Database.xba
index dacf29f..c4a674c 100644
--- a/wizards/source/access2base/Database.xba
+++ b/wizards/source/access2base/Database.xba
@@ -605,7 +605,12 @@ Const cstThisSub = &quot;Database.OutputTo&quot;
        If IsMissing(pvOutputFormat) Then pvOutputFormat = &quot;&quot;
        If Not Utils._CheckArgument(pvOutputFormat, 3, vbString) Then Goto 
Exit_Function
        If pvOutputFormat &lt;&gt; &quot;&quot; Then
-               If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, 
Array(UCase(acFormatHTML), &quot;HTML&quot;, &quot;&quot;)) _
+               If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, 
Array( _
+                                                       UCase(acFormatHTML), 
&quot;HTML&quot; _
+                                                       , UCase(acFormatXLS), 
&quot;XLS&quot; _
+                                                       , UCase(acFormatCALC), 
&quot;ODS&quot; _
+                                                       , UCase(acFormatTXT), 
&quot;TXT&quot;, &quot;CSV&quot; _
+                                                       , &quot;&quot;)) _
                                Then Goto Exit_Function                         
&apos;  A 2nd time to allow case unsensitivity
        End If
        If IsMissing(pvOutputFile) Then pvOutputFile = &quot;&quot;
@@ -637,7 +642,7 @@ Dim sOutputFormat As String, iTemplate As Integer, 
iOutputFile As Integer, bOutp
        If pvOutputFormat = &quot;&quot; Then
                sOutputFormat = _PromptFormat()                 &apos;  Prompt 
user for format
                If sOutputFormat = &quot;&quot; Then Goto Exit_Function
-               If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, 
Array(UCase(acFormatHTML), &quot;HTML&quot;, &quot;&quot;)) _
+               If Not Utils._CheckArgument(UCase(sOutputFormat), 3, vbString, 
Array(UCase(acFormatHTML), &quot;HTML&quot;, &quot;&quot;)) _
                                Then Goto Exit_Function                 &apos;  
Today only value, later maybe Calc ?
        Else
                sOutputFormat = UCase(pvOutputFormat)
@@ -655,7 +660,7 @@ Dim sOutputFormat As String, iTemplate As Integer, 
iOutputFile As Integer, bOutp
 
        &apos;Create file
        bOutput = _OutputToHTML(oTable, sOutputFile, pvTemplateFile)
-       Set oTable = Nothing
+       oTable.Dispose()
        
        &apos;Launch application, if requested
        If bOutput Then
diff --git a/wizards/source/access2base/DoCmd.xba 
b/wizards/source/access2base/DoCmd.xba
index a10e624..4af47fe 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -1212,8 +1212,9 @@ Public Function OutputTo(ByVal pvObjectType As Variant _
                                                        , ByVal Optional 
pvEncoding As Variant _
                                                        , ByVal Optional 
pvQuality As Variant _
                                                        ) As Boolean
-&apos;Supported:       acFormatPDF, acFormatODT, acFormatDOC, acFormatHTML for 
forms
-&apos;                 acFormatHTML for tables and queries
+REM 
https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options
+&apos;Supported:       acFormatPDF, acFormatODT, acFormatDOC, acFormatHTML     
        for forms
+&apos;                 acFormatHTML, acFormatXLS, acFormatCALC, acFormatTXT    
for tables and queries
 
        If _ErrorHandler() Then On Local Error Goto Error_Function
 Const cstThisSub = &quot;OutputTo&quot;
@@ -1229,7 +1230,8 @@ Const cstThisSub = &quot;OutputTo&quot;
        If pvOutputFormat &lt;&gt; &quot;&quot; Then
                If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, 
Array( _
                        UCase(acFormatPDF), UCase(acFormatODT), 
UCase(acFormatDOC), UCase(acFormatHTML) _
-                       , &quot;PDF&quot;, &quot;ODT&quot;, &quot;DOC&quot;, 
&quot;HTML&quot;, &quot;&quot; _
+                       , UCase(acFormatXLS), UCase(acFormatCALC), 
UCase(acFormatTXT) _
+                       , &quot;PDF&quot;, &quot;ODT&quot;, &quot;DOC&quot;, 
&quot;HTML&quot;, &quot;XLS&quot;, &quot;ODS&quot;, &quot;TXT&quot;, 
&quot;CSV&quot;, &quot;&quot; _
                        )) Then Goto Exit_Function                              
&apos;  A 2nd time to allow case unsensitivity
        End If
        If IsMissing(pvOutputFile) Then pvOutputFile = &quot;&quot;
diff --git a/wizards/source/access2base/acConstants.xba 
b/wizards/source/access2base/acConstants.xba
index 3f30ba0..89ac72b 100644
--- a/wizards/source/access2base/acConstants.xba
+++ b/wizards/source/access2base/acConstants.xba
@@ -287,6 +287,9 @@ Global Const acFormatPDF = &quot;writer_pdf_Export&quot;
 Global Const acFormatODT = &quot;writer8&quot;
 Global Const acFormatDOC = &quot;MS Word 97&quot;
 Global Const acFormatHTML = &quot;HTML&quot;
+Global Const acFormatXLS = &quot;MS Excel 97&quot;
+Global Const acFormatCALC = &quot;StarOffice XML (Calc)&quot;
+Global Const acFormatTXT = &quot;Text - txt - csv (StarCalc)&quot;
 
 REM AcExportQuality
 REM -----------------------------------------------------------------
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to