update credits
[LibreOffice.git] / framework / inc / macros / generic.hxx
blob2b0e918d048d6b667b320c0ecb4c4279b31a9b4f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __FRAMEWORK_MACROS_GENERIC_HXX_
21 #define __FRAMEWORK_MACROS_GENERIC_HXX_
23 #include <rtl/ustring.hxx>
24 #include <rtl/textenc.h>
26 //*****************************************************************************************************************
27 // generic macros
28 //*****************************************************************************************************************
30 /*_________________________________________________________________________________________________________________
31 DECLARE_ASCII( SASCIIVALUE )
33 Use it to declare a constant ascii value at compile time in code.
34 zB. OUSting sTest = DECLARE_ASCII( "Test" )
35 _________________________________________________________________________________________________________________*/
37 #define DECLARE_ASCII( SASCIIVALUE ) \
38 OUString( SASCIIVALUE )
40 /*_________________________________________________________________________________________________________________
41 U2B( SUNICODEVALUE )
43 Use it to convert unicode strings to ascii values and reverse ...
44 We use UTF8 as default textencoding.
45 _________________________________________________________________________________________________________________*/
47 #define U2B( SUNICODEVALUE ) \
48 OUStringToOString( SUNICODEVALUE, RTL_TEXTENCODING_UTF8 )
50 #endif // #ifndef __FRAMEWORK_MACROS_GENERIC_HXX_
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */