path: root/cppu/qa
diff options
authorLuboš Luňák <>2012-07-16 14:33:06 +0200
committerLuboš Luňák <>2012-07-16 16:03:03 +0200
commit6080259862ee9886d1dabcb7c06132268a398cc6 (patch)
tree149b28e91f37aa243c494fa9339dd47e25655c50 /cppu/qa
parentab9b5639b23ab5db93357bd076b65adea1b6e8b6 (diff)
allow using rtl::OUString etc. simply as OUString, without rtl:: The RTL_USING #define (set by gbuild for anything that's not public API) allows to use such classes simply by their name, without having to use the namespace or do explicit using rtl::OUString (which half of the sources do anyway). Change-Id: I7edaf12cd278489cdc1d5ff782f0a86361c13c0a
Diffstat (limited to 'cppu/qa')
1 files changed, 30 insertions, 0 deletions
diff --git a/cppu/qa/checkapi/strings.cxx b/cppu/qa/checkapi/strings.cxx
new file mode 100644
index 000000000000..0d359124ebfb
--- /dev/null
+++ b/cppu/qa/checkapi/strings.cxx
@@ -0,0 +1,30 @@
+/* -*- 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
+ */
+// The whole purpose of this test is to check that public cppu/ headers
+// build even without RTL_USING (which enables using e.g. rtl::OUString
+// without to refer to the rtl namespace, which is not wanted
+// in public API). If there are build errors here, check the headers
+// for uses of such types.
+#ifdef RTL_USING
+#error Build system problem, RTL_USING using should not be set here.
+#include "cppu_allheaders.hxx"
+// This module contains no tests, this is for the build system.
+#include <cppunit/plugin/TestPlugIn.h>
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL firstfunc( sal_Bool bRes )
+ return ( bRes = sal_True );
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */