summaryrefslogtreecommitdiff
path: root/desktop/source/migration
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/migration')
-rw-r--r--desktop/source/migration/pages.cxx14
-rw-r--r--desktop/source/migration/pages.hxx10
-rw-r--r--desktop/source/migration/wizard.cxx56
-rw-r--r--desktop/source/migration/wizard.hrc1
-rw-r--r--desktop/source/migration/wizard.hxx5
-rw-r--r--desktop/source/migration/wizard.src7
6 files changed, 23 insertions, 70 deletions
diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx
index 53ec488c2082..03352d33f7c6 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 776268eb475c..a89262e8ec5b 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 5cc90577aaff..150a58ce2729 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 3317880f8bd6..48045f6b035f 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