Bug 49379 - Setting the Temp path (Tools > Options) impossible with an extension
Summary: Setting the Temp path (Tools > Options) impossible with an extension
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
Whiteboard: target:3.6.0
Depends on:
Reported: 2012-05-02 06:22 UTC by Cor Nouws
Modified: 2012-05-07 07:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Sample extension to change temp path (453 bytes, text/plain)
2012-05-03 00:23 UTC, Stephan Bergmann

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2012-05-02 06:22:30 UTC
( Follow up from Bug 49378 )

An extension to set the various paths, does not modify the "Temp" path.
That however is possible via the UI.
I do not see this working in any version of LibreOffice (and doubt if it does in OOo, where the attached extension in the other bug fails all together).

Contents of the Path.xcu:

 <node oor:name="Variables">
  <prop oor:name="Work">
 <node oor:name="Paths">
  <node oor:name="Temp">
   <prop oor:name="WritePath">
  <node oor:name="Template" oor:op="fuse">
   <prop oor:name="WritePath">

It does not make a difference when the following prop is added to the node Variables and removed from the node Paths :

  <prop oor:name="Temp">
Comment 1 Not Assigned 2012-05-02 23:59:00 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":


Related fdo#49379: Some old Paths need to be nillable after all
Comment 2 Stephan Bergmann 2012-05-03 00:23:15 UTC
Created attachment 60946 [details]
Sample extension to change temp path

Turns out these paths are stored in two different formats in the configuration, an old format (/org.openoffice.Office.Common/Path) and a new format (/org.openoffice.Office.Paths/Paths), and you explicitly need to deactivate the old format if you store something in the new format (cf. PathSettings::impl_storePath in framework/source/services/pathsettings.cxx).

The attached temp.xcu is an example extension to change the temp path (works on current master).
Comment 3 Cor Nouws 2012-05-07 07:07:30 UTC
(In reply to comment #2)

> The attached temp.xcu is an example extension to change the temp path (works on
> current master).

thanks. Works on 3.5 too.
And for the record, setting the Work path in 3.5 and master needs a similar approach:

 <item oor:path="/org.openoffice.Office.Common/Path/Current">
  <prop oor:name="Work" oor:op="fuse">
   <value xsi:nil="true"/>
 <item oor:path="/org.openoffice.Office.Common/Path/Info">
  <prop oor:name="WorkPathChanged" oor:op="fuse">
 <item oor:path="/org.openoffice.Office.Paths/Paths/org.openoffice.Office.Paths:NamedPath['Work']">
  <prop oor:name="WritePath" oor:op="fuse">