diff options
author | Rachit Gupta <rachitgupta1792@gmail.com> | 2014-06-30 15:28:05 +0530 |
---|---|---|
committer | Rachit Gupta <rachitgupta1792@gmail.com> | 2014-08-04 20:27:54 +0530 |
commit | 4d8e67296ec380a6c8f57a4ac808f67916692aa0 (patch) | |
tree | ce11b062fdba789623d072d296a550df4d046410 | |
parent | 880afa2225bf1524f088d91ad82606309edd3ccc (diff) |
Changed application of personas through extensions procedure.
The PersonasEntry template in the registry now stores the setting as
splitted values rather than ';' separated terms. The corresponding ';'
separated setting is prepared and stored.
Change-Id: I154d519c475a48763a75b5c35ad20f170c1d7996
-rw-r--r-- | cui/source/options/personalization.cxx | 25 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 29 |
2 files changed, 44 insertions, 10 deletions
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 4c9781cbe53c..c2fe00c2dbf7 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -375,8 +375,8 @@ void SvxPersonalizationTabPage::LoadDefaultImages() for( ; nIndex < nLength; nIndex++ ) { Reference< XPropertySet > xPropertySet( officecfg::Office::Common::Misc::PersonasList::get()->getByName( installedPersonas[nIndex] ), UNO_QUERY_THROW ); + OUString aPersonaName, aPreviewFile, aHeaderFile, aFooterFile, aTextColor, aAccentColor, aPersonaSettings; Any aValue = xPropertySet->getPropertyValue( "PersonaPreview" ); - OUString aPreviewFile; aValue >>= aPreviewFile; INetURLObject aURLObj( aPreviewFile ); aFilter.ImportGraphic( aGraphic, aURLObj ); @@ -384,11 +384,24 @@ void SvxPersonalizationTabPage::LoadDefaultImages() m_vExtensionPersonas[nCount]->Show(); m_vExtensionPersonas[nCount++]->SetModeImage( Image( aBmp ) ); - aValue = xPropertySet->getPropertyValue( "PersonaSettings" ); - OUString sPersonaSettings; - aValue >>= sPersonaSettings; - rtl::Bootstrap::expandMacros( sPersonaSettings ); - m_vExtensionPersonaSettings.push_back( sPersonaSettings ); + aValue = xPropertySet->getPropertyValue( "PersonaName" ); + aValue >>= aPersonaName; + + aValue = xPropertySet->getPropertyValue( "PersonaHeader" ); + aValue >>= aHeaderFile; + + aValue = xPropertySet->getPropertyValue( "PersonaFooter" ); + aValue >>= aFooterFile; + + aValue = xPropertySet->getPropertyValue( "PersonaTextColor" ); + aValue >>= aTextColor; + + aValue = xPropertySet->getPropertyValue( "PersonaAccentColor" ); + aValue >>= aAccentColor; + + aPersonaSettings = aHeaderFile + ";" + aFooterFile + ";" + aTextColor + ";" + aAccentColor; + rtl::Bootstrap::expandMacros( aPersonaSettings ); + m_vExtensionPersonaSettings.push_back( aPersonaSettings ); } } diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index d5e926b12b85..6548445053ed 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -810,16 +810,37 @@ <info> <desc>Stores the details of the installed personas.</desc> </info> + <prop oor:name="PersonaName" oor:type="xs:string" oor:nillable="false"> + <info> + <desc>The Persona's name</desc> + </info> + </prop> <prop oor:name="PersonaPreview" oor:type="xs:string" oor:nillable="false"> <info> <desc>Name of the preview file for the Persona to show in the UI</desc> </info> </prop> - <prop oor:name="PersonaSettings" oor:type="xs:string" oor:nillable="false"> + <prop oor:name="PersonaHeader" oor:type="xs:string" oor:nillable="false"> <info> - <desc>Names of the header and footer images, and colors for text and - accent. When set, the value has form - "header.jpg;footer.jpg;#RGBTXT;#RGBACC".</desc> + <desc>Name of the header file for the Persona</desc> + </info> + <value/> + </prop> + <prop oor:name="PersonaFooter" oor:type="xs:string" oor:nillable="false"> + <info> + <desc>Name of the footer file for the Persona</desc> + </info> + <value/> + </prop> + <prop oor:name="PersonaTextColor" oor:type="xs:string" oor:nillable="false"> + <info> + <desc>Value of the text color for the Persona</desc> + </info> + <value/> + </prop> + <prop oor:name="PersonaAccentColor" oor:type="xs:string" oor:nillable="false"> + <info> + <desc>Value of the accent color for the Persona</desc> </info> <value/> </prop> |