LibreOffice Module extensions (master) 1
Macros | Variables
updatehdl.cxx File Reference
#include <sal/config.h>
#include <cstddef>
#include "updatehdl.hxx"
#include <helpids.h>
#include <osl/diagnose.h>
#include <osl/file.hxx>
#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/awt/ActionEvent.hpp>
#include <com/sun/star/awt/PushButtonType.hpp>
#include <com/sun/star/awt/UnoControlDialog.hpp>
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/XButton.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/awt/XMessageBox.hpp>
#include <com/sun/star/awt/XAnimation.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <com/sun/star/awt/XVclContainer.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XWindow2.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/TerminationVetoException.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/InteractionRequestStringResolver.hpp>
#include <strings.hrc>
#include <unotools/resmgr.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/diagnose_ex.hxx>
Include dependency graph for updatehdl.cxx:

Go to the source code of this file.

Macros

#define BUTTON_HEIGHT   14
 
#define BUTTON_WIDTH   50
 
#define BUTTON_X_OFFSET   7
 
#define BUTTON_Y_OFFSET   3
 
#define LABEL_HEIGHT   10
 
#define DIALOG_WIDTH   300
 
#define DIALOG_BORDER   5
 
#define INNER_BORDER   3
 
#define TEXT_OFFSET   1
 
#define BOX_HEIGHT1   ( LABEL_HEIGHT + 3*BUTTON_HEIGHT + 2*BUTTON_Y_OFFSET + 2*INNER_BORDER )
 
#define BOX_HEIGHT2   50
 
#define EDIT_WIDTH   ( DIALOG_WIDTH - 2 * DIALOG_BORDER )
 
#define BOX1_BTN_X   ( DIALOG_BORDER + EDIT_WIDTH - BUTTON_WIDTH - INNER_BORDER )
 
#define BOX1_BTN_Y   ( DIALOG_BORDER + LABEL_HEIGHT + INNER_BORDER)
 
#define THROBBER_WIDTH   16
 
#define THROBBER_HEIGHT   16
 
#define THROBBER_X_POS   ( DIALOG_BORDER + 8 )
 
#define THROBBER_Y_POS   ( DIALOG_BORDER + 23 )
 
#define BUTTON_BAR_HEIGHT   24
 
#define LABEL_OFFSET   ( LABEL_HEIGHT + 4 )
 
#define DIALOG_HEIGHT   ( BOX_HEIGHT1 + BOX_HEIGHT2 + LABEL_OFFSET + BUTTON_BAR_HEIGHT + 3 * DIALOG_BORDER )
 
#define LABEL_Y_POS   ( 2 * DIALOG_BORDER + BOX_HEIGHT1 )
 
#define EDIT2_Y_POS   ( LABEL_Y_POS + LABEL_HEIGHT )
 
#define BUTTON_BAR_Y_POS   ( EDIT2_Y_POS + DIALOG_BORDER + BOX_HEIGHT2 )
 
#define BUTTON_Y_POS   ( BUTTON_BAR_Y_POS + 8 )
 
#define CLOSE_BTN_X   ( DIALOG_WIDTH - DIALOG_BORDER - BUTTON_WIDTH )
 
#define INSTALL_BTN_X   ( CLOSE_BTN_X - 2 * BUTTON_X_OFFSET - BUTTON_WIDTH )
 
#define DOWNLOAD_BTN_X   ( INSTALL_BTN_X - BUTTON_X_OFFSET - BUTTON_WIDTH )
 
#define PROGRESS_WIDTH   80
 
#define PROGRESS_HEIGHT   10
 
#define PROGRESS_X_POS   ( DIALOG_BORDER + 8 )
 
#define PROGRESS_Y_POS   ( DIALOG_BORDER + 2*LABEL_OFFSET )
 

Variables

constexpr OUStringLiteral COMMAND_CLOSE = u"close"
 
constexpr OUStringLiteral CTRL_THROBBER = u"throbber"
 
constexpr OUStringLiteral CTRL_PROGRESS = u"progress"
 
constexpr OUStringLiteral TEXT_STATUS = u"text_status"
 
constexpr OUStringLiteral TEXT_PERCENT = u"text_percent"
 
constexpr OUStringLiteral TEXT_DESCRIPTION = u"text_description"
 
constexpr OUStringLiteral FIXED_LINE_MODEL = u"com.sun.star.awt.UnoControlFixedLineModel"
 
constexpr OUStringLiteral FIXED_TEXT_MODEL = u"com.sun.star.awt.UnoControlFixedTextModel"
 
constexpr OUStringLiteral EDIT_FIELD_MODEL = u"com.sun.star.awt.UnoControlEditModel"
 
constexpr OUStringLiteral BUTTON_MODEL = u"com.sun.star.awt.UnoControlButtonModel"
 
constexpr OUStringLiteral GROUP_BOX_MODEL = u"com.sun.star.awt.UnoControlGroupBoxModel"
 

Macro Definition Documentation

◆ BOX1_BTN_X

#define BOX1_BTN_X   ( DIALOG_BORDER + EDIT_WIDTH - BUTTON_WIDTH - INNER_BORDER )

Definition at line 932 of file updatehdl.cxx.

◆ BOX1_BTN_Y

#define BOX1_BTN_Y   ( DIALOG_BORDER + LABEL_HEIGHT + INNER_BORDER)

Definition at line 933 of file updatehdl.cxx.

◆ BOX_HEIGHT1

#define BOX_HEIGHT1   ( LABEL_HEIGHT + 3*BUTTON_HEIGHT + 2*BUTTON_Y_OFFSET + 2*INNER_BORDER )

Definition at line 929 of file updatehdl.cxx.

◆ BOX_HEIGHT2

#define BOX_HEIGHT2   50

Definition at line 930 of file updatehdl.cxx.

◆ BUTTON_BAR_HEIGHT

#define BUTTON_BAR_HEIGHT   24

Definition at line 938 of file updatehdl.cxx.

◆ BUTTON_BAR_Y_POS

#define BUTTON_BAR_Y_POS   ( EDIT2_Y_POS + DIALOG_BORDER + BOX_HEIGHT2 )

Definition at line 943 of file updatehdl.cxx.

◆ BUTTON_HEIGHT

#define BUTTON_HEIGHT   14

Definition at line 919 of file updatehdl.cxx.

◆ BUTTON_WIDTH

#define BUTTON_WIDTH   50

Definition at line 920 of file updatehdl.cxx.

◆ BUTTON_X_OFFSET

#define BUTTON_X_OFFSET   7

Definition at line 921 of file updatehdl.cxx.

◆ BUTTON_Y_OFFSET

#define BUTTON_Y_OFFSET   3

Definition at line 922 of file updatehdl.cxx.

◆ BUTTON_Y_POS

#define BUTTON_Y_POS   ( BUTTON_BAR_Y_POS + 8 )

Definition at line 944 of file updatehdl.cxx.

◆ CLOSE_BTN_X

#define CLOSE_BTN_X   ( DIALOG_WIDTH - DIALOG_BORDER - BUTTON_WIDTH )

Definition at line 945 of file updatehdl.cxx.

◆ DIALOG_BORDER

#define DIALOG_BORDER   5

Definition at line 926 of file updatehdl.cxx.

◆ DIALOG_HEIGHT

#define DIALOG_HEIGHT   ( BOX_HEIGHT1 + BOX_HEIGHT2 + LABEL_OFFSET + BUTTON_BAR_HEIGHT + 3 * DIALOG_BORDER )

Definition at line 940 of file updatehdl.cxx.

◆ DIALOG_WIDTH

#define DIALOG_WIDTH   300

Definition at line 925 of file updatehdl.cxx.

◆ DOWNLOAD_BTN_X

#define DOWNLOAD_BTN_X   ( INSTALL_BTN_X - BUTTON_X_OFFSET - BUTTON_WIDTH )

Definition at line 947 of file updatehdl.cxx.

◆ EDIT2_Y_POS

#define EDIT2_Y_POS   ( LABEL_Y_POS + LABEL_HEIGHT )

Definition at line 942 of file updatehdl.cxx.

◆ EDIT_WIDTH

#define EDIT_WIDTH   ( DIALOG_WIDTH - 2 * DIALOG_BORDER )

Definition at line 931 of file updatehdl.cxx.

◆ INNER_BORDER

#define INNER_BORDER   3

Definition at line 927 of file updatehdl.cxx.

◆ INSTALL_BTN_X

#define INSTALL_BTN_X   ( CLOSE_BTN_X - 2 * BUTTON_X_OFFSET - BUTTON_WIDTH )

Definition at line 946 of file updatehdl.cxx.

◆ LABEL_HEIGHT

#define LABEL_HEIGHT   10

Definition at line 923 of file updatehdl.cxx.

◆ LABEL_OFFSET

#define LABEL_OFFSET   ( LABEL_HEIGHT + 4 )

Definition at line 939 of file updatehdl.cxx.

◆ LABEL_Y_POS

#define LABEL_Y_POS   ( 2 * DIALOG_BORDER + BOX_HEIGHT1 )

Definition at line 941 of file updatehdl.cxx.

◆ PROGRESS_HEIGHT

#define PROGRESS_HEIGHT   10

Definition at line 949 of file updatehdl.cxx.

◆ PROGRESS_WIDTH

#define PROGRESS_WIDTH   80

Definition at line 948 of file updatehdl.cxx.

◆ PROGRESS_X_POS

#define PROGRESS_X_POS   ( DIALOG_BORDER + 8 )

Definition at line 950 of file updatehdl.cxx.

◆ PROGRESS_Y_POS

#define PROGRESS_Y_POS   ( DIALOG_BORDER + 2*LABEL_OFFSET )

Definition at line 951 of file updatehdl.cxx.

◆ TEXT_OFFSET

#define TEXT_OFFSET   1

Definition at line 928 of file updatehdl.cxx.

◆ THROBBER_HEIGHT

#define THROBBER_HEIGHT   16

Definition at line 935 of file updatehdl.cxx.

◆ THROBBER_WIDTH

#define THROBBER_WIDTH   16

Definition at line 934 of file updatehdl.cxx.

◆ THROBBER_X_POS

#define THROBBER_X_POS   ( DIALOG_BORDER + 8 )

Definition at line 936 of file updatehdl.cxx.

◆ THROBBER_Y_POS

#define THROBBER_Y_POS   ( DIALOG_BORDER + 23 )

Definition at line 937 of file updatehdl.cxx.

Variable Documentation

◆ BUTTON_MODEL

constexpr OUStringLiteral BUTTON_MODEL = u"com.sun.star.awt.UnoControlButtonModel"
constexpr

Definition at line 79 of file updatehdl.cxx.

Referenced by UpdateHandler::createDialog().

◆ COMMAND_CLOSE

constexpr OUStringLiteral COMMAND_CLOSE = u"close"
constexpr

Definition at line 67 of file updatehdl.cxx.

Referenced by UpdateHandler::actionPerformed(), and UpdateHandler::windowClosing().

◆ CTRL_PROGRESS

constexpr OUStringLiteral CTRL_PROGRESS = u"progress"
constexpr

◆ CTRL_THROBBER

constexpr OUStringLiteral CTRL_THROBBER = u"throbber"
constexpr

Definition at line 69 of file updatehdl.cxx.

Referenced by UpdateHandler::createDialog(), and UpdateHandler::startThrobber().

◆ EDIT_FIELD_MODEL

constexpr OUStringLiteral EDIT_FIELD_MODEL = u"com.sun.star.awt.UnoControlEditModel"
constexpr

Definition at line 78 of file updatehdl.cxx.

Referenced by UpdateHandler::createDialog().

◆ FIXED_LINE_MODEL

constexpr OUStringLiteral FIXED_LINE_MODEL = u"com.sun.star.awt.UnoControlFixedLineModel"
constexpr

Definition at line 76 of file updatehdl.cxx.

Referenced by UpdateHandler::createDialog().

◆ FIXED_TEXT_MODEL

constexpr OUStringLiteral FIXED_TEXT_MODEL = u"com.sun.star.awt.UnoControlFixedTextModel"
constexpr

Definition at line 77 of file updatehdl.cxx.

Referenced by UpdateHandler::createDialog().

◆ GROUP_BOX_MODEL

constexpr OUStringLiteral GROUP_BOX_MODEL = u"com.sun.star.awt.UnoControlGroupBoxModel"
constexpr

Definition at line 80 of file updatehdl.cxx.

Referenced by UpdateHandler::createDialog().

◆ TEXT_DESCRIPTION

constexpr OUStringLiteral TEXT_DESCRIPTION = u"text_description"
constexpr

◆ TEXT_PERCENT

constexpr OUStringLiteral TEXT_PERCENT = u"text_percent"
constexpr

◆ TEXT_STATUS

constexpr OUStringLiteral TEXT_STATUS = u"text_status"
constexpr