billroper: (Default)
[personal profile] billroper
I have now gained substantial traction on the project that I'm working on. This gives me hope that I can actually see it running again some time soon.

You know how it goes -- you rip things up, move them around, and until they're all back together, nothing will compile and link. :)

One of the cute things I found:

If you have an embedded object in your compound document file and have a built-in mechanism for disabling its action -- say, for instance, if it's a hot link to another external document that you've added a flag to that says "Don't Use Me!" -- then you can override the IsBlank() function in the base class. If the object says "Don't Use Me", tell IsBlank() to return TRUE, else FALSE.

When you serialize the container document, it counts all of the non-blank items and serializes those, but doesn't serialize any of the blank items. This means that you don't have to clean up the deactivated items when you deactivate them, because your serialization code will do it for you.

This also means that you don't have to recreate the objects during an "Undo" process. All you have to do is unset the "Don't Use Me" flag that you added to the object and it'll pop back up for you, since you didn't delete the item on the fly, but were able to rely on the serialization code to do it for you.

All this would be more useful if there were more people still using compound documents, I suppose...

Date: 2008-12-12 12:17 pm (UTC)
From: [identity profile] kizoku42.livejournal.com
Amazing. I'm pretty sure I actually understood that.

Profile

billroper: (Default)
billroper

January 2026

S M T W T F S
     1 2 3
4 5 6 7 8910
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 3031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 31st, 2026 06:21 am
Powered by Dreamwidth Studios