[Libreoffice-commits] core.git: desktop/inc desktop/source include/comphelper sfx2/inc sfx2/source sw/inc sw/source unoxml/source vcl/osx

Daniel Robertson danlrobertson89 at gmail.com
Fri Sep 25 14:13:50 PDT 2015


 desktop/inc/pch/precompiled_deployment.hxx                |    1 
 desktop/inc/pch/precompiled_deploymentmisc.hxx            |    1 
 desktop/source/deployment/misc/dp_descriptioninfoset.cxx  |    5 
 desktop/source/deployment/registry/package/dp_package.cxx |    4 
 include/comphelper/makesequence.hxx                       |   80 --------------
 sfx2/inc/pch/precompiled_sfx.hxx                          |    1 
 sfx2/source/doc/DocumentMetadataAccess.cxx                |    4 
 sw/inc/pch/precompiled_sw.hxx                             |    1 
 sw/source/core/unocore/unocoll.cxx                        |    5 
 sw/source/core/unocore/unodraw.cxx                        |    3 
 sw/source/filter/xml/wrtxml.cxx                           |    1 
 unoxml/source/rdf/librdf_repository.cxx                   |    1 
 vcl/osx/DragSource.cxx                                    |    3 
 vcl/osx/DropTarget.cxx                                    |    3 
 vcl/osx/clipboard.cxx                                     |    3 
 15 files changed, 10 insertions(+), 106 deletions(-)

New commits:
commit 8b00ac9b4627d8d7ed13d352ccb8932be6861d97
Author: Daniel Robertson <danlrobertson89 at gmail.com>
Date:   Fri Sep 25 12:26:58 2015 -0400

    tdf#94228 comphelper: replace BOOST_PP
    
    Remove makeSequence.
    
    Change-Id: If07dc8702d811111fc634c9c7eb4c9a331517ca5
    Reviewed-on: https://gerrit.libreoffice.org/18647
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/desktop/inc/pch/precompiled_deployment.hxx b/desktop/inc/pch/precompiled_deployment.hxx
index e8b9ba7..2a269e9 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 f2fcae9..e6fbc1b 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 8ba5b0a..984e253 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 b97c458..4f974ec 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 48bb57c..0000000
--- 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 03bf69d..ccaa0bd 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 d6130df..ef64bee 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 245458c..e6c764e 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 7761bdb..61cddcc 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 251fa0a..d407c0d 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 9e661d6..853942a 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 76e3fdf8..0138511 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 30818cf..d2ce6d1 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 a90c1d8..3c836ee 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 52943a9..e674b74 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) :


More information about the Libreoffice-commits mailing list