Kaydet (Commit) 74a017e2 authored tarafından Rishabh Kumar's avatar Rishabh Kumar Kaydeden (comit) Rishabh Kumar

Use static_cast for type casting and fix loop variant size

Change-Id: Icc41693730ec8a68e3f3d68adff57fee02b7a689
Reviewed-on: https://gerrit.libreoffice.org/27714Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarRishabh Kumar <kris.kr296@yahoo.in>
üst 88a5f7d5
...@@ -228,9 +228,9 @@ void PaletteManager::AddRecentColor(const Color& rRecentColor) ...@@ -228,9 +228,9 @@ void PaletteManager::AddRecentColor(const Color& rRecentColor)
if( maRecentColors.size() > mnMaxRecentColors ) if( maRecentColors.size() > mnMaxRecentColors )
maRecentColors.pop_back(); maRecentColors.pop_back();
css::uno::Sequence< sal_Int32 > aColorList(maRecentColors.size()); css::uno::Sequence< sal_Int32 > aColorList(maRecentColors.size());
for(sal_uInt16 i = 0;i < maRecentColors.size();i++) for(sal_uInt32 i = 0;i < maRecentColors.size();i++)
{ {
aColorList[i] = (int)maRecentColors[i].GetColor(); aColorList[i] = static_cast<sal_Int32>(maRecentColors[i].GetColor());
} }
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(m_context)); std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(m_context));
officecfg::Office::Common::UserColors::RecentColor::set(aColorList, batch); officecfg::Office::Common::UserColors::RecentColor::set(aColorList, batch);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment