diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-07-16 14:33:06 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-07-16 16:03:03 +0200 |
commit | 6080259862ee9886d1dabcb7c06132268a398cc6 (patch) | |
tree | 149b28e91f37aa243c494fa9339dd47e25655c50 /cppu/qa | |
parent | ab9b5639b23ab5db93357bd076b65adea1b6e8b6 (diff) |
allow using rtl::OUString etc. simply as OUString, without rtl::
http://lists.freedesktop.org/archives/libreoffice/2012-April/029940.html
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')
-rw-r--r-- | cppu/qa/checkapi/strings.cxx | 30 |
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 http://mozilla.org/MPL/2.0/. + */ + +// 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. +#endif + +#include "cppu_allheaders.hxx" + +// This module contains no tests, this is for the build system. +#include <cppunit/plugin/TestPlugIn.h> +CPPUNIT_PLUGIN_IMPLEMENT(); +extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL firstfunc( sal_Bool bRes ) +{ + return ( bRes = sal_True ); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |