I'm trying to return a cell range for some cells selected in a Writer text
table. From what I've read in Andrew Pitonyak's documentation, the method
getRangeName() from a TextTableCursor seems to be the way to do it.
However oSels.supportsService("com.sun.star.text.TextTableCursor") returns
FALSE if the cells selected contain numbering or bullets. If I switch the
numbering off the same selected cells return TRUE & I can use
Is this behaviour inconsistent (i.e a bug) or am I missing something?
I've repeated this in LO4.1, 4.4.5, 5.0, 5.0.1RC1 Linux x86_64
example document containing macro and steps to reproduce:
here is the pertinent code from the document above:
Dim i As Integer : Dim sTextTableCursor$
sTextTableCursor$ = "com.sun.star.text.TextTableCursor"
oSels = ThisComponent.getCurrentController().getSelection()
If Not oSels.supportsService(sTextTableCursor) Then
Msgbox "Please make a selection of cells!", MB_OK + MB_ICONSTOP
ElseIf oSels.supportsService(sTextTableCursor) Then
REM At least one entire cell is selected
If validSelection(oSels.getRangeName()) Then
tempStr = "Good, the selection is more than 1 cell!"
tempStr = "The selection needs to be more than 1 cell!"
Msgbox "We've got a selection in a table!" & CHR$(10) & "The selected
range is: " & oSels.getRangeName() & CHR$(10) & tempStr
Ubuntu 14.04 64bit : LibreOffice: 220.127.116.11, 18.104.22.168
View this message in context:
Sent from the Users mailing list archive at Nabble.com.
To unsubscribe e-mail to: firstname.lastname@example.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
- [libreoffice-users] BASIC, Writer Table Cell Selection: Numbering/Bullets interfere with TextTableCursor · ponsiarceds
Impressum (Legal Info)
: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (MPLv2
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our trademark policy