From 930aafe35bfc80ae1bee55aab27465e2444ad860 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Tue, 24 May 2005 13:01:38 +0000 Subject: INTEGRATION: CWS c01v008 (1.7.16); FILE MERGED 2005/05/23 16:11:44 cd 1.7.16.3: #123059# make option to 'not register' configurable 2005/05/23 12:47:58 cd 1.7.16.2: #123059 make option to 'not register' configurable 2005/05/23 11:46:42 cd 1.7.16.1: #123059 make option to 'not register' configurable --- desktop/source/migration/pages.cxx | 45 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx index e50263463ba9..86aa7e535fae 100644 --- a/desktop/source/migration/pages.cxx +++ b/desktop/source/migration/pages.cxx @@ -2,9 +2,9 @@ * * $RCSfile: pages.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: rt $ $Date: 2005-05-13 08:09:33 $ + * last change: $Author: rt $ $Date: 2005-05-24 14:01:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -80,6 +80,10 @@ #include #include +#ifndef _COMPHELPER_CONFIGURATIONHELPER_HXX_ +#include +#endif + namespace desktop { @@ -429,9 +433,13 @@ RegistrationPage::RegistrationPage( svt::OWizardMachine* parent, const ResId& re , m_rbReg(this, WizardResId(RB_REGISTRATION_REG)) , m_flSeparator(this, WizardResId(FL_REGISTRATION)) , m_ftEnd(this, WizardResId(FT_REGISTRATION_END)) + , m_bNeverVisible( sal_True ) { FreeResource(); _setBold(m_ftHeader); + + impl_retrieveConfigurationData(); + updateButtonStates(); } sal_Bool RegistrationPage::determineNextButtonState() @@ -445,6 +453,39 @@ void RegistrationPage::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() +{ + if ( !m_bNeverVisible ) + { + ::Point aNeverPos = m_rbNever.GetPosPixel(); + + m_rbReg.SetPosPixel( aNeverPos ); + m_rbNever.Show( FALSE ); + } +} + sal_Bool RegistrationPage::commitPage(COMMIT_REASON _eReason) { if ( _eReason == eFinish ) -- cgit