diff options
author | Carsten Driesner <cd@openoffice.org> | 2011-02-07 13:06:08 +0100 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2011-02-07 13:06:08 +0100 |
commit | bebf85efd10e676c8a9409c6ebd98a6e767d16f0 (patch) | |
tree | ab9f9265bb021e5eb6fc357e79234bba20bc4b8f /desktop | |
parent | e4ee5496696455f7ef6657c15696f36d3da78659 (diff) | |
parent | a1a2a5a68046e75aba3dfd6ba06083a314f12182 (diff) |
removetooltypes01: Rebase to DEV300m99
Diffstat (limited to 'desktop')
-rwxr-xr-x | desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 26 | ||||
-rwxr-xr-x | desktop/source/deployment/gui/dp_gui_updatedialog.hxx | 4 | ||||
-rwxr-xr-x | desktop/source/deployment/gui/dp_gui_updatedialog.src | 4 | ||||
-rw-r--r-- | desktop/source/migration/pages.cxx | 14 | ||||
-rw-r--r-- | desktop/source/migration/pages.hxx | 10 | ||||
-rw-r--r-- | desktop/source/migration/wizard.cxx | 56 | ||||
-rw-r--r-- | desktop/source/migration/wizard.hrc | 1 | ||||
-rw-r--r-- | desktop/source/migration/wizard.hxx | 5 | ||||
-rw-r--r-- | desktop/source/migration/wizard.src | 7 |
9 files changed, 31 insertions, 96 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 154736e1e056..6476667a19d8 100755 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -43,7 +43,6 @@ #include "com/sun/star/awt/WindowAttribute.hpp" #include "com/sun/star/awt/WindowClass.hpp" #include "com/sun/star/awt/WindowDescriptor.hpp" -#include "com/sun/star/awt/XThrobber.hpp" #include "com/sun/star/awt/XToolkit.hpp" #include "com/sun/star/awt/XWindow.hpp" #include "com/sun/star/awt/XWindowPeer.hpp" @@ -570,6 +569,7 @@ UpdateDialog::UpdateDialog( ModalDialog(parent,DpGuiResId(RID_DLG_UPDATE)), m_context(context), m_checking(this, DpGuiResId(RID_DLG_UPDATE_CHECKING)), + m_throbber(this, DpGuiResId(RID_DLG_UPDATE_THROBBER)), m_update(this, DpGuiResId(RID_DLG_UPDATE_UPDATE)), m_updates( *this, DpGuiResId(RID_DLG_UPDATE_UPDATES), @@ -630,23 +630,6 @@ UpdateDialog::UpdateDialog( } catch (uno::Exception & e) { throw uno::RuntimeException(e.Message, e.Context); } - Control c(this, DpGuiResId(RID_DLG_UPDATE_THROBBER)); - Point pos(c.GetPosPixel()); - Size size(c.GetSizePixel()); - try { - m_throbber = uno::Reference< awt::XThrobber >( - toolkit->createWindow( - awt::WindowDescriptor( - awt::WindowClass_SIMPLE, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Throbber")), - GetComponentInterface(), 0, - awt::Rectangle( - pos.X(), pos.Y(), size.Width(), size.Height()), - awt::WindowAttribute::SHOW)), - uno::UNO_QUERY_THROW); - } catch (lang::IllegalArgumentException & e) { - throw uno::RuntimeException(e.Message, e.Context); - } m_updates.SetSelectHdl(LINK(this, UpdateDialog, selectionHandler)); m_all.SetToggleHdl(LINK(this, UpdateDialog, allHandler)); m_ok.SetClickHdl(LINK(this, UpdateDialog, okHandler)); @@ -681,7 +664,7 @@ sal_Bool UpdateDialog::Close() { } short UpdateDialog::Execute() { - m_throbber->start(); + m_throbber.start(); m_thread->launch(); return ModalDialog::Execute(); } @@ -880,9 +863,8 @@ void UpdateDialog::addSpecificError( UpdateDialog::SpecificError & data ) void UpdateDialog::checkingDone() { m_checking.Hide(); - m_throbber->stop(); - uno::Reference< awt::XWindow >( - m_throbber, uno::UNO_QUERY_THROW)->setVisible(false); + m_throbber.stop(); + m_throbber.Hide(); if (m_updates.getItemCount() == 0) { clearDescription(); diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index fefddd0e4ddc..a3cc76faaee8 100755 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -46,6 +46,7 @@ #include "vcl/dialog.hxx" #include "vcl/fixed.hxx" #include <svtools/fixedhyper.hxx> +#include <vcl/throbber.hxx> #include "descedit.hxx" #include "dp_gui_updatedata.hxx" @@ -59,7 +60,6 @@ class ResId; class Window; namespace com { namespace sun { namespace star { - namespace awt { class XThrobber; } namespace deployment { class XExtensionManager; class XPackage; } namespace uno { class XComponentContext; } @@ -184,7 +184,7 @@ private: com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_context; FixedText m_checking; - com::sun::star::uno::Reference< com::sun::star::awt::XThrobber > m_throbber; + Throbber m_throbber; FixedText m_update; UpdateDialog::CheckListBox m_updates; CheckBox m_all; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src index 4da431733e31..90b764d811b2 100755 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.src +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src @@ -60,11 +60,11 @@ ModalDialog RID_DLG_UPDATE { Right = TRUE; NoLabel = TRUE; }; - Control RID_DLG_UPDATE_THROBBER { + FixedImage RID_DLG_UPDATE_THROBBER { Pos = MAP_APPFONT( RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH - RSC_CD_FIXEDTEXT_HEIGHT, RSC_SP_DLG_INNERBORDER_TOP); - Size = MAP_APPFONT(RSC_CD_FIXEDTEXT_HEIGHT, RSC_CD_FIXEDTEXT_HEIGHT); + Size = MAP_APPFONT(RSC_CD_FIXEDTEXT_HEIGHT, RSC_CD_FIXEDTEXT_HEIGHT + 1); }; FixedText RID_DLG_UPDATE_UPDATE { Disable = TRUE; diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx index c8164d498e41..eefb529d0ca7 100644 --- a/desktop/source/migration/pages.cxx +++ b/desktop/source/migration/pages.cxx @@ -339,14 +339,13 @@ void MigrationThread::onTerminated() MigrationPage::MigrationPage( svt::OWizardMachine* parent, - const ResId& resid, - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > xThrobber) + const ResId& resid, Throbber& i_throbber ) : OWizardPage(parent, resid) , m_ftHead(this, WizardResId(FT_MIGRATION_HEADER)) , m_ftBody(this, WizardResId(FT_MIGRATION_BODY)) , m_cbMigration(this, WizardResId(CB_MIGRATION)) + , m_rThrobber(i_throbber) , m_bMigrationDone(sal_False) - , m_xThrobber(xThrobber) { FreeResource(); _setBold(m_ftHead); @@ -366,9 +365,8 @@ sal_Bool MigrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason if ( pWizard ) pWizard->DisableButtonsWhileMigration(); - uno::Reference< awt::XWindow > xWin( m_xThrobber, uno::UNO_QUERY ); - xWin->setVisible( true ); - m_xThrobber->start(); + m_rThrobber.Show(); + m_rThrobber.start(); MigrationThread* pMigThread = new MigrationThread(); pMigThread->create(); @@ -377,10 +375,10 @@ sal_Bool MigrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason Application::Reschedule(); } - m_xThrobber->stop(); + m_rThrobber.stop(); GetParent()->LeaveWait(); // Next state will enable buttons - so no EnableButtons necessary! - xWin->setVisible( false ); + m_rThrobber.Hide(); pMigThread->join(); delete pMigThread; m_bMigrationDone = sal_True; diff --git a/desktop/source/migration/pages.hxx b/desktop/source/migration/pages.hxx index 4981f68bbaa0..47eae23ff58c 100644 --- a/desktop/source/migration/pages.hxx +++ b/desktop/source/migration/pages.hxx @@ -29,17 +29,15 @@ #define _PAGES_HXX_ #include <vcl/tabpage.hxx> -#include <vcl/fixed.hxx> #include <vcl/button.hxx> #include <vcl/dialog.hxx> #include <vcl/scrbar.hxx> +#include <vcl/throbber.hxx> #include <svtools/wizardmachine.hxx> #include <svtools/svmedit.hxx> #include <svl/lstner.hxx> #include <svtools/xtextedt.hxx> -#include <com/sun/star/awt/XThrobber.hpp> - namespace desktop { class WelcomePage : public svt::OWizardPage @@ -120,11 +118,11 @@ class MigrationPage : public svt::OWizardPage private: FixedText m_ftHead; FixedText m_ftBody; - CheckBox m_cbMigration; + CheckBox m_cbMigration; + Throbber& m_rThrobber; sal_Bool m_bMigrationDone; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > m_xThrobber; public: - MigrationPage( svt::OWizardMachine* parent, const ResId& resid, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > xThrobber ); + MigrationPage( svt::OWizardMachine* parent, const ResId& resid, Throbber& i_throbber ); virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason ); protected: diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx index 3a4a0069967f..3489d7186b4f 100644 --- a/desktop/source/migration/wizard.cxx +++ b/desktop/source/migration/wizard.cxx @@ -87,16 +87,6 @@ const FirstStartWizard::WizardState FirstStartWizard::STATE_USER = 3; const FirstStartWizard::WizardState FirstStartWizard::STATE_UPDATE_CHECK = 4; const FirstStartWizard::WizardState FirstStartWizard::STATE_REGISTRATION = 5; -static uno::Reference< uno::XComponentContext > getComponentContext( const uno::Reference< lang::XMultiServiceFactory >& rFactory ) -{ - uno::Reference< uno::XComponentContext > rContext; - uno::Reference< beans::XPropertySet > rPropSet( rFactory, uno::UNO_QUERY ); - uno::Any a = rPropSet->getPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ); - a >>= rContext; - return rContext; -} - static sal_Int32 getBuildId() { ::rtl::OUString aDefault; @@ -139,54 +129,14 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep ,m_bLicenseNeedsAcceptance( bLicenseNeedsAcceptance ) ,m_bLicenseWasAccepted(sal_False) ,m_bAutomaticUpdChk(sal_True) + ,m_aThrobber(this, WizardResId(CTRL_THROBBER)) ,m_aLicensePath( rLicensePath ) { + FreeResource(); // --- - // FreeResource(); // enableState(STATE_USER, sal_False); // enableState(STATE_REGISTRATION, sal_False); - try - { - Point pos(5, 210 ); - Size size(11, 11 ); - - pos = LogicToPixel( pos, MAP_APPFONT ); - size = LogicToPixel( size, MAP_APPFONT ); - - uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); - uno::Reference< awt::XToolkit > xToolkit( - uno::Reference< lang::XMultiComponentFactory >( - xFactory, uno::UNO_QUERY_THROW)-> - createInstanceWithContext( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")), - getComponentContext(xFactory)), - uno::UNO_QUERY_THROW); - - m_xThrobber = uno::Reference< awt::XThrobber >( - xToolkit->createWindow( - awt::WindowDescriptor( - awt::WindowClass_SIMPLE, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Throbber")), - GetComponentInterface(), 0, - awt::Rectangle( - pos.X(), pos.Y(), size.Width(), size.Height()), - awt::WindowAttribute::SHOW)), - uno::UNO_QUERY_THROW); - } - catch (uno::RuntimeException &) - { - throw; - } - catch (Exception& ) - { - } - - uno::Reference< awt::XWindow > xThrobberWin( m_xThrobber, uno::UNO_QUERY ); - if ( xThrobberWin.is() ) - xThrobberWin->setVisible( false ); - Size aTPSize(TP_WIDTH, TP_HEIGHT); SetPageSizePixel(LogicToPixel(aTPSize, MAP_APPFONT)); @@ -352,7 +302,7 @@ TabPage* FirstStartWizard::createPage(WizardState _nState) pTabPage = new LicensePage(this, WizardResId(TP_LICENSE), m_aLicensePath); break; case STATE_MIGRATION: - pTabPage = new MigrationPage(this, WizardResId(TP_MIGRATION), m_xThrobber ); + pTabPage = new MigrationPage(this, WizardResId(TP_MIGRATION), m_aThrobber); break; case STATE_USER: pTabPage = new UserPage(this, WizardResId(TP_USER)); diff --git a/desktop/source/migration/wizard.hrc b/desktop/source/migration/wizard.hrc index fdad97a8174b..8f35488c58b3 100644 --- a/desktop/source/migration/wizard.hrc +++ b/desktop/source/migration/wizard.hrc @@ -79,6 +79,7 @@ #define ED_USER_FATHER 18 #define ED_USER_INITIALS 19 #define TR_WAITING 20 +#define CTRL_THROBBER 21 // global strings #define STR_STATE_WELCOME RID_FIRSTSTSTART_START+100 diff --git a/desktop/source/migration/wizard.hxx b/desktop/source/migration/wizard.hxx index 7e97f7d8e30e..96bd74dcd859 100644 --- a/desktop/source/migration/wizard.hxx +++ b/desktop/source/migration/wizard.hxx @@ -30,9 +30,8 @@ #include <rtl/ustring.hxx> #include <svtools/roadmapwizard.hxx> -#include <vcl/window.hxx> +#include <vcl/throbber.hxx> #include <tools/resid.hxx> -#include <com/sun/star/awt/XThrobber.hpp> namespace desktop { @@ -76,7 +75,7 @@ private: sal_Bool m_bLicenseWasAccepted; sal_Bool m_bAutomaticUpdChk; Link m_lnkCancel; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > m_xThrobber; + Throbber m_aThrobber; rtl::OUString m_aLicensePath; diff --git a/desktop/source/migration/wizard.src b/desktop/source/migration/wizard.src index e690e130c74f..78bd3a0e8197 100644 --- a/desktop/source/migration/wizard.src +++ b/desktop/source/migration/wizard.src @@ -42,6 +42,13 @@ ModalDialog DLG_FIRSTSTART_WIZARD Closeable = TRUE ; Hide = TRUE; HelpID = HID_FIRSTSTART_DIALOG; + + FixedImage CTRL_THROBBER + { + Pos = MAP_APPFONT( 5, 210 ); + Size = MAP_APPFONT( 11, 11 ); + Hide = TRUE; + }; }; String STR_STATE_WELCOME |