LibreOffice Module sw (master)  1
Public Member Functions | Protected Types | Protected Member Functions | Static 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]
Collaboration 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
 

Protected Types

enum  NameType {
  EXTRNL_NAME,
  INTRNL_NAME,
  REL_NAME
}
 

Protected Member Functions

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

Static Protected Member Functions

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

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, const OUString &rNm)
 

Detailed Description

Definition at line 57 of file cellfml.hxx.

Member Typedef Documentation

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

Definition at line 59 of file cellfml.hxx.

Member Enumeration Documentation

enum SwTableFormula::NameType
protected
Enumerator
EXTRNL_NAME 
INTRNL_NAME 
REL_NAME 

Definition at line 89 of file cellfml.hxx.

Constructor & Destructor Documentation

SwTableFormula::SwTableFormula ( const OUString &  rFormula)
protected

Definition at line 311 of file cellfml.cxx.

SwTableFormula::~SwTableFormula ( )
virtual

Definition at line 318 of file cellfml.cxx.

SwTableFormula::SwTableFormula ( SwTableFormula const &  )
default
SwTableFormula::SwTableFormula ( SwTableFormula &&  )
default

Member Function Documentation

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

Definition at line 520 of file cellfml.cxx.

References SwTable::GetTableBox().

Referenced by BoxNmToPtr().

void SwTableFormula::BoxNmsToRelNm ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void pPara 
) const
private
void SwTableFormula::BoxNmToPtr ( const SwTable pTable)
void SwTableFormula::ChgValid ( bool  bNew)
inline
const SwTable * SwTableFormula::FindTable ( SwDoc rDoc,
const OUString &  rNm 
)
staticprivate
void SwTableFormula::GetBoxes ( const SwTableBox rStt,
const SwTableBox rEnd,
SwSelBoxes rBoxes 
)
staticprivate
void SwTableFormula::GetBoxesOfFormula ( const SwTable rTable,
SwSelBoxes rBoxes 
)
const OUString& SwTableFormula::GetFormula ( ) const
inline
void SwTableFormula::GetFormulaBoxes ( const SwTable rTable,
OUStringBuffer &  ,
OUString &  rFirstBox,
OUString *  pLastBox,
void pPara 
) const
private
sal_uInt16 SwTableFormula::GetLnPosInTable ( const SwTable rTable,
const SwTableBox pBox 
)
staticprotected
NameType SwTableFormula::GetNameType ( ) const
inline

Definition at line 130 of file cellfml.hxx.

References m_eNmType.

Referenced by SwTableField::GetCommand().

virtual const SwNode* SwTableFormula::GetNodeOfFormula ( ) const
protectedpure virtual
bool SwTableFormula::HasValidBoxes ( ) const
void SwTableFormula::HasValidBoxes_ ( const SwTable rTable,
OUStringBuffer &  ,
OUString &  rFirstBox,
OUString *  pLastBox,
void pPara 
) const
private
bool SwTableFormula::IsIntrnlName ( ) const
inline
bool SwTableFormula::IsValid ( ) const
inline

Definition at line 132 of file cellfml.hxx.

References m_bValidValue.

Referenced by SwTableBox::GetValue(), and sw::DocumentFieldsManager::UpdateTableFields().

OUString SwTableFormula::MakeFormula ( SwTableCalcPara rCalcPara) const
inlineprotected
void SwTableFormula::MakeFormula_ ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void pPara 
) const
private
SwTableFormula& SwTableFormula::operator= ( SwTableFormula const &  )
default
SwTableFormula& SwTableFormula::operator= ( SwTableFormula &&  )
default
void SwTableFormula::PtrToBoxNm ( const SwTable pTable)

create from the internal formula (for CORE) the external formula (for UI)

create external formula (for UI)

Definition at line 542 of file cellfml.cxx.

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

Referenced by SwTableBoxFormula::ChangeState(), SwTableField::GetCommand(), SwCursorShell::GetContentAtPos(), lcl_CopyHint(), lcl_CopyTableBox(), and sw::DocumentFieldsManager::UpdateTableFields().

void SwTableFormula::PtrToBoxNms ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void pPara 
) const
private
void SwTableFormula::RelBoxNmsToPtr ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void pPara 
) const
private
void SwTableFormula::RelNmsToBoxNms ( const SwTable rTable,
OUStringBuffer &  rNewStr,
OUString &  rFirstBox,
OUString *  pLastBox,
void pPara 
) const
private
OUString SwTableFormula::ScanString ( FnScanFormula  fnFormula,
const SwTable rTable,
void pPara 
) const
private
void SwTableFormula::SetFormula ( const OUString &  rNew)
inline

Definition at line 136 of file cellfml.hxx.

References EXTRNL_NAME.

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

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

create from the external/internal formula the relative formula

create relative formula (for copy)

Definition at line 592 of file cellfml.cxx.

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

Referenced by SwTableBoxFormula::ChangeState(), and sw::DocumentFieldsManager::UpdateTableFields().

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 1203 of file cellfml.cxx.

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

Referenced by SwTableBoxFormula::ChangeState().

Member Data Documentation

bool SwTableFormula::m_bValidValue
protected

true: recalculate formula

Definition at line 93 of file cellfml.hxx.

Referenced by IsValid().

NameType SwTableFormula::m_eNmType
protected

current display method

Definition at line 92 of file cellfml.hxx.

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

OUString SwTableFormula::m_sFormula
protected

current formula

Definition at line 91 of file cellfml.hxx.

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


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