Test repository to check push and ssh key
Find a file
Stephan Bergmann fc2413e9a8 Pick better variable types
...tweaking the code slightly to guarantee that j will always be non-negative

Change-Id: Ie8ba450884cc8b12e0caa79b4d75f95dd96cc120
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132993
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-14 09:58:00 +02:00
.git-hooks git pre-commit hook: fix typo 2021-04-28 12:30:34 +02:00
.github
.vscode Fix typos 2022-03-13 19:17:37 +01:00
accessibility a11y: Use new table model change types for row/col ins/del 2022-03-29 06:51:02 +02:00
android android: Deduplicate LOKitThread#load{,New}Document 2022-04-13 18:23:02 +02:00
animations animations : use cppuhelper::BaseMutex 2022-01-30 07:32:41 +01:00
apple_remote
avmedia Fix typo 2022-04-13 15:07:01 +02:00
basctl loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
basegfx use more string_view 2022-04-10 20:15:16 +02:00
basic loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
bean
bin ofz#46162 and ofz#46287 Integer overflow 2022-04-08 15:36:48 +02:00
binaryurp Pick better variable types 2022-04-14 09:58:00 +02:00
bridges bridges : use std::mutex in java brige 2022-03-25 12:35:12 +01:00
canvas loplugin:stringview check for getToken and trim 2022-04-10 12:59:38 +02:00
chart2 Resolves: tdf#141625 give enough space to see full date+time 2022-04-14 09:54:37 +02:00
cli_ure drop 'using namespace std' in cli_ure 2021-10-07 13:38:06 +02:00
codemaker loplugin:stringview check for getToken and trim 2022-04-10 12:59:38 +02:00
comphelper loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
compilerplugins loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
config_host make Calc jumbo sheets an explicit build feature 2022-03-01 10:48:13 +01:00
configmgr use more string_view in configmgr 2022-04-13 20:35:21 +02:00
connectivity loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
cppcanvas Recheck modules [a-c]* with IWYU 2022-01-13 08:26:15 +01:00
cppu use more string_view in cppu 2022-04-13 16:11:49 +02:00
cppuhelper use more string_view in cppu 2022-04-13 16:11:49 +02:00
cpputools cpputools : use std::mutex instead of osl::Mutex 2022-04-01 10:07:55 +02:00
cui loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
dbaccess loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
desktop lok: send status update for .uno:SplitCell 2022-04-14 08:30:42 +02:00
dictionaries@5314824424 Update git submodules 2022-02-15 16:16:36 +01:00
distro-configs Reduce variance in what Jenkins Gerrit builders pick up from their environment 2022-03-28 20:33:18 +02:00
drawinglayer Add info on limerest / dump drawyinglayer primitives 2022-04-13 17:04:35 +02:00
editeng don't FormatDoc() a whole long text if not necessary (tdf#144515) 2022-04-12 22:16:05 +02:00
embeddedobj tdf#147589 In document with OLE link, don't show temp-file is in use 2022-03-21 10:25:03 +01:00
embedserv Use GetModuleHandleExW instead of GetModuleHandleW 2022-01-05 16:20:36 +01:00
emfio Add info on limerest / dump drawyinglayer primitives 2022-04-13 17:04:35 +02:00
eventattacher Update remaining DevGuide wiki links. 2022-04-13 08:16:52 +02:00
extensions loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
external use gb_DEBUGINFO_FLAGS consistently in gbuild ExternalProject's 2022-04-12 13:57:32 +02:00
extras Fix typo 2022-02-15 20:06:33 +01:00
filter ofz#46630 Indirect leak 2022-04-14 09:55:47 +02:00
forms loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
formula add toId/fromId to tidy up some ugly casting 2022-02-04 15:02:03 +01:00
fpicker loplugin:stringview more o3tl conversion 2022-04-12 12:42:15 +02:00
framework loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
helpcompiler Recheck modules [i-l]* with IWYU 2022-01-27 18:52:16 +01:00
helpcontent2@8219f0b1d7 Update git submodules 2022-04-11 17:22:33 +02:00
hwpfilter ofz#46467 Timeout 2022-04-07 23:58:59 +02:00
i18nlangtag loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
i18npool Update remaining DevGuide wiki links. 2022-04-13 08:16:52 +02:00
i18nutil use more string_view 2022-04-11 17:44:46 +02:00
icon-themes Colibre: Update dark Send as Fax & Explorer On/Off icons 2022-04-03 06:40:45 +02:00
idl use more string_view 2022-04-11 17:44:46 +02:00
idlc loplugin:stringview check for getToken and trim 2022-04-10 12:59:38 +02:00
include Resolves: tdf#141625 give enough space to see full date+time 2022-04-14 09:54:37 +02:00
instsetoo_native Depend on 64-bit packages for aarch64 as well 2022-03-25 12:06:37 +01:00
io loplugin:stringview more o3tl conversion 2022-04-12 12:42:15 +02:00
ios
javaunohelper Don't use Library_tl in URE libraries 2022-02-25 08:20:55 +01:00
jurt Fix jurt/source/pipe/staticsalhack.cxx 2022-02-28 18:11:23 +01:00
jvmaccess loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
jvmfwk loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
l10ntools use more string_view in l10ntools 2022-04-13 16:11:27 +02:00
librelogo Resolves: tdf#97046 ensure build system variables start with gb_ 2021-11-04 10:48:24 +01:00
libreofficekit Recheck modules [i-l]* with IWYU 2022-01-27 18:52:16 +01:00
lingucomponent -Werror,-Wunused-but-set-variable 2022-03-28 16:34:38 +02:00
linguistic use more string_view 2022-04-11 17:44:46 +02:00
lotuswordpro loplugin:stringviewparam convert methods using compareTo 2022-04-02 16:55:36 +02:00
m4 Drop remnants of --with-webdav=neon 2022-01-05 17:50:41 +01:00
nlpsolver
o3tl add a more complete o3tl::getToken 2022-04-09 09:08:56 +02:00
odk odk: update DevGuide wiki links and correct history in footer 2022-04-12 17:32:02 +02:00
offapi sw fly frames: add Tooltip uno property 2022-03-31 15:59:46 +02:00
officecfg tdf#147107 "chapter" -> "item" in B&N toolbar and menu 2022-04-14 04:27:05 +02:00
onlineupdate
oovbaapi vba: add support for Application.WindowState + test 2022-01-27 07:38:09 +01:00
oox loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
opencl loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
osx Add some source files for debugging convenience 2022-02-02 15:53:04 +01:00
package loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
pch
postprocess WASM open links in new browser tabs 2022-01-20 10:26:04 +01:00
pyuno Don't make UNO calls from PyThreadAttached regions (i.e., with the GIL locked) 2022-04-01 16:56:58 +02:00
qadevOOo tdf#45904: Remove ScHeaderFieldObj Java test 2022-03-04 17:16:06 +01:00
readlicense_oo update credits 2022-03-23 14:28:27 +01:00
registry loplugin:stringviewparam convert methods using indexOf 2022-04-02 13:31:19 +02:00
remotebridges Recheck modules [o-r]* with IWYU 2022-01-30 16:10:57 +01:00
reportbuilder Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
reportdesign use more string_view 2022-04-10 20:15:16 +02:00
ridljar
sal loplugin:stringview more o3tl conversion 2022-04-12 12:42:15 +02:00
salhelper Recheck modules s[a-c]* with IWYU 2022-02-14 15:25:30 +01:00
sax tdf#133603 increase cache size in CachedOutputStream 2022-03-18 12:53:08 +01:00
sc Resolves: tdf#141625 give enough space to see full date+time 2022-04-14 09:54:37 +02:00
scaddins tdf#145759 Using M_PI from cmath instead of magic constants. 2022-02-15 12:17:50 +01:00
sccomp tdf#139734 removing redundant asserts after MacrosTest::loadFromDesktop 2022-02-28 22:21:28 +01:00
schema sw content controls: add ODT export 2022-04-08 12:51:09 +02:00
scp2 Fix "Adding Central Kurdish(ckb) Spell Checker & Dictionary" 2022-02-19 10:00:00 +01:00
scripting loplugin:stringviewparam convert methods using compareTo 2022-04-02 16:55:36 +02:00
sd loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
sdext loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
setup_native loplugin:empty 2022-04-10 11:12:48 +02:00
sfx2 Resolves: tdf#141625 give enough space to see full date+time 2022-04-14 09:54:37 +02:00
shell Various loplugin warnings (in new Windows-only code) 2022-04-10 10:54:32 +02:00
slideshow use more string_view 2022-04-10 20:15:16 +02:00
smoketest oss-fuzz: convert to static cross-build 2021-12-25 17:05:08 +01:00
solenv tdf#148553 liblo-native-code: Add services for numeric controls 2022-04-13 18:22:29 +02:00
soltools cid#1500573 silence Untrusted loop bound 2022-03-03 10:15:26 +01:00
sot Recheck modules s[f-t]* with IWYU 2022-03-01 08:21:00 +01:00
starmath loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
static Fix typo 2022-03-30 20:47:23 +02:00
stoc loplugin:stringview more o3tl conversion 2022-04-12 12:42:15 +02:00
store Let loplugin:nullptr look into template instantiations 2022-01-15 15:58:07 +01:00
svgio loplugin:stringview more o3tl conversion 2022-04-12 12:42:15 +02:00
svl use more string_view in svl 2022-04-13 16:55:35 +02:00
svtools loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
svx Make accessibility check dialog async 2022-04-14 08:53:39 +02:00
sw Make accessibility check dialog async 2022-04-14 08:53:39 +02:00
swext cid#1500542 swext: Wiki Publisher: "Insecure TLS version" 2022-03-07 11:01:32 +01:00
sysui change rpm compression algorithm to multi threaded xz 2022-01-23 15:13:03 +01:00
test loplugin:stringview check for getToken and trim 2022-04-10 12:59:38 +02:00
testtools Recheck modules t* with IWYU 2022-04-02 23:32:08 +02:00
toolkit loplugin:stringview add check for getToken().toInt32 2022-04-11 14:45:38 +02:00
tools include OutputDevice MapMode in SalLayoutGlyphsCache key (tdf#148400) 2022-04-12 13:31:09 +02:00
translations@4d46412589 Update git submodules 2022-04-11 16:21:31 +02:00
ucb ucb: webdav-curl: oops, increment after checking 2022-04-13 21:33:29 +02:00
ucbhelper Recheck modules [uU]* with IWYU 2022-04-12 15:20:47 +02:00
udkapi Update reference links for ISO 639 and 3166 2021-12-11 21:40:00 +01:00
uitest tdf#128610: math: add UItest 2022-03-14 15:25:08 +01:00
UnoControls Recheck modules [uU]* with IWYU 2022-04-12 15:20:47 +02:00
unodevtools Recheck modules [uU]* with IWYU 2022-04-12 15:20:47 +02:00
unoidl loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
unoil
unotest Fix the test failing when invalid certificate is in cert store 2022-03-01 15:17:55 +01:00
unotools loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
unoxml Recheck modules [uU]* with IWYU 2022-04-12 15:20:47 +02:00
ure Provide unoidl-write also for the SDK 2022-02-25 16:46:26 +01:00
uui Recheck modules [uU]* with IWYU 2022-04-12 15:20:47 +02:00
vbahelper loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
vcl compute subset of glyphs in SalLayoutGlyphsCache (tdf#139604) 2022-04-14 08:34:20 +02:00
winaccessibility loplugin:stringviewparam 2022-03-24 09:28:29 +01:00
wizards Update remaining DevGuide wiki links. 2022-04-13 08:16:52 +02:00
writerfilter loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
writerperfect loplugin:stringview check for getToken and trim 2022-04-10 12:59:38 +02:00
xmerge Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
xmlhelp loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
xmloff use more string_view in xmloff 2022-04-13 20:36:16 +02:00
xmlreader Fix clang-cl -Zc:dllexportInlines- build 2021-12-02 07:39:52 +01:00
xmlscript Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
xmlsecurity loplugin:stringviewparam whitelist some more functions 2022-04-13 08:38:53 +02:00
.buckconfig Add build toolchain to upload LibreOffice API to Maven Central 2015-12-03 23:32:11 +00:00
.buckversion
.clang-format
.editorconfig
.git-blame-ignore-revs
.gitattributes Ignore schema files for src tarball generation 2016-08-30 23:59:15 +00:00
.gitignore .gitignore: Add Qt Creator's '.qtc_clangd' 2022-03-30 10:46:37 +02:00
.gitmodules
.gitpod.dockerfile
.gitpod.yml Install C++ VSCode extension for Gitpod 2020-03-09 15:54:14 +01:00
.gitreview
antivirusDetection.vbs tdf#84553 Correctly handle failures while getting a WMI Object. 2020-02-12 09:14:03 +01:00
autogen.sh
BUCK
config.guess
config.sub
config_host.mk.in Remove obsolete HSQLDB_USE_JDBC_4_1 2022-04-06 10:46:47 +02:00
config_host_lang.mk.in
configure.ac Fix the error message for GNU Make version 2022-04-13 11:04:23 +02:00
COPYING
COPYING.LGPL Licencing files 2011-01-11 21:49:39 +00:00
COPYING.MPL
download.lst upgrade to libwebp-1.2.2 2022-04-13 15:46:44 +02:00
g Allow g to run git gc command 2022-01-15 15:42:34 +01:00
hardened_runtime.xcent.in Fix typos 2021-08-16 23:34:24 +02:00
install-sh
install_deps.sh Make some scripts more portable 2021-08-20 12:32:22 +02:00
leak-suppress.txt
Library_merged.mk
lo.xcent
logerrit
Makefile.fetch add system-dragonbox 2022-02-22 15:53:59 +01:00
Makefile.gbuild gbuild: build static LO / link static executables 2022-01-12 11:12:46 +01:00
Makefile.in Use relative path to the script, to please python3 on Windows 2022-02-15 16:34:54 +01:00
README.cross
README.help.md
README.md Update remaining DevGuide wiki links. 2022-04-13 08:16:52 +02:00
README.Solaris
Repository.mk Add unoidl-read to the SDK 2022-04-11 15:10:12 +02:00
RepositoryExternal.mk Sync the two definitions of python_arch_subdir 2022-02-23 10:17:22 +01:00
RepositoryFixes.mk WASM more initial bits and pieces 2022-01-19 10:49:40 +01:00
RepositoryModule_build.mk add drawinglayercore to merged libs 2021-12-23 11:38:24 +09:00
RepositoryModule_host.mk WASM --enable-wasm-strip now skips lots of LO code 2022-01-20 12:28:54 +01:00
sanitize-ubsan-excludelist
setup.cfg pep8 -> pycodestyle 2018-10-16 14:29:06 +02:00
TEMPLATE.SOURCECODE.HEADER
tsan-suppress.txt more tsan suppressions 2022-03-01 14:46:30 +01:00

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 here and here. 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.5
  • macOS:
    • Runtime: 10.13
    • Build: 11.0 + Xcode 12.5
  • 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 r19c and SDK 22.6.2
  • Emscripten / WASM:
    • Runtime: a browser with SharedMemory support (threads + atomics)
    • Build: Qt 5.15 with Qt supported Emscripten 1.39.8
    • See README.wasm

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.