diff options
author | Rishabh Kumar <kris.kr296@gmail.com> | 2016-07-30 09:22:45 +0530 |
---|---|---|
committer | Rishabh Kumar <kris.kr296@yahoo.in> | 2016-07-30 04:32:29 +0000 |
commit | 74a017e27d04be13f072d03cab3a623a6b6d43ae (patch) | |
tree | 50e489680a937606385b161ed8d9246bf2d836e5 | |
parent | 88a5f7d56f9e6040450fb959ce8d091a50edcfde (diff) |
Use static_cast for type casting and fix loop variant size
Change-Id: Icc41693730ec8a68e3f3d68adff57fee02b7a689
Reviewed-on: https://gerrit.libreoffice.org/27714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Rishabh Kumar <kris.kr296@yahoo.in>
-rw-r--r-- | svx/source/tbxctrls/PaletteManager.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index e14c172c371b..74a87f7b9770 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -228,9 +228,9 @@ void PaletteManager::AddRecentColor(const Color& rRecentColor) if( maRecentColors.size() > mnMaxRecentColors ) maRecentColors.pop_back(); 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)); officecfg::Office::Common::UserColors::RecentColor::set(aColorList, batch); |