Table
ImageRenderOptions Table klasa reprezentuje kształt tabeli na slajdzie. Tabele zawierają wiersze i kolumny komórek, z których każda ma własny TextFrame.
ImageRenderOptions: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/table.h>class TableImageRenderOptions: include/Aspose/Slides/Foss/table.h
Powiązane klasy
ImageRenderOptions
Zdefiniowano w include/Aspose/Slides/Foss/row.h. Kluczowe elementy:
| Name | Type | Access | Description |
|---|---|---|---|
Table | Table | Read | Gets the table. |
RowCollection | RowCollection | Read | Gets the row collection. |
ColumnCollection | ColumnCollection | Read | Gets the column collection. |
ITableFormat | ITableFormat | Read | Gets the i table format. |
TableFormat | TableFormat | Read | Gets the table format. |
TableStylePreset | TableStylePreset | Read | Gets the table style preset. |
IGraphicalObjectLock | IGraphicalObjectLock | Read | Gets the i graphical object lock. |
IGraphicalObject | IGraphicalObject | Read | Gets the i graphical object. |
IBulkTextFormattable | IBulkTextFormattable | Read | Gets the i bulk text formattable. |
ImageRenderOptions
Zdefiniowano w include/Aspose/Slides/Foss/column.h. Kluczowe elementy:
| Signature | Description |
|---|---|
Table() → Table | Property provides access to the Table object itself |
Table() → Table | |
RowCollection() → RowCollection | Property provides the table’s row collection |
RowCollection() → RowCollection | |
ColumnCollection() → ColumnCollection | Property provides the table’s column collection |
ColumnCollection() → ColumnCollection | |
ITableFormat() → ITableFormat | Property provides the table format interface |
TableFormat() → TableFormat | Property provides the concrete table format object |
TableStylePreset() → TableStylePreset | Returns the preset style applied to the table |
IGraphicalObjectLock() → IGraphicalObjectLock | Returns the lock interface controlling object editing |
IGraphicalObject() → IGraphicalObject | Returns the graphical object interface for the table |
IBulkTextFormattable() → IBulkTextFormattable | Returns 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() → RowCollection | Returns the collection of rows in this table. |
rows() → RowCollection | Returns the collection of rows in this table. |
columns() → ColumnCollection | Returns the collection of columns in this table. |
columns() → ColumnCollection | Returns the collection of columns in this table. |
cell(row: std::size_t, col: std::size_t) → Cell | Returns the cell at the given row and column. |
table_format() → ITableFormat | Returns the TableFormat object. Read-only. |
table_format_obj() → TableFormat | |
style_preset() → TableStylePreset | Gets the builtin table style preset. |
set_style_preset(value: TableStylePreset) | Sets the builtin table style preset. |
right_to_left() → bool | Determines whether the table has right to left reading order. |
set_right_to_left(value: bool) | |
first_row() → bool | Determines whether the first row has special formatting. |
set_first_row(value: bool) | |
first_col() → bool | Determines whether the first column has special formatting. |
set_first_col(value: bool) | |
last_row() → bool | Determines whether the last row has special formatting. |
set_last_row(value: bool) | |
last_col() → bool | Determines whether the last column has special formatting. |
set_last_col(value: bool) | |
horizontal_banding() → bool | Determines whether even rows have different formatting. |
set_horizontal_banding(value: bool) | |
vertical_banding() → bool | Determines whether even columns have different formatting. |
set_vertical_banding(value: bool) | |
graphical_object_lock() → IGraphicalObjectLock | Returns nullptr — graphical object locks are not yet implemented. |
as_i_graphical_object() → IGraphicalObject | Returns base IGraphicalObject interface. |
as_i_bulk_text_formattable() → IBulkTextFormattable | Returns base IBulkTextFormattable interface. |
merge_cells(cell1: Cell, cell2: Cell, allow_splitting: bool) → Cell | Merges 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_node | Returns the cached node, or an empty node if not present. |
ensure_tbl_pr() → pugi::xml_node | Returns the node, creating it as the first child of if absent. |
get_bool_attr(attr_name: std::string_view) → bool | Reads 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_node | Finds the table style element — or legacy . |
read_style_guid(style_el: pugi::xml_node) → std::string | Reads the GUID string from a style element (text content or val attribute). |
xml_element() → pugi::xml_node | Returns the backing XML element. |
tbl() → pugi::xml_node | Returns the element. |
ImageRenderOptions
Zdefiniowano w include/Aspose/Slides/Foss/cell.h. Kluczowe elementy:
| ImageRenderOptions | ImageRenderOptions | ImageRenderOptions |
|---|---|---|
text_frame() | ImageRenderOptions | TextFrame zawierający tekst komórki. |
cell_format() | ImageRenderOptions | Format obramowania i wypełnienia komórki. |
text_vertical_type() | ImageRenderOptions | Pionowa orientacja tekstu. |
text_anchor_type() | ImageRenderOptions | Kotwiczenie tekstu w komórce. |
RowCollection / ColumnCollection
Iterowalne kolekcje z metodami:
| ImageRenderOptions | ImageRenderOptions |
|---|---|
size() | Liczba wierszy/kolumn. |
add_clone(...) | Klonuj i dołącz wiersz/kolumnę. |
insert_clone(...) | Sklonuj i wstaw w wybranej pozycji. |
remove_at(int index) | Usuń pod indeksem. |
begin() / end() | Obsługa iteratora. |
Przykład użycia
#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;
// }