diff options
-rw-r--r-- | starmath/inc/symbol.hxx | 10 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 7 |
2 files changed, 6 insertions, 11 deletions
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx index f73d15617ab7..3b23e92ea581 100644 --- a/starmath/inc/symbol.hxx +++ b/starmath/inc/symbol.hxx @@ -26,8 +26,6 @@ #include <map> #include <vector> #include <set> -#include <functional> -#include <algorithm> #include "unomodel.hxx" #include "utility.hxx" @@ -94,14 +92,6 @@ typedef std::map< OUString, SmSym > SymbolMap_t; // vector of pointers to the actual symbols in the above container typedef std::vector< const SmSym * > SymbolPtrVec_t; -struct lt_SmSymPtr : public std::binary_function< const SmSym *, const SmSym *, bool > -{ - bool operator() ( const SmSym *pSym1, const SmSym *pSym2 ) const - { - return pSym1->GetCharacter() < pSym2->GetCharacter(); - } -}; - class SmSymbolManager : public SfxListener { diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 7b56427cad8a..87fba573d94f 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -51,6 +51,7 @@ #include "document.hxx" #include "unomodel.hxx" +#include <algorithm> namespace { @@ -1611,7 +1612,11 @@ bool SmSymbolDialog::SelectSymbolSet(const OUString &rSymbolSetName) aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName ); // sort symbols by Unicode position (useful for displaying Greek characters alphabetically) - std::sort( aSymbolSet.begin(), aSymbolSet.end(), lt_SmSymPtr() ); + std::sort( aSymbolSet.begin(), aSymbolSet.end(), + [](const SmSym *pSym1, const SmSym *pSym2) + { + return pSym1->GetCharacter() < pSym2->GetCharacter(); + } ); m_pSymbolSetDisplay->SetSymbolSet( aSymbolSet ); if (aSymbolSet.size() > 0) |