Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
/access-add-in/Tests
*.laccdb
/excel-add-in/lib
*.zip
2 changes: 2 additions & 0 deletions access-add-in/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ vcs-index.json
# Ignore any dotenv files (used for external database connections)
*.env

# test folder, ...
LocalTest*
Binary file modified access-add-in/AccUnitLoader.accda
Binary file not shown.
2 changes: 1 addition & 1 deletion access-add-in/source/dbs-properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"Type": 4
},
"NavPane Width": {
"Value": 514,
"Value": 558,
"Type": 4
},
"Never Cache": {
Expand Down
8 changes: 4 additions & 4 deletions access-add-in/source/forms/AccUnitLoaderForm.bas
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Begin Form
Width =10604
DatasheetFontHeight =11
ItemSuffix =128
Left =4748
Top =3563
Right =20888
Bottom =12773
Left =3713
Top =3915
Right =20010
Bottom =12750
OnUnload ="[Event Procedure]"
RecSrcDt = Begin
0x212b6fd80e9ce340
Expand Down
4 changes: 0 additions & 4 deletions access-add-in/source/forms/AccUnitLoaderForm.cls
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ Private Sub cmdClose_Click()
DoCmd.Close acForm, Me.Name
End Sub

Private Property Get CurrentAccUnitDllPath() As String
CurrentAccUnitDllPath = Me.txtAccUnitDllPath.Value
End Property

Private Sub cmdExportAccUnitFiles_Click()

On Error GoTo HandleErr
Expand Down
68 changes: 34 additions & 34 deletions access-add-in/source/forms/AccUnitUserSettings.bas
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ Begin Form
OverlapFlags =85
TextAlign =1
IMESentenceMode =3
Left =2318
Left =2310
Top =90
Width =9072
Width =9075
Height =405
TabIndex =1
Name ="txtTestClassNameFormat"
Expand All @@ -125,9 +125,9 @@ Begin Form
HorizontalAnchor =2
ShowDatePicker =0

LayoutCachedLeft =2318
LayoutCachedLeft =2310
LayoutCachedTop =90
LayoutCachedWidth =11390
LayoutCachedWidth =11385
LayoutCachedHeight =495
ColumnStart =1
ColumnEnd =1
Expand Down Expand Up @@ -163,9 +163,9 @@ Begin Form
OverlapFlags =85
TextAlign =1
IMESentenceMode =3
Left =2318
Top =683
Width =9072
Left =2310
Top =675
Width =9075
Height =405
TabIndex =2
Name ="txtImportExportFolder"
Expand All @@ -174,10 +174,10 @@ Begin Form
HorizontalAnchor =2
ShowDatePicker =0

LayoutCachedLeft =2318
LayoutCachedTop =683
LayoutCachedWidth =11390
LayoutCachedHeight =1088
LayoutCachedLeft =2310
LayoutCachedTop =675
LayoutCachedWidth =11385
LayoutCachedHeight =1080
RowStart =1
RowEnd =1
ColumnStart =1
Expand All @@ -191,7 +191,7 @@ Begin Form
OverlapFlags =85
TextAlign =1
Left =120
Top =683
Top =675
Width =2161
Height =405
Name ="Label130"
Expand All @@ -200,9 +200,9 @@ Begin Form
RightPadding =0
BottomPadding =150
LayoutCachedLeft =120
LayoutCachedTop =683
LayoutCachedTop =675
LayoutCachedWidth =2281
LayoutCachedHeight =1088
LayoutCachedHeight =1080
RowStart =1
RowEnd =1
LayoutGroup =1
Expand All @@ -216,9 +216,9 @@ Begin Form
OverlapFlags =85
TextAlign =1
IMESentenceMode =3
Left =2318
Top =1275
Width =9072
Left =2310
Top =1260
Width =9075
Height =405
TabIndex =3
Name ="txtTemplateFolder"
Expand All @@ -227,10 +227,10 @@ Begin Form
HorizontalAnchor =2
ShowDatePicker =0

LayoutCachedLeft =2318
LayoutCachedTop =1275
LayoutCachedWidth =11390
LayoutCachedHeight =1680
LayoutCachedLeft =2310
LayoutCachedTop =1260
LayoutCachedWidth =11385
LayoutCachedHeight =1665
RowStart =2
RowEnd =2
ColumnStart =1
Expand All @@ -244,7 +244,7 @@ Begin Form
OverlapFlags =85
TextAlign =1
Left =120
Top =1275
Top =1260
Width =2161
Height =405
Name ="Label132"
Expand All @@ -253,9 +253,9 @@ Begin Form
RightPadding =0
BottomPadding =150
LayoutCachedLeft =120
LayoutCachedTop =1275
LayoutCachedTop =1260
LayoutCachedWidth =2281
LayoutCachedHeight =1680
LayoutCachedHeight =1665
RowStart =2
RowEnd =2
LayoutGroup =1
Expand All @@ -270,9 +270,9 @@ Begin Form
TextAlign =1
TextFontFamily =49
IMESentenceMode =3
Left =2318
Top =1868
Width =9072
Left =2310
Top =1845
Width =9075
Height =2835
FontSize =10
TabIndex =5
Expand All @@ -284,10 +284,10 @@ Begin Form
VerticalAnchor =2
ShowDatePicker =0

LayoutCachedLeft =2318
LayoutCachedTop =1868
LayoutCachedWidth =11390
LayoutCachedHeight =4703
LayoutCachedLeft =2310
LayoutCachedTop =1845
LayoutCachedWidth =11385
LayoutCachedHeight =4680
RowStart =3
RowEnd =3
ColumnStart =1
Expand All @@ -301,7 +301,7 @@ Begin Form
OverlapFlags =85
TextAlign =1
Left =120
Top =1868
Top =1845
Width =2161
Height =2835
Name ="Label134"
Expand All @@ -311,9 +311,9 @@ Begin Form
BottomPadding =0
VerticalAnchor =2
LayoutCachedLeft =120
LayoutCachedTop =1868
LayoutCachedTop =1845
LayoutCachedWidth =2281
LayoutCachedHeight =4703
LayoutCachedHeight =4680
RowStart =3
RowEnd =3
LayoutGroup =1
Expand Down
4 changes: 2 additions & 2 deletions access-add-in/source/modules/ACLibConfiguration.cls
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Friend Function GetACLibGlobalProperty(ByRef PropertyName As String) As String

End Function

Friend Function SetACLibGlobalProperty(ByRef PropertyName As String, ByRef NewValue As String) As String
Friend Sub SetACLibGlobalProperty(ByRef PropertyName As String, ByRef NewValue As String)

Dim rst As DAO.Recordset
Dim SelectSql As String
Expand All @@ -277,7 +277,7 @@ Friend Function SetACLibGlobalProperty(ByRef PropertyName As String, ByRef NewVa
rst.Update
rst.Close

End Function
End Sub

Private Property Get ACLibPropertyDb() As DAO.Database

Expand Down
14 changes: 4 additions & 10 deletions access-add-in/source/modules/AccUnitConfiguration.cls
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,15 @@ Attribute VB_Description = "Konfigurationseinstellungen der CodeLib verwalten"
Option Compare Text
Option Explicit

Private m_DaoSqlTools As SqlTools

#Const ADODB_EARLYBINDING = 0
'ADODB wird hier über Late binding eingesetzt, da es nur zum Erstellen der Tabelle genutzt wird

Private m_ACLibConfig As ACLibConfiguration
'ADODB is used here via late binding, as it is only used to create the table

' Base config
Private Const PROPNAME_ACCUNITDLLPATH As String = "AccUnitDllPath"

' Hilfsvariablen
Private m_AccUnitDllPath As String ' allg. Repository-Verzeichnis
Private m_PrivateRepositoryPath As String ' privates Verzeichnis (nicht in CodeLib enthalten)
Private m_ImportTestDefaultValue As Long
Private m_ACLibPropertyDb As DAO.Database
' Auxiliary variables
Private m_AccUnitDllPath As String
Private m_ACLibConfig As ACLibConfiguration

Public Property Get ACLibConfig() As ACLibConfiguration
If m_ACLibConfig Is Nothing Then
Expand Down
15 changes: 7 additions & 8 deletions access-add-in/source/modules/AccUnitLoaderConfigProcedures.bas
Original file line number Diff line number Diff line change
Expand Up @@ -151,25 +151,24 @@ End Property

Public Sub ExportAccUnitFiles()

Dim accFileName As Variant
Dim sBit As String
Dim AccUnitFileName As Variant
Dim DllPath As String

On Error GoTo HandleErr

DllPath = CurrentAccUnitConfiguration.AccUnitDllPath

With modApplication.CurrentApplication.Extensions("AppFile")
For Each accFileName In AccUnitFileNames
.CreateAppFile accFileName, DllPath & accFileName
For Each AccUnitFileName In AccUnitFileNames
.CreateAppFile AccUnitFileName, DllPath & AccUnitFileName
Next
End With

ExitHere:
Exit Sub

HandleErr:
If accFileName = "AccessCodeLib.AccUnit.tlb" Then
If AccUnitFileName = "AccessCodeLib.AccUnit.tlb" Then
Resume Next
End If
Err.Raise Err.Number, Err.Source, Err.Description, Err.HelpFile, Err.HelpContext
Expand All @@ -178,14 +177,14 @@ End Sub

Public Sub ImportAccUnitFiles()

Dim accFileName As Variant
Dim AccFileName As Variant
Dim DllPath As String

DllPath = CurrentAccUnitConfiguration.AccUnitDllPath

With modApplication.CurrentApplication.Extensions("AppFile")
For Each accFileName In AccUnitFileNames
.SaveAppFile accFileName, DllPath & accFileName, True
For Each AccFileName In AccUnitFileNames
.SaveAppFile AccFileName, DllPath & AccFileName, True
Next
End With

Expand Down
36 changes: 6 additions & 30 deletions access-add-in/source/modules/AccUnitLoaderFactory.cls
Original file line number Diff line number Diff line change
Expand Up @@ -71,43 +71,15 @@ Public Property Get ConstraintBuilder() As Object ' AccUnit.ConstraintBuilder
Set ConstraintBuilder = AccUnitFactory.ConstraintBuilder
End Property

Private Property Get TestRunner() As Object 'AccUnit.TestRunner

SetErrorTrappingToBreakOnUnhandledErrors
Set TestRunner = AccUnitFactory.TestRunner(CurrentVbProject)

End Property

Private Sub SetErrorTrappingToBreakOnUnhandledErrors()
'BreakOnAllErrors = 0,
'BreakInClassModule = 1,
'BreakOnUnhandledErrors = 2
Const ErrorTrappingOptionName As String = "Error Trapping"

If Application.GetOption(ErrorTrappingOptionName) <> 2 Then
Application.SetOption ErrorTrappingOptionName, 2
Debug.Print "Error Trapping auf BreakOnUnhandledErrors (2) umgestellt"
End If

End Sub

Public Property Get Configurator() As Object 'AccUnit.Configurator
Set Configurator = AccUnitFactory.Configurator(CurrentVbProject)
End Property

Public Property Get AccessTestSuite() As Object 'AccUnit.AccessTestSuite
Set AccessTestSuite = AccUnitFactory.AccessTestSuite

With AccessTestSuite
Set .HostApplication = Application
Set .ActiveVBProject = CurrentVbProject
Set .TestRunner = TestRunner
End With

Set AccessTestSuite = AccUnitFactory.AccessTestSuite(Application)
End Property

Public Property Get TestSuite(Optional ByVal TestReportOutputTo As TestReportOutput = TestReportOutput.DebugPrint) As TestSuite

Public Property Get TestSuite(Optional ByVal TestReportOutputTo As TestReportOutput = TestReportOutput.DebugPrint) As Object 'TestSuite
Set TestSuite = New TestSuite

With TestSuite
Expand Down Expand Up @@ -137,3 +109,7 @@ End Sub
Public Property Get CodeCoverageTracker() As Object 'AccUnit.CodeCoverageTracker
Set CodeCoverageTracker = AccUnitFactory.CodeCoverageTracker(CurrentVbProject)
End Property

Public Property Get ErrorTrappingObserver() As AccUnit.AccessErrorTrappingObserver
Set ErrorTrappingObserver = AccUnitFactory.AccessErrorTrappingObserver(Application)
End Property
7 changes: 0 additions & 7 deletions access-add-in/source/modules/ApplicationHandler.cls
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ Public Enum ApplicationHandlerErrors
End Enum

' API definitions
Private Const GCL_HBRBACKGROUND As Long = -10
Private Const RDW_INVALIDATE As Long = &H1
Private Const RDW_ERASE As Long = &H4
Private Const SYSCOLOR_COLOR_APPWORKSPACE As Long = 12

#If VBA7 Then

Private Declare PtrSafe Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" ( _
Expand Down Expand Up @@ -119,8 +114,6 @@ Private m_PublicPath As String ' Default directory for file explor

Private m_ApplicationStartFormName As String ' Form that is opened in Start method

Private m_CustomMDIBackgroundColor As Long

'Events
Public Event BeforeDispose(ByRef ResumeMode As ApplicationHandlerResumeModes, ByRef ResumeMessage As Variant)
Public Event AfterDispose(ByRef ResumeMode As ApplicationHandlerResumeModes, ByRef ResumeMessage As Variant)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ End Property
'
'---------------------------------------------------------------------------------------
Public Function CreateAppFile(ByVal FileID As String, ByVal FileName As String, _
Optional ByVal ExtFilterFieldName As String, Optional ExtFilterValue As Variant) As Boolean
Optional ByVal ExtFilterFieldName As String, Optional ByVal ExtFilterValue As Variant) As Boolean

Dim Binfile() As Byte
Dim FieldSize As Long
Expand Down
Loading