LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sc::CellValues Class Reference

Think of this as a mini-ScColumn like storage that only stores cell values in a column. More...

#include <cellvalues.hxx>

Public Member Functions

 CellValues ()
 
 ~CellValues ()
 
void transferFrom (ScColumn &rCol, SCROW nRow, size_t nLen)
 Transfer values from specified column. More...
 
void copyTo (ScColumn &rCol, SCROW nRow) const
 
void swapNonEmpty (ScColumn &rCol)
 
void assign (const std::vector< double > &rVals)
 
void assign (const std::vector< ScFormulaCell * > &rVals)
 
size_t size () const
 
void reset (size_t nSize)
 
void setValue (size_t nRow, double fVal)
 
void setValue (size_t nRow, const svl::SharedString &rStr)
 
void setValue (size_t nRow, std::unique_ptr< EditTextObject > pEditText)
 Takes ownership of pEditText. More...
 
void swap (CellValues &r)
 
std::vector< CellValueSpangetNonEmptySpans () const
 

Private Member Functions

 CellValues (const CellValues &)=delete
 
CellValuesoperator= (const CellValues &)=delete
 
void copyCellsTo (ScColumn &rCol, SCROW nRow) const
 
void copyCellTextAttrsTo (ScColumn &rCol, SCROW nRow) const
 

Private Attributes

std::unique_ptr< CellValuesImplmpImpl
 

Detailed Description

Think of this as a mini-ScColumn like storage that only stores cell values in a column.

Definition at line 41 of file cellvalues.hxx.

Constructor & Destructor Documentation

◆ CellValues() [1/2]

sc::CellValues::CellValues ( const CellValues )
privatedelete

◆ CellValues() [2/2]

sc::CellValues::CellValues ( )

Definition at line 46 of file cellvalues.cxx.

◆ ~CellValues()

sc::CellValues::~CellValues ( )

Definition at line 49 of file cellvalues.cxx.

Member Function Documentation

◆ assign() [1/2]

void sc::CellValues::assign ( const std::vector< double > &  rVals)

Definition at line 92 of file cellvalues.cxx.

References mpImpl.

Referenced by sc::UndoSetCells::SetNewValues().

◆ assign() [2/2]

void sc::CellValues::assign ( const std::vector< ScFormulaCell * > &  rVals)

Definition at line 103 of file cellvalues.cxx.

References mpImpl.

◆ copyCellsTo()

void sc::CellValues::copyCellsTo ( ScColumn rCol,
SCROW  nRow 
) const
private

◆ copyCellTextAttrsTo()

void sc::CellValues::copyCellTextAttrsTo ( ScColumn rCol,
SCROW  nRow 
) const
private

Definition at line 243 of file cellvalues.cxx.

References sc::element_type_celltextattr, ScColumn::maCellTextAttrs, and mpImpl.

Referenced by copyTo().

◆ copyTo()

void sc::CellValues::copyTo ( ScColumn rCol,
SCROW  nRow 
) const

Definition at line 62 of file cellvalues.cxx.

References copyCellsTo(), and copyCellTextAttrsTo().

Referenced by ScColumn::CopyCellValuesFrom().

◆ getNonEmptySpans()

std::vector< CellValueSpan > sc::CellValues::getNonEmptySpans ( ) const

Definition at line 162 of file cellvalues.cxx.

References sc::element_type_empty, and mpImpl.

Referenced by sc::TableValues::getNonEmptySpans().

◆ operator=()

CellValues & sc::CellValues::operator= ( const CellValues )
privatedelete

◆ reset()

void sc::CellValues::reset ( size_t  nSize)

Definition at line 128 of file cellvalues.cxx.

References mpImpl.

◆ setValue() [1/3]

void sc::CellValues::setValue ( size_t  nRow,
const svl::SharedString rStr 
)

Definition at line 145 of file cellvalues.cxx.

References mpImpl.

◆ setValue() [2/3]

void sc::CellValues::setValue ( size_t  nRow,
double  fVal 
)

Definition at line 139 of file cellvalues.cxx.

References mpImpl.

◆ setValue() [3/3]

void sc::CellValues::setValue ( size_t  nRow,
std::unique_ptr< EditTextObject pEditText 
)

Takes ownership of pEditText.

Definition at line 151 of file cellvalues.cxx.

References mpImpl.

◆ size()

size_t sc::CellValues::size ( ) const

Definition at line 122 of file cellvalues.cxx.

References mpImpl.

Referenced by ScColumn::CopyCellValuesFrom(), and sc::UndoSetCells::DoChange().

◆ swap()

void sc::CellValues::swap ( CellValues r)

Definition at line 157 of file cellvalues.cxx.

References mpImpl.

Referenced by sc::TableValues::swap().

◆ swapNonEmpty()

void sc::CellValues::swapNonEmpty ( ScColumn rCol)

◆ transferFrom()

void sc::CellValues::transferFrom ( ScColumn rCol,
SCROW  nRow,
size_t  nLen 
)

Transfer values from specified column.

The transferred segment in the source column becomes empty after this call.

Parameters
rColsource column to transfer values from.
nRowtop row position in the source column.
nLenlength of the segment to transfer.

Definition at line 53 of file cellvalues.cxx.

References ScColumn::maCells, ScColumn::maCellTextAttrs, and mpImpl.

Referenced by ScColumn::TransferCellValuesTo().

Member Data Documentation

◆ mpImpl

std::unique_ptr<CellValuesImpl> sc::CellValues::mpImpl
private

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