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

star.text.CellProperties vs star.table.CellProperties

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


Joined: 29 Jun 2010
Posts: 2

PostPosted: Tue Jun 29, 2010 7:21 am    Post subject: star.text.CellProperties vs star.table.CellProperties Reply with quote

I'm somewhat of a beginner so please be patient.

I have trying to set the horizonal alignment of a cell that belongs to an XTextTable.

I have the following code:

XCell xCell = xTable.getCellByName(sCellName);
XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xCell);

However, I run into a couple of problems.
getCellByName is supposed to return a com.sun.star.table.XCell object, and yes, sure enough I have a star.table.XCell object

However, when I run my function that lists all of the services this XCell supports, I find that it only supports star.text.CellProperties, instead of star.table.CellProperties.

I also iterated through the available propertyset for my XCell object, and it confirms it, since the property "BackColor" is available, but the property "CellBackColor" is not available.

So my question is: Where did I do wrong that my XCell is somehow only supporting star.text.CellProperties. Did i query the wrong interface?

And how can i get access to the CellProperties that belong to the star.table.CellProperties object?

Thanks for your help.
Back to top
View user's profile Send private message
pullmyfinger
Newbie
Newbie


Joined: 29 Jun 2010
Posts: 2

PostPosted: Tue Jun 29, 2010 7:34 am    Post subject: Reply with quote

Ok, I seemed to have found a partial answer to my question here:
http://www.oooforum.org/forum/viewtopic.phtml?t=12902

But I am still fairly confused about how querying an star.table.XCell object can give me the a completely different propertyset (star.text.CellProperties) since the documentation

http://api.openoffice.org/docs/common/ref/com/sun/star/table/Cell.html

clearly links to the star.table.CellProperties

Can someone please explain? 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