|
|
|
@ -326,15 +326,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
|
|
|
|
|
public abstract JComponent getCurrentReportComponentPane(); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 为另存的模板创建新的模板id |
|
|
|
|
*/ |
|
|
|
|
private void generateNewTemplateIdForSaveAs() { |
|
|
|
|
if (StringUtils.isEmpty(template.getTemplateID()) || this.getEditingFILE().exists()) { |
|
|
|
|
generateTemplateId(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 收集图表信息 |
|
|
|
|
*/ |
|
|
|
@ -959,7 +950,9 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
originID = currentId; |
|
|
|
|
} |
|
|
|
|
// 在保存之前,初始化 templateID
|
|
|
|
|
generateNewTemplateIdForSaveAs(); |
|
|
|
|
if (StringUtils.isEmpty(currentId)) { |
|
|
|
|
generateTemplateId(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.editingFILE = editingFILE; |
|
|
|
|
boolean result = this.saveToNewFile(oldName); |
|
|
|
@ -1834,7 +1827,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
originID = currentId; |
|
|
|
|
} |
|
|
|
|
// 在保存之前,初始化 templateID
|
|
|
|
|
generateNewTemplateIdForSaveAs(); |
|
|
|
|
generateTemplateId(); |
|
|
|
|
this.editingFILE = editingFILE; |
|
|
|
|
boolean result = this.saveToNewRealFile(oldName); |
|
|
|
|
if (result) { |
|
|
|
|