LibreOffice Module sc (master)
1
|
#include <rangenam.hxx>
Public Types | |
enum | Type { Type::Name = 0x0000, Type::Database = 0x0001, Type::Criteria = 0x0002, Type::PrintArea = 0x0004, Type::ColHeader = 0x0008, Type::RowHeader = 0x0010, Type::AbsArea = 0x0020, Type::RefArea = 0x0040, Type::AbsPos = 0x0080 } |
enum | IsNameValidType { NAME_VALID, NAME_INVALID_CELL_REF, NAME_INVALID_BAD_STRING } |
Static Public Member Functions | |
static void | MakeValidName (const ScDocument &rDoc, OUString &rName) |
static SC_DLLPUBLIC IsNameValidType | IsNameValid (const OUString &rName, const ScDocument &rDoc) |
Private Member Functions | |
void | CompileRangeData (const OUString &rSymbol, bool bSetError) |
void | InitCode () |
Private Attributes | |
OUString | aName |
OUString | aUpperName |
OUString | maNewName |
used for formulas after changing names in the dialog More... | |
std::unique_ptr< ScTokenArray > | pCode |
ScAddress | aPos |
Type | eType |
ScDocument & | rDoc |
formula::FormulaGrammar::Grammar | eTempGrammar |
sal_uInt16 | nIndex |
bool | bModified |
Definition at line 46 of file rangenam.hxx.
Enumerator | |
---|---|
NAME_VALID | |
NAME_INVALID_CELL_REF | |
NAME_INVALID_BAD_STRING |
Definition at line 62 of file rangenam.hxx.
|
strong |
Enumerator | |
---|---|
Name | |
Database | |
Criteria | |
PrintArea | |
ColHeader | |
RowHeader | |
AbsArea | |
RefArea | |
AbsPos |
Definition at line 49 of file rangenam.hxx.
ScRangeData::ScRangeData | ( | ScDocument & | rDoc, |
const OUString & | rName, | ||
const OUString & | rSymbol, | ||
const ScAddress & | rAdr = ScAddress() , |
||
Type | nType = Type::Name , |
||
const formula::FormulaGrammar::Grammar | eGrammar = formula::FormulaGrammar::GRAM_DEFAULT |
||
) |
Definition at line 44 of file rangenam.cxx.
References aName, ScDocument::CheckLinkFormulaNeedingCheck(), CompileRangeData(), eType, ScDocument::IsImportingXML(), nIndex, pCode, and rDoc.
ScRangeData::ScRangeData | ( | ScDocument & | rDoc, |
const OUString & | rName, | ||
const ScTokenArray & | rArr, | ||
const ScAddress & | rAdr = ScAddress() , |
||
Type | nType = Type::Name |
||
) |
Definition at line 79 of file rangenam.cxx.
References aName, eType, InitCode(), nIndex, and pCode.
ScRangeData::ScRangeData | ( | ScDocument & | rDoc, |
const OUString & | rName, | ||
const ScAddress & | rTarget | ||
) |
Definition at line 98 of file rangenam.cxx.
References AbsPos, aName, aPos, formula::FormulaCompiler::CompileTokenArray(), eType, eType, ScDocument::GetGrammar(), ScSingleRefData::InitAddress(), Name, nIndex, pCode, rDoc, and ScSingleRefData::SetFlag3D().
ScRangeData::ScRangeData | ( | const ScRangeData & | rScRangeData, |
ScDocument * | pDocument = nullptr , |
||
const ScAddress * | pPos = nullptr |
||
) |
ScRangeData::~ScRangeData | ( | ) |
Definition at line 136 of file rangenam.cxx.
Definition at line 172 of file rangenam.hxx.
References nType.
Referenced by ScNameDefDlg::AddPushed().
|
private |
Definition at line 140 of file rangenam.cxx.
References AbsArea, AbsPos, aPos, ScCompiler::CompileString(), formula::FormulaCompiler::CompileTokenArray(), eTempGrammar, eType, ScCompiler::EXTENDED_ERROR_DETECTION_NAME_NO_BREAK, formula::FormulaTokenArrayPlainIterator::GetNextReference(), formula::FormulaToken::GetType(), ScDocument::IsImportingXML(), p, pCode, rDoc, ScCompiler::SetExtendedErrorDetection(), and svSingleRef.
Referenced by CompileUnresolvedXML(), and ScRangeData().
void ScRangeData::CompileUnresolvedXML | ( | sc::CompileFormulaContext & | rCxt | ) |
Definition at line 177 of file rangenam.cxx.
References aPos, ScDocument::CheckLinkFormulaNeedingCheck(), CompileRangeData(), formula::FormulaCompiler::CreateStringFromTokenArray(), eTempGrammar, sc::CompileFormulaContext::getDoc(), pCode, and sc::CompileFormulaContext::setGrammar().
|
inline |
Definition at line 120 of file rangenam.hxx.
References pCode.
Referenced by ScGroupTokenConverter::convert(), oox::xls::DefinedName::convertFormula(), ScDocument::FindRangeNamesReferencingSheet(), oox::xls::DefinedName::getAbsoluteRange(), ScExternalRefManager::getRangeNameTokensFromSrcDoc(), ScNamedRangeObj::getTokens(), ScCompiler::HandleRange(), XclImpName::InsertName(), XclExpNameManagerImpl::InsertName(), lcl_FindRangeNamesInUse(), and ScDocument::MarkUsedExternalReferences().
|
inline |
Definition at line 122 of file rangenam.hxx.
References pCode.
FormulaError ScRangeData::GetErrCode | ( | ) | const |
Definition at line 496 of file rangenam.cxx.
References pCode.
Referenced by ScNameDefDlg::AddPushed(), and ScCompiler::HandleRange().
|
inline |
Definition at line 117 of file rangenam.hxx.
References nIndex.
Referenced by ScDocument::CopyAdjustRangeName(), ScNamedRangeObj::getPropertyValue(), ScRangeName::insert(), ScViewFunc::InsertName(), ScCompiler::IsNamedRange(), ScNamedRangeObj::Modify_Impl(), ScNameDlg::NameModified(), and ScDocument::PreprocessAllRangeNamesUpdate().
|
inline |
Definition at line 111 of file rangenam.hxx.
References maNewName.
Referenced by XclExpNameManagerImpl::CreateName(), ScCompiler::CreateStringFromIndex(), ScDocument::FindRangeNamesReferencingSheet(), ScDocument::GetRangeAtBlock(), ScExternalRefManager::getRangeNameTokensFromSrcDoc(), XclExpNameManagerImpl::InsertName(), ScDocFunc::InsertNameList(), ScNamedRangeObj::Modify_Impl(), ScAreaNameIterator::Next(), and ScDocument::PreprocessAllRangeNamesUpdate().
|
inline |
Definition at line 112 of file rangenam.hxx.
References maNewName.
|
inline |
Definition at line 114 of file rangenam.hxx.
References aPos.
Referenced by XclExpNameManagerImpl::CreateName(), ScDocument::FindRangeNamesReferencingSheet(), ScNamedRangeObj::getReferencePosition(), ScNamedRangeObj::Modify_Impl(), and ScVbaName::setContent().
void ScRangeData::GetSymbol | ( | OUString & | rSymbol, |
const formula::FormulaGrammar::Grammar | eGrammar = formula::FormulaGrammar::GRAM_DEFAULT |
||
) | const |
Definition at line 243 of file rangenam.cxx.
References aPos, formula::FormulaCompiler::CreateStringFromTokenArray(), pCode, and rDoc.
Referenced by ScRangeManagerTable::CheckForFormulaString(), XclExpNameManagerImpl::CreateName(), ScDocFunc::CreateOneName(), ScDocShell::DdeCreateLinkSource(), ScVbaName::getContent(), ScNamedRangeObj::getContent(), ScRangeUtil::MakeRangeFromName(), and ScNamedRangeObj::Modify_Impl().
void ScRangeData::GetSymbol | ( | OUString & | rSymbol, |
const ScAddress & | rPos, | ||
const formula::FormulaGrammar::Grammar | eGrammar = formula::FormulaGrammar::GRAM_DEFAULT |
||
) | const |
Definition at line 249 of file rangenam.cxx.
References aStr, formula::FormulaCompiler::CreateStringFromTokenArray(), pCode, and rDoc.
|
inline |
Definition at line 126 of file rangenam.hxx.
References eType.
Referenced by ScNamedRangeObj::Modify_Impl().
sal_uInt32 ScRangeData::GetUnoType | ( | ) | const |
Definition at line 506 of file rangenam.cxx.
References ColHeader, COLUMN_HEADER, Criteria, HasType(), PrintArea, ROW_HEADER, and RowHeader.
|
inline |
Definition at line 113 of file rangenam.hxx.
References aUpperName.
Referenced by ScDocument::CopyAdjustRangeName(), ScRangeName::erase(), ScRangeName::insert(), and ScDocFunc::InsertNameList().
void ScRangeData::GuessPosition | ( | ) |
Definition at line 205 of file rangenam.cxx.
References aPos, ScSingleRefData::Col(), formula::FormulaToken::GetDoubleRef(), formula::FormulaTokenArrayPlainIterator::GetNextReference(), formula::FormulaToken::GetSingleRef(), formula::FormulaToken::GetType(), ScSingleRefData::IsColRel(), ScSingleRefData::IsRowRel(), ScSingleRefData::IsTabRel(), pCode, ScComplexRefData::Ref2, ScSingleRefData::Row(), svDoubleRef, t, and ScSingleRefData::Tab().
Referenced by XclImpName::InsertName().
bool ScRangeData::HasReferences | ( | ) | const |
Definition at line 501 of file rangenam.cxx.
References pCode.
Referenced by ScCompiler::HandleRange(), and ScFormulaCell::ScFormulaCell().
|
inline |
Definition at line 177 of file rangenam.hxx.
Referenced by XclExpNameManagerImpl::CreateName(), ScDocShell::DdeCreateLinkSource(), ScNamedRangeObj::getType(), GetUnoType(), XclExpNameManagerImpl::InsertName(), ScDocFunc::InsertNameList(), and ScNameDlg::UpdateChecks().
|
private |
Definition at line 609 of file rangenam.cxx.
References AbsArea, AbsPos, eType, formula::FormulaTokenArrayPlainIterator::GetNextReference(), formula::FormulaToken::GetType(), p, pCode, and svSingleRef.
Referenced by ScRangeData(), and SetCode().
|
inline |
Definition at line 138 of file rangenam.hxx.
References bModified.
Referenced by ScFormulaCell::UpdateGrow(), and ScFormulaCell::UpdateTranspose().
|
static |
Definition at line 464 of file rangenam.cxx.
References a, CharName, ScCompiler::IsCharFlagAllConventions(), Name, NAME_INVALID_BAD_STRING, NAME_INVALID_CELL_REF, NAME_VALID, nPos, ScAddress::Parse(), ScRange::Parse(), and ZERO.
Referenced by ScVbaNames::Add(), IMPL_LINK_NOARG(), ScNameDefDlg::IsNameValid(), ScNameDlg::IsNameValid(), and lcl_GetInputType().
bool ScRangeData::IsRangeAtBlock | ( | const ScRange & | rBlock | ) | const |
Definition at line 357 of file rangenam.cxx.
References IsReference().
bool ScRangeData::IsReference | ( | ScRange & | rRef | ) | const |
Definition at line 366 of file rangenam.cxx.
References AbsArea, AbsPos, aPos, eType, pCode, and RefArea.
Referenced by ScHTMLImport::GetHTMLRangeNameList(), ScValidationData::GetSelectionFromFormula(), ScSheetSourceDesc::GetSourceRange(), IsRangeAtBlock(), and ScInterpreter::ScIndirect().
bool ScRangeData::IsValidReference | ( | ScRange & | rRef | ) | const |
Definition at line 382 of file rangenam.cxx.
References AbsArea, AbsPos, aPos, eType, pCode, and RefArea.
Referenced by ScAreaLink::FindExtRange(), ScNamedRangeObj::getReferredCells(), XclImpName::InsertName(), lcl_FillRangeFromName(), lcl_GetRange(), and ScAreaNameIterator::Next().
|
static |
Definition at line 419 of file rangenam.cxx.
References CharName, ScCompiler::IsCharFlagAllConventions(), Name, nPos, ScAddress::Parse(), ScRange::Parse(), and ZERO.
Referenced by ScDocFunc::CreateOneName().
bool ScRangeData::operator== | ( | const ScRangeData & | rData | ) | const |
void ScRangeData::SetCode | ( | const ScTokenArray & | rArr | ) |
Definition at line 602 of file rangenam.cxx.
References InitCode(), and pCode.
Referenced by oox::xls::DefinedName::convertFormula(), and ScVbaName::setContent().
|
inline |
Definition at line 116 of file rangenam.hxx.
Referenced by ScRangeName::insert(), XclImpName::InsertName(), ScViewFunc::InsertName(), ScNamedRangeObj::Modify_Impl(), ScNameDlg::NameModified(), and ScDocument::TransposeClip().
|
inline |
Does not change the name, but sets maNewName for formula update after dialog.
Definition at line 119 of file rangenam.hxx.
Referenced by ScDocument::PreprocessAllRangeNamesUpdate().
void ScRangeData::UpdateDeleteTab | ( | sc::RefUpdateDeleteTabContext & | rCxt, |
SCTAB | nLocalTab | ||
) |
Definition at line 400 of file rangenam.cxx.
References aPos, ScAddress::IncTab(), sc::RefUpdateDeleteTabContext::maUpdatedNames, sc::RefUpdateResult::mbReferenceModified, sc::RefUpdateDeleteTabContext::mnDeletePos, sc::RefUpdateDeleteTabContext::mnSheets, nIndex, pCode, sc::UpdatedRangeNames::setUpdatedName(), and ScAddress::Tab().
Definition at line 305 of file rangenam.cxx.
References aPos, bModified, formula::FormulaTokenArrayPlainIterator::GetNextReference(), ScDocument::GetSheetLimits(), formula::FormulaToken::GetType(), ScSingleRefData::IsColRel(), ScSingleRefData::IsFlag3D(), ScSingleRefData::IsRowRel(), ScSingleRefData::IsTabRel(), pCode, rDoc, SingleDoubleRefModifier::Ref(), ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScComplexRefData::SetRange(), svIndex, svSingleRef, t, ScComplexRefData::toAbs(), ScRefUpdate::UpdateGrow(), and UR_NOTHING.
void ScRangeData::UpdateInsertTab | ( | sc::RefUpdateInsertTabContext & | rCxt, |
SCTAB | nLocalTab | ||
) |
Definition at line 390 of file rangenam.cxx.
References aPos, ScAddress::IncTab(), sc::RefUpdateInsertTabContext::maUpdatedNames, sc::RefUpdateResult::mbReferenceModified, sc::RefUpdateInsertTabContext::mnInsertPos, sc::RefUpdateInsertTabContext::mnSheets, nIndex, pCode, sc::UpdatedRangeNames::setUpdatedName(), and ScAddress::Tab().
void ScRangeData::UpdateMoveTab | ( | sc::RefUpdateMoveTabContext & | rCxt, |
SCTAB | nLocalTab | ||
) |
Definition at line 410 of file rangenam.cxx.
References aPos, sc::RefUpdateMoveTabContext::getNewTab(), sc::RefUpdateMoveTabContext::maUpdatedNames, sc::RefUpdateResult::mbReferenceModified, nIndex, pCode, ScAddress::SetTab(), sc::UpdatedRangeNames::setUpdatedName(), and ScAddress::Tab().
void ScRangeData::UpdateReference | ( | sc::RefUpdateContext & | rCxt, |
SCTAB | nLocalTab | ||
) |
nLocalTab | sheet index where this name belongs, or -1 for global name. |
Definition at line 265 of file rangenam.cxx.
References aPos, bModified, sc::RefUpdateContext::maUpdatedNames, sc::RefUpdateResult::mbReferenceModified, nIndex, pCode, and sc::UpdatedRangeNames::setUpdatedName().
Definition at line 257 of file rangenam.cxx.
References formula::FormulaGrammar::GRAM_DEFAULT, pCode, and rDoc.
Referenced by ScDocFunc::InsertNameList().
Definition at line 273 of file rangenam.cxx.
References aPos, bModified, formula::FormulaTokenArrayPlainIterator::GetNextReference(), ScDocument::GetSheetLimits(), formula::FormulaToken::GetType(), ScSingleRefData::IsColRel(), ScSingleRefData::IsFlag3D(), ScSingleRefData::IsRowRel(), ScSingleRefData::IsTabRel(), pCode, rDoc, SingleDoubleRefModifier::Ref(), ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScComplexRefData::SetRange(), svIndex, svSingleRef, t, ScComplexRefData::toAbs(), ScRefUpdate::UpdateTranspose(), and UR_NOTHING.
void ScRangeData::ValidateTabRefs | ( | ) |
Definition at line 516 of file rangenam.cxx.
References aPos, formula::FormulaToken::GetDoubleRef(), formula::FormulaTokenArrayPlainIterator::GetNextReference(), ScDocument::GetSheetLimits(), formula::FormulaToken::GetSingleRef(), ScDocument::GetTableCount(), formula::FormulaToken::GetType(), ScSingleRefData::IsTabDeleted(), ScSingleRefData::IsTabRel(), pCode, rDoc, ScComplexRefData::Ref1, ScComplexRefData::Ref2, formula::FormulaTokenArrayPlainIterator::Reset(), ScSingleRefData::SetAddress(), ScAddress::SetTab(), svDoubleRef, svSingleRef, t, ScAddress::Tab(), and ScSingleRefData::toAbs().
Referenced by ScNamedRangeObj::GetRangeData_Impl(), and ScInterpreter::ScIndirect().
|
private |
Definition at line 70 of file rangenam.hxx.
|
private |
Definition at line 75 of file rangenam.hxx.
Referenced by CompileRangeData(), CompileUnresolvedXML(), GetPos(), GetSymbol(), GuessPosition(), IsReference(), IsValidReference(), ScRangeData(), UpdateDeleteTab(), UpdateGrow(), UpdateInsertTab(), UpdateMoveTab(), UpdateReference(), UpdateTranspose(), and ValidateTabRefs().
|
private |
Definition at line 71 of file rangenam.hxx.
Referenced by GetUpperName().
|
private |
Definition at line 80 of file rangenam.hxx.
Referenced by IsModified(), UpdateGrow(), UpdateReference(), and UpdateTranspose().
|
private |
Definition at line 78 of file rangenam.hxx.
Referenced by CompileRangeData(), and CompileUnresolvedXML().
|
private |
Definition at line 76 of file rangenam.hxx.
Referenced by CompileRangeData(), GetType(), InitCode(), IsReference(), IsValidReference(), and ScRangeData().
|
private |
used for formulas after changing names in the dialog
Definition at line 72 of file rangenam.hxx.
Referenced by GetName().
|
private |
Definition at line 79 of file rangenam.hxx.
Referenced by GetIndex(), UpdateDeleteTab(), UpdateInsertTab(), UpdateMoveTab(), and UpdateReference().
|
private |
Definition at line 74 of file rangenam.hxx.
Referenced by CompileRangeData(), CompileUnresolvedXML(), GetCode(), GetErrCode(), GetSymbol(), GuessPosition(), HasReferences(), InitCode(), IsReference(), IsValidReference(), ScRangeData(), SetCode(), UpdateDeleteTab(), UpdateGrow(), UpdateInsertTab(), UpdateMoveTab(), UpdateReference(), UpdateSymbol(), UpdateTranspose(), and ValidateTabRefs().
|
private |
Definition at line 77 of file rangenam.hxx.
Referenced by CompileRangeData(), GetSymbol(), ScRangeData(), UpdateGrow(), UpdateSymbol(), UpdateTranspose(), and ValidateTabRefs().