Splitting VS Project
I also would suggest that you split VBASync project. I envision a splitting in 3:
- One library to read vba project, with reader and vba project's object model
- Another library with the vba project diff
- And finally the VBASync itself
And as the libraries could be uses not only in VBASync, we also could imagine creating another repo...
Best regards.
BB
I'll consider it, but it may take quite a lot of time to get everything up to “library-grade” standards!
Hey,
That's not so big a job. For example I just try to use the code. So I referenced VBASync.Exe, replaced internals with publics and that's it: ` Dim frxBytes1 As Byte() = File.ReadAllBytes(".\Designations.frx") Using frxCfStream1 As New MemoryStream(frxBytes1, 24, frxBytes1.Length - 24, False) Using cf1 As New CompoundFile(frxCfStream1) Dim cfstream As CFStream = cf1.RootStorage.GetStream("f")
Dim designationsFrx As New Model.FrxObjects.FormControl(cfstream.GetData())
End Using
End Using
`
But indeed doing that I noticed some bugs/limitations:
-
PictureAlignment = PropMask.HasPictureAlignment ? r.ReadPictureAlignment() : PictureAlignment.TopLeft;the specification define default asThe file format default is 0x02, fmPictureAlignmentCenter. -
Zoom = PropMask.HasZoom ? r.ReadUInt32() : 0;MUST be greater than or equal to 10 (10 percent of actual size) and less than or equal to 400 (four times or 400 percent of actual size). The file format default is 100, or actual size.
Or Maybe you could use nullable/null/nothing/none (whatever form indicating not set/defined)...nope default would be better has we have the HasZoom flag
Yes, in the larger context the issue is that I didn’t write this to completely decompose the FRX data; I only read enough of it to compare two FRX files. Like on FormControl there’s a certain point where I just stop parsing because the rest of the stream can be handled byte-by-byte.
Also, be careful using any of my emitted members, even public ones, as the code is going to be overhauled when I try to change to UI to WinForms, and again when the library version of the parsing code, OpenMSOVBA, is done.