LibreOffice Module sc (master) 1
Public Member Functions | Private Attributes | List of all members
ScRefCellValue Struct Reference

This is very similar to ScCellValue, except that it references the original value instead of copying it. More...

#include <cellvalue.hxx>

Collaboration diagram for ScRefCellValue:
[legend]

Public Member Functions

 ScRefCellValue ()
 
 ScRefCellValue (double fValue)
 
 ScRefCellValue (const svl::SharedString *pString)
 
 ScRefCellValue (const EditTextObject *pEditText)
 
 ScRefCellValue (ScFormulaCell *pFormula)
 
 ScRefCellValue (ScDocument &rDoc, const ScAddress &rPos)
 Take cell value from specified position in specified document. More...
 
 ScRefCellValue (ScDocument &rDoc, const ScAddress &rPos, sc::ColumnBlockPosition &rBlockPos)
 
void clear ()
 
CellType getType () const
 
double getDouble () const
 
const svl::SharedStringgetSharedString () const
 
const EditTextObjectgetEditText () const
 
ScFormulaCellgetFormula () const
 
void assign (ScDocument &rDoc, const ScAddress &rPos)
 Take cell value from specified position in specified document. More...
 
void assign (ScDocument &rDoc, const ScAddress &rPos, sc::ColumnBlockPosition &rBlockPos)
 
void commit (ScDocument &rDoc, const ScAddress &rPos) const
 Set cell value at specified position in specified document. More...
 
bool hasString () const
 
bool hasNumeric () const
 
bool hasError () const
 
double getValue ()
 
double getRawValue () const
 Retrieve a numeric value without modifying the states of any objects in the referenced document store. More...
 
OUString getString (const ScDocument *pDoc) const
 Retrieve string value. More...
 
OUString getRawString (const ScDocument &rDoc) const
 Retrieve a string value without modifying the states of any objects in the referenced document store. More...
 
bool isEmpty () const
 
bool hasEmptyValue ()
 
bool equalsWithoutFormat (const ScRefCellValue &r) const
 

Private Attributes

CellType meType
 
union {
   double   mfValue
 
   const svl::SharedString *   mpString
 
   const EditTextObject *   mpEditText
 
   ScFormulaCell *   mpFormula
 
}; 
 

Detailed Description

This is very similar to ScCellValue, except that it references the original value instead of copying it.

As such, don't hold an instance of this class any longer than necessary, and absolutely not after the original cell has been destroyed.

Definition at line 107 of file cellvalue.hxx.

Constructor & Destructor Documentation

◆ ScRefCellValue() [1/7]

ScRefCellValue::ScRefCellValue ( )

Definition at line 556 of file cellvalue.cxx.

References meType.

◆ ScRefCellValue() [2/7]

ScRefCellValue::ScRefCellValue ( double  fValue)

Definition at line 557 of file cellvalue.cxx.

References meType.

◆ ScRefCellValue() [3/7]

ScRefCellValue::ScRefCellValue ( const svl::SharedString pString)

Definition at line 558 of file cellvalue.cxx.

References meType.

◆ ScRefCellValue() [4/7]

ScRefCellValue::ScRefCellValue ( const EditTextObject pEditText)

Definition at line 559 of file cellvalue.cxx.

References meType.

◆ ScRefCellValue() [5/7]

ScRefCellValue::ScRefCellValue ( ScFormulaCell pFormula)

Definition at line 560 of file cellvalue.cxx.

References meType, and mpFormula.

◆ ScRefCellValue() [6/7]

ScRefCellValue::ScRefCellValue ( ScDocument rDoc,
const ScAddress rPos 
)

Take cell value from specified position in specified document.

Definition at line 562 of file cellvalue.cxx.

References assign().

◆ ScRefCellValue() [7/7]

ScRefCellValue::ScRefCellValue ( ScDocument rDoc,
const ScAddress rPos,
sc::ColumnBlockPosition rBlockPos 
)

Definition at line 567 of file cellvalue.cxx.

References assign().

Member Function Documentation

◆ assign() [1/2]

void ScRefCellValue::assign ( ScDocument rDoc,
const ScAddress rPos 
)

Take cell value from specified position in specified document.

Definition at line 579 of file cellvalue.cxx.

References ScDocument::GetRefCellValue().

Referenced by ScGridWindow::Command(), ScDocument::GetCondResult(), ScOutputData::GetVisibleCell(), lcl_GetHyperlinkCell(), and ScRefCellValue().

◆ assign() [2/2]

void ScRefCellValue::assign ( ScDocument rDoc,
const ScAddress rPos,
sc::ColumnBlockPosition rBlockPos 
)

Definition at line 584 of file cellvalue.cxx.

References ScDocument::GetRefCellValue().

◆ clear()

void ScRefCellValue::clear ( )

◆ commit()

void ScRefCellValue::commit ( ScDocument rDoc,
const ScAddress rPos 
) const

◆ equalsWithoutFormat()

bool ScRefCellValue::equalsWithoutFormat ( const ScRefCellValue r) const

◆ getDouble()

double ScRefCellValue::getDouble ( ) const
inline

◆ getEditText()

const EditTextObject * ScRefCellValue::getEditText ( ) const
inline

◆ getFormula()

ScFormulaCell * ScRefCellValue::getFormula ( ) const
inline

Definition at line 137 of file cellvalue.hxx.

References CELLTYPE_FORMULA, meType, and mpFormula.

Referenced by ScDocShell::AsciiSave(), ScCellValue::assign(), ScChart2DataSequence::BuildDataCache(), ScQueryEvaluator::compareByRangeLookup(), ScQueryEvaluator::compareByValue(), ScTable::CompareCell(), convertToToken(), ScInterpreter::CreateCellArr(), ScInterpreter::CreateDoubleArr(), ScInterpreter::CreateMatrixFromDoubleRef(), ScInterpreter::CreateStringArr(), ScTable::DoAutoOutline(), ScImportExport::Doc2Sylk(), ScImportExport::Doc2Text(), ScCellShell::ExecuteFillSingleEdit(), ScAccessibleCell::FillPrecedents(), ScOutputData::FindChanged(), ScDetectiveFunc::FindPredLevel(), ScCellRangeObj::getArrayFormula(), ScCellRangeObj::getArrayTokens(), ScTable::GetAutoFillPreview(), ScInterpreter::GetCellErrCode(), ScInterpreter::GetCellNumberFormat(), ScQueryEvaluator::getCellString(), ScInterpreter::GetCellString(), ScCellIterator::getCellValue(), ScInterpreter::GetCellValueOrZero(), ScChangeActionContent::GetContentCellType(), ScCellObj::GetContentType_Impl(), ScDBQueryDataIterator::DataAccessInternal::getCurrent(), ScGridWindow::GetEditUrl(), ScCellObj::getError(), ScTabViewShell::GetFormula(), ScCellIterator::getFormulaCell(), ScCellFormat::GetInputString(), ScColumn::GetNeededSize(), ScHorizontalValueIterator::GetNext(), ScColumn::GetString(), ScCellFormat::GetString(), ScDocument::GetStringForFormula(), ScCellObj::getTokens(), ScDetectiveFunc::InsertErrorLevel(), ScDetectiveFunc::InsertPredLevel(), ScTable::InvalidateTextWidth(), ScValidationData::IsDataValid(), ScConditionEntry::IsError(), ScInterpreter::IsEven(), ScQueryEvaluator::isQueryByValueForCell(), ScInterpreter::IsString(), ScInterpreter::IterateParametersIf(), ScInterpreter::IterateParametersIfs(), ScOutputData::LayoutStrings(), lcl_DoHyperlinkResult(), lcl_GetCellContent(), lcl_GetHyperlinkCell(), lcl_GetInputString(), lcl_IsAutoSumData(), lcl_IsEditableMatrix(), lcl_SafeIsValue(), ScTabViewShell::MakeNumberInfoItem(), ScInterpreter::PopRefListPushMatrixOrRef(), ScQueryEvaluator::processEntry(), ScInterpreter::PushCellResultToken(), ScXMLTableRowCellContext::PutTextCell(), ScXMLTableRowCellContext::PutValueCell(), ScTable::Query(), ScCellValue::ScCellValue(), ScInterpreter::ScCountIf(), ScFormatFilterPluginImpl::ScExportDif(), ScInterpreter::ScFormula(), ScInterpreter::ScIsValue(), ScInterpreter::ScMatRef(), ScInterpreter::ScMatValue(), ScInterpreter::ScT(), ScInterpreter::ScTableOp(), ScTable::SearchCell(), ScCellObj::setFormulaResult(), ScDrawStringsVars::SetTextToWidthOrHash(), ScTabViewShell::UpdateInputHandler(), ScHTMLExport::WriteCell(), ScXMLExport::WriteCell(), and XclExpCellTable::XclExpCellTable().

◆ getRawString()

OUString ScRefCellValue::getRawString ( const ScDocument rDoc) const

Retrieve a string value without modifying the states of any objects in the referenced document store.

This method is thread-safe.

Definition at line 662 of file cellvalue.cxx.

◆ getRawValue()

double ScRefCellValue::getRawValue ( ) const

Retrieve a numeric value without modifying the states of any objects in the referenced document store.

Definition at line 643 of file cellvalue.cxx.

References CELLTYPE_FORMULA, CELLTYPE_VALUE, ScFormulaCell::GetRawValue(), meType, mfValue, and mpFormula.

◆ getSharedString()

const svl::SharedString * ScRefCellValue::getSharedString ( ) const
inline

◆ getString()

OUString ScRefCellValue::getString ( const ScDocument pDoc) const

◆ getType()

CellType ScRefCellValue::getType ( ) const
inline

Definition at line 133 of file cellvalue.hxx.

References meType.

Referenced by ScViewFunc::ApplySelectionPattern(), ScDocShell::AsciiSave(), ScCellValue::assign(), ScChart2DataSequence::BuildDataCache(), ScGridWindow::Command(), ScQueryEvaluator::compareByRangeLookup(), ScQueryEvaluator::compareByValue(), ScTable::CompareCell(), convertToToken(), ScInterpreter::CreateCellArr(), ScInterpreter::CreateDoubleArr(), ScInterpreter::CreateMatrixFromDoubleRef(), ScInterpreter::CreateStringArr(), ScDocShell::DBaseExport(), ScTable::DoAutoOutline(), ScImportExport::Doc2Sylk(), ScImportExport::Doc2Text(), ScOutputData::DrawRotated(), ScCellShell::ExecuteFillSingleEdit(), ScTable::FillAnalyse(), ScDocumentImport::fillDownCells(), ScConversionEngineBase::FillFromCell(), ScDocument::FillInfo(), ScAccessibleCell::FillPrecedents(), ScOutputData::FindChanged(), ScDetectiveFunc::FindPredLevel(), ScCellRangeObj::getArrayFormula(), ScCellRangeObj::getArrayTokens(), ScTable::GetAutoFillPreview(), ScInterpreter::GetCellErrCode(), ScInterpreter::GetCellNumberFormat(), ScQueryEvaluator::getCellString(), ScInterpreter::GetCellString(), ScCellIterator::getCellValue(), ScInterpreter::GetCellValueOrZero(), ScChangeActionContent::GetContentCellType(), ScCellObj::GetContentType_Impl(), ScDBQueryDataIterator::DataAccessInternal::getCurrent(), ScTransferObj::GetData(), ScGridWindow::GetEditUrl(), ScCellObj::getError(), ScTabViewShell::GetFormula(), ScCellFormat::GetInputString(), ScColumn::GetNeededSize(), ScHorizontalValueIterator::GetNext(), ScCellFormat::GetOutputString(), ScColumn::GetString(), ScCellFormat::GetString(), ScDocument::GetStringForFormula(), ScCellTextData::GetTextForwarder(), ScCellObj::getTokens(), ScCellIterator::getType(), ScDetectiveFunc::InsertErrorLevel(), oox::xls::WorksheetGlobals::insertHyperlink(), ScDetectiveFunc::InsertPredLevel(), ScTable::InvalidateTextWidth(), ScValidationData::IsDataValid(), ScXMLExport::IsEditCell(), ScConditionEntry::IsError(), ScInterpreter::IsEven(), ScQueryEvaluator::isQueryByValueForCell(), ScInterpreter::IsString(), ScInterpreter::IterateParameters(), ScInterpreter::IterateParametersIf(), ScInterpreter::IterateParametersIfs(), ScOutputData::LayoutStrings(), lcl_DoHyperlinkResult(), lcl_GetCellContent(), lcl_GetHyperlinkCell(), lcl_GetInputString(), lcl_IsAutoSumData(), lcl_IsEditableMatrix(), lcl_SafeIsValue(), ScTabViewShell::MakeNumberInfoItem(), ScColumn::ParseString(), ScQueryEvaluator::processEntry(), ScInterpreter::PushCellResultToken(), ScXMLTableRowCellContext::PutTextCell(), ScXMLTableRowCellContext::PutValueCell(), ScTable::Query(), SpellCheckContext::SpellCheckCache::query(), ScAttrArray::RemoveCellCharAttribs(), SameValue(), ScCellValue::ScCellValue(), ScInterpreter::ScCountIf(), ScFormatFilterPluginImpl::ScExportDif(), ScInterpreter::ScFormula(), ScInterpreter::ScIsEmpty(), ScInterpreter::ScIsFormula(), ScInterpreter::ScIsValue(), ScInterpreter::ScMatRef(), ScInterpreter::ScMatValue(), ScInterpreter::ScT(), ScInterpreter::ScTableOp(), ScInterpreter::ScType(), ScTable::SearchCell(), SpellCheckContext::SpellCheckCache::set(), ScMyNotEmptyCellsIterator::SetCellData(), ScOutputData::SetEditSyntaxColor(), ScCellObj::setFormulaResult(), ScOutputData::SetSyntaxColor(), ScDrawStringsVars::SetTextToWidthOrHash(), ScDocument::TransliterateText(), ScTabViewShell::UpdateInputHandler(), ScHTMLExport::WriteCell(), ScXMLExport::WriteCell(), ScRTFExport::WriteCell(), and XclExpCellTable::XclExpCellTable().

◆ getValue()

double ScRefCellValue::getValue ( )

◆ hasEmptyValue()

bool ScRefCellValue::hasEmptyValue ( )

◆ hasError()

bool ScRefCellValue::hasError ( ) const

◆ hasNumeric()

bool ScRefCellValue::hasNumeric ( ) const

Definition at line 619 of file cellvalue.cxx.

References meType, and mpFormula.

Referenced by ScInterpreter::CalculateSkew(), ScQueryEvaluator::compareByRangeLookup(), ScInterpreter::CreateMatrixFromDoubleRef(), ScInterpreter::FillEntry(), ScColorScaleFormat::GetColor(), ScDataBarFormat::GetDataBarInfo(), ScInterpreter::GetDBParams(), ScInterpreter::GetDoubleOrString(), ScGridWindow::GetEditUrl(), ScIconSetFormat::GetIconSetInfo(), ScInterpreter::GetMatrix(), ScColumn::GetNeededSize(), ScChart2DataSequence::getNumberFormatKeyByIndex(), ScInterpreter::GetNumberSequenceArray(), ScInterpreter::GetRankNumberArray(), ScInterpreter::GetStVarParams(), ScColorFormat::getValues(), ScQueryEvaluator::isQueryByValueForCell(), ScCondDateFormatEntry::IsValid(), ScInterpreter::IterateParameters(), ScInterpreter::IterateParametersIf(), ScInterpreter::IterateParametersIfs(), ScInterpreter::JumpMatrix(), ScOutputData::LayoutStrings(), lcl_IsAutoSumData(), ScCompiler::ParseColRowName(), ScInterpreter::ScAnd(), ScInterpreter::ScAveDev(), ScInterpreter::ScCell(), ScInterpreter::ScGeoMean(), ScInterpreter::ScHarMean(), ScInterpreter::ScHyperLink(), ScInterpreter::ScIsLogical(), ScInterpreter::ScLookup(), ScInterpreter::ScMatch(), ScInterpreter::ScMatValue(), ScInterpreter::ScMax(), ScInterpreter::ScMin(), ScInterpreter::ScNPV(), ScInterpreter::ScOr(), ScInterpreter::ScTableOp(), ScInterpreter::ScValue(), ScInterpreter::ScXor(), ScInterpreter::ScZTest(), ScTable::TopTenQuery(), and ScHTMLExport::WriteCell().

◆ hasString()

bool ScRefCellValue::hasString ( ) const

◆ isEmpty()

bool ScRefCellValue::isEmpty ( ) const

Member Data Documentation

◆ 

union { ... } ScRefCellValue::@16

◆ meType

CellType ScRefCellValue::meType
private

◆ mfValue

double ScRefCellValue::mfValue

Definition at line 112 of file cellvalue.hxx.

Referenced by clear(), commit(), getRawValue(), and getValue().

◆ mpEditText

const EditTextObject* ScRefCellValue::mpEditText

Definition at line 114 of file cellvalue.hxx.

Referenced by commit().

◆ mpFormula

ScFormulaCell* ScRefCellValue::mpFormula

◆ mpString

const svl::SharedString* ScRefCellValue::mpString

Definition at line 113 of file cellvalue.hxx.

Referenced by commit().


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