Difference between revisions of "Architecture/Process Flow"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Startup- and Shutdown sequence of OpenOffice.org)
 
(Now indented.)
Line 1: Line 1:
 
==Startup- and Shutdown sequence of OpenOffice.org==
 
==Startup- and Shutdown sequence of OpenOffice.org==
# Construction of the global application object
+
# Construct the application object (“the desktop”) (C++ constructor).
# main() method of the executable
+
# Invoke the “int main(int argc, char **argv)“ function of the executable (“soffice.bin”).
# Initialization of the VCL library
+
## Initialize VCL.
# Initialization of the application object
+
### Initialize the application object (“the desktop”).
# Bootstrap initial [[Uno|UNO]] component context
+
#### Bootstrap the initial UNO component context (UNOs root object).
# Sets global process service factory
+
#### Set the UNO service manger for the process.
# Creates Office configuration service
+
#### Create the configuration manager.
# Determines the current Office language and initialize language settings for Office configuration service.  
+
#### Detect the locale and customize the configuration manager.
# Creates IPC thread and named pipe for office-office communication
+
#### Create the OOo to OOo IPC (Inter Process Communication) thread (named pipe communication).
# Sets exception handler
+
#### Activate the runtime error handler.
# Calls Main() method on application object
+
## Invoke the “main” method of “the desktop” object.
# Handles bootstrap errors (show possible bootstrap errors to user and exit application)
+
### Handle bootstrap errors (show possible bootstrap errors to user and exit application).
# Creates and show splash screen
+
### Create and expose the “splash screen”.
# Creates user configuration data on first startup
+
### Check for “user” configuration data, if not available, then:
# Checks command line arguments and creates possible UNO acceptors
+
#### Create “user” configuration data..
# Initialization of the UCB
+
### Check command line arguments for requested UNO acceptors, if requested, then:
# Creates global temporary directory for Office
+
#### Create UNO acceptors.
# Sets user interface and application locale
+
### Initialize the UCB.
# Creates global broadcaster service for application/document events
+
### Create directory for temporary data.
# Starts first start wizard for possible license agreement/user data input
+
### Set user interface and application locale.
# If no command line arguments
+
### Create global broadcaster service for application/document events.
## Creates one instance framework desktop service
+
### If “user” configuration data has been newly created, start wizard for license agreement/user data input.
## Creates startup module service
+
### If no command line arguments have been passed, then:
## Creates frame and connects startup module to frame.
+
#### Create one instance framework desktop service.
# Checks command line arguments and creates possible quickstart service
+
#### Create startup module service.
# Checks command line arguments for headless mode and if positive activates internal dialogs
+
#### Create frame and connects startup module to frame.
# Starts the global application message loop
+
### If “quickstart” option has been passed on command line, then:
# Asynchronous (default) document creation/loading.  
+
#### Create “quickstarter” service, if available. (Note: the “quickstarter” is currently available on Windows only.)
## Analyzes the command line arguments and determines a possible default document type.  
+
### If to-be-loaded documents have been passed on command line, then:
## Loads/prints documents provided by command line
+
#### Post document-load commands into event loop.
## Shows the document window(s)
+
### If to-be-printed documents have been passed on command line, then:
## Enables the IPC thread to receive data from the named pipe.
+
#### Post document-print commands into event loop.
# Asynchronous enabling of the UNO acceptors
+
### If “headless mode” has been passed on command line, then
# Office shutdown triggered by: Terminate call on the com.sun.star.frame.XDesktop interface or Menubar “File – Exit” or  keyboard shortcut “CTRL-Q”
+
#### Switch to internal dialogs (file open, printer select, etc.).
# Closes all open documents (asks for allowance for modified documents)
+
### Post IPC thread enable into event loop.
# IPC thread blocks all requests from other Offices
+
### Enter the global application message loop.
# Removes the global temporary directory
+
#### Dispatch GUI and command messages, e.g.
# Stops all UNO acceptors
+
##### document creation / loading / printing,
# De-initializes UCB
+
##### UNO acceptor creation / deletion,
# De-initializes VCL library
+
##### window messages (redraw, move, mouse click, keyboard, etc.).
# De-initializes global application object
+
#### Leave loop, if
# Stores all Office configuration changes
+
##### “terminate” has been called on “the desktop” object, or
# Disposes default UNO component context
+
##### Menu-bar “File – Exit” or   
# Disables IPC thread for office-office communication
+
##### keyboard shortcut “CTRL-Q” has been invoked.
# Leaves main() method
+
### Close all open documents (asks for allowance for modified documents).
# Destroys global application object
+
### 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.
 +
# Destruct “the desktop” object (C++  destructor).
 +
 
  
 
[[Category:Architecture]]
 
[[Category:Architecture]]

Revision as of 11:41, 25 July 2006

Startup- and Shutdown sequence of OpenOffice.org

  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