Hallo Peter,

ich bin mehr oder weniger am Ziel angekommen.

<schnipp> Oder man ermittelt den
Tabellenamen wie folgt über die Position des Cursors:
oViewCursor = ThisComponent.CurrentController.getViewCursor
if (not isEmpty(oViewCursor.getPropertyValue("TextTable"))) then
sTableName = oViewCursor.getPropertyValue("TextTable").Name

Damit habe ich Zugriff auf die Tabelle - wahrscheinlich auch schon zuvor. Aber jetzt tut sich was. Ich habe dies mit LO 3.3 und LO 3.4 getestet.

So - jetzt noch zwei Anmerkungen:
1) Spaltenbreite:
Ich hatte noch ein Verständnisproblem bzgl. der Spaltenbreite. Beim Googlen habe ich aber eine Erklärung gefunden: The column separator specifies where the column ends as percentage of the table width. A column end position of 5000 specifies 50% of the table width. The macro in Listing 8.11 sets the first column to end at 50% of the current table width and the second column at 70% of the total table width.
IMHO ist dies nicht optimal, da ich eine Maßeinheit bevorzugen würde.

2) Gimmick:
Hast Du evtl. noch einen Tipp, wie ich zu Beginn des Makros prüfen lassen kann, ob die Tabelle fünf Spalten enthält. Kleiner "Perfektionswahn" von mir. Die betreffenden Tabellen enthalten fünf Spalten. Aber die Überprüfung wäre professioneller.

Gruß

Jochen

--
Informationen zum Abmelden: E-Mail an users+h...@de.libreoffice.org
Tips zu Listenmails: http://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: http://listarchives.libreoffice.org/de/users/
Alle E-Mails an diese Liste werden unlöschbar öffentlich archiviert

Antwort per Email an