summaryrefslogtreecommitdiff
path: root/cui/source/options/personalization.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options/personalization.cxx')
-rw-r--r--cui/source/options/personalization.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 33fb11d77056..562b7b48d16a 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -90,7 +90,9 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( Window *pParent, const Sfx
// background image
get( m_pNoBackground, "no_background" );
get( m_pDefaultBackground, "default_background" );
+
get( m_pOwnBackground, "own_background" );
+ m_pOwnBackground->SetClickHdl( LINK( this, SvxPersonalizationTabPage, ForceSelect ) );
get( m_pSelectBackground, "select_background" );
m_pSelectBackground->SetClickHdl( LINK( this, SvxPersonalizationTabPage, SelectBackground ) );
@@ -98,10 +100,11 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( Window *pParent, const Sfx
// persona
get( m_pNoPersona, "no_persona" );
get( m_pDefaultPersona, "default_persona" );
+
get( m_pOwnPersona, "own_persona" );
+ m_pOwnPersona->SetClickHdl( LINK( this, SvxPersonalizationTabPage, ForceSelect ) );
get( m_pSelectPersona, "select_persona" );
- LINK( this, SvxPersonalizationTabPage, SelectPersona );
m_pSelectPersona->SetClickHdl( LINK( this, SvxPersonalizationTabPage, SelectPersona ) );
}
@@ -245,6 +248,16 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ )
return 0;
}
+IMPL_LINK( SvxPersonalizationTabPage, ForceSelect, RadioButton*, pButton )
+{
+ if ( pButton == m_pOwnBackground && m_aBackgroundURL.isEmpty() )
+ SelectBackground( m_pSelectBackground );
+ else if ( pButton == m_pOwnPersona && m_aPersonaSettings.isEmpty() )
+ SelectPersona( m_pSelectPersona );
+
+ return 0;
+}
+
/// Find the value on the Persona page, and convert it to a usable form.
static OUString searchValue( const OString &rBuffer, sal_Int32 from, const OString &rIdentifier )
{