LibreOffice Module reportdesign (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
rptui::FormulaDialog Class Reference

#include <Formula.hxx>

Inheritance diagram for rptui::FormulaDialog:
[legend]
Collaboration diagram for rptui::FormulaDialog:
[legend]

Public Member Functions

 FormulaDialog (weld::Window *pParent, const css::uno::Reference< css::lang::XMultiServiceFactory > &_xServiceFactory, const std::shared_ptr< formula::IFunctionManager > &_pFunctionMgr, const OUString &_sFormula, css::uno::Reference< css::beans::XPropertySet > _xRowSet, svl::SharedStringPool &rStrPool)
 
virtual ~FormulaDialog () override
 
virtual void notifyChange () override
 
virtual void fill () override
 
virtual bool calculateValue (const OUString &_sExpression, OUString &_rResult, bool bMatrixFormula) override
 
virtual std::shared_ptr< formula::FormulaCompilergetCompiler () const override
 
virtual std::unique_ptr< formula::FormulaCompilercreateCompiler (formula::FormulaTokenArray &rArray) const override
 
virtual void doClose (bool _bOk) override
 
virtual void insertEntryToLRUList (const formula::IFunctionDescription *pDesc) override
 
virtual void showReference (const OUString &_sFormula) override
 
virtual void dispatch (bool _bOK, bool _bMatrixChecked) override
 
virtual void setDispatcherLock (bool bLock) override
 
virtual void deleteFormData () override
 
virtual void clear () override
 
virtual void switchBack () override
 
virtual formula::FormEditDatagetFormEditData () const override
 
virtual void setCurrentFormula (const OUString &_sReplacement) override
 
virtual void setSelection (sal_Int32 _nStart, sal_Int32 _nEnd) override
 
virtual void getSelection (sal_Int32 &_nStart, sal_Int32 &_nEnd) const override
 
virtual OUString getCurrentFormula () const override
 
virtual formula::IFunctionManagergetFunctionManager () override
 
virtual css::uno::Reference< css::sheet::XFormulaParser > getFormulaParser () const override
 
virtual css::uno::Reference< css::sheet::XFormulaOpCodeMapper > getFormulaOpCodeMapper () const override
 
virtual css::table::CellAddress getReferencePosition () const override
 
virtual ::std::unique_ptr< formula::FormulaTokenArrayconvertToTokenArray (const css::uno::Sequence< css::sheet::FormulaToken > &_aTokenList) override
 
virtual void ShowReference (const OUString &_sRef) override
 
virtual void HideReference (bool bDoneRefMode=true) override
 
virtual void ReleaseFocus (formula::RefEdit *pEdit) override
 
virtual void ToggleCollapsed (formula::RefEdit *pEdit, formula::RefButton *pButton) override
 
- Public Member Functions inherited from formula::FormulaModalDialog
 FormulaModalDialog (weld::Window *pParent, IFunctionManager const *_pFunctionMgr, IControlReferenceHandler *_pDlg)
 
virtual ~FormulaModalDialog () override
 
virtual void notifyChange ()=0
 
virtual void fill ()=0
 
virtual OUString getCurrentFormula () const=0
 
virtual void setCurrentFormula (const OUString &_sReplacement)=0
 
virtual void getSelection (sal_Int32 &_nStart, sal_Int32 &_nEnd) const=0
 
virtual void setSelection (sal_Int32 _nStart, sal_Int32 _nEnd)=0
 
virtual FormEditDatagetFormEditData () const=0
 
virtual bool calculateValue (const OUString &_sExpression, OUString &_rResult, bool bMatrixFormula)=0
 
virtual std::shared_ptr< FormulaCompilergetCompiler () const=0
 
virtual std::unique_ptr< FormulaCompilercreateCompiler (FormulaTokenArray &rArray) const=0
 
virtual void switchBack ()=0
 
virtual void clear ()=0
 
virtual void deleteFormData ()=0
 
virtual IFunctionManagergetFunctionManager ()=0
 
virtual ::std::unique_ptr< FormulaTokenArrayconvertToTokenArray (const css::uno::Sequence< css::sheet::FormulaToken > &_aTokenList)=0
 
virtual css::uno::Reference< css::sheet::XFormulaParser > getFormulaParser () const=0
 
virtual css::uno::Reference< css::sheet::XFormulaOpCodeMapper > getFormulaOpCodeMapper () const=0
 
virtual css::table::CellAddress getReferencePosition () const=0
 
virtual void setDispatcherLock (bool bLock)=0
 
virtual void dispatch (bool _bOK, bool _bMatrixChecked)=0
 
virtual void doClose (bool _bOk)=0
 
virtual void insertEntryToLRUList (const IFunctionDescription *pDesc)=0
 
virtual void showReference (const OUString &_sFormula)=0
 
virtual void ShowReference (const OUString &_sRef)=0
 
virtual void HideReference (bool bDoneRefMode=true)=0
 
virtual void ReleaseFocus (RefEdit *pEdit)=0
 
virtual void ToggleCollapsed (RefEdit *pEdit, RefButton *pButton)=0
 

Private Member Functions

 DECL_LINK (OnClickHdl, OAddFieldWindow &, void)
 

Private Attributes

std::shared_ptr< formula::IFunctionManagerm_aFunctionManager
 
std::unique_ptr< formula::FormEditDatam_xFormulaData
 
std::shared_ptr< OAddFieldWindowm_xAddField
 
css::uno::Reference< css::beans::XPropertySetm_xRowSet
 
css::uno::Reference< css::report::meta::XFormulaParser > m_xParser
 
css::uno::Reference< css::sheet::XFormulaOpCodeMapper > m_xOpCodeMapper
 
formula::RefEditm_pEdit
 
OUString m_sFormula
 
sal_Int32 m_nStart
 
sal_Int32 m_nEnd
 
svl::SharedStringPoolmrStringPool
 

Additional Inherited Members

- Protected Member Functions inherited from formula::FormulaModalDialog
::std::pair< RefButton *, RefEdit * > RefInputStartBefore (RefEdit *pEdit, RefButton *pButton)
 
void RefInputStartAfter ()
 
void RefInputDoneAfter ()
 
void SetMeText (const OUString &_sText)
 
void Update ()
 
void CheckMatrix (OUString &aFormula)
 
void Update (const OUString &_sExp)
 
void StoreFormEditData (FormEditData *pData)
 
- Protected Member Functions inherited from formula::IFormulaEditorHelper
 ~IFormulaEditorHelper ()
 
- Protected Member Functions inherited from formula::IControlReferenceHandler
 ~IControlReferenceHandler ()
 

Detailed Description

Definition at line 45 of file Formula.hxx.

Constructor & Destructor Documentation

◆ FormulaDialog()

rptui::FormulaDialog::FormulaDialog ( weld::Window pParent,
const css::uno::Reference< css::lang::XMultiServiceFactory > &  _xServiceFactory,
const std::shared_ptr< formula::IFunctionManager > &  _pFunctionMgr,
const OUString &  _sFormula,
css::uno::Reference< css::beans::XPropertySet _xRowSet,
svl::SharedStringPool rStrPool 
)

Definition at line 45 of file Formula.cxx.

References fill(), get(), m_sFormula, m_xOpCodeMapper, and m_xParser.

◆ ~FormulaDialog()

rptui::FormulaDialog::~FormulaDialog ( )
overridevirtual

Member Function Documentation

◆ calculateValue()

bool rptui::FormulaDialog::calculateValue ( const OUString &  _sExpression,
OUString &  _rResult,
bool  bMatrixFormula 
)
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 105 of file Formula.cxx.

◆ clear()

void rptui::FormulaDialog::clear ( )
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 141 of file Formula.cxx.

◆ convertToTokenArray()

std::unique_ptr< formula::FormulaTokenArray > rptui::FormulaDialog::convertToTokenArray ( const css::uno::Sequence< css::sheet::FormulaToken > &  _aTokenList)
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 266 of file Formula.cxx.

References mrStringPool.

◆ createCompiler()

std::unique_ptr< formula::FormulaCompiler > rptui::FormulaDialog::createCompiler ( formula::FormulaTokenArray rArray) const
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 116 of file Formula.cxx.

◆ DECL_LINK()

rptui::FormulaDialog::DECL_LINK ( OnClickHdl  ,
OAddFieldWindow ,
void   
)
private

◆ deleteFormData()

void rptui::FormulaDialog::deleteFormData ( )
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 138 of file Formula.cxx.

◆ dispatch()

void rptui::FormulaDialog::dispatch ( bool  _bOK,
bool  _bMatrixChecked 
)
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 132 of file Formula.cxx.

◆ doClose()

void rptui::FormulaDialog::doClose ( bool  _bOk)
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 121 of file Formula.cxx.

References RET_CANCEL, and RET_OK.

◆ fill()

void rptui::FormulaDialog::fill ( )
overridevirtual

◆ getCompiler()

std::shared_ptr< formula::FormulaCompiler > rptui::FormulaDialog::getCompiler ( ) const
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 111 of file Formula.cxx.

◆ getCurrentFormula()

OUString rptui::FormulaDialog::getCurrentFormula ( ) const
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 179 of file Formula.cxx.

References m_sFormula.

Referenced by rptui::openDialogFormula_nothrow().

◆ getFormEditData()

FormEditData * rptui::FormulaDialog::getFormEditData ( ) const
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 147 of file Formula.cxx.

References m_xFormulaData.

◆ getFormulaOpCodeMapper()

uno::Reference< sheet::XFormulaOpCodeMapper > rptui::FormulaDialog::getFormulaOpCodeMapper ( ) const
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 256 of file Formula.cxx.

References m_xOpCodeMapper.

◆ getFormulaParser()

uno::Reference< sheet::XFormulaParser > rptui::FormulaDialog::getFormulaParser ( ) const
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 251 of file Formula.cxx.

References m_xParser.

◆ getFunctionManager()

IFunctionManager * rptui::FormulaDialog::getFunctionManager ( )
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 183 of file Formula.cxx.

References m_aFunctionManager.

◆ getReferencePosition()

table::CellAddress rptui::FormulaDialog::getReferencePosition ( ) const
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 261 of file Formula.cxx.

◆ getSelection()

void rptui::FormulaDialog::getSelection ( sal_Int32 &  _nStart,
sal_Int32 &  _nEnd 
) const
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 174 of file Formula.cxx.

References m_nEnd, and m_nStart.

◆ HideReference()

void rptui::FormulaDialog::HideReference ( bool  bDoneRefMode = true)
overridevirtual

Implements formula::IControlReferenceHandler.

Definition at line 192 of file Formula.cxx.

◆ insertEntryToLRUList()

void rptui::FormulaDialog::insertEntryToLRUList ( const formula::IFunctionDescription pDesc)
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 126 of file Formula.cxx.

◆ notifyChange()

void rptui::FormulaDialog::notifyChange ( )
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 74 of file Formula.cxx.

◆ ReleaseFocus()

void rptui::FormulaDialog::ReleaseFocus ( formula::RefEdit pEdit)
overridevirtual

Implements formula::IControlReferenceHandler.

Definition at line 196 of file Formula.cxx.

◆ setCurrentFormula()

void rptui::FormulaDialog::setCurrentFormula ( const OUString &  _sReplacement)
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 151 of file Formula.cxx.

References m_nEnd, m_nStart, m_sFormula, and u.

◆ setDispatcherLock()

void rptui::FormulaDialog::setDispatcherLock ( bool  bLock)
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 135 of file Formula.cxx.

◆ setSelection()

void rptui::FormulaDialog::setSelection ( sal_Int32  _nStart,
sal_Int32  _nEnd 
)
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 161 of file Formula.cxx.

References m_nEnd, and m_nStart.

◆ showReference()

void rptui::FormulaDialog::showReference ( const OUString &  _sFormula)
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 129 of file Formula.cxx.

◆ ShowReference()

void rptui::FormulaDialog::ShowReference ( const OUString &  _sRef)
overridevirtual

Implements formula::IControlReferenceHandler.

Definition at line 188 of file Formula.cxx.

◆ switchBack()

void rptui::FormulaDialog::switchBack ( )
overridevirtual

Implements formula::IFormulaEditorHelper.

Definition at line 144 of file Formula.cxx.

◆ ToggleCollapsed()

void rptui::FormulaDialog::ToggleCollapsed ( formula::RefEdit pEdit,
formula::RefButton pButton 
)
overridevirtual

Member Data Documentation

◆ m_aFunctionManager

std::shared_ptr<formula::IFunctionManager> rptui::FormulaDialog::m_aFunctionManager
private

Definition at line 48 of file Formula.hxx.

Referenced by getFunctionManager().

◆ m_nEnd

sal_Int32 rptui::FormulaDialog::m_nEnd
private

Definition at line 57 of file Formula.hxx.

Referenced by getSelection(), setCurrentFormula(), and setSelection().

◆ m_nStart

sal_Int32 rptui::FormulaDialog::m_nStart
private

Definition at line 56 of file Formula.hxx.

Referenced by getSelection(), setCurrentFormula(), and setSelection().

◆ m_pEdit

formula::RefEdit* rptui::FormulaDialog::m_pEdit
private

Definition at line 54 of file Formula.hxx.

Referenced by ToggleCollapsed(), and ~FormulaDialog().

◆ m_sFormula

OUString rptui::FormulaDialog::m_sFormula
private

Definition at line 55 of file Formula.hxx.

Referenced by fill(), FormulaDialog(), getCurrentFormula(), and setCurrentFormula().

◆ m_xAddField

std::shared_ptr<OAddFieldWindow> rptui::FormulaDialog::m_xAddField
private

Definition at line 50 of file Formula.hxx.

Referenced by ToggleCollapsed(), and ~FormulaDialog().

◆ m_xFormulaData

std::unique_ptr<formula::FormEditData> rptui::FormulaDialog::m_xFormulaData
private

Definition at line 49 of file Formula.hxx.

Referenced by getFormEditData(), and ~FormulaDialog().

◆ m_xOpCodeMapper

css::uno::Reference< css::sheet::XFormulaOpCodeMapper> rptui::FormulaDialog::m_xOpCodeMapper
private

Definition at line 53 of file Formula.hxx.

Referenced by FormulaDialog(), and getFormulaOpCodeMapper().

◆ m_xParser

css::uno::Reference< css::report::meta::XFormulaParser> rptui::FormulaDialog::m_xParser
private

Definition at line 52 of file Formula.hxx.

Referenced by FormulaDialog(), and getFormulaParser().

◆ m_xRowSet

css::uno::Reference< css::beans::XPropertySet > rptui::FormulaDialog::m_xRowSet
private

Definition at line 51 of file Formula.hxx.

Referenced by ToggleCollapsed().

◆ mrStringPool

svl::SharedStringPool& rptui::FormulaDialog::mrStringPool
private

Definition at line 59 of file Formula.hxx.

Referenced by convertToTokenArray().


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