incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1172613 - in /incubator/ooo/trunk/main: desktop/source/app/app.cxx desktop/source/migration/pages.cxx desktop/source/migration/pages.hxx desktop/source/migration/wizard.cxx framework/source/services/backingwindow.cxx
Date Mon, 19 Sep 2011 13:21:44 GMT
Author: hdu
Date: Mon Sep 19 13:21:43 2011
New Revision: 1172613

URL: http://svn.apache.org/viewvc?rev=1172613&view=rev
Log:
goodbye Registration and License dialogs, don't let the door hit you

Modified:
    incubator/ooo/trunk/main/desktop/source/app/app.cxx
    incubator/ooo/trunk/main/desktop/source/migration/pages.cxx
    incubator/ooo/trunk/main/desktop/source/migration/pages.hxx
    incubator/ooo/trunk/main/desktop/source/migration/wizard.cxx
    incubator/ooo/trunk/main/framework/source/services/backingwindow.cxx

Modified: incubator/ooo/trunk/main/desktop/source/app/app.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/desktop/source/app/app.cxx?rev=1172613&r1=1172612&r2=1172613&view=diff
==============================================================================
--- incubator/ooo/trunk/main/desktop/source/app/app.cxx (original)
+++ incubator/ooo/trunk/main/desktop/source/app/app.cxx Mon Sep 19 13:21:43 2011
@@ -1753,6 +1753,7 @@ void Desktop::Main()
                     DEFINE_CONST_UNICODE( "com.sun.star.comp.desktop.FirstStart" ) ), UNO_QUERY
);
                 if (xFirstStartJob.is())
                 {
+#if 0 // license acceptance is not needed for ASL
                     sal_Bool bDone = sal_False;
                     Sequence< NamedValue > lArgs(2);
                     lArgs[0].Name    = ::rtl::OUString::createFromAscii("LicenseNeedsAcceptance");
@@ -1765,10 +1766,9 @@ void Desktop::Main()
                     {
                         return;
                     }
+#endif // license acceptance is not needed for ASL
                 }
             }
-            else if ( RegistrationPage::hasReminderDateCome() )
-                RegistrationPage::executeSingleMode();
 
             RTL_LOGFILE_CONTEXT_TRACE( aLog, "} FirstStartWizard" );
         }

Modified: incubator/ooo/trunk/main/desktop/source/migration/pages.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/desktop/source/migration/pages.cxx?rev=1172613&r1=1172612&r2=1172613&view=diff
==============================================================================
--- incubator/ooo/trunk/main/desktop/source/migration/pages.cxx (original)
+++ incubator/ooo/trunk/main/desktop/source/migration/pages.cxx Mon Sep 19 13:21:43 2011
@@ -141,170 +141,6 @@ void WelcomePage::ActivatePage()
     // GrabFocus();
 }
 
-LicensePage::LicensePage( svt::OWizardMachine* parent, const ResId& resid, const rtl::OUString
&rLicensePath )
-    : OWizardPage(parent, resid)
-    , m_pParent(parent)
-    , m_ftHead(this, WizardResId(FT_LICENSE_HEADER))
-    , m_ftBody1(this, WizardResId(FT_LICENSE_BODY_1))
-    , m_ftBody1Txt(this, WizardResId(FT_LICENSE_BODY_1_TXT))
-    , m_ftBody2(this, WizardResId(FT_LICENSE_BODY_2))
-    , m_ftBody2Txt(this, WizardResId(FT_LICENSE_BODY_2_TXT))
-    , m_mlLicense(this, WizardResId(ML_LICENSE))
-    , m_pbDown(this, WizardResId(PB_LICENSE_DOWN))
-    , m_bLicenseRead(sal_False)
-{
-    FreeResource();
-
-    _setBold(m_ftHead);
-
-    m_mlLicense.SetEndReachedHdl( LINK(this, LicensePage, EndReachedHdl) );
-    m_mlLicense.SetScrolledHdl( LINK(this, LicensePage, ScrolledHdl) );
-    m_pbDown.SetClickHdl( LINK(this, LicensePage, PageDownHdl) );
-
-    // We want a automatic repeating page down button
-    WinBits aStyle = m_pbDown.GetStyle();
-    aStyle |= WB_REPEAT;
-    m_pbDown.SetStyle( aStyle );
-
-    // replace %PAGEDOWN in text2 with button text
-    String aText = m_ftBody1Txt.GetText();
-    aText.SearchAndReplaceAll( UniString::CreateFromAscii("%PAGEDOWN"),
-        MnemonicGenerator::EraseAllMnemonicChars(m_pbDown.GetText()));
-
-    m_ftBody1Txt.SetText( aText );
-
-    // load license text
-    File aLicenseFile(rLicensePath);
-    if ( aLicenseFile.open(OpenFlag_Read) == FileBase::E_None)
-    {
-        DirectoryItem d;
-        DirectoryItem::get(rLicensePath, d);
-        FileStatus fs(FileStatusMask_FileSize);
-        d.getFileStatus(fs);
-        sal_uInt64 nBytesRead = 0;
-        sal_uInt64 nPosition = 0;
-        sal_uInt32 nBytes = (sal_uInt32)fs.getFileSize();
-        sal_Char *pBuffer = new sal_Char[nBytes];
-        // FileBase RC r = FileBase::E_None;
-        while (aLicenseFile.read(pBuffer+nPosition, nBytes-nPosition, nBytesRead) == FileBase::E_None
-            && nPosition + nBytesRead < nBytes)
-        {
-            nPosition += nBytesRead;
-        }
-        OUString aLicenseString(pBuffer, nBytes, RTL_TEXTENCODING_UTF8,
-                OSTRING_TO_OUSTRING_CVTFLAGS | RTL_TEXTTOUNICODE_FLAGS_GLOBAL_SIGNATURE);
-        delete[] pBuffer;
-        m_mlLicense.SetText(aLicenseString);
-
-    }
-}
-
-void LicensePage::ActivatePage()
-{
-    OWizardPage::ActivatePage();
-    m_bLicenseRead = m_mlLicense.IsEndReached();
-    m_pbDown.GrabFocus();
-    updateDialogTravelUI();
-}
-
-bool LicensePage::canAdvance() const
-{
-    if (m_mlLicense.IsEndReached())
-        const_cast< LicensePage* >( this )->m_pbDown.Disable();
-    else
-        const_cast< LicensePage* >( this )->m_pbDown.Enable();
-
-    return m_bLicenseRead;
-}
-
-IMPL_LINK( LicensePage, PageDownHdl, PushButton *, EMPTYARG )
-{
-    m_mlLicense.ScrollDown( SCROLL_PAGEDOWN );
-    return 0;
-}
-
-IMPL_LINK( LicensePage, EndReachedHdl, LicenseView *, EMPTYARG )
-{
-    m_bLicenseRead = sal_True;
-    updateDialogTravelUI();
-    return 0;
-}
-
-IMPL_LINK( LicensePage, ScrolledHdl, LicenseView *, EMPTYARG )
-{
-    updateDialogTravelUI();
-    return 0;
-}
-
-
-LicenseView::LicenseView( Window* pParent, const ResId& rResId )
-    : MultiLineEdit( pParent, rResId )
-{
-    SetLeftMargin( 5 );
-    mbEndReached = IsEndReached();
-    StartListening( *GetTextEngine() );
-}
-
-LicenseView::~LicenseView()
-{
-    maEndReachedHdl = Link();
-    maScrolledHdl   = Link();
-    EndListeningAll();
-}
-
-void LicenseView::ScrollDown( ScrollType eScroll )
-{
-    ScrollBar*  pScroll = GetVScrollBar();
-    if ( pScroll )
-        pScroll->DoScrollAction( eScroll );
-}
-
-sal_Bool LicenseView::IsEndReached() const
-{
-    sal_Bool bEndReached;
-
-    ExtTextView*    pView = GetTextView();
-    ExtTextEngine*  pEdit = GetTextEngine();
-    sal_uLong           nHeight = pEdit->GetTextHeight();
-    Size            aOutSize = pView->GetWindow()->GetOutputSizePixel();
-    Point           aBottom( 0, aOutSize.Height() );
-
-    if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 )
-        bEndReached = sal_True;
-    else
-        bEndReached = sal_False;
-
-    return bEndReached;
-}
-
-void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint )
-{
-    if ( rHint.IsA( TYPE(TextHint) ) )
-    {
-        sal_Bool    bLastVal = EndReached();
-        sal_uLong   nId = ((const TextHint&)rHint).GetId();
-
-        if ( nId == TEXT_HINT_PARAINSERTED )
-        {
-            if ( bLastVal )
-                mbEndReached = IsEndReached();
-        }
-        else if ( nId == TEXT_HINT_VIEWSCROLLED )
-        {
-            if ( ! mbEndReached )
-                mbEndReached = IsEndReached();
-            maScrolledHdl.Call( this );
-        }
-
-        if ( EndReached() && !bLastVal )
-        {
-            maEndReachedHdl.Call( this );
-        }
-    }
-}
-
-
-
 // -------------------------------------------------------------------
 
 class MigrationThread : public ::osl::Thread
@@ -495,177 +331,5 @@ void UpdateCheckPage::ActivatePage()
     GrabFocus();
 }
 
-// -------------------------------------------------------------------
-RegistrationPage::RegistrationPage( Window* pParent, const ResId& rResid )
-    : OWizardPage( pParent, rResid )
-    , m_ftHeader(this, WizardResId(FT_REGISTRATION_HEADER))
-    , m_ftBody(this, WizardResId(FT_REGISTRATION_BODY))
-    , m_rbNow(this, WizardResId(RB_REGISTRATION_NOW))
-    , m_rbLater(this, WizardResId(RB_REGISTRATION_LATER))
-    , m_rbNever(this, WizardResId(RB_REGISTRATION_NEVER))
-    , m_flSeparator(this, WizardResId(FL_REGISTRATION))
-    , m_ftEnd(this, WizardResId(FT_REGISTRATION_END))
-    , m_bNeverVisible( sal_True )
-{
-    FreeResource();
-
-    // another text for OOo
-    sal_Int32 nOpenSourceContext = 0;
-    try
-    {
-        ::utl::ConfigManager::GetDirectConfigProperty(
-            ::utl::ConfigManager::OPENSOURCECONTEXT ) >>= nOpenSourceContext;
-    }
-    catch( Exception& )
-    {
-        DBG_ERRORFILE( "RegistrationPage::RegistrationPage(): error while getting open source
context" );
-    }
-
-    if ( nOpenSourceContext > 0 )
-    {
-        String sBodyText( WizardResId( STR_REGISTRATION_OOO ) );
-        m_ftBody.SetText( sBodyText );
-    }
-
-    // calculate height of body text and rearrange the buttons
-    Size aSize = m_ftBody.GetSizePixel();
-    Size aMinSize = m_ftBody.CalcMinimumSize( aSize.Width() );
-    long nTxtH = aMinSize.Height();
-    long nCtrlH = aSize.Height();
-    long nDelta = ( nCtrlH - nTxtH );
-    aSize.Height() -= nDelta;
-    m_ftBody.SetSizePixel( aSize );
-    Window* pWins[] = { &m_rbNow, &m_rbLater, &m_rbNever };
-    Window** pCurrent = pWins;
-    for ( sal_uInt32 i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent
)
-    {
-        Point aNewPos = (*pCurrent)->GetPosPixel();
-        aNewPos.Y() -= nDelta;
-        (*pCurrent)->SetPosPixel( aNewPos );
-    }
-
-    _setBold(m_ftHeader);
-    impl_retrieveConfigurationData();
-    updateButtonStates();
-}
-
-bool RegistrationPage::canAdvance() const
-{
-    return false;
-}
-
-void RegistrationPage::ActivatePage()
-{
-    OWizardPage::ActivatePage();
-    GrabFocus();
-}
-
-void RegistrationPage::impl_retrieveConfigurationData()
-{
-    static ::rtl::OUString PACKAGE = ::rtl::OUString::createFromAscii("org.openoffice.FirstStartWizard");
-    static ::rtl::OUString PATH    = ::rtl::OUString::createFromAscii("TabPages/Registration/RegistrationOptions/NeverButton");
-    static ::rtl::OUString KEY     = ::rtl::OUString::createFromAscii("Visible");
-
-    ::com::sun::star::uno::Any aValue;
-    try
-    {
-        aValue = ::comphelper::ConfigurationHelper::readDirectKey(
-                                ::comphelper::getProcessServiceFactory(),
-                                PACKAGE,
-                                PATH,
-                                KEY,
-                                ::comphelper::ConfigurationHelper::E_READONLY);
-    }
-    catch(const ::com::sun::star::uno::Exception&)
-        { aValue.clear(); }
-
-    aValue >>= m_bNeverVisible;
-}
-
-void RegistrationPage::updateButtonStates()
-{
-    m_rbNever.Show( m_bNeverVisible );
-}
-
-sal_Bool RegistrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason )
-{
-    if ( _eReason == svt::WizardTypes::eFinish )
-    {
-        ::utl::RegOptions aOptions;
-        rtl::OUString aEvent;
-
-        if ( m_rbNow.IsChecked())
-        {
-            aEvent = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RegistrationRequired" )
);
-        }
-        else if (m_rbLater.IsChecked())
-        {
-            aOptions.activateReminder(7);
-            // avtivate a reminder job...
-        }
-        // aOptions.markSessionDone();
-
-        try
-        {
-            // create the Desktop component which can load components
-            Reference < XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
-            if( xFactory.is() )
-            {
-                Reference< com::sun::star::task::XJobExecutor > xProductRegistration(
-                    xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.setup.ProductRegistration" ) ) ),
-                    UNO_QUERY_THROW );
-
-                 // tell it that the user wants to register
-                 xProductRegistration->trigger( aEvent );
-            }
-        }
-        catch( const Exception& )
-        {
-        }
-    }
-    return sal_True;
-}
-
-RegistrationPage::RegistrationMode RegistrationPage::getRegistrationMode() const
-{
-    RegistrationPage::RegistrationMode eMode = rmNow;
-    if ( m_rbLater.IsChecked() )
-        eMode = rmLater;
-    else if ( m_rbNever.IsChecked() )
-        eMode = rmNever;
-    return eMode;
-}
-
-void RegistrationPage::prepareSingleMode()
-{
-    // remove wizard text (hide and cut)
-    m_flSeparator.Hide();
-    m_ftEnd.Hide();
-    Size aNewSize = GetSizePixel();
-    aNewSize.Height() -= ( aNewSize.Height() - m_flSeparator.GetPosPixel().Y() );
-    SetSizePixel( aNewSize );
-}
-
-bool RegistrationPage::hasReminderDateCome()
-{
-    return ::utl::RegOptions().hasReminderDateCome();
-}
-
-void RegistrationPage::executeSingleMode()
-{
-    // opens the page in a single tabdialog
-    SfxSingleTabDialog aSingleDlg( NULL, TP_REGISTRATION );
-    RegistrationPage* pPage = new RegistrationPage( &aSingleDlg, WizardResId( TP_REGISTRATION
) );
-    pPage->prepareSingleMode();
-    aSingleDlg.SetPage( pPage );
-    aSingleDlg.SetText( pPage->getSingleModeTitle() );
-    aSingleDlg.Execute();
-    // the registration modes "Now" and "Later" are handled by the page
-    RegistrationPage::RegistrationMode eMode = pPage->getRegistrationMode();
-    if ( eMode == RegistrationPage::rmNow || eMode == RegistrationPage::rmLater )
-        pPage->commitPage( WizardTypes::eFinish );
-    if ( eMode != RegistrationPage::rmLater )
-        ::utl::RegOptions().removeReminder();
-}
-
 } // namespace desktop
+

Modified: incubator/ooo/trunk/main/desktop/source/migration/pages.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/desktop/source/migration/pages.hxx?rev=1172613&r1=1172612&r2=1172613&view=diff
==============================================================================
--- incubator/ooo/trunk/main/desktop/source/migration/pages.hxx (original)
+++ incubator/ooo/trunk/main/desktop/source/migration/pages.hxx Mon Sep 19 13:21:43 2011
@@ -62,57 +62,6 @@ protected:
     virtual void ActivatePage();
 };
 
-class LicenseView : public MultiLineEdit, public SfxListener
-{
-    sal_Bool            mbEndReached;
-    Link            maEndReachedHdl;
-    Link            maScrolledHdl;
-
-public:
-    LicenseView( Window* pParent, const ResId& rResId );
-    ~LicenseView();
-
-    void ScrollDown( ScrollType eScroll );
-
-    sal_Bool IsEndReached() const;
-    sal_Bool EndReached() const { return mbEndReached; }
-    void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; }
-
-    void SetEndReachedHdl( const Link& rHdl )  { maEndReachedHdl = rHdl; }
-    const Link& GetAutocompleteHdl() const { return maEndReachedHdl; }
-
-    void SetScrolledHdl( const Link& rHdl )  { maScrolledHdl = rHdl; }
-    const Link& GetScrolledHdl() const { return maScrolledHdl; }
-
-    virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
-
-protected:
-    using MultiLineEdit::Notify;
-};
-
-class LicensePage : public svt::OWizardPage
-{
-private:
-    svt::OWizardMachine *m_pParent;
-    FixedText m_ftHead;
-    FixedText m_ftBody1;
-    FixedText m_ftBody1Txt;
-    FixedText m_ftBody2;
-    FixedText m_ftBody2Txt;
-    LicenseView m_mlLicense;
-    PushButton m_pbDown;
-    sal_Bool m_bLicenseRead;
-public:
-    LicensePage( svt::OWizardMachine* parent, const ResId& resid, const rtl::OUString
&rLicensePath );
-private:
-    DECL_LINK(PageDownHdl, PushButton*);
-    DECL_LINK(EndReachedHdl, LicenseView*);
-    DECL_LINK(ScrolledHdl, LicenseView*);
-protected:
-    virtual bool canAdvance() const;
-    virtual void ActivatePage();
-};
-
 class MigrationPage : public svt::OWizardPage
 {
 private:
@@ -165,47 +114,6 @@ protected:
     virtual void ActivatePage();
 };
 
-
-class RegistrationPage : public svt::OWizardPage
-{
-private:
-    FixedText   m_ftHeader;
-    FixedText   m_ftBody;
-    RadioButton m_rbNow;
-    RadioButton m_rbLater;
-    RadioButton m_rbNever;
-    FixedLine   m_flSeparator;
-    FixedText   m_ftEnd;
-
-    sal_Bool    m_bNeverVisible;
-
-    void updateButtonStates();
-    void impl_retrieveConfigurationData();
-
-protected:
-    virtual bool canAdvance() const;
-    virtual void ActivatePage();
-
-    virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason );
-
-public:
-    RegistrationPage( Window* parent, const ResId& resid);
-
-    enum RegistrationMode
-    {
-        rmNow,      // register now
-        rmLater,    // register later
-        rmNever     // register never
-    };
-
-    RegistrationMode    getRegistrationMode() const;
-    void                prepareSingleMode();
-    inline String       getSingleModeTitle() const { return m_ftHeader.GetText(); }
-
-    static bool         hasReminderDateCome();
-    static void         executeSingleMode();
-};
-
 } // namespace desktop
 
 #endif // #ifndef _PAGES_HXX_

Modified: incubator/ooo/trunk/main/desktop/source/migration/wizard.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/desktop/source/migration/wizard.cxx?rev=1172613&r1=1172612&r2=1172613&view=diff
==============================================================================
--- incubator/ooo/trunk/main/desktop/source/migration/wizard.cxx (original)
+++ incubator/ooo/trunk/main/desktop/source/migration/wizard.cxx Mon Sep 19 13:21:43 2011
@@ -178,29 +178,22 @@ void FirstStartWizard::DisableButtonsWhi
 	::svt::RoadmapWizardTypes::PathId aDefaultPath = 0;
 
     sal_Bool bPage_Welcome      = sal_True;
-    sal_Bool bPage_License      = sal_True;
     sal_Bool bPage_Migration    = sal_True;
     sal_Bool bPage_User         = sal_True;
     sal_Bool bPage_UpdateCheck  = sal_True;
-    sal_Bool bPage_Registration = sal_True;
 
-    bPage_License     = m_bLicenseNeedsAcceptance;
     bPage_Migration   = Migration::checkMigration();
     bPage_UpdateCheck = showOnlineUpdatePage();
 
     WizardPath aPath;
     if (bPage_Welcome)
         aPath.push_back(STATE_WELCOME);
-    if (bPage_License)
-        aPath.push_back(STATE_LICENSE);
     if (bPage_Migration)
         aPath.push_back(STATE_MIGRATION);
     if (bPage_User)
         aPath.push_back(STATE_USER);
     if (bPage_UpdateCheck)
         aPath.push_back(STATE_UPDATE_CHECK);
-    if (bPage_Registration)
-        aPath.push_back(STATE_REGISTRATION);
     
     declarePath(aDefaultPath, aPath);
 
@@ -209,7 +202,7 @@ void FirstStartWizard::DisableButtonsWhi
 	//	  should be accessible only in case license was accepted !
 	// b) But if no license should be shown at all ...
 	//    such direct links can be enabled by default.
-	sal_Bool bAllowDirectLink = ( ! bPage_License);
+	sal_Bool bAllowDirectLink = true;
 
     if (bPage_User)
         enableState(STATE_USER, bAllowDirectLink);
@@ -217,8 +210,6 @@ void FirstStartWizard::DisableButtonsWhi
         enableState(STATE_UPDATE_CHECK, bAllowDirectLink);
     if (bPage_Migration)
         enableState(STATE_MIGRATION, bAllowDirectLink);
-    if (bPage_Registration)
-        enableState(STATE_REGISTRATION, bAllowDirectLink);
 
 	return aDefaultPath;
 }
@@ -298,9 +289,6 @@ TabPage* FirstStartWizard::createPage(Wi
     case STATE_WELCOME:
         pTabPage = new WelcomePage(this, WizardResId(TP_WELCOME), m_bLicenseNeedsAcceptance);
         break;
-    case STATE_LICENSE:
-        pTabPage = new LicensePage(this, WizardResId(TP_LICENSE), m_aLicensePath);
-        break;
     case STATE_MIGRATION:
         pTabPage = new MigrationPage(this, WizardResId(TP_MIGRATION), m_aThrobber);
         break;
@@ -310,9 +298,6 @@ TabPage* FirstStartWizard::createPage(Wi
     case STATE_UPDATE_CHECK:
         pTabPage = new UpdateCheckPage(this, WizardResId(TP_UPDATE_CHECK));
         break;
-    case STATE_REGISTRATION:
-        pTabPage = new RegistrationPage(this, WizardResId(TP_REGISTRATION));
-        break;
     }
     pTabPage->Show();
 
@@ -327,9 +312,6 @@ String FirstStartWizard::getStateDisplay
     case STATE_WELCOME:
         sName = String(WizardResId(STR_STATE_WELCOME));
         break;
-    case STATE_LICENSE:
-        sName = String(WizardResId(STR_STATE_LICENSE));
-        break;
     case STATE_MIGRATION:
         sName = String(WizardResId(STR_STATE_MIGRATION));
         break;
@@ -339,9 +321,6 @@ String FirstStartWizard::getStateDisplay
     case STATE_UPDATE_CHECK:
         sName = String(WizardResId(STR_STATE_UPDATE_CHECK));
         break;
-    case STATE_REGISTRATION:
-        sName = String(WizardResId(STR_STATE_REGISTRATION));
-        break;
     }
     return sName;
 }

Modified: incubator/ooo/trunk/main/framework/source/services/backingwindow.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/framework/source/services/backingwindow.cxx?rev=1172613&r1=1172612&r2=1172613&view=diff
==============================================================================
--- incubator/ooo/trunk/main/framework/source/services/backingwindow.cxx (original)
+++ incubator/ooo/trunk/main/framework/source/services/backingwindow.cxx Mon Sep 19 13:21:43
2011
@@ -215,12 +215,6 @@ BackingWindow::BackingWindow( Window* i_
     maToolbox.SetItemCommand( nItemId_Extensions, String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:Extensions"
) ) );
     maToolbox.ShowItem( nItemId_Extensions );
 
-    maToolbox.InsertItem( nItemId_Reg, Image() );
-    maToolbox.SetQuickHelpText( nItemId_Reg, aRegHelpText );
-    maToolbox.SetItemText( nItemId_Reg, aRegHelpText );
-    maToolbox.SetItemCommand( nItemId_Reg, String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:Register"
) ) );
-    maToolbox.ShowItem( nItemId_Reg );
-
     maToolbox.InsertItem( nItemId_Info, Image() );
     maToolbox.SetItemText( nItemId_Info, aInfoHelpText );
     maToolbox.SetQuickHelpText( nItemId_Info, aInfoHelpText );
@@ -437,7 +431,7 @@ void BackingWindow::initBackground()
         maBackgroundRight = BitmapEx( FwkResId( BMP_BACKING_BACKGROUND_RIGHT ) );
     }
     maToolbox.SetItemImage( nItemId_Extensions, BitmapEx( FwkResId( BMP_BACKING_EXT ) ) );
-    maToolbox.SetItemImage( nItemId_Reg, BitmapEx( FwkResId( BMP_BACKING_REG ) ) );
+//###    maToolbox.SetItemImage( nItemId_Reg, BitmapEx( FwkResId( BMP_BACKING_REG ) ) );
     maToolbox.SetItemImage( nItemId_Info, BitmapEx( FwkResId( BMP_BACKING_INFO ) ) );
     maToolbox.SetItemImage( nItemId_TplRep, BitmapEx( FwkResId( BMP_BACKING_TPLREP ) ) );
 
@@ -907,25 +901,6 @@ IMPL_LINK( BackingWindow, ToolboxHdl, vo
         pNodePath = "/org.openoffice.Office.Common/Help/StartCenter";
         pNode = "AddFeatureURL";
         break;
-    case nItemId_Reg:
-        try
-        {
-            // create the Desktop component which can load components
-            Reference < lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
-            if( xFactory.is() )
-            {
-                Reference< task::XJobExecutor > xProductRegistration(
-                    xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.setup.ProductRegistration" ) ) ),
-                    UNO_QUERY_THROW );
-
-                 // tell it that the user wants to register
-                 xProductRegistration->trigger( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"RegistrationRequired" ) ) );
-            }
-        }
-        catch( const Exception& )
-        {
-        }
-        break;
     case nItemId_Info:
         pNodePath = "/org.openoffice.Office.Common/Help/StartCenter";
         pNode = "InfoURL";



Mime
View raw message