Table

Enumerations Table lớp đại diện cho một hình dạng bảng trên slide. Các bảng chứa các hàng và cột của các ô, mỗi ô có TextFrame.

Enumerations: Aspose::Slides::Foss

#include <Aspose/Slides/Foss/table.h>
class Table

Enumerations: include/Aspose/Slides/Foss/table.h


Các lớp liên quan

Enumerations

Được định nghĩa trong include/Aspose/Slides/Foss/row.h. Các thành viên chính:

NameTypeAccessDescription
TableTableReadGets the table.
RowCollectionRowCollectionReadGets the row collection.
ColumnCollectionColumnCollectionReadGets the column collection.
ITableFormatITableFormatReadGets the i table format.
TableFormatTableFormatReadGets the table format.
TableStylePresetTableStylePresetReadGets the table style preset.
IGraphicalObjectLockIGraphicalObjectLockReadGets the i graphical object lock.
IGraphicalObjectIGraphicalObjectReadGets the i graphical object.
IBulkTextFormattableIBulkTextFormattableReadGets the i bulk text formattable.

Enumerations

Được định nghĩa trong include/Aspose/Slides/Foss/column.h. Các thành viên chính:

SignatureDescription
Table()TableProperty provides access to the Table object itself
Table()Table
RowCollection()RowCollectionProperty provides the table’s row collection
RowCollection()RowCollection
ColumnCollection()ColumnCollectionProperty provides the table’s column collection
ColumnCollection()ColumnCollection
ITableFormat()ITableFormatProperty provides the table format interface
TableFormat()TableFormatProperty provides the concrete table format object
TableStylePreset()TableStylePresetReturns the preset style applied to the table
IGraphicalObjectLock()IGraphicalObjectLockReturns the lock interface controlling object editing
IGraphicalObject()IGraphicalObjectReturns the graphical object interface for the table
IBulkTextFormattable()IBulkTextFormattableReturns the bulk text formatting interface
Table()
Table()
~Table()
Table()
init_internal(xml_element: pugi::xml_node, slide_part: Internal::pptx::SlidePart, parent_slide: IBaseSlide)Initialize this table from an XML element within a slide part.
rows()RowCollectionReturns the collection of rows in this table.
rows()RowCollectionReturns the collection of rows in this table.
columns()ColumnCollectionReturns the collection of columns in this table.
columns()ColumnCollectionReturns the collection of columns in this table.
cell(row: std::size_t, col: std::size_t)CellReturns the cell at the given row and column.
table_format()ITableFormatReturns the TableFormat object. Read-only.
table_format_obj()TableFormat
style_preset()TableStylePresetGets the builtin table style preset.
set_style_preset(value: TableStylePreset)Sets the builtin table style preset.
right_to_left()boolDetermines whether the table has right to left reading order.
set_right_to_left(value: bool)
first_row()boolDetermines whether the first row has special formatting.
set_first_row(value: bool)
first_col()boolDetermines whether the first column has special formatting.
set_first_col(value: bool)
last_row()boolDetermines whether the last row has special formatting.
set_last_row(value: bool)
last_col()boolDetermines whether the last column has special formatting.
set_last_col(value: bool)
horizontal_banding()boolDetermines whether even rows have different formatting.
set_horizontal_banding(value: bool)
vertical_banding()boolDetermines whether even columns have different formatting.
set_vertical_banding(value: bool)
graphical_object_lock()IGraphicalObjectLockReturns nullptr — graphical object locks are not yet implemented.
as_i_graphical_object()IGraphicalObjectReturns base IGraphicalObject interface.
as_i_bulk_text_formattable()IBulkTextFormattableReturns base IBulkTextFormattable interface.
merge_cells(cell1: Cell, cell2: Cell, allow_splitting: bool)CellMerges two cells, expanding cell1 to cover the area of both cells.
set_text_format(source: IPortionFormat)IBulkTextFormattable overrides (no-op stubs for the interface).
set_text_format(source: IParagraphFormat)IBulkTextFormattable overrides (no-op stubs for the interface).
set_text_format(source: ITextFrameFormat)IBulkTextFormattable overrides (no-op stubs for the interface).
get_tbl_pr()pugi::xml_nodeReturns the cached node, or an empty node if not present.
ensure_tbl_pr()pugi::xml_nodeReturns the node, creating it as the first child of if absent.
get_bool_attr(attr_name: std::string_view)boolReads a boolean attribute from (“1” = true, absent/“0” = false).
set_bool_attr(attr_name: std::string_view, value: bool)Sets or removes a boolean attribute on , then saves.
find_style_element(tbl_pr: pugi::xml_node)pugi::xml_nodeFinds the table style element — or legacy .
read_style_guid(style_el: pugi::xml_node)std::stringReads the GUID string from a style element (text content or val attribute).
xml_element()pugi::xml_nodeReturns the backing XML element.
tbl()pugi::xml_nodeReturns the element.

Enumerations

Được định nghĩa trong include/Aspose/Slides/Foss/cell.h. Các thành viên chính:

EnumerationsEnumerationsEnumerations
text_frame()EnumerationsTextFrame chứa văn bản ô.
cell_format()EnumerationsĐịnh dạng viền và tô màu ô.
text_vertical_type()EnumerationsĐịnh hướng văn bản dọc.
text_anchor_type()EnumerationsCăn văn bản trong ô.

RowCollection / ColumnCollection

Các collections có thể lặp lại với các phương thức:

EnumerationsEnumerations
size()Số hàng/cột.
add_clone(...)Sao chép và thêm một hàng/cột.
insert_clone(...)Sao chép và chèn vào vị trí.
remove_at(int index)Xóa tại chỉ mục.
begin() / end()Hỗ trợ iterator.

Ví dụ sử dụng

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

Presentation prs("deck.pptx");
// Access a table shape on slide 0
// auto& table = dynamic_cast<Table&>(prs.slides()[0].shapes()[0]);
// for (auto& row : table.rows()) {
//     for (auto& cell : row.cells()) {
//         std::cout << cell.text_frame()->text() << "\t";
//     }
//     std::cout << std::endl;
// }

Xem Thêm

 Tiếng Việt