[Libreoffice-commits] core.git: include/sfx2 sfx2/source
Akshay Deep
akshaydeepiitr at gmail.com
Fri Jul 21 06:24:23 UTC 2017
include/sfx2/charmapcontrol.hxx | 1
sfx2/source/control/charmapcontrol.cxx | 43 ---------------------------------
2 files changed, 44 deletions(-)
New commits:
commit a1dae1608afc518e4984694940450aa7950f89e3
Author: Akshay Deep <akshaydeepiitr at gmail.com>
Date: Thu Jul 20 18:21:30 2017 +0530
Remove unused function code special characters
Change-Id: I6610a986795c3169077b9c1a8e65a86f5488243d
Reviewed-on: https://gerrit.libreoffice.org/40230
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Akshay Deep <akshaydeepiitr at gmail.com>
diff --git a/include/sfx2/charmapcontrol.hxx b/include/sfx2/charmapcontrol.hxx
index 4855c972bba6..2cecea301969 100644
--- a/include/sfx2/charmapcontrol.hxx
+++ b/include/sfx2/charmapcontrol.hxx
@@ -55,7 +55,6 @@ private:
void updateFavCharControl();
void getRecentCharacterList(); //gets both recent char and recent char font list
- void updateRecentCharacterList(const OUString& rChar, const OUString& rFont);
void updateRecentCharControl();
};
diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx
index d8535065621b..e9f7d75ae6b5 100644
--- a/sfx2/source/control/charmapcontrol.cxx
+++ b/sfx2/source/control/charmapcontrol.cxx
@@ -177,49 +177,6 @@ void SfxCharmapCtrl::updateRecentCharControl()
}
}
-void SfxCharmapCtrl::updateRecentCharacterList(const OUString& sTitle, const OUString& rFont)
-{
- auto itChar = std::find_if(maRecentCharList.begin(),
- maRecentCharList.end(),
- [sTitle] (const OUString & a) { return a == sTitle; });
-
- auto itChar2 = std::find_if(maRecentCharFontList.begin(),
- maRecentCharFontList.end(),
- [rFont] (const OUString & a) { return a == rFont; });
-
- // if recent char to be added is already in list, remove it
- if( itChar != maRecentCharList.end() && itChar2 != maRecentCharFontList.end() )
- {
- maRecentCharList.erase( itChar );
- maRecentCharFontList.erase( itChar2);
- }
-
- if (maRecentCharList.size() == 16)
- {
- maRecentCharList.pop_back();
- maRecentCharFontList.pop_back();
- }
-
- maRecentCharList.push_front(sTitle);
- maRecentCharFontList.push_front(rFont);
-
- css::uno::Sequence< OUString > aRecentCharList(maRecentCharList.size());
- css::uno::Sequence< OUString > aRecentCharFontList(maRecentCharFontList.size());
-
- for (size_t i = 0; i < maRecentCharList.size(); ++i)
- {
- aRecentCharList[i] = maRecentCharList[i];
- aRecentCharFontList[i] = maRecentCharFontList[i];
- }
-
- std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(comphelper::getProcessComponentContext()));
- officecfg::Office::Common::RecentCharacters::RecentCharacterList::set(aRecentCharList, batch);
- officecfg::Office::Common::RecentCharacters::RecentCharacterFontList::set(aRecentCharFontList, batch);
- batch->commit();
-
- updateRecentCharControl();
-}
-
IMPL_STATIC_LINK(SfxCharmapCtrl, LoseFocusHdl, Control&, pItem, void)
{
More information about the Libreoffice-commits
mailing list