diff options
Diffstat (limited to 'forms/qa/integration/forms/FormLayer.java')
-rw-r--r-- | forms/qa/integration/forms/FormLayer.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/forms/qa/integration/forms/FormLayer.java b/forms/qa/integration/forms/FormLayer.java index d67e28bcf412..032ca5e7331a 100644 --- a/forms/qa/integration/forms/FormLayer.java +++ b/forms/qa/integration/forms/FormLayer.java @@ -310,7 +310,27 @@ public class FormLayer } /* ------------------------------------------------------------------ */ - /** retrieves a control model with a given access path + /** retrieves a control model with a given (integer) access path + */ + public XPropertySet getControlModel( int[] _accessPath ) throws com.sun.star.uno.Exception + { + XIndexAccess indexAcc = (XIndexAccess)UnoRuntime.queryInterface( XIndexAccess.class, + m_document.getFormComponentTreeRoot() ); + XPropertySet controlModel = null; + int i=0; + while ( ( indexAcc != null ) && ( i < _accessPath.length ) ) + { + controlModel = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, + indexAcc.getByIndex( _accessPath[i] ) ); + indexAcc = (XIndexAccess)UnoRuntime.queryInterface( XIndexAccess.class, + controlModel ); + ++i; + } + return controlModel; + } + + /* ------------------------------------------------------------------ */ + /** retrieves a control model with a given (string) access path */ public XPropertySet getControlModel( String[] _accessPath ) throws com.sun.star.uno.Exception { |