TEMPLATE.SOURCECODE.HEADER 5.49 KB
Newer Older
1 2
------------------------------------------------------------------------

3 4 5 6 7 8 9 10
                          * Stop / Think *

	You need to choose either a pure MPLv2 header (from the top),
or an MPLv2 on ALv2 header (from the bottom).

	If the new module you created is based in any way on an
existing module, then:

11
	a) if that module has an MPLv2 on ALv2 header - please use
12 13
	   this option or

14
	b) if the module is entirely your own work, and/or based on an
15 16
	   existing MPLv2 header - please use that header.

17 18
	Otherwise, use the pure MPLv2 header for new code.

19
	For any questions please contact me directly:
20
			    michael.meeks@collabora.com.
21 22 23 24 25 26

	Thanks !

------------------------------------------------------------------------

             For all entirely new, original source files created by
27 28 29 30
                        LibreOffice hackers:

------------------------------------------------------------------------

31 32
For C/C++/Java/IDL etc.

33
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
Wol's avatar
Wol committed
34
/*
35
 * This file is part of the LibreOffice project.
Wol's avatar
Wol committed
36
 *
37 38 39
 * 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/.
Wol's avatar
Wol committed
40
 */
41
...
42
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
43 44 45

For makefiles:

46
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
47 48 49 50 51 52 53
#
# 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/.
#
54 55
...
# vim: set noet sw=4 ts=4:
56

57 58 59 60 61 62 63 64 65 66 67 68 69
For Python files:

# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
#
...
# vim: set shiftwidth=4 softtabstop=4 expandtab:

70 71
For XML / .component:

72
<?xml version="1.0" encoding="UTF-8"?>
73 74 75 76 77 78 79 80 81
<!--
 * 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/.
 *
-->

82 83 84

------------------------------------------------------------------------

85 86
             For source files which may contain code
               from the Apache Software Foundation:
87 88 89 90 91

------------------------------------------------------------------------

For C/C++/Java/IDL etc.

92
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
/*
 * 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 .
 */
110
...
111
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
112 113 114

For makefiles, perl, scripts etc.

115
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
#
# 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 .
#
133 134
...
# vim: set noet sw=4 ts=4:
Michael Meeks's avatar
Michael Meeks committed
135 136 137

For XML / .component:

138
<?xml version="1.0" encoding="UTF-8"?>
Michael Meeks's avatar
Michael Meeks committed
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
<!--
 * 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 .
-->