Architecture/Process Flow

From Apache OpenOffice Wiki
Jump to: navigation, search

Startup- and Shutdown sequence of

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