|
From: <doc...@us...> - 2008-12-11 01:14:43
|
Revision: 225
http://openpcl.svn.sourceforge.net/openpcl/?rev=225&view=rev
Author: documentsystems
Date: 2008-12-11 01:14:38 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
Fixed code to handle binary data which may exist in pcl macros. While a macro is recording, charData should not be processed. Also, when a Macro is started, all pcl commands can be ignored until a Stop Macro is issued.
Modified Paths:
--------------
openpcl/src/com/openpcl/pclrenderimage/PclRenderImage.java
Modified: openpcl/src/com/openpcl/pclrenderimage/PclRenderImage.java
===================================================================
--- openpcl/src/com/openpcl/pclrenderimage/PclRenderImage.java 2008-12-08 23:28:34 UTC (rev 224)
+++ openpcl/src/com/openpcl/pclrenderimage/PclRenderImage.java 2008-12-11 01:14:38 UTC (rev 225)
@@ -220,6 +220,9 @@
}
public void charFoundEvent(char nextChar, int pBufferPos) {
+ // Skip bytes when the start macro command has been encountered and didn't get stop macro yet
+ if (mIsRecordingAMacro) { return; } //jfg added 12.10.2008 in case there is a binary FF in the recorded macro
+
if (nextChar == scFF) { // form feed
mPriDrawText.drawBufferedUpCharsAs1String();
handleFormFeedFound(pBufferPos);
@@ -502,13 +505,11 @@
break;
case 'X':
switch (cmdValueInt) {
- case 0: // &f0X
- if (mIsStateBuildingPclPages) { return; }
+ case 0: // &f0X jfg 12.10.2008 removed --> if (mIsStateBuildingPclPages) { return; }
mIsRecordingAMacro = true;
mPriParseMacroBytes.startMacroDefinition(pBufferPos);
break;
- case 1: // &f1X
- if (mIsStateBuildingPclPages) { return; }
+ case 1: // &f1X jfg 12.10.2008 removed --> if (mIsStateBuildingPclPages) { return; }
mPriParseMacroBytes.stopMacroDefinition(pBufferPos, mCurrentClickedPagePclBytes);
mIsRecordingAMacro = false;
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|