Starting into Replace...
On the surface, Replace is just Find + changing the selected text, but of course it's not that simple; the change puts the textbox data out of sync with the back-end document, so there needs to be a save before the next operation is invoked.
This actually applies to some extent with Find alone; if there's dirty data, I guess changes might be lost with the right combination of actions. I think it makes sense, therefore, to check for dirty data before every Find or Replace operation; or perhaps to save a Replace change back to the document automatically. If the latter, we risk confusion, as the user may assume that, since they haven't pressed OK in the edit box, the data isn't saved. If the former, then we risk annoying the user with popups. One final option is that, if an item is already visible, we search in the live text of that item (ie the text in the GUI) rather than the back-end document. This would be the most intuitive approach from the user's point of view, but perhaps the most programmatically fragile because of the need to search and display hits in two distinct ways, depending on whether an item is live in the GUI or not.
This needs some careful thought.