开发者论坛

 找回密码
 注册 (请使用非IE浏览器)
查看: 2096|回复: 1

richEditControl 文档合并 numbering.xml

[复制链接]

0

精华

0

贡献

0

赞扬

帖子
25
软币
109
在线时间
10 小时
注册时间
2015-10-22
发表于 2015-10-22 15:35:43 | 显示全部楼层 |阅读模式
本帖最后由 dragonDev 于 2015-10-26 15:17 编辑

我使用richeditControl.Document.InsertDocumentContent(richeditControl.Document.CaretPosition, path,DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
把一个word07文档的内容,插入光标所在位置,内容能正确插入
问题:无序列表前边的项目符号会变成横线,我觉得是numbering.xml没有插入richedit控件,没有关联,所以项目符号变了。
求助:如何合并两个word的numbering.xml

回复

使用道具 举报

0

精华

0

贡献

0

赞扬

帖子
25
软币
109
在线时间
10 小时
注册时间
2015-10-22
 楼主| 发表于 2015-10-26 15:15:49 | 显示全部楼层
没人回答,自己解决吧
[C#] 纯文本查看 复制代码
//提取
RichEditControl tmpRichEditControl = new RichEditControl();
tmpRichEditControl.LoadDocument(path, DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
DevExpress.XtraRichEdit.API.Native.AbstractNumberingListCollection tmpListA = tmpRichEditControl.Document.AbstractNumberingLists;
DevExpress.XtraRichEdit.API.Native.NumberingListCollection tmpListB = tmpRichEditControl.NumberingLists;
tmpRichEditControl.Dispose();

//合并
richEditControl.Document.AbstractNumberingLists.Concat(tmpListA);
richEditControl.Document.NumberingLists.Concat(tmpListB);
richEditControl.Document.InsertDocumentContent(richEditControl.Document.CaretPosition, path, DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
回复

使用道具 举报

Archiver|手机版|小黑屋|开发者网 ( 苏ICP备08004430号-2 )
版权所有:南京韵文教育信息咨询有限公司

GMT+8, 2024-5-29 12:51

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表