LibreOffice Module extensions (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
UpdateHandler Class Reference

#include <updatehdl.hxx>

Inheritance diagram for UpdateHandler:
[legend]
Collaboration diagram for UpdateHandler:
[legend]

Public Member Functions

 UpdateHandler (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const rtl::Reference< IActionListener > &rxActionListener)
 
virtual ~UpdateHandler () override
 
 UpdateHandler (const UpdateHandler &)=delete
 
UpdateHandleroperator= (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)
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > mxContext
 
css::uno::Reference< css::awt::XDialog > mxUpdDlg
 
css::uno::Reference< css::task::XInteractionHandler > mxInteractionHdl
 
rtl::Reference< IActionListenermxActionListener
 
UpdateState meCurState
 
UpdateState meLastState
 
sal_Int32 mnPercent
 
short mnLastCtrlState
 
bool mbDownloadBtnHasDots
 
bool mbVisible
 
bool mbStringsLoaded
 
bool mbMinimized
 
bool mbListenerAdded
 
bool mbShowsMessageBox
 
osl::Mutex maMutex
 
OUString msNextVersion
 
OUString msDownloadPath
 
OUString msDownloadFile
 
OUString msDescriptionMsg
 
OUString msChecking
 
OUString msCheckingError
 
OUString msNoUpdFound
 
OUString msUpdFound
 
OUString msDlgTitle
 
OUString msDownloadPause
 
OUString msDownloadError
 
OUString msDownloadWarning
 
OUString msDownloadDescr
 
OUString msDownloadNotAvail
 
OUString msDownloading
 
OUString msReady2Install
 
OUString msCancelMessage
 
OUString msOverwriteWarning
 
OUString msPercent
 
OUString msReloadWarning
 
OUString msReloadReload
 
OUString msReloadContinue
 
OUString msStatusFL
 
OUString msDescription
 
OUString msClose
 
OUString msDownload
 
OUString msPauseBtn
 
OUString msResumeBtn
 
OUString msCancelBtn
 
OUString msButtonIDs [BUTTON_COUNT]
 
OUString msBubbleTexts [UPDATESTATES_COUNT]
 
OUString msBubbleTitles [UPDATESTATES_COUNT]
 

Detailed Description

Definition at line 72 of file updatehdl.hxx.

Constructor & Destructor Documentation

◆ UpdateHandler() [1/2]

UpdateHandler::UpdateHandler ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const rtl::Reference< IActionListener > &  rxActionListener 
)

◆ ~UpdateHandler()

UpdateHandler::~UpdateHandler ( )
overridevirtual

Definition at line 103 of file updatehdl.cxx.

References mxActionListener, mxContext, mxInteractionHdl, and mxUpdDlg.

◆ UpdateHandler() [2/2]

UpdateHandler::UpdateHandler ( const UpdateHandler )
delete

Member Function Documentation

◆ actionPerformed()

void SAL_CALL UpdateHandler::actionPerformed ( css::awt::ActionEvent const &  rEvent)
overridevirtual

◆ createDialog()

void UpdateHandler::createDialog ( )
private

◆ disposing()

void SAL_CALL UpdateHandler::disposing ( const css::lang::EventObject &  rObj)
overridevirtual

Definition at line 292 of file updatehdl.cxx.

References mxUpdDlg.

◆ enableControls()

void UpdateHandler::enableControls ( short  nCtrlState)
private

Definition at line 112 of file updatehdl.cxx.

References HELP_BUTTON, i, maMutex, mnLastCtrlState, msButtonIDs, and setControlProperty().

Referenced by updateState().

◆ focusControl()

void UpdateHandler::focusControl ( DialogControls  eID)
private

Definition at line 715 of file updatehdl.cxx.

References BUTTON_COUNT, msButtonIDs, and mxUpdDlg.

Referenced by updateState().

◆ getBubbleText()

OUString UpdateHandler::getBubbleText ( UpdateState  eState)

◆ getBubbleTitle()

OUString UpdateHandler::getBubbleTitle ( UpdateState  eState)

◆ handle()

void SAL_CALL UpdateHandler::handle ( const css::uno::Reference< css::task::XInteractionRequest > &  Request)
overridevirtual

◆ insertControlModel()

void UpdateHandler::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 
)
staticprivate

Definition at line 733 of file updatehdl.cxx.

References xFactory, and xModel.

Referenced by createDialog().

◆ isMinimized()

bool UpdateHandler::isMinimized ( ) const
inline

Definition at line 160 of file updatehdl.hxx.

References mbMinimized.

◆ isVisible()

bool UpdateHandler::isVisible ( ) const

Definition at line 166 of file updatehdl.cxx.

References mxUpdDlg.

◆ loadString()

OUString UpdateHandler::loadString ( const std::locale &  rLocale,
TranslateId  pResourceId 
)
staticprivate

Definition at line 575 of file updatehdl.cxx.

References Translate::get().

Referenced by loadStrings().

◆ loadStrings()

void UpdateHandler::loadStrings ( )
private

◆ notifyTermination()

void SAL_CALL UpdateHandler::notifyTermination ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 462 of file updatehdl.cxx.

References maMutex, and mxUpdDlg.

◆ operator css::uno::Reference< css::uno::XInterface >()

UpdateHandler::operator css::uno::Reference< css::uno::XInterface > ( ) const
inline

Definition at line 178 of file updatehdl.hxx.

◆ operator=()

UpdateHandler & UpdateHandler::operator= ( const UpdateHandler )
delete

◆ queryTermination()

void SAL_CALL UpdateHandler::queryTermination ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 445 of file updatehdl.cxx.

References mbShowsMessageBox, mxUpdDlg, and setVisible().

◆ setControlProperty()

void UpdateHandler::setControlProperty ( const OUString &  rCtrlName,
const OUString &  rPropName,
const css::uno::Any &  rPropValue 
)
private

◆ setDescription()

void UpdateHandler::setDescription ( const OUString &  rDescription)
inline

Definition at line 167 of file updatehdl.hxx.

References msDescriptionMsg.

◆ setDownloadBtnLabel()

void UpdateHandler::setDownloadBtnLabel ( bool  bAppendDots)
private

◆ setDownloadFile()

void UpdateHandler::setDownloadFile ( std::u16string_view  rPath)

Definition at line 246 of file updatehdl.cxx.

References msDownloadFile, and msDownloadPath.

◆ setDownloadPath()

void UpdateHandler::setDownloadPath ( const OUString &  rPath)
inline

Definition at line 164 of file updatehdl.hxx.

References msDownloadPath.

◆ setErrorMessage()

void UpdateHandler::setErrorMessage ( const OUString &  rErrorMsg)

Definition at line 240 of file updatehdl.cxx.

References setControlProperty(), and TEXT_DESCRIPTION.

◆ setFullVersion()

void UpdateHandler::setFullVersion ( OUString &  rString)
private

Definition at line 761 of file updatehdl.cxx.

References mxContext.

Referenced by loadStrings().

◆ setNextVersion()

void UpdateHandler::setNextVersion ( const OUString &  rNextVersion)
inline

Definition at line 163 of file updatehdl.hxx.

References msNextVersion.

◆ setProgress()

void UpdateHandler::setProgress ( sal_Int32  nPercent)

◆ setState()

void UpdateHandler::setState ( UpdateState  eState)

Definition at line 155 of file updatehdl.cxx.

References maMutex, mbVisible, meCurState, mxUpdDlg, and updateState().

Referenced by handle().

◆ setVisible()

void UpdateHandler::setVisible ( bool  bVisible = true)

◆ showControl()

void UpdateHandler::showControl ( const OUString &  rCtrlName,
bool  bShow = true 
)
private

Definition at line 699 of file updatehdl.cxx.

References mxUpdDlg.

Referenced by showControls().

◆ showControls()

void UpdateHandler::showControls ( short  nControls)
private

◆ showOverwriteWarning() [1/2]

bool UpdateHandler::showOverwriteWarning ( ) const

Definition at line 913 of file updatehdl.cxx.

References msOverwriteWarning, and showWarning().

◆ showOverwriteWarning() [2/2]

bool UpdateHandler::showOverwriteWarning ( std::u16string_view  rFileName) const

◆ showWarning() [1/2]

bool UpdateHandler::showWarning ( const OUString &  rWarning) const

Definition at line 785 of file updatehdl.cxx.

References mbShowsMessageBox, and mxUpdDlg.

Referenced by actionPerformed(), and showOverwriteWarning().

◆ showWarning() [2/2]

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.

◆ startThrobber()

void UpdateHandler::startThrobber ( bool  bStart = true)
private

Definition at line 659 of file updatehdl.cxx.

References CTRL_THROBBER, and mxUpdDlg.

Referenced by showControls().

◆ substVariables()

OUString UpdateHandler::substVariables ( const OUString &  rSource) const
private

◆ updateState()

void UpdateHandler::updateState ( UpdateState  eNewState)
private

◆ windowActivated()

void SAL_CALL UpdateHandler::windowActivated ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 391 of file updatehdl.cxx.

◆ windowClosed()

void SAL_CALL UpdateHandler::windowClosed ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 374 of file updatehdl.cxx.

◆ windowClosing()

void SAL_CALL UpdateHandler::windowClosing ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 364 of file updatehdl.cxx.

References actionPerformed(), and COMMAND_CLOSE.

◆ windowDeactivated()

void SAL_CALL UpdateHandler::windowDeactivated ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 396 of file updatehdl.cxx.

◆ windowMinimized()

void SAL_CALL UpdateHandler::windowMinimized ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 379 of file updatehdl.cxx.

References mbMinimized.

◆ windowNormalized()

void SAL_CALL UpdateHandler::windowNormalized ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 385 of file updatehdl.cxx.

References mbMinimized.

◆ windowOpened()

void SAL_CALL UpdateHandler::windowOpened ( const css::lang::EventObject &  e)
overridevirtual

Definition at line 359 of file updatehdl.cxx.

Member Data Documentation

◆ maMutex

osl::Mutex UpdateHandler::maMutex
private

◆ mbDownloadBtnHasDots

bool UpdateHandler::mbDownloadBtnHasDots
private

Definition at line 87 of file updatehdl.hxx.

Referenced by setDownloadBtnLabel().

◆ mbListenerAdded

bool UpdateHandler::mbListenerAdded
private

Definition at line 91 of file updatehdl.hxx.

Referenced by setVisible().

◆ mbMinimized

bool UpdateHandler::mbMinimized
private

Definition at line 90 of file updatehdl.hxx.

Referenced by isMinimized(), windowMinimized(), and windowNormalized().

◆ mbShowsMessageBox

bool UpdateHandler::mbShowsMessageBox
mutableprivate

Definition at line 92 of file updatehdl.hxx.

Referenced by queryTermination(), and showWarning().

◆ mbStringsLoaded

bool UpdateHandler::mbStringsLoaded
private

Definition at line 89 of file updatehdl.hxx.

Referenced by loadStrings().

◆ mbVisible

bool UpdateHandler::mbVisible
private

Definition at line 88 of file updatehdl.hxx.

Referenced by createDialog(), setState(), and setVisible().

◆ meCurState

UpdateState UpdateHandler::meCurState
private

Definition at line 83 of file updatehdl.hxx.

Referenced by actionPerformed(), handle(), setState(), and setVisible().

◆ meLastState

UpdateState UpdateHandler::meLastState
private

Definition at line 84 of file updatehdl.hxx.

Referenced by updateState().

◆ mnLastCtrlState

short UpdateHandler::mnLastCtrlState
private

Definition at line 86 of file updatehdl.hxx.

Referenced by actionPerformed(), createDialog(), and enableControls().

◆ mnPercent

sal_Int32 UpdateHandler::mnPercent
private

Definition at line 85 of file updatehdl.hxx.

Referenced by setProgress(), substVariables(), and updateState().

◆ msBubbleTexts

OUString UpdateHandler::msBubbleTexts[UPDATESTATES_COUNT]
private

Definition at line 126 of file updatehdl.hxx.

Referenced by getBubbleText(), and loadStrings().

◆ msBubbleTitles

OUString UpdateHandler::msBubbleTitles[UPDATESTATES_COUNT]
private

Definition at line 127 of file updatehdl.hxx.

Referenced by getBubbleTitle(), and loadStrings().

◆ msButtonIDs

OUString UpdateHandler::msButtonIDs[BUTTON_COUNT]
private

◆ msCancelBtn

OUString UpdateHandler::msCancelBtn
private

Definition at line 124 of file updatehdl.hxx.

Referenced by createDialog(), and loadStrings().

◆ msCancelMessage

OUString UpdateHandler::msCancelMessage
private

Definition at line 112 of file updatehdl.hxx.

Referenced by actionPerformed(), and loadStrings().

◆ msChecking

OUString UpdateHandler::msChecking
private

Definition at line 100 of file updatehdl.hxx.

Referenced by createDialog(), loadStrings(), and updateState().

◆ msCheckingError

OUString UpdateHandler::msCheckingError
private

Definition at line 101 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ msClose

OUString UpdateHandler::msClose
private

Definition at line 120 of file updatehdl.hxx.

Referenced by createDialog(), and loadStrings().

◆ msDescription

OUString UpdateHandler::msDescription
private

Definition at line 119 of file updatehdl.hxx.

Referenced by createDialog(), and loadStrings().

◆ msDescriptionMsg

OUString UpdateHandler::msDescriptionMsg
private

Definition at line 99 of file updatehdl.hxx.

Referenced by setDescription(), and updateState().

◆ msDlgTitle

OUString UpdateHandler::msDlgTitle
private

Definition at line 104 of file updatehdl.hxx.

Referenced by createDialog(), and loadStrings().

◆ msDownload

OUString UpdateHandler::msDownload
private

Definition at line 121 of file updatehdl.hxx.

Referenced by createDialog(), loadStrings(), and setDownloadBtnLabel().

◆ msDownloadDescr

OUString UpdateHandler::msDownloadDescr
private

Definition at line 108 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ msDownloadError

OUString UpdateHandler::msDownloadError
private

Definition at line 106 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ msDownloadFile

OUString UpdateHandler::msDownloadFile
private

Definition at line 98 of file updatehdl.hxx.

Referenced by setDownloadFile(), and substVariables().

◆ msDownloading

OUString UpdateHandler::msDownloading
private

Definition at line 110 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ msDownloadNotAvail

OUString UpdateHandler::msDownloadNotAvail
private

Definition at line 109 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ msDownloadPath

OUString UpdateHandler::msDownloadPath
private

◆ msDownloadPause

OUString UpdateHandler::msDownloadPause
private

Definition at line 105 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ msDownloadWarning

OUString UpdateHandler::msDownloadWarning
private

Definition at line 107 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ msNextVersion

OUString UpdateHandler::msNextVersion
private

Definition at line 96 of file updatehdl.hxx.

Referenced by setNextVersion(), and substVariables().

◆ msNoUpdFound

OUString UpdateHandler::msNoUpdFound
private

Definition at line 102 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ msOverwriteWarning

OUString UpdateHandler::msOverwriteWarning
private

Definition at line 113 of file updatehdl.hxx.

Referenced by loadStrings(), and showOverwriteWarning().

◆ msPauseBtn

OUString UpdateHandler::msPauseBtn
private

Definition at line 122 of file updatehdl.hxx.

Referenced by createDialog(), and loadStrings().

◆ msPercent

OUString UpdateHandler::msPercent
private

Definition at line 114 of file updatehdl.hxx.

Referenced by createDialog(), loadStrings(), setProgress(), and updateState().

◆ msReady2Install

OUString UpdateHandler::msReady2Install
private

Definition at line 111 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ msReloadContinue

OUString UpdateHandler::msReloadContinue
private

Definition at line 117 of file updatehdl.hxx.

Referenced by loadStrings(), and showOverwriteWarning().

◆ msReloadReload

OUString UpdateHandler::msReloadReload
private

Definition at line 116 of file updatehdl.hxx.

Referenced by loadStrings(), and showOverwriteWarning().

◆ msReloadWarning

OUString UpdateHandler::msReloadWarning
private

Definition at line 115 of file updatehdl.hxx.

Referenced by loadStrings(), and showOverwriteWarning().

◆ msResumeBtn

OUString UpdateHandler::msResumeBtn
private

Definition at line 123 of file updatehdl.hxx.

Referenced by createDialog(), and loadStrings().

◆ msStatusFL

OUString UpdateHandler::msStatusFL
private

Definition at line 118 of file updatehdl.hxx.

Referenced by createDialog(), and loadStrings().

◆ msUpdFound

OUString UpdateHandler::msUpdFound
private

Definition at line 103 of file updatehdl.hxx.

Referenced by loadStrings(), and updateState().

◆ mxActionListener

rtl::Reference< IActionListener > UpdateHandler::mxActionListener
private

Definition at line 81 of file updatehdl.hxx.

Referenced by actionPerformed(), and ~UpdateHandler().

◆ mxContext

css::uno::Reference< css::uno::XComponentContext > UpdateHandler::mxContext
private

Definition at line 78 of file updatehdl.hxx.

Referenced by createDialog(), handle(), setFullVersion(), and ~UpdateHandler().

◆ mxInteractionHdl

css::uno::Reference< css::task::XInteractionHandler > UpdateHandler::mxInteractionHdl
private

Definition at line 80 of file updatehdl.hxx.

Referenced by handle(), and ~UpdateHandler().

◆ mxUpdDlg

css::uno::Reference< css::awt::XDialog > UpdateHandler::mxUpdDlg
private

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