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::Cell Class Reference

#include <Document.h>

Public Member Functions

 Cell (void *node)
 
Paragraph addParagraph (const std::string &text="")
 
void addHtml (const std::string &html)
 
Table addTable (int rows, int cols)
 Nests a new table inside this cell.
 
void addImage (gsl::czstring image_path, double scale=1.0, ImagePosition position=ImagePosition::Inline, long long xOffset=0, long long yOffset=0)
 
CellsetVertAlign (VerticalAlignment align)
 
CellsetShading (const std::string &hexColor)
 
CellsetWidth (int twips, const std::string &type="dxa")
 
CellsetBorders (const BorderSettings &top, const BorderSettings &bottom, const BorderSettings &left, const BorderSettings &right)
 
CellsetBorders (const BorderSettings &all)
 
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
 
std::vector< Paragraphparagraphs () const
 

Constructor & Destructor Documentation

◆ Cell()

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

Member Function Documentation

◆ addHtml()

void openword::Cell::addHtml ( const std::string &  html)

◆ addImage()

void openword::Cell::addImage ( gsl::czstring  image_path,
double  scale = 1.0,
ImagePosition  position = ImagePosition::Inline,
long long  xOffset = 0,
long long  yOffset = 0 
)

◆ addParagraph()

Paragraph openword::Cell::addParagraph ( const std::string &  text = "")

◆ addTable()

Table openword::Cell::addTable ( int  rows,
int  cols 
)

Nests a new table inside this cell.

Parameters
rowsInitial number of rows.
colsInitial number of columns.
Returns
The proxy object to the newly created nested table.

◆ elements()

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

◆ gridSpan()

int openword::Cell::gridSpan ( ) const

◆ paragraphs()

std::vector< Paragraph > openword::Cell::paragraphs ( ) const

◆ replaceText()

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

◆ setBorders() [1/2]

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

◆ setBorders() [2/2]

Cell & openword::Cell::setBorders ( const BorderSettings top,
const BorderSettings bottom,
const BorderSettings left,
const BorderSettings right 
)

◆ setShading()

Cell & openword::Cell::setShading ( const std::string &  hexColor)

◆ setVertAlign()

Cell & openword::Cell::setVertAlign ( VerticalAlignment  align)

◆ setWidth()

Cell & openword::Cell::setWidth ( int  twips,
const std::string &  type = "dxa" 
)

◆ text()

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

◆ vMerge()

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

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