Re: [api-dev] How to find containing row of an XTextRange

2009-04-02 Thread Devin Bayer

Peter Eberlein wrote:



Thanks Peter and Fernard:

The TextTable property was just what I was looking for.  I still can't 
find this in the online API reference though.  Does that mean it's 
private or depreciated?



Nor.
Take a look at 
http://wiki/FirstSteps/Using_Services#Using_Properties 


Hi Peter.  That wasn't what I meant.  Why isn't this property 
documented?  It seems it isn't for public use and may break in 
the next release.


- Devin

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How to find containing row of an XTextRange

2009-04-02 Thread Frank Schönheit - Sun Microsystems Germany
Hi Devin,
 The TextTable property was just what I was looking for.  I still can't 
 find this in the online API reference though.  Does that mean it's 
 private or depreciated?
 ...
 Hi Peter.  That wasn't what I meant.  Why isn't this property 
 documented?  It seems it isn't for public use and may break in 
 the next release.

Assuming that you use Basic, you might have stumbled upon a feature of
the Basic language binding for UNO.

If a certain object has an interface, which has a method
getSomething(), then in basic, you can do object.Something, and this
will automatically invoke the method getSomething().

Now there is a XTextTableSupplier interface, which has a method
getTextTable. So maybe your object supports this interface?

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer frank.schoenh...@sun.com -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How to find containing row of an XTextRange

2009-04-02 Thread Ariel Constenla-Haile
Hello Frank,

On Thursday 02 April 2009, 08:19, Frank Schönheit - Sun Microsystems Germany 
wrote:
 Assuming that you use Basic, you might have stumbled upon a feature of
 the Basic language binding for UNO.

 If a certain object has an interface, which has a method
 getSomething(), then in basic, you can do object.Something, and this
 will automatically invoke the method getSomething().

 Now there is a XTextTableSupplier interface, which has a method
 getTextTable. So maybe your object supports this interface?

no, he is talking about all the SwXTextCursor undocumented properties:

http://svn.services.openoffice.org/opengrok/xref/DEV300_m42/sw/inc/cmdid.h
http://svn.services.openoffice.org/opengrok/xref/DEV300_m42/sw/source/core/unocore/unocrsrhelper.cxx#106

looking at Xray, the following are missing (and maybe others):

Cell
DocumentIndex
DocumentIndexMark
Endnote
Footnote
ReferenceMark
TextField
TextFrame
TextSection
TextTable

these are all properties of the SwXTextCursor (well, if 
getPropertyValue(Cell) is not void, then the cursor is a text table cell, 
etc.)

So this is indeed a documentation issue.

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter.
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How to find containing row of an XTextRange

2009-04-02 Thread Ariel Constenla-Haile
 Hello Frank,

 On Thursday 02 April 2009, 08:19, Frank Schönheit - Sun Microsystems
 Germany

 wrote:
  Assuming that you use Basic, you might have stumbled upon a feature of
  the Basic language binding for UNO.
 
  If a certain object has an interface, which has a method
  getSomething(), then in basic, you can do object.Something, and this
  will automatically invoke the method getSomething().
 
  Now there is a XTextTableSupplier interface, which has a method
  getTextTable. So maybe your object supports this interface?

 no, he is talking about all the SwXTextCursor undocumented properties:

 http://svn.services.openoffice.org/opengrok/xref/DEV300_m42/sw/inc/cmdid.h
 http://svn.services.openoffice.org/opengrok/xref/DEV300_m42/sw/source/core/
unocore/unocrsrhelper.cxx#106

 looking at Xray, the following are missing (and maybe others):

 Cell
 DocumentIndex
 DocumentIndexMark
 Endnote
 Footnote
 ReferenceMark
 TextField
 TextFrame
 TextSection
 TextTable

 these are all properties of the SwXTextCursor (well, if
 getPropertyValue(Cell) is not void, then the cursor is a text table cell,

should be then the cursor is inside a text table cell

(seems I'll never learn to read *before* pushing the Send button)


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter.
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.


-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How to find containing row of an XTextRange

2009-04-02 Thread Frank Schönheit - Sun Microsystems Germany
Hi Ariel,

 Now there is a XTextTableSupplier interface, which has a method
 getTextTable. So maybe your object supports this interface?
 
 no, he is talking about all the SwXTextCursor undocumented properties:

Okay, I should have followed the thread more closely before jumping in :)

Thanks  Ciao
Frank

-- 
- Frank Schönheit, Software Engineer frank.schoenh...@sun.com -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How to find containing row of an XTextRange

2009-04-01 Thread Fernand Vanrie

Devin,

You need the ViewCursor and find out if there is a ViewCursor.textTable

if not isempty(viewCusor.texttable)..

the download xray :-)

Hope it helps



Hello.  I'm using pyuno and writer documents.  I want to duplicate 
rows that contain certain words. Currently I'm doing this by looking 
at each cell and searching it for the text, ignoring results past the 
end of the cell's XTextRange.


This would be a lot easier if I could locate the containing row and 
table with just the search result.


I think I can use range.getText() to find the containing cell, and I 
even see cell.CellName, but then I don't know how to find the 
containing table.


Any helpful pointers?




-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How to find containing row of an XTextRange

2009-04-01 Thread Peter Eberlein

Hi Devin,

Devin Bayer schrieb:
Hello.  I'm using pyuno and writer documents.  I want to duplicate rows 
that contain certain words. Currently I'm doing this by looking at each 
cell and searching it for the text, ignoring results past the end of the 
cell's XTextRange.


This would be a lot easier if I could locate the containing row and 
table with just the search result.


I think I can use range.getText() to find the containing cell, and I 
even see cell.CellName, but then I don't know how to find the containing 
table.


With a XSearchDescriptor you can find all XTextRanges which match your 
requirements.
Then iterate over the collection and query for the XPropertySetInfo of 
your range.

The xTextRange has a property by name TextTable. Query for it.
If the XTextTable is null, then your xTextRange is outside a table, 
otherwise inside and you get your XTextTable interface.


Regards

Peter







-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How to find containing row of an XTextRange

2009-04-01 Thread Devin Bayer

Peter Eberlein wrote:


The xTextRange has a property by name TextTable. Query for it.
If the XTextTable is null, then your xTextRange is outside a table, 
otherwise inside and you get your XTextTable interface.


Thanks Peter and Fernard:

The TextTable property was just what I was looking for.  I still 
can't find this in the online API reference though.  Does that 
mean it's private or depreciated?


- Devin

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org