LibreOffice Module sw (master) 1
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | List of all members
SwTableFormula Class Referenceabstract

#include <cellfml.hxx>

Inheritance diagram for SwTableFormula:
[legend]

Public Member Functions

virtual ~SwTableFormula ()
 
 SwTableFormula (SwTableFormula const &)=default
 
 SwTableFormula (SwTableFormula &&)=default
 
SwTableFormulaoperator= (SwTableFormula const &)=default
 
SwTableFormulaoperator= (SwTableFormula &&)=default
 
void PtrToBoxNm (const SwTable *pTable)
 create from the internal formula (for CORE) the external formula (for UI) More...
 
void BoxNmToPtr (const SwTable *pTable)
 create from the external formula the internal More...
 
void ToRelBoxNm (const SwTable *pTable)
 create from the external/internal formula the relative formula More...
 
void ToSplitMergeBoxNm (SwTableFormulaUpdate &rTableUpd)
 gets called before/after merging/splitting of tables More...
 
bool IsIntrnlName () const
 
NameType GetNameType () const
 
bool IsValid () const
 
void ChgValid (bool bNew)
 
const OUString & GetFormula () const
 
void SetFormula (const OUString &rNew)
 
void GetBoxesOfFormula (const SwTable &rTable, SwSelBoxes &rBoxes)
 
bool HasValidBoxes () const
 

Static Public Member Functions

static sal_uInt16 GetLnPosInTable (const SwTable &rTable, const SwTableBox *pBox)
 

Protected Types

enum  NameType {
  EXTRNL_NAME ,
  INTRNL_NAME ,
  REL_NAME
}
 

Protected Member Functions

virtual const SwNodeGetNodeOfFormula () const =0
 
 SwTableFormula (OUString aFormula)
 
OUString MakeFormula (SwTableCalcPara &rCalcPara) const
 

Protected Attributes

OUString m_sFormula
 current formula More...
 
NameType m_eNmType
 current display method More...
 
bool m_bValidValue
 true: recalculate formula More...
 

Private Types

typedef void(SwTableFormula::* FnScanFormula) (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *) const
 

Private Member Functions

void BoxNmsToPtr (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *pPara) const
 
void PtrToBoxNms (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *pPara) const
 
void RelNmsToBoxNms (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *pPara) const
 
void RelBoxNmsToPtr (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *pPara) const
 
void BoxNmsToRelNm (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *pPara) const
 
void MakeFormula_ (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *pPara) const
 
void GetFormulaBoxes (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *pPara) const
 
void HasValidBoxes_ (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *pPara) const
 Are all boxes valid that are referenced by the formula? More...
 
void SplitMergeBoxNm_ (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *pPara) const
 
OUString ScanString (FnScanFormula fnFormula, const SwTable &rTable, void *) const
 

Static Private Member Functions

static void GetBoxes (const SwTableBox &rStt, const SwTableBox &rEnd, SwSelBoxes &rBoxes)
 
static const SwTableFindTable (SwDoc &rDoc, std::u16string_view rNm)
 

Detailed Description

Definition at line 60 of file cellfml.hxx.

Member Typedef Documentation

◆ FnScanFormula

typedef void(SwTableFormula::* SwTableFormula::FnScanFormula) (const SwTable &, OUStringBuffer &, OUString &, OUString *, void *) const
private

Definition at line 62 of file cellfml.hxx.

Member Enumeration Documentation

◆ NameType

enum SwTableFormula::NameType
protected
Enumerator
EXTRNL_NAME 
INTRNL_NAME 
REL_NAME 

Definition at line 92 of file cellfml.hxx.

Constructor & Destructor Documentation

◆ SwTableFormula() [1/3]

SwTableFormula::SwTableFormula ( OUString  aFormula)
protected

Definition at line 324 of file cellfml.cxx.

◆ ~SwTableFormula()

SwTableFormula::~SwTableFormula ( )
virtual

Definition at line 331 of file cellfml.cxx.

◆ SwTableFormula() [2/3]

SwTableFormula::SwTableFormula ( SwTableFormula const &  )
default

◆ SwTableFormula() [3/3]

SwTableFormula::SwTableFormula ( SwTableFormula &&  )
default

Member Function Documentation

◆ BoxNmsToPtr()

void SwTableFormula::BoxNmsToPtr ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void *  pPara 
) const
private

Definition at line 558 of file cellfml.cxx.

References SwTable::GetTableBox().

Referenced by BoxNmToPtr().

◆ BoxNmsToRelNm()

void SwTableFormula::BoxNmsToRelNm ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void *  pPara 
) const
private

◆ BoxNmToPtr()

void SwTableFormula::BoxNmToPtr ( const SwTable pTable)

create from the external formula the internal

create internal formula (in CORE)

Definition at line 605 of file cellfml.cxx.

References BoxNmsToPtr(), EXTRNL_NAME, GetNodeOfFormula(), INTRNL_NAME, m_eNmType, m_sFormula, REL_NAME, RelBoxNmsToPtr(), and ScanString().

Referenced by SwTableBoxFormula::Calc(), SwTableField::CalcField(), GetBoxesOfFormula(), SwTableBoxFormula::TryBoxNmToPtr(), and SwTable::UpdateFields().

◆ ChgValid()

void SwTableFormula::ChgValid ( bool  bNew)
inline

◆ FindTable()

const SwTable * SwTableFormula::FindTable ( SwDoc rDoc,
std::u16string_view  rNm 
)
staticprivate

◆ GetBoxes()

void SwTableFormula::GetBoxes ( const SwTableBox rStt,
const SwTableBox rEnd,
SwSelBoxes rBoxes 
)
staticprivate

◆ GetBoxesOfFormula()

void SwTableFormula::GetBoxesOfFormula ( const SwTable rTable,
SwSelBoxes rBoxes 
)

◆ GetFormula()

const OUString & SwTableFormula::GetFormula ( ) const
inline

◆ GetFormulaBoxes()

void SwTableFormula::GetFormulaBoxes ( const SwTable rTable,
OUStringBuffer &  ,
OUString &  rFirstBox,
OUString *  pLastBox,
void *  pPara 
) const
private

◆ GetLnPosInTable()

sal_uInt16 SwTableFormula::GetLnPosInTable ( const SwTable rTable,
const SwTableBox pBox 
)
static

◆ GetNameType()

NameType SwTableFormula::GetNameType ( ) const
inline

Definition at line 132 of file cellfml.hxx.

Referenced by SwTableField::GetCommand().

◆ GetNodeOfFormula()

virtual const SwNode * SwTableFormula::GetNodeOfFormula ( ) const
protectedpure virtual

◆ HasValidBoxes()

bool SwTableFormula::HasValidBoxes ( ) const

◆ HasValidBoxes_()

void SwTableFormula::HasValidBoxes_ ( const SwTable rTable,
OUStringBuffer &  ,
OUString &  rFirstBox,
OUString *  pLastBox,
void *  pPara 
) const
private

◆ IsIntrnlName()

bool SwTableFormula::IsIntrnlName ( ) const
inline

◆ IsValid()

bool SwTableFormula::IsValid ( ) const
inline

◆ MakeFormula()

OUString SwTableFormula::MakeFormula ( SwTableCalcPara rCalcPara) const
inlineprotected

Definition at line 106 of file cellfml.hxx.

References SwTableCalcPara::m_pTable, and MakeFormula_().

Referenced by SwTableBoxFormula::Calc(), and SwTableField::CalcField().

◆ MakeFormula_()

void SwTableFormula::MakeFormula_ ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void *  pPara 
) const
private

◆ operator=() [1/2]

SwTableFormula & SwTableFormula::operator= ( SwTableFormula &&  )
default

◆ operator=() [2/2]

SwTableFormula & SwTableFormula::operator= ( SwTableFormula const &  )
default

◆ PtrToBoxNm()

void SwTableFormula::PtrToBoxNm ( const SwTable pTable)

◆ PtrToBoxNms()

void SwTableFormula::PtrToBoxNms ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void *  pPara 
) const
private

◆ RelBoxNmsToPtr()

void SwTableFormula::RelBoxNmsToPtr ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void *  pPara 
) const
private

◆ RelNmsToBoxNms()

void SwTableFormula::RelNmsToBoxNms ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void *  pPara 
) const
private

◆ ScanString()

OUString SwTableFormula::ScanString ( FnScanFormula  fnFormula,
const SwTable rTable,
void *  pPara 
) const
private

◆ SetFormula()

void SwTableFormula::SetFormula ( const OUString &  rNew)
inline

Definition at line 138 of file cellfml.hxx.

Referenced by SwTableField::PutValue(), and SwTableField::SetPar2().

◆ SplitMergeBoxNm_()

void SwTableFormula::SplitMergeBoxNm_ ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void *  pPara 
) const
private

◆ ToRelBoxNm()

void SwTableFormula::ToRelBoxNm ( const SwTable pTable)

create from the external/internal formula the relative formula

create relative formula (for copy)

Definition at line 630 of file cellfml.cxx.

References BoxNmsToRelNm(), EXTRNL_NAME, GetNodeOfFormula(), INTRNL_NAME, m_eNmType, m_sFormula, REL_NAME, and ScanString().

Referenced by SaveTable::AddFormat(), SwHistorySetFormat::SwHistorySetFormat(), and SwTable::UpdateFields().

◆ ToSplitMergeBoxNm()

void SwTableFormula::ToSplitMergeBoxNm ( SwTableFormulaUpdate rTableUpd)

gets called before/after merging/splitting of tables

Create external formula but remember that the formula is placed in a split/merged table.

Definition at line 1241 of file cellfml.cxx.

References SwNode::FindTableNode(), GetNodeOfFormula(), INTRNL_NAME, m_eNmType, SwTableFormulaUpdate::m_pTable, m_sFormula, ScanString(), and SplitMergeBoxNm_().

Referenced by SwTableBoxFormula::ToSplitMergeBoxNmWithHistory().

Member Data Documentation

◆ m_bValidValue

bool SwTableFormula::m_bValidValue
protected

true: recalculate formula

Definition at line 96 of file cellfml.hxx.

◆ m_eNmType

NameType SwTableFormula::m_eNmType
protected

current display method

Definition at line 95 of file cellfml.hxx.

Referenced by BoxNmsToRelNm(), BoxNmToPtr(), HasValidBoxes_(), PtrToBoxNm(), SplitMergeBoxNm_(), ToRelBoxNm(), and ToSplitMergeBoxNm().

◆ m_sFormula

OUString SwTableFormula::m_sFormula
protected

current formula

Definition at line 94 of file cellfml.hxx.

Referenced by BoxNmToPtr(), PtrToBoxNm(), ScanString(), ToRelBoxNm(), and ToSplitMergeBoxNm().


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