summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-05-24 13:01:38 +0000
committerRüdiger Timm <rt@openoffice.org>2005-05-24 13:01:38 +0000
commit930aafe35bfc80ae1bee55aab27465e2444ad860 (patch)
tree3a1d58357d04b68112323e5575889d254e581abd /desktop
parentebd7fa3e03dcff3be61fe3ee249c0e0ae5aa720b (diff)
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
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/migration/pages.cxx45
1 files changed, 43 insertions, 2 deletions
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 <com/sun/star/beans/XMaterialHolder.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
+#ifndef _COMPHELPER_CONFIGURATIONHELPER_HXX_
+#include <comphelper/configurationhelper.hxx>
+#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 )