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


Hallo Regina,

ich habe eben das "LO Makro Basic" ( s.u. "Sub TestUnoCommand" ) mit einer LO-Parallelinstallation ( 5.4.0.0.beta1 (x64) ) getestet und der in Deinem "Bug Report" ( https://bugs.documentfoundation.org/show_bug.cgi?id=107806 ) kommunizierte Fehler ist (wohl) behoben:

Die Zelle "C3" hat genau die Abmessungen 10x10 cm gemäß Anzeige von [Format] > [Zeilen] > [Höhe...] bzw. [Format] > [Spalten] > [Breite...].

Zu beachten ist dabei allerdings, dass sich die Anwendung von ".uno:RowHeight" ( und ".uno:ColumnWidth" ) zu vorher - LO 5.2.7.2 (x64) - geändert hat:

(1) LO 5.2.7.2 (x64)

+ Vor Aufruf von ".uno:RowHeight" Festlegung der zu modifizierenden Zelle bzw. des Zellbereichs ( oS.getCellByPosition(...) bzw. oS.GetCellRangeByPosition(...) ).
+ Nur 1 Parameter für ".uno:RowHeight" notwendig.
+ Höhenangabe in 1/100-stel mm: 10 [cm] = 100 x 100 [1/100-stel mm]

oC.Select(oS.getCellByPosition(Column,Row))

RowHeight = 100
VP(0).Name = "RowHeight"
VP(0).Value = RowHeight * 100
oD.executeDispatch(oF,".uno:RowHeight","",0,VP())

(2) 5.4.0.0.beta1 (x64)

+ Jetzt 2 Parameter notwendig zur Festlegung der Row und der Row-Height.
+ Höhenangabe jetzt in twips (TWentieth of an Inch Point / 1 [mm] = 56,6928 [twips]): 10 [cm] = 10 x 10 x 56,6928 [twips] ≈ 10 x 567 [twips]

Row = 3
Height = 10
VP(0).Name = "Row"
VP(0).Value = Row
VP(1).Name = "Height"
VP(1).Value = Height * 567
oD.executeDispatch(oF,".uno:RowHeight","",0,VP())

Im Moment ist mir noch nicht klar, wie ich bezüglich (2) einen Bereich von Rows angeben könnte. Muss man das jetzt über eine Schleife machen oder gibt es eine elegantere Methode, so wie unter (1), wenn man einen Bereich von Rows ändern möchte ? Vielleicht hast Du ja eine Idee dazu ...

Gruß
Hans-Werner


Option Explicit

Sub TestUnoCommand

Dim oC as Object : oC = ThisComponent.CurrentController
Dim oF as Object : oF = oC.Frame
Dim oD as Object : oD = createUnoService("com.sun.star.frame.DispatchHelper")

Dim Column as Integer
Dim Row as Integer
Dim Height as Integer
Dim Width as Integer

Dim VP(1) as New com.sun.star.beans.PropertyValue

Row = 3
Height = 10

VP(0).Name = "Row"
VP(0).Value = Row
VP(1).Name = "Height"
VP(1).Value = Height * 567

oD.executeDispatch(oF,".uno:RowHeight","",0,VP())

Column = 3
Width = 10

VP(0).Name = "Column"
VP(0).Value = Row
VP(1).Name = "Width"
VP(1).Value = Width * 567

oD.executeDispatch(oF,".uno:ColumnWidth","",0,VP())

End Sub
--
Liste abmelden mit E-Mail an: users+unsubscribe@de.libreoffice.org
Probleme? http://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps 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.