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 with PropertyValue

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
satabau
General User
General User


Joined: 12 Mar 2012
Posts: 34

PostPosted: Tue May 15, 2012 2:32 pm    Post subject: Problem with PropertyValue Reply with quote

Hi all, when I open an ods file this way
Code:
xSpreadsheetComponent = xComponentLoader.loadComponentFromURL("" +
                    "file:///"+s, "_blank", 0, null);

everything is ok but I want to open the file without make it visible.
I found this:
Code:
PropertyValue[] loadProps = new PropertyValue[1];
loadProps[0] = new PropertyValue();
            loadProps[0].Name  = "Hidden";
            loadProps[0].Value = new Boolean(true);
             xSpreadsheetComponent = xComponentLoader.loadComponentFromURL("" +
                    "file:///"+s, "_blank", 0, loadProps);

but in this way, when the program ends and I manually open the file, ome properties of the cells are changed. In particular the weight of the columns and the height of the rows.
Here is the difference:

[img]http://desmond.imageshack.us/Himg826/scaled.php?server=826&filename=littleh.png&res=landing[/img]
For the second just copy the url, I can't upload it here
Can you help me?
Thank you
Back to top
View user's profile Send private message
patel
Power User
Power User


Joined: 14 Apr 2012
Posts: 54
Location: Italy

PostPosted: Tue May 15, 2012 11:43 pm    Post subject: Reply with quote

did you close it ?
with

xSpreadsheetComponent.close(true)
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
satabau
General User
General User


Joined: 12 Mar 2012
Posts: 34

PostPosted: Wed May 16, 2012 2:47 am    Post subject: Reply with quote

Thanks for the answer. Yes I've closed it, but the problem is immediately after this
Code:
xSpreadsheetComponent = xComponentLoader.loadComponentFromURL("" +
                    "file:///"+s, "_blank", 0, loadProps);

when the user sees the file on "desktop".
Is there a different way/method in Java to load a component?
I found this: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501780
IS A BUG! I need to open the file mantaining the original properties
Thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API 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