shdocvw: Separate document state from control state.