Browse Source

REPORT-46916 新引擎内置,添加模块

persist/11.0
loy 4 years ago
parent
commit
3c87bcd12d
  1. 133
      designer-realize/src/main/java/com/fr/plugin/designer/clean/CompileCleanManager.java
  2. 79
      designer-realize/src/main/java/com/fr/plugin/designer/monitor/DesignerMetricRecorder.java
  3. 41
      designer-realize/src/main/java/com/fr/plugin/designer/preview/PagePlusPreview.java
  4. 1
      designer-realize/src/test/java/com/fr/plugin/designer/clean/CompileCleanManagerTest.java
  5. 238
      designer-realize/src/test/java/com/fr/plugin/designer/toolbar/TemplateTransformerDebugTest.java
  6. 79
      designer-realize/src/test/resources/cpt/read-write-expand-order.cpt
  7. 78
      designer-realize/src/test/resources/cpt/read-write-image-ref.cpt

133
designer-realize/src/main/java/com/fr/plugin/designer/clean/CompileCleanManager.java

@ -1,133 +0,0 @@
package com.fr.plugin.designer.clean;
import com.fr.base.extension.FileExtension;
import com.fr.config.ConfigContext;
import com.fr.config.DefaultConfiguration;
import com.fr.config.holder.factory.Holders;
import com.fr.config.holder.impl.MapConf;
import com.fr.general.CommonDateUtils;
import com.fr.nx.cptx.marshal.util.CptxMarshalUtil;
import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants;
import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerAdaptor;
import com.fr.workspace.WorkContext;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* @author: Maksim
* @Date: Created in 2020/4/23
* @Description:
*/
public class CompileCleanManager extends DefaultConfiguration {
private static volatile CompileCleanManager INSTANCE;
private MapConf<Map<String, String>> mapConf = Holders.map(new HashMap<String, String>(), String.class, String.class);
private CompileCleanManager() {
}
@Override
public String getNameSpace() {
return "CompileCleanManager";
}
public static CompileCleanManager getInstance() {
if (INSTANCE == null) {
synchronized (CompileCleanManager.class) {
if (INSTANCE == null) {
INSTANCE = ConfigContext.getConfigInstance(CompileCleanManager.class);
}
}
}
return INSTANCE;
}
/**
* 增加预览记录
*
* @param bookPath
*/
public void addRecord(String bookPath) {
String lastPreviewTime = CommonDateUtils.getDate2Str("yyyy-MM-dd", new Date());
addRecord(bookPath, lastPreviewTime);
}
public void addRecord(final String bookPath, final String lastPreviewTime) {
Configurations.update(new WorkerAdaptor(CompileCleanManager.class) {
@Override
public void run() {
mapConf.put(bookPath, lastPreviewTime);
}
});
}
/**
* 删除预览记录
*
* @param bookPath
*/
public void deleteRecord(String bookPath) {
this.mapConf.remove(bookPath);
}
/**
* 获取预览记录
*
* @return
*/
public Map<String, String> getRecords() {
return mapConf.get();
}
/**
* 执行清理
*/
public void clear() {
Map<String, String> cleanMap = getRecords();
for (Iterator<Map.Entry<String, String>> iterator = cleanMap.entrySet().iterator(); iterator.hasNext(); ) {
Map.Entry<String, String> item = iterator.next();
String bookPath = item.getKey();
String lastPreviewTime = item.getValue();
if (needClean(lastPreviewTime)) {
String compilePath = getCompilePath(bookPath);
WorkContext.getWorkResource().delete(compilePath);
deleteRecord(bookPath);
}
}
}
private String getCompilePath(String bookPath) {
if (bookPath.endsWith(FileExtension.CPTX.getSuffix())) {
bookPath = bookPath.substring(0, bookPath.length() - FileExtension.CPTX.getSuffix().length());
}
return StableUtils.pathJoin(ProjectConstants.ASSETS_NAME, CptxMarshalUtil.COMPILE_PATH, bookPath);
}
/**
* 根据时间判断是否需要清理
*
* @param lastPreviewTime
* @return
*/
private boolean needClean(String lastPreviewTime) {
Date previewTime = CommonDateUtils.transDate(lastPreviewTime, false);
Calendar calendar = Calendar.getInstance();
calendar.setTime(previewTime);
calendar.add(Calendar.MONTH, 1);
return new Date().after(calendar.getTime());
}
@Override
public Object clone() throws CloneNotSupportedException {
CompileCleanManager manager = (CompileCleanManager) super.clone();
manager.mapConf = (MapConf<Map<String, String>>) this.mapConf.clone();
return manager;
}
}

79
designer-realize/src/main/java/com/fr/plugin/designer/monitor/DesignerMetricRecorder.java

@ -1,23 +1,12 @@
package com.fr.plugin.designer.monitor;
import com.fr.design.mainframe.errorinfo.ErrorInfo;
import com.fr.general.ComparatorUtils;
import com.fr.intelli.record.ConsumePoint;
import com.fr.intelli.record.FocusPoint;
import com.fr.intelli.record.MetricRegistry;
import com.fr.intelli.record.Original;
import com.fr.json.JSON;
import com.fr.json.JSONArray;
import com.fr.json.JSONFactory;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.measure.metric.DBMetric;
import com.fr.message.ErrorMessage;
import com.fr.nx.session.SqlRecorder;
import com.fr.plugin.designer.toolbar.TransformResult;
import com.fr.plugin.monitor.MonitorContentUtils;
import java.util.Date;
/**
* Created by loy on 2021/1/18.
@ -26,10 +15,6 @@ import java.util.Date;
*/
public class DesignerMetricRecorder {
private static final String LOCAL_IPV6_ADDRESS = "0:0:0:0:0:0:0:1";
private static final String LOCAL_IPV4_ADDRESS = "127.0.0.1";
private static final String LOCAL_DOMAIN = "localhost";
private static final String ATTR_TEMPLATE_ID = "templateid";
private static final String ATTR_USERNAME = "username";
private static final String ATTR_UUID = "uuid";
@ -39,66 +24,9 @@ public class DesignerMetricRecorder {
private static final String ATTR_ERROR_STACK = "errorstack";
private static final String IDENTIFICATION = "view_plus";
private static final String LAYER_TREE_EXEC_LAYER = "FR-P1201";
private static final String TREE_MODE_CONSUME_ID = "FR-F6006";
private static final String TYPE_PAGE_PLUS = "page_plus";
private DesignerMetricRecorder() {
}
public static void submitTreeModeFocusPoint(String ip, String username, String bookPath, String webTitle) {
FocusPoint point = FocusPoint.create(TREE_MODE_CONSUME_ID, bookPath, Original.PLUGIN);
point.setTime(new Date());
point.setTitle(webTitle);
point.setText(bookPath);
point.setIp(parseIpToLocalhost(ip));
point.setUsername(username);
try {
MetricRegistry.getMetric().submit(point);
} catch (Exception e) {
FineLoggerFactory.getLogger().warn(e.getMessage(), e);
}
}
public static void submitLayerTreeExecLayerFocusPoint(long start, String ip, String username, String bookPath, String webTitle,
SqlRecorder sqlRecorder) {
long finish = System.currentTimeMillis();
long consume = finish - start;
ConsumePoint point = ConsumePoint.create(LAYER_TREE_EXEC_LAYER, consume, Original.PLUGIN);
point.setTime(start);
point.setFinish(finish);
point.setTitle(webTitle);
point.setText(bookPath);
point.setType(TYPE_PAGE_PLUS);
point.setIp(parseIpToLocalhost(ip));
point.setUsername(username);
if (sqlRecorder != null) {
JSONObject body = JSONObject.create();
JSONArray sql = JSONArray.create();
for (String s : sqlRecorder.getSqlList()) {
sql.add(MonitorContentUtils.truncate(s, 150));
}
JSONArray sqlTime = JSONArray.create();
JSONArray sqlRowCount = JSONArray.create();
for (DBMetric dbMetric : sqlRecorder.getDBMetric()) {
if (dbMetric != null) {
sqlTime.add(dbMetric.getSqlTime());
sqlRowCount.add(dbMetric.getRowCount());
}
}
body.put("sql", sql);
body.put("sqltime", sqlTime);
body.put("row", sqlRowCount);
point.setBody(body.toString());
}
try {
MetricRegistry.getMetric().submit(point);
} catch (Exception e) {
FineLoggerFactory.getLogger().warn(e.getMessage(), e);
}
}
/**
* 模板转换失败的埋点
*/
@ -158,13 +86,6 @@ public class DesignerMetricRecorder {
saveToErrorMessage(result, templateID, name, null, unsupportMessage);
}
private static String parseIpToLocalhost(String ip) {
if (ComparatorUtils.equals(ip, LOCAL_IPV4_ADDRESS) || ComparatorUtils.equals(ip, LOCAL_IPV6_ADDRESS)) {
return LOCAL_DOMAIN;
}
return ip;
}
/**
* 埋点对压测性能的影响控制参数
*

41
designer-realize/src/main/java/com/fr/plugin/designer/preview/PagePlusPreview.java

@ -0,0 +1,41 @@
package com.fr.plugin.designer.preview;
import com.fr.design.fun.impl.AbstractPreviewProvider;
import com.fr.general.web.ParameterConstants;
import com.fr.locale.InterProviderFactory;
import java.util.HashMap;
import java.util.Map;
import static com.fr.plugin.v9.web.PagePlusActor.TYPE;
public class PagePlusPreview extends AbstractPreviewProvider {
private static final int CODE = 100;
@Override
public String nameForPopupItem() {
return InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine-Page-Plus");
}
@Override
public String iconPathForPopupItem() {
return "com/fr/design/images/buttonicon/pages.png";
}
@Override
public String iconPathForLarge() {
return "com/fr/design/images/buttonicon/pageb24.png";
}
@Override
public int previewTypeCode() {
return CODE;
}
@Override
public Map<String, Object> parametersForPreview() {
Map<String, Object> map = new HashMap<String, Object>();
map.put(ParameterConstants.OP, TYPE);
return map;
}
}

1
designer-realize/src/test/java/com/fr/plugin/designer/clean/CompileCleanManagerTest.java

@ -4,6 +4,7 @@ import com.fr.config.dao.DaoContext;
import com.fr.config.dao.impl.LocalClassHelperDao;
import com.fr.config.dao.impl.LocalEntityDao;
import com.fr.config.dao.impl.LocalXmlEntityDao;
import com.fr.nx.cptx.clean.CompileCleanManager;
import com.fr.transaction.Configurations;
import com.fr.transaction.LocalConfigurationHelper;
import org.junit.Assert;

238
designer-realize/src/test/java/com/fr/plugin/designer/toolbar/TemplateTransformerDebugTest.java

@ -0,0 +1,238 @@
package com.fr.plugin.designer.toolbar;
import com.fr.base.Parameter;
import com.fr.base.chart.BaseChartCollection;
import com.fr.base.io.XMLEncryptKey;
import com.fr.base.io.XMLEncryptUtils;
import com.fr.base.iofile.IOFileAttrMarkManager;
import com.fr.base.parameter.ParameterUI;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.config.dao.DaoContext;
import com.fr.config.dao.impl.LocalClassHelperDao;
import com.fr.config.dao.impl.LocalEntityDao;
import com.fr.config.dao.impl.LocalXmlEntityDao;
import com.fr.file.MemFILE;
import com.fr.form.DefaultFormOperator;
import com.fr.form.FormOperator;
import com.fr.form.main.ExtraFormClassManager;
import com.fr.form.main.Form;
import com.fr.form.main.FormHyperlink;
import com.fr.form.main.parameter.FormParameterUI;
import com.fr.form.parameter.FormSubmitButton;
import com.fr.form.plugin.DefaultSwitcherImpl;
import com.fr.io.EncryptUtils;
import com.fr.js.FormHyperlinkProvider;
import com.fr.main.impl.WorkBook;
import com.fr.nx.calculable.Calculable;
import com.fr.nx.calculable.type.ConstantCalculable;
import com.fr.nx.cell.CellKey;
import com.fr.nx.cell.CellTemplate;
import com.fr.nx.cptx.cache.CptxTemplatePool;
import com.fr.nx.cptx.entry.CptxTemplate;
import com.fr.nx.cptx.resource.ImageResourceRef;
import com.fr.page.BaseSinglePagePrintable;
import com.fr.page.BaseSingleReportCache;
import com.fr.page.ClippedChartPage;
import com.fr.page.ClippedECPage;
import com.fr.page.ClippedPageProvider;
import com.fr.page.PDF2Painter;
import com.fr.page.PageGeneratorProvider;
import com.fr.page.PagePainter;
import com.fr.page.PagePainterProvider;
import com.fr.page.PageSetChainProvider;
import com.fr.page.PageSetProvider;
import com.fr.page.PageXmlOperator;
import com.fr.page.PageXmlProvider;
import com.fr.page.PaperSettingProvider;
import com.fr.page.ReportPage;
import com.fr.page.ReportPageAttrProvider;
import com.fr.page.ReportPageProvider;
import com.fr.page.SheetPage;
import com.fr.page.SinglePagePrintable;
import com.fr.page.SingleReportCache;
import com.fr.page.generator.PaginateReportPageGenerator;
import com.fr.page.generator.PolyReportPageGenerator;
import com.fr.page.generator.SheetPageGenerator;
import com.fr.page.pageset.ArrayPageSet;
import com.fr.page.pageset.PageSetChain;
import com.fr.page.stable.PaperSetting;
import com.fr.page.stable.ReportPageAttr;
import com.fr.plugin.attr.CalculatorAttrMark;
import com.fr.runtime.FineRuntime;
import com.fr.stable.EssentialUtils;
import com.fr.stable.bridge.BridgeMark;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.fun.WidgetSwitcher;
import com.fr.stable.module.Module;
import com.fr.stable.plugin.ExtraFormClassManagerProvider;
import com.fr.transaction.Configurations;
import com.fr.transaction.LocalConfigurationHelper;
import com.fr.xml.ReportXMLUtils;
import org.easymock.EasyMock;
import org.easymock.IArgumentMatcher;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.easymock.PowerMock;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.SuppressStaticInitializationFor;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
import java.io.InputStream;
@RunWith(PowerMockRunner.class)
@PrepareForTest({CptxTemplatePool.class, XMLEncryptUtils.class})
@SuppressStaticInitializationFor({"com.fr.nx.cptx.cache.CptxTemplatePool", "com.fr.base.io.XMLEncryptUtils"})
@PowerMockIgnore({"com.sun.tools.attach.*", "sun.tools.attach.*"})
public class TemplateTransformerDebugTest {
@BeforeClass
public static void beforeClass() {
System.setProperty("apple.awt.UIElement", "true");
StableFactory.registerXMLDescription(ReportPageAttrProvider.XML_TAG, new ReportPageAttr());
StableFactory.registerMarkedClass(ReportPageProvider.XML_TAG, ReportPage.class);
StableFactory.registerMarkedClass(PaperSettingProvider.XML_TAG, PaperSetting.class);
StableFactory.registerMarkedClass(ReportPageProvider.XML_TAG_4_SHEET, SheetPage.class);
StableFactory.registerMarkedClass(PagePainterProvider.XML_TAG, PagePainter.class);
StableFactory.registerMarkedClass(PageSetChainProvider.XML_TAG, PageSetChain.class);
StableFactory.registerMarkedClass(PageXmlProvider.XML_TAG, PageXmlOperator.class);
StableFactory.registerMarkedClass(BaseSinglePagePrintable.XML_TAG, SinglePagePrintable.class);
StableFactory.registerMarkedClass(BaseSingleReportCache.XML_TAG, SingleReportCache.class);
StableFactory.registerMarkedClass(PageSetProvider.XML_TAG_4_ARRAY, ArrayPageSet.class);
StableFactory.registerMarkedClass(ClippedPageProvider.XML_TAG_EC, ClippedECPage.class);
StableFactory.registerMarkedClass(ClippedPageProvider.XML_TAG_CHART, ClippedChartPage.class);
StableFactory.registerMarkedClass(PageGeneratorProvider.XML_TAG_PAGE, PaginateReportPageGenerator.class);
StableFactory.registerMarkedClass(PageGeneratorProvider.XML_TAG_POLY, PolyReportPageGenerator.class);
StableFactory.registerMarkedClass(PageGeneratorProvider.XML_TAG_SHEET, SheetPageGenerator.class);
StableFactory.registerMarkedClass(PagePainterProvider.XML_TAG_4_PDF, PDF2Painter.class);
StableFactory.registerMarkedClass(BridgeMark.SUBMIT_BUTTON, FormSubmitButton.class);
StableFactory.registerMarkedClass(FormOperator.MARK_STRING, DefaultFormOperator.class);
StableFactory.registerMarkedClass(Module.FORM_MODULE, Form.class);
StableFactory.registerMarkedClass(ParameterUI.FORM_XML_TAG, FormParameterUI.class);
StableFactory.registerMarkedClass(FormHyperlinkProvider.XML_TAG, FormHyperlink.class);
StableFactory.registerMarkedObject(WidgetSwitcher.XML_TAG, new DefaultSwitcherImpl());
StableFactory.registerMarkedClass(ExtraFormClassManagerProvider.XML_TAG, ExtraFormClassManager.class);
StableFactory.registerXMLDescription(BaseChartCollection.XML_TAG, new ChartCollection());
StableFactory.registerXMLDescription(Parameter.XML_TAG, new Parameter());
FineRuntime.start();
EssentialUtils.registerObjectTokenizer(new ReportXMLUtils.ReportObjectTokenizer());
EssentialUtils.registerObjectXMLWriterFinder(new ReportXMLUtils.ReportObjectXMLWriterFinder());
DaoContext.setEntityDao(new LocalEntityDao());
DaoContext.setClassHelperDao(new LocalClassHelperDao());
DaoContext.setXmlEntityDao(new LocalXmlEntityDao());
Configurations.setHelper(new LocalConfigurationHelper());
IOFileAttrMarkManager.register(new CalculatorAttrMark());
}
@Before
public void before() {
Whitebox.setInternalState(XMLEncryptUtils.class, "KEY", new XMLEncryptKey());
}
@Test
public void testUnsupportedCompile() {
WorkBook workbook = readCpt("read-write-expand-order.cpt");
CptxTemplatePool pool = EasyMock.mock(CptxTemplatePool.class);
PowerMock.mockStatic(CptxTemplatePool.class);
EasyMock.expect(CptxTemplatePool.getInstance()).andReturn(pool).anyTimes();
PowerMock.replay(CptxTemplatePool.class);
pool.addCptxTemplate(EasyMock.anyString(), matchUnsupportedWebPreviewCptxTemplate());
EasyMock.expectLastCall().once();
EasyMock.replay(pool);
TemplateTransformer.compileCPTX(workbook, new MemFILE("read-write-expand-order.cpt"));
EasyMock.verify(pool);
PowerMock.verify(CptxTemplatePool.class);
}
@Test
public void testImageRefCompile() {
WorkBook workbook = readCpt("read-write-image-ref.cpt");
CptxTemplatePool pool = EasyMock.mock(CptxTemplatePool.class);
PowerMock.mockStatic(CptxTemplatePool.class);
EasyMock.expect(CptxTemplatePool.getInstance()).andReturn(pool).anyTimes();
PowerMock.replay(CptxTemplatePool.class);
pool.addCptxTemplate(EasyMock.anyString(), matchImageRefWebPreviewCptxTemplate());
EasyMock.expectLastCall().once();
EasyMock.replay(pool);
TemplateTransformer.compileCPTX(workbook, new MemFILE("read-write-image-ref.cpt"));
EasyMock.verify(pool);
PowerMock.verify(CptxTemplatePool.class);
}
private CptxTemplate matchImageRefWebPreviewCptxTemplate() {
EasyMock.reportMatcher(new IArgumentMatcher() {
@Override
public boolean matches(Object argument) {
if (argument instanceof CptxTemplate) {
CptxTemplate cptxTemplate = (CptxTemplate) argument;
Assert.assertNotNull(cptxTemplate.getTemplate());
Assert.assertNotNull(cptxTemplate.getTemplate().getCompileResult());
Assert.assertEquals(1, cptxTemplate.getTemplate().getCompileResult().getCellBlocks().length);
Assert.assertNotNull(cptxTemplate.getTemplate().getCompileResult().getCellBlocks()[0].getDataStructure());
Assert.assertNotNull(cptxTemplate.getTemplate().getCompileResult().getCellBlocks()[0].getDataStructure().getCells());
CellTemplate cellTemplate = cptxTemplate.getTemplate().getCompileResult().getCellBlocks()[0].getDataStructure().getCells().get(CellKey.fromString("A2"));
Assert.assertNotNull(cellTemplate);
Calculable calculable = cellTemplate.getCalculable();
ConstantCalculable constantCalculable = calculable.unWrap(ConstantCalculable.KEY);
Assert.assertNotNull(constantCalculable);
Assert.assertTrue(constantCalculable.get() instanceof ImageResourceRef);
return true;
}
return false;
}
@Override
public void appendTo(StringBuffer buffer) {
buffer.append("cptx template should be previewed on the web side but not.");
}
});
return null;
}
private CptxTemplate matchUnsupportedWebPreviewCptxTemplate() {
EasyMock.reportMatcher(new IArgumentMatcher() {
@Override
public boolean matches(Object argument) {
if (argument instanceof CptxTemplate) {
CptxTemplate cptxTemplate = (CptxTemplate) argument;
Assert.assertEquals("unsupported feature: sort after expand",
cptxTemplate.getMetadata().getFailMessage());
return true;
}
return false;
}
@Override
public void appendTo(StringBuffer buffer) {
buffer.append("should find unsupported error message but not");
}
});
return null;
}
private static WorkBook readCpt(String subPath) {
InputStream is = TemplateTransformerDebugTest.class.getClassLoader().getResourceAsStream("cpt/" + subPath);
WorkBook wb = new WorkBook();
try {
wb.readStream(EncryptUtils.decodeInputStream(is));
} catch (Exception e) {
throw new RuntimeException(e);
}
return wb;
}
}

79
designer-realize/src/test/resources/cpt/read-write-expand-order.cpt

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<WorkBook xmlVersion="20170720" releaseVersion="10.0.0">
<Report class="com.fr.report.worksheet.WorkSheet" name="sheet1">
<ReportPageAttr>
<HR/>
<FR/>
<HC/>
<FC/>
</ReportPageAttr>
<ColumnPrivilegeControl/>
<RowPrivilegeControl/>
<RowHeight defaultValue="723900">
<![CDATA[723900,4295838,723900,723900,723900,723900,723900,723900,723900,723900,723900]]></RowHeight>
<ColumnWidth defaultValue="2743200">
<![CDATA[6627865,2743200,2743200,2743200,2743200,2743200,2743200,2743200,2743200,2743200,2743200]]></ColumnWidth>
<CellElementList>
<C c="0" r="0">
<PrivilegeControl/>
<Expand order="1"/>
</C>
<C c="1" r="0">
<O t="I">
<![CDATA[1]]></O>
<PrivilegeControl/>
<Expand/>
</C>
<C c="0" r="1">
<O t="XMLable" class="com.fr.general.ImageWithSuffix">
<FineImage fm="png">
<IM>
<![CDATA[!T4)&qh\-E7h#eD$31&+%7s)Y;?-[s;?-[s;@!I,!!(%jK:;i@"K+gZ5u`*!m@D"-'L<GRe"
s8V+^efB0"$1Z>tC;K&-B[7`5WK?,Xelf@&8+0+s;]Ad+gFe2#R^R0KRcH9&1(_,Q&m?CF2#j
L2g`#\[sRl3^"LL;I*q<:m`bRtAnUh^m(8[R[\Qdap[PoDZI+D(a6:V.`2I<j@73SOmdDs,A
+uOS3sXroCYL"=N7$79<fLEF.)_okG>2?>R^Sd'MY!@@k@GfZiTaUt[[X*Qn(Vqi1,QX!S[g
X8cV#:o/U(RN!]A[-MCK!$>RYIs_SOW[_9PE1L2Q+u4)L'*_+9GA>FbhqkF3><ITQR#Z&\t@r
[!>rH*rsS)m6q"c>/>qr/Vjd(?R(*:-.oLG%<9eZ1]Al^J"e-:(+>+Q1NPOaSJo+/S+i4n&T%
\/J4IBcE%5,_GkC[%jH'kh$2]A+l)FI""N?9]AXFHef&/Q\Pm:q*oGRR,WL<dta:sa5g[sEC!i
2BKX\fS\?I`Sr$qqD4,Rq:A1qgre[HWS.AXA,T'5S3(`gh<4:2'QhJ%3fl9"m:'tu8Ts:@U:
VVh>M]A._;-d'aOX+8Xcia>YISk1g?.bi%E?!"e!Dq4AIRE5*J06XZ"l9<VXc0CmdGqRCY\[V
jH,m1GSaXbIcEJA8MVlg3npt"ps&Q#K6#N$Oa+4nH=;+F`U)c]A/o/l[6`,^T3Lkh5?3_]A^#?
kP/@Wf,h'#E=eI>/,[%5lSYHM*Gsc;De0X(/o,#On+F;om!UF7s$[mR(>_*`AIpT;n1NSp*r
5Md*5kOL1RpseeaT5!G,kk_1&F%\@jJs#W%4nbD$X(dC(\O+&KX.Vp>]AY-Lo<Zfr&,N4U<l3
\c3%i!rXB<7Y--5>L^V=LM7!$S/!&hR'nH_0hm_H,f=2p+p`R&".Le>"lHKmKAHnSIm69U'g
LYG,>[,VlJ&!5>PutHqRJ4XG^$7ZL6(YG+-e=+b;LUuH3Zrc58GNFlF?j1-+QXQ(%S6.V?:G
1jf/GeC6q@_Q>S5"##8tiN'(`qU.T7U?<]A'i8Uhe/g^>U%!HX@Al,.N83)TcC)q$'k_OQ-?:
_D-F="?_k3O8O[DbknE3?fn3U+EJ3:q;#Xc<us;VN0E_,#[5<%bWR/m"YJ/$/ncCA7S?[j0O
"7eDS"!*;F5*3mL`XuV$==.VthfIr!KbMS$iZjA,/%hUoiVc!Y-RGQBegW]AOdq1#1ZcM-7T7
!1]AKjAoOfF;#;YX8dknF7"f0r)k@UaJen54dIPZFo<,FG*kET--FlL!4pNhXJWUmu)gmTe=%
;EIA(U#04L!G6;`dfD5U#?b(9UAV,ZsGPK90Bb9k\<VBG[>cA+E^R:k_hA7K7g.e*(3U#a[&
%V(jo6,q3)+CL/"I32M"cKPBGLn2M%"r'=faV2lDBHCm%MHBI]AOIZj%Z*1+*FVK8J!g'*3c#
"WMR3*Y&1h_H@PEJC*H;"Y@nbp:f4UB61F[-H4phL"^(VI"gQST8h*)bt+Jo(MXVpo+u.k@X
tpaqkFs9$<?s@QH[Num^)V"=AgaN!FkbtEsHE-B`J,5!(fUS7'8jaJc~
]]></IM>
</FineImage>
</O>
<PrivilegeControl/>
<Expand/>
</C>
</CellElementList>
<ReportAttrSet>
<ReportSettings headerHeight="0" footerHeight="0">
<PaperSetting/>
<Background name="ColorBackground" color="-1"/>
</ReportSettings>
</ReportAttrSet>
<PrivilegeControl/>
</Report>
<ReportParameterAttr>
<Attributes showWindow="true" delayPlaying="true" windowPosition="1" align="0" useParamsTemplate="true"/>
<PWTitle>
<![CDATA[参数]]></PWTitle>
</ReportParameterAttr>
<StyleList/>
<DesignerVersion DesignerVersion="KAA"/>
<PreviewType PreviewType="0"/>
<TemplateIdAttMark class="com.fr.base.iofile.attr.TemplateIdAttrMark">
<TemplateIdAttMark TemplateId="2c82bd1f-e4a5-4d56-bc03-789dfd00971d"/>
</TemplateIdAttMark>
</WorkBook>

78
designer-realize/src/test/resources/cpt/read-write-image-ref.cpt

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<WorkBook xmlVersion="20170720" releaseVersion="10.0.0">
<Report class="com.fr.report.worksheet.WorkSheet" name="sheet1">
<ReportPageAttr>
<HR/>
<FR/>
<HC/>
<FC/>
</ReportPageAttr>
<ColumnPrivilegeControl/>
<RowPrivilegeControl/>
<RowHeight defaultValue="723900">
<![CDATA[723900,4295838,723900,723900,723900,723900,723900,723900,723900,723900,723900]]></RowHeight>
<ColumnWidth defaultValue="2743200">
<![CDATA[6627865,2743200,2743200,2743200,2743200,2743200,2743200,2743200,2743200,2743200,2743200]]></ColumnWidth>
<CellElementList>
<C c="0" r="0">
<PrivilegeControl/>
</C>
<C c="1" r="0">
<O t="I">
<![CDATA[1]]></O>
<PrivilegeControl/>
<Expand/>
</C>
<C c="0" r="1">
<O t="XMLable" class="com.fr.general.ImageWithSuffix">
<FineImage fm="png">
<IM>
<![CDATA[!T4)&qh\-E7h#eD$31&+%7s)Y;?-[s;?-[s;@!I,!!(%jK:;i@"K+gZ5u`*!m@D"-'L<GRe"
s8V+^efB0"$1Z>tC;K&-B[7`5WK?,Xelf@&8+0+s;]Ad+gFe2#R^R0KRcH9&1(_,Q&m?CF2#j
L2g`#\[sRl3^"LL;I*q<:m`bRtAnUh^m(8[R[\Qdap[PoDZI+D(a6:V.`2I<j@73SOmdDs,A
+uOS3sXroCYL"=N7$79<fLEF.)_okG>2?>R^Sd'MY!@@k@GfZiTaUt[[X*Qn(Vqi1,QX!S[g
X8cV#:o/U(RN!]A[-MCK!$>RYIs_SOW[_9PE1L2Q+u4)L'*_+9GA>FbhqkF3><ITQR#Z&\t@r
[!>rH*rsS)m6q"c>/>qr/Vjd(?R(*:-.oLG%<9eZ1]Al^J"e-:(+>+Q1NPOaSJo+/S+i4n&T%
\/J4IBcE%5,_GkC[%jH'kh$2]A+l)FI""N?9]AXFHef&/Q\Pm:q*oGRR,WL<dta:sa5g[sEC!i
2BKX\fS\?I`Sr$qqD4,Rq:A1qgre[HWS.AXA,T'5S3(`gh<4:2'QhJ%3fl9"m:'tu8Ts:@U:
VVh>M]A._;-d'aOX+8Xcia>YISk1g?.bi%E?!"e!Dq4AIRE5*J06XZ"l9<VXc0CmdGqRCY\[V
jH,m1GSaXbIcEJA8MVlg3npt"ps&Q#K6#N$Oa+4nH=;+F`U)c]A/o/l[6`,^T3Lkh5?3_]A^#?
kP/@Wf,h'#E=eI>/,[%5lSYHM*Gsc;De0X(/o,#On+F;om!UF7s$[mR(>_*`AIpT;n1NSp*r
5Md*5kOL1RpseeaT5!G,kk_1&F%\@jJs#W%4nbD$X(dC(\O+&KX.Vp>]AY-Lo<Zfr&,N4U<l3
\c3%i!rXB<7Y--5>L^V=LM7!$S/!&hR'nH_0hm_H,f=2p+p`R&".Le>"lHKmKAHnSIm69U'g
LYG,>[,VlJ&!5>PutHqRJ4XG^$7ZL6(YG+-e=+b;LUuH3Zrc58GNFlF?j1-+QXQ(%S6.V?:G
1jf/GeC6q@_Q>S5"##8tiN'(`qU.T7U?<]A'i8Uhe/g^>U%!HX@Al,.N83)TcC)q$'k_OQ-?:
_D-F="?_k3O8O[DbknE3?fn3U+EJ3:q;#Xc<us;VN0E_,#[5<%bWR/m"YJ/$/ncCA7S?[j0O
"7eDS"!*;F5*3mL`XuV$==.VthfIr!KbMS$iZjA,/%hUoiVc!Y-RGQBegW]AOdq1#1ZcM-7T7
!1]AKjAoOfF;#;YX8dknF7"f0r)k@UaJen54dIPZFo<,FG*kET--FlL!4pNhXJWUmu)gmTe=%
;EIA(U#04L!G6;`dfD5U#?b(9UAV,ZsGPK90Bb9k\<VBG[>cA+E^R:k_hA7K7g.e*(3U#a[&
%V(jo6,q3)+CL/"I32M"cKPBGLn2M%"r'=faV2lDBHCm%MHBI]AOIZj%Z*1+*FVK8J!g'*3c#
"WMR3*Y&1h_H@PEJC*H;"Y@nbp:f4UB61F[-H4phL"^(VI"gQST8h*)bt+Jo(MXVpo+u.k@X
tpaqkFs9$<?s@QH[Num^)V"=AgaN!FkbtEsHE-B`J,5!(fUS7'8jaJc~
]]></IM>
</FineImage>
</O>
<PrivilegeControl/>
<Expand/>
</C>
</CellElementList>
<ReportAttrSet>
<ReportSettings headerHeight="0" footerHeight="0">
<PaperSetting/>
<Background name="ColorBackground" color="-1"/>
</ReportSettings>
</ReportAttrSet>
<PrivilegeControl/>
</Report>
<ReportParameterAttr>
<Attributes showWindow="true" delayPlaying="true" windowPosition="1" align="0" useParamsTemplate="true"/>
<PWTitle>
<![CDATA[参数]]></PWTitle>
</ReportParameterAttr>
<StyleList/>
<DesignerVersion DesignerVersion="KAA"/>
<PreviewType PreviewType="0"/>
<TemplateIdAttMark class="com.fr.base.iofile.attr.TemplateIdAttrMark">
<TemplateIdAttMark TemplateId="2c82bd1f-e4a5-4d56-bc03-789dfd00971d"/>
</TemplateIdAttMark>
</WorkBook>
Loading…
Cancel
Save