LibreOffice Module sw (master) 1
|
#include <cellfml.hxx>
Public Member Functions | |
virtual | ~SwTableFormula () |
SwTableFormula (SwTableFormula const &)=default | |
SwTableFormula (SwTableFormula &&)=default | |
SwTableFormula & | operator= (SwTableFormula const &)=default |
SwTableFormula & | operator= (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 SwNode * | GetNodeOfFormula () 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 SwTable * | FindTable (SwDoc &rDoc, std::u16string_view rNm) |
Definition at line 60 of file cellfml.hxx.
|
private |
Definition at line 62 of file cellfml.hxx.
|
protected |
Enumerator | |
---|---|
EXTRNL_NAME | |
INTRNL_NAME | |
REL_NAME |
Definition at line 92 of file cellfml.hxx.
|
protected |
Definition at line 324 of file cellfml.cxx.
|
virtual |
Definition at line 331 of file cellfml.cxx.
|
default |
|
default |
|
private |
Definition at line 558 of file cellfml.cxx.
References SwTable::GetTableBox().
Referenced by BoxNmToPtr().
|
private |
Definition at line 492 of file cellfml.cxx.
References EXTRNL_NAME, SwNode::FindTableBoxStartNode(), SwNode::FindTableNode(), SwNode::GetIndex(), SwTableBox::GetName(), SwTableNode::GetTable(), SwTable::GetTableBox(), lcl_BoxNmToRel(), and m_eNmType.
Referenced by ToRelBoxNm().
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().
|
inline |
Definition at line 135 of file cellfml.hxx.
Referenced by SwTableBoxFormula::Calc(), SwTableField::CalcField(), and sw::DocumentFieldsManager::UpdateTableFields().
Definition at line 749 of file cellfml.cxx.
References SwTable::FindTable(), SwFormat::GetName(), SwNode::GetNodes(), SwTableBox::GetSttNd(), SwDoc::GetTableFrameFormats(), SwTable::GetTabSortBoxes(), o3tl::getToken(), SwNodes::IsDocNodes(), and sw::FrameFormats< value_type >::size().
Referenced by ScanString(), and SplitMergeBoxNm_().
|
staticprivate |
Definition at line 967 of file cellfml.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::erase(), SwFrame::FindTabFrame(), SwTable::GetRowsToRepeat(), SwTabFrame::GetTable(), GetTableSel(), SwTableLine::GetUpper(), SwTableBox::GetUpper(), SwFrame::GetUpper(), SwTable::IsHeadline(), lcl_GetBoxFrame(), n, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by GetFormulaBoxes(), and MakeFormula_().
void SwTableFormula::GetBoxesOfFormula | ( | const SwTable & | rTable, |
SwSelBoxes & | rBoxes | ||
) |
Definition at line 924 of file cellfml.cxx.
References BoxNmToPtr(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::clear(), GetFormulaBoxes(), and ScanString().
Referenced by lcl_IsFormulaSelBoxes().
|
inline |
Definition at line 137 of file cellfml.hxx.
Referenced by SwTableBoxFormula::Clone(), SwTableField::Copy(), SwTableField::GetCommand(), SwAccessibleCell::getExtendedAttributes(), SwXCell::getFormula(), SwTableField::GetPar2(), SwTableBoxFormula::operator==(), and SwInputWindow::ShowWin().
|
private |
Definition at line 933 of file cellfml.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), GetBoxes(), SwTable::GetTabSortBoxes(), and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert().
Referenced by GetBoxesOfFormula().
|
static |
Definition at line 1082 of file cellfml.cxx.
References SwTableLines::GetPos(), SwTable::GetTabLines(), SwTableLine::GetUpper(), and SwTableBox::GetUpper().
Referenced by SwTable::Split(), and SplitMergeBoxNm_().
|
inline |
Definition at line 132 of file cellfml.hxx.
Referenced by SwTableField::GetCommand().
|
protectedpure virtual |
Implemented in SwTableBoxFormula, and SwTableField.
Referenced by BoxNmToPtr(), HasValidBoxes(), HasValidBoxes_(), PtrToBoxNm(), SplitMergeBoxNm_(), ToRelBoxNm(), and ToSplitMergeBoxNm().
bool SwTableFormula::HasValidBoxes | ( | ) | const |
Definition at line 1072 of file cellfml.cxx.
References SwNode::FindTableNode(), GetNodeOfFormula(), HasValidBoxes_(), and ScanString().
|
private |
Are all boxes valid that are referenced by the formula?
Definition at line 1024 of file cellfml.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), EXTRNL_NAME, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), SwNode::FindTableBoxStartNode(), SwNode::GetIndex(), GetNodeOfFormula(), SwTable::GetTableBox(), SwTable::GetTabSortBoxes(), INTRNL_NAME, lcl_RelToBox(), m_eNmType, and REL_NAME.
Referenced by HasValidBoxes().
|
inline |
Definition at line 131 of file cellfml.hxx.
Referenced by SwTextField::CopyTextField(), SwCursorShell::GetContentAtPos(), lcl_CopyHint(), lcl_CopyTableBox(), SwHistorySetAttrSet::SwHistorySetAttrSet(), and SwHistorySetFormat::SwHistorySetFormat().
|
inline |
Definition at line 134 of file cellfml.hxx.
Referenced by SwTableBox::GetValue(), and sw::DocumentFieldsManager::UpdateTableFields().
|
inlineprotected |
Definition at line 106 of file cellfml.hxx.
References SwTableCalcPara::m_pTable, and MakeFormula_().
Referenced by SwTableBoxFormula::Calc(), and SwTableField::CalcField().
|
private |
Definition at line 335 of file cellfml.cxx.
References cListDelim, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), GetBoxes(), SwTableBox::getRowSpan(), SwCalc::GetStrResult(), SwTable::GetTabSortBoxes(), SwTableBox::GetValue(), SwCalc::IsCalcError(), SwCalc::IsCalcNotANumber(), SwTableCalcPara::m_rCalc, n, SwCalc::SetCalcError(), sFormula, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size(), and Syntax.
Referenced by MakeFormula(), and ScanString().
|
default |
|
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 580 of file cellfml.cxx.
References EXTRNL_NAME, GetNodeOfFormula(), INTRNL_NAME, m_eNmType, m_sFormula, PtrToBoxNms(), REL_NAME, RelNmsToBoxNms(), and ScanString().
Referenced by SwTableField::GetCommand(), SwCursorShell::GetContentAtPos(), SwXCell::getFormula(), lcl_CopyHint(), SwInputWindow::ShowWin(), SwHistorySetAttrSet::SwHistorySetAttrSet(), SwTableBoxFormula::ToSplitMergeBoxNmWithHistory(), SwTable::UpdateFields(), and sw::DocumentFieldsManager::UpdateTableFields().
|
private |
Definition at line 526 of file cellfml.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), SwTableBox::GetName(), and SwTable::GetTabSortBoxes().
Referenced by PtrToBoxNm().
|
private |
Definition at line 460 of file cellfml.cxx.
References SwNode::FindTableBoxStartNode(), SwNode::GetIndex(), SwTable::GetTableBox(), and lcl_RelToBox().
Referenced by BoxNmToPtr().
|
private |
Definition at line 427 of file cellfml.cxx.
References SwNode::FindTableBoxStartNode(), SwNode::GetIndex(), SwTableBox::GetName(), SwTable::GetTableBox(), and lcl_RelToBox().
Referenced by PtrToBoxNm().
|
private |
Definition at line 651 of file cellfml.cxx.
References aStr, FindTable(), SwFormat::GetDoc(), SwTable::GetFrameFormat(), SwFormat::GetName(), comphelper::string::getTokenCount(), m_sFormula, MakeFormula_(), and SplitMergeBoxNm_().
Referenced by BoxNmToPtr(), GetBoxesOfFormula(), HasValidBoxes(), PtrToBoxNm(), ToRelBoxNm(), and ToSplitMergeBoxNm().
|
inline |
Definition at line 138 of file cellfml.hxx.
Referenced by SwTableField::PutValue(), and SwTableField::SetPar2().
|
private |
Definition at line 1095 of file cellfml.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), EXTRNL_NAME, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), FindTable(), SwNode::FindTableBoxStartNode(), SwFormat::GetDoc(), SwTable::GetFrameFormat(), SwNode::GetIndex(), GetLnPosInTable(), SwFormat::GetName(), GetNodeOfFormula(), SwTable::GetTableBox(), SwTable::GetTabSortBoxes(), comphelper::string::getTokenCount(), INTRNL_NAME, lcl_RelToBox(), SwTableFormulaUpdate::m_aData, SwTableFormulaUpdate::m_bBehindSplitLine, SwTableFormulaUpdate::m_bModified, SwTableFormulaUpdate::m_eFlags, m_eNmType, SwTableFormulaUpdate::m_nSplitLine, SwTableFormulaUpdate::m_pTable, SwTableFormulaUpdate::pDelTable, SwTableFormulaUpdate::pNewTableNm, REL_NAME, TBL_MERGETBL, and TBL_SPLITTBL.
Referenced by ScanString(), and ToSplitMergeBoxNm().
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().
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().
|
protected |
true: recalculate formula
Definition at line 96 of file cellfml.hxx.
|
protected |
current display method
Definition at line 95 of file cellfml.hxx.
Referenced by BoxNmsToRelNm(), BoxNmToPtr(), HasValidBoxes_(), PtrToBoxNm(), SplitMergeBoxNm_(), ToRelBoxNm(), and ToSplitMergeBoxNm().
|
protected |
current formula
Definition at line 94 of file cellfml.hxx.
Referenced by BoxNmToPtr(), PtrToBoxNm(), ScanString(), ToRelBoxNm(), and ToSplitMergeBoxNm().