Bug 180089 BIRT model - TOC predefined styles
In ROM we need to support predefined styles for TOC too. This will allow user to easily create a TOC style, by creating one of two styles. Suggestion i have is - TOC ( Applies to all TOC nodes ) - TOC-level1 ( If defined applies to first level toc nodes ) - TOC-level2 ........... - TOC-level5
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ModuleHandle.java
{
		replaceObjectInList( IMAGES_PROP, oldVar, newVar );
	}
	/**
	 * Replaces an old object in the structure list with the given new one.
	 * 
	 * @param propName
	 *            the name of the property that holds a structure list
	 * @param oldVar
	 *            an existed object in the list
	 * @param newVar
	 *            a new object
	 * @throws SemanticException
	 *             if the old object is not found or the name of new one is
	 *             empty.
	 */
	private void replaceObjectInList( String propName, Object oldVar,
			Object newVar ) throws SemanticException
	{
		ElementPropertyDefn propDefn = module.getPropertyDefn( propName );
		ComplexPropertyCommand cmd = new ComplexPropertyCommand( module,
				getElement( ) );
		cmd.replaceItem( new CachedMemberRef( propDefn ), (Structure) oldVar,
				(Structure) newVar );
	}
	/**
	 * Saves the module to an existing file name. Call this only when the file
	 * name has been set.
	 * 
	 * @throws IOException