LibreOffice Module sc (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScRangeData Class Reference

#include <rangenam.hxx>

Collaboration diagram for ScRangeData:

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 {

Public Member Functions

SC_DLLPUBLIC 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)
SC_DLLPUBLIC ScRangeData (ScDocument &rDoc, const OUString &rName, const ScTokenArray &rArr, const ScAddress &rAdr=ScAddress(), Type nType=Type::Name)
SC_DLLPUBLIC ScRangeData (ScDocument &rDoc, const OUString &rName, const ScAddress &rTarget)
 ScRangeData (const ScRangeData &rScRangeData, ScDocument *pDocument=nullptr, const ScAddress *pPos=nullptr)
SC_DLLPUBLIC ~ScRangeData ()
bool operator== (const ScRangeData &rData) const
void GetName (OUString &rName) const
const OUString & GetName () const
const OUString & GetUpperName () const
const ScAddressGetPos () const
void SetIndex (sal_uInt16 nInd)
sal_uInt16 GetIndex () const
void SetNewName (const OUString &rNewName)
 Does not change the name, but sets maNewName for formula update after dialog. More...
ScTokenArrayGetCode ()
SC_DLLPUBLIC void SetCode (const ScTokenArray &)
const ScTokenArrayGetCode () const
SC_DLLPUBLIC FormulaError GetErrCode () const
bool HasReferences () const
void AddType (Type nType)
Type GetType () const
bool HasType (Type nType) const
sal_uInt32 GetUnoType () const
SC_DLLPUBLIC OUString GetSymbol (const formula::FormulaGrammar::Grammar eGrammar=formula::FormulaGrammar::GRAM_DEFAULT) const
SC_DLLPUBLIC OUString GetSymbol (const ScAddress &rPos, const formula::FormulaGrammar::Grammar eGrammar=formula::FormulaGrammar::GRAM_DEFAULT) const
void UpdateSymbol (OUStringBuffer &rBuffer, const ScAddress &)
void UpdateReference (sc::RefUpdateContext &rCxt, SCTAB nLocalTab)
bool IsModified () const
SC_DLLPUBLIC void GuessPosition ()
void UpdateTranspose (const ScRange &rSource, const ScAddress &rDest)
void UpdateGrow (const ScRange &rArea, SCCOL nGrowX, SCROW nGrowY)
SC_DLLPUBLIC bool IsReference (ScRange &rRef) const
bool IsReference (ScRange &rRef, const ScAddress &rPos) const
SC_DLLPUBLIC bool IsValidReference (ScRange &rRef) const
bool IsRangeAtBlock (const ScRange &) const
void UpdateInsertTab (sc::RefUpdateInsertTabContext &rCxt, SCTAB nLocalTab)
void UpdateDeleteTab (sc::RefUpdateDeleteTabContext &rCxt, SCTAB nLocalTab)
void UpdateMoveTab (sc::RefUpdateMoveTabContext &rCxt, SCTAB nLocalTab)
void ValidateTabRefs ()
bool HasPossibleAddressConflict () const
void CompileUnresolvedXML (sc::CompileFormulaContext &rCxt)

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< ScTokenArraypCode
ScAddress aPos
Type eType
formula::FormulaGrammar::Grammar eTempGrammar
sal_uInt16 nIndex
bool bModified

Detailed Description

Definition at line 45 of file rangenam.hxx.

Member Enumeration Documentation

◆ IsNameValidType

enum class ScRangeData::IsNameValidType

Definition at line 61 of file rangenam.hxx.

◆ Type

enum class ScRangeData::Type

Definition at line 48 of file rangenam.hxx.

Constructor & Destructor Documentation

◆ ScRangeData() [1/4]

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 

◆ ScRangeData() [2/4]

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() [3/4]

ScRangeData::ScRangeData ( ScDocument rDoc,
const OUString &  rName,
const ScAddress rTarget 

◆ ScRangeData() [4/4]

ScRangeData::ScRangeData ( const ScRangeData rScRangeData,
ScDocument pDocument = nullptr,
const ScAddress pPos = nullptr 

Definition at line 123 of file rangenam.cxx.

References aName, Clone(), eType, nIndex, and pCode.

◆ ~ScRangeData()

ScRangeData::~ScRangeData ( )

Definition at line 137 of file rangenam.cxx.

Member Function Documentation

◆ AddType()

void ScRangeData::AddType ( Type  nType)

Definition at line 173 of file rangenam.hxx.

References eType, and nType.

Referenced by ScNameDefDlg::AddPushed().

◆ CompileRangeData()

void ScRangeData::CompileRangeData ( const OUString &  rSymbol,
bool  bSetError 

◆ CompileUnresolvedXML()

void ScRangeData::CompileUnresolvedXML ( sc::CompileFormulaContext rCxt)

◆ GetCode() [1/2]

ScTokenArray * ScRangeData::GetCode ( )

◆ GetCode() [2/2]

const ScTokenArray * ScRangeData::GetCode ( ) const

Definition at line 121 of file rangenam.hxx.

References pCode.

◆ GetErrCode()

FormulaError ScRangeData::GetErrCode ( ) const

Definition at line 515 of file rangenam.cxx.

References pCode.

Referenced by ScNameDefDlg::AddPushed(), and ScCompiler::HandleRange().

◆ GetIndex()

sal_uInt16 ScRangeData::GetIndex ( ) const

◆ GetName() [1/2]

const OUString & ScRangeData::GetName ( ) const

Definition at line 111 of file rangenam.hxx.

References aName, and maNewName.

◆ GetName() [2/2]

void ScRangeData::GetName ( OUString &  rName) const

◆ GetPos()

const ScAddress & ScRangeData::GetPos ( ) const

◆ GetSymbol() [1/2]

OUString ScRangeData::GetSymbol ( const formula::FormulaGrammar::Grammar  eGrammar = formula::FormulaGrammar::GRAM_DEFAULT) const

◆ GetSymbol() [2/2]

OUString ScRangeData::GetSymbol ( const ScAddress rPos,
const formula::FormulaGrammar::Grammar  eGrammar = formula::FormulaGrammar::GRAM_DEFAULT 
) const

◆ GetType()

Type ScRangeData::GetType ( ) const

Definition at line 125 of file rangenam.hxx.

References eType.

Referenced by ScNamedRangeObj::Modify_Impl().

◆ GetUnoType()

sal_uInt32 ScRangeData::GetUnoType ( ) const

Definition at line 525 of file rangenam.cxx.

References ColHeader, COLUMN_HEADER, Criteria, HasType(), PrintArea, ROW_HEADER, and RowHeader.

◆ GetUpperName()

const OUString & ScRangeData::GetUpperName ( ) const

◆ GuessPosition()

void ScRangeData::GuessPosition ( )

◆ HasPossibleAddressConflict()

bool ScRangeData::HasPossibleAddressConflict ( ) const

Definition at line 500 of file rangenam.cxx.

References aUpperName, ScAddress::Parse(), rDoc, and ZERO.

◆ HasReferences()

bool ScRangeData::HasReferences ( ) const

◆ HasType()

bool ScRangeData::HasType ( Type  nType) const

Definition at line 178 of file rangenam.hxx.

References eType, and nType.

Referenced by XclExpNameManagerImpl::CreateName(), GetUnoType(), and ScDocFunc::InsertNameList().

◆ InitCode()

void ScRangeData::InitCode ( )

◆ IsModified()

bool ScRangeData::IsModified ( ) const

Definition at line 137 of file rangenam.hxx.

References bModified.

◆ IsNameValid()

ScRangeData::IsNameValidType ScRangeData::IsNameValid ( const OUString &  rName,
const ScDocument rDoc 

◆ IsRangeAtBlock()

bool ScRangeData::IsRangeAtBlock ( const ScRange rBlock) const

Definition at line 362 of file rangenam.cxx.

References IsReference().

◆ IsReference() [1/2]

bool ScRangeData::IsReference ( ScRange rRef) const

◆ IsReference() [2/2]

bool ScRangeData::IsReference ( ScRange rRef,
const ScAddress rPos 
) const

Definition at line 379 of file rangenam.cxx.

References AbsArea, AbsPos, eType, pCode, and RefArea.

◆ IsValidReference()

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().

◆ MakeValidName()

void ScRangeData::MakeValidName ( const ScDocument rDoc,
OUString &  rName 

◆ operator==()

bool ScRangeData::operator== ( const ScRangeData rData) const

Definition at line 342 of file rangenam.cxx.

References aName, eType, i, and nIndex.

◆ SetCode()

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().

◆ SetIndex()

void ScRangeData::SetIndex ( sal_uInt16  nInd)

Definition at line 115 of file rangenam.hxx.

References nIndex.

Referenced by ScViewFunc::InsertName(), ScNamedRangeObj::Modify_Impl(), and ScNameDlg::NameModified().

◆ SetNewName()

void ScRangeData::SetNewName ( const OUString &  rNewName)

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().

◆ UpdateDeleteTab()

void ScRangeData::UpdateDeleteTab ( sc::RefUpdateDeleteTabContext rCxt,
SCTAB  nLocalTab 

◆ UpdateGrow()

void ScRangeData::UpdateGrow ( const ScRange rArea,
SCCOL  nGrowX,
SCROW  nGrowY 

◆ UpdateInsertTab()

void ScRangeData::UpdateInsertTab ( sc::RefUpdateInsertTabContext rCxt,
SCTAB  nLocalTab 

◆ UpdateMoveTab()

void ScRangeData::UpdateMoveTab ( sc::RefUpdateMoveTabContext rCxt,
SCTAB  nLocalTab 

◆ UpdateReference()

void ScRangeData::UpdateReference ( sc::RefUpdateContext rCxt,
SCTAB  nLocalTab 
nLocalTabsheet 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().

◆ UpdateSymbol()

void ScRangeData::UpdateSymbol ( OUStringBuffer &  rBuffer,
const ScAddress rPos 

◆ UpdateTranspose()

void ScRangeData::UpdateTranspose ( const ScRange rSource,
const ScAddress rDest 

◆ ValidateTabRefs()

void ScRangeData::ValidateTabRefs ( )

Member Data Documentation

◆ aName

OUString ScRangeData::aName

Definition at line 69 of file rangenam.hxx.

Referenced by GetName().

◆ aPos

ScAddress ScRangeData::aPos

◆ aUpperName

OUString ScRangeData::aUpperName

Definition at line 70 of file rangenam.hxx.

Referenced by GetUpperName(), and HasPossibleAddressConflict().

◆ bModified

bool ScRangeData::bModified

Definition at line 79 of file rangenam.hxx.

Referenced by IsModified(), UpdateGrow(), UpdateReference(), and UpdateTranspose().

◆ eTempGrammar

formula::FormulaGrammar::Grammar ScRangeData::eTempGrammar

Definition at line 77 of file rangenam.hxx.

Referenced by CompileRangeData(), and CompileUnresolvedXML().

◆ eType

Type ScRangeData::eType

◆ maNewName

OUString ScRangeData::maNewName

used for formulas after changing names in the dialog

Definition at line 71 of file rangenam.hxx.

Referenced by GetName(), and SetNewName().

◆ nIndex

sal_uInt16 ScRangeData::nIndex

◆ pCode

std::unique_ptr<ScTokenArray> ScRangeData::pCode

◆ rDoc

ScDocument& ScRangeData::rDoc

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