# libreoffice/core architecture

> Architecture diagram of the GitHub repository libreoffice/core, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/libreoffice/core
- Repository: https://github.com/libreoffice/core

## Overview

LibreOffice is a cross-platform office suite. A typical workflow starts when a user opens or creates a document, the desktop/framework runtime loads it into an application module, and the document is edited and rendered through shared UI and graphics layers before being saved. The README describes the core module responsibilities; the supplied tree also exposes an Android LibreOfficeKit client and extension deployment code. Some links below follow documented responsibilities rather than sampled implementation, so uncertain internal calls are omitted.

Main entry points: [`framework`](https://github.com/libreoffice/core/tree/master/framework) (UI framework), [`sfx2`](https://github.com/libreoffice/core/tree/master/sfx2) (Document framework), [`svx`](https://github.com/libreoffice/core/tree/master/svx) (Drawing helpers), [`desktop`](https://github.com/libreoffice/core/tree/master/desktop) (Desktop startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_desktop["Desktop startup"]
  node_framework["UI framework"]
end

subgraph group_documents["Document applications"]
  node_writer["Writer"]
  node_calc["Calc"]
  node_draw["Draw and Impress"]
end

subgraph group_shared["Shared runtime"]
  node_sfx["Document framework"]
  node_vcl["Widget toolkit"]
  node_svx["Drawing helpers"]
  node_drawinglayer["Drawing renderer"]
  node_canvas["Canvas backends"]
  node_uno["UNO interfaces"]
end

subgraph group_integrations["Clients and extensions"]
  node_android_ui["Android editor UI"]
  node_lokit["LibreOfficeKit shell<br/>[LOKitShell.java]"]
  node_lokit_thread["Office worker<br/>[LOKitThread.java]"]
  node_tiles["Tile provider"]
  node_deployment["Extension manager<br/>[dp_manager.h]"]
end

node_user(("Office user"))
node_android_user(("Android user"))

node_user -->|"starts or opens"| node_desktop
node_desktop -->|"initializes UI"| node_framework
node_framework -->|"dispatches document actions"| node_sfx
node_sfx -->|"loads and manages"| node_writer
node_sfx -->|"loads and manages"| node_calc
node_sfx -->|"loads and manages"| node_draw
node_framework -->|"builds UI with"| node_vcl
node_writer -->|"uses drawing helpers"| node_svx
node_calc -->|"uses drawing helpers"| node_svx
node_draw -->|"uses drawing helpers"| node_svx
node_svx -->|"prepares drawable objects"| node_drawinglayer
node_drawinglayer -->|"renders through"| node_canvas
node_android_user -->|"opens and edits"| node_android_ui
node_android_ui -->|"sends editor events"| node_lokit
node_lokit -->|"dispatches office work"| node_lokit_thread
node_lokit_thread -->|"requests document tiles"| node_tiles
node_desktop -.->|"provides extension services"| node_deployment
node_framework -.->|"uses UNO interfaces"| node_uno

click node_desktop "https://github.com/libreoffice/core/tree/master/desktop"
click node_framework "https://github.com/libreoffice/core/tree/master/framework"
click node_sfx "https://github.com/libreoffice/core/tree/master/sfx2"
click node_writer "https://github.com/libreoffice/core/tree/master/sw"
click node_calc "https://github.com/libreoffice/core/tree/master/sc"
click node_draw "https://github.com/libreoffice/core/tree/master/sd"
click node_vcl "https://github.com/libreoffice/core/tree/master/vcl"
click node_svx "https://github.com/libreoffice/core/tree/master/svx"
click node_drawinglayer "https://github.com/libreoffice/core/tree/master/drawinglayer"
click node_canvas "https://github.com/libreoffice/core/tree/master/canvas"
click node_uno "https://github.com/libreoffice/core/tree/master/bridges/source/jni_uno"
click node_android_ui "https://github.com/libreoffice/core/blob/master/android/app/src/java/org/libreoffice/LibreOfficeMainActivity.java"
click node_lokit "https://github.com/libreoffice/core/blob/master/android/app/src/java/org/libreoffice/LOKitShell.java"
click node_lokit_thread "https://github.com/libreoffice/core/blob/master/android/app/src/java/org/libreoffice/LOKitThread.java"
click node_tiles "https://github.com/libreoffice/core/blob/master/android/app/src/java/org/libreoffice/LOKitTileProvider.java"
click node_deployment "https://github.com/libreoffice/core/blob/master/desktop/source/deployment/manager/dp_manager.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop,node_framework,node_user,node_android_user toneBlue
class node_writer,node_calc,node_draw toneAmber
class node_sfx,node_vcl,node_svx,node_drawinglayer,node_canvas,node_uno toneMint
class node_android_ui,node_lokit,node_lokit_thread,node_tiles,node_deployment toneRose
```

## Components

### Application entry

- [Desktop startup](https://github.com/libreoffice/core/tree/master/desktop): `desktop`
- [UI framework](https://github.com/libreoffice/core/tree/master/framework): `framework`

### Document applications

- [Writer](https://github.com/libreoffice/core/tree/master/sw): `sw`
- [Calc](https://github.com/libreoffice/core/tree/master/sc): `sc`
- [Draw and Impress](https://github.com/libreoffice/core/tree/master/sd): `sd`

### Shared runtime

- [Document framework](https://github.com/libreoffice/core/tree/master/sfx2): `sfx2`
- [Widget toolkit](https://github.com/libreoffice/core/tree/master/vcl): `vcl`
- [Drawing helpers](https://github.com/libreoffice/core/tree/master/svx): `svx`
- [Drawing renderer](https://github.com/libreoffice/core/tree/master/drawinglayer): `drawinglayer`
- [Canvas backends](https://github.com/libreoffice/core/tree/master/canvas): `canvas`
- [UNO interfaces](https://github.com/libreoffice/core/tree/master/bridges/source/jni_uno): `bridges/source/jni_uno`

### Clients and extensions

- [Android editor UI](https://github.com/libreoffice/core/blob/master/android/app/src/java/org/libreoffice/LibreOfficeMainActivity.java): `android/app/src/java/org/libreoffice/LibreOfficeMainActivity.java`
- [LibreOfficeKit shell](https://github.com/libreoffice/core/blob/master/android/app/src/java/org/libreoffice/LOKitShell.java): `android/app/src/java/org/libreoffice/LOKitShell.java`
- [Office worker](https://github.com/libreoffice/core/blob/master/android/app/src/java/org/libreoffice/LOKitThread.java): `android/app/src/java/org/libreoffice/LOKitThread.java`
- [Tile provider](https://github.com/libreoffice/core/blob/master/android/app/src/java/org/libreoffice/LOKitTileProvider.java): `android/app/src/java/org/libreoffice/LOKitTileProvider.java`
- [Extension manager](https://github.com/libreoffice/core/blob/master/desktop/source/deployment/manager/dp_manager.h): `desktop/source/deployment/manager/dp_manager.h`

### Other components

- **Office user**
- **Android user**

## Connections

- Office user → Desktop startup: starts or opens
- Desktop startup → UI framework: initializes UI
- UI framework → Document framework: dispatches document actions
- Document framework → Writer: loads and manages
- Document framework → Calc: loads and manages
- Document framework → Draw and Impress: loads and manages
- UI framework → Widget toolkit: builds UI with
- Writer → Drawing helpers: uses drawing helpers
- Calc → Drawing helpers: uses drawing helpers
- Draw and Impress → Drawing helpers: uses drawing helpers
- Drawing helpers → Drawing renderer: prepares drawable objects
- Drawing renderer → Canvas backends: renders through
- Android user → Android editor UI: opens and edits
- Android editor UI → LibreOfficeKit shell: sends editor events
- LibreOfficeKit shell → Office worker: dispatches office work
- Office worker → Tile provider: requests document tiles
- Desktop startup → Extension manager: provides extension services
- UI framework → UNO interfaces: uses UNO interfaces
