Skip to content

Commit

Permalink
changing scope to protected to extend htmlemitter
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravi Kiran Rimmanapudi committed Jan 28, 2020
1 parent 251c1ac commit 77ff9dc
Showing 1 changed file with 35 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@

package org.eclipse.birt.report.engine.emitter.html;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
Expand Down Expand Up @@ -304,14 +309,14 @@ public class HTMLReportEmitter extends ContentEmitterAdapter

protected IDGenerator idGenerator = new IDGenerator( );

private String layoutPreference;
private boolean fixedReport = false;
private boolean enableAgentStyleEngine;
private boolean outputMasterPageMargins;
private IMetadataFilter metadataFilter = null;
protected String layoutPreference;
protected boolean fixedReport = false;
protected boolean enableAgentStyleEngine;
protected boolean outputMasterPageMargins;
protected IMetadataFilter metadataFilter = null;

private boolean needOutputBackgroundSize = false;
private boolean enableInlineStyle = false;
protected boolean needOutputBackgroundSize = false;
protected boolean enableInlineStyle = false;

/**
* Following names will be name spaced by htmlIDNamespace: a.CSS style name.
Expand All @@ -332,10 +337,10 @@ public class HTMLReportEmitter extends ContentEmitterAdapter
/**
* This set is used to store the style class which has been outputted.
*/
private Set outputtedStyles = new HashSet();
protected Set outputtedStyles = new HashSet();

protected boolean needFixTransparentPNG = false;
private ITableContent cachedStartTable = null;
protected ITableContent cachedStartTable = null;

protected TableLayout tableLayout = new TableLayout( this );

Expand Down Expand Up @@ -576,13 +581,13 @@ protected void fixRedirect( )
writer.writeCode( "</script>" ); //$NON-NLS-1$
}

private void loadBirtJs( String birtJsUrl )
protected void loadBirtJs( String birtJsUrl )
{
writer.writeCode( "<script type=\"text/javascript\" src=\""+birtJsUrl+"\" >" );
writer.writeCode( "</script>" ); //$NON-NLS-1$
}

private void outputBirtJs()
protected void outputBirtJs()
{
writer.writeCode( "<script type=\"text/javascript\">" );
writer.writeCode( " //<![CDATA[" ); //$NON-NLS-1$
Expand Down Expand Up @@ -610,7 +615,7 @@ private void outputBirtJs()
writer.writeCode( "</script>" ); //$NON-NLS-1$
}

private void doClientInitialize(String javaScriptLibraries)
protected void doClientInitialize(String javaScriptLibraries)
{
writer.writeCode( "<script type=\"text/javascript\">" ); //$NON-NLS-1$
writer.writeCode( " //<![CDATA[" ); //$NON-NLS-1$
Expand Down Expand Up @@ -872,7 +877,7 @@ protected String getContentType( )
return "text/html; charset=utf-8";
}

private void outputClientScript( IReportContent report )
protected void outputClientScript( IReportContent report )
{
if ( report != null )
{
Expand Down Expand Up @@ -1228,7 +1233,7 @@ private boolean isSameUnit( String unit1, String unit2 )
return false;
}

private DimensionType getPageWidth( IPageContent page )
protected DimensionType getPageWidth( IPageContent page )
{
DimensionType pageWidth = page.getPageWidth( );
if ( !outputMasterPageMargins )
Expand All @@ -1241,7 +1246,7 @@ private DimensionType getPageWidth( IPageContent page )

}

private DimensionType getPageHeight( IPageContent page )
protected DimensionType getPageHeight( IPageContent page )
{
DimensionType pageHeight = page.getPageHeight( );
if ( !outputMasterPageMargins )
Expand Down Expand Up @@ -1306,7 +1311,7 @@ private DimensionType removeMargin( DimensionType pageWidth,
return pageWidth;
}

private void outputColumn( DimensionType dm )
protected void outputColumn( DimensionType dm )
{
writer.openTag( HTMLTags.TAG_COL );

Expand All @@ -1325,7 +1330,7 @@ private void outputColumn( DimensionType dm )
writer.closeTag( HTMLTags.TAG_COL );
}

private void outputVMargin( DimensionType margin )
protected void outputVMargin( DimensionType margin )
{
// If margin isn't null, output a row to implement it.
if ( null != margin )
Expand All @@ -1343,7 +1348,7 @@ private void outputVMargin( DimensionType margin )
}
}

private void outputHMargin( DimensionType margin )
protected void outputHMargin( DimensionType margin )
{
writer.openTag( HTMLTags.TAG_TD );
if ( null != margin )
Expand All @@ -1359,7 +1364,7 @@ private void outputHMargin( DimensionType margin )
writer.closeTag( HTMLTags.TAG_TD );
}

boolean showPageHeader( IPageContent page )
protected boolean showPageHeader( IPageContent page )
{
boolean showHeader = true;
Object genBy = page.getGenerateBy( );
Expand All @@ -1377,7 +1382,7 @@ boolean showPageHeader( IPageContent page )
return showHeader;
}

boolean showPageFooter( IPageContent page )
protected boolean showPageFooter( IPageContent page )
{
boolean showFooter = true;
Object genBy = page.getGenerateBy( );
Expand All @@ -1401,7 +1406,7 @@ boolean showPageFooter( IPageContent page )
return showFooter;
}

private void outputPageBand( IPageContent page, IContent band,
protected void outputPageBand( IPageContent page, IContent band,
DimensionType height ) throws BirtException
{
writer.openTag( HTMLTags.TAG_TD );
Expand Down Expand Up @@ -1713,7 +1718,7 @@ private void startBackgroundContainer( IStyle style,
writer.attribute( HTMLTags.ATTR_STYLE, sb.toString( ) );
}

private String parseBackgroundSize( String backgroundHeight,
protected String parseBackgroundSize( String backgroundHeight,
DimensionType pageHeight )
{
if ( backgroundHeight == null )
Expand All @@ -1737,7 +1742,7 @@ private String parseBackgroundSize( String backgroundHeight,
return backgroundHeight;
}

private void endBackgroundContainer( )
protected void endBackgroundContainer( )
{
writer.closeTag( HTMLTags.TAG_DIV );
}
Expand Down Expand Up @@ -2188,7 +2193,7 @@ public void endRow( IRowContent row )
}
}

private boolean isCellInHead( ICellContent cell )
protected boolean isCellInHead( ICellContent cell )
{
IElement row = cell.getParent( );
if ( row instanceof IRowContent )
Expand Down Expand Up @@ -2345,7 +2350,7 @@ else if ( cell.hasDiagonalLine( ) )
}
}

private boolean useFixedCellHeight( ICellContent cell )
protected boolean useFixedCellHeight( ICellContent cell )
{
// fixed cell height requires the rowspan to be 1.
if ( cell.getRowSpan( ) > 1 )
Expand Down Expand Up @@ -3554,7 +3559,7 @@ protected boolean handleAction( IHyperlinkAction action )
* @param url
* @return
*/
private boolean handleAction( IHyperlinkAction action, String url )
protected boolean handleAction( IHyperlinkAction action, String url )
{
if ( url != null )
{
Expand Down Expand Up @@ -3584,7 +3589,7 @@ protected void outputAction( IHyperlinkAction action, String url )
* the hyperlink action
* @return
*/
private String validate( IHyperlinkAction action )
protected String validate( IHyperlinkAction action )
{
if ( action == null )
{
Expand Down Expand Up @@ -3820,7 +3825,7 @@ public void startTableGroup( ITableGroupContent group )
startedGroups.push( group );
}

private void outputBookmark( IGroupContent group )
protected void outputBookmark( IGroupContent group )
{
String bookmark = group.getBookmark( );
if ( bookmark == null )
Expand All @@ -3833,7 +3838,7 @@ private void outputBookmark( IGroupContent group )
writer.closeTag( HTMLTags.TAG_SPAN );
}

private void writeBidiFlag( )
protected void writeBidiFlag( )
{
// bidi_hcg start
// RTL attribute is required at HTML or BODY level for the correct
Expand All @@ -3852,7 +3857,7 @@ private void writeBidiFlag( )
* @param htmlOption
* @author bidi_hcg
*/
private void retrieveRtLFlag( )
protected void retrieveRtLFlag( )
{
// If htmlOption has RTL_FLAG option set (likely adopted from an URL
// parameter), honor this option, otherwise obtain direction from
Expand Down

0 comments on commit 77ff9dc

Please sign in to comment.