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++ )
|
for( ; nIndex < nLength; nIndex++ )
|
||||||
{
|
{
|
||||||
Reference< XPropertySet > xPropertySet( officecfg::Office::Common::Misc::PersonasList::get()->getByName( installedPersonas[nIndex] ), UNO_QUERY_THROW );
|
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" );
|
Any aValue = xPropertySet->getPropertyValue( "PersonaPreview" );
|
||||||
OUString aPreviewFile;
|
|
||||||
aValue >>= aPreviewFile;
|
aValue >>= aPreviewFile;
|
||||||
INetURLObject aURLObj( aPreviewFile );
|
INetURLObject aURLObj( aPreviewFile );
|
||||||
aFilter.ImportGraphic( aGraphic, aURLObj );
|
aFilter.ImportGraphic( aGraphic, aURLObj );
|
||||||
@@ -384,11 +384,24 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
|
|||||||
m_vExtensionPersonas[nCount]->Show();
|
m_vExtensionPersonas[nCount]->Show();
|
||||||
m_vExtensionPersonas[nCount++]->SetModeImage( Image( aBmp ) );
|
m_vExtensionPersonas[nCount++]->SetModeImage( Image( aBmp ) );
|
||||||
|
|
||||||
aValue = xPropertySet->getPropertyValue( "PersonaSettings" );
|
aValue = xPropertySet->getPropertyValue( "PersonaName" );
|
||||||
OUString sPersonaSettings;
|
aValue >>= aPersonaName;
|
||||||
aValue >>= sPersonaSettings;
|
|
||||||
rtl::Bootstrap::expandMacros( sPersonaSettings );
|
aValue = xPropertySet->getPropertyValue( "PersonaHeader" );
|
||||||
m_vExtensionPersonaSettings.push_back( sPersonaSettings );
|
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>
|
<info>
|
||||||
<desc>Stores the details of the installed personas.</desc>
|
<desc>Stores the details of the installed personas.</desc>
|
||||||
</info>
|
</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">
|
<prop oor:name="PersonaPreview" oor:type="xs:string" oor:nillable="false">
|
||||||
<info>
|
<info>
|
||||||
<desc>Name of the preview file for the Persona to show in the UI</desc>
|
<desc>Name of the preview file for the Persona to show in the UI</desc>
|
||||||
</info>
|
</info>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="PersonaSettings" oor:type="xs:string" oor:nillable="false">
|
<prop oor:name="PersonaHeader" oor:type="xs:string" oor:nillable="false">
|
||||||
<info>
|
<info>
|
||||||
<desc>Names of the header and footer images, and colors for text and
|
<desc>Name of the header file for the Persona</desc>
|
||||||
accent. When set, the value has form
|
</info>
|
||||||
"header.jpg;footer.jpg;#RGBTXT;#RGBACC".</desc>
|
<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>
|
</info>
|
||||||
<value/>
|
<value/>
|
||||||
</prop>
|
</prop>
|
||||||
|
Reference in New Issue
Block a user