[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - vcl/source
Rachit Gupta
rachitgupta1792 at gmail.com
Wed Jul 2 01:35:52 PDT 2014
vcl/source/app/settings.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 07fee9d02dfd96fb8719ce5b151f4c1199c90d8e
Author: Rachit Gupta <rachitgupta1792 at gmail.com>
Date: Wed Jul 2 14:01:59 2014 +0530
Added feature of clearing the registry in case something goes wrong.
If the installed extension is removed, then the persona settings in
the registry are cleared to avoid odd look in the UI.
Change-Id: Iaa99f4c87ec6ce4a663e1a3cebb3f8ff45e02079
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index fbcb7a6..41a2484 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2163,6 +2163,16 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot
if ( rHeaderFooterBitmap.IsEmpty() )
rHeaderFooterBitmap = readBitmapEx( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" + aName );
}
+
+ // Something went wrong. Probably, the images are missing. Clear the persona properties in the registry.
+
+ if( rHeaderFooterBitmap.IsEmpty() )
+ {
+ boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() );
+ officecfg::Office::Common::Misc::Persona::set( "no", batch );
+ officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
+ batch->commit();
+ }
}
const BitmapEx StyleSettings::GetPersonaHeader() const
More information about the Libreoffice-commits
mailing list