LibreOffice Module extensions (master) 1
|
#include <updatehdl.hxx>
Public Member Functions | |
UpdateHandler (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const rtl::Reference< IActionListener > &rxActionListener) | |
virtual | ~UpdateHandler () override |
UpdateHandler (const UpdateHandler &)=delete | |
UpdateHandler & | operator= (const UpdateHandler &)=delete |
bool | isVisible () const |
bool | isMinimized () const |
void | setVisible (bool bVisible=true) |
void | setProgress (sal_Int32 nPercent) |
void | setNextVersion (const OUString &rNextVersion) |
void | setDownloadPath (const OUString &rPath) |
void | setDownloadFile (std::u16string_view rPath) |
void | setErrorMessage (const OUString &rErrorMsg) |
void | setDescription (const OUString &rDescription) |
void | setState (UpdateState eState) |
OUString | getBubbleText (UpdateState eState) |
OUString | getBubbleTitle (UpdateState eState) |
bool | showWarning (const OUString &rWarning) const |
bool | showWarning (const OUString &rWarning, const OUString &rBtnText_1, const OUString &rBtnText_2) const |
bool | showOverwriteWarning (std::u16string_view rFileName) const |
bool | showOverwriteWarning () const |
operator css::uno::Reference< css::uno::XInterface > () const | |
virtual void SAL_CALL | disposing (const css::lang::EventObject &rObj) override |
virtual void SAL_CALL | actionPerformed (css::awt::ActionEvent const &rEvent) override |
virtual void SAL_CALL | windowOpened (const css::lang::EventObject &e) override |
virtual void SAL_CALL | windowClosing (const css::lang::EventObject &e) override |
virtual void SAL_CALL | windowClosed (const css::lang::EventObject &e) override |
virtual void SAL_CALL | windowMinimized (const css::lang::EventObject &e) override |
virtual void SAL_CALL | windowNormalized (const css::lang::EventObject &e) override |
virtual void SAL_CALL | windowActivated (const css::lang::EventObject &e) override |
virtual void SAL_CALL | windowDeactivated (const css::lang::EventObject &e) override |
virtual void SAL_CALL | handle (const css::uno::Reference< css::task::XInteractionRequest > &Request) override |
virtual void SAL_CALL | queryTermination (const css::lang::EventObject &e) override |
virtual void SAL_CALL | notifyTermination (const css::lang::EventObject &e) override |
Private Member Functions | |
void | createDialog () |
void | updateState (UpdateState eNewState) |
void | startThrobber (bool bStart=true) |
void | setControlProperty (const OUString &rCtrlName, const OUString &rPropName, const css::uno::Any &rPropValue) |
void | showControl (const OUString &rCtrlName, bool bShow=true) |
void | showControls (short nControls) |
void | focusControl (DialogControls eID) |
void | enableControls (short nCtrlState) |
void | setDownloadBtnLabel (bool bAppendDots) |
void | loadStrings () |
OUString | substVariables (const OUString &rSource) const |
void | setFullVersion (OUString &rString) |
Static Private Member Functions | |
static OUString | loadString (const std::locale &rLocale, TranslateId pResourceId) |
static void | insertControlModel (css::uno::Reference< css::awt::XControlModel > const &rxDialogModel, OUString const &rServiceName, OUString const &rControlName, css::awt::Rectangle const &rPosSize, css::uno::Sequence< css::beans::NamedValue > const &rProps) |
Definition at line 72 of file updatehdl.hxx.
UpdateHandler::UpdateHandler | ( | const css::uno::Reference< css::uno::XComponentContext > & | rxContext, |
const rtl::Reference< IActionListener > & | rxActionListener | ||
) |
|
overridevirtual |
Definition at line 103 of file updatehdl.cxx.
References mxActionListener, mxContext, mxInteractionHdl, and mxUpdDlg.
|
delete |
|
overridevirtual |
Definition at line 299 of file updatehdl.cxx.
References BUTTON_COUNT, CANCEL_BUTTON, CLOSE_BUTTON, COMMAND_CLOSE, DOWNLOAD_BUTTON, HELP_BUTTON, i, meCurState, mnLastCtrlState, msButtonIDs, msCancelMessage, mxActionListener, PAUSE_BUTTON, RESUME_BUTTON, setVisible(), showWarning(), UPDATESTATE_DOWNLOAD_PAUSED, UPDATESTATE_DOWNLOADING, UPDATESTATE_ERROR_CHECKING, and UPDATESTATE_ERROR_DOWNLOADING.
Referenced by windowClosing().
|
private |
Definition at line 986 of file updatehdl.cxx.
References BOX1_BTN_X, BOX1_BTN_Y, BOX_HEIGHT1, BOX_HEIGHT2, BUTTON_BAR_Y_POS, BUTTON_HEIGHT, BUTTON_MODEL, BUTTON_WIDTH, BUTTON_Y_OFFSET, BUTTON_Y_POS, CANCEL_BUTTON, CLOSE_BTN_X, CLOSE_BUTTON, CTRL_PROGRESS, CTRL_THROBBER, DIALOG_BORDER, DIALOG_HEIGHT, DIALOG_WIDTH, DOWNLOAD_BTN_X, DOWNLOAD_BUTTON, EDIT2_Y_POS, EDIT_FIELD_MODEL, EDIT_WIDTH, FIXED_LINE_MODEL, FIXED_TEXT_MODEL, GROUP_BOX_MODEL, HELP_BUTTON, HID_CHECK_FOR_UPD_CANCEL, HID_CHECK_FOR_UPD_CLOSE, HID_CHECK_FOR_UPD_DESCRIPTION, HID_CHECK_FOR_UPD_DLG, HID_CHECK_FOR_UPD_DOWNLOAD, HID_CHECK_FOR_UPD_PAUSE, HID_CHECK_FOR_UPD_RESUME, HID_CHECK_FOR_UPD_STATUS, i, INET_HID_SCHEME, insertControlModel(), LABEL_HEIGHT, LABEL_Y_POS, loadStrings(), mbVisible, mnLastCtrlState, msButtonIDs, msCancelBtn, msChecking, msClose, msDescription, msDlgTitle, msDownload, msPauseBtn, msPercent, msResumeBtn, msStatusFL, mxContext, mxUpdDlg, PAUSE_BUTTON, PROGRESS_HEIGHT, PROGRESS_WIDTH, PROGRESS_X_POS, PROGRESS_Y_POS, RESUME_BUTTON, substVariables(), TEXT_DESCRIPTION, TEXT_OFFSET, TEXT_PERCENT, TEXT_STATUS, THROBBER_HEIGHT, THROBBER_WIDTH, THROBBER_X_POS, THROBBER_Y_POS, and xFactory.
Referenced by setVisible().
|
overridevirtual |
Definition at line 292 of file updatehdl.cxx.
References mxUpdDlg.
|
private |
Definition at line 112 of file updatehdl.cxx.
References HELP_BUTTON, i, maMutex, mnLastCtrlState, msButtonIDs, and setControlProperty().
Referenced by updateState().
|
private |
Definition at line 715 of file updatehdl.cxx.
References BUTTON_COUNT, msButtonIDs, and mxUpdDlg.
Referenced by updateState().
OUString UpdateHandler::getBubbleText | ( | UpdateState | eState | ) |
Definition at line 258 of file updatehdl.cxx.
References loadStrings(), maMutex, msBubbleTexts, nIndex, substVariables(), UPDATESTATE_UPDATE_AVAIL, and UPDATESTATES_COUNT.
OUString UpdateHandler::getBubbleTitle | ( | UpdateState | eState | ) |
Definition at line 274 of file updatehdl.cxx.
References loadStrings(), maMutex, msBubbleTitles, nIndex, substVariables(), UPDATESTATE_UPDATE_AVAIL, and UPDATESTATES_COUNT.
|
overridevirtual |
Definition at line 402 of file updatehdl.cxx.
References meCurState, mxContext, mxInteractionHdl, setControlProperty(), setState(), TEXT_DESCRIPTION, UPDATESTATE_CHECKING, UPDATESTATE_DOWNLOADING, UPDATESTATE_ERROR_CHECKING, and UPDATESTATE_ERROR_DOWNLOADING.
|
staticprivate |
Definition at line 733 of file updatehdl.cxx.
References xFactory, and xModel.
Referenced by createDialog().
|
inline |
Definition at line 160 of file updatehdl.hxx.
References mbMinimized.
bool UpdateHandler::isVisible | ( | ) | const |
Definition at line 166 of file updatehdl.cxx.
References mxUpdDlg.
|
staticprivate |
Definition at line 575 of file updatehdl.cxx.
References Translate::get().
Referenced by loadStrings().
|
private |
Definition at line 590 of file updatehdl.cxx.
References BUTTON_COUNT, Translate::Create(), first, i, loadString(), mbStringsLoaded, msBubbleTexts, msBubbleTitles, msButtonIDs, msCancelBtn, msCancelMessage, msChecking, msCheckingError, msClose, msDescription, msDlgTitle, msDownload, msDownloadDescr, msDownloadError, msDownloading, msDownloadNotAvail, msDownloadPause, msDownloadWarning, msNoUpdFound, msOverwriteWarning, msPauseBtn, msPercent, msReady2Install, msReloadContinue, msReloadReload, msReloadWarning, msResumeBtn, msStatusFL, msUpdFound, SAL_N_ELEMENTS, setFullVersion(), UPDATESTATE_UPDATE_AVAIL, and UPDATESTATES_COUNT.
Referenced by createDialog(), getBubbleText(), and getBubbleTitle().
|
overridevirtual |
Definition at line 462 of file updatehdl.cxx.
|
inline |
Definition at line 178 of file updatehdl.hxx.
|
delete |
|
overridevirtual |
Definition at line 445 of file updatehdl.cxx.
References mbShowsMessageBox, mxUpdDlg, and setVisible().
|
private |
Definition at line 678 of file updatehdl.cxx.
References mxUpdDlg, and TOOLS_WARN_EXCEPTION.
Referenced by enableControls(), handle(), setDownloadBtnLabel(), setErrorMessage(), setProgress(), showControls(), and updateState().
|
inline |
Definition at line 167 of file updatehdl.hxx.
References msDescriptionMsg.
|
private |
Definition at line 136 of file updatehdl.cxx.
References aLabel, DOWNLOAD_BUTTON, HID_CHECK_FOR_UPD_DOWNLOAD2, INET_HID_SCHEME, maMutex, mbDownloadBtnHasDots, msButtonIDs, msDownload, and setControlProperty().
Referenced by updateState().
void UpdateHandler::setDownloadFile | ( | std::u16string_view | rPath | ) |
Definition at line 246 of file updatehdl.cxx.
References msDownloadFile, and msDownloadPath.
|
inline |
Definition at line 164 of file updatehdl.hxx.
References msDownloadPath.
void UpdateHandler::setErrorMessage | ( | const OUString & | rErrorMsg | ) |
Definition at line 240 of file updatehdl.cxx.
References setControlProperty(), and TEXT_DESCRIPTION.
|
private |
|
inline |
Definition at line 163 of file updatehdl.hxx.
References msNextVersion.
void UpdateHandler::setProgress | ( | sal_Int32 | nPercent | ) |
Definition at line 222 of file updatehdl.cxx.
References CTRL_PROGRESS, maMutex, mnPercent, msPercent, setControlProperty(), substVariables(), and TEXT_PERCENT.
void UpdateHandler::setState | ( | UpdateState | eState | ) |
Definition at line 155 of file updatehdl.cxx.
References maMutex, mbVisible, meCurState, mxUpdDlg, and updateState().
Referenced by handle().
void UpdateHandler::setVisible | ( | bool | bVisible = true | ) |
Definition at line 179 of file updatehdl.cxx.
References bVisible, createDialog(), maMutex, mbListenerAdded, mbVisible, meCurState, mxUpdDlg, and updateState().
Referenced by actionPerformed(), and queryTermination().
|
private |
|
private |
Definition at line 954 of file updatehdl.cxx.
References BOX_HEIGHT1, BUTTON_WIDTH, CANCEL_BUTTON, CTRL_PROGRESS, EDIT_WIDTH, i, INNER_BORDER, LABEL_HEIGHT, msButtonIDs, PAUSE_BUTTON, PROGRESS_CTRL, RESUME_BUTTON, setControlProperty(), showControl(), startThrobber(), TEXT_OFFSET, TEXT_PERCENT, TEXT_STATUS, and THROBBER_CTRL.
Referenced by updateState().
bool UpdateHandler::showOverwriteWarning | ( | ) | const |
Definition at line 913 of file updatehdl.cxx.
References msOverwriteWarning, and showWarning().
bool UpdateHandler::showOverwriteWarning | ( | std::u16string_view | rFileName | ) | const |
Definition at line 903 of file updatehdl.cxx.
References msDownloadPath, msReloadContinue, msReloadReload, msReloadWarning, and showWarning().
bool UpdateHandler::showWarning | ( | const OUString & | rWarning | ) | const |
Definition at line 785 of file updatehdl.cxx.
References mbShowsMessageBox, and mxUpdDlg.
Referenced by actionPerformed(), and showOverwriteWarning().
bool UpdateHandler::showWarning | ( | const OUString & | rWarning, |
const OUString & | rBtnText_1, | ||
const OUString & | rBtnText_2 | ||
) | const |
Definition at line 832 of file updatehdl.cxx.
References mbShowsMessageBox, and mxUpdDlg.
|
private |
Definition at line 659 of file updatehdl.cxx.
References CTRL_THROBBER, and mxUpdDlg.
Referenced by showControls().
|
private |
Definition at line 581 of file updatehdl.cxx.
References mnPercent, msDownloadFile, msDownloadPath, and msNextVersion.
Referenced by createDialog(), getBubbleText(), getBubbleTitle(), setProgress(), and updateState().
|
private |
Definition at line 481 of file updatehdl.cxx.
References CANCEL_BUTTON, CLOSE_BUTTON, CTRL_PROGRESS, DOWNLOAD_BUTTON, enableControls(), focusControl(), meLastState, mnPercent, msChecking, msCheckingError, msDescriptionMsg, msDownloadDescr, msDownloadError, msDownloading, msDownloadNotAvail, msDownloadPause, msDownloadWarning, msNoUpdFound, msPercent, msReady2Install, msUpdFound, PAUSE_BUTTON, PROGRESS_CTRL, RESUME_BUTTON, setControlProperty(), setDownloadBtnLabel(), showControls(), substVariables(), TEXT_DESCRIPTION, TEXT_PERCENT, TEXT_STATUS, THROBBER_CTRL, UPDATESTATE_AUTO_START, UPDATESTATE_CHECKING, UPDATESTATE_DOWNLOAD_AVAIL, UPDATESTATE_DOWNLOAD_PAUSED, UPDATESTATE_DOWNLOADING, UPDATESTATE_ERROR_CHECKING, UPDATESTATE_ERROR_DOWNLOADING, UPDATESTATE_EXT_UPD_AVAIL, UPDATESTATE_NO_UPDATE_AVAIL, UPDATESTATE_UPDATE_AVAIL, UPDATESTATE_UPDATE_NO_DOWNLOAD, and UPDATESTATES_COUNT.
Referenced by setState(), and setVisible().
|
overridevirtual |
Definition at line 391 of file updatehdl.cxx.
|
overridevirtual |
Definition at line 374 of file updatehdl.cxx.
|
overridevirtual |
Definition at line 364 of file updatehdl.cxx.
References actionPerformed(), and COMMAND_CLOSE.
|
overridevirtual |
Definition at line 396 of file updatehdl.cxx.
|
overridevirtual |
Definition at line 379 of file updatehdl.cxx.
References mbMinimized.
|
overridevirtual |
Definition at line 385 of file updatehdl.cxx.
References mbMinimized.
|
overridevirtual |
Definition at line 359 of file updatehdl.cxx.
|
private |
Definition at line 94 of file updatehdl.hxx.
Referenced by enableControls(), getBubbleText(), getBubbleTitle(), notifyTermination(), setDownloadBtnLabel(), setProgress(), setState(), and setVisible().
|
private |
Definition at line 87 of file updatehdl.hxx.
Referenced by setDownloadBtnLabel().
|
private |
Definition at line 91 of file updatehdl.hxx.
Referenced by setVisible().
|
private |
Definition at line 90 of file updatehdl.hxx.
Referenced by isMinimized(), windowMinimized(), and windowNormalized().
|
mutableprivate |
Definition at line 92 of file updatehdl.hxx.
Referenced by queryTermination(), and showWarning().
|
private |
Definition at line 89 of file updatehdl.hxx.
Referenced by loadStrings().
|
private |
Definition at line 88 of file updatehdl.hxx.
Referenced by createDialog(), setState(), and setVisible().
|
private |
Definition at line 83 of file updatehdl.hxx.
Referenced by actionPerformed(), handle(), setState(), and setVisible().
|
private |
Definition at line 84 of file updatehdl.hxx.
Referenced by updateState().
|
private |
Definition at line 86 of file updatehdl.hxx.
Referenced by actionPerformed(), createDialog(), and enableControls().
|
private |
Definition at line 85 of file updatehdl.hxx.
Referenced by setProgress(), substVariables(), and updateState().
|
private |
Definition at line 126 of file updatehdl.hxx.
Referenced by getBubbleText(), and loadStrings().
|
private |
Definition at line 127 of file updatehdl.hxx.
Referenced by getBubbleTitle(), and loadStrings().
|
private |
Definition at line 125 of file updatehdl.hxx.
Referenced by actionPerformed(), createDialog(), enableControls(), focusControl(), loadStrings(), setDownloadBtnLabel(), and showControls().
|
private |
Definition at line 124 of file updatehdl.hxx.
Referenced by createDialog(), and loadStrings().
|
private |
Definition at line 112 of file updatehdl.hxx.
Referenced by actionPerformed(), and loadStrings().
|
private |
Definition at line 100 of file updatehdl.hxx.
Referenced by createDialog(), loadStrings(), and updateState().
|
private |
Definition at line 101 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 120 of file updatehdl.hxx.
Referenced by createDialog(), and loadStrings().
|
private |
Definition at line 119 of file updatehdl.hxx.
Referenced by createDialog(), and loadStrings().
|
private |
Definition at line 99 of file updatehdl.hxx.
Referenced by setDescription(), and updateState().
|
private |
Definition at line 104 of file updatehdl.hxx.
Referenced by createDialog(), and loadStrings().
|
private |
Definition at line 121 of file updatehdl.hxx.
Referenced by createDialog(), loadStrings(), and setDownloadBtnLabel().
|
private |
Definition at line 108 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 106 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 98 of file updatehdl.hxx.
Referenced by setDownloadFile(), and substVariables().
|
private |
Definition at line 110 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 109 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 97 of file updatehdl.hxx.
Referenced by setDownloadFile(), setDownloadPath(), showOverwriteWarning(), and substVariables().
|
private |
Definition at line 105 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 107 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 96 of file updatehdl.hxx.
Referenced by setNextVersion(), and substVariables().
|
private |
Definition at line 102 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 113 of file updatehdl.hxx.
Referenced by loadStrings(), and showOverwriteWarning().
|
private |
Definition at line 122 of file updatehdl.hxx.
Referenced by createDialog(), and loadStrings().
|
private |
Definition at line 114 of file updatehdl.hxx.
Referenced by createDialog(), loadStrings(), setProgress(), and updateState().
|
private |
Definition at line 111 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 117 of file updatehdl.hxx.
Referenced by loadStrings(), and showOverwriteWarning().
|
private |
Definition at line 116 of file updatehdl.hxx.
Referenced by loadStrings(), and showOverwriteWarning().
|
private |
Definition at line 115 of file updatehdl.hxx.
Referenced by loadStrings(), and showOverwriteWarning().
|
private |
Definition at line 123 of file updatehdl.hxx.
Referenced by createDialog(), and loadStrings().
|
private |
Definition at line 118 of file updatehdl.hxx.
Referenced by createDialog(), and loadStrings().
|
private |
Definition at line 103 of file updatehdl.hxx.
Referenced by loadStrings(), and updateState().
|
private |
Definition at line 81 of file updatehdl.hxx.
Referenced by actionPerformed(), and ~UpdateHandler().
|
private |
Definition at line 78 of file updatehdl.hxx.
Referenced by createDialog(), handle(), setFullVersion(), and ~UpdateHandler().
|
private |
Definition at line 80 of file updatehdl.hxx.
Referenced by handle(), and ~UpdateHandler().
|
private |
Definition at line 79 of file updatehdl.hxx.
Referenced by createDialog(), disposing(), focusControl(), isVisible(), notifyTermination(), queryTermination(), setControlProperty(), setState(), setVisible(), showControl(), showWarning(), startThrobber(), and ~UpdateHandler().