LibreOffice Module sc (master)
1
|
This is very similar to ScCellValue, except that it references the original value instead of copying it. More...
#include <cellvalue.hxx>
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 () |
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 |
Public Attributes | |
CellType | meType |
union { | |
double mfValue | |
const svl::SharedString * mpString | |
const EditTextObject * mpEditText | |
ScFormulaCell * mpFormula | |
}; | |
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 104 of file cellvalue.hxx.
ScRefCellValue::ScRefCellValue | ( | ) |
Definition at line 559 of file cellvalue.cxx.
References meType.
ScRefCellValue::ScRefCellValue | ( | double | fValue | ) |
Definition at line 560 of file cellvalue.cxx.
References meType.
ScRefCellValue::ScRefCellValue | ( | const svl::SharedString * | pString | ) |
Definition at line 561 of file cellvalue.cxx.
References meType.
ScRefCellValue::ScRefCellValue | ( | const EditTextObject * | pEditText | ) |
Definition at line 562 of file cellvalue.cxx.
References meType.
ScRefCellValue::ScRefCellValue | ( | ScFormulaCell * | pFormula | ) |
Definition at line 563 of file cellvalue.cxx.
ScRefCellValue::ScRefCellValue | ( | ScDocument & | rDoc, |
const ScAddress & | rPos | ||
) |
Take cell value from specified position in specified document.
Definition at line 565 of file cellvalue.cxx.
References assign().
ScRefCellValue::ScRefCellValue | ( | ScDocument & | rDoc, |
const ScAddress & | rPos, | ||
sc::ColumnBlockPosition & | rBlockPos | ||
) |
Definition at line 570 of file cellvalue.cxx.
References assign().
void ScRefCellValue::assign | ( | ScDocument & | rDoc, |
const ScAddress & | rPos | ||
) |
Take cell value from specified position in specified document.
Definition at line 582 of file cellvalue.cxx.
References ScDocument::GetRefCellValue().
Referenced by ScGridWindow::Command(), ScDocument::GetCondResult(), ScOutputData::GetVisibleCell(), lcl_GetHyperlinkCell(), and ScRefCellValue().
void ScRefCellValue::assign | ( | ScDocument & | rDoc, |
const ScAddress & | rPos, | ||
sc::ColumnBlockPosition & | rBlockPos | ||
) |
Definition at line 587 of file cellvalue.cxx.
References ScDocument::GetRefCellValue().
void ScRefCellValue::clear | ( | ) |
Definition at line 575 of file cellvalue.cxx.
References CELLTYPE_NONE, meType, and mfValue.
Referenced by ScCellIterator::getCurrent(), ScUsedAreaIterator::GetNext(), ScOutputData::GetVisibleCell(), lcl_HidePrint(), ScDrawStringsVars::SetAutoText(), ScMyNotEmptyCellsIterator::SetCellData(), ScDrawStringsVars::SetPattern(), ScDrawStringsVars::SetPatternSimple(), ScDrawStringsVars::SetText(), and ScDrawStringsVars::SetTextToWidthOrHash().
void ScRefCellValue::commit | ( | ScDocument & | rDoc, |
const ScAddress & | rPos | ||
) | const |
Set cell value at specified position in specified document.
Definition at line 592 of file cellvalue.cxx.
References CELLTYPE_EDIT, CELLTYPE_FORMULA, CELLTYPE_STRING, CELLTYPE_VALUE, ScEditUtil::Clone(), svl::SharedString::getString(), meType, mfValue, mpEditText, mpFormula, mpString, ScDocument::SetEditText(), ScDocument::SetEmptyCell(), ScDocument::SetFormulaCell(), ScDocument::SetString(), ScSetStringParam::setTextInput(), and ScDocument::SetValue().
Referenced by ScValidationData::IsDataValidCustom(), and ScTable::SearchCell().
bool ScRefCellValue::equalsWithoutFormat | ( | const ScRefCellValue & | r | ) | const |
Definition at line 686 of file cellvalue.cxx.
Referenced by ScDocument::ColDifferences(), ScCellIterator::equalsWithoutFormat(), and ScDocument::RowDifferences().
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 665 of file cellvalue.cxx.
double ScRefCellValue::getRawValue | ( | ) | const |
Retrieve a numeric value without modifying the states of any objects in the referenced document store.
Definition at line 646 of file cellvalue.cxx.
References CELLTYPE_FORMULA, CELLTYPE_VALUE, ScFormulaCell::GetRawValue(), meType, mfValue, and mpFormula.
OUString ScRefCellValue::getString | ( | const ScDocument * | pDoc | ) | const |
Retrieve string value.
Note that this method is NOT thread-safe.
pDoc | Needed to resolve EditCells' field contents, obtain a ScFieldEditEngine from that document. May be NULL if there is no ScDocument in the calling context but then the document specific fields can not be resolved. See ScEditUtil::GetString(). |
Definition at line 660 of file cellvalue.cxx.
Referenced by convertToToken(), ScCellShell::ExecuteFillSingleEdit(), ScTable::FillAnalyse(), ScTable::GetAutoFillPreview(), ScInterpreter::GetCellString(), ScInterpreter::GetCellValueOrZero(), ScDBQueryDataIterator::DataAccessInternal::getCurrent(), ScCellFormat::GetInputString(), ScCellFormat::GetString(), ScCellIterator::getString(), ScDocument::GetStringForFormula(), ScXMLExport::IsCellEqual(), ScDBData::RefreshTableColumnNames(), ScFormatFilterPluginImpl::ScExportDif(), ScCellRangesBase::SetOnePropertyValue(), and ScXMLExport::WriteCell().
double ScRefCellValue::getValue | ( | ) |
Definition at line 632 of file cellvalue.cxx.
References CELLTYPE_FORMULA, CELLTYPE_VALUE, ScFormulaCell::GetValue(), meType, mfValue, and mpFormula.
Referenced by ScQueryCellIterator::BinarySearch(), ScChart2DataSequence::BuildDataCache(), ScTable::CompareCell(), ScInterpreter::CreateMatrixFromDoubleRef(), ScColorScaleFormat::GetColor(), ScDataBarFormat::GetDataBarInfo(), ScGridWindow::GetEditUrl(), ScIconSetFormat::GetIconSetInfo(), ScColorFormat::getValues(), ScCondDateFormatEntry::IsValid(), ScColumn::ParseString(), ScDrawStringsVars::SetTextToWidthOrHash(), and ScTable::TopTenQuery().
bool ScRefCellValue::hasEmptyValue | ( | ) |
Definition at line 675 of file cellvalue.cxx.
References CELLTYPE_FORMULA, isEmpty(), ScFormulaCell::IsEmpty(), meType, and mpFormula.
Referenced by ScInterpreter::Compare(), ScInterpreter::CompareMat(), convertToToken(), ScInterpreter::GetMatrix(), ScInterpreter::JumpMatrix(), ScInterpreter::ScConcat_MS(), ScInterpreter::ScHyperLink(), ScInterpreter::ScLookup(), ScInterpreter::ScNPV(), ScInterpreter::ScSwitch_MS(), and ScInterpreter::ScTextJoin_MS().
bool ScRefCellValue::hasError | ( | ) | const |
Definition at line 627 of file cellvalue.cxx.
References CELLTYPE_FORMULA, ScFormulaCell::GetErrCode(), meType, and mpFormula.
Referenced by ScInterpreter::GetNumberSequenceArray().
bool ScRefCellValue::hasNumeric | ( | ) | const |
Definition at line 622 of file cellvalue.cxx.
References meType, and mpFormula.
Referenced by ScInterpreter::CalculateSkew(), ScInterpreter::FillEntry(), ScColorScaleFormat::GetColor(), ScDataBarFormat::GetDataBarInfo(), ScInterpreter::GetDBParams(), ScGridWindow::GetEditUrl(), ScIconSetFormat::GetIconSetInfo(), ScInterpreter::GetMatrix(), ScColumn::GetNeededSize(), ScChart2DataSequence::getNumberFormatKeyByIndex(), ScInterpreter::GetNumberSequenceArray(), ScInterpreter::GetStVarParams(), ScInterpreter::GetTopNumberArray(), ScColorFormat::getValues(), ScCondDateFormatEntry::IsValid(), ScInterpreter::IterateParameters(), ScInterpreter::IterateParametersIf(), ScInterpreter::IterateParametersIfs(), ScInterpreter::JumpMatrix(), ScOutputData::LayoutStrings(), lcl_IsAutoSumData(), 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::ScValue(), ScInterpreter::ScXor(), ScInterpreter::ScZTest(), ScTable::TopTenQuery(), and ScHTMLExport::WriteCell().
bool ScRefCellValue::hasString | ( | ) | const |
Definition at line 617 of file cellvalue.cxx.
References meType, and mpFormula.
Referenced by ScQueryCellIterator::BinarySearch(), ScInterpreter::Compare(), ScInterpreter::CompareMat(), ScInterpreter::GetStVarParams(), ScQueryCellIterator::GetThis(), ScCompiler::HandleColRowName(), ScCellIterator::hasString(), ScInterpreter::IterateParameters(), ScTable::MaybeAddExtraColumn(), ScDBData::RefreshTableColumnNames(), ScInterpreter::ScCell(), ScInterpreter::ScMax(), ScInterpreter::ScMin(), ScInterpreter::ScSwitch_MS(), and ScInterpreter::ScValue().
bool ScRefCellValue::isEmpty | ( | ) | const |
Definition at line 670 of file cellvalue.cxx.
References CELLTYPE_NONE, and meType.
Referenced by ScCellsEnumeration::CheckPos_Impl(), ScDocument::ColDifferences(), ScTable::CompareCell(), ScDocShell::DBaseExport(), ScOutputData::DrawEdit(), ScOutputData::DrawRotated(), ScTable::ExtendPrintArea(), ScConditionEntry::FillCache(), ScTable::GetAutoFillPreview(), ScInterpreter::GetCellNumberFormat(), ScCountIfCellIterator::GetCount(), ScChart2DataSequence::getData(), ScTabViewShell::GetFormula(), ScUsedAreaIterator::GetNext(), ScChart2DataSequence::getNumberFormatKeyByIndex(), ScCellFormat::GetOutputString(), ScValidationData::GetSelectionFromFormula(), ScDocument::GetStringForFormula(), ScOutputData::GetVisibleCell(), ScCompiler::HandleColRowName(), ScGridWindow::HandleMouseButtonDown(), hasEmptyValue(), ScTable::InvalidateTextWidth(), ScOutputData::IsAvailable(), ScGridWindow::IsCellCoveredByText(), ScCellIterator::isEmpty(), ScOutputData::IsEmptyCellText(), ScInterpreter::IterateParameters(), ScOutputData::LayoutStrings(), lcl_GetCellContent(), lcl_GetHyperlinkCell(), lcl_GetInputString(), ScTable::MaybeAddExtraColumn(), ScDocument::RowDifferences(), ScInterpreter::ScConcat_MS(), ScInterpreter::ScSwitch_MS(), ScInterpreter::ScTextJoin_MS(), ScTable::SearchCell(), ScTable::SearchRangeForAllEmptyCells(), ScDrawStringsVars::SetText(), and ScHTMLExport::WriteCell().
union { ... } |
CellType ScRefCellValue::meType |
Definition at line 106 of file cellvalue.hxx.
Referenced by ScViewFunc::ApplySelectionPattern(), ScDocShell::AsciiSave(), ScCellValue::assign(), ScQueryCellIterator::BinarySearch(), ScChart2DataSequence::BuildDataCache(), clear(), ScGridWindow::Command(), commit(), ScTable::CompareCell(), convertToToken(), 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(), ScInterpreter::GetCellString(), ScColumn::GetCellValue(), ScCellIterator::getCellValue(), ScInterpreter::GetCellValueOrZero(), ScChangeActionContent::GetContentCellType(), ScDBQueryDataIterator::DataAccessInternal::getCurrent(), ScGridWindow::GetEditUrl(), ScTabViewShell::GetFormula(), ScCellFormat::GetInputString(), ScColumn::GetNeededSize(), ScHorizontalValueIterator::GetNext(), ScCellFormat::GetOutputString(), getRawValue(), ScCellFormat::GetString(), ScColumn::GetString(), ScDocument::GetStringForFormula(), ScCellTextData::GetTextForwarder(), ScCellObj::getTokens(), ScCellIterator::getType(), getValue(), hasEmptyValue(), hasError(), hasNumeric(), hasString(), ScDetectiveFunc::InsertErrorLevel(), ScDetectiveFunc::InsertPredLevel(), ScTable::InvalidateTextWidth(), ScValidationData::IsDataValid(), ScValidationData::IsDataValidCustom(), ScXMLExport::IsEditCell(), isEmpty(), ScConditionEntry::IsError(), ScInterpreter::IsEven(), ScGridWindow::IsSpellErrorAtPos(), ScInterpreter::IsString(), ScInterpreter::IterateParameters(), ScInterpreter::IterateParametersIf(), ScInterpreter::IterateParametersIfs(), ScOutputData::LayoutStrings(), lcl_DoHyperlinkResult(), lcl_GetCellContent(), lcl_GetHyperlinkCell(), lcl_GetInputString(), lcl_IsAutoSumData(), lcl_IsEditableMatrix(), lcl_SafeIsValue(), ScColumn::ParseString(), ScXMLTableRowCellContext::PutTextCell(), SpellCheckContext::SpellCheckCache::query(), ScTable::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::ScType(), ScTable::SearchCell(), SpellCheckContext::SpellCheckCache::set(), ScMyNotEmptyCellsIterator::SetCellData(), ScOutputData::SetEditSyntaxColor(), ScOutputData::SetSyntaxColor(), ScDrawStringsVars::SetTextToWidthOrHash(), ScDocument::TransliterateText(), ScTabViewShell::UpdateInputHandler(), ScRTFExport::WriteCell(), ScHTMLExport::WriteCell(), ScXMLExport::WriteCell(), and XclExpCellTable::XclExpCellTable().
double ScRefCellValue::mfValue |
Definition at line 108 of file cellvalue.hxx.
Referenced by ScCellValue::assign(), ScQueryCellIterator::BinarySearch(), clear(), commit(), convertToToken(), ScTable::FillAnalyse(), ScDocumentImport::fillDownCells(), ScTable::FillSeries(), ScTable::GetAutoFillPreview(), ScInterpreter::GetCellString(), ScColumn::GetCellValue(), ScCellIterator::getCellValue(), ScInterpreter::GetCellValueOrZero(), ScDBQueryDataIterator::DataAccessInternal::getCurrent(), ScCellFormat::GetInputString(), ScHorizontalValueIterator::GetNext(), getRawValue(), ScCellFormat::GetString(), ScDocument::GetStringForFormula(), getValue(), ScXMLExport::IsCellEqual(), ScValidationData::IsDataValid(), ScValidationData::IsDataValidCustom(), lcl_GetCellContent(), SameValue(), ScHTMLExport::WriteCell(), ScXMLExport::WriteCell(), and XclExpCellTable::XclExpCellTable().
const EditTextObject* ScRefCellValue::mpEditText |
Definition at line 110 of file cellvalue.hxx.
Referenced by ScViewFunc::ApplySelectionPattern(), ScDocShell::AsciiSave(), ScCellValue::assign(), commit(), ScOutputData::DrawRotated(), ScConversionEngineBase::FillFromCell(), ScColumn::GetCellValue(), ScCellIterator::getCellValue(), ScCellIterator::getEditText(), ScGridWindow::GetEditUrl(), ScColumn::GetNeededSize(), ScCellFormat::GetOutputString(), ScCellTextData::GetTextForwarder(), ScValidationData::IsDataValid(), ScGridWindow::IsSpellErrorAtPos(), lcl_GetCellContent(), lcl_GetInputString(), ScAttrArray::RemoveCellCharAttribs(), ScCellValue::ScCellValue(), ScTable::SearchCell(), ScDocument::TransliterateText(), ScTabViewShell::UpdateInputHandler(), ScRTFExport::WriteCell(), ScHTMLExport::WriteCell(), ScXMLExport::WriteCell(), and XclExpCellTable::XclExpCellTable().
ScFormulaCell* ScRefCellValue::mpFormula |
Definition at line 111 of file cellvalue.hxx.
Referenced by ScDocShell::AsciiSave(), ScCellValue::assign(), ScQueryCellIterator::BinarySearch(), ScChart2DataSequence::BuildDataCache(), commit(), ScTable::CompareCell(), convertToToken(), ScTable::DoAutoOutline(), ScImportExport::Doc2Sylk(), ScImportExport::Doc2Text(), ScCellShell::ExecuteFillSingleEdit(), ScAccessibleCell::FillPrecedents(), ScOutputData::FindChanged(), ScDetectiveFunc::FindPredLevel(), ScCellRangeObj::getArrayFormula(), ScCellRangeObj::getArrayTokens(), ScTable::GetAutoFillPreview(), ScInterpreter::GetCellErrCode(), ScInterpreter::GetCellNumberFormat(), ScInterpreter::GetCellString(), ScColumn::GetCellValue(), 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(), getRawValue(), ScCellFormat::GetString(), ScColumn::GetString(), ScDocument::GetStringForFormula(), ScCellObj::getTokens(), getValue(), hasEmptyValue(), hasError(), hasNumeric(), hasString(), ScDetectiveFunc::InsertErrorLevel(), ScDetectiveFunc::InsertPredLevel(), ScTable::InvalidateTextWidth(), ScValidationData::IsDataValid(), ScConditionEntry::IsError(), ScInterpreter::IsEven(), ScInterpreter::IsString(), ScInterpreter::IterateParametersIf(), ScInterpreter::IterateParametersIfs(), ScOutputData::LayoutStrings(), lcl_DoHyperlinkResult(), lcl_GetCellContent(), lcl_GetHyperlinkCell(), lcl_GetInputString(), lcl_IsAutoSumData(), lcl_IsEditableMatrix(), lcl_SafeIsValue(), ScXMLTableRowCellContext::PutTextCell(), ScTable::Query(), ScCellValue::ScCellValue(), ScInterpreter::ScCountIf(), ScFormatFilterPluginImpl::ScExportDif(), ScInterpreter::ScFormula(), ScInterpreter::ScIsValue(), ScInterpreter::ScMatRef(), ScInterpreter::ScMatValue(), ScInterpreter::ScT(), ScTable::SearchCell(), ScDrawStringsVars::SetTextToWidthOrHash(), ScTabViewShell::UpdateInputHandler(), ScHTMLExport::WriteCell(), ScXMLExport::WriteCell(), and XclExpCellTable::XclExpCellTable().
const svl::SharedString* ScRefCellValue::mpString |
Definition at line 109 of file cellvalue.hxx.
Referenced by ScDocShell::AsciiSave(), ScCellValue::assign(), commit(), ScTable::CompareCell(), ScDocumentImport::fillDownCells(), ScColumn::GetCellValue(), ScCellIterator::getCellValue(), ScCellFormat::GetString(), ScValidationData::IsDataValid(), ScValidationData::IsDataValidCustom(), ScGridWindow::IsSpellErrorAtPos(), lcl_GetCellContent(), SpellCheckContext::SpellCheckCache::query(), ScCellValue::ScCellValue(), SpellCheckContext::SpellCheckCache::set(), ScDocument::TransliterateText(), and XclExpCellTable::XclExpCellTable().