INTEGRATION: CWS changefileheader (1.7.38); FILE MERGED
2008/04/01 21:05:33 thb 1.7.38.2: #i85987# Remove external guard generation from cppumaker (to have idl-generated header clean as well) 2008/03/31 07:22:53 rt 1.7.38.1: #i87441# Change license header to LPGL v3.
This commit is contained in:
parent
431722bf2f
commit
7d1f7a2647
1 changed files with 42 additions and 66 deletions
|
@ -1,35 +1,30 @@
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
*
|
*
|
||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* $RCSfile: includes.cxx,v $
|
* Copyright 2008 by Sun Microsystems, Inc.
|
||||||
*
|
*
|
||||||
* $Revision: 1.7 $
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* last change: $Author: obo $ $Date: 2006-09-17 03:37:21 $
|
* $RCSfile: includes.cxx,v $
|
||||||
|
* $Revision: 1.8 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to
|
* This file is part of OpenOffice.org.
|
||||||
* the terms of GNU Lesser General Public License Version 2.1.
|
|
||||||
*
|
*
|
||||||
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License version 3
|
||||||
|
* only, as published by the Free Software Foundation.
|
||||||
*
|
*
|
||||||
* GNU Lesser General Public License Version 2.1
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||||
* =============================================
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* Copyright 2005 by Sun Microsystems, Inc.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
* GNU Lesser General Public License version 3 for more details
|
||||||
|
* (a copy is included in the LICENSE file that accompanied this code).
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* version 3 along with OpenOffice.org. If not, see
|
||||||
* License version 2.1, as published by the Free Software Foundation.
|
* <http://www.openoffice.org/license.html>
|
||||||
*
|
* for a copy of the LGPLv3 License.
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
||||||
* MA 02111-1307 USA
|
|
||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
@ -171,7 +166,7 @@ void Includes::dump(FileStream & out, rtl::OString const * companionHdl) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out << "#ifndef _SAL_CONFIG_H_\n#include \"sal/config.h\"\n#endif\n";
|
out << "#include \"sal/config.h\"\n";
|
||||||
if (companionHdl) {
|
if (companionHdl) {
|
||||||
out << "\n";
|
out << "\n";
|
||||||
dumpInclude(out, *companionHdl, false);
|
dumpInclude(out, *companionHdl, false);
|
||||||
|
@ -201,91 +196,77 @@ void Includes::dump(FileStream & out, rtl::OString const * companionHdl) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static char const * hxxExtension[2] = { "h", "hxx" };
|
static char const * hxxExtension[2] = { "h", "hxx" };
|
||||||
static char const * hxxExtensionUpper[2] = { "H", "HXX" };
|
|
||||||
if (m_includeAny) {
|
if (m_includeAny) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << "#ifndef _COM_SUN_STAR_UNO_ANY_" << hxxExtensionUpper[m_hpp]
|
out << "#include \"com/sun/star/uno/Any." << hxxExtension[m_hpp]
|
||||||
<< "_\n#include \"com/sun/star/uno/Any." << hxxExtension[m_hpp]
|
<< "\"\n";
|
||||||
<< "\"\n#endif\n";
|
|
||||||
}
|
}
|
||||||
if (m_includeReference) {
|
if (m_includeReference) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << "#ifndef _COM_SUN_STAR_UNO_REFERENCE_"
|
out << "#include \"com/sun/star/uno/Reference."
|
||||||
<< hxxExtensionUpper[m_hpp]
|
<< hxxExtension[m_hpp] << "\"\n";
|
||||||
<< "_\n#include \"com/sun/star/uno/Reference."
|
|
||||||
<< hxxExtension[m_hpp] << "\"\n#endif\n";
|
|
||||||
}
|
}
|
||||||
if (m_includeSequence) {
|
if (m_includeSequence) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << "#ifndef _COM_SUN_STAR_UNO_SEQUENCE_" << hxxExtensionUpper[m_hpp]
|
out << "#include \"com/sun/star/uno/Sequence." << hxxExtension[m_hpp]
|
||||||
<< "_\n#include \"com/sun/star/uno/Sequence." << hxxExtension[m_hpp]
|
<< "\"\n";
|
||||||
<< "\"\n#endif\n";
|
|
||||||
}
|
}
|
||||||
if (m_includeType) {
|
if (m_includeType) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << "#ifndef _COM_SUN_STAR_UNO_TYPE_" << hxxExtensionUpper[m_hpp]
|
out << "#include \"com/sun/star/uno/Type." << hxxExtension[m_hpp]
|
||||||
<< "_\n#include \"com/sun/star/uno/Type." << hxxExtension[m_hpp]
|
<< "\"\n";
|
||||||
<< "\"\n#endif\n";
|
|
||||||
}
|
}
|
||||||
if (m_includeCppuMacrosHxx) {
|
if (m_includeCppuMacrosHxx) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << ("#ifndef _CPPU_MACROS_HXX_\n"
|
out << ("#include \"cppu/macros.hxx\"\n");
|
||||||
"#include \"cppu/macros.hxx\"\n#endif\n");
|
|
||||||
}
|
}
|
||||||
if (m_includeCppuUnotypeHxx) {
|
if (m_includeCppuUnotypeHxx) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << ("#ifndef INCLUDED_CPPU_UNOTYPE_HXX\n"
|
out << ("#include \"cppu/unotype.hxx\"\n");
|
||||||
"#include \"cppu/unotype.hxx\"\n#endif\n");
|
|
||||||
}
|
}
|
||||||
if (m_includeOslDoublecheckedlockingH) {
|
if (m_includeOslDoublecheckedlockingH) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << ("#ifndef INCLUDED_OSL_DOUBLECHECKEDLOCKING_H\n"
|
out << ("#include \"osl/doublecheckedlocking.h\"\n");
|
||||||
"#include \"osl/doublecheckedlocking.h\"\n#endif\n");
|
|
||||||
}
|
}
|
||||||
if (m_includeOslMutexHxx) {
|
if (m_includeOslMutexHxx) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << "#ifndef _OSL_MUTEX_HXX_\n#include \"osl/mutex.hxx\"\n#endif\n";
|
out << "#include \"osl/mutex.hxx\"\n";
|
||||||
}
|
}
|
||||||
if (m_includeRtlStrbufHxx) {
|
if (m_includeRtlStrbufHxx) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << ("#ifndef _RTL_STRBUF_HXX_\n"
|
out << ("#include \"rtl/strbuf.hxx\"\n");
|
||||||
"#include \"rtl/strbuf.hxx\"\n#endif\n");
|
|
||||||
}
|
}
|
||||||
if (m_includeRtlStringH) {
|
if (m_includeRtlStringH) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << "#ifndef _RTL_STRING_H_\n#include \"rtl/string.h\"\n#endif\n";
|
out << "#include \"rtl/string.h\"\n";
|
||||||
}
|
}
|
||||||
if (m_includeRtlTextencH) {
|
if (m_includeRtlTextencH) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << "#ifndef _RTL_TEXTENC_H\n#include \"rtl/textenc.h\"\n#endif\n";
|
out << "#include \"rtl/textenc.h\"\n";
|
||||||
}
|
}
|
||||||
if (m_includeRtlUstrbufHxx) {
|
if (m_includeRtlUstrbufHxx) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << ("#ifndef _RTL_USTRBUF_HXX_\n"
|
out << ("#include \"rtl/ustrbuf.hxx\"\n");
|
||||||
"#include \"rtl/ustrbuf.hxx\"\n#endif\n");
|
|
||||||
}
|
}
|
||||||
if (m_includeRtlUstringH) {
|
if (m_includeRtlUstringH) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << "#ifndef _RTL_USTRING_H_\n#include \"rtl/ustring.h\"\n#endif\n";
|
out << "#include \"rtl/ustring.h\"\n";
|
||||||
}
|
}
|
||||||
if (m_includeRtlUstringHxx) {
|
if (m_includeRtlUstringHxx) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << ("#ifndef _RTL_USTRING_HXX_\n"
|
out << ("#include \"rtl/ustring.hxx\"\n");
|
||||||
"#include \"rtl/ustring.hxx\"\n#endif\n");
|
|
||||||
}
|
}
|
||||||
if (m_includeSalTypesH) {
|
if (m_includeSalTypesH) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << "#ifndef _SAL_TYPES_H_\n#include \"sal/types.h\"\n#endif\n";
|
out << "#include \"sal/types.h\"\n";
|
||||||
}
|
}
|
||||||
if (m_includeTypelibTypeclassH) {
|
if (m_includeTypelibTypeclassH) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << ("#ifndef _TYPELIB_TYPECLASS_H_\n"
|
out << ("#include \"typelib/typeclass.h\"\n");
|
||||||
"#include \"typelib/typeclass.h\"\n#endif\n");
|
|
||||||
}
|
}
|
||||||
if (m_includeTypelibTypedescriptionH) {
|
if (m_includeTypelibTypedescriptionH) {
|
||||||
dumpEmptyLineBeforeFirst(out, &first);
|
dumpEmptyLineBeforeFirst(out, &first);
|
||||||
out << ("#ifndef _TYPELIB_TYPEDESCRIPTION_H_\n"
|
out << ("#include \"typelib/typedescription.h\"\n");
|
||||||
"#include \"typelib/typedescription.h\"\n#endif\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,17 +275,12 @@ void Includes::dumpInclude(
|
||||||
rtl::OString const & suffix)
|
rtl::OString const & suffix)
|
||||||
{
|
{
|
||||||
static char const * extension[2] = { "hdl", "hpp" };
|
static char const * extension[2] = { "hdl", "hpp" };
|
||||||
static char const * extensionUpper[2] = { "HDL", "HPP" };
|
out << "#include \""
|
||||||
out << "#ifndef _" << registryType.replace('/', '_').toAsciiUpperCase();
|
|
||||||
if (suffix.getLength() > 0) {
|
|
||||||
out << "_" << suffix.toAsciiUpperCase();
|
|
||||||
}
|
|
||||||
out << "_" << extensionUpper[hpp] << "_\n#include \""
|
|
||||||
<< registryType;
|
<< registryType;
|
||||||
if (suffix.getLength() > 0) {
|
if (suffix.getLength() > 0) {
|
||||||
out << "/" << suffix;
|
out << "/" << suffix;
|
||||||
}
|
}
|
||||||
out << "." << extension[hpp] << "\"\n#endif\n";
|
out << "." << extension[hpp] << "\"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Includes::isInterfaceType(rtl::OString const & registryType) const {
|
bool Includes::isInterfaceType(rtl::OString const & registryType) const {
|
||||||
|
|
Loading…
Reference in a new issue