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


Mein Problem: Ich will im Writer mit einem Makro mit Hilfe der API auf jede einzelne von mit der Maus selektierten Zellen einer (komplexen) Texttabelle zugreifen.

Für die gesamte Tabelle gibt es die Methode getCellNames(), die fehlerlos die Namen aller Zellen ausgibt, so dass ich jede Zelle mit oTable.getCellByName(sName) instanziieren kann. So etwas fehlt sowohl für den Service CellRange als auch für TextTableCursor.

Wie kann ich mein Ziel erreichen?

Sub GetEachCellInSelection(Optional oDoc, Optional oCellSel)
  Dim oTable, oCellRange, aCellNames() As String
  Dim sRangeName&

  If IsMissing(oDoc) Then oDoc = ThisComponent
  If IsMissing(oCellSel) Then oCellSel = oDoc.CurrentSelection

  If oCellSel.supportsService("com.sun.star.text.TextTableCursor") Then
    oTable = oDoc.CurrentController.ViewCursor.TextTable
    sRangeName = oCellSel.RangeName 'Hilft mir nicht weiter
    oCellRange = oTable.getCellRangeByName(sRangeName) 'Das auch nicht
    '????
  End If
End Sub

Bin ich einfach nur blind?

Volker

--
Liste abmelden mit E-Mail an: users+unsubscribe@de.libreoffice.org
Probleme? https://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps zu Listenmails: https://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: https://listarchives.libreoffice.org/de/users/
Datenschutzerklärung: https://www.documentfoundation.org/privacy

Context


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.