DocumentProperties

DocumentProperties — Aspose.Slides FOSS for C++ API Reference

Properties DocumentProperties class 提供对演示文稿的内置和自定义元数据的访问。.

Properties: Aspose::Slides::Foss

#include <Aspose/Slides/Foss/document_properties.h>
class DocumentProperties

Properties: include/Aspose/Slides/Foss/document_properties.h


内置属性

PropertiesPropertiesProperties
set_title(const std::string&)Properties设置文档标题。.
set_subject(const std::string&)Properties设置文档主题。.
set_author(const std::string&)Properties设置文档作者。.
set_keywords(const std::string&)Properties设置文档关键字。.
set_comments(const std::string&)Properties设置文档注释。.
set_category(const std::string&)Properties设置文档类别。.
set_content_status(const std::string&)Properties设置内容状态。.
set_content_type(const std::string&)Properties设置内容类型。.
set_last_saved_by(const std::string&)Properties设置最后保存者。.
set_company(const std::string&)Properties设置公司名称。.
set_manager(const std::string&)Properties设置经理姓名。.
set_name_of_application(const std::string&)Properties设置应用程序名称。.
set_presentation_format(const std::string&)Properties设置演示文稿格式。.
set_application_template(const std::string&)Properties设置应用程序模板。.
set_hyperlink_base(const std::string&)Properties设置超链接基础 URL。.
revision_number() / set_revision_number(int)读/写修订号。.
created_time() / set_created_time(...)读/写创建时间戳。.
last_saved_time() / set_last_saved_time(...)读/写上次保存时间戳。.
last_printed() / set_last_printed(...)读/写上次打印时间戳。.
total_editing_time() / set_total_editing_time(...)读/写总编辑时间。.
shared_doc() / set_shared_doc(bool)读/写文档是否已共享。.
scale_crop() / set_scale_crop(bool)读/写缩放裁剪设置。.
links_up_to_date() / set_links_up_to_date(bool)读/写链接是否为最新。.
hyperlinks_changed() / set_hyperlinks_changed(bool)读/写超链接是否已更改。.

Properties

PropertiesProperties
slides()幻灯片数量。.
hidden_slides()隐藏幻灯片数量。.
notes()笔记幻灯片数量。.
paragraphs()段落总数。.
words()单词总数。.
multimedia_clips()多媒体剪辑数量。.

自定义属性

PropertiesProperties
count_of_custom_properties()自定义属性的数量。.
get_custom_property_value(const std::string& name)获取自定义属性值。.
set_custom_property_value(const std::string& name, ...)设置自定义属性值。.
get_custom_property_name(int index)通过索引获取自定义属性名称。.
remove_custom_property(const std::string& name)移除自定义属性。.
contains_custom_property(const std::string& name)检查自定义属性是否存在。.
clear_custom_properties()移除所有自定义属性。.
clear_built_in_properties()将所有内置属性重置为默认值。.

使用示例

#include <Aspose/Slides/Foss/presentation.h>
using namespace Aspose::Slides::Foss;

Presentation prs;
auto& props = prs.document_properties();
props.set_title("Q1 Results");
props.set_author("Finance Team");
props.set_subject("Quarterly Review");
prs.save("q1.pptx", SaveFormat::PPTX);

另见

 中文