summaryrefslogtreecommitdiff
path: root/extensions/source/update/check/updatehdl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/update/check/updatehdl.cxx')
-rw-r--r--extensions/source/update/check/updatehdl.cxx35
1 files changed, 18 insertions, 17 deletions
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 364d975c537a..ff1c2abc919e 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -50,7 +50,7 @@
#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/XThrobber.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"
@@ -70,6 +70,7 @@
#include <com/sun/star/resource/XResourceBundleLoader.hpp>
#include "updatehdl.hrc"
+#include <tools/urlobj.hxx>
#define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
@@ -159,7 +160,7 @@ void UpdateHandler::setDownloadBtnLabel( bool bAppendDots )
aLabel += UNISTRING( "..." );
setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("Label"), uno::Any( aLabel ) );
- setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DOWNLOAD2 ) ) );
+ setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD2 ) ) );
mbDownloadBtnHasDots = bAppendDots;
}
@@ -759,14 +760,14 @@ void UpdateHandler::loadStrings()
void UpdateHandler::startThrobber( bool bStart )
{
uno::Reference< awt::XControlContainer > xContainer( mxUpdDlg, uno::UNO_QUERY );
- uno::Reference< awt::XThrobber > xThrobber( xContainer->getControl( CTRL_THROBBER ), uno::UNO_QUERY );
+ uno::Reference< awt::XAnimation > xThrobber( xContainer->getControl( CTRL_THROBBER ), uno::UNO_QUERY );
if ( xThrobber.is() )
{
if ( bStart )
- xThrobber->start();
+ xThrobber->startAnimation();
else
- xThrobber->stop();
+ xThrobber->stopAnimation();
}
uno::Reference< awt::XWindow > xWindow( xContainer->getControl( CTRL_THROBBER ), uno::UNO_QUERY );
@@ -1084,8 +1085,8 @@ bool UpdateHandler::showOverwriteWarning() const
#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 14
-#define THROBBER_HEIGHT 14
+#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
@@ -1175,7 +1176,7 @@ void UpdateHandler::createDialog()
xPropSet->setPropertyValue( UNISTRING("PositionY"), uno::Any(sal_Int32( 100 )) );
xPropSet->setPropertyValue( UNISTRING("Width"), uno::Any(sal_Int32( DIALOG_WIDTH )) );
xPropSet->setPropertyValue( UNISTRING("Height"), uno::Any(sal_Int32( DIALOG_HEIGHT )) );
- xPropSet->setPropertyValue( UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DLG ) ) );
+ xPropSet->setPropertyValue( UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DLG ) ) );
}
{ // Label (fixed text) <status>
uno::Sequence< beans::NamedValue > aProps(1);
@@ -1202,7 +1203,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 3, UNISTRING("MultiLine"), uno::Any( true ) );
setProperty( aProps, 4, UNISTRING("ReadOnly"), uno::Any( true ) );
setProperty( aProps, 5, UNISTRING("AutoVScroll"), uno::Any( true ) );
- setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_STATUS ) ) );
+ setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_STATUS ) ) );
insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_STATUS,
awt::Rectangle( DIALOG_BORDER + TEXT_OFFSET,
@@ -1233,7 +1234,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msPauseBtn ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_PAUSE ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_PAUSE ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[PAUSE_BUTTON],
awt::Rectangle( BOX1_BTN_X, BOX1_BTN_Y, BUTTON_WIDTH, BUTTON_HEIGHT ),
@@ -1246,7 +1247,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msResumeBtn ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_RESUME ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_RESUME ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[RESUME_BUTTON],
awt::Rectangle( BOX1_BTN_X,
@@ -1262,7 +1263,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msCancelBtn ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_CANCEL ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CANCEL ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[CANCEL_BUTTON],
awt::Rectangle( BOX1_BTN_X,
@@ -1296,7 +1297,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 3, UNISTRING("MultiLine"), uno::Any( true ) );
setProperty( aProps, 4, UNISTRING("ReadOnly"), uno::Any( true ) );
setProperty( aProps, 5, UNISTRING("AutoVScroll"), uno::Any( true ) );
- setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DESCRIPTION ) ) );
+ setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DESCRIPTION ) ) );
insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_DESCRIPTION,
awt::Rectangle( DIALOG_BORDER + TEXT_OFFSET,
@@ -1326,7 +1327,7 @@ void UpdateHandler::createDialog()
// setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_CANCEL) ) );
// [property] string Label // only if PushButtonType_STANDARD
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msClose ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_CLOSE ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CLOSE ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[ CLOSE_BUTTON ],
awt::Rectangle( CLOSE_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ),
@@ -1339,7 +1340,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msInstall ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_INSTALL ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_INSTALL ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[INSTALL_BUTTON],
awt::Rectangle( INSTALL_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ),
@@ -1352,7 +1353,7 @@ void UpdateHandler::createDialog()
setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) );
setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) );
setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msDownload ) );
- setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DOWNLOAD ) ) );
+ setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD ) ) );
insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[DOWNLOAD_BUTTON],
awt::Rectangle( DOWNLOAD_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ),
@@ -1372,7 +1373,7 @@ void UpdateHandler::createDialog()
{ // @see awt/UnoControlThrobberModel.idl
uno::Sequence< beans::NamedValue > aProps;
- insertControlModel( xControlModel, UNISTRING("com.sun.star.awt.UnoThrobberControlModel"), CTRL_THROBBER,
+ insertControlModel( xControlModel, UNISTRING("com.sun.star.awt.SpinningProgressControlModel"), CTRL_THROBBER,
awt::Rectangle( THROBBER_X_POS, THROBBER_Y_POS, THROBBER_WIDTH, THROBBER_HEIGHT),
aProps );
}