1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_scripting.hxx"
30*cdf0e10cSrcweir #include "basmethnode.hxx"
31*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
32*cdf0e10cSrcweir #include <com/sun/star/frame/XDesktop.hpp>
33*cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchHelper.hpp>
34*cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchProvider.hpp>
35*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiComponentFactory.hpp>
36*cdf0e10cSrcweir #include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
37*cdf0e10cSrcweir #include <vos/mutex.hxx>
38*cdf0e10cSrcweir #include <vcl/svapp.hxx>
39*cdf0e10cSrcweir #include <basic/sbstar.hxx>
40*cdf0e10cSrcweir #include <basic/sbmeth.hxx>
41*cdf0e10cSrcweir #include <basic/sbmod.hxx>
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir #include <util/MiscUtils.hxx>
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir using namespace ::com::sun::star;
46*cdf0e10cSrcweir using namespace ::com::sun::star::lang;
47*cdf0e10cSrcweir using namespace ::com::sun::star::uno;
48*cdf0e10cSrcweir using namespace ::com::sun::star::beans;
49*cdf0e10cSrcweir using namespace ::comphelper;
50*cdf0e10cSrcweir using namespace ::com::sun::star::script;
51*cdf0e10cSrcweir using namespace ::sf_misc;
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir #define BASPROV_PROPERTY_ID_URI         1
54*cdf0e10cSrcweir #define BASPROV_PROPERTY_ID_EDITABLE    2
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir #define BASPROV_PROPERTY_URI            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URI" ) )
57*cdf0e10cSrcweir #define BASPROV_PROPERTY_EDITABLE       ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Editable" ) )
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir #define BASPROV_DEFAULT_ATTRIBS()       PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir 
62*cdf0e10cSrcweir //.........................................................................
63*cdf0e10cSrcweir namespace basprov
64*cdf0e10cSrcweir {
65*cdf0e10cSrcweir //.........................................................................
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir     // =============================================================================
68*cdf0e10cSrcweir     // BasicMethodNodeImpl
69*cdf0e10cSrcweir     // =============================================================================
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir     BasicMethodNodeImpl::BasicMethodNodeImpl( const Reference< XComponentContext >& rxContext,
72*cdf0e10cSrcweir         const ::rtl::OUString& sScriptingContext, SbMethod* pMethod, bool isAppScript )
73*cdf0e10cSrcweir         : ::scripting_helper::OBroadcastHelperHolder( m_aMutex )
74*cdf0e10cSrcweir         ,OPropertyContainer( GetBroadcastHelper() )
75*cdf0e10cSrcweir         ,m_xContext( rxContext )
76*cdf0e10cSrcweir         ,m_sScriptingContext( sScriptingContext )
77*cdf0e10cSrcweir         ,m_pMethod( pMethod )
78*cdf0e10cSrcweir         ,m_bIsAppScript( isAppScript )
79*cdf0e10cSrcweir         ,m_bEditable( sal_True )
80*cdf0e10cSrcweir     {
81*cdf0e10cSrcweir         if ( m_pMethod )
82*cdf0e10cSrcweir         {
83*cdf0e10cSrcweir             SbModule* pModule = m_pMethod->GetModule();
84*cdf0e10cSrcweir             if ( pModule )
85*cdf0e10cSrcweir             {
86*cdf0e10cSrcweir                 StarBASIC* pBasic = static_cast< StarBASIC* >( pModule->GetParent() );
87*cdf0e10cSrcweir                 if ( pBasic )
88*cdf0e10cSrcweir                 {
89*cdf0e10cSrcweir                     m_sURI = ::rtl::OUString::createFromAscii( "vnd.sun.star.script:" );
90*cdf0e10cSrcweir                     m_sURI += pBasic->GetName();
91*cdf0e10cSrcweir                     m_sURI += ::rtl::OUString::createFromAscii( "." );
92*cdf0e10cSrcweir                     m_sURI += pModule->GetName();
93*cdf0e10cSrcweir                     m_sURI += ::rtl::OUString::createFromAscii( "." );
94*cdf0e10cSrcweir                     m_sURI += m_pMethod->GetName();
95*cdf0e10cSrcweir                     m_sURI += ::rtl::OUString::createFromAscii( "?language=Basic&location=" );
96*cdf0e10cSrcweir                     if ( m_bIsAppScript )
97*cdf0e10cSrcweir                         m_sURI += ::rtl::OUString::createFromAscii( "application" );
98*cdf0e10cSrcweir                     else
99*cdf0e10cSrcweir                         m_sURI += ::rtl::OUString::createFromAscii( "document" );
100*cdf0e10cSrcweir                 }
101*cdf0e10cSrcweir             }
102*cdf0e10cSrcweir         }
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir         registerProperty( BASPROV_PROPERTY_URI,      BASPROV_PROPERTY_ID_URI,      BASPROV_DEFAULT_ATTRIBS(), &m_sURI,      ::getCppuType( &m_sURI ) );
105*cdf0e10cSrcweir         registerProperty( BASPROV_PROPERTY_EDITABLE, BASPROV_PROPERTY_ID_EDITABLE, BASPROV_DEFAULT_ATTRIBS(), &m_bEditable, ::getCppuType( &m_bEditable ) );
106*cdf0e10cSrcweir     }
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir     BasicMethodNodeImpl::~BasicMethodNodeImpl()
111*cdf0e10cSrcweir     {
112*cdf0e10cSrcweir     }
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
115*cdf0e10cSrcweir     // XInterface
116*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir     IMPLEMENT_FORWARD_XINTERFACE2( BasicMethodNodeImpl, BasicMethodNodeImpl_BASE, OPropertyContainer )
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
121*cdf0e10cSrcweir     // XTypeProvider
122*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir     IMPLEMENT_FORWARD_XTYPEPROVIDER2( BasicMethodNodeImpl, BasicMethodNodeImpl_BASE, OPropertyContainer )
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
127*cdf0e10cSrcweir     // XBrowseNode
128*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir     ::rtl::OUString BasicMethodNodeImpl::getName(  ) throw (RuntimeException)
131*cdf0e10cSrcweir     {
132*cdf0e10cSrcweir         ::vos::OGuard aGuard( Application::GetSolarMutex() );
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir         ::rtl::OUString sMethodName;
135*cdf0e10cSrcweir         if ( m_pMethod )
136*cdf0e10cSrcweir             sMethodName = m_pMethod->GetName();
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir         return sMethodName;
139*cdf0e10cSrcweir     }
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir     Sequence< Reference< browse::XBrowseNode > > BasicMethodNodeImpl::getChildNodes(  ) throw (RuntimeException)
144*cdf0e10cSrcweir     {
145*cdf0e10cSrcweir         ::vos::OGuard aGuard( Application::GetSolarMutex() );
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir         return Sequence< Reference< browse::XBrowseNode > >();
148*cdf0e10cSrcweir     }
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir     sal_Bool BasicMethodNodeImpl::hasChildNodes(  ) throw (RuntimeException)
153*cdf0e10cSrcweir     {
154*cdf0e10cSrcweir         ::vos::OGuard aGuard( Application::GetSolarMutex() );
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir         return sal_False;
157*cdf0e10cSrcweir     }
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
160*cdf0e10cSrcweir 
161*cdf0e10cSrcweir     sal_Int16 BasicMethodNodeImpl::getType(  ) throw (RuntimeException)
162*cdf0e10cSrcweir     {
163*cdf0e10cSrcweir         ::vos::OGuard aGuard( Application::GetSolarMutex() );
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir         return browse::BrowseNodeTypes::SCRIPT;
166*cdf0e10cSrcweir     }
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
169*cdf0e10cSrcweir     // OPropertySetHelper
170*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir     ::cppu::IPropertyArrayHelper& BasicMethodNodeImpl::getInfoHelper(  )
173*cdf0e10cSrcweir     {
174*cdf0e10cSrcweir         return *getArrayHelper();
175*cdf0e10cSrcweir     }
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
178*cdf0e10cSrcweir     // OPropertyArrayUsageHelper
179*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir     ::cppu::IPropertyArrayHelper* BasicMethodNodeImpl::createArrayHelper(  ) const
182*cdf0e10cSrcweir     {
183*cdf0e10cSrcweir         Sequence< Property > aProps;
184*cdf0e10cSrcweir         describeProperties( aProps );
185*cdf0e10cSrcweir         return new ::cppu::OPropertyArrayHelper( aProps );
186*cdf0e10cSrcweir     }
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
189*cdf0e10cSrcweir     // XPropertySet
190*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir     Reference< XPropertySetInfo > BasicMethodNodeImpl::getPropertySetInfo(  ) throw (RuntimeException)
193*cdf0e10cSrcweir     {
194*cdf0e10cSrcweir         Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
195*cdf0e10cSrcweir         return xInfo;
196*cdf0e10cSrcweir     }
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
199*cdf0e10cSrcweir     // XInvocation
200*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir     Reference< XIntrospectionAccess > BasicMethodNodeImpl::getIntrospection(  ) throw (RuntimeException)
203*cdf0e10cSrcweir     {
204*cdf0e10cSrcweir         return Reference< XIntrospectionAccess >();
205*cdf0e10cSrcweir     }
206*cdf0e10cSrcweir 
207*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
208*cdf0e10cSrcweir 
209*cdf0e10cSrcweir     Any BasicMethodNodeImpl::invoke( const ::rtl::OUString& aFunctionName, const Sequence< Any >& aParams,
210*cdf0e10cSrcweir         Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam )
211*cdf0e10cSrcweir         throw (IllegalArgumentException, script::CannotConvertException,
212*cdf0e10cSrcweir                reflection::InvocationTargetException, RuntimeException)
213*cdf0e10cSrcweir     {
214*cdf0e10cSrcweir 		(void)aParams;
215*cdf0e10cSrcweir 		(void)aOutParamIndex;
216*cdf0e10cSrcweir 		(void)aOutParam;
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir         if ( aFunctionName == BASPROV_PROPERTY_EDITABLE )
219*cdf0e10cSrcweir         {
220*cdf0e10cSrcweir             ::rtl::OUString sDocURL, sLibName, sModName;
221*cdf0e10cSrcweir             sal_uInt16 nLine1 = 0, nLine2;
222*cdf0e10cSrcweir 
223*cdf0e10cSrcweir             if ( !m_bIsAppScript )
224*cdf0e10cSrcweir             {
225*cdf0e10cSrcweir                 Reference< frame::XModel > xModel = MiscUtils::tDocUrlToModel( m_sScriptingContext );
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir                 if ( xModel.is() )
228*cdf0e10cSrcweir                 {
229*cdf0e10cSrcweir                     sDocURL = xModel->getURL();
230*cdf0e10cSrcweir                     if ( sDocURL.getLength() == 0 )
231*cdf0e10cSrcweir                     {
232*cdf0e10cSrcweir                         Sequence < PropertyValue > aProps = xModel->getArgs();
233*cdf0e10cSrcweir                         sal_Int32 nProps = aProps.getLength();
234*cdf0e10cSrcweir                         const PropertyValue* pProps = aProps.getConstArray();
235*cdf0e10cSrcweir                         for ( sal_Int32 i = 0; i < nProps; ++i )
236*cdf0e10cSrcweir                         {
237*cdf0e10cSrcweir                             // TODO: according to MBA the property 'Title' may change in future
238*cdf0e10cSrcweir                             if ( pProps[i].Name == ::rtl::OUString::createFromAscii( "Title" ) )
239*cdf0e10cSrcweir                             {
240*cdf0e10cSrcweir                                 pProps[i].Value >>= sDocURL;
241*cdf0e10cSrcweir                                 break;
242*cdf0e10cSrcweir                             }
243*cdf0e10cSrcweir                         }
244*cdf0e10cSrcweir                     }
245*cdf0e10cSrcweir                 }
246*cdf0e10cSrcweir             }
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir             if ( m_pMethod )
249*cdf0e10cSrcweir             {
250*cdf0e10cSrcweir                 m_pMethod->GetLineRange( nLine1, nLine2 );
251*cdf0e10cSrcweir                 SbModule* pModule = m_pMethod->GetModule();
252*cdf0e10cSrcweir                 if ( pModule )
253*cdf0e10cSrcweir                 {
254*cdf0e10cSrcweir                     sModName = pModule->GetName();
255*cdf0e10cSrcweir                     StarBASIC* pBasic = static_cast< StarBASIC* >( pModule->GetParent() );
256*cdf0e10cSrcweir                     if ( pBasic )
257*cdf0e10cSrcweir                         sLibName = pBasic->GetName();
258*cdf0e10cSrcweir                 }
259*cdf0e10cSrcweir             }
260*cdf0e10cSrcweir 
261*cdf0e10cSrcweir             if ( m_xContext.is() )
262*cdf0e10cSrcweir             {
263*cdf0e10cSrcweir                 Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
264*cdf0e10cSrcweir 
265*cdf0e10cSrcweir                 if ( xSMgr.is() )
266*cdf0e10cSrcweir                 {
267*cdf0e10cSrcweir                     Reference< frame::XDesktop > xDesktop( xSMgr->createInstanceWithContext(
268*cdf0e10cSrcweir                         ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ), m_xContext ), UNO_QUERY );
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir                     if ( xDesktop.is() )
271*cdf0e10cSrcweir                     {
272*cdf0e10cSrcweir                         Reference < frame::XDispatchProvider > xProv( xDesktop->getCurrentFrame(), UNO_QUERY );
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir                         if ( xProv.is() )
275*cdf0e10cSrcweir                         {
276*cdf0e10cSrcweir                             Reference< frame::XDispatchHelper > xHelper( xSMgr->createInstanceWithContext(
277*cdf0e10cSrcweir                                 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.DispatchHelper" ) ), m_xContext ), UNO_QUERY );
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir                             if ( xHelper.is() )
280*cdf0e10cSrcweir                             {
281*cdf0e10cSrcweir                                 Sequence < PropertyValue > aArgs(7);
282*cdf0e10cSrcweir                                 aArgs[0].Name = ::rtl::OUString::createFromAscii( "Document" );
283*cdf0e10cSrcweir                                 aArgs[0].Value <<= sDocURL;
284*cdf0e10cSrcweir                                 aArgs[1].Name = ::rtl::OUString::createFromAscii( "LibName" );
285*cdf0e10cSrcweir                                 aArgs[1].Value <<= sLibName;
286*cdf0e10cSrcweir                                 aArgs[2].Name = ::rtl::OUString::createFromAscii( "Name" );
287*cdf0e10cSrcweir                                 aArgs[2].Value <<= sModName;
288*cdf0e10cSrcweir                                 aArgs[3].Name = ::rtl::OUString::createFromAscii( "Type" );
289*cdf0e10cSrcweir                                 aArgs[3].Value <<= ::rtl::OUString::createFromAscii( "Module" );
290*cdf0e10cSrcweir                                 aArgs[4].Name = ::rtl::OUString::createFromAscii( "Line" );
291*cdf0e10cSrcweir                                 aArgs[4].Value <<= static_cast< sal_uInt32 >( nLine1 );
292*cdf0e10cSrcweir                                 xHelper->executeDispatch( xProv, ::rtl::OUString::createFromAscii( ".uno:BasicIDEAppear" ), ::rtl::OUString(), 0, aArgs );
293*cdf0e10cSrcweir                             }
294*cdf0e10cSrcweir                         }
295*cdf0e10cSrcweir                     }
296*cdf0e10cSrcweir                 }
297*cdf0e10cSrcweir             }
298*cdf0e10cSrcweir         }
299*cdf0e10cSrcweir         else
300*cdf0e10cSrcweir         {
301*cdf0e10cSrcweir             throw IllegalArgumentException(
302*cdf0e10cSrcweir                 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicMethodNodeImpl::invoke: function name not supported!" ) ),
303*cdf0e10cSrcweir                 Reference< XInterface >(), 1 );
304*cdf0e10cSrcweir         }
305*cdf0e10cSrcweir 
306*cdf0e10cSrcweir         return Any();
307*cdf0e10cSrcweir     }
308*cdf0e10cSrcweir 
309*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir     void BasicMethodNodeImpl::setValue( const ::rtl::OUString& aPropertyName, const Any& aValue )
312*cdf0e10cSrcweir         throw (UnknownPropertyException, script::CannotConvertException,
313*cdf0e10cSrcweir                reflection::InvocationTargetException, RuntimeException)
314*cdf0e10cSrcweir     {
315*cdf0e10cSrcweir 		(void)aPropertyName;
316*cdf0e10cSrcweir 		(void)aValue;
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir         throw UnknownPropertyException(
319*cdf0e10cSrcweir             ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicMethodNodeImpl::setValue: property name is unknown!" ) ),
320*cdf0e10cSrcweir             Reference< XInterface >() );
321*cdf0e10cSrcweir     }
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
324*cdf0e10cSrcweir 
325*cdf0e10cSrcweir     Any BasicMethodNodeImpl::getValue( const ::rtl::OUString& aPropertyName ) throw (UnknownPropertyException, RuntimeException)
326*cdf0e10cSrcweir     {
327*cdf0e10cSrcweir 		(void)aPropertyName;
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir         throw UnknownPropertyException(
330*cdf0e10cSrcweir             ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicMethodNodeImpl::getValue: property name is unknown!" ) ),
331*cdf0e10cSrcweir             Reference< XInterface >() );
332*cdf0e10cSrcweir     }
333*cdf0e10cSrcweir 
334*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir     sal_Bool BasicMethodNodeImpl::hasMethod( const ::rtl::OUString& aName ) throw (RuntimeException)
337*cdf0e10cSrcweir     {
338*cdf0e10cSrcweir         sal_Bool bReturn = sal_False;
339*cdf0e10cSrcweir         if ( aName == BASPROV_PROPERTY_EDITABLE )
340*cdf0e10cSrcweir             bReturn = sal_True;
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir         return bReturn;
343*cdf0e10cSrcweir     }
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
346*cdf0e10cSrcweir 
347*cdf0e10cSrcweir     sal_Bool BasicMethodNodeImpl::hasProperty( const ::rtl::OUString& aName ) throw (RuntimeException)
348*cdf0e10cSrcweir     {
349*cdf0e10cSrcweir 		(void)aName;
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir         return sal_False;
352*cdf0e10cSrcweir     }
353*cdf0e10cSrcweir 
354*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
355*cdf0e10cSrcweir 
356*cdf0e10cSrcweir //.........................................................................
357*cdf0e10cSrcweir }	// namespace basprov
358*cdf0e10cSrcweir //.........................................................................
359