Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


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("") 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$ = ""
        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!"
                End If
                Msgbox "We've got a selection in a table!" & CHR$(10) & "The selected
range is: " & oSels.getRangeName() & CHR$(10) & tempStr

        'xray oSels
        End If

Thanks. Selected.odt

Ubuntu 14.04 64bit : LibreOffice:,

View this message in context:
Sent from the Users mailing list archive at

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: 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.