Test repository to check push and ssh key
Find a file
Stephan Bergmann b48371ba61 Silence false -Werror=dangling-pointer=
...that hit at least with GCC 13 trunk and --enable-optimized,

> In file included from sw/inc/tox.hxx:35,
>                  from sw/inc/doc.hxx:35,
>                  from sw/source/core/inc/AccessibilityCheck.hxx:14,
>                  from sw/source/core/access/AccessibilityCheck.cxx:11:
> In constructor ‘sw::ClientIteratorBase::ClientIteratorBase(const SwModify&)’,
>     inlined from ‘SwIterator<E, S, <anonymous> >::SwIterator(const TSource&) [with TElementType = SwTextFrame; TSource = SwTextNode; sw::IteratorMode eMode = sw::IteratorMode::UnwrapMulti]’ at sw/inc/calbck.hxx:364:68,
>     inlined from ‘virtual void sw::{anonymous}::FakeCaptionCheck::check(SwNode*)’ at sw/source/core/access/AccessibilityCheck.cxx:937:99:
> sw/inc/calbck.hxx:295:32: error: storing the address of local variable ‘aIter’ in ‘sw::ClientIteratorBase::s_pClientIters’ [-Werror=dangling-pointer=]
>   295 |                 s_pClientIters = this;
>       |                 ~~~~~~~~~~~~~~~^~~~~~
> sw/source/core/access/AccessibilityCheck.cxx: In member function ‘virtual void sw::{anonymous}::FakeCaptionCheck::check(SwNode*)’:
> sw/source/core/access/AccessibilityCheck.cxx:937:14: note: ‘aIter’ declared here
>   937 |         auto aIter = SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti>(*pTextNode);
>       |              ^~~~~
> sw/inc/calbck.hxx:289:53: note: ‘sw::ClientIteratorBase::s_pClientIters’ declared here
>   289 |             static SW_DLLPUBLIC ClientIteratorBase* s_pClientIters;
>       |                                                     ^~~~~~~~~~~~~~

(And -Wdangling-pointer is unknown to older GCC versions, so would cause
-Werror=pragmas there.)

Change-Id: I64e53b52e04ab34da42c7adc54b8d8cb46123dfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148515
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-09 10:11:19 +00:00
.git-hooks Restore .git-hooks/commit-msg 2023-03-08 10:37:00 +00:00
.github
.vscode
accessibility
android
animations
apple_remote
avmedia
basctl
basegfx clang-tidy dead-store 2023-03-06 16:48:15 +00:00
basic no need to allocate these separately 2023-03-07 19:15:55 +00:00
bean
bin
binaryurp
bridges
canvas osl::Mutex->std::mutex in SimpleCanvasImpl 2023-03-08 07:51:34 +00:00
chart2 UnoApiXmlTest: remove workaround to handle chart file names in tests 2023-03-08 12:15:03 +00:00
cli_ure
codemaker
comphelper
compilerplugins Fix typo 2023-03-09 06:21:24 +00:00
config_host
configmgr
connectivity osl::Mutex->std::mutex in ParameterWrapperContainer 2023-03-08 07:51:44 +00:00
cppcanvas
cppu
cppuhelper
cpputools
cui no need to allocate these separately 2023-03-07 19:15:55 +00:00
dbaccess osl::Mutex->std::mutex in SQLEditView 2023-03-08 06:43:40 +00:00
desktop Make error message more useful 2023-03-08 12:22:48 +00:00
dictionaries@bcf7f04931
distro-configs
docmodel
drawinglayer crashtesting: assert seen on load of moz1297206-1.svg 2023-03-09 08:28:54 +00:00
editeng no need to allocate these separately 2023-03-07 15:48:59 +00:00
embeddedobj
embedserv
emfio Demultiplex test code 2023-03-09 07:06:05 +00:00
eventattacher
extensions BaseMutex->std::mutex in BibDataManager 2023-03-08 06:43:33 +00:00
external external/fontconfig: Silence UBSan nullptr-with-offset 2023-03-06 13:37:32 +00:00
extras
filter tdf#153839: add newline after certain tags 2023-03-09 07:43:14 +00:00
forms no need to allocate these separately 2023-03-06 19:58:02 +00:00
formula no need to allocate these separately 2023-03-07 19:15:55 +00:00
fpicker
framework
helpcompiler
helpcontent2@d399273cdb Update git submodules 2023-03-09 07:36:35 +00:00
hwpfilter
i18nlangtag
i18npool
i18nutil
icon-themes tdf#149144 Icons for sm Formula Editor in Sidebar Deck 2023-03-09 09:14:56 +00:00
idl
idlc/test/parser
include tdf#82984 tdf#94915 zip64 support (import + export) 2023-03-08 14:53:57 +00:00
instsetoo_native
io
ios
javaunohelper
jurt
jvmaccess
jvmfwk
l10ntools
librelogo
libreofficekit
lingucomponent Add some SAL_WARNs and SAL_INFOs 2023-03-08 12:52:12 +00:00
linguistic Add some SAL_WARNs and SAL_INFOs 2023-03-08 12:52:12 +00:00
lotuswordpro no need to allocate these separately 2023-03-06 19:57:50 +00:00
m4
nlpsolver
o3tl
odk
offapi
officecfg tdf#149144 Icons for sm Formula Editor in Sidebar Deck 2023-03-09 09:14:56 +00:00
onlineupdate
oovbaapi
oox tdf#51195 add docx export of gradient fill of Fontwork shapes 2023-03-09 08:25:51 +00:00
opencl
osx
package Fix typo 2023-03-09 06:20:54 +00:00
pch
postprocess
pyuno
qadevOOo
readlicense_oo Remove mention of apr and apr-util from NOTICE cause we don't use them... 2023-03-07 07:29:40 +00:00
registry
remotebridges
reportbuilder
reportdesign
ridljar
sal
salhelper
sax clang-tidy dead-store 2023-03-06 16:48:15 +00:00
sc tdf#154050 Unset external pointer before destroying 2023-03-09 07:23:25 +00:00
scaddins
sccomp
schema Bibliography Marks: Added tests for target-url and use-target-url 2023-03-08 08:06:38 +00:00
scp2
scripting
sd oox, sd: fix ever-increasing chart IDs when exporting to PPTX 2023-03-08 08:06:59 +00:00
sdext BaseMutex->std::mutex in PDFIRawAdaptor 2023-03-06 06:43:12 +00:00
setup_native
sfx2 tdf#149144 Icons for sm Formula Editor in Sidebar Deck 2023-03-09 09:14:56 +00:00
shell
slideshow
smoketest
solenv deduplicate MutexAndBroadcastHelper 2023-03-08 12:38:51 +00:00
soltools
sot
starmath
static
stoc
store
svgio
svl
svtools
svx Vertically center statusbar images 2023-03-08 09:59:13 +00:00
sw Silence false -Werror=dangling-pointer= 2023-03-09 10:11:19 +00:00
swext
sysui
test UnoApiXmlTest: remove workaround to handle chart file names in tests 2023-03-08 12:15:03 +00:00
testtools
toolkit BaseMutex->std::mutex in MutableTreeDataModel 2023-03-08 14:56:11 +00:00
tools tdf#82984 tdf#94915 zip64 support (import + export) 2023-03-08 14:53:57 +00:00
translations@381ab7a2ca
ucb clang-tidy dead-store 2023-03-06 16:48:15 +00:00
ucbhelper
udkapi
uitest
UnoControls
unodevtools
unoidl
unoil
unotest
unotools tdf#82984 tdf#94915 zip64 support (import + export) 2023-03-08 14:53:57 +00:00
unoxml no need to allocate these separately 2023-03-06 16:28:51 +00:00
ure
uui
vbahelper
vcl cid#1521852 Unchecked dynamic_cast 2023-03-08 19:54:15 +00:00
winaccessibility tdf#154039 wina11y: Increase refcount for returned COM interface 2023-03-07 14:47:25 +00:00
wizards
writerfilter tdf#153964 writerfilter: column break split should inherit most properties 2023-03-09 00:33:26 +00:00
writerperfect
xmerge
xmlhelp
xmloff Bibliography Marks: Added tests for target-url and use-target-url 2023-03-08 08:06:38 +00:00
xmlreader
xmlscript
xmlsecurity
.buckconfig
.buckversion
.clang-format
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitmodules
.gitpod.dockerfile
.gitpod.yml
.gitreview
antivirusDetection.vbs
autogen.sh
BUCK
config.guess
config.sub
config_host.mk.in
config_host_lang.mk.in
configure.ac MSVC: use the newer conformant preprocessor 2023-03-08 20:47:54 +00:00
COPYING
COPYING.LGPL
COPYING.MPL
cpp.hint
download.lst
g
hardened_runtime.xcent.in
install-sh
install_deps.sh
leak-suppress.txt
Library_merged.mk
lo.xcent.in
logerrit
Makefile.fetch
Makefile.gbuild
Makefile.in
README.cross
README.help.md
README.md
README.Solaris
Repository.mk
RepositoryExternal.mk Depend on ExternalPackage_fontconfig, not just ExternalProject_fontconfig 2023-03-07 18:43:56 +00:00
RepositoryFixes.mk
RepositoryModule_build.mk
RepositoryModule_host.mk
sanitize-ubsan-excludelist
setup.cfg
TEMPLATE.SOURCECODE.HEADER
tsan-suppress.txt

LibreOffice

Coverity Scan Build Status CII Best Practices Translation status

LibreOffice is an integrated office suite based on copyleft licenses and compatible with most document formats and standards. Libreoffice is backed by The Document Foundation, which represents a large independent community of enterprises, developers and other volunteers moved by the common goal of bringing to the market the best software for personal productivity. LibreOffice is open source, and free to download, use and distribute.

A quick overview of the LibreOffice code structure.

Overview

You can develop for LibreOffice in one of two ways, one recommended and one much less so. First the somewhat less recommended way: it is possible to use the SDK to develop an extension, for which you can read the API docs and Developers Guide. This re-uses the (extremely generic) UNO APIs that are also used by macro scripting in StarBasic.

The best way to add a generally useful feature to LibreOffice is to work on the code base however. Overall this way makes it easier to compile and build your code, it avoids any arbitrary limitations of our scripting APIs, and in general is far more simple and intuitive - if you are a reasonably able C++ programmer.

The Build Chain and Runtime Baselines

These are the current minimal operating system and compiler versions to run and compile LibreOffice, also used by the TDF builds:

  • Windows:
    • Runtime: Windows 7
    • Build: Cygwin + Visual Studio 2019 version 16.10
  • macOS:
    • Runtime: 10.15
    • Build: 12 (13 for aarch64) + Xcode 14
  • Linux:
    • Runtime: RHEL 7 or CentOS 7
    • Build: either GCC 7.0.0; or Clang 8.0.1 with libstdc++ 7.3.0
  • iOS (only for LibreOfficeKit):
    • Runtime: 11.4 (only support for newer i devices == 64 bit)
    • Build: Xcode 9.3 and iPhone SDK 11.4
  • Android:
    • Build: NDK r23 and SDK 30.0.3
  • Emscripten / WASM:
    • Runtime: a browser with SharedMemory support (threads + atomics)
    • Build: Qt 5.15 with Qt supported Emscripten 1.39.8
    • See README.wasm

Java is required for building many parts of LibreOffice. In TDF Wiki article Development/Java, the exact modules that depend on Java are listed.

The baseline for Java is Java Development Kit (JDK) Version 11 or later. It is possible to build LibreOffice with JDK version 9, but it is no longer supported by the JDK vendors, thus it should be avoided.

If you want to use Clang with the LibreOffice compiler plugins, the minimal version of Clang is 12.0.1. Since Xcode doesn't provide the compiler plugin headers, you have to compile your own Clang to use them on macOS.

You can find the TDF configure switches in the distro-configs/ directory.

To setup your initial build environment on Windows and macOS, we provide the LibreOffice Development Environment (LODE) scripts.

For more information see the build instructions for your platform in the TDF wiki.

The Important Bits of Code

Each module should have a README.md file inside it which has some degree of documentation for that module; patches are most welcome to improve those. We have those turned into a web page here:

https://docs.libreoffice.org/

However, there are two hundred modules, many of them of only peripheral interest for a specialist audience. So - where is the good stuff, the code that is most useful. Here is a quick overview of the most important ones:

Module Description
sal/ this provides a simple System Abstraction Layer
tools/ this provides basic internal types: Rectangle, Color etc.
vcl/ this is the widget toolkit library and one rendering abstraction
framework/ UNO framework, responsible for building toolbars, menus, status bars, and the chrome around the document using widgets from VCL, and XML descriptions from /uiconfig/ files
sfx2/ legacy core framework used by Writer/Calc/Draw: document model / load/save / signals for actions etc.
svx/ drawing model related helper code, including much of Draw/Impress

Then applications

Module Description
desktop/ this is where the main() for the application lives, init / bootstrap. the name dates back to an ancient StarOffice that also drew a desktop
sw/ Writer
sc/ Calc
sd/ Draw / Impress

There are several other libraries that are helpful from a graphical perspective:

Module Description
basegfx/ algorithms and data-types for graphics as used in the canvas
canvas/ new (UNO) canvas rendering model with various backends
cppcanvas/ C++ helper classes for using the UNO canvas
drawinglayer/ View code to render drawable objects and break them down into primitives we can render more easily.

Rules for #include Directives (C/C++)

Use the "..." form if and only if the included file is found next to the including file. Otherwise, use the <...> form. (For further details, see the mail Re: C[++]: Normalizing include syntax ("" vs <>).)

The UNO API include files should consistently use double quotes, for the benefit of external users of this API.

loplugin:includeform (compilerplugins/clang/includeform.cxx) enforces these rules.

Finding Out More

Beyond this, you can read the README.md files, send us patches, ask on the mailing list libreoffice@lists.freedesktop.org (no subscription required) or poke people on IRC #libreoffice-dev on irc.libera.chat - we're a friendly and generally helpful mob. We know the code can be hard to get into at first, and so there are no silly questions.