Kaydet (Commit) 8b00ac9b authored tarafından Daniel Robertson's avatar Daniel Robertson Kaydeden (comit) Stephan Bergmann

tdf#94228 comphelper: replace BOOST_PP

Remove makeSequence.

Change-Id: If07dc8702d811111fc634c9c7eb4c9a331517ca5
Reviewed-on: https://gerrit.libreoffice.org/18647Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst e678a8d8
......@@ -106,7 +106,6 @@
#include <com/sun/star/xml/xpath/XPathAPI.hpp>
#include <com/sun/star/xml/xpath/XXPathAPI.hpp>
#include <comphelper/anytostring.hxx>
#include <comphelper/makesequence.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/unwrapargs.hxx>
#include <config_features.h>
......
......@@ -49,7 +49,6 @@
#include <com/sun/star/xml/dom/XNode.hpp>
#include <com/sun/star/xml/dom/XNodeList.hpp>
#include <com/sun/star/xml/xpath/XPathAPI.hpp>
#include <comphelper/makesequence.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/random.hxx>
#include <comphelper/seqstream.hxx>
......
......@@ -24,7 +24,6 @@
#include <comphelper/sequence.hxx>
#include <comphelper/seqstream.hxx>
#include <comphelper/makesequence.hxx>
#include <comphelper/processfactory.hxx>
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
......@@ -469,7 +468,7 @@ css::uno::Sequence< OUString > DescriptionInfoset::getSupportedPlaforms() const
//When there is no description.xml then we assume that we support all platforms
if (! m_element.is())
{
return comphelper::makeSequence( OUString("all") );
return { OUString("all") };
}
//Check if the <platform> element was provided. If not the default is "all" platforms
......@@ -477,7 +476,7 @@ css::uno::Sequence< OUString > DescriptionInfoset::getSupportedPlaforms() const
m_xpath->selectSingleNode(m_element, "desc:platform"));
if (!nodePlatform.is())
{
return comphelper::makeSequence( OUString("all") );
return { OUString("all") };
}
//There is a platform element.
......
......@@ -35,7 +35,6 @@
#include <ucbhelper/content.hxx>
#include <svl/inettype.hxx>
#include <comphelper/anytostring.hxx>
#include <comphelper/makesequence.hxx>
#include <comphelper/sequence.hxx>
#include <com/sun/star/lang/WrappedTargetException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
......@@ -344,8 +343,7 @@ sal_Bool BackendImpl::supportsService(OUString const & ServiceName)
Sequence<OUString> BackendImpl::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
return comphelper::makeSequence(
OUString(BACKEND_SERVICE_NAME) );
return { OUString(BACKEND_SERVICE_NAME) };
}
// XPackageRegistry
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_COMPHELPER_MAKESEQUENCE_HXX
#define INCLUDED_COMPHELPER_MAKESEQUENCE_HXX
#include <com/sun/star/uno/Sequence.hxx>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repetition.hpp>
#include <boost/preprocessor/arithmetic/add.hpp>
namespace comphelper {
/** Creates a uno::Sequence out of one parameter.
*/
template <typename T>
inline ::com::sun::star::uno::Sequence<T> makeSequence( T const& element )
{
return ::com::sun::star::uno::Sequence<T>( &element, 1 );
}
#define COMPHELPER_MAKESEQUENCE_assign(z_, n_, unused_) \
p[n_] = BOOST_PP_CAT(element, n_);
/** The following preprocessor repetitions generate functions like
<pre>
template <typename T>
inline ::com::sun::star::uno::Sequence<T> makeSequence(
T const& element0, T const& element1, ... );
</pre>
which make a sequence out of the passed elements.
The maximum number of elements can be set by defining
COMPHELPER_MAKESEQUENCE_MAX_ARGS; its default is 12.
*/
#define COMPHELPER_MAKESEQUENCE_make(z_, n_, unused_) \
template <typename T> \
inline ::com::sun::star::uno::Sequence<T> makeSequence( \
BOOST_PP_ENUM_PARAMS(n_, T const& element) ) \
{ \
::com::sun::star::uno::Sequence<T> seq( n_ ); \
T * p = seq.getArray(); \
BOOST_PP_REPEAT(n_, COMPHELPER_MAKESEQUENCE_assign, ~) \
return seq; \
}
#ifndef COMPHELPER_MAKESEQUENCE_MAX_ARGS
#define COMPHELPER_MAKESEQUENCE_MAX_ARGS 12
#endif
BOOST_PP_REPEAT_FROM_TO(2, BOOST_PP_ADD(COMPHELPER_MAKESEQUENCE_MAX_ARGS, 1),
COMPHELPER_MAKESEQUENCE_make, ~)
#undef COMPHELPER_MAKESEQUENCE_MAX_ARGS
#undef COMPHELPER_MAKESEQUENCE_make
#undef COMPHELPER_MAKESEQUENCE_assign
} // namespace comphelper
#endif // ! defined( INCLUDED_COMPHELPER_MAKESEQUENCE_HXX)
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -475,7 +475,6 @@
#include <comphelper/extract.hxx>
#include <comphelper/flagguard.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/makesequence.hxx>
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/numberedcollection.hxx>
......
......@@ -39,7 +39,6 @@
#include <rtl/bootstrap.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/makesequence.hxx>
#include <unotools/mediadescriptor.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/storagehelper.hxx>
......@@ -437,8 +436,7 @@ mkException( OUString const & i_rMessage,
const beans::PropertyValue rnProp(
OUString("ResourceName"),
-1, uno::makeAny(i_rResource), static_cast<beans::PropertyState>(0));
iaioe.Arguments = ::comphelper::makeSequence(
uno::makeAny(uriProp), uno::makeAny(rnProp));
iaioe.Arguments = { uno::makeAny(uriProp), uno::makeAny(rnProp) };
return iaioe;
}
......
......@@ -452,7 +452,6 @@
#include <comphelper/extract.hxx>
#include <comphelper/flagguard.hxx>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/makesequence.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/unique_disposing_ptr.hxx>
......
......@@ -60,7 +60,6 @@
#include <authfld.hxx>
#include <SwXTextDefaults.hxx>
#include <unochart.hxx>
#include <comphelper/makesequence.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <list>
......@@ -1142,7 +1141,7 @@ sal_Bool SwXFrameEnumeration<T>::supportsService(const OUString& ServiceName) th
template<FlyCntType T>
Sequence< OUString > SwXFrameEnumeration<T>::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
return ::comphelper::makeSequence(OUString("com.sun.star.container.XEnumeration"));
return { OUString("com.sun.star.container.XEnumeration") };
}
OUString SwXFrames::getImplementationName() throw( RuntimeException, std::exception )
......@@ -1157,7 +1156,7 @@ sal_Bool SwXFrames::supportsService(const OUString& rServiceName) throw( Runtime
Sequence<OUString> SwXFrames::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
return ::comphelper::makeSequence(OUString("com.sun.star.text.TextFrames"));
return { OUString("com.sun.star.text.TextFrames") };
}
SwXFrames::SwXFrames(SwDoc* _pDoc, FlyCntType eSet) :
......
......@@ -57,7 +57,6 @@
#include <svx/shapepropertynotifier.hxx>
#include <crstate.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/makesequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <svx/scene3d.hxx>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
......@@ -437,7 +436,7 @@ sal_Bool SwXShapesEnumeration::supportsService(const OUString& ServiceName) thro
uno::Sequence< OUString > SwXShapesEnumeration::getSupportedServiceNames() throw(uno::RuntimeException, std::exception)
{
return ::comphelper::makeSequence(OUString("com.sun.star.container.XEnumeration"));
return { OUString("com.sun.star.container.XEnumeration") };
}
uno::Reference< container::XEnumeration > SwXDrawPage::createEnumeration() throw( uno::RuntimeException, std::exception )
......
......@@ -51,7 +51,6 @@
#include <statstr.hrc>
#include <comphelper/documentconstants.hxx>
#include <comphelper/makesequence.hxx>
#include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
using namespace ::com::sun::star;
......
......@@ -59,7 +59,6 @@
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/makesequence.hxx>
#include <comphelper/xmltools.hxx>
#include <com/sun/star/embed/XEncryptionProtectedSource2.hpp>
......
......@@ -23,7 +23,6 @@
#include "rtl/ustring.hxx"
#include "comphelper/makesequence.hxx"
#include <cppuhelper/supportsservice.hxx>
#include "DragSource.hxx"
......@@ -62,7 +61,7 @@ OUString dragSource_getImplementationName()
Sequence<OUString> dragSource_getSupportedServiceNames()
{
return makeSequence(OUString("com.sun.star.datatransfer.dnd.OleDragSource"));
return { OUString("com.sun.star.datatransfer.dnd.OleDragSource") };
}
@implementation DragSourceHelper;
......
......@@ -20,7 +20,6 @@
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
#include <com/sun/star/datatransfer/XTransferable.hpp>
#include <com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hpp>
#include "comphelper/makesequence.hxx"
#include <cppuhelper/interfacecontainer.hxx>
#include "clipboard.hxx"
#include "DropTarget.hxx"
......@@ -52,7 +51,7 @@ OUString dropTarget_getImplementationName()
Sequence<OUString> dropTarget_getSupportedServiceNames()
{
return makeSequence(OUString("com.sun.star.datatransfer.dnd.OleDropTarget"));
return { OUString("com.sun.star.datatransfer.dnd.OleDropTarget") };
}
namespace /* private */
......
......@@ -22,7 +22,6 @@
#include "DataFlavorMapping.hxx"
#include "OSXTransferable.hxx"
#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
#include "comphelper/makesequence.hxx"
#include "comphelper/processfactory.hxx"
#include <cppuhelper/supportsservice.hxx>
#include <boost/assert.hpp>
......@@ -74,7 +73,7 @@ OUString clipboard_getImplementationName()
Sequence<OUString> clipboard_getSupportedServiceNames()
{
return makeSequence(OUString("com.sun.star.datatransfer.clipboard.SystemClipboard"));
return { OUString("com.sun.star.datatransfer.clipboard.SystemClipboard") };
}
AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard) :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment