update emoji autocorrect entries from po-files
[LibreOffice.git] / include / comphelper / propertysequence.hxx
blob7cd9494082c26a75e82c49caf486fd344a754106
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_COMPHELPER_PROPERTYSEQUENCE_HXX
11 #define INCLUDED_COMPHELPER_PROPERTYSEQUENCE_HXX
13 #include <utility>
14 #include <initializer_list>
15 #include <com/sun/star/uno/Any.hxx>
16 #include <com/sun/star/uno/Sequence.hxx>
17 #include <com/sun/star/beans/PropertyValue.hpp>
19 namespace comphelper
21 inline ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > InitPropertySequence(
22 ::std::initializer_list< ::std::pair< OUString, ::com::sun::star::uno::Any > > vInit)
24 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> vResult{static_cast<sal_Int32>(vInit.size())};
25 size_t nCount{0};
26 for(const auto& aEntry : vInit)
28 vResult[nCount].Name = aEntry.first;
29 vResult[nCount].Value = aEntry.second;
30 ++nCount;
32 return vResult;
34 } // namespace comphelper
38 #endif // INCLUDED_COMPHELPER_PROPERTYSEQUENCE_HXX
40 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */