LibreOffice - ParabolaWiki

# LibreOffice

From Home - LibreOffice:

  LibreOffice is the free power-packed Open Source personal productivity suite for Windows, Macintosh and Linux, that gives you six feature-rich applications for all your document production and data processing needs: Writer, Calc, Impress, Draw, Math and Base. Support and documentation is free from our large, dedicated community of users, contributors and developers. You, too, can also get involved!

## LibreOffice in Arch Linux

Official support for OpenOffice was dropped in favor of LibreOffice. See Dropping Oracle OpenOffice (arch-general).

LibreOffice is the "Document Foundation fork" in the extra repository, which includes enhancements and features.

## Installation

Make sure that fonts are installed, otherwise you will see only rectangles. The fonts you need are ttf-dejavu and artwiz-fonts.

Download the base for stable and/or beta and/or devel:

    # pacman -S libreoffice

Since version 3.4.2rc1, LibreOffice has been split. The install will give you a menu prompting for which components to install. As the language pack for en-US is no longer included by default, you will need to install at least 1 language pack. The default language is Afrikaans (because it is alphabetically the first provider of libreoffice-langpack), the previous default (en-US) is at number 22:

    [user@home ~]# pacman -S libreoffice
    :: There are 11 members in group libreoffice:
    :: Repository extra
       1) libreoffice-base  2) libreoffice-calc  3) libreoffice-common  4) libreoffice-draw
       5) libreoffice-gnome  6) libreoffice-impress  7) libreoffice-kde4  8) libreoffice-math
       9) libreoffice-sdk  10) libreoffice-sdk-doc  11) libreoffice-writer

    Enter a selection (default=all):
    resolving dependencies...
    :: There are 103 providers available for libreoffice-langpack:
    :: Repository extra
       1) libreoffice-af  2) libreoffice-ar  3) libreoffice-as  4) libreoffice-ast  5) libreoffice-be
       6) libreoffice-bg  7) libreoffice-bn  8) libreoffice-bo  9) libreoffice-br
       10) libreoffice-brx  11) libreoffice-bs  12) libreoffice-ca  13) libreoffice-ca-XV
       14) libreoffice-cs  15) libreoffice-cy  16) libreoffice-da  17) libreoffice-de
       18) libreoffice-dgo  19) libreoffice-dz  20) libreoffice-el  21) libreoffice-en-GB
       22) libreoffice-en-US  23) libreoffice-en-ZA  24) libreoffice-eo  25) libreoffice-es
       26) libreoffice-et  27) libreoffice-eu  28) libreoffice-fa  29) libreoffice-fi
       30) libreoffice-fr  31) libreoffice-ga  32) libreoffice-gl  33) libreoffice-gu
       34) libreoffice-he  35) libreoffice-hi  36) libreoffice-hr  37) libreoffice-hu
       38) libreoffice-id  39) libreoffice-is  40) libreoffice-it  41) libreoffice-ja
       42) libreoffice-ka  43) libreoffice-kk  44) libreoffice-km  45) libreoffice-kn
       46) libreoffice-ko  47) libreoffice-kok  48) libreoffice-ks  49) libreoffice-ku
       50) libreoffice-lo  51) libreoffice-lt  52) libreoffice-lv  53) libreoffice-mai
       54) libreoffice-mk  55) libreoffice-ml  56) libreoffice-mn  57) libreoffice-mni
       58) libreoffice-mr  59) libreoffice-my  60) libreoffice-nb  61) libreoffice-ne
       62) libreoffice-nl  63) libreoffice-nn  64) libreoffice-nso  65) libreoffice-oc
       66) libreoffice-om  67) libreoffice-or  68) libreoffice-pa-IN  69) libreoffice-pl
       70) libreoffice-pt  71) libreoffice-pt-BR  72) libreoffice-ro  73) libreoffice-ru
       74) libreoffice-rw  75) libreoffice-sa-IN  76) libreoffice-sat  77) libreoffice-sd
       78) libreoffice-sh  79) libreoffice-si  80) libreoffice-sk  81) libreoffice-sl
       82) libreoffice-sq  83) libreoffice-sr  84) libreoffice-ss  85) libreoffice-st
       86) libreoffice-sv  87) libreoffice-sw-TZ  88) libreoffice-ta  89) libreoffice-te
       90) libreoffice-tg  91) libreoffice-th  92) libreoffice-tn  93) libreoffice-tr
       94) libreoffice-ts  95) libreoffice-ug  96) libreoffice-uk  97) libreoffice-uz
       98) libreoffice-ve  99) libreoffice-vi  100) libreoffice-xh  101) libreoffice-zh-CN
       102) libreoffice-zh-TW  103) libreoffice-zu

    Enter a number (default=1):

Note: A common mistake is to install libreoffice-uk, which is the Ukrainian language pack, instead of libreoffice-en-GB.

Alternatively, you can install it this way:

    # pacman -S libreoffice-{common,base,calc,draw,impress,math,writer,gnome,kde4,sdk,sdk-doc}

Note: Both ways work and you need libreoffice-kde4 or libreoffice-gnome only if you care about qt or gtk visual integration - see Theme section below.

Check the recommended optional dependencies pacman suggests. E.g. install a Java Runtime Environment (optional, highly recommended). You will need hsqldb-java to use Libreoffice Base.

## Theme

For Qt integration, install the package libreoffice-kde4.

For GTK integration, install the package libreoffice-gnome.

## Extension management

Arch is shipping some additional extensions. We currently ship these extensions: pdfimport presentation-minimizer presenter-screen report-builder wiki-publisher ct2n hunart numbertext oooblogger typo watch-window diagram.

- If you find any of them useful install it

    # pacman -S libreoffice-extension-nlpsolver libreoffice-extension-foo ...

Check the built-in LibreOffice Extension manager or Get extensions Online if you want to install more extensions.

## Language Aids

### Spell checking

For spell checking, you will need hunspell and a language dictionary for hunspell (like hunspell-en for English, hunspell-de for German, etc).

### Hyphenation rules

For hyphenation rules, you will need hyphen and a language hyphen rule set (hyphen-en for English, hyphen-de for German, etc).

### Thesaurus

For the thesaurus option, you will need libmythes and a mythes language thesaurus (like mythes-en for English, mythes-de for German, etc)).

### Grammar checking

Grammar tools can also be found on the LibreOffice Extension Page or OpenOffice's Website. Not all OpenOffice extensions are guaranteed to work with LibreOffice.

Note: Languagetool uses java and may slow down or briefly hang LibreOffice, particularly while opening a documents. Fortunately this is usually only when initially opening a document and is usually not apparent otherwise. Openjdk6 seems to get the better results than openjdk7 with LanguageTool, although this is unconfirmed.

## Installing Macros

In most Linux distros, the default path for macros is:

    ~/.openoffice.org/3/user/Scripts/

The path for this directory for LibreOffice in Arch Linux is:

    ~/.config/.libreoffice/3/user/Scripts/

Another thing to note is that if you intend to use macros, you must have a JRE enabled, use of a JRE is default behaviour; but disabling its use is listed in the speed tweaks below.

## Running LibreOffice

If you want to run a specific module of LibreOffice (instead of the LibreOffice default Startcenter (/usr/bin/soffice is still included for fallback reasons)), use the following script front-ends:

Writer (Word processor)
  /usr/bin/libreoffice --writer or /usr/bin/soffice --writer

Calc (Spreadsheet editor)
  /usr/bin/libreoffice --calc

Impress (Presentation editor)
  /usr/bin/libreoffice --impress

Draw (Vector graphics editor)
  /usr/bin/libreoffice --draw

Math (Formula Editor)
  /usr/bin/libreoffice --math

Base (Database front-end)
  /usr/bin/libreoffice --base

As of LibreOffice version 3.5.x it tries to magically autodetect your desktop UI using the following magic if proper libs will be found:

     gtk3 -> gtk2 -> kde4 -> generic

To force the use of a certain VCL UI interface use one of this:

    SAL_USE_VCLPLUGIN=gen lowriter
    SAL_USE_VCLPLUGIN=kde4 lowriter
    SAL_USE_VCLPLUGIN=gtk lowriter
    SAL_USE_VCLPLUGIN=gtk3 lowriter

The new gtk3 UI is still marked upstream as experimental and will only be available if you enable "experimental features" in LibO main configuration dialog.

## Speed up LibreOffice

Some settings may improve LibreOffice's loading time and responsiveness. However, some also increase RAM usage, so use them carefully. They can all be accessed under Tools > Options.

- Under Memory:
  - Reduce the number of Undo steps to a figure lower than 100, to something like 20 or 30 steps.
  - Under Graphics cache, set Use for LibreOffice to 128 MB (up from the original 20MB).
  - Set Memory per object to 20MB (up from the default 5MB).
  - If you use LibreOffice often, check LibreOffice Quickstarter.
- Under Java, uncheck Use a Java runtime environment.

Note: For a list of functionality which depends on OpenOffice Java support, see this page: http://wiki.services.openoffice.org/wiki/Java - Still needed?

## Troubleshooting

### Font substitution

These settings can be changed in the LibreOffice options. From the drop-down menu, select Tools > Options > LibreOffice > Fonts. Check the box that says Apply Replacement Table. Type Andale Sans UI in the font box and choose your desired font for the Replace with option. When done, click the checkmark. Then choose the Always and Screen only options in the box below. Click OK. You will then need to go to Tools > Options > LibreOffice > View, and uncheck "Use system font for user interface". If you use a non-antialised font, such as Arial, you will also need to uncheck "Screen font antialiasing" before menu fonts render correctly.

### Anti-aliasing

Execute

    $ echo "Xft.lcdfilter: lcddefault" | xrdb -merge

To make the change persistent, add Xft.lcdfilter: lcddefault to your ~/.Xresources file, and make sure to run xrdb -merge ~/.Xresources. [1]. See X resources for more details.

If this does not work, you can also try adding Xft.lcdfilter: lcddefault to your ~/.Xdefaults. If you do not have this file, you will have to create it.

### Spell checking problems

As of openoffice 3.0.0-2, various dictionaries may be buggy due to a character encoding problem. To solve this issue, follow the following instructions.

Find where the particular openoffice distribution places its dictionary files; e.g., pacman -Ql openoffice-base. Most distibutions follow the convention of installing these to /usr/lib/openoffice/share/extension/install. Once the directory has been found, assign it to a shell variable:

    droot="/usr/lib/openoffice/share/extension/install"

Install unzip and zip packages in order to be able to extract the dictionary files:

    pkg=$(pacman -T unzip zip) || pacman -S $pkg

For reference, get a list of languages whose dictionary files are packaged with the base distribution:

    cd "$droot" && ls | sed -rn 's,^dict-(..)\.oxt$,\1,p'

Define a list of languages whose dictionary files are to be fixed:

    lang="en es"

Extract the target languages' dictionary files and convert the erroneous encoding to UTF-8:

    tmp="/tmp/dictfix-$USER-$$"

    mkdir "$tmp"
    cd "$tmp"

    for i in $lang; do
    	i="$droot/dict-$i.oxt"
    	unzip "$i" -d oxt.tmp
    	iconv -f ISO-8859-15 -t UTF-8 oxt.tmp/dictionaries.xcu > dict.tmp
    	mv dict.tmp oxt.tmp/dictionaries.xcu
    	(cd oxt.tmp && zip -r "$i" .)
    done

    rm -rf "$tmp"

Finally, use the openoffice extension manager (available through the Tools menu) to install the dictionary from the resulting dict-xx.oxt file(s).

### Dark GTK themes, Icons and gtk-qt-engine

As of LibreOffice 3.4.4 , the problem with dark themes has been resolved.

For a quick fix, see openoffice-dark-gtk-fix or if you have go-openoffice see go-openoffice-dark-gtk-fix on the AUR. This also sets 'OOO_FORCE_DESKTOP=gnome'. Another fix is to export SAL_USE_VCLPLUGIN=gen (generic X11). See for more info

In newer version of OO (3.2.0) and Libre, the fixes mentioned above do not seem to work. If you use a dark GTK theme, you will be unable to change the icons from “high-contrast”. The colors can be configured manually in Options -> Appearance, but Impress and Calc (maybe others too) will stay dark unless you disable automatic detection of high contrast themes first. The problem is with the default setting of “Automatically detect high contrast mode of operating system”. To change the default setting and allow the selection of icons and custom colors with a dark GTK theme, edit the following option:

Tools > Options... > Accesibility > Uncheck: [ ] Automatically detect high contrast mode of operating system

Now the colors can be configured in Options -> Appearance.

### LibreOffice looks ugly

If you do not have the same look and feel as you were used to in OpenOffice, it is likely that you did not install the required packages to make it look nice. See the Theme section.

### Hanging when using NFS shares

If OpenOffice hangs when trying to open or save a document located on a NFS share, try prepending the following lines with a # in /usr/lib/openoffice/program/soffice (or /usr/bin/soffice if using go-openoffice):

    # file locking now enabled by default
    SAL_ENABLE_FILE_LOCKING=1
    export SAL_ENABLE_FILE_LOCKING

Original post here

Note: Only NFSv3 is affected. NFSv4 works well with OpenOffice.

### Fixing Java Framework Error

You may get the following error when you try to run OpenOffice.

    [Java framework] Error in function createSettingsDocument (elements.cxx).
    javaldx failed!

If so, give yourself ownership of ~/.config/ like so:

    sudo chown -vR username:users ~/.config

Post on Arch Linux Forums

### Fixing Java Not Found Errors

After a fresh install and when using the jre/jdk package, you may receive a notice "Could not find a Java Runtime Environment!" or the following from the shell:

    javaldx: Could not find a Java Runtime Environment!
    Warning: failed to read path from javaldx

The issues seems to be a lack of support for Java 7. This can be fixed by removing the JRE and/or JDK and will likely require you to remove libreoffice. Once uninstalled, you can install support for the jre6 and jdk6 packages.

Note: libreoffice >= 3.4.3-1 should work with jre7-openjdk.

### LibreOffice does not detect my certificates

If you cannot see the certificates when trying to sign a document, you will need to have the certificates configured in Mozilla Firefox (or Thunderbird). If after that LibreOffice still does not show them, set the MOZILLA_CERTIFICATE_FOLDER environment variable to point to your Mozilla Firefox (or Thunderbird) folder.

    export MOZILLA_CERTIFICATE_FOLDER=$HOME/.mozilla/firefox/XXXXXX.default/

Certificate Detection

### Error while loading shared libraries: libdb-5.2.so

If running LibreOffice returns the following error:

    /usr/lib/libreoffice/program/soffice.bin: error while loading shared libraries: libdb-5.2.so: cannot open shared object file: No such file or directory

You can fix this by installing db from the official repositories.

### Run .pps files in edit mode (without slideshow)

The only solution is to rename .pps file in .ppt

Add the following script to your home directory and use it to open every .pps file. Very useful to open .pps files received by email without the need to save them.

    #!/bin/bash

    f=`mktemp`

    cp "$1" "${f}.ppt" && libreoffice "${f}.ppt" && rm -f "${f}.ppt"

### Extremely slow LibreOffice Base

Due to a current bug in the LibreOffice/hsqldb/Java chain, "java.net.PlainSocketimpl.socketAccept [takes] double to 10 times longer [than usual]" and Base is pretty much unusable (see reports here and here). This bug applies (as of Feb 2012) to libreoffice 3.4.5-2 and jdk7-openjdk 7.b147_2.0-6 and a number of earlier versions. The solution (offered, e.g., here) is to install an earlier JRE (e.g., from Sun/Oracle: jre1.6.0_21 works, download = jre-6u21-linux-x64.bin) and set LibreOffice to use this JRE in the Options.

Another solution (found here) is to create the file /usr/lib/jvm/java-6-openjdk/jre. This way the installation of another version of Java is avoided!

Categories:

- Office
- Request:Correction