Browse Source

Merge pull request #305 in CORE/base-third from bugfix/10.0 to release/10.0

* commit '554ce6f2c319c7420f802f43db86573b1f78ad5f':
  无 jira 任务, 处理分支信息。
  无 jira 任务,release 合并 final , 解决冲突
  REPORT-23453 html切割时,丢失<br> 标签
  无JIRA任务 打包
  代码质量
  无JIRA任务 inux下缺失了系统供应商信息的文件会导致栈溢出
  无 jira 任务,BUGFIX 恢复分支信息
release/10.0
Harrison 5 years ago
parent
commit
68805fd280
  1. 4
      build.third_step0.gradle
  2. 3
      build.third_step1.gradle
  3. 3
      build.third_step2.gradle
  4. 3
      build.third_step3.gradle
  5. 3
      build.third_step4.gradle
  6. 3
      build.third_step5.gradle
  7. 3
      build.third_step6.gradle
  8. 19
      fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfChunk.java
  9. 8
      fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfLine.java
  10. 4
      fine-j2v8/src/com/eclipsesource/v8/PlatformDetector.java

4
build.third_step0.gradle

@ -43,8 +43,10 @@ def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.s
def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1)
def srcDir="." def srcDir="."
def MVN_BRANCH = branchVariable.toUpperCase()
// @branch - // @branch -
def maven_version="${version}-RELEASE-SNAPSHOT" def maven_version="${version}-${MVN_BRANCH}-SNAPSHOT"
def jar_version = version def jar_version = version
configurations { configurations {

3
build.third_step1.gradle

@ -58,6 +58,7 @@ repositories{
FileTree files =fileTree(dir:'./',include:'build.*.gradle') FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator))
def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1)
def MVN_BRANCH = branchVariable.toUpperCase()
// //
dependencies{ dependencies{
@ -65,7 +66,7 @@ dependencies{
compile fileTree(dir:"${srcDir}/fine-quartz/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-quartz/lib",include:'**/*.jar')
compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar')
// @branch - // @branch -
compile "com.fr.third:fine-third:10.0-RELEASE-SNAPSHOT" compile "com.fr.third:fine-third:10.0-${MVN_BRANCH}-SNAPSHOT"
compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar')
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }

3
build.third_step2.gradle

@ -46,6 +46,7 @@ repositories{
FileTree files =fileTree(dir:'./',include:'build.*.gradle') FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator))
def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1)
def MVN_BRANCH = branchVariable.toUpperCase()
// //
dependencies{ dependencies{
@ -55,7 +56,7 @@ dependencies{
compile fileTree(dir:"${srcDir}/fine-antlr4/lib",include: '**/*.jar') compile fileTree(dir:"${srcDir}/fine-antlr4/lib",include: '**/*.jar')
compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar')
// @branch - // @branch -
compile "com.fr.third:fine-third:10.0-RELEASE-SNAPSHOT" compile "com.fr.third:fine-third:10.0-${MVN_BRANCH}-SNAPSHOT"
compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar')
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }

3
build.third_step3.gradle

@ -45,13 +45,14 @@ repositories{
FileTree files =fileTree(dir:'./',include:'build.*.gradle') FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator))
def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1)
def MVN_BRANCH = branchVariable.toUpperCase()
// //
dependencies{ dependencies{
compile fileTree(dir:"${srcDir}/fine-jboss-logging/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-jboss-logging/lib",include:'**/*.jar')
compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar')
// @branch - // @branch -
compile "com.fr.third:fine-third:10.0-RELEASE-SNAPSHOT" compile "com.fr.third:fine-third:10.0-${MVN_BRANCH}-SNAPSHOT"
compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar')
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }

3
build.third_step4.gradle

@ -44,13 +44,14 @@ repositories{
FileTree files =fileTree(dir:'./',include:'build.*.gradle') FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator))
def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1)
def MVN_BRANCH = branchVariable.toUpperCase()
// //
dependencies{ dependencies{
compile fileTree(dir:"${srcDir}/fine-hibernate/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-hibernate/lib",include:'**/*.jar')
compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar')
// @branch - // @branch -
compile "com.fr.third:fine-third:10.0-RELEASE-SNAPSHOT" compile "com.fr.third:fine-third:10.0-${MVN_BRANCH}-SNAPSHOT"
compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar')
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }

3
build.third_step5.gradle

@ -42,6 +42,7 @@ repositories{
FileTree files =fileTree(dir:'./',include:'build.*.gradle') FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator))
def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1)
def MVN_BRANCH = branchVariable.toUpperCase()
// //
dependencies{ dependencies{
@ -49,7 +50,7 @@ dependencies{
compile fileTree(dir:"${srcDir}/fine-druid/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-druid/lib",include:'**/*.jar')
compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar')
// @branch - // @branch -
compile "com.fr.third:fine-third:10.0-RELEASE-SNAPSHOT" compile "com.fr.third:fine-third:10.0-${MVN_BRANCH}-SNAPSHOT"
compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar')
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }

3
build.third_step6.gradle

@ -68,6 +68,7 @@ repositories{
FileTree files =fileTree(dir:'./',include:'build*.gradle') FileTree files =fileTree(dir:'./',include:'build*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator)) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf (java.io.File.separator))
def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1) def branchName=buildDir.substring(buildDir.lastIndexOf (java.io.File.separator)+1)
def MVN_BRANCH = branchVariable.toUpperCase()
// //
dependencies{ dependencies{
@ -83,7 +84,7 @@ dependencies{
compile fileTree(dir:"${srcDir}/fine-jgit/lib",include:'**/*.jar') compile fileTree(dir:"${srcDir}/fine-jgit/lib",include:'**/*.jar')
compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar') compile fileTree(dir:"${srcDir}/build/libs/",include:'**/*.jar')
// @branch - // @branch -
compile "com.fr.third:fine-third:10.0-RELEASE-SNAPSHOT" compile "com.fr.third:fine-third:10.0-${MVN_BRANCH}-SNAPSHOT"
compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar') compile fileTree(dir:"../../finereport-lib-other/${branchName}",include:'**/*.jar')
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
} }

19
fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfChunk.java

@ -88,6 +88,12 @@ public class PdfChunk {
private static final float FONT_SCALE = 100f; private static final float FONT_SCALE = 100f;
private static final String BREAK = "\n";
private static final String BREAK_TAG = "<br>";
private boolean breakTag = false;
public float getHeight() { public float getHeight() {
return height; return height;
} }
@ -200,6 +206,7 @@ public class PdfChunk {
PdfChunk(String string, PdfChunk other) { PdfChunk(String string, PdfChunk other) {
thisChunk[0] = this; thisChunk[0] = this;
value = string; value = string;
updateBreakTag();
this.font = other.font; this.font = other.font;
this.attributes = other.attributes; this.attributes = other.attributes;
this.noStroke = other.noStroke; this.noStroke = other.noStroke;
@ -228,7 +235,7 @@ public class PdfChunk {
public PdfChunk(Chunk chunk, PdfAction action) { public PdfChunk(Chunk chunk, PdfAction action) {
thisChunk[0] = this; thisChunk[0] = this;
value = chunk.getContent(); value = chunk.getContent();
updateBreakTag();
Font f = chunk.getFont(); Font f = chunk.getFont();
float size = f.getSize(); float size = f.getSize();
if (size == Font.UNDEFINED) if (size == Font.UNDEFINED)
@ -798,7 +805,7 @@ public class PdfChunk {
htmlString.append("<span style='"); htmlString.append("<span style='");
htmlString.append(getStyleAttributes()).append("'"); htmlString.append(getStyleAttributes()).append("'");
htmlString.append(">"); htmlString.append(">");
htmlString.append(value); htmlString.append(breakTag ? BREAK_TAG : value);
htmlString.append("</span>"); htmlString.append("</span>");
return htmlString.toString(); return htmlString.toString();
} }
@ -856,4 +863,12 @@ public class PdfChunk {
return indent.getLeft(); return indent.getLeft();
} }
private void updateBreakTag() {
breakTag = BREAK.equals(value);
}
public boolean isBreakTag() {
return breakTag;
}
} }

8
fine-itext/src/com/fr/third/v2/lowagie/text/pdf/PdfLine.java

@ -94,6 +94,8 @@ public class PdfLine {
protected boolean isRTL = false; protected boolean isRTL = false;
public float getHeight() { public float getHeight() {
return height; return height;
} }
@ -157,6 +159,12 @@ public class PdfLine {
if (chunk == null || chunk.toString().equals("")) { if (chunk == null || chunk.toString().equals("")) {
return null; return null;
} }
// add to line if the chunk is break tag ("\n")
if (chunk.isBreakTag()) {
addToLine(chunk);
width = 0;
return null;
}
// we split the chunk to be added // we split the chunk to be added
PdfChunk overflow = chunk.split(width); PdfChunk overflow = chunk.split(width);

4
fine-j2v8/src/com/eclipsesource/v8/PlatformDetector.java

@ -127,7 +127,7 @@ public class PlatformDetector {
//如果if条件全部不符合,就会陷入死循环,代码存在风险 //如果if条件全部不符合,就会陷入死循环,代码存在风险
//throw new UnsatisfiedLinkError("Unsupported vendor: " + getName()); //throw new UnsatisfiedLinkError("Unsupported vendor: " + getName());
return ""; return null;
} }
private static String getLinuxOsReleaseId() { private static String getLinuxOsReleaseId() {
@ -148,7 +148,7 @@ public class PlatformDetector {
//linux系统下如果缺失/etc/os-release,/usr/lib/os-release,/etc/redhat-release三个文件,就会和getName方法就会一直互相调用 //linux系统下如果缺失/etc/os-release,/usr/lib/os-release,/etc/redhat-release三个文件,就会和getName方法就会一直互相调用
//throw new UnsatisfiedLinkError("Unsupported linux vendor: " + getName()); //throw new UnsatisfiedLinkError("Unsupported linux vendor: " + getName());
return ""; return null;
} }
private static String parseLinuxOsReleaseFile(final File file) { private static String parseLinuxOsReleaseFile(final File file) {

Loading…
Cancel
Save