In the settings dialog it's not possible to add a template path. When adding a subdirectory to the user's home directory a new directory is added, but not the selected subdirectory but only the user's home directory.
Steps to reproduce:
1. Start e.g. LibreOffice Writer
2. Open "Extras -> Options..."
3. Go to "LibreOffice -> Paths"
4. Double-click "Templates"
5. Click the button "Add..."
6. In the newly opened window select a subdirectory of the current user's home directory (e.g. /home/myuser/documents/templates)
A new directory /home/myuser is added.
The selected directory /home/myuser/documents/templates gets added.
Arch Linux x86_64
LibreOffice Version 22.214.171.124 (Build ID: 360m1(Build:2)) on Ubuntu 12.10, 64 bit.
This same problem applies to the "My Documents" path setting also.
The "Add" button allows you to browse to a target folder such as "/home/username/Documents" but it only stores the "/home/username" part of the path.
The bug is not only for choosing a template path, it is for entering any path in Tools/Options/Libreoffice/Paths (for example: path for safe source of macros).
The exact behavior is not cutting down the end of the path: actually, it always takes the home directory ($HOME), whichever path has been selected by the user (e.g. even if selecting /tmp).
This is not related to the currect directory at launch time: if the software is launched from a different directory, it still takes $HOME.
I have Version 126.96.36.199 (Build ID: 360m1(Build:2))
on Xubuntu 12.10
$ uname -a
Linux myname 3.5.0-18-generic #29-Ubuntu SMP Fri Oct 19 10:27:31 UTC 2012 i686 i686 i686 GNU/Linux
Are you actually going into the directory? It adds the directory that you are currently WITHIN, not the one that is selected.
I'm marking this as NEEDINFO just because I believe that's what you are doing and this is behaving as expected but if you confirm, we may be able to add an enhancement request to make it behave differently.
So if you do
/home/joel/Downloads and then just highlight TEMPLATES, it'll actually add /home/joel/Downloads
Now if you do this:
/home/joel/Downloads/TEMPLATES (actually go into the TEMPLATES folder) and click ok, it'll add the appropriate folder.
I agree that this is slightly strange behavior as clicking on a folder and highlighting it may lead a user (obviously does, made me do it the first time also), to think that the highlighted folder will get added, but it does not, the current working directory gets added.
Please confirm my suspicion. If I'm correct, mark this as NEW and mark it as an enhancement request with low priority.
(In reply to comment #3)
> Are you actually going into the directory? It adds the directory that you
> are currently WITHIN, not the one that is selected.
I tried both. First I went into the directory. Since this brought the described behaviour I tried to just select the directory and click OK with the same effect.
But the enhancement additionally to the bug fix would be good idea, too.
Well if you're seeing the behavior even when you enter into the directory I'd say this is a bug....but I cannot reproduce, moving back to UNCONFIRMED, going to see if someone else from the QA team will try to reproduce it
I just found out that this bug only occurs if I don't use the LibreOffice dialogs for opening and saving files. If I use the LibreOffice dialogs I can add the selected directory, well, the directory which I'm currently in without any problems.
So for me the bug appears under Xfce 4.10 with GTK+ 2.24.13 if I use the GTK dialogs instead of the LibreOffice dialogs.
Related to "Bug 56984 - change path"?
This bug is a duplicate of bug 56984; the bug itself was confirmed by ubuntu: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1085310
I see the same behaviour on opensuse 12.2 with gnome 3.6; Removing the package libreoffice-gnome immediately solves the problem, re-installing brings it back.
The bug has been reported to https://bugzilla.novell.com/show_bug.cgi?id=797855 too.
I can confirm the behaviour reported on x86_64 and x86 versions of
Mageia and Mandriva, with different LibreOffice versions up to 4.0 pre-releases,
under different desktops (xfce and lxde):
a) With the option
LibreOffice => General -> Open/Save dialogs -> [X] Use LibreOffice dialogs
activated, new paths are added as expected.
b) With that option de-activated, all attempts to add new template, gallery etc.
paths end in the HOME directory being added. Replacing the new $(home) entry
in the corresponding .xcu file manually does not seem to have any effect.
c) Uninstalling a libreoffice-gnome package, where it exists, removes the
option mentioned above entirely and results in a working configuration.
On Mageia (Cauldron), there is no libreoffice-gnome package though;
the relevant files are part of libreoffice-core and cannot be de-installed.
d) Apache OpenOffice 3.4.1 has the same behaviour; so this bug probably goes
back to common ancestors and is not at all new.
Upgrading my openSUSE to Gnome 3.8 solved that problem for me.
Testing this on LibreOffice 4.1.3 (ppa) on Ubuntu 13.10, I cannot reproduce this => WORKSFORME.