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  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 {

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


Definition at line 61 of file rangenam.hxx.

enum ScRangeData::Type

Definition at line 48 of file rangenam.hxx.

Constructor & Destructor Documentation

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::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, false, getCharClass(), InitCode(), nIndex, and pCode.

ScRangeData::ScRangeData ( ScDocument rDoc,
const OUString &  rName,
const ScAddress rTarget 
ScRangeData::ScRangeData ( const ScRangeData rScRangeData,
ScDocument pDocument = nullptr,
const ScAddress pPos = nullptr 

Definition at line 122 of file rangenam.cxx.

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

ScRangeData::~ScRangeData ( )

Definition at line 136 of file rangenam.cxx.

Member Function Documentation

void ScRangeData::AddType ( Type  nType)

Definition at line 173 of file rangenam.hxx.

References nType.

Referenced by ScNameDefDlg::AddPushed().

void ScRangeData::CompileRangeData ( const OUString &  rSymbol,
bool  bSetError 
void ScRangeData::CompileUnresolvedXML ( sc::CompileFormulaContext rCxt)
ScTokenArray* ScRangeData::GetCode ( )
const ScTokenArray* ScRangeData::GetCode ( ) const

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

sal_uInt16 ScRangeData::GetIndex ( ) const
void ScRangeData::GetName ( OUString &  rName) const
const OUString& ScRangeData::GetName ( ) const

Definition at line 111 of file rangenam.hxx.

References maNewName.

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

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.

const OUString& ScRangeData::GetUpperName ( ) const
void ScRangeData::GuessPosition ( )
bool ScRangeData::HasPossibleAddressConflict ( ) const

Definition at line 500 of file rangenam.cxx.

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

bool ScRangeData::HasReferences ( ) const
bool ScRangeData::HasType ( Type  nType) const
void ScRangeData::InitCode ( )
bool ScRangeData::IsModified ( ) const

Definition at line 137 of file rangenam.hxx.

References bModified.

Referenced by ScFormulaCell::UpdateGrow(), and ScFormulaCell::UpdateTranspose().

ScRangeData::IsNameValidType ScRangeData::IsNameValid ( const OUString &  rName,
const ScDocument rDoc 
bool ScRangeData::IsRangeAtBlock ( const ScRange rBlock) const

Definition at line 361 of file rangenam.cxx.

References IsReference().

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

Definition at line 378 of file rangenam.cxx.

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

bool ScRangeData::IsValidReference ( ScRange rRef) const
void ScRangeData::MakeValidName ( const ScDocument rDoc,
OUString &  rName 
bool ScRangeData::operator== ( const ScRangeData rData) const

Definition at line 341 of file rangenam.cxx.

References aName, eType, i, nIndex, and rData.

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

void ScRangeData::SetIndex ( sal_uInt16  nInd)
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.

Referenced by ScDocument::PreprocessAllRangeNamesUpdate().

void ScRangeData::UpdateDeleteTab ( sc::RefUpdateDeleteTabContext rCxt,
SCTAB  nLocalTab 
void ScRangeData::UpdateGrow ( const ScRange rArea,
SCCOL  nGrowX,
SCROW  nGrowY 
void ScRangeData::UpdateInsertTab ( sc::RefUpdateInsertTabContext rCxt,
SCTAB  nLocalTab 
void ScRangeData::UpdateMoveTab ( sc::RefUpdateMoveTabContext rCxt,
SCTAB  nLocalTab 
void ScRangeData::UpdateReference ( sc::RefUpdateContext rCxt,
SCTAB  nLocalTab 
nLocalTabsheet index where this name belongs, or -1 for global name.

Definition at line 267 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 259 of file rangenam.cxx.

References formula::FormulaGrammar::GRAM_DEFAULT, pCode, and rDoc.

Referenced by ScDocFunc::InsertNameList().

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

Member Data Documentation

OUString ScRangeData::aName

Definition at line 69 of file rangenam.hxx.

ScAddress ScRangeData::aPos
OUString ScRangeData::aUpperName

Definition at line 70 of file rangenam.hxx.

Referenced by GetUpperName(), and HasPossibleAddressConflict().

bool ScRangeData::bModified

Definition at line 79 of file rangenam.hxx.

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

formula::FormulaGrammar::Grammar ScRangeData::eTempGrammar

Definition at line 77 of file rangenam.hxx.

Referenced by CompileRangeData(), and CompileUnresolvedXML().

Type ScRangeData::eType
OUString ScRangeData::maNewName

used for formulas after changing names in the dialog

Definition at line 71 of file rangenam.hxx.

Referenced by GetName().

sal_uInt16 ScRangeData::nIndex
std::unique_ptr<ScTokenArray> ScRangeData::pCode
ScDocument& ScRangeData::rDoc

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