OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

problem in the Open dialogbox

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting
View previous topic :: View next topic  
Author Message
JeromeC
General User
General User


Joined: 13 Oct 2005
Posts: 37
Location: France - Nantes

PostPosted: Fri Nov 04, 2005 8:08 am    Post subject: problem in the Open dialogbox Reply with quote

Hi,

in Writer, i have a macro which sets the path of working documents :
Code:
oPaths = CreateUnoService( "com.sun.star.util.PathSettings" )
oPaths.Work=ConvertToUrl("C:\documents and settings\user\doc\")

I try to open the SaveAs Dialog box and it displays the path I set. But, in the Open dialogBox, the path is not correct: it keeps the path of the last opened document.

I read the api documentation for the pathsettings service (http://api.openoffice.org/docs/common/ref/com/sun/star/util/PathSettings.html) and with the Work property, the description is :"The path specified here can be seen in the Open or Save dialog." With the Open Dialogbox in Writer, it seems to be wrong...

I try to close and reopen Openoffice but it's the same thing.
In the Tool - Options menu, Load/save options, the check box "Load user config with the document" is really checked. (maybe the title of this checkbox is not correct, I don't have the english version, but it's this one).

Does anyone have this problem ?

Thanks.
Back to top
View user's profile Send private message
JeromeC
General User
General User


Joined: 13 Oct 2005
Posts: 37
Location: France - Nantes

PostPosted: Fri Nov 04, 2005 8:22 am    Post subject: Reply with quote

What is very trange is when, in my macro, I use the code :
oDoc=StarDesktop.LoadComponentFromUrl("ConvertToUrl("C:\documents and settings\user\doc\plan.odt"),"_blank",0,Array())

plan.odt is opened in the path I want but when I display the Open DialogBox, the path is still the path of the last opened document with the Open Dialog Box

So, with my problem, the only way to set the path of the Open dialogBox is to open a file manually, it doesn't work with a macro.

If someone has another solution in a macro, it would be great !! Very Happy

Thanks !
Back to top
View user's profile Send private message
ms777
Super User
Super User


Joined: 07 Feb 2004
Posts: 1355

PostPosted: Fri Nov 04, 2005 10:18 am    Post subject: Reply with quote

Quote:
in Writer, i have a macro which sets the path of working documents :
Code:
oPaths = CreateUnoService( "com.sun.star.util.PathSettings" )
oPaths.Work=ConvertToUrl("C:\documents and settings\user\doc\")

I try to open the SaveAs Dialog box and it displays the path I set. But, in the Open dialogBox, the path is not correct: it keeps the path of the last opened document.


nice try ... but the only thing you do here is creating a local object named oPaths. Unfortunately, it is not that simple. If you want to change the OO configuration follow http://www.oooforum.org/forum/viewtopic.phtml?p=71961#71961.
Back to top
View user's profile Send private message
simonz
General User
General User


Joined: 18 Feb 2006
Posts: 6

PostPosted: Tue Mar 14, 2006 7:54 am    Post subject: Reply with quote

I run into the similar problem.

During my tests I found out the following:

After setting PathSettings.Work the file open dialog still starts at it's own "last_used value",
but clicking the house button ("Default directory") in the top right corner of the dialog changes to the desired directory!

So the "PathSettings.Work" value is not the current working directory as I understood it from the documentation.
Instead it is the main Work-Directory of OOo (the same as in Tools - Options - Paths - My Documents)!

That doesn't help solving your problem, but I hope I was able to give some info.

Perhaps you may want to have a look at my other posting regarding this:
http://www.oooforum.org/forum/viewtopic.phtml?p=133536#133536
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group