|
LibreOffice Module reportdesign (master) 1
|
#include <CondFormat.hxx>
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 Dialog * | getDialog () override |
| virtual | ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override |
Public Member Functions inherited from weld::DialogController | |
| virtual Dialog * | getDialog ()=0 |
| const Dialog * | getConstDialog () 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::OReportController & | m_rController |
| css::uno::Reference< css::report::XReportControlModel > | m_xFormatConditions |
| css::uno::Reference< css::report::XReportControlModel > | m_xCopy |
| bool | m_bConstructed |
| std::unique_ptr< weld::ScrolledWindow > | m_xScrollWindow |
| std::unique_ptr< weld::Box > | m_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::Builder > | m_xBuilder |
| std::shared_ptr< weld::Dialog > | m_xDialog |
Definition at line 58 of file CondFormat.hxx.
|
private |
Definition at line 61 of file CondFormat.hxx.
| rptui::ConditionalFormattingDialog::ConditionalFormattingDialog | ( | weld::Window * | pParent, |
| const css::uno::Reference< css::report::XReportControlModel > & | _xHoldAlive, | ||
| ::rptui::OReportController & | _rController | ||
| ) |
Definition at line 78 of file CondFormat.cxx.
References impl_initializeConditions(), impl_setPrefHeight(), LINK, m_bConstructed, m_rController, m_xCopy, m_xFormatConditions, and m_xScrollWindow.
|
overridevirtual |
Definition at line 100 of file CondFormat.cxx.
|
overridevirtual |
Implements rptui::IConditionalFormatAction.
Definition at line 126 of file CondFormat.cxx.
References impl_addCondition_nothrow(), and impl_getConditionCount().
|
overridevirtual |
Implements rptui::IConditionalFormatAction.
Definition at line 302 of file CondFormat.cxx.
References CURRENT_WINDOW, DBG_UNHANDLED_EXCEPTION, Exception, m_aConditions, m_rController, m_xCopy, weld::GenericDialogController::m_xDialog, comphelper::makePropertyValue(), PROPERTY_FONTCOLOR, and REPORTCONTROLFORMAT.
|
private |
|
overridevirtual |
Implements rptui::IConditionalFormatAction.
Definition at line 133 of file CondFormat.cxx.
References impl_deleteCondition_nothrow().
|
overridevirtual |
Implements rptui::IConditionalFormatAction.
Definition at line 341 of file CondFormat.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and m_xFormatConditions.
|
private |
adds a condition
| _nNewCondIndex | the index of the to-be-inserted condition |
Definition at line 139 of file CondFormat.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, impl_conditionCountChanged(), impl_ensureConditionVisible(), m_aConditions, m_rController, m_xConditionPlayground, m_xCopy, weld::GenericDialogController::m_xDialog, and o3tl::make_unsigned().
Referenced by addCondition(), and 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().
|
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().
|
private |
ensures the condition with the given index is visible
Definition at line 434 of file CondFormat.cxx.
References impl_getConditionCount(), impl_getFirstVisibleConditionIndex(), impl_getLastVisibleConditionIndex(), impl_scrollTo(), and rptui::MAX_CONDITIONS.
Referenced by impl_addCondition_nothrow(), impl_focusCondition(), and impl_moveCondition_nothrow().
|
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().
|
inlineprivate |
returns the current number of conditions
Definition at line 98 of file CondFormat.hxx.
References m_aConditions.
Referenced by addCondition(), impl_deleteCondition_nothrow(), impl_ensureConditionVisible(), impl_focusCondition(), impl_getLastVisibleConditionIndex(), impl_scrollTo(), impl_setPrefHeight(), impl_updateConditionIndicies(), and moveConditionDown().
|
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().
|
private |
returns the number of the condition which has the (child path) focus
Definition at line 415 of file CondFormat.cxx.
References m_aConditions.
|
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().
|
private |
initializes the conditions from m_xCopy
Definition at line 279 of file CondFormat.cxx.
References Exception, i, impl_conditionCountChanged(), m_aConditions, m_rController, m_xConditionPlayground, m_xCopy, weld::GenericDialogController::m_xDialog, and nCount.
Referenced by ConditionalFormattingDialog().
|
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().
|
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().
|
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().
|
private |
set the preferred height of the action_area
Definition at line 56 of file CondFormat.cxx.
References impl_getConditionCount(), m_aConditions, m_bConstructed, weld::GenericDialogController::m_xDialog, m_xScrollWindow, rptui::MAX_CONDITIONS, and nCount.
Referenced by ConditionalFormattingDialog(), and impl_conditionCountChanged().
|
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().
|
overridevirtual |
Implements rptui::IConditionalFormatAction.
Definition at line 334 of file CondFormat.cxx.
References impl_getConditionCount(), and impl_moveCondition_nothrow().
|
overridevirtual |
Implements rptui::IConditionalFormatAction.
Definition at line 326 of file CondFormat.cxx.
References impl_moveCondition_nothrow().
|
overridevirtual |
Reimplemented from weld::DialogController.
Definition at line 355 of file CondFormat.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, rptui::OReportController::getUndoManager(), i, m_aConditions, m_rController, m_xCopy, m_xFormatConditions, RET_NO, RET_OK, and RptResId().
Referenced by rptui::OReportController::Execute().
|
private |
Definition at line 73 of file CondFormat.hxx.
Referenced by applyCommand(), impl_addCondition_nothrow(), impl_conditionCountChanged(), impl_deleteCondition_nothrow(), impl_focusCondition(), impl_getConditionCount(), impl_getFirstVisibleConditionIndex(), impl_getFocusedConditionIndex(), impl_initializeConditions(), impl_layoutAll(), impl_moveCondition_nothrow(), impl_scrollTo(), impl_setPrefHeight(), impl_updateConditionIndicies(), and run().
|
private |
Definition at line 69 of file CondFormat.hxx.
Referenced by ConditionalFormattingDialog(), and impl_setPrefHeight().
|
private |
Definition at line 63 of file CondFormat.hxx.
Referenced by applyCommand(), impl_addCondition_nothrow(), impl_initializeConditions(), and run().
|
private |
Definition at line 72 of file CondFormat.hxx.
Referenced by impl_addCondition_nothrow(), impl_deleteCondition_nothrow(), impl_initializeConditions(), and impl_updateConditionIndicies().
|
private |
Definition at line 67 of file CondFormat.hxx.
Referenced by applyCommand(), ConditionalFormattingDialog(), impl_addCondition_nothrow(), impl_deleteCondition_nothrow(), impl_initializeConditions(), impl_moveCondition_nothrow(), and run().
|
private |
Definition at line 65 of file CondFormat.hxx.
Referenced by ConditionalFormattingDialog(), getDataField(), and run().
|
private |
Definition at line 71 of file CondFormat.hxx.
Referenced by ConditionalFormattingDialog(), impl_getFirstVisibleConditionIndex(), impl_layoutAll(), impl_scrollTo(), and impl_setPrefHeight().