Word Toolbars

Document Sample
Word Toolbars Powered By Docstoc
					                                                    Updating the ICE word processor toolbars   1




Updating the ICE word processor toolbars
This document is a guide for making changes to the ICE toolbars and does not explain how
the toolbars work or how to code for OOo & Word. Information about developing OOo
extensions can be found on the extension manager wiki, information about Word Add-Ins is
available at MSDN.




Important files
Filename                                Description
macros/toolbar.txt         *
                                        Main toolbar code for applying ICE styles
macros/publisher.txt*                   Code for toolbar publishing features
macros/stylecreator.txt                 Code for generating ICE styles
macros/Xref.txt                         Code for cross referencing feature
OOo Extension
utils/extensionbuilder.py The extension builder for the OOo ICE toolbar
ice-toolbar.oxt                         The ICE toolbar OOo extension
description.xml                         version, location of ice.update.xml & name are used
ice.update.xml                          Contains the version & download URL for OOo to
                                        update the extension.
Word Add-In
 word/ice-toolbar-                 The ICE toolbar for Word self installer
 installer.dot
*
  VBA code used by both OOo and Word toolbars by using compiler conditions.




OOo ICE toolbar extension
Before starting make sure both the template directory in the trunk and in the downloads area
have been checked out using the same structure as the ICE repository, for example:

ice/trunk/templates/ice (required for dev version)
ice/downloads/latest/templates (required for stable version)



Using the extension builder
The ICE toolbar extension is built using the ICE extension builder, to run the builder:

>> cd ice/trunk/templates/ice
>> python utils/extensionBuilder.py $version $type
2




For help:

>> python utils/extensionBuilder.py --help


Options
version
    Version number of the extension, this is displayed in the OOo extension manager and is
    used by OOo for updating.
    The number to use will depend on the level of changes made. For example, if the current
    version is 1.0.0 a bug fix would make it 1.0.1, a new feature 1.1.0 and a major change
    2.0.0.
type
    The type of release either, 'dev' (default) or stable.
    'dev':
    ●   Toolbar name displayed in the OOo extension manager is “ICE Style Toolbar (dev)”.
    ●   The toolbar is built in ice/trunk/templates/ice/ooo (main development
        area)
    ●   Files modified:
        ooo/ice-toolbar/description.xml
        ooo/ice.update.xml
        ooo/ice-toolbar.oxt
    'stable':
    ●   Toolbar name displayed in the OOo extension manager is “ICE Style Toolbar”.
    ●   The toolbar is built in ice/downloads/latest/templates/ (main area for
        download stable versions)
    ●   Files modified:
        ooo/ice-toolbar/description.xml
        ice/downloads/latest/templates/ice.update.xml
        ice/downloads/latest/templates/ice-toolbar.oxt



Making changes
1. Update the required files:
    >> svn up ice/trunk/templates/ice
    >> svn up ice/downloads/latest/templates
2. Remove the ICE toolbar extension using the OOo extension manager and restart OOo
3. Install the ICE toolbar extension from ice/trunk/templates/ice/ooo/ice-
   toolbar.oxt (Important: This ensures the extension has the latest changes from the
   macro text files i.e. toolbar.txt)
4. Make the changes to the installed extension:
                                                  Updating the ICE word processor toolbars   3




   ●   If the toolbar macros require changes then go to:
       a. Tools > Macros > Oganize Macros > OOo Basic
       b. Select My Macros > IceLibrary > (select module)
       c. Select the macro & make the changes
       d. Test the changes
           Important: Copy the any changes into appropriate text file i.e. changes to
           'toolbar' module need to be copied into
           ice/trunk/templates/ice/macros/toolbar.txt
   ●   If a dialog requires changes then:
       a. Tools > Macros > Ogranize Dialogs
       b. Make the changes
       c. Test the changes
       d. Tools > Macros > Oganize Dialogs & open the dialog
       e. Click export then navigate to ice/trunk/templates/ice/ooo/ice-
          toolbar/IceLibrary and override the existing dialog
5. Rebuild the extension:
   >> cd ice/trunk/templates/ice
   Developers version, run:
       >> python utils/extensionBuilder.py $version dev
   Stable version, run:
       >> python utils/extensionBuilder.py $version stable
   Important: Before building or committing a stable version be sure you have the dev
   version (with the same changes) committed first and that it has been tested by a second
   person.
6. Remove the previous toolbar using the extension manager and restart OOo
7. Install the updated extension and re-test


Release changes
Provided testing has been completed ok SVN commit required files modified in:

ice/trunk/templates/ice
ice/downloads/latest/templates (NB: Only required if the stable version was
built)
4




Updating the ICE Word toolbar

Making changes
1. Update the required files:
    >> svn up ice/trunk/templates/ice
    >> svn up ice/downloads/latest/templates
2. Remove any previously installed ICE Word toolbars
3. Right click on and open trunk/templates/word/ice-toolbar-
   installer.dot
4. Open the Word Visual Basic editor and make the required changes
    Important: If changes are required to the 'toolbar' module remember copy the content
    from toolbar.txt before making changes. The compiler conditions at the top of the
    module will need to be set for Word, for example:
    #Const MSWD = True
    #Const OOO = Not MSWD
5. Save the toolbar
6. Install the modified toolbar & test the changes
7. Repeat steps 2 to 5 until the testing passes
    Important: If changes are made to the 'toolbar' module copy any changes back into
    toolbar.txt, remember to check the compiler conditions are set to OOo, for
    example:
    #Const MSWD = False
    #Const OOO = Not MSWD



Release changes
For changes made to the trunk version SVN commit the modified files in
ice/trunk/templates.

If testing has been completed and the toolbar is ready for release i.e. 'stable', copy the ice-
toolbar from ice/trunk/templates/word into
ice/downloads/latest/templates and commit the changes.

				
DOCUMENT INFO