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

#include <CondFormat.hxx>

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

Public Member Functions

 ConditionalFormattingDialog (weld::Window *pParent, const css::uno::Reference< css::report::XReportControlModel > &_xHoldAlive, ::rptui::OReportController &_rController)
 
virtual ~ConditionalFormattingDialog () override
 
virtual short run () override
 
virtual void addCondition (size_t _nAddAfterIndex) override
 
virtual void deleteCondition (size_t _nCondIndex) override
 
virtual void applyCommand (size_t _nCondIndex, sal_uInt16 _nCommandId, const ::Color &rColor) override
 
virtual void moveConditionUp (size_t _nCondIndex) override
 
virtual void moveConditionDown (size_t _nCondIndex) override
 
virtual OUString getDataField () const override
 
- Public Member Functions inherited from weld::GenericDialogController
 GenericDialogController (weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId, bool bMobile=false)
 
virtual DialoggetDialog () override
 
virtual ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override
 
- Public Member Functions inherited from weld::DialogController
virtual DialoggetDialog ()=0
 
const DialoggetConstDialog () const
 
virtual short run ()
 
void set_title (const OUString &rTitle)
 
OUString get_title () const
 
void set_help_id (const OUString &rHelpId)
 
OUString get_help_id () const
 
void response (int nResponse)
 
virtual ~DialogController () COVERITY_NOEXCEPT_FALSE
 
virtual void addCondition (size_t _nAddAfterIndex)=0
 
virtual void deleteCondition (size_t _nCondIndex)=0
 
virtual void applyCommand (size_t _nCondIndex, sal_uInt16 _nCommandId, const ::Color &rColor)=0
 
virtual void moveConditionUp (size_t _nCondIndex)=0
 
virtual void moveConditionDown (size_t _nCondIndex)=0
 
virtual OUString getDataField () const =0
 

Private Types

typedef ::std::vector< std::unique_ptr< Condition > > Conditions
 

Private Member Functions

 DECL_LINK (OnScroll, weld::ScrolledWindow &, void)
 
size_t impl_getConditionCount () const
 returns the current number of conditions More...
 
void impl_addCondition_nothrow (size_t _nNewCondIndex)
 adds a condition More...
 
void impl_deleteCondition_nothrow (size_t _nCondIndex)
 deletes the condition with the given index More...
 
void impl_moveCondition_nothrow (size_t _nCondIndex, bool _bMoveUp)
 moves the condition with the given index one position More...
 
void impl_layoutAll ()
 does the dialog layouting More...
 
void impl_conditionCountChanged ()
 called when the number of conditions has changed in any way More...
 
void impl_initializeConditions ()
 initializes the conditions from m_xCopy More...
 
void impl_updateConditionIndicies ()
 tells all our Condition instances their new index More...
 
size_t impl_getFocusedConditionIndex (sal_Int32 _nFallBackIfNone) const
 returns the number of the condition which has the (child path) focus More...
 
size_t impl_getFirstVisibleConditionIndex () const
 returns the index of the first visible condition More...
 
size_t impl_getLastVisibleConditionIndex () const
 returns the index of the last visible condition More...
 
void impl_focusCondition (size_t _nCondIndex)
 focuses the condition with the given index, making it visible if necessary More...
 
void impl_scrollTo (size_t _nTopCondIndex)
 scrolls the condition with the given index to the top position More...
 
void impl_ensureConditionVisible (size_t _nCondIndex)
 ensures the condition with the given index is visible More...
 
void impl_setPrefHeight (bool bFirst)
 set the preferred height of the action_area More...
 

Private Attributes

::rptui::OReportControllerm_rController
 
css::uno::Reference< css::report::XReportControlModel > m_xFormatConditions
 
css::uno::Reference< css::report::XReportControlModel > m_xCopy
 
bool m_bConstructed
 
std::unique_ptr< weld::ScrolledWindowm_xScrollWindow
 
std::unique_ptr< weld::Boxm_xConditionPlayground
 
Conditions m_aConditions
 

Additional Inherited Members

- Static Public Member Functions inherited from weld::DialogController
static bool runAsync (const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
 
- Protected Member Functions inherited from rptui::IConditionalFormatAction
 ~IConditionalFormatAction ()
 
- Protected Attributes inherited from weld::GenericDialogController
std::unique_ptr< weld::Builderm_xBuilder
 
std::shared_ptr< weld::Dialogm_xDialog
 

Detailed Description

Definition at line 58 of file CondFormat.hxx.

Member Typedef Documentation

◆ Conditions

typedef ::std::vector< std::unique_ptr<Condition> > rptui::ConditionalFormattingDialog::Conditions
private

Definition at line 61 of file CondFormat.hxx.

Constructor & Destructor Documentation

◆ ConditionalFormattingDialog()

rptui::ConditionalFormattingDialog::ConditionalFormattingDialog ( weld::Window pParent,
const css::uno::Reference< css::report::XReportControlModel > &  _xHoldAlive,
::rptui::OReportController _rController 
)

◆ ~ConditionalFormattingDialog()

rptui::ConditionalFormattingDialog::~ConditionalFormattingDialog ( )
overridevirtual

Definition at line 100 of file CondFormat.cxx.

Member Function Documentation

◆ addCondition()

void rptui::ConditionalFormattingDialog::addCondition ( size_t  _nAddAfterIndex)
overridevirtual

◆ applyCommand()

void rptui::ConditionalFormattingDialog::applyCommand ( size_t  _nCondIndex,
sal_uInt16  _nCommandId,
const ::Color rColor 
)
overridevirtual

◆ DECL_LINK()

rptui::ConditionalFormattingDialog::DECL_LINK ( OnScroll  ,
weld::ScrolledWindow ,
void   
)
private

◆ deleteCondition()

void rptui::ConditionalFormattingDialog::deleteCondition ( size_t  _nCondIndex)
overridevirtual

Implements rptui::IConditionalFormatAction.

Definition at line 133 of file CondFormat.cxx.

References impl_deleteCondition_nothrow().

◆ getDataField()

OUString rptui::ConditionalFormattingDialog::getDataField ( ) const
overridevirtual

◆ impl_addCondition_nothrow()

void rptui::ConditionalFormattingDialog::impl_addCondition_nothrow ( size_t  _nNewCondIndex)
private

◆ impl_conditionCountChanged()

void rptui::ConditionalFormattingDialog::impl_conditionCountChanged ( )
private

called when the number of conditions has changed in any way

Definition at line 115 of file CondFormat.cxx.

References impl_addCondition_nothrow(), impl_layoutAll(), impl_setPrefHeight(), impl_updateConditionIndicies(), and m_aConditions.

Referenced by impl_addCondition_nothrow(), impl_deleteCondition_nothrow(), and impl_initializeConditions().

◆ impl_deleteCondition_nothrow()

void rptui::ConditionalFormattingDialog::impl_deleteCondition_nothrow ( size_t  _nCondIndex)
private

deletes the condition with the given index

Definition at line 173 of file CondFormat.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, impl_conditionCountChanged(), impl_focusCondition(), impl_getConditionCount(), m_aConditions, m_xConditionPlayground, m_xCopy, and pos.

Referenced by deleteCondition().

◆ impl_ensureConditionVisible()

void rptui::ConditionalFormattingDialog::impl_ensureConditionVisible ( size_t  _nCondIndex)
private

◆ impl_focusCondition()

void rptui::ConditionalFormattingDialog::impl_focusCondition ( size_t  _nCondIndex)
private

focuses the condition with the given index, making it visible if necessary

Definition at line 164 of file CondFormat.cxx.

References impl_ensureConditionVisible(), impl_getConditionCount(), and m_aConditions.

Referenced by impl_deleteCondition_nothrow().

◆ impl_getConditionCount()

size_t rptui::ConditionalFormattingDialog::impl_getConditionCount ( ) const
inlineprivate

◆ impl_getFirstVisibleConditionIndex()

size_t rptui::ConditionalFormattingDialog::impl_getFirstVisibleConditionIndex ( ) const
private

returns the index of the first visible condition

Definition at line 404 of file CondFormat.cxx.

References m_aConditions, and m_xScrollWindow.

Referenced by impl_ensureConditionVisible(), and impl_getLastVisibleConditionIndex().

◆ impl_getFocusedConditionIndex()

size_t rptui::ConditionalFormattingDialog::impl_getFocusedConditionIndex ( sal_Int32  _nFallBackIfNone) const
private

returns the number of the condition which has the (child path) focus

Definition at line 415 of file CondFormat.cxx.

References m_aConditions.

◆ impl_getLastVisibleConditionIndex()

size_t rptui::ConditionalFormattingDialog::impl_getLastVisibleConditionIndex ( ) const
private

returns the index of the last visible condition

Definition at line 410 of file CondFormat.cxx.

References impl_getConditionCount(), impl_getFirstVisibleConditionIndex(), and rptui::MAX_CONDITIONS.

Referenced by impl_ensureConditionVisible().

◆ impl_initializeConditions()

void rptui::ConditionalFormattingDialog::impl_initializeConditions ( )
private

◆ impl_layoutAll()

void rptui::ConditionalFormattingDialog::impl_layoutAll ( )
private

does the dialog layouting

Definition at line 271 of file CondFormat.cxx.

References m_aConditions, m_xScrollWindow, and rptui::MAX_CONDITIONS.

Referenced by impl_conditionCountChanged().

◆ impl_moveCondition_nothrow()

void rptui::ConditionalFormattingDialog::impl_moveCondition_nothrow ( size_t  _nCondIndex,
bool  _bMoveUp 
)
private

moves the condition with the given index one position

Definition at line 220 of file CondFormat.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, impl_ensureConditionVisible(), impl_updateConditionIndicies(), m_aConditions, and m_xCopy.

Referenced by moveConditionDown(), and moveConditionUp().

◆ impl_scrollTo()

void rptui::ConditionalFormattingDialog::impl_scrollTo ( size_t  _nTopCondIndex)
private

scrolls the condition with the given index to the top position

Definition at line 424 of file CondFormat.cxx.

References impl_getConditionCount(), m_aConditions, m_xScrollWindow, and rptui::MAX_CONDITIONS.

Referenced by impl_ensureConditionVisible().

◆ impl_setPrefHeight()

void rptui::ConditionalFormattingDialog::impl_setPrefHeight ( bool  bFirst)
private

◆ impl_updateConditionIndicies()

void rptui::ConditionalFormattingDialog::impl_updateConditionIndicies ( )
private

tells all our Condition instances their new index

Definition at line 104 of file CondFormat.cxx.

References impl_getConditionCount(), m_aConditions, m_xConditionPlayground, and nIndex.

Referenced by impl_conditionCountChanged(), and impl_moveCondition_nothrow().

◆ moveConditionDown()

void rptui::ConditionalFormattingDialog::moveConditionDown ( size_t  _nCondIndex)
overridevirtual

◆ moveConditionUp()

void rptui::ConditionalFormattingDialog::moveConditionUp ( size_t  _nCondIndex)
overridevirtual

Implements rptui::IConditionalFormatAction.

Definition at line 326 of file CondFormat.cxx.

References impl_moveCondition_nothrow().

◆ run()

short rptui::ConditionalFormattingDialog::run ( )
overridevirtual

Member Data Documentation

◆ m_aConditions

Conditions rptui::ConditionalFormattingDialog::m_aConditions
private

◆ m_bConstructed

bool rptui::ConditionalFormattingDialog::m_bConstructed
private

Definition at line 69 of file CondFormat.hxx.

Referenced by ConditionalFormattingDialog(), and impl_setPrefHeight().

◆ m_rController

::rptui::OReportController& rptui::ConditionalFormattingDialog::m_rController
private

◆ m_xConditionPlayground

std::unique_ptr<weld::Box> rptui::ConditionalFormattingDialog::m_xConditionPlayground
private

◆ m_xCopy

css::uno::Reference< css::report::XReportControlModel > rptui::ConditionalFormattingDialog::m_xCopy
private

◆ m_xFormatConditions

css::uno::Reference< css::report::XReportControlModel > rptui::ConditionalFormattingDialog::m_xFormatConditions
private

Definition at line 65 of file CondFormat.hxx.

Referenced by ConditionalFormattingDialog(), getDataField(), and run().

◆ m_xScrollWindow

std::unique_ptr<weld::ScrolledWindow> rptui::ConditionalFormattingDialog::m_xScrollWindow
private

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