cui/source/options/personalization.cxx                     |   25 ++++++++---
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   29 +++++++++++--
 2 files changed, 44 insertions(+), 10 deletions(-)

New commits:
commit 888a0e4ceb8d379f6c44d449863ea8c1b5a599e2
Author: Rachit Gupta <rachitgupta1...@gmail.com>
Date:   Mon Jun 30 15:28:05 2014 +0530

    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

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 1cc8b75..e78c779 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 d5e926b..6548445 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>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to