[Libreoffice-commits] core.git: cui/source officecfg/registry
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 12 11:08:41 UTC 2018
cui/source/options/personalization.cxx | 23 +++----------
cui/source/options/personalization.hxx | 4 +-
officecfg/registry/schema/org/openoffice/Office/Common.xcs | 6 ---
3 files changed, 8 insertions(+), 25 deletions(-)
New commits:
commit cd861f593bcffb573b5588f2b3b60d70542909ca
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
AuthorDate: Thu Oct 11 15:03:11 2018 +0300
Commit: Muhammet Kara <muhammet.kara at pardus.org.tr>
CommitDate: Fri Oct 12 13:08:16 2018 +0200
tdf#120506: Get rid of unnecessary accentcolor parsing for personas
Change-Id: I64534fd3d7de90debb9e49e8c636c5fbfac787bf
Reviewed-on: https://gerrit.libreoffice.org/61668
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara at pardus.org.tr>
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 70a6890df846..590537f73b98 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -66,7 +66,6 @@ struct PersonaInfo
OUString sHeaderURL;
OUString sFooterURL;
OUString sTextColor;
- OUString sAccentColor;
};
namespace {
@@ -643,7 +642,7 @@ void SvxPersonalizationTabPage::LoadExtensionThemes()
for( sal_Int32 nIndex = 0; nIndex < nLength; nIndex++ )
{
Reference< XPropertySet > xPropertySet( officecfg::Office::Common::Misc::PersonasList::get()->getByName( installedPersonas[nIndex] ), UNO_QUERY_THROW );
- OUString aPersonaSlug, aPersonaName, aPreviewFile, aHeaderFile, aFooterFile, aTextColor, aAccentColor, aPersonaSettings;
+ OUString aPersonaSlug, aPersonaName, aPreviewFile, aHeaderFile, aFooterFile, aTextColor, aPersonaSettings;
Any aValue = xPropertySet->getPropertyValue( "Slug" );
aValue >>= aPersonaSlug;
@@ -664,11 +663,8 @@ void SvxPersonalizationTabPage::LoadExtensionThemes()
aValue = xPropertySet->getPropertyValue( "TextColor" );
aValue >>= aTextColor;
- aValue = xPropertySet->getPropertyValue( "AccentColor" );
- aValue >>= aAccentColor;
-
aPersonaSettings = aPersonaSlug + ";" + aPersonaName + ";" + aPreviewFile
- + ";" + aHeaderFile + ";" + aFooterFile + ";" + aTextColor + ";" + aAccentColor;
+ + ";" + aHeaderFile + ";" + aFooterFile + ";" + aTextColor;
rtl::Bootstrap::expandMacros( aPersonaSettings );
m_vExtensionPersonaSettings.push_back( aPersonaSettings );
}
@@ -806,8 +802,6 @@ void parseResponse(const std::string& rResponse, std::vector<PersonaInfo> & aPer
OStringToOUString( OString(arrayElement.child("theme_data").child("footerURL").string_value().get()),
RTL_TEXTENCODING_UTF8 ),
OStringToOUString( OString(arrayElement.child("theme_data").child("textcolor").string_value().get()),
- RTL_TEXTENCODING_UTF8 ),
- OStringToOUString( OString(arrayElement.child("theme_data").child("accentcolor").string_value().get()),
RTL_TEXTENCODING_UTF8 )
};
@@ -854,8 +848,6 @@ PersonaInfo parseSingleResponse(const std::string& rResponse)
OStringToOUString( OString(theme_data.child("footerURL").string_value().get()),
RTL_TEXTENCODING_UTF8 ),
OStringToOUString( OString(theme_data.child("textcolor").string_value().get()),
- RTL_TEXTENCODING_UTF8 ),
- OStringToOUString( OString(theme_data.child("accentcolor").string_value().get()),
RTL_TEXTENCODING_UTF8 )
};
@@ -924,8 +916,7 @@ void SearchAndParseThread::execute()
+ ";" + personaInfos[nIndex].sName
+ ";" + personaInfos[nIndex].sHeaderURL
+ ";" + personaInfos[nIndex].sFooterURL
- + ";" + personaInfos[nIndex].sTextColor
- + ";" + personaInfos[nIndex].sAccentColor;
+ + ";" + personaInfos[nIndex].sTextColor;
m_pPersonaDialog->AddPersonaSetting( aPersonaSetting );
@@ -987,8 +978,7 @@ void SearchAndParseThread::execute()
+ ";" + aPersonaInfo.sName
+ ";" + aPersonaInfo.sHeaderURL
+ ";" + aPersonaInfo.sFooterURL
- + ";" + aPersonaInfo.sTextColor
- + ";" + aPersonaInfo.sAccentColor;
+ + ";" + aPersonaInfo.sTextColor;
m_pPersonaDialog->AddPersonaSetting( aPersonaSetting );
@@ -1035,7 +1025,7 @@ void GetPersonaThread::execute()
if ( !xFileAccess.is() )
return;
- OUString aSlug, aName, aHeaderURL, aFooterURL, aTextColor, aAccentColor;
+ OUString aSlug, aName, aHeaderURL, aFooterURL, aTextColor;
OUString aPersonaSetting;
// get the required fields from m_aSelectedPersona
@@ -1046,7 +1036,6 @@ void GetPersonaThread::execute()
aHeaderURL = m_aSelectedPersona.getToken(0, ';', nIndex);
aFooterURL = m_aSelectedPersona.getToken(0, ';', nIndex);
aTextColor = m_aSelectedPersona.getToken(0, ';', nIndex);
- aAccentColor = m_aSelectedPersona.getToken(0, ';', nIndex);
// copy the images to the user's gallery
OUString gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
@@ -1084,7 +1073,7 @@ void GetPersonaThread::execute()
SolarMutexGuard aGuard;
aPersonaSetting = aSlug + ";" + aName + ";" + aHeaderFile + ";" + aFooterFile
- + ";" + aTextColor + ";" + aAccentColor;
+ + ";" + aTextColor;
m_pPersonaDialog->SetAppliedPersonaSetting( aPersonaSetting );
m_pPersonaDialog->EndDialog( RET_OK );
diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx
index 9f214bc1bfdc..cbdcec569fa8 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -77,10 +77,10 @@ public:
* And there needs to be a personas_list.txt file in the personas directory
* which keeps the index/info of the default personas, one persona per line.
* A line should look like this:
- * persona_slug;Persona Name;subdir/preview.jpg;subdir/header.jpg;subdir/footer.jpg;#textcolor;#accentcolor
+ * persona_slug;Persona Name;subdir/preview.jpg;subdir/header.jpg;subdir/footer.jpg;#textcolor
* (It is recommended to keep the subdir name the same as the slug)
* Example line:
- * abstract;Abstract;abstract/preview.jpg;abstract/Header2.jpg;abstract/Footer2.jpg;#ffffff;#000000
+ * abstract;Abstract;abstract/preview.jpg;abstract/Header2.jpg;abstract/Footer2.jpg;#ffffff
*/
void LoadDefaultImages();
void LoadExtensionThemes();
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index d7c01d389780..4525662ec5ae 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -843,12 +843,6 @@
</info>
<value/>
</prop>
- <prop oor:name="AccentColor" oor:type="xs:string" oor:nillable="false">
- <info>
- <desc>Value of the accent color for the Persona</desc>
- </info>
- <value/>
- </prop>
</group>
</templates>
<component>
More information about the Libreoffice-commits
mailing list