summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-11-16 11:35:58 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2019-11-16 14:07:45 +0100
commit51eb969cb77f8b54681033f4959b15ce32116b56 (patch)
treedb2c03214965a7575df5bf0c0c5aa970f40be57b /include
parent742f59eaa38a3f13b6110573b1428de45c55b035 (diff)
Replace comphelper::ServiceInfoHelper::addToSequence
Change-Id: I325e16fdf9bbbc6f2ba2d06c417da5eeb0d48023 Reviewed-on: https://gerrit.libreoffice.org/82975 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/OUStringLiteralList.hxx31
-rw-r--r--include/comphelper/serviceinfohelper.hxx48
2 files changed, 31 insertions, 48 deletions
diff --git a/include/comphelper/OUStringLiteralList.hxx b/include/comphelper/OUStringLiteralList.hxx
new file mode 100644
index 000000000000..8c149671ffdf
--- /dev/null
+++ b/include/comphelper/OUStringLiteralList.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_COMPHELPER_OUSTRINGLITERALLIST_HXX
+#define INCLUDED_COMPHELPER_OUSTRINGLITERALLIST_HXX
+
+#include <sal/config.h>
+
+#include <initializer_list>
+#include <rtl/ustring.hxx>
+
+namespace comphelper
+{
+// Constructs std::initializer_list<OUStringLiteral> without explicit functional cast
+// to avoid [loplugin:redundantfcast] warnings
+inline const std::initializer_list<OUStringLiteral>&
+OUStringLiteralList(const std::initializer_list<OUStringLiteral>& list)
+{
+ return list;
+}
+}
+
+#endif // INCLUDED_COMPHELPER_OUSTRINGLITERALLIST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/comphelper/serviceinfohelper.hxx b/include/comphelper/serviceinfohelper.hxx
deleted file mode 100644
index 8b3bb70750f5..000000000000
--- a/include/comphelper/serviceinfohelper.hxx
+++ /dev/null
@@ -1,48 +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_SERVICEINFOHELPER_HXX
-#define INCLUDED_COMPHELPER_SERVICEINFOHELPER_HXX
-
-#include <sal/config.h>
-
-#include <initializer_list>
-#include <rtl/ustring.hxx>
-
-#include <comphelper/comphelperdllapi.h>
-
-namespace com { namespace sun { namespace star { namespace uno { template <class E> class Sequence; } } } }
-
-namespace comphelper {
-
-/** This class provides a basic helper for classes supporting the XServiceInfo Interface.
- *
- * You can use the static helper methods to combine your services with that of parent
- * or aggregated classes.
- */
-namespace ServiceInfoHelper
-{
- COMPHELPER_DLLPUBLIC void addToSequence( css::uno::Sequence< OUString >& rSeq, std::initializer_list<OUString> services ) throw();
-};
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */