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


Am 14.09.2011 11:34, schrieb Jochen:
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.

if oTable.Columns.Count <> 5 then
  msgBox "Tabelle enthält " & oTable.Columns.Count & " Spalten!", 16
  exit Sub
end If

Gruß Peter

--
Informationen zum Abmelden: E-Mail an users+help@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

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.