Office modules since OpenOffice.org 2.3

From Apache OpenOffice Wiki
Revision as of 18:26, 13 November 2007 by Arielch (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Since OpenOffice.org 2.3 the context for UI configuration has grown up to 20 modules. This was mainly due to the new feature that allows OpenOffice.org Base to have separated UI configuration modules for database forms and database reports, so that the settings are not shared with text documents anymore.

The following is an up-to-date list of available modules (in brackets is a short description):

  1. com.sun.star.text.TextDocument [OpenOffice.org Writer]
  2. com.sun.star.text.WebDocument [OpenOffice.org Writer/Web]
  3. com.sun.star.text.GlobalDocument [OpenOffice.org Writer/Master Document]
  4. com.sun.star.sheet.SpreadsheetDocument [OpenOffice.org Calc]
  5. com.sun.star.presentation.PresentationDocument [OpenOffice.org Impress]
  6. com.sun.star.drawing.DrawingDocument [OpenOffice.org Draw]
  7. com.sun.star.formula.FormulaProperties [OpenOffice.org Math]
  8. com.sun.star.chart2.ChartDocument [OpenOffice.org Chart]
  9. com.sun.star.xforms.XMLFormDocument [XML Forms (XForms)]
  10. com.sun.star.sdb.OfficeDatabaseDocument [OpenOffice.org Base: This module represents OpenOffice.org Base main application; that is, the application main window when you open an ODB file.]
  11. com.sun.star.sdb.TableDesign [OpenOffice.org Base: Table Design module]
  12. com.sun.star.sdb.QueryDesign [OpenOffice.org Base: This is the module where you design queries and views. The module is the same for Design View and SQL View.]
  13. com.sun.star.sdb.RelationDesign [OpenOffice.org Base: Module to design database relations]
  14. com.sun.star.sdb.FormDesign [OpenOffice.org Base: Module for creating/editing and viewing embedded forms]
  15. com.sun.star.report.ReportDefinition [OpenOffice.org Base: new Sun Report Builder in design view. The executed report will be a com.sun.star.text.TextDocument or com.sun.star.sheet.SpreadsheetDocument]
  16. com.sun.star.sdb.TextReportDesign [OpenOffice.org Base: Module for creating/editing and viewing reports created using the report wizzard]
  17. com.sun.star.sdb.DataSourceBrowser [In OpenOfice.org Base: the component where you open tables/view/queries; in other modules: component to access every datasource registered in OpenOffice.org (pressing F4)]
  18. com.sun.star.script.BasicIDE [OpenOffice.org Basic IDE]
  19. com.sun.star.frame.StartModule [the start module is the last component that remains when you close every Office document with the X at the right corner of the menu bar, without termitating the Desktop]
  20. com.sun.star.frame.Bibliography [Bibliographical database]

How to get the module's names

You can get a list of modules by querying the service com.sun.star.frame.ModuleManager.

Example in Java:

    public static void main(String[] args) {
        try {
            com.sun.star.uno.XComponentContext xContext = 
                    com.sun.star.comp.helper.Bootstrap.bootstrap();
            
            com.sun.star.uno.XInterface xInterface = 
                    (com.sun.star.uno.XInterface) 
                        xContext.getServiceManager().createInstanceWithContext(
                            "com.sun.star.frame.ModuleManager", xContext);
            
            com.sun.star.container.XNameAccess xNameAccess = 
                    (com.sun.star.container.XNameAccess) 
                        com.sun.star.uno.UnoRuntime.queryInterface(
                            com.sun.star.container.XNameAccess.class, xInterface);
            
            String[] modules = xNameAccess.getElementNames();
            for (String module : modules) {
                System.out.println( module );
            }
            
        } catch (com.sun.star.comp.helper.BootstrapException e){
            e.printStackTrace();
        } catch (com.sun.star.uno.Exception e){
            e.printStackTrace();
        } catch (java.lang.Exception e){
            e.printStackTrace();
        } finally {
            System.exit( 0 );
        }
    }

Example in OpenOffice.org Basic

Sub OOoModules
   Dim oModuleManager as Object
   oModuleManager = createUnoService("com.sun.star.frame.ModuleManager")
   MsgBox Join(oModuleManager.getElementNames(), chr(10)),64, "OpenOffice.org Modules"
End Sub
Personal tools