Bug 214196 [Automation][Compatibility]Exception occurs when preview a old crosstab with measure sorting
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/query/view/CubeQueryDefinitionUtil.java
IEdgeDefinition edgeDefn = queryDefn.getEdge( type );
		Iterator dimIter = edgeDefn.getDimensions( ).iterator( );
		while ( dimIter.hasNext( ) )
		{
			IDimensionDefinition dimDefn = (IDimensionDefinition) dimIter.next( );
			Iterator hierarchyIter = dimDefn.getHierarchy( ).iterator( );
			while ( hierarchyIter.hasNext( ) )
			{
				IHierarchyDefinition hierarchyDefn = (IHierarchyDefinition) hierarchyIter.next( );
				for ( int i = 0; i < hierarchyDefn.getLevels( ).size( ); i++ )
				{
					index++;
					ILevelDefinition levelDefn = (ILevelDefinition) hierarchyDefn.getLevels( )
							.get( i );
					if ( dimDefn.getName( )
							.equals( dimLevel.getDimensionName( ) ) &&
							levelDefn.getName( )
									.equals( dimLevel.getLevelName( ) ) )
					{
						return index;
					}
				}
			}
		}
		return -1;
	}
	
	/**
	 * used for backward capability.
	 *