Browse Source

REPORT-43864 单元格属性-自定义样式丢失,出现大量重复弹框

feature/big-screen
hades 4 years ago
parent
commit
71646c4285
  1. 11
      designer-base/src/main/java/com/fr/design/mainframe/App.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java
  3. 8
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java

11
designer-base/src/main/java/com/fr/design/mainframe/App.java

@ -41,4 +41,15 @@ public interface App<T extends BaseBook> extends Mutable, Aftermath {
* @return 报表
*/
T asIOFile(FILE tplFile);
/**
* 输出workbook等对象
* @param tplFile 文件
* @param needCheck 是否需要check
* @return
*/
default T asIOFile(FILE tplFile, boolean needCheck) {
return asIOFile(tplFile);
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java

@ -56,7 +56,7 @@ public final class JTemplateFactory {
String[] defaultAppExtensions = app.defaultExtensions();
for (String defaultAppExtension : defaultAppExtensions) {
if (defaultAppExtension.equalsIgnoreCase(fileExtension)) {
BaseBook bb = app.asIOFile(file);
BaseBook bb = app.asIOFile(file, false);
if (bb != null) {
return (T) bb;
}

8
designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java

@ -42,7 +42,11 @@ class CptApp extends AbstractWorkBookApp {
@Override
public WorkBook asIOFile(FILE file) {
return asIOFile(file, true);
}
@Override
public WorkBook asIOFile(FILE file, boolean needCheck) {
if (XMLEncryptUtils.isCptEncoded() &&
!XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) {
if (!new DecodeDialog(file).isPwdRight()) {
@ -67,7 +71,9 @@ class CptApp extends AbstractWorkBookApp {
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Report_NS_Exception_ReadError") + file, exp);
}
checkNameStyle(namestyle);
if (needCheck) {
checkNameStyle(namestyle);
}
return tpl;
}

Loading…
Cancel
Save