summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robertson <danlrobertson89@gmail.com>2015-09-25 12:26:58 -0400
committerStephan Bergmann <sbergman@redhat.com>2015-09-25 21:13:17 +0000
commit8b00ac9b4627d8d7ed13d352ccb8932be6861d97 (patch)
treecac7420227f6a0b6d01e8c936263eeca083fdb4a
parente678a8d8e5f1a178ab83da965b785d24b0a9cffb (diff)
tdf#94228 comphelper: replace BOOST_PP
Remove makeSequence. Change-Id: If07dc8702d811111fc634c9c7eb4c9a331517ca5 Reviewed-on: https://gerrit.libreoffice.org/18647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--desktop/inc/pch/precompiled_deployment.hxx1
-rw-r--r--desktop/inc/pch/precompiled_deploymentmisc.hxx1
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx5
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx4
-rw-r--r--include/comphelper/makesequence.hxx80
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx1
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx4
-rw-r--r--sw/inc/pch/precompiled_sw.hxx1
-rw-r--r--sw/source/core/unocore/unocoll.cxx5
-rw-r--r--sw/source/core/unocore/unodraw.cxx3
-rw-r--r--sw/source/filter/xml/wrtxml.cxx1
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx1
-rw-r--r--vcl/osx/DragSource.cxx3
-rw-r--r--vcl/osx/DropTarget.cxx3
-rw-r--r--vcl/osx/clipboard.cxx3
15 files changed, 10 insertions, 106 deletions
diff --git a/desktop/inc/pch/precompiled_deployment.hxx b/desktop/inc/pch/precompiled_deployment.hxx
index e8b9ba7f5e4a..2a269e97edcf 100644
--- a/desktop/inc/pch/precompiled_deployment.hxx
+++ b/desktop/inc/pch/precompiled_deployment.hxx
@@ -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>
diff --git a/desktop/inc/pch/precompiled_deploymentmisc.hxx b/desktop/inc/pch/precompiled_deploymentmisc.hxx
index f2fcae9cc3ab..e6fbc1b9560d 100644
--- a/desktop/inc/pch/precompiled_deploymentmisc.hxx
+++ b/desktop/inc/pch/precompiled_deploymentmisc.hxx
@@ -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>
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 8ba5b0aeab9c..984e253e7d26 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -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.
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index b97c458edf15..4f974ec102aa 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -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
diff --git a/include/comphelper/makesequence.hxx b/include/comphelper/makesequence.hxx
deleted file mode 100644
index 48bb57c17910..000000000000
--- a/include/comphelper/makesequence.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- 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: */
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index 03bf69dc691d..ccaa0bd4780f 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -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>
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index d6130df49887..ef64bee84acd 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -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;
}
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 245458c34aec..e6c764ebd224 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -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>
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 7761bdbddc13..61cddcc67ea7 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -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) :
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 251fa0a726ba..d407c0de08ad 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -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 )
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 9e661d665144..853942a17f0a 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -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;
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 76e3fdf8c8e7..0138511edbe0 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -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>
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index 30818cfe4eb6..d2ce6d103975 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -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;
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index a90c1d84a90b..3c836eea31d5 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -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 */
diff --git a/vcl/osx/clipboard.cxx b/vcl/osx/clipboard.cxx
index 52943a944e73..e674b74e95a9 100644
--- a/vcl/osx/clipboard.cxx
+++ b/vcl/osx/clipboard.cxx
@@ -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) :