[Libreoffice-commits] core.git: wizards/source
Jean-Pierre Ledure
jp at ledure.be
Sun Dec 13 07:09:01 PST 2015
wizards/source/access2base/Database.xba | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
New commits:
commit ad23fb096d8f65346bf5f0f5095f718532a32941
Author: Jean-Pierre Ledure <jp at ledure.be>
Date: Sun Dec 13 16:06:00 2015 +0100
Access2Base - OutputTo action more concise
Simplified use of TableDefs and QueryDefs collections
Change-Id: I87c5dcbbb1105c61324a0a89929f13ff86eab4a4
diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba
index 05e7335..b54915f 100644
--- a/wizards/source/access2base/Database.xba
+++ b/wizards/source/access2base/Database.xba
@@ -625,19 +625,12 @@ Const cstThisSub = "Database.OutputTo"
If IsMissing(pvQuality) Then pvQuality = acExportQualityPrint
If Not Utils._CheckArgument(pvQuality, 7, _AddNumeric(), Array(acExportQualityPrint, acExportQualityScreen)) Then Goto Exit_Function
-Dim sOutputFile As String, bFound As Boolean, i As Integer, iCount As Integer, oTable As Object
+Dim sOutputFile As String, oTable As Object
Dim sOutputFormat As String, iTemplate As Integer, iOutputFile As Integer, bOutput As Boolean, sSuffix As String
+
'Find applicable table or query
- bFound = False
- If pvObjectType = acOutputTable Then iCount = TableDefs.Count Else iCount = Querydefs.Count
- For i = 0 To iCount
- If pvObjectType = acOutputTable Then Set oTable = TableDefs(i) Else Set oTable = Querydefs(i)
- If UCase(oTable._Name) = UCase(pvObjectName) Then
- bFound = True
- Exit For
- End If
- Next i
- If Not bFound Then Goto Error_NotFound
+ If pvObjectType = acOutputTable Then Set oTable = TableDefs(pvObjectName, True) Else Set oTable = Querydefs(pvObjectName, True)
+ If IsNull(oTable) Then Goto Error_NotFound
'Determine format and parameters
If pvOutputFormat = "" Then
More information about the Libreoffice-commits
mailing list