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
This commit is contained in:
committed by
Jan Holesovsky
parent
4017908018
commit
49b08326e3
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user