Spire.Doc for C++ 14.1.4 同步了.NET版本的系列功能
|
028-81705109
|
|
微信扫一扫
|

Spire.Cloud 纯前端文档控件

Spire.Doc for C++ 14.1.4 同步了.NET版本的系列功能

Spire.Doc for C++ 14.1.4 现已发布,该版本同步了一系列 Spire.Doc for .NET 的功能,主要集中于表格和列表相关的功能。具体更新如下。

新功能:

  • Style 类新增RemoveSelf方法支持移除样式。
  • document->GetStyles()->GetItem(L"Normal")->RemoveSelf();
  • 增强 Document 类功能,含页面提取ExtractPages、首节访问FirstSection及断字词典注册/注销支持(RegisterHyphenationDictionary, UnregisterHyphenationDictionary, IsHyphenationDictionaryRegistered)等。
  • 新增 DocumentNavigator 类,提供基于“虚拟光标”的简洁 API,支持快速插入文本、段落、表格、图像、复选框、OLE 对象等内容并设置样式。
  • intrusive_ptr<Document> doc = ConvertUtil::GetNewEngineDocument();
    intrusive_ptr navigator = new DocumentNavigator(doc);
    doc->LoadFromFile(inputFile.c_str());
    
    navigator->MoveToDocumentStart();
    navigator->Writeln(L"Test insert at DocumentStart");
    navigator->Writeln(L"Test insert without move");
    navigator->MoveToDocumentEnd();
    navigator->Writeln(L"Test insert at DocumentEnd");
    
    doc->SaveToFile(outputFile.c_str(), FileFormat::Docx);
    doc->Close();
  • 段落、表格、单元格、边框、样式等核心文档元素新增细粒度格式控制能力。
  • 类名 新功能 功能描述
    Paragraph GetText 获取段落的文本内容
    Table SetBorders,
    ClearBorders
    设置表格边框样式;清除表格的所有边框格式
    CellFormat ClearFormatting 清除单元格的所有格式
    Borders ClearFormatting,
    IsShadow
    清除边框格式设置;控制边框是否显示阴影效果
    RowFormat ClearBackground, Height 清除行背景色;设置行高
    StyleCollection Add (重载) 新增样式添加重载
    PreferredWidth FromPercent,
    FromPoints
    宽度数据类型
    CharacterFormat LocaleIdBi 支持双向文本的区域设置
    Frame IsFrame 判断对象是否为 Frame
    OfficeMath ToLaTexMathCode,
    FromOMMLCode
    将公式对象转换为 LaTeX 数学代码;从 OMML 字符串创建公式对象
  • 增强修订、内容控件及文档比较功能。
  • 类名 新功能 功能描述
    CompareOptions IgnoreTable、IgnoreHeadersAndFooters 比较时可忽略表格内容、页眉页脚
    DifferRevisions MoveToRevisions、MoveFromRevisions 获取"移动到"和"从...移动"类型的修订
    StructureDocumentTag* (含 Cell/Inline/Row) RemoveSelfOnly 仅移除内容控件本身,保留其包含的内容
  • 辅助功能增强。
  • 类名 新功能 功能描述
    ToPdfParameterList PdfImageCompression、 DigitalSignatureInfo 保存到PDF时配置图像压缩以及数字签名信息
    Document MarkdownExportOptions、 ListReferences 支持 Markdown 导出选项及列表引用
  • 列表系统重构。
  • 类名 新功能 功能描述
    ListFormat ApplyStyle, ApplyListRef 支持直接引用和快速设置
    ListLevel Equals, CreatePictureBullet, DeletePictureBullet, PictureBullet 支持图片项目符号及比较操作
    ListStyle ListRef, BaseStyle 支持列表引用与基础样式
    Document ListReferences 获取文档中的列表引用集合
  • 移除部分冗余或设计不合理的属性与方法,提升整体 API 的一致性。例如,移除 OfficeMath.SaveToImage、SaveImageToStream 等过时的导出方法。

  • 获取Spire.Doc for C++ 14.1.4请点击:

    https://www.e-iceblue.cn/Downloads/Spire-Doc-CPP.html