Author: cmarcum
Date: Thu Mar 3 00:01:59 2016
New Revision: 1733391
URL: http://svn.apache.org/viewvc?rev=1733391&view=rev
Log:
#i126770#
added getAt for XIndexAccess
Modified:
openoffice/devtools/guno-extension/trunk/src/main/groovy/org/openoffice/guno/UnoExtension.groovy
Modified:
openoffice/devtools/guno-extension/trunk/src/main/groovy/org/openoffice/guno/UnoExtension.groovy
URL:
http://svn.apache.org/viewvc/openoffice/devtools/guno-extension/trunk/src/main/groovy/org/openoffice/guno/UnoExtension.groovy?rev=1733391&r1=1733390&r2=1733391&view=diff
==============================================================================
---
openoffice/devtools/guno-extension/trunk/src/main/groovy/org/openoffice/guno/UnoExtension.groovy
(original)
+++
openoffice/devtools/guno-extension/trunk/src/main/groovy/org/openoffice/guno/UnoExtension.groovy
Thu Mar 3 00:01:59 2016
@@ -28,6 +28,7 @@ package org.openoffice.guno
*/
import com.sun.star.beans.XPropertySet
+import com.sun.star.container.XIndexAccess
import com.sun.star.frame.XComponentLoader
import com.sun.star.lang.XMultiComponentFactory
import com.sun.star.uno.UnoRuntime
@@ -79,6 +80,13 @@ class UnoExtension {
self.setPropertyValue(name, value)
}
-
+ /**
+ * Provides access to the elements of a collection through an index.
+ * @param index specifies the position in the array. The first index is 0.
+ * @return Object the element at the specified index.
+ */
+ static Object getAt(final XIndexAccess self, int index) {
+ self.getByIndex(index)
+ }
}