[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-cvs
Subject:    [ jEdit-commits ] SF.net SVN: jedit:[24501] jEdit/trunk/org/gjt/sp/jedit/print/ BufferPrintable1_7.j
From:       daleanson () users ! sourceforge ! net
Date:       2016-08-16 1:37:30
Message-ID: E1bZTJt-0008CP-Ox () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 24501
          http://sourceforge.net/p/jedit/svn/24501
Author:   daleanson
Date:     2016-08-16 01:37:30 +0000 (Tue, 16 Aug 2016)
Log Message:
-----------
Printing -- adjustments to page calculations.

Modified Paths:
--------------
    jEdit/trunk/org/gjt/sp/jedit/print/BufferPrintable1_7.java

Modified: jEdit/trunk/org/gjt/sp/jedit/print/BufferPrintable1_7.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/print/BufferPrintable1_7.java	2016-08-16 01:16:55 \
                UTC (rev 24500)
+++ jEdit/trunk/org/gjt/sp/jedit/print/BufferPrintable1_7.java	2016-08-16 01:37:30 \
UTC (rev 24501) @@ -273,7 +273,7 @@
 		lm = font.getLineMetrics("gGyYX", frc);
 		float lineHeight = lm.getHeight();
 		boolean printFolds = jEdit.getBooleanProperty("print.folds", true);
-		currentPhysicalLine = 1;
+		currentPhysicalLine = 0;
 		int pageCount = 0;
 		int startLine = 0;
 		double y = 0.0;
@@ -284,7 +284,7 @@
 			if (currentPhysicalLine == buffer.getLineCount())
 			{
 				// last page
-				Range range = new Range(startLine, currentPhysicalLine - 1);
+				Range range = new Range(startLine, currentPhysicalLine);
 				pages.put(new Integer(pageCount), range);
 				Log.log(Log.DEBUG, this, "calculatePages, page " + pageCount + " has " + range);
 				break;
@@ -304,11 +304,11 @@
 			
 			if(y + (lineHeight * (lineList.isEmpty() ? 1 : lineList.size())) > pageHeight)
 			{
-				Range range = new Range(startLine, currentPhysicalLine - 1);
+				Range range = new Range(startLine, -- currentPhysicalLine);
 				pages.put(new Integer(pageCount), range);
 				Log.log(Log.DEBUG, this, "calculatePages, page " + pageCount + " has " + range);
 				++ pageCount;
-				//++ currentPhysicalLine;
+				++ currentPhysicalLine;
 				startLine = currentPhysicalLine;
 				y = 0.0;
 				continue;

This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
jEdit-CVS mailing list
jEdit-CVS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic