Architecture/Process Flow
From Apache OpenOffice Wiki
Startup- and Shutdown sequence of OpenOffice.org
- Construct the application object (“the desktop”) (C++ constructor).
- Invoke the “int main(int argc, char **argv)“ function of the executable (“soffice.bin”).
- Initialize VCL.
- Initialize the application object (“the desktop”).
- Bootstrap the initial Uno component context (Unos root object).
- Set the Uno service manger for the process.
- Create the configuration manager.
- Detect the locale and customize the configuration manager.
- Create the OOo to OOo IPC (Inter Process Communication) thread (named pipe communication).
- Activate the runtime error handler.
- Initialize the application object (“the desktop”).
- Invoke the “main” method of “the desktop” object.
- Handle bootstrap errors (show possible bootstrap errors to user and exit application).
- Create and expose the “splash screen”.
- Check for “user” configuration data, if not available, then:
- Create “user” configuration data..
- Check command line arguments for requested UNO acceptors, if requested, then:
- Create Uno acceptors.
- Initialize the UCB.
- Create directory for temporary data.
- Set user interface and application locale.
- Create global broadcaster service for application/document events.
- If “user” configuration data has been newly created, start wizard for license agreement/user data input.
- If no command line arguments have been passed, then:
- Create one instance framework desktop service.
- Create startup module service.
- Create frame and connects startup module to frame.
- If “quickstart” option has been passed on command line, then:
- Create “quickstarter” service, if available. (Note: the “quickstarter” is currently available on Windows only.)
- If to-be-loaded documents have been passed on command line, then:
- Post document-load commands into event loop.
- If to-be-printed documents have been passed on command line, then:
- Post document-print commands into event loop.
- If “headless mode” has been passed on command line, then
- Switch to internal dialogs (file open, printer select, etc.).
- Post IPC thread enable into event loop.
- Enter the global application message loop.
- Dispatch GUI and command messages, e.g.
- document creation / loading / printing,
- Uno acceptor creation / deletion,
- window messages (redraw, move, mouse click, keyboard, etc.).
- Leave loop, if
- “terminate” has been called on “the desktop” object, or
- Menu-bar “File – Exit” or
- keyboard shortcut “CTRL-Q” has been invoked.
- Dispatch GUI and command messages, e.g.
- Close all open documents (asks for allowance for modified documents).
- Block all IPC thread requests.
- Remove the global temporary directory.
- Stop all Uno acceptors
- De-initialize the UCB.
- De-initialize VCL.
- De-initialize “the desktop” object.
- Store all configuration changes.
- Dispose the Uno component context.
- Disable the IPC thread.
- Initialize VCL.
- Destruct “the desktop” object (C++ destructor).