Aspose::Words::Tables::CellFormat Class Reference

Represents all formatting for a table cell. More...

#include "Aspose.Words.Cpp/Model/Tables/CellFormat.h"

Inherits IBorderAttrSource, and IShadingAttrSource.

Public Member Functions

double get_LeftPadding ()
 Returns or sets the amount of space (in points) to add to the left of the contents of cell. More...
 
void set_LeftPadding (double value)
 Setter for Aspose::Words::Tables::CellFormat::get_LeftPadding. More...
 
double get_RightPadding ()
 Returns or sets the amount of space (in points) to add to the right of the contents of cell. More...
 
void set_RightPadding (double value)
 Setter for Aspose::Words::Tables::CellFormat::get_RightPadding. More...
 
double get_TopPadding ()
 Returns or sets the amount of space (in points) to add above the contents of cell. More...
 
void set_TopPadding (double value)
 Setter for Aspose::Words::Tables::CellFormat::get_TopPadding. More...
 
double get_BottomPadding ()
 Returns or sets the amount of space (in points) to add below the contents of cell. More...
 
void set_BottomPadding (double value)
 Setter for Aspose::Words::Tables::CellFormat::get_BottomPadding. More...
 
System::SharedPtr< Aspose::Words::BorderCollectionget_Borders ()
 Gets collection of borders of the cell. More...
 
System::SharedPtr< Aspose::Words::Shadingget_Shading ()
 Returns a Shading object that refers to the shading formatting for the cell. More...
 
Aspose::Words::Tables::CellVerticalAlignment get_VerticalAlignment ()
 Returns or sets the vertical alignment of text in the cell. More...
 
void set_VerticalAlignment (Aspose::Words::Tables::CellVerticalAlignment value)
 Setter for Aspose::Words::Tables::CellFormat::get_VerticalAlignment. More...
 
double get_Width ()
 Gets the width of the cell in points. More...
 
void set_Width (double value)
 Setter for Aspose::Words::Tables::CellFormat::get_Width. More...
 
System::SharedPtr< Aspose::Words::Tables::PreferredWidthget_PreferredWidth ()
 Returns or sets the preferred width of the cell. More...
 
void set_PreferredWidth (System::SharedPtr< Aspose::Words::Tables::PreferredWidth > value)
 Setter for Aspose::Words::Tables::CellFormat::get_PreferredWidth. More...
 
Aspose::Words::Tables::CellMerge get_VerticalMerge ()
 Specifies how the cell is merged with other cells vertically. More...
 
void set_VerticalMerge (Aspose::Words::Tables::CellMerge value)
 Setter for Aspose::Words::Tables::CellFormat::get_VerticalMerge. More...
 
Aspose::Words::Tables::CellMerge get_HorizontalMerge ()
 Specifies how the cell is merged horizontally with other cells in the row. More...
 
void set_HorizontalMerge (Aspose::Words::Tables::CellMerge value)
 Setter for Aspose::Words::Tables::CellFormat::get_HorizontalMerge. More...
 
Aspose::Words::TextOrientation get_Orientation ()
 Returns or sets the orientation of text in a table cell. More...
 
void set_Orientation (Aspose::Words::TextOrientation value)
 Setter for Aspose::Words::Tables::CellFormat::get_Orientation. More...
 
bool get_FitText ()
 If true, fits text in the cell, compressing each paragraph to the width of the cell. More...
 
void set_FitText (bool value)
 Setter for Aspose::Words::Tables::CellFormat::get_FitText. More...
 
bool get_WrapText ()
 If true, wrap text for the cell. More...
 
void set_WrapText (bool value)
 Setter for Aspose::Words::Tables::CellFormat::get_WrapText. More...
 
System::SharedPtr< System::Collections::Generic::SortedList< Aspose::Words::BorderType, int32_t > > get_PossibleBorderKeys ()
 
void ClearFormatting ()
 Resets to default cell formatting. Does not change the width of the cell. More...
 
void SetPaddings (double leftPadding, double topPadding, double rightPadding, double bottomPadding)
 Sets the amount of space (in points) to add to the left/top/right/bottom of the contents of cell. More...
 
System::SharedPtr< System::ObjectGetDirectBorderAttr (int32_t key)
 
System::SharedPtr< System::ObjectFetchInheritedBorderAttr (int32_t key)
 
void SetBorderAttr (int32_t key, System::SharedPtr< System::Object > value)
 
System::SharedPtr< System::ObjectFetchInheritedShadingAttr (int32_t key)
 

Detailed Description

Represents all formatting for a table cell.

Member Function Documentation

◆ ClearFormatting()

void Aspose::Words::Tables::CellFormat::ClearFormatting ( )

Resets to default cell formatting. Does not change the width of the cell.

◆ FetchInheritedBorderAttr()

System::SharedPtr<System::Object> Aspose::Words::Tables::CellFormat::FetchInheritedBorderAttr ( int32_t  key)

◆ FetchInheritedShadingAttr()

System::SharedPtr<System::Object> Aspose::Words::Tables::CellFormat::FetchInheritedShadingAttr ( int32_t  key)

◆ get_Borders()

System::SharedPtr<Aspose::Words::BorderCollection> Aspose::Words::Tables::CellFormat::get_Borders ( )

Gets collection of borders of the cell.

◆ get_BottomPadding()

double Aspose::Words::Tables::CellFormat::get_BottomPadding ( )

Returns or sets the amount of space (in points) to add below the contents of cell.

◆ get_FitText()

bool Aspose::Words::Tables::CellFormat::get_FitText ( )

If true, fits text in the cell, compressing each paragraph to the width of the cell.

◆ get_HorizontalMerge()

Aspose::Words::Tables::CellMerge Aspose::Words::Tables::CellFormat::get_HorizontalMerge ( )

Specifies how the cell is merged horizontally with other cells in the row.

See also
Aspose::Words::Tables::CellFormat::get_VerticalMerge

◆ get_LeftPadding()

double Aspose::Words::Tables::CellFormat::get_LeftPadding ( )

Returns or sets the amount of space (in points) to add to the left of the contents of cell.

◆ get_Orientation()

Aspose::Words::TextOrientation Aspose::Words::Tables::CellFormat::get_Orientation ( )

Returns or sets the orientation of text in a table cell.

◆ get_PossibleBorderKeys()

System::SharedPtr<System::Collections::Generic::SortedList<Aspose::Words::BorderType, int32_t> > Aspose::Words::Tables::CellFormat::get_PossibleBorderKeys ( )

◆ get_PreferredWidth()

System::SharedPtr<Aspose::Words::Tables::PreferredWidth> Aspose::Words::Tables::CellFormat::get_PreferredWidth ( )

Returns or sets the preferred width of the cell.

The preferred width (along with the table's Auto Fit option) determines how the actual width of the cell is calculated by the table layout algorithm. Table layout can be performed by Aspose.Words when it saves the document or by Microsoft Word when it displays the document.

The preferred width can be specified in points or in percent. The preferred width can also be specified as "auto", which means no preferred width is specified.

The default value is Aspose::Words::Tables::PreferredWidth::Auto.

See also
Aspose::Words::Tables::CellFormat::get_Width

◆ get_RightPadding()

double Aspose::Words::Tables::CellFormat::get_RightPadding ( )

Returns or sets the amount of space (in points) to add to the right of the contents of cell.

◆ get_Shading()

System::SharedPtr<Aspose::Words::Shading> Aspose::Words::Tables::CellFormat::get_Shading ( )

Returns a Shading object that refers to the shading formatting for the cell.

◆ get_TopPadding()

double Aspose::Words::Tables::CellFormat::get_TopPadding ( )

Returns or sets the amount of space (in points) to add above the contents of cell.

◆ get_VerticalAlignment()

Aspose::Words::Tables::CellVerticalAlignment Aspose::Words::Tables::CellFormat::get_VerticalAlignment ( )

Returns or sets the vertical alignment of text in the cell.

◆ get_VerticalMerge()

Aspose::Words::Tables::CellMerge Aspose::Words::Tables::CellFormat::get_VerticalMerge ( )

Specifies how the cell is merged with other cells vertically.

Cells can only be merged vertically if their left and right boundaries are identical.

When cells are vertically merged, the display areas of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell and all other vertically merged cells must be empty.

See also
Aspose::Words::Tables::CellFormat::get_HorizontalMerge

◆ get_Width()

double Aspose::Words::Tables::CellFormat::get_Width ( )

Gets the width of the cell in points.

The width is calculated by Aspose.Words on document loading and saving. Currently, not every combination of table, cell and document properties is supported. The returned value may not be accurate for some documents. It may not exactly match the cell width as calculated by MS Word when the document is opened in MS Word.

Setting this property is not recommended. There is no guarantee that the cell will actually have the set width. The width may be adjusted to accommodate cell contents in an auto-fit table layout. Cells in other rows may have conflicting width settings. The table may be resized to fit into the container or to meet table width settings. Consider using Aspose::Words::Tables::CellFormat::get_PreferredWidth for setting the cell width. Setting this property sets Aspose::Words::Tables::CellFormat::get_PreferredWidth implicitly since version 15.8.

See also
Aspose::Words::Tables::CellFormat::get_PreferredWidth

◆ get_WrapText()

bool Aspose::Words::Tables::CellFormat::get_WrapText ( )

If true, wrap text for the cell.

◆ GetDirectBorderAttr()

System::SharedPtr<System::Object> Aspose::Words::Tables::CellFormat::GetDirectBorderAttr ( int32_t  key)

◆ set_BottomPadding()

void Aspose::Words::Tables::CellFormat::set_BottomPadding ( double  value)

◆ set_FitText()

void Aspose::Words::Tables::CellFormat::set_FitText ( bool  value)

◆ set_HorizontalMerge()

void Aspose::Words::Tables::CellFormat::set_HorizontalMerge ( Aspose::Words::Tables::CellMerge  value)

◆ set_LeftPadding()

void Aspose::Words::Tables::CellFormat::set_LeftPadding ( double  value)

◆ set_Orientation()

void Aspose::Words::Tables::CellFormat::set_Orientation ( Aspose::Words::TextOrientation  value)

◆ set_PreferredWidth()

void Aspose::Words::Tables::CellFormat::set_PreferredWidth ( System::SharedPtr< Aspose::Words::Tables::PreferredWidth value)

◆ set_RightPadding()

void Aspose::Words::Tables::CellFormat::set_RightPadding ( double  value)

◆ set_TopPadding()

void Aspose::Words::Tables::CellFormat::set_TopPadding ( double  value)

◆ set_VerticalAlignment()

void Aspose::Words::Tables::CellFormat::set_VerticalAlignment ( Aspose::Words::Tables::CellVerticalAlignment  value)

◆ set_VerticalMerge()

void Aspose::Words::Tables::CellFormat::set_VerticalMerge ( Aspose::Words::Tables::CellMerge  value)

◆ set_Width()

void Aspose::Words::Tables::CellFormat::set_Width ( double  value)

◆ set_WrapText()

void Aspose::Words::Tables::CellFormat::set_WrapText ( bool  value)

◆ SetBorderAttr()

void Aspose::Words::Tables::CellFormat::SetBorderAttr ( int32_t  key,
System::SharedPtr< System::Object value 
)

◆ SetPaddings()

void Aspose::Words::Tables::CellFormat::SetPaddings ( double  leftPadding,
double  topPadding,
double  rightPadding,
double  bottomPadding 
)

Sets the amount of space (in points) to add to the left/top/right/bottom of the contents of cell.