Skip to content

Commit

Permalink
Merge branch 'master' of ssh://git@git/gitroot/birt/org.eclipse.birt
Browse files Browse the repository at this point in the history
  • Loading branch information
greatyan committed Jan 22, 2014
2 parents c5d3fe1 + 91c9499 commit 32f060b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
Expand Up @@ -100,7 +100,11 @@ private boolean testRun( LibraryHandle library )
commandStack.startTrans( "" );
try
{
UIUtil.includeLibrary( library );
// we set the flag "isDefault" to true here to mimic the behavior
// that the namespace cannot be changed, so renaming UI will not be
// triggered during this testing mode.
UIUtil.includeLibrary( SessionHandleAdapter.getInstance( )
.getReportDesignHandle( ), library, true );
enabled = true;
}
catch ( Exception e )
Expand Down
Expand Up @@ -1358,6 +1358,13 @@ else if ( libraryPath.startsWith( "bundleresource" ) ) //$NON-NLS-1$
return false;
}

public static boolean includeLibrary( ModuleHandle moduleHandle,
LibraryHandle libraryHandle ) throws DesignFileException,
SemanticException
{
return includeLibrary( moduleHandle, libraryHandle, false );
}

/**
* Includes the library into within the given module.
*
Expand All @@ -1369,13 +1376,13 @@ else if ( libraryPath.startsWith( "bundleresource" ) ) //$NON-NLS-1$
* failed.
*/
public static boolean includeLibrary( ModuleHandle moduleHandle,
LibraryHandle libraryHandle ) throws DesignFileException,
LibraryHandle libraryHandle, boolean isDefault ) throws DesignFileException,
SemanticException
{
if ( moduleHandle != libraryHandle
&& !moduleHandle.isInclude( libraryHandle ) )
{
return includeLibrary( moduleHandle, libraryHandle.getFileName( ) );
return includeLibrary( moduleHandle, libraryHandle.getFileName( ), isDefault );
}
return true;
}
Expand Down
Expand Up @@ -531,8 +531,6 @@ private void generateRuntimeSeries( ChartWithoutAxes cwoa,
// POPULATE THE BASE RUNTIME SERIES
EList<SeriesDefinition> elSD = cwoa.getSeriesDefinitions( );
final SeriesDefinition sdBase = elSD.get( 0 );
final SortOption baseSorting = sdBase.isSetSorting( )
? sdBase.getSorting( ) : null;
final Series seBaseDesignSeries = sdBase.getDesignTimeSeries( );
final Series seBaseRuntimeSeries = seBaseDesignSeries.copyInstance( );

Expand Down Expand Up @@ -615,8 +613,10 @@ private void generateRuntimeSeries( ChartWithoutAxes cwoa,
else
{
// compute all base values.
// Do not sort category in chart engine, since
// the sorting has been applied in data engine layer.
Object[] oa = rsw.getMergedGroupingBaseValues( iBaseColumnIndex,
baseSorting, true ); // Chart without axis has no category axis, keep as before.
null, true ); // Chart without axis has no category axis, keep as before.

List baseValues = (List) oa[0];
List idxList = (List) oa[1];
Expand Down Expand Up @@ -747,8 +747,6 @@ private void generateRuntimeSeries( ChartWithAxes cwa, ResultSetWrapper rsw )
final Axis axPrimaryBase = cwa.getPrimaryBaseAxes( )[0];
EList<SeriesDefinition> elSD = axPrimaryBase.getSeriesDefinitions( );
final SeriesDefinition sdBase = elSD.get( 0 );
final SortOption baseSorting = sdBase.isSetSorting( )
? sdBase.getSorting( ) : null;
final Series seBaseDesignSeries = sdBase.getDesignTimeSeries( );
final Series seBaseRuntimeSeries = seBaseDesignSeries.copyInstance( );

Expand Down Expand Up @@ -846,8 +844,10 @@ private void generateRuntimeSeries( ChartWithAxes cwa, ResultSetWrapper rsw )
else
{
// compute all base values.
// Do not sort category in chart engine, since
// the sorting has been applied in data engine layer.
Object[] oa = rsw.getMergedGroupingBaseValues( iBaseColumnIndex,
baseSorting,
null,
cwa.getAxes( ).get( 0 ).isCategoryAxis( )
|| !cwa.getAxes( ).get( 0 ).isSetCategoryAxis( )
|| cwa.getAxes( ).get( 0 ).getType( ) == AxisType.TEXT_LITERAL );
Expand Down

0 comments on commit 32f060b

Please sign in to comment.