Skip to content

Commit

Permalink
Refactor for name change
Browse files Browse the repository at this point in the history
  • Loading branch information
joyfullservice committed Nov 2, 2023
1 parent 47c6506 commit c2ffccf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Version Control.accda.src/modules/clsDbTableData.cls
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Private Sub IDbComponent_Export(Optional strAlternatePath As String)
Application.ExportXML acExportTable, m_Table.Name, strFile
End If
Perf.OperationEnd
With New clsSanitize
With New clsSourceParser
.LoadSourceFile strFile
WriteFile .Sanitize(ectXML), strFile
End With
Expand Down
2 changes: 1 addition & 1 deletion Version Control.accda.src/modules/clsDbTableDef.cls
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Private Sub IDbComponent_Export(Optional strAlternatePath As String)
Perf.OperationEnd

' Rewrite sanitized XML as formatted UTF-8 content
With New clsSanitize
With New clsSourceParser
.LoadSourceFile strFile
DeleteFile strFile
WriteFile .Sanitize(ectXML), strFile
Expand Down
4 changes: 2 additions & 2 deletions Version Control.accda.src/modules/clsSourceParser.cls
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'---------------------------------------------------------------------------------------
' Module : modSanitize
' Module : clsSourceParser
' Author : Adam Waller
' Date : 12/4/2020
' Purpose : Functions to sanitize files to remove non-essential metadata
Expand Down Expand Up @@ -417,7 +417,7 @@ Private Function SanitizeObject() As String 'strPath As String, blnReturnHash As
' Prepare VBA output (if used)
If Not cVBA Is Nothing Then
' Build sanitized VBA string
With New clsSanitize
With New clsSourceParser
.LoadString cVBA.GetStr
this.strVBA = .Sanitize(ectVBA)
End With
Expand Down
12 changes: 6 additions & 6 deletions Version Control.accda.src/modules/modVCSUtility.bas
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ Public Function SaveComponentAsText(intType As AcObjectType, _
Dim strPrefix As String
Dim strPrintSettingsFile As String
Dim strHash As String
Dim cSanitize As clsSanitize
Dim cParser As clsSourceParser

On Error GoTo ErrHandler

Expand All @@ -428,7 +428,7 @@ Public Function SaveComponentAsText(intType As AcObjectType, _
If FSO.FileExists(strFile) Then DeleteFile strFile

' Sanitize certain object types
Set cSanitize = New clsSanitize
Set cParser = New clsSourceParser
Select Case intType
Case acForm, acReport
With New clsDevMode
Expand All @@ -454,7 +454,7 @@ Public Function SaveComponentAsText(intType As AcObjectType, _
End With

' Sanitizing converts to UTF-8
With cSanitize
With cParser
.LoadSourceFile strTempFile
.ObjectName = FSO.GetBaseName(strFile)
WriteFile .Sanitize(ectObjectDefinition), strFile
Expand All @@ -473,7 +473,7 @@ Public Function SaveComponentAsText(intType As AcObjectType, _

Case acQuery, acMacro
' Sanitizing converts to UTF-8
With cSanitize
With cParser
.LoadSourceFile strTempFile
WriteFile .Sanitize(ectObjectDefinition), strFile
strHash = .Hash
Expand All @@ -485,7 +485,7 @@ Public Function SaveComponentAsText(intType As AcObjectType, _
' Table data macros are stored in XML format
' The file may not exist if no TD Macro was found
If FSO.FileExists(strTempFile) Then
With cSanitize
With cParser
.LoadSourceFile strTempFile
WriteFile .Sanitize(ectXML), strFile
strHash = .Hash
Expand Down Expand Up @@ -622,7 +622,7 @@ Public Sub ExportCodeModule(strName As String, strFile As String)
CurrentVBProject.VBComponents(strName).Export strTempFile

' Sanitize the VBA code while reading the temp file
With New clsSanitize
With New clsSourceParser
.LoadString ReadFile(strTempFile, GetSystemEncoding)
strContent = .Sanitize(ectVBA)
End With
Expand Down

0 comments on commit c2ffccf

Please sign in to comment.