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

#include <Document.h>

Public Member Functions

 Run (void *node)
 
RunsetText (const std::string &text)
 
RunsetFontFamily (gsl::czstring ascii, gsl::czstring eastAsia="")
 
RunsetFontSize (int halfPoints)
 
RunsetColor (const Color &color)
 
RunsetBold (bool val=true)
 
RunsetItalic (bool val=true)
 
RunsetUnderline (gsl::czstring val="single")
 
RunsetStrike (bool val=true)
 
RunsetDoubleStrike (bool val=true)
 
RunsetVertAlign (VertAlign align)
 
RunsetHighlight (HighlightColor color)
 
RunsetCharacterSpacing (int twips)
 
RunaddComment (int commentId)
 Anchors an existing comment to this specific text run.
 
RunaddLineBreak ()
 Inserts a soft line break (<w:br/>) in the current run (equivalent to Shift+Enter).
 
RunaddPageBreak ()
 Inserts a hard page break (<w:br w:type="page"/>) pushing subsequent text to the next page.
 
RunsetHighlight (gsl::czstring color)
 
RunsetShading (const Color &fillColor)
 
bool isBold () const
 
bool isItalic () const
 
bool isStrike () const
 
HighlightColor highlightColor () const
 
std::string text () const
 
bool isFootnoteReference () const
 
int footnoteId () const
 
bool isEndnoteReference () const
 
int endnoteId () const
 

Constructor & Destructor Documentation

◆ Run()

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

Member Function Documentation

◆ addComment()

Run & openword::Run::addComment ( int  commentId)

Anchors an existing comment to this specific text run.

Parameters
commentIdThe unique ID of the comment returned by Document::createComment.
Returns
Reference to self for fluent chaining.

◆ addLineBreak()

Run & openword::Run::addLineBreak ( )

Inserts a soft line break (<w:br/>) in the current run (equivalent to Shift+Enter).

Returns
Reference to self for fluent chaining.

◆ addPageBreak()

Run & openword::Run::addPageBreak ( )

Inserts a hard page break (<w:br w:type="page"/>) pushing subsequent text to the next page.

Returns
Reference to self for fluent chaining.

◆ endnoteId()

int openword::Run::endnoteId ( ) const

◆ footnoteId()

int openword::Run::footnoteId ( ) const

◆ highlightColor()

HighlightColor openword::Run::highlightColor ( ) const

◆ isBold()

bool openword::Run::isBold ( ) const

◆ isEndnoteReference()

bool openword::Run::isEndnoteReference ( ) const

◆ isFootnoteReference()

bool openword::Run::isFootnoteReference ( ) const

◆ isItalic()

bool openword::Run::isItalic ( ) const

◆ isStrike()

bool openword::Run::isStrike ( ) const

◆ setBold()

Run & openword::Run::setBold ( bool  val = true)

◆ setCharacterSpacing()

Run & openword::Run::setCharacterSpacing ( int  twips)

◆ setColor()

Run & openword::Run::setColor ( const Color color)

◆ setDoubleStrike()

Run & openword::Run::setDoubleStrike ( bool  val = true)

◆ setFontFamily()

Run & openword::Run::setFontFamily ( gsl::czstring  ascii,
gsl::czstring  eastAsia = "" 
)

◆ setFontSize()

Run & openword::Run::setFontSize ( int  halfPoints)

◆ setHighlight() [1/2]

Run & openword::Run::setHighlight ( gsl::czstring  color)

◆ setHighlight() [2/2]

Run & openword::Run::setHighlight ( HighlightColor  color)

◆ setItalic()

Run & openword::Run::setItalic ( bool  val = true)

◆ setShading()

Run & openword::Run::setShading ( const Color fillColor)

◆ setStrike()

Run & openword::Run::setStrike ( bool  val = true)

◆ setText()

Run & openword::Run::setText ( const std::string &  text)

◆ setUnderline()

Run & openword::Run::setUnderline ( gsl::czstring  val = "single")

◆ setVertAlign()

Run & openword::Run::setVertAlign ( VertAlign  align)

◆ text()

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

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