Browse Source

去掉deleteSvg

master
mengao 7 years ago
parent
commit
2a9dc8e3ec
  1. 42
      designer_base/src/com/fr/env/RemoteEnv.java
  2. 4
      designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java

42
designer_base/src/com/fr/env/RemoteEnv.java vendored

@ -56,8 +56,7 @@ import com.fr.stable.xml.XMLTools;
import com.fr.stable.xml.XMLableReader;
import com.fr.web.ResourceConstants;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.*;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
@ -65,7 +64,7 @@ import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import java.awt.Component;
import java.awt.*;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@ -1014,8 +1013,14 @@ public class RemoteEnv extends AbstractEnv {
}
try {
HashMap<String, String> para = new HashMap<String, String>();
if (filePath.contains(ProjectConstants.ASSETS_NAME)) {
para.put("op", "svgrelate");
para.put("cmd", "delete_svg");
} else {
para.put("op", "fr_remote_design");
para.put("cmd", "delete_file");
}
para.put("file_path", filePath);
HttpClient client = createHttpMethod(para);
@ -1578,37 +1583,6 @@ public class RemoteEnv extends AbstractEnv {
return true;
}
/**
* 删除svg文件
*
* @param filePath svg文件地址
* @return 删除成功返回true
*/
public boolean deleteSvg(String filePath) {
if (filePath == null) {
return false;
}
try {
HashMap<String, String> para = new HashMap<String, String>();
para.put("op", "svgrelate");
para.put("cmd", "delete_svg");
para.put("file_path", filePath);
HttpClient client = createHttpMethod(para);
InputStream input = execute4InputStream(client);
if (input == null) {
return false;
}
return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8));
} catch (Exception e) {
FRLogger.getLogger().error(e.getMessage());
}
return false;
}
/**
* 写报表运行环境所需的配置文件
*

4
designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java

@ -361,9 +361,9 @@ public class MapGroupExtensionPane extends BasicPane implements UIObserver {
groupExtensionPane.setValueAtCurrentSelectIndex(newName);
fireStateChange();
saveMapInfo(newName);
FRContext.getCurrentEnv().deleteSvg(
FRContext.getCurrentEnv().deleteFile(
StableUtils.pathJoin(new String[]{MapSvgXMLHelper.relativeDefaultMapPath(),oldName+SvgProvider.EXTENSION}));
FRContext.getCurrentEnv().deleteSvg(
FRContext.getCurrentEnv().deleteFile(
StableUtils.pathJoin(new String[]{MapSvgXMLHelper.relativeCustomMapPath(),oldName+SvgProvider.EXTENSION}));
refresh();
}catch (Exception exp){

Loading…
Cancel
Save