Cell

概述

Cell 是 Aspose.Slides FOSS for C++ 中的一个类。

表示表格中的一个单元格。

此类提供 62 种方法,用于在 C++ 程序中操作 Cell 对象。可用的方法包括:Cell、CellFormat、Slide、Table、TextAnchorType、TextFrame、TextVerticalType、anchor_center、cell_format、col_span、ensure_tc_pr、first_column,以及另外 46 种方法。安装 Aspose.Slides FOSS for C++ 包后,所有公共成员对任何 C++ 应用程序均可访问。属性包括:CellFormat、Slide、Table、TextAnchorType、TextFrame、TextVerticalType。

属性

名称类型访问描述
TextVerticalTypeTextVerticalType读取获取文本垂直类型。
TextAnchorTypeTextAnchorType读取获取文本锚点类型。
TextFrameTextFrame读取获取文本框。
TableTable读取获取表格。
CellFormatCellFormat读取获取单元格的格式。
SlideSlide读取获取幻灯片。

方法

签名描述
TextVerticalType() → TextVerticalType获取或设置单元格的垂直文本方向
TextAnchorType() → TextAnchorType获取或设置单元格的文本锚定模式
TextFrame() → TextFrame提供对单元格的 TextFrame 的访问,以读取或修改文本
TextFrame() → TextFrame
Table() → Table提供对单元格所属父表的访问
CellFormat() → CellFormat返回应用于单元格的格式设置
CellFormat() → CellFormat
Slide() → Slide提供对包含该单元格的幻灯片的访问
Cell()
~Cell()
init_internal(tc_element: pugi::xml_node, row_index: int, col_index: int, slide_part: Internal::pptx::SlidePart, parent_slide: IBaseSlide, table: Table)从 XML 元素初始化此单元格。
get_tc_pr() → pugi::xml_node返回子节点,如果不存在则返回空节点。
ensure_tc_pr() → pugi::xml_node返回子节点,如果不存在则创建它。
tc_element() → pugi::xml_node返回后台 XML 元素 ( ).
offset_x() → double返回单元格的 x 偏移量(相对于表格左侧的距离)。
set_offset_x(value: double)
offset_y() → double返回单元格的 y 偏移量(相对于表格顶部的距离)。
set_offset_y(value: double)
first_row_index() → int返回此单元格覆盖的第一行的索引。只读。
set_first_row_index(value: int)
first_column_index() → int返回此单元格覆盖的第一列的索引。只读。
set_first_column_index(value: int)
width() → double返回单元格的宽度。
set_width(value: double)
height() → double返回单元格的高度。
set_height(value: double)
minimal_height() → double返回单元格的最小高度。
set_minimal_height(value: double)
margin_left() → double返回 TextFrame 中的左边距。可读写。
set_margin_left(value: double)
margin_right() → double返回 TextFrame 中的右边距。读/写。
set_margin_right(value: double)
margin_top() → double返回 TextFrame 中的上边距。读/写。
set_margin_top(value: double)
margin_bottom() → double返回 TextFrame 中的下边距。读/写。
set_margin_bottom(value: double)
text_vertical_type() → TextVerticalType返回垂直文本的类型。读/写。
set_text_vertical_type(value: TextVerticalType)
text_anchor_type() → TextAnchorType返回文本锚点类型。读/写。
set_text_anchor_type(value: TextAnchorType)
anchor_center() → bool确定文本框是否在单元格内居中。读/写。
set_anchor_center(value: bool)
first_row() → Row返回此单元格的第一行。需要先设置表格。
first_column() → Column返回此单元格的第一列。需要先设置表格。
col_span() → int返回此单元格跨越的网格列数。
set_col_span(value: int)
row_span() → int返回此单元格跨越的行数。
set_row_span(value: int)
text_frame() → TextFrame返回此单元格的文本框。
text_frame() → TextFrame返回此单元格的文本框。
table() → Table返回此单元格所属的父表。
set_table(value: Table)
is_merged_cell() → bool如果单元格与任何相邻单元格合并,则返回 true。
h_merge() → bool返回此单元格是否水平合并(延续单元格)。
set_h_merge(value: bool)
v_merge() → bool返回此单元格是否垂直合并(连续单元格)。
set_v_merge(value: bool)
cell_format() → CellFormat返回单元格格式。
cell_format() → CellFormat返回单元格格式。
slide() → Slide返回此单元格的父幻灯片。
set_slide(value: Slide)
presentation() → Presentation返回此单元格的父演示文稿。

另请参阅

 中文