OpenWord 1.0.0
Modern C++17 library for parsing, manipulating, and saving DOCX files.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
openword::Table Class Reference

Represents a Table in the Word document. More...

#include <Document.h>

Public Member Functions

 Table (void *node)
 
Cell cell (int row, int col)
 
Row row (int rowIndex)
 
std::vector< Rowrows () const
 
void mergeCells (int startRow, int startCol, int endRow, int endCol)
 
TablesetBorders (const BorderSettings &all)
 
TablesetBorders (const BorderSettings &outer, const BorderSettings &inner)
 
TablesetBorders (const BorderSettings &top, const BorderSettings &bottom, const BorderSettings &left, const BorderSettings &right, const BorderSettings &insideH, const BorderSettings &insideV)
 
TablesetColumnWidth (int colIndex, int twips)
 
TablesetColumnWidths (const std::vector< int > &twipsList)
 
TablesetAlignment (gsl::czstring align)
 
int gridSpan () const
 
std::string vMerge () const
 
std::vector< BlockElementelements () const
 
int replaceText (const std::string &search, const std::string &replace)
 
std::string text () const
 
void remove ()
 
Table cloneAfter ()
 
Paragraph insertParagraphAfter (const std::string &text="")
 

Detailed Description

Represents a Table in the Word document.

Example: Creating and Formatting a Table
auto t = doc.addTable(2, 2);
t.cell(0, 0).addParagraph("Top Left");
t.row(0).setRepeatHeaderRow(true);
Definition Document.h:74

Constructor & Destructor Documentation

◆ Table()

openword::Table::Table ( void *  node)
explicit

Member Function Documentation

◆ cell()

Cell openword::Table::cell ( int  row,
int  col 
)

◆ cloneAfter()

Table openword::Table::cloneAfter ( )

◆ elements()

std::vector< BlockElement > openword::Table::elements ( ) const

◆ gridSpan()

int openword::Table::gridSpan ( ) const

◆ insertParagraphAfter()

Paragraph openword::Table::insertParagraphAfter ( const std::string &  text = "")

◆ mergeCells()

void openword::Table::mergeCells ( int  startRow,
int  startCol,
int  endRow,
int  endCol 
)

◆ remove()

void openword::Table::remove ( )

◆ replaceText()

int openword::Table::replaceText ( const std::string &  search,
const std::string &  replace 
)

◆ row()

Row openword::Table::row ( int  rowIndex)

◆ rows()

std::vector< Row > openword::Table::rows ( ) const

◆ setAlignment()

Table & openword::Table::setAlignment ( gsl::czstring  align)

◆ setBorders() [1/3]

Table & openword::Table::setBorders ( const BorderSettings all)

◆ setBorders() [2/3]

Table & openword::Table::setBorders ( const BorderSettings outer,
const BorderSettings inner 
)

◆ setBorders() [3/3]

Table & openword::Table::setBorders ( const BorderSettings top,
const BorderSettings bottom,
const BorderSettings left,
const BorderSettings right,
const BorderSettings insideH,
const BorderSettings insideV 
)

◆ setColumnWidth()

Table & openword::Table::setColumnWidth ( int  colIndex,
int  twips 
)

◆ setColumnWidths()

Table & openword::Table::setColumnWidths ( const std::vector< int > &  twipsList)

◆ text()

std::string openword::Table::text ( ) const

◆ vMerge()

std::string openword::Table::vMerge ( ) const

The documentation for this class was generated from the following file: