LibreOffice Module sc (master) 1
|
#include <rangenam.hxx>
Public Types | |
enum class | Type { Name = 0x0000 , Database = 0x0001 , Criteria = 0x0002 , PrintArea = 0x0004 , ColHeader = 0x0008 , RowHeader = 0x0010 , AbsArea = 0x0020 , RefArea = 0x0040 , AbsPos = 0x0080 } |
enum class | 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 45 of file rangenam.hxx.
|
strong |
Enumerator | |
---|---|
NAME_VALID | |
NAME_INVALID_CELL_REF | |
NAME_INVALID_BAD_STRING |
Definition at line 61 of file rangenam.hxx.
|
strong |
Enumerator | |
---|---|
Name | |
Database | |
Criteria | |
PrintArea | |
ColHeader | |
RowHeader | |
AbsArea | |
RefArea | |
AbsPos |
Definition at line 48 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 45 of file rangenam.cxx.
References aName, ScDocument::CheckLinkFormulaNeedingCheck(), CompileRangeData(), eType, getCharClass(), 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 80 of file rangenam.cxx.
References aName, eType, getCharClass(), InitCode(), nIndex, and pCode.
ScRangeData::ScRangeData | ( | ScDocument & | rDoc, |
const OUString & | rName, | ||
const ScAddress & | rTarget | ||
) |
Definition at line 99 of file rangenam.cxx.
References AbsPos, aName, aPos, formula::FormulaCompiler::CompileTokenArray(), eType, eType, getCharClass(), ScDocument::GetGrammar(), ScSingleRefData::InitAddress(), Name, nIndex, pCode, rDoc, rTarget, and ScSingleRefData::SetFlag3D().
ScRangeData::ScRangeData | ( | const ScRangeData & | rScRangeData, |
ScDocument * | pDocument = nullptr , |
||
const ScAddress * | pPos = nullptr |
||
) |
ScRangeData::~ScRangeData | ( | ) |
Definition at line 137 of file rangenam.cxx.
|
inline |
Definition at line 173 of file rangenam.hxx.
Referenced by ScNameDefDlg::AddPushed().
|
private |
Definition at line 141 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(), ScDocument::IsImportingXML(), p, pCode, rDoc, ScCompiler::SetExtendedErrorDetection(), and svSingleRef.
Referenced by CompileUnresolvedXML(), and ScRangeData().
void ScRangeData::CompileUnresolvedXML | ( | sc::CompileFormulaContext & | rCxt | ) |
Definition at line 178 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 119 of file rangenam.hxx.
References pCode.
Referenced by ScGroupTokenConverter::convert(), oox::xls::DefinedName::convertFormula(), ScChart2DataProvider::detectArguments(), oox::xls::DefinedName::getAbsoluteRange(), ScExternalRefManager::getRangeNameTokensFromSrcDoc(), ScCompiler::HandleRange(), lcl_FindRangeNamesInUse(), and ScDocument::MarkUsedExternalReferences().
|
inline |
Definition at line 121 of file rangenam.hxx.
References pCode.
FormulaError ScRangeData::GetErrCode | ( | ) | const |
Definition at line 515 of file rangenam.cxx.
References pCode.
Referenced by ScNameDefDlg::AddPushed(), and ScCompiler::HandleRange().
|
inline |
Definition at line 116 of file rangenam.hxx.
References nIndex.
Referenced by ScDocument::CopyAdjustRangeName(), ScNamedRangeObj::Modify_Impl(), and ScDocument::PreprocessAllRangeNamesUpdate().
|
inline |
Definition at line 111 of file rangenam.hxx.
|
inline |
Definition at line 110 of file rangenam.hxx.
References aName, and maNewName.
Referenced by XclExpNameManagerImpl::CreateName(), ScExternalRefManager::getRangeNameTokensFromSrcDoc(), ScNamedRangeObj::Modify_Impl(), ScAreaNameIterator::Next(), and ScDocument::PreprocessAllRangeNamesUpdate().
|
inline |
Definition at line 113 of file rangenam.hxx.
References aPos.
Referenced by XclExpNameManagerImpl::CreateName(), ScNamedRangeObj::Modify_Impl(), and ScVbaName::setContent().
OUString ScRangeData::GetSymbol | ( | const formula::FormulaGrammar::Grammar | eGrammar = formula::FormulaGrammar::GRAM_DEFAULT | ) | const |
Definition at line 244 of file rangenam.cxx.
References aPos, formula::FormulaCompiler::CreateStringFromTokenArray(), pCode, and rDoc.
Referenced by XclExpNameManagerImpl::CreateName(), ScDocFunc::CreateOneName(), ScNamedRangeObj::Modify_Impl(), sc::SolverSettings::ReadConstraintPart(), and sc::SolverSettings::ReadParamValue().
OUString ScRangeData::GetSymbol | ( | const ScAddress & | rPos, |
const formula::FormulaGrammar::Grammar | eGrammar = formula::FormulaGrammar::GRAM_DEFAULT |
||
) | const |
Definition at line 252 of file rangenam.cxx.
References aStr, formula::FormulaCompiler::CreateStringFromTokenArray(), pCode, and rDoc.
|
inline |
Definition at line 125 of file rangenam.hxx.
References eType.
Referenced by ScNamedRangeObj::Modify_Impl().
sal_uInt32 ScRangeData::GetUnoType | ( | ) | const |
Definition at line 525 of file rangenam.cxx.
References ColHeader, COLUMN_HEADER, Criteria, HasType(), PrintArea, ROW_HEADER, and RowHeader.
|
inline |
Definition at line 112 of file rangenam.hxx.
References aUpperName.
Referenced by ScDocument::CopyAdjustRangeName(), ScRangeName::erase(), and ScDocFunc::InsertNameList().
void ScRangeData::GuessPosition | ( | ) |
Definition at line 206 of file rangenam.cxx.
References aPos, ScSingleRefData::Col(), formula::FormulaTokenArrayPlainIterator::GetNextReference(), ScSingleRefData::IsColRel(), ScSingleRefData::IsRowRel(), ScSingleRefData::IsTabRel(), pCode, ScSingleRefData::Row(), svDoubleRef, t, and ScSingleRefData::Tab().
bool ScRangeData::HasPossibleAddressConflict | ( | ) | const |
Definition at line 500 of file rangenam.cxx.
References aUpperName, ScAddress::Parse(), rDoc, and ZERO.
bool ScRangeData::HasReferences | ( | ) | const |
Definition at line 520 of file rangenam.cxx.
References pCode.
Referenced by ScChart2DataProvider::detectArguments(), ScCompiler::HandleRange(), and ScFormulaCell::ScFormulaCell().
|
inline |
Definition at line 178 of file rangenam.hxx.
Referenced by XclExpNameManagerImpl::CreateName(), GetUnoType(), and ScDocFunc::InsertNameList().
|
private |
Definition at line 628 of file rangenam.cxx.
References AbsArea, AbsPos, eType, formula::FormulaTokenArrayPlainIterator::GetNextReference(), p, pCode, and svSingleRef.
Referenced by ScRangeData(), and SetCode().
|
inline |
Definition at line 137 of file rangenam.hxx.
References bModified.
|
static |
Definition at line 468 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(), rDoc, and ZERO.
Referenced by ScVbaNames::Add(), ScNamedRangesObj::addNewByName(), IMPL_LINK_NOARG(), ScNameDefDlg::IsNameValid(), ScNameDlg::IsNameValid(), and lcl_GetInputType().
bool ScRangeData::IsRangeAtBlock | ( | const ScRange & | rBlock | ) | const |
Definition at line 362 of file rangenam.cxx.
References IsReference().
bool ScRangeData::IsReference | ( | ScRange & | rRef | ) | const |
Definition at line 371 of file rangenam.cxx.
References AbsArea, AbsPos, aPos, eType, pCode, and RefArea.
Referenced by ScHTMLImport::GetHTMLRangeNameList(), ScRefTokenHelper::getRangeFromToken(), and IsRangeAtBlock().
bool ScRangeData::IsValidReference | ( | ScRange & | rRef | ) | const |
Definition at line 387 of file rangenam.cxx.
References AbsArea, AbsPos, aPos, eType, pCode, and RefArea.
Referenced by ScAreaNameIterator::Next().
|
static |
Definition at line 423 of file rangenam.cxx.
References CharName, ScCompiler::IsCharFlagAllConventions(), Name, nPos, ScAddress::Parse(), ScRange::Parse(), rDoc, u, and ZERO.
Referenced by ScDocFunc::CreateOneName().
bool ScRangeData::operator== | ( | const ScRangeData & | rData | ) | const |
void ScRangeData::SetCode | ( | const ScTokenArray & | rArr | ) |
Definition at line 621 of file rangenam.cxx.
References InitCode(), and pCode.
Referenced by oox::xls::DefinedName::convertFormula(), and ScVbaName::setContent().
|
inline |
Definition at line 115 of file rangenam.hxx.
References nIndex.
Referenced by ScViewFunc::InsertName(), ScNamedRangeObj::Modify_Impl(), and ScNameDlg::NameModified().
|
inline |
Does not change the name, but sets maNewName for formula update after dialog.
Definition at line 118 of file rangenam.hxx.
References maNewName.
Referenced by ScDocument::PreprocessAllRangeNamesUpdate().
void ScRangeData::UpdateDeleteTab | ( | sc::RefUpdateDeleteTabContext & | rCxt, |
SCTAB | nLocalTab | ||
) |
Definition at line 405 of file rangenam.cxx.
References aPos, sc::RefUpdateDeleteTabContext::maUpdatedNames, sc::RefUpdateResult::mbReferenceModified, nIndex, pCode, sc::UpdatedRangeNames::setUpdatedName(), and ScRangeUpdater::UpdateDeleteTab().
Definition at line 310 of file rangenam.cxx.
References aPos, bModified, formula::FormulaTokenArrayPlainIterator::GetNextReference(), ScDocument::GetSheetLimits(), 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 395 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 414 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 268 of file rangenam.cxx.
References aPos, bModified, sc::RefUpdateContext::maUpdatedNames, sc::RefUpdateResult::mbReferenceModified, nIndex, pCode, and sc::UpdatedRangeNames::setUpdatedName().
void ScRangeData::UpdateSymbol | ( | OUStringBuffer & | rBuffer, |
const ScAddress & | rPos | ||
) |
Definition at line 260 of file rangenam.cxx.
References formula::FormulaCompiler::CreateStringFromTokenArray(), formula::FormulaGrammar::GRAM_DEFAULT, ScCompiler::MoveRelWrap(), pCode, and rDoc.
Definition at line 276 of file rangenam.cxx.
References aPos, bModified, formula::FormulaTokenArrayPlainIterator::GetNextReference(), ScDocument::GetSheetLimits(), 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 535 of file rangenam.cxx.
References aPos, formula::FormulaTokenArrayPlainIterator::GetNextReference(), ScDocument::GetSheetLimits(), ScDocument::GetTableCount(), 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().
|
private |
Definition at line 69 of file rangenam.hxx.
Referenced by GetName().
|
private |
Definition at line 74 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 70 of file rangenam.hxx.
Referenced by GetUpperName(), and HasPossibleAddressConflict().
|
private |
Definition at line 79 of file rangenam.hxx.
Referenced by IsModified(), UpdateGrow(), UpdateReference(), and UpdateTranspose().
|
private |
Definition at line 77 of file rangenam.hxx.
Referenced by CompileRangeData(), and CompileUnresolvedXML().
|
private |
Definition at line 75 of file rangenam.hxx.
Referenced by AddType(), CompileRangeData(), GetType(), HasType(), InitCode(), IsReference(), IsValidReference(), and ScRangeData().
|
private |
used for formulas after changing names in the dialog
Definition at line 71 of file rangenam.hxx.
Referenced by GetName(), and SetNewName().
|
private |
Definition at line 78 of file rangenam.hxx.
Referenced by GetIndex(), SetIndex(), UpdateDeleteTab(), UpdateInsertTab(), UpdateMoveTab(), and UpdateReference().
|
private |
Definition at line 73 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 76 of file rangenam.hxx.
Referenced by CompileRangeData(), GetSymbol(), HasPossibleAddressConflict(), IsNameValid(), MakeValidName(), ScRangeData(), UpdateGrow(), UpdateSymbol(), UpdateTranspose(), and ValidateTabRefs().