]> git.lyx.org Git - features.git/commitdiff
move getSecond to frontend_helpers.h
authorPeter Kümmel <syntheticpp@gmx.net>
Tue, 4 Sep 2007 18:35:58 +0000 (18:35 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Tue, 4 Sep 2007 18:35:58 +0000 (18:35 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20044 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/frontend_helpers.h
src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiGraphics.cpp
src/frontends/qt4/GuiPrefs.cpp

index 79fa3adea5973dacf808621131cc473f89c82995..eeecc527911fe699773e0f81a9b4d714461c4c8a 100644 (file)
@@ -69,6 +69,16 @@ std::vector<BarPair>      const getBarData();
 ///
 std::vector<ColorPair>    const getColorData();
 
+///
+template<class Pair>
+std::vector<typename Pair::second_type> const
+getSecond(std::vector<Pair> const & pr)
+{
+        std::vector<typename Pair::second_type> tmp(pr.size());
+        std::transform(pr.begin(), pr.end(), tmp.begin(),
+                                        boost::bind(&Pair::second, _1));
+        return tmp;
+}
 
 ///
 typedef std::pair<docstring, std::string> LanguagePair;
index 5486867eade25f89e50cf05a68bd2d14ab89e43e..3abbc52a37f49734f418f325669f1168622fe10e 100644 (file)
@@ -170,15 +170,6 @@ void PreambleModule::closeEvent(QCloseEvent * e)
 //
 /////////////////////////////////////////////////////////////////////
 
-template<class Pair>
-std::vector<typename Pair::second_type> const
-getSecond(std::vector<Pair> const & pr)
-{
-       std::vector<typename Pair::second_type> tmp(pr.size());
-       std::transform(pr.begin(), pr.end(), tmp.begin(),
-                                                               boost::bind(&Pair::second, _1));
-       return tmp;
-}
 
 GuiDocumentDialog::GuiDocumentDialog(GuiDocument * form)
        : form_(form), lang_(getSecond(getLanguageData(false)))
index 1add51bffc56eed970d3d38ffa7910e9013241c2..b63d2462f5f630ebab8b1f9ac412122804a33ee4 100644 (file)
@@ -390,16 +390,6 @@ static int getItemNo(const vector<string> & v, string const & s)
        return (cit != v.end()) ? int(cit - v.begin()) : 0;
 }
 
-template<class Pair>
-std::vector<typename Pair::second_type> const
-getSecond(std::vector<Pair> const & pr)
-{
-        std::vector<typename Pair::second_type> tmp(pr.size());
-        std::transform(pr.begin(), pr.end(), tmp.begin(),
-                                        boost::bind(&Pair::second, _1));
-        return tmp;
-}
-
 
 void GuiGraphics::update_contents()
 {
index 398b03ea146058b4da61c6b09d8be35c240d11b3..c86e31c329d7f405403b6313d51abf5ef9bccaf6 100644 (file)
@@ -1573,17 +1573,6 @@ void PrefFileformats::remove_format()
 //
 /////////////////////////////////////////////////////////////////////
 
-template<class Pair>
-std::vector<typename Pair::second_type> const
-getSecond(std::vector<Pair> const & pr)
-{
-       std::vector<typename Pair::second_type> tmp(pr.size());
-       std::transform(pr.begin(), pr.end(), tmp.begin(),
-                      boost::bind(&Pair::second, _1));
-       return tmp;
-}
-
-
 PrefLanguage::PrefLanguage(QWidget * parent)
        : PrefModule(_("Language"), 0, parent)
 {