Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitting VS Project #32

Open
BaronBodissey opened this issue Jun 29, 2017 · 4 comments
Open

Splitting VS Project #32

BaronBodissey opened this issue Jun 29, 2017 · 4 comments

Comments

@BaronBodissey
Copy link

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

@chelh chelh self-assigned this Jun 29, 2017
@chelh
Copy link
Owner

chelh commented Jun 29, 2017

I'll consider it, but it may take quite a lot of time to get everything up to “library-grade” standards!

@BaronBodissey
Copy link
Author

BaronBodissey commented Jun 30, 2017

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

`

@BaronBodissey
Copy link
Author

But indeed doing that I noticed some bugs/limitations:

  • PictureAlignment = PropMask.HasPictureAlignment ? r.ReadPictureAlignment() : PictureAlignment.TopLeft;
    the specification define default as The 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

@chelh
Copy link
Owner

chelh commented Jul 9, 2017

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.

@chelh chelh removed their assignment Jul 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants