Bug 211978 [Automation][Acceptance]Exception is thrown out when preview report in PDF
Description: Exception is thrown out when preview report in PDF Test Date: 20071205 Test Build: BIRT2.3.0 DailyBuildv20071205 0800 Step to reproduce: 1. Use the report attached 2. Preview it in PDF Expect result: Report should be previewed without any exception Actual result: A StringIndexOUtOfBoundsException is thrown out
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/PDFTextLM.java
return flip(text);
			}
		}
		
		/**
		 * Reverse text
		 * @param text
		 * @return
		 */
	    private String flip(String text) 
	    {
	    	char[] indexChars = text.toCharArray();
	    	int start = 0;
	    	int end = indexChars.length;
	        int mid = (start + end) / 2;
	        --end;
	        for (; start < mid; ++start, --end) 
	        {
	            char temp = indexChars[start];
	            indexChars[start] = indexChars[end];
	            indexChars[end] = temp;
	        }
	        return new String(indexChars);
	    }
		
		private boolean isAtLast(int index)
		{
			return index >= content.getText().length();
		}