[Solved] List all properties (names, short values) from enum

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
lunter
Posts: 28
Joined: Fri May 29, 2009 9:16 am

[Solved] List all properties (names, short values) from enum

Post by lunter »

Code: Select all

<?php
 $o=new COM('com.sun.star.ServiceManager',null,CP_UTF8);

 $r=$o->Bridge_GetStruct('com.sun.star.beans.PropertyValue');
 $r->Name='n';$r->Value='v';

 foreach($r->getPropertyNames() as $n){print($n);}
// Fatal error: Call to undefined method variant::getPropertyNames() in C:\htdocs\a\1.php on line 7
?>
I would like to write simple script to show list all properties (names, short values) from enums. (In PHP it is very useful to know short values).

First step I create own object $r consists two properties, but I can't get collection of properties...
Any idea?
In second step I would like to read values of these properties.

PS I understand VB script so I can easy translate it to PHP code.
Last edited by lunter on Wed Jun 03, 2009 5:12 pm, edited 1 time in total.
OOo 3.3.X on MS Windows 7
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: list all properties (names, short values) from enums

Post by Villeroy »

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply