Merge remote-tracking branch 'origin/master'
This commit is contained in:
+16
@@ -919,6 +919,22 @@ public class FileSpiltService {
|
||||
c.selectPath("./*");
|
||||
while (c.toNextSelection()) {
|
||||
XmlObject o = c.getObject();
|
||||
if(o.getDomNode().getNodeName().equals("mc:AlternateContent")){
|
||||
String str = o.toString();
|
||||
String imgId = "";
|
||||
Pattern pattern = Pattern.compile("r:embed=\"([^\"]+)\"");
|
||||
Matcher matcher = pattern.matcher(str);
|
||||
// 查找匹配项
|
||||
if (matcher.find()) {
|
||||
// 提取捕获组中的内容
|
||||
String result = matcher.group(1);
|
||||
imgId = result;
|
||||
}
|
||||
if(StringUtils.isNotBlank(imgId)){
|
||||
imageBundleList.add(imgId);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//如果子元素是<w:drawing>这样的形式,使用CTDrawing保存图片
|
||||
if (o instanceof CTDrawing) {
|
||||
CTDrawing drawing = (CTDrawing) o;
|
||||
|
||||
Reference in New Issue
Block a user