Bug 55323 - UI: Path to templates can't be added using OS file dialogs
Summary: UI: Path to templates can't be added using OS file dialogs
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-25 15:31 UTC by Heiko Baums
Modified: 2013-10-30 00:46 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Baums 2012-09-25 15:31:36 UTC
Problem description:
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)

Current behavior:
A new directory /home/myuser is added.

Expected behavior:
The selected directory /home/myuser/documents/templates gets added.

Platform:
Arch Linux x86_64
Comment 1 Tony Whelan 2012-10-28 20:49:47 UTC
LibreOffice Version 3.6.2.2 (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.
Comment 2 Miguel 2012-11-02 18:13:50 UTC
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 3.6.2.2 (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
Comment 3 Joel Madero 2012-11-03 17:17:25 UTC
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. 

Thanks!
Comment 4 Heiko Baums 2012-11-03 19:54:24 UTC
(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.
Comment 5 Joel Madero 2012-11-03 19:56:14 UTC
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
Comment 6 Heiko Baums 2012-11-04 10:47:48 UTC
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.
Comment 7 Rainer Bielefeld Retired 2012-11-12 18:43:53 UTC
Related to "Bug 56984 - change path"?
Comment 8 Johannes Weberhofer 2013-01-10 16:01:26 UTC
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.
Comment 9 Konrad Bernlöhr 2013-01-25 16:08:50 UTC
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.
Comment 10 Johannes Weberhofer 2013-05-14 07:26:46 UTC
Upgrading my openSUSE to Gnome 3.8 solved that problem for me.
Comment 11 Björn Michaelsen 2013-10-30 00:46:37 UTC
Testing this on LibreOffice 4.1.3 (ppa) on Ubuntu 13.10, I cannot reproduce this => WORKSFORME.