summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorRachit Gupta <rachitgupta1792@gmail.com>2014-07-02 14:01:59 +0530
committerJan Holesovsky <kendy@collabora.com>2014-08-14 19:43:31 +0200
commit674faa559a18e5a040b9ee608f16b0ed52c0716d (patch)
treeea31ef8574c13ec17185e0872534083d2290c0c1 /vcl
parent9160e57847511d364ead4c088a50065b829ef5de (diff)
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
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/settings.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 730c80ff1ce9..1ded48526553 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2168,6 +2168,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