1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #include "vbasystemaxcontrol.hxx"
21 using namespace com::sun::star
;
22 using namespace ooo::vba
;
25 VbaSystemAXControl::VbaSystemAXControl( const uno::Reference
< ov::XHelperInterface
>& xParent
, const uno::Reference
< uno::XComponentContext
>& xContext
, const uno::Reference
< uno::XInterface
>& xControl
, const uno::Reference
< frame::XModel
>& xModel
, AbstractGeometryAttributes
* pGeomHelper
)
26 : SystemAXControlImpl_BASE( xParent
, xContext
, xControl
, xModel
, pGeomHelper
)
27 , m_xControlInvocation( xControl
, uno::UNO_QUERY_THROW
)
32 uno::Reference
< beans::XIntrospectionAccess
> SAL_CALL
VbaSystemAXControl::getIntrospection()
33 throw ( uno::RuntimeException
, std::exception
)
35 return m_xControlInvocation
->getIntrospection();
39 uno::Any SAL_CALL
VbaSystemAXControl::invoke( const OUString
& aFunctionName
, const uno::Sequence
< uno::Any
>& aParams
, uno::Sequence
< ::sal_Int16
>& aOutParamIndex
, uno::Sequence
< uno::Any
>& aOutParam
)
40 throw ( lang::IllegalArgumentException
, script::CannotConvertException
, reflection::InvocationTargetException
, uno::RuntimeException
, std::exception
)
42 return m_xControlInvocation
->invoke( aFunctionName
, aParams
, aOutParamIndex
, aOutParam
);
46 void SAL_CALL
VbaSystemAXControl::setValue( const OUString
& aPropertyName
, const uno::Any
& aValue
)
47 throw ( beans::UnknownPropertyException
, script::CannotConvertException
, reflection::InvocationTargetException
, uno::RuntimeException
, std::exception
)
49 m_xControlInvocation
->setValue( aPropertyName
, aValue
);
53 uno::Any SAL_CALL
VbaSystemAXControl::getValue( const OUString
& aPropertyName
)
54 throw ( beans::UnknownPropertyException
, uno::RuntimeException
, std::exception
)
56 return m_xControlInvocation
->getValue( aPropertyName
);
60 sal_Bool SAL_CALL
VbaSystemAXControl::hasMethod( const OUString
& aName
)
61 throw ( uno::RuntimeException
, std::exception
)
63 return m_xControlInvocation
->hasMethod( aName
);
67 sal_Bool SAL_CALL
VbaSystemAXControl::hasProperty( const OUString
& aName
)
68 throw ( uno::RuntimeException
, std::exception
)
70 return m_xControlInvocation
->hasProperty( aName
);
75 VbaSystemAXControl::getServiceImplName()
77 return OUString( "VbaSystemAXControl" );
81 uno::Sequence
< OUString
>
82 VbaSystemAXControl::getServiceNames()
84 static uno::Sequence
< OUString
> aServiceNames
;
85 if ( aServiceNames
.getLength() == 0 )
87 aServiceNames
.realloc( 1 );
88 aServiceNames
[ 0 ] = "ooo.vba.msforms.Frame";
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */