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 OString &rDialogId, bool bMobile=false)
 
virtual DialoggetDialog () override
 
virtual ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override
 
- Public Member Functions inherited from weld::DialogController
const DialoggetConstDialog () const
 
void set_title (const OUString &rTitle)
 
OUString get_title () const
 
void set_help_id (const OString &rHelpId)
 
OString get_help_id () const
 
void response (int nResponse)
 
virtual ~DialogController () COVERITY_NOEXCEPT_FALSE
 

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

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

Definition at line 61 of file CondFormat.hxx.

Constructor & Destructor Documentation

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

Definition at line 99 of file CondFormat.cxx.

Member Function Documentation

void rptui::ConditionalFormattingDialog::addCondition ( size_t  _nAddAfterIndex)
overridevirtual
void rptui::ConditionalFormattingDialog::applyCommand ( size_t  _nCondIndex,
sal_uInt16  _nCommandId,
const ::Color rColor 
)
overridevirtual
rptui::ConditionalFormattingDialog::DECL_LINK ( OnScroll  ,
weld::ScrolledWindow ,
void   
)
private
void rptui::ConditionalFormattingDialog::deleteCondition ( size_t  _nCondIndex)
overridevirtual

Implements rptui::IConditionalFormatAction.

Definition at line 132 of file CondFormat.cxx.

References impl_deleteCondition_nothrow().

OUString rptui::ConditionalFormattingDialog::getDataField ( ) const
overridevirtual
void rptui::ConditionalFormattingDialog::impl_addCondition_nothrow ( size_t  _nNewCondIndex)
private
void rptui::ConditionalFormattingDialog::impl_conditionCountChanged ( )
private

called when the number of conditions has changed in any way

Definition at line 114 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().

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

deletes the condition with the given index

Definition at line 172 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().

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

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

Definition at line 163 of file CondFormat.cxx.

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

Referenced by impl_deleteCondition_nothrow().

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

returns the index of the first visible condition

Definition at line 408 of file CondFormat.cxx.

References m_aConditions, and m_xScrollWindow.

Referenced by impl_ensureConditionVisible(), and impl_getLastVisibleConditionIndex().

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 419 of file CondFormat.cxx.

References m_aConditions.

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

returns the index of the last visible condition

Definition at line 414 of file CondFormat.cxx.

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

Referenced by impl_ensureConditionVisible().

void rptui::ConditionalFormattingDialog::impl_initializeConditions ( )
private
void rptui::ConditionalFormattingDialog::impl_layoutAll ( )
private

does the dialog layouting

Definition at line 270 of file CondFormat.cxx.

References m_aConditions, m_xScrollWindow, and rptui::MAX_CONDITIONS.

Referenced by impl_conditionCountChanged().

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

moves the condition with the given index one position

Definition at line 219 of file CondFormat.cxx.

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

Referenced by moveConditionDown(), and moveConditionUp().

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

scrolls the condition with the given index to the top position

Definition at line 428 of file CondFormat.cxx.

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

Referenced by impl_ensureConditionVisible().

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

tells all our Condition instances their new index

Definition at line 103 of file CondFormat.cxx.

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

Referenced by impl_conditionCountChanged(), and impl_moveCondition_nothrow().

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

Implements rptui::IConditionalFormatAction.

Definition at line 330 of file CondFormat.cxx.

References impl_moveCondition_nothrow().

short rptui::ConditionalFormattingDialog::run ( )
overridevirtual

Member Data Documentation

Conditions rptui::ConditionalFormattingDialog::m_aConditions
private
bool rptui::ConditionalFormattingDialog::m_bConstructed
private

Definition at line 69 of file CondFormat.hxx.

Referenced by ConditionalFormattingDialog(), and impl_setPrefHeight().

::rptui::OReportController& rptui::ConditionalFormattingDialog::m_rController
private
std::unique_ptr<weld::Box> rptui::ConditionalFormattingDialog::m_xConditionPlayground
private
css::uno::Reference< css::report::XReportControlModel > rptui::ConditionalFormattingDialog::m_xCopy
private
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().

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

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