Files
libreoffice/basic/source/classes/sbxmod.cxx

2782 lines
86 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
2000-09-18 15:18:56 +00:00
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 15:18:56 +00:00
2000-09-18 15:18:56 +00:00
#include <list>
#include <vcl/svapp.hxx>
#include <tools/stream.hxx>
#include <svl/brdcst.hxx>
2000-09-18 15:18:56 +00:00
#include <tools/shl.hxx>
#include <basic/sbx.hxx>
#include "sbdiagnose.hxx"
2000-09-18 15:18:56 +00:00
#include "sb.hxx"
#include <sbjsmeth.hxx>
#include "sbjsmod.hxx"
#include "sbintern.hxx"
#include "image.hxx"
#include "opcodes.hxx"
#include "runtime.hxx"
#include "token.hxx"
#include "sbunoobj.hxx"
CWS-TOOLING: integrate CWS sqlsyntaxhighlighting 2008-11-20 17:23:29 +0100 mod r264074 : new colors by UX 2008-11-17 17:37:19 +0100 mod r263732 : revert manual fix for icu 2008-11-17 15:03:39 +0100 mod r263725 : manual fix for icu 2008-11-17 11:26:39 +0100 mod r263709 : manual fix for icu 2008-11-16 18:19:16 +0100 mod r263702 : `fix 2008-11-12 22:11:50 +0100 mod r263619 : CWS-TOOLING: rebase CWS sqlsyntaxhighlighting to trunk@263288 (milestone: DEV300:m35) 2008-11-12 11:04:33 +0100 mod r263578 : minor cleanup 2008-11-12 11:03:02 +0100 mod r263577 : seperate MulitLineEditSyntaxHighlighter into new file 2008-11-06 15:13:27 +0100 fs r263391 : merged from trunk 2008-11-06 15:09:20 +0100 fs r263390 : merged from trunk 2008-11-06 15:07:06 +0100 fs r263388 : reverted the change c262599. This seems to be a merge from trunk, but without properly setting svn:mergeinfo, thus it results in conflicts when doing a real 'svn merge'. 2008-11-06 15:03:19 +0100 fs r263387 : merged rev. 262769 2008-11-03 17:58:19 +0100 mod r263297 : little fixes 2008-11-03 17:56:49 +0100 mod r263296 : little fixes 2008-11-03 17:12:41 +0100 mod r263295 : new entry SQL comment for Tools-Appearance 2008-11-03 17:12:13 +0100 mod r263294 : different tokenizer based on language 2008-11-03 17:11:40 +0100 mod r263293 : new entry for Tools-Appearance: SQL Comment 2008-11-03 17:11:14 +0100 mod r263292 : get notification about color changes for sql view 2008-10-29 00:01:40 +0100 mod r262768 : string listbox 2008-10-28 23:57:45 +0100 mod r262767 : string listbox 2008-10-22 18:38:07 +0200 mod r262614 : source alignment fix 2008-10-22 18:37:23 +0200 mod r262613 : '' as string as well 2008-10-22 18:36:45 +0200 mod r262612 : get syntax highlighting in tools-sql... 2008-10-22 14:11:12 +0200 mod r262605 : formatting fix 2008-10-22 13:30:42 +0200 mod r262599 : additional entries for Tools-Options-Appearance 2008-10-19 22:53:50 +0200 mod r262302 : migration from cvs to svn 2008-10-19 22:37:45 +0200 mod r262301 : migration from cvs to svn 2008-10-19 22:36:04 +0200 mod r262300 : migration from cvs to svn
2008-11-28 11:39:37 +00:00
#include "sal/log.hxx"
CWS-TOOLING: integrate CWS sqlsyntaxhighlighting 2008-11-20 17:23:29 +0100 mod r264074 : new colors by UX 2008-11-17 17:37:19 +0100 mod r263732 : revert manual fix for icu 2008-11-17 15:03:39 +0100 mod r263725 : manual fix for icu 2008-11-17 11:26:39 +0100 mod r263709 : manual fix for icu 2008-11-16 18:19:16 +0100 mod r263702 : `fix 2008-11-12 22:11:50 +0100 mod r263619 : CWS-TOOLING: rebase CWS sqlsyntaxhighlighting to trunk@263288 (milestone: DEV300:m35) 2008-11-12 11:04:33 +0100 mod r263578 : minor cleanup 2008-11-12 11:03:02 +0100 mod r263577 : seperate MulitLineEditSyntaxHighlighter into new file 2008-11-06 15:13:27 +0100 fs r263391 : merged from trunk 2008-11-06 15:09:20 +0100 fs r263390 : merged from trunk 2008-11-06 15:07:06 +0100 fs r263388 : reverted the change c262599. This seems to be a merge from trunk, but without properly setting svn:mergeinfo, thus it results in conflicts when doing a real 'svn merge'. 2008-11-06 15:03:19 +0100 fs r263387 : merged rev. 262769 2008-11-03 17:58:19 +0100 mod r263297 : little fixes 2008-11-03 17:56:49 +0100 mod r263296 : little fixes 2008-11-03 17:12:41 +0100 mod r263295 : new entry SQL comment for Tools-Appearance 2008-11-03 17:12:13 +0100 mod r263294 : different tokenizer based on language 2008-11-03 17:11:40 +0100 mod r263293 : new entry for Tools-Appearance: SQL Comment 2008-11-03 17:11:14 +0100 mod r263292 : get notification about color changes for sql view 2008-10-29 00:01:40 +0100 mod r262768 : string listbox 2008-10-28 23:57:45 +0100 mod r262767 : string listbox 2008-10-22 18:38:07 +0200 mod r262614 : source alignment fix 2008-10-22 18:37:23 +0200 mod r262613 : '' as string as well 2008-10-22 18:36:45 +0200 mod r262612 : get syntax highlighting in tools-sql... 2008-10-22 14:11:12 +0200 mod r262605 : formatting fix 2008-10-22 13:30:42 +0200 mod r262599 : additional entries for Tools-Options-Appearance 2008-10-19 22:53:50 +0200 mod r262302 : migration from cvs to svn 2008-10-19 22:37:45 +0200 mod r262301 : migration from cvs to svn 2008-10-19 22:36:04 +0200 mod r262300 : migration from cvs to svn
2008-11-28 11:39:37 +00:00
#include <basic/basrdll.hxx>
#include <osl/mutex.hxx>
#include <basic/sbobjmod.hxx>
#include <basic/vbahelper.hxx>
#include <cppuhelper/implbase3.hxx>
#include <unotools/eventcfg.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/vba/XVBACompatibility.hpp>
#include <com/sun/star/script/vba/VBAScriptEventId.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/XEventBroadcaster.hpp>
#include <com/sun/star/document/XEventListener.hpp>
2000-09-18 15:18:56 +00:00
using namespace com::sun::star;
CWS-TOOLING: integrate CWS sqlsyntaxhighlighting 2008-11-20 17:23:29 +0100 mod r264074 : new colors by UX 2008-11-17 17:37:19 +0100 mod r263732 : revert manual fix for icu 2008-11-17 15:03:39 +0100 mod r263725 : manual fix for icu 2008-11-17 11:26:39 +0100 mod r263709 : manual fix for icu 2008-11-16 18:19:16 +0100 mod r263702 : `fix 2008-11-12 22:11:50 +0100 mod r263619 : CWS-TOOLING: rebase CWS sqlsyntaxhighlighting to trunk@263288 (milestone: DEV300:m35) 2008-11-12 11:04:33 +0100 mod r263578 : minor cleanup 2008-11-12 11:03:02 +0100 mod r263577 : seperate MulitLineEditSyntaxHighlighter into new file 2008-11-06 15:13:27 +0100 fs r263391 : merged from trunk 2008-11-06 15:09:20 +0100 fs r263390 : merged from trunk 2008-11-06 15:07:06 +0100 fs r263388 : reverted the change c262599. This seems to be a merge from trunk, but without properly setting svn:mergeinfo, thus it results in conflicts when doing a real 'svn merge'. 2008-11-06 15:03:19 +0100 fs r263387 : merged rev. 262769 2008-11-03 17:58:19 +0100 mod r263297 : little fixes 2008-11-03 17:56:49 +0100 mod r263296 : little fixes 2008-11-03 17:12:41 +0100 mod r263295 : new entry SQL comment for Tools-Appearance 2008-11-03 17:12:13 +0100 mod r263294 : different tokenizer based on language 2008-11-03 17:11:40 +0100 mod r263293 : new entry for Tools-Appearance: SQL Comment 2008-11-03 17:11:14 +0100 mod r263292 : get notification about color changes for sql view 2008-10-29 00:01:40 +0100 mod r262768 : string listbox 2008-10-28 23:57:45 +0100 mod r262767 : string listbox 2008-10-22 18:38:07 +0200 mod r262614 : source alignment fix 2008-10-22 18:37:23 +0200 mod r262613 : '' as string as well 2008-10-22 18:36:45 +0200 mod r262612 : get syntax highlighting in tools-sql... 2008-10-22 14:11:12 +0200 mod r262605 : formatting fix 2008-10-22 13:30:42 +0200 mod r262599 : additional entries for Tools-Options-Appearance 2008-10-19 22:53:50 +0200 mod r262302 : migration from cvs to svn 2008-10-19 22:37:45 +0200 mod r262301 : migration from cvs to svn 2008-10-19 22:36:04 +0200 mod r262300 : migration from cvs to svn
2008-11-28 11:39:37 +00:00
#ifdef UNX
#include <sys/resource.h>
#endif
2000-09-18 15:18:56 +00:00
#include <stdio.h>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <map>
#include <com/sun/star/reflection/ProxyFactory.hpp>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/uno/XAggregation.hpp>
#include <com/sun/star/script/XInvocation.hpp>
Merge commit 'ooo/DEV300_m106' into integration/dev300_m106 Conflicts: avmedia/source/gstreamer/gstframegrabber.cxx avmedia/source/gstreamer/gstplayer.cxx avmedia/source/gstreamer/gstplayer.hxx basic/inc/basic/sbxdef.hxx basic/source/classes/sbxmod.cxx basic/source/comp/makefile.mk basic/source/comp/sbcomp.cxx basic/source/inc/namecont.hxx basic/source/inc/scriptcont.hxx basic/source/runtime/methods.cxx basic/source/runtime/runtime.cxx basic/source/runtime/stdobj.cxx basic/source/runtime/step1.cxx basic/source/uno/namecont.cxx basic/util/makefile.mk connectivity/source/commontools/predicateinput.cxx connectivity/source/drivers/dbase/DNoException.cxx connectivity/source/drivers/dbase/DTable.cxx connectivity/source/drivers/file/fcomp.cxx connectivity/source/drivers/jdbc/JConnection.cxx connectivity/source/drivers/odbcbase/OResultSet.cxx connectivity/source/drivers/odbcbase/OStatement.cxx connectivity/source/parse/sqlnode.cxx desktop/source/app/app.cxx drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx drawinglayer/source/processor2d/vclprocessor2d.cxx formula/inc/formula/token.hxx formula/source/core/api/token.cxx fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx fpicker/source/win32/filepicker/platform_vista.h framework/source/helper/persistentwindowstate.cxx framework/source/uielement/menubarmanager.cxx oovbaapi/ooo/vba/XFoundFiles.idl oovbaapi/ooo/vba/excel/XApplication.idl oovbaapi/ooo/vba/msforms/XCheckBox.idl oovbaapi/ooo/vba/msforms/XComboBox.idl oovbaapi/ooo/vba/msforms/XControl.idl oovbaapi/ooo/vba/msforms/XGroupBox.idl oovbaapi/ooo/vba/msforms/XLabel.idl oovbaapi/ooo/vba/msforms/XListBox.idl oovbaapi/ooo/vba/msforms/XNewFont.idl oovbaapi/ooo/vba/msforms/XRadioButton.idl oovbaapi/ooo/vba/msforms/XTextBox.idl oovbaapi/ooo/vba/msforms/XToggleButton.idl scripting/source/dlgprov/dlgevtatt.cxx sfx2/source/control/unoctitm.cxx sfx2/source/doc/objstor.cxx sfx2/source/doc/objxtor.cxx svx/inc/svx/svdograf.hxx svx/source/form/fmpage.cxx svx/source/form/fmpgeimp.cxx svx/source/svdraw/svdedtv.cxx svx/source/svdraw/svdfmtf.cxx svx/source/svdraw/svdograf.cxx svx/source/svdraw/svdouno.cxx svx/source/xml/xmlgrhlp.cxx uui/source/iahndl-ssl.cxx vbahelper/Library_msforms.mk vbahelper/Library_vbahelper.mk vbahelper/inc/vbahelper/vbahelper.hxx vbahelper/prj/build.lst vbahelper/source/msforms/vbacombobox.cxx vbahelper/source/msforms/vbacontrol.cxx vbahelper/source/msforms/vbacontrols.cxx vbahelper/source/msforms/vbaframe.cxx vbahelper/source/msforms/vbaframe.hxx vbahelper/source/msforms/vbalabel.cxx vbahelper/source/msforms/vbalabel.hxx vbahelper/source/msforms/vbalistbox.cxx vbahelper/source/msforms/vbalistbox.hxx vbahelper/source/msforms/vbamultipage.cxx vbahelper/source/msforms/vbatogglebutton.cxx vbahelper/source/msforms/vbauserform.cxx vbahelper/source/vbahelper/vbacommandbar.cxx vbahelper/source/vbahelper/vbacommandbarcontrol.cxx vbahelper/source/vbahelper/vbacommandbarcontrols.hxx vbahelper/source/vbahelper/vbahelper.cxx vbahelper/source/vbahelper/vbawindowbase.cxx xmloff/source/meta/xmlmetai.cxx xmloff/source/style/PageMasterExportPropMapper.cxx xmloff/source/style/PageMasterStyleMap.cxx xmloff/source/text/txtexppr.cxx xmloff/source/text/txtprmap.cxx
2011-04-28 00:12:58 +02:00
using namespace ::com::sun::star;
using namespace com::sun::star::lang;
using namespace com::sun::star::reflection;
using namespace com::sun::star::beans;
using namespace com::sun::star::script;
using namespace com::sun::star::uno;
2000-09-18 15:18:56 +00:00
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <com/sun/star/awt/DialogProvider.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <comphelper/anytostring.hxx>
#include <ooo/vba/VbQueryClose.hpp>
#include "sbcomp.hxx"
typedef ::cppu::WeakImplHelper1< XInvocation > DocObjectWrapper_BASE;
typedef ::std::map< sal_Int16, Any, ::std::less< sal_Int16 > > OutParamMap;
::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue );
class DocObjectWrapper : public DocObjectWrapper_BASE
{
Reference< XAggregation > m_xAggProxy;
Reference< XInvocation > m_xAggInv;
Reference< XTypeProvider > m_xAggregateTypeProv;
Sequence< Type > m_Types;
SbModule* m_pMod;
SbMethodRef getMethod( const OUString& aName ) throw (RuntimeException);
SbPropertyRef getProperty( const OUString& aName ) throw (RuntimeException);
OUString mName; // for debugging
public:
DocObjectWrapper( SbModule* pMod );
virtual ~DocObjectWrapper();
virtual void SAL_CALL acquire() throw();
virtual void SAL_CALL release() throw();
virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (RuntimeException)
{
if( !m_xAggregateTypeProv.is() )
throw RuntimeException();
return m_xAggregateTypeProv->getImplementationId();
}
virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (RuntimeException);
virtual Any SAL_CALL invoke( const OUString& aFunctionName, const Sequence< Any >& aParams, Sequence< ::sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) throw (IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException);
virtual void SAL_CALL setValue( const OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException);
virtual Any SAL_CALL getValue( const OUString& aPropertyName ) throw (UnknownPropertyException, RuntimeException);
virtual ::sal_Bool SAL_CALL hasMethod( const OUString& aName ) throw (RuntimeException);
virtual ::sal_Bool SAL_CALL hasProperty( const OUString& aName ) throw (RuntimeException);
virtual Any SAL_CALL queryInterface( const Type& aType ) throw ( RuntimeException );
virtual Sequence< Type > SAL_CALL getTypes() throw ( RuntimeException );
};
DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pVar->GetName() )
{
SbObjModule* pMod = PTR_CAST(SbObjModule,pVar);
if ( pMod )
{
if ( pMod->GetModuleType() == ModuleType::DOCUMENT )
{
// Use proxy factory service to create aggregatable proxy.
SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,pMod->GetObject() );
Reference< XInterface > xIf;
if ( pUnoObj )
{
Any aObj = pUnoObj->getUnoAny();
aObj >>= xIf;
if ( xIf.is() )
{
m_xAggregateTypeProv.set( xIf, UNO_QUERY );
m_xAggInv.set( xIf, UNO_QUERY );
}
}
if ( xIf.is() )
{
try
{
Reference< XProxyFactory > xProxyFac = ProxyFactory::create( comphelper::getProcessComponentContext() );
m_xAggProxy = xProxyFac->createProxy( xIf );
}
catch(const Exception& )
{
SAL_WARN( "basic", "DocObjectWrapper::DocObjectWrapper: Caught exception!" );
}
}
if ( m_xAggProxy.is() )
{
osl_atomic_increment( &m_refCount );
/* i35609 - Fix crash on Solaris. The setDelegator call needs
to be in its own block to ensure that all temporary Reference
instances that are acquired during the call are released
before m_refCount is decremented again */
{
m_xAggProxy->setDelegator( static_cast< cppu::OWeakObject * >( this ) );
}
osl_atomic_decrement( &m_refCount );
}
}
}
}
void SAL_CALL
DocObjectWrapper::acquire() throw ()
{
osl_atomic_increment( &m_refCount );
SAL_INFO("basic","DocObjectWrapper::acquire("<< OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr() << ") 0x" << this << " refcount is now " << m_refCount );
}
void SAL_CALL
DocObjectWrapper::release() throw ()
{
if ( osl_atomic_decrement( &m_refCount ) == 0 )
{
SAL_INFO("basic","DocObjectWrapper::release("<< OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr() << ") 0x" << this << " refcount is now " << m_refCount );
delete this;
}
else
{
SAL_INFO("basic","DocObjectWrapper::release("<< OUStringToOString( mName, RTL_TEXTENCODING_UTF8 ).getStr() << ") 0x" << this << " refcount is now " << m_refCount );
}
}
DocObjectWrapper::~DocObjectWrapper()
{
}
Sequence< Type > SAL_CALL DocObjectWrapper::getTypes()
throw ( RuntimeException )
{
if ( m_Types.getLength() == 0 )
{
Sequence< Type > sTypes;
if ( m_xAggregateTypeProv.is() )
{
sTypes = m_xAggregateTypeProv->getTypes();
}
m_Types.realloc( sTypes.getLength() + 1 );
Type* pPtr = m_Types.getArray();
for ( int i=0; i<m_Types.getLength(); ++i, ++pPtr )
{
if ( i == 0 )
{
*pPtr = XInvocation::static_type( NULL );
}
else
{
*pPtr = sTypes[ i - 1 ];
}
}
}
return m_Types;
}
Reference< XIntrospectionAccess > SAL_CALL
DocObjectWrapper::getIntrospection( ) throw (RuntimeException)
{
return NULL;
}
Any SAL_CALL
DocObjectWrapper::invoke( const OUString& aFunctionName, const Sequence< Any >& aParams, Sequence< ::sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) throw (IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException)
{
if ( m_xAggInv.is() && m_xAggInv->hasMethod( aFunctionName ) )
return m_xAggInv->invoke( aFunctionName, aParams, aOutParamIndex, aOutParam );
SbMethodRef pMethod = getMethod( aFunctionName );
if ( !pMethod )
throw RuntimeException();
// check number of parameters
sal_Int32 nParamsCount = aParams.getLength();
SbxInfo* pInfo = pMethod->GetInfo();
if ( pInfo )
{
sal_Int32 nSbxOptional = 0;
sal_uInt16 n = 1;
for ( const SbxParamInfo* pParamInfo = pInfo->GetParam( n ); pParamInfo; pParamInfo = pInfo->GetParam( ++n ) )
{
if ( ( pParamInfo->nFlags & SBX_OPTIONAL ) != 0 )
++nSbxOptional;
else
nSbxOptional = 0;
}
sal_Int32 nSbxCount = n - 1;
if ( nParamsCount < nSbxCount - nSbxOptional )
{
throw RuntimeException( "wrong number of parameters!", Reference< XInterface >() );
}
}
// set parameters
SbxArrayRef xSbxParams;
if ( nParamsCount > 0 )
{
xSbxParams = new SbxArray;
const Any* pParams = aParams.getConstArray();
for ( sal_Int32 i = 0; i < nParamsCount; ++i )
{
SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT );
unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), pParams[i] );
xSbxParams->Put( xSbxVar, static_cast< sal_uInt16 >( i ) + 1 );
// Enable passing by ref
if ( xSbxVar->GetType() != SbxVARIANT )
xSbxVar->SetFlag( SBX_FIXED );
}
}
if ( xSbxParams.Is() )
pMethod->SetParameters( xSbxParams );
// call method
SbxVariableRef xReturn = new SbxVariable;
2011-01-24 14:50:41 +00:00
pMethod->Call( xReturn );
Any aReturn;
// get output parameters
if ( xSbxParams.Is() )
{
SbxInfo* pInfo_ = pMethod->GetInfo();
if ( pInfo_ )
{
OutParamMap aOutParamMap;
for ( sal_uInt16 n = 1, nCount = xSbxParams->Count(); n < nCount; ++n )
{
const SbxParamInfo* pParamInfo = pInfo_->GetParam( n );
if ( pParamInfo && ( pParamInfo->eType & SbxBYREF ) != 0 )
{
SbxVariable* pVar = xSbxParams->Get( n );
if ( pVar )
{
SbxVariableRef xVar = pVar;
aOutParamMap.insert( OutParamMap::value_type( n - 1, sbxToUnoValue( xVar ) ) );
}
}
}
sal_Int32 nOutParamCount = aOutParamMap.size();
aOutParamIndex.realloc( nOutParamCount );
aOutParam.realloc( nOutParamCount );
sal_Int16* pOutParamIndex = aOutParamIndex.getArray();
Any* pOutParam = aOutParam.getArray();
for ( OutParamMap::iterator aIt = aOutParamMap.begin(); aIt != aOutParamMap.end(); ++aIt, ++pOutParamIndex, ++pOutParam )
{
*pOutParamIndex = aIt->first;
*pOutParam = aIt->second;
}
}
}
// get return value
aReturn = sbxToUnoValue( xReturn );
pMethod->SetParameters( NULL );
return aReturn;
}
void SAL_CALL
DocObjectWrapper::setValue( const OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException)
{
if ( m_xAggInv.is() && m_xAggInv->hasProperty( aPropertyName ) )
return m_xAggInv->setValue( aPropertyName, aValue );
SbPropertyRef pProperty = getProperty( aPropertyName );
if ( !pProperty.Is() )
throw UnknownPropertyException();
unoToSbxValue( (SbxVariable*) pProperty, aValue );
}
Any SAL_CALL
DocObjectWrapper::getValue( const OUString& aPropertyName ) throw (UnknownPropertyException, RuntimeException)
{
if ( m_xAggInv.is() && m_xAggInv->hasProperty( aPropertyName ) )
return m_xAggInv->getValue( aPropertyName );
SbPropertyRef pProperty = getProperty( aPropertyName );
if ( !pProperty.Is() )
throw UnknownPropertyException();
SbxVariable* pProp = ( SbxVariable* ) pProperty;
if ( pProp->GetType() == SbxEMPTY )
pProperty->Broadcast( SBX_HINT_DATAWANTED );
Any aRet = sbxToUnoValue( pProp );
return aRet;
}
::sal_Bool SAL_CALL
DocObjectWrapper::hasMethod( const OUString& aName ) throw (RuntimeException)
{
if ( m_xAggInv.is() && m_xAggInv->hasMethod( aName ) )
return sal_True;
return getMethod( aName ).Is();
}
::sal_Bool SAL_CALL
DocObjectWrapper::hasProperty( const OUString& aName ) throw (RuntimeException)
{
sal_Bool bRes = sal_False;
if ( m_xAggInv.is() && m_xAggInv->hasProperty( aName ) )
bRes = sal_True;
else bRes = getProperty( aName ).Is();
return bRes;
}
Any SAL_CALL DocObjectWrapper::queryInterface( const Type& aType )
throw ( RuntimeException )
{
Any aRet = DocObjectWrapper_BASE::queryInterface( aType );
if ( aRet.hasValue() )
return aRet;
else if ( m_xAggProxy.is() )
aRet = m_xAggProxy->queryAggregation( aType );
return aRet;
}
SbMethodRef DocObjectWrapper::getMethod( const OUString& aName ) throw (RuntimeException)
{
SbMethodRef pMethod = NULL;
if ( m_pMod )
{
sal_uInt16 nSaveFlgs = m_pMod->GetFlags();
// Limit search to this module
m_pMod->ResetFlag( SBX_GBLSEARCH );
pMethod = (SbMethod*) m_pMod->SbModule::Find( aName, SbxCLASS_METHOD );
m_pMod->SetFlags( nSaveFlgs );
}
return pMethod;
}
SbPropertyRef DocObjectWrapper::getProperty( const OUString& aName ) throw (RuntimeException)
{
SbPropertyRef pProperty = NULL;
if ( m_pMod )
{
sal_uInt16 nSaveFlgs = m_pMod->GetFlags();
// Limit search to this module.
m_pMod->ResetFlag( SBX_GBLSEARCH );
pProperty = (SbProperty*)m_pMod->SbModule::Find( aName, SbxCLASS_PROPERTY );
m_pMod->SetFlag( nSaveFlgs );
}
return pProperty;
}
2000-09-18 15:18:56 +00:00
TYPEINIT1(SbModule,SbxObject)
TYPEINIT1(SbMethod,SbxMethod)
TYPEINIT1(SbProperty,SbxProperty)
TYPEINIT1(SbProcedureProperty,SbxProperty)
2000-09-18 15:18:56 +00:00
TYPEINIT1(SbJScriptModule,SbModule)
TYPEINIT1(SbJScriptMethod,SbMethod)
TYPEINIT1(SbObjModule,SbModule)
TYPEINIT1(SbUserFormModule,SbObjModule)
2000-09-18 15:18:56 +00:00
uno::Reference< frame::XModel > getDocumentModel( StarBASIC* pb )
{
uno::Reference< frame::XModel > xModel;
if( pb && pb->IsDocBasic() )
{
uno::Any aDoc;
if( pb->GetUNOConstant( "ThisComponent", aDoc ) )
xModel.set( aDoc, uno::UNO_QUERY );
}
return xModel;
}
uno::Reference< vba::XVBACompatibility > getVBACompatibility( const uno::Reference< frame::XModel >& rxModel )
{
uno::Reference< vba::XVBACompatibility > xVBACompat;
try
{
uno::Reference< beans::XPropertySet > xModelProps( rxModel, uno::UNO_QUERY_THROW );
xVBACompat.set( xModelProps->getPropertyValue( "BasicLibraries" ), uno::UNO_QUERY );
}
catch(const uno::Exception& )
{
}
return xVBACompat;
}
bool getDefaultVBAMode( StarBASIC* pb )
{
uno::Reference< vba::XVBACompatibility > xVBACompat = getVBACompatibility( getDocumentModel( pb ) );
return xVBACompat.is() && xVBACompat->getVBACompatibilityMode();
}
class AsyncQuitHandler
{
AsyncQuitHandler() {}
AsyncQuitHandler( const AsyncQuitHandler&);
public:
static AsyncQuitHandler& instance()
{
static AsyncQuitHandler dInst;
return dInst;
}
void QuitApplication()
{
uno::Reference< frame::XDesktop2 > xDeskTop = frame::Desktop::create( comphelper::getProcessComponentContext() );
xDeskTop->terminate();
}
DECL_LINK( OnAsyncQuit, void* );
};
2009-09-23 14:06:30 +00:00
IMPL_LINK( AsyncQuitHandler, OnAsyncQuit, void*, /*pNull*/ )
{
QuitApplication();
return 0L;
}
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// A Basic module has set EXTSEARCH, so that the elements, that the modul contains,
// could be found from other module.
2000-09-18 15:18:56 +00:00
SbModule::SbModule( const OUString& rName, sal_Bool bVBACompat )
: SbxObject( "StarBASICModule" ),
pImage( NULL ), pBreaks( NULL ), pClassData( NULL ), mbVBACompat( bVBACompat ), pDocObject( NULL ), bIsProxyModule( false )
2000-09-18 15:18:56 +00:00
{
SetName( rName );
SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH );
SetModuleType( script::ModuleType::NORMAL );
// #i92642: Set name property to intitial name
SbxVariable* pNameProp = pProps->Find( "Name", SbxCLASS_PROPERTY );
if( pNameProp != NULL )
{
pNameProp->PutString( GetName() );
}
2000-09-18 15:18:56 +00:00
}
SbModule::~SbModule()
{
SAL_INFO("basic","Module named " << OUStringToOString( GetName(), RTL_TEXTENCODING_UTF8 ).getStr() << " is destructing");
2012-01-26 01:02:30 +09:00
delete pImage;
delete pBreaks;
delete pClassData;
mxWrapper = NULL;
}
uno::Reference< script::XInvocation >
SbModule::GetUnoModule()
{
if ( !mxWrapper.is() )
mxWrapper = new DocObjectWrapper( this );
SAL_INFO("basic","Module named " << OUStringToOString( GetName(), RTL_TEXTENCODING_UTF8 ).getStr() << " returning wrapper mxWrapper (0x" << mxWrapper.get() <<")" );
return mxWrapper;
2000-09-18 15:18:56 +00:00
}
sal_Bool SbModule::IsCompiled() const
2000-09-18 15:18:56 +00:00
{
return sal_Bool( pImage != 0 );
2000-09-18 15:18:56 +00:00
}
const SbxObject* SbModule::FindType( OUString aTypeName ) const
{
return pImage ? pImage->FindType( aTypeName ) : NULL;
}
2010-10-06 22:33:21 +02:00
// From the code generator: deletion of images and the oposite of validation for entries
2000-09-18 15:18:56 +00:00
void SbModule::StartDefinitions()
{
delete pImage; pImage = NULL;
if( pClassData )
pClassData->clear();
2010-10-06 22:33:21 +02:00
// methods and properties persist, but they are invalid;
// at least are the information under certain conditions clogged
sal_uInt16 i;
2000-09-18 15:18:56 +00:00
for( i = 0; i < pMethods->Count(); i++ )
{
SbMethod* p = PTR_CAST(SbMethod,pMethods->Get( i ) );
if( p )
p->bInvalid = sal_True;
2000-09-18 15:18:56 +00:00
}
for( i = 0; i < pProps->Count(); )
{
SbProperty* p = PTR_CAST(SbProperty,pProps->Get( i ) );
if( p )
pProps->Remove( i );
else
i++;
}
}
2010-10-06 22:33:21 +02:00
// request/create method
2000-09-18 15:18:56 +00:00
SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t )
2000-09-18 15:18:56 +00:00
{
SbxVariable* p = pMethods->Find( rName, SbxCLASS_METHOD );
SbMethod* pMeth = p ? PTR_CAST(SbMethod,p) : NULL;
if( p && !pMeth )
{
2000-09-18 15:18:56 +00:00
pMethods->Remove( p );
}
2000-09-18 15:18:56 +00:00
if( !pMeth )
{
pMeth = new SbMethod( rName, t, this );
pMeth->SetParent( this );
pMeth->SetFlags( SBX_READ );
pMethods->Put( pMeth, pMethods->Count() );
StartListening( pMeth->GetBroadcaster(), sal_True );
2000-09-18 15:18:56 +00:00
}
2010-10-06 22:33:21 +02:00
// The method is per default valid, because it could be
// created from the compiler (code generator) as well.
pMeth->bInvalid = sal_False;
2000-09-18 15:18:56 +00:00
pMeth->ResetFlag( SBX_FIXED );
pMeth->SetFlag( SBX_WRITE );
pMeth->SetType( t );
pMeth->ResetFlag( SBX_WRITE );
if( t != SbxVARIANT )
{
2000-09-18 15:18:56 +00:00
pMeth->SetFlag( SBX_FIXED );
}
2000-09-18 15:18:56 +00:00
return pMeth;
}
2010-10-06 22:33:21 +02:00
// request/create property
2000-09-18 15:18:56 +00:00
SbProperty* SbModule::GetProperty( const OUString& rName, SbxDataType t )
2000-09-18 15:18:56 +00:00
{
SbxVariable* p = pProps->Find( rName, SbxCLASS_PROPERTY );
SbProperty* pProp = p ? PTR_CAST(SbProperty,p) : NULL;
if( p && !pProp )
{
2000-09-18 15:18:56 +00:00
pProps->Remove( p );
}
2000-09-18 15:18:56 +00:00
if( !pProp )
{
pProp = new SbProperty( rName, t, this );
pProp->SetFlag( SBX_READWRITE );
pProp->SetParent( this );
pProps->Put( pProp, pProps->Count() );
StartListening( pProp->GetBroadcaster(), sal_True );
2000-09-18 15:18:56 +00:00
}
return pProp;
}
SbProcedureProperty* SbModule::GetProcedureProperty( const OUString& rName, SbxDataType t )
{
SbxVariable* p = pProps->Find( rName, SbxCLASS_PROPERTY );
SbProcedureProperty* pProp = p ? PTR_CAST(SbProcedureProperty,p) : NULL;
if( p && !pProp )
{
pProps->Remove( p );
}
if( !pProp )
{
pProp = new SbProcedureProperty( rName, t );
pProp->SetFlag( SBX_READWRITE );
pProp->SetParent( this );
pProps->Put( pProp, pProps->Count() );
StartListening( pProp->GetBroadcaster(), sal_True );
}
return pProp;
}
SbIfaceMapperMethod* SbModule::GetIfaceMapperMethod( const OUString& rName, SbMethod* pImplMeth )
{
SbxVariable* p = pMethods->Find( rName, SbxCLASS_METHOD );
SbIfaceMapperMethod* pMapperMethod = p ? PTR_CAST(SbIfaceMapperMethod,p) : NULL;
if( p && !pMapperMethod )
{
pMethods->Remove( p );
}
if( !pMapperMethod )
{
pMapperMethod = new SbIfaceMapperMethod( rName, pImplMeth );
pMapperMethod->SetParent( this );
pMapperMethod->SetFlags( SBX_READ );
pMethods->Put( pMapperMethod, pMethods->Count() );
}
pMapperMethod->bInvalid = sal_False;
return pMapperMethod;
}
SbIfaceMapperMethod::~SbIfaceMapperMethod()
{
}
TYPEINIT1(SbIfaceMapperMethod,SbMethod)
2010-10-06 22:33:21 +02:00
// From the code generator: remove invalid entries
2000-09-18 15:18:56 +00:00
void SbModule::EndDefinitions( sal_Bool bNewState )
2000-09-18 15:18:56 +00:00
{
for( sal_uInt16 i = 0; i < pMethods->Count(); )
2000-09-18 15:18:56 +00:00
{
SbMethod* p = PTR_CAST(SbMethod,pMethods->Get( i ) );
if( p )
{
if( p->bInvalid )
{
2000-09-18 15:18:56 +00:00
pMethods->Remove( p );
}
2000-09-18 15:18:56 +00:00
else
{
p->bInvalid = bNewState;
i++;
}
}
else
i++;
2000-09-18 15:18:56 +00:00
}
SetModified( sal_True );
2000-09-18 15:18:56 +00:00
}
void SbModule::Clear()
{
delete pImage; pImage = NULL;
if( pClassData )
pClassData->clear();
2000-09-18 15:18:56 +00:00
SbxObject::Clear();
}
SbxVariable* SbModule::Find( const OUString& rName, SbxClassType t )
{
// make sure a search in an uninstatiated class module will fail
SbxVariable* pRes = SbxObject::Find( rName, t );
if ( bIsProxyModule && !GetSbData()->bRunInit )
{
return NULL;
}
if( !pRes && pImage )
{
2012-01-15 16:15:08 +01:00
SbiInstance* pInst = GetSbData()->pInst;
if( pInst && pInst->IsCompatibility() )
{
// Put enum types as objects into module,
// allows MyEnum.First notation
SbxArrayRef xArray = pImage->GetEnums();
if( xArray.Is() )
{
SbxVariable* pEnumVar = xArray->Find( rName, SbxCLASS_DONTCARE );
SbxObject* pEnumObject = PTR_CAST( SbxObject, pEnumVar );
if( pEnumObject )
{
bool bPrivate = pEnumObject->IsSet( SBX_PRIVATE );
OUString aEnumName = pEnumObject->GetName();
pRes = new SbxVariable( SbxOBJECT );
pRes->SetName( aEnumName );
pRes->SetParent( this );
pRes->SetFlag( SBX_READ );
if( bPrivate )
{
pRes->SetFlag( SBX_PRIVATE );
}
pRes->PutObject( pEnumObject );
}
}
}
}
return pRes;
}
const OUString& SbModule::GetSource32() const
{
return aOUSource;
}
const OUString& SbModule::GetSource() const
2000-09-18 15:18:56 +00:00
{
static OUString aRetStr;
aRetStr = aOUSource;
return aRetStr;
2000-09-18 15:18:56 +00:00
}
2010-10-06 22:33:21 +02:00
// Parent and BASIC are one!
2000-09-18 15:18:56 +00:00
void SbModule::SetParent( SbxObject* p )
{
pParent = p;
}
void SbModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType )
{
const SbxHint* pHint = PTR_CAST(SbxHint,&rHint);
if( pHint )
{
SbxVariable* pVar = pHint->GetVar();
SbProperty* pProp = PTR_CAST(SbProperty,pVar);
SbMethod* pMeth = PTR_CAST(SbMethod,pVar);
SbProcedureProperty* pProcProperty = PTR_CAST( SbProcedureProperty, pVar );
if( pProcProperty )
{
if( pHint->GetId() == SBX_HINT_DATAWANTED )
{
OUString aProcName("Property Get ");
aProcName += pProcProperty->GetName();
SbxVariable* pMethVar = Find( aProcName, SbxCLASS_METHOD );
if( pMethVar )
{
SbxValues aVals;
aVals.eType = SbxVARIANT;
SbxArray* pArg = pVar->GetParameters();
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 Conflicts: avmedia/inc/avmedia/mediaitem.hxx avmedia/prj/build.lst avmedia/source/framework/mediaitem.cxx avmedia/source/gstreamer/gstcommon.hxx avmedia/source/gstreamer/gstframegrabber.cxx avmedia/source/gstreamer/gstframegrabber.hxx avmedia/source/gstreamer/gstmanager.cxx avmedia/source/gstreamer/gstmanager.hxx avmedia/source/gstreamer/gstplayer.cxx avmedia/source/gstreamer/gstplayer.hxx avmedia/source/gstreamer/gstuno.cxx avmedia/source/gstreamer/gstwindow.cxx avmedia/source/gstreamer/gstwindow.hxx avmedia/source/gstreamer/makefile.mk avmedia/source/quicktime/quicktimeuno.cxx avmedia/source/viewer/mediawindow.cxx avmedia/source/viewer/mediawindow_impl.cxx avmedia/source/viewer/mediawindow_impl.hxx avmedia/source/viewer/mediawindowbase_impl.cxx avmedia/source/win/winuno.cxx basic/inc/basic/basmgr.hxx basic/inc/basic/mybasic.hxx basic/inc/basic/process.hxx basic/inc/basic/sbmeth.hxx basic/inc/basic/sbmod.hxx basic/inc/basic/sbxdef.hxx basic/inc/basic/sbxvar.hxx basic/source/app/app.cxx basic/source/app/app.hxx basic/source/app/appbased.cxx basic/source/app/appedit.cxx basic/source/app/appwin.cxx basic/source/app/appwin.hxx basic/source/app/brkpnts.cxx basic/source/app/brkpnts.hxx basic/source/app/dialogs.cxx basic/source/app/dialogs.hxx basic/source/app/msgedit.cxx basic/source/app/mybasic.cxx basic/source/app/process.cxx basic/source/app/processw.hxx basic/source/app/textedit.cxx basic/source/basmgr/basicmanagerrepository.cxx basic/source/basmgr/basmgr.cxx basic/source/classes/disas.cxx basic/source/classes/eventatt.cxx basic/source/classes/image.cxx basic/source/classes/sb.cxx basic/source/classes/sbunoobj.cxx basic/source/classes/sbxmod.cxx basic/source/comp/codegen.cxx basic/source/comp/dim.cxx basic/source/comp/exprgen.cxx basic/source/comp/exprnode.cxx basic/source/comp/exprtree.cxx basic/source/comp/sbcomp.cxx basic/source/inc/expr.hxx basic/source/inc/object.hxx basic/source/inc/sbunoobj.hxx basic/source/runtime/dllmgr-x86.cxx basic/source/runtime/iosys.cxx basic/source/runtime/makefile.mk basic/source/runtime/methods.cxx basic/source/runtime/methods1.cxx basic/source/runtime/runtime.cxx basic/source/runtime/stdobj.cxx basic/source/runtime/step0.cxx basic/source/runtime/step1.cxx basic/source/runtime/step2.cxx basic/source/sbx/sbxarray.cxx basic/source/sbx/sbxbase.cxx basic/source/sbx/sbxbool.cxx basic/source/sbx/sbxbyte.cxx basic/source/sbx/sbxcoll.cxx basic/source/sbx/sbxconv.hxx basic/source/sbx/sbxcurr.cxx basic/source/sbx/sbxexec.cxx basic/source/sbx/sbxint.cxx basic/source/sbx/sbxobj.cxx basic/source/sbx/sbxscan.cxx basic/source/sbx/sbxstr.cxx basic/source/sbx/sbxvals.cxx basic/source/sbx/sbxvalue.cxx basic/source/sbx/sbxvar.cxx basic/workben/mgrtest.cxx configmgr/prj/build.lst configmgr/source/access.cxx configmgr/source/configurationprovider.cxx configmgr/source/defaultprovider.cxx configmgr/source/pad.cxx configmgr/source/services.cxx configmgr/source/update.cxx configmgr/source/xmlreader.cxx configmgr/source/xmlreader.hxx connectivity/prj/build.lst connectivity/qa/complex/connectivity/TestCase.java connectivity/source/cpool/Zregistration.cxx connectivity/source/drivers/adabas/Bservices.cxx connectivity/source/drivers/ado/Aservices.cxx connectivity/source/drivers/calc/Cservices.cxx connectivity/source/drivers/calc/makefile.mk connectivity/source/drivers/dbase/DIndex.cxx connectivity/source/drivers/dbase/DIndexIter.cxx connectivity/source/drivers/dbase/DNoException.cxx connectivity/source/drivers/dbase/DTable.cxx connectivity/source/drivers/dbase/Dservices.cxx connectivity/source/drivers/dbase/dindexnode.cxx connectivity/source/drivers/evoab/LNoException.cxx connectivity/source/drivers/evoab/LServices.cxx connectivity/source/drivers/evoab2/NServices.cxx connectivity/source/drivers/file/FNoException.cxx connectivity/source/drivers/file/FPreparedStatement.cxx connectivity/source/drivers/file/FResultSet.cxx connectivity/source/drivers/file/FStatement.cxx connectivity/source/drivers/file/quotedstring.cxx connectivity/source/drivers/flat/ETable.cxx connectivity/source/drivers/flat/Eservices.cxx connectivity/source/drivers/hsqldb/Hservices.cxx connectivity/source/drivers/jdbc/jservices.cxx connectivity/source/drivers/kab/KServices.cxx connectivity/source/drivers/macab/MacabServices.cxx connectivity/source/drivers/mozab/MResultSet.cxx connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx connectivity/source/drivers/mysql/Yservices.cxx connectivity/source/drivers/odbc/OFunctions.cxx connectivity/source/drivers/odbc/oservices.cxx connectivity/source/inc/dbase/DIndexPage.hxx connectivity/source/inc/file/FTable.hxx connectivity/source/manager/mregistration.cxx connectivity/source/parse/PColumn.cxx desktop/prj/build.lst desktop/qa/deployment_misc/test_dp_version.cxx desktop/source/app/app.cxx desktop/source/app/appfirststart.cxx desktop/source/app/cmdlineargs.cxx desktop/source/app/cmdlineargs.hxx desktop/source/app/sofficemain.cxx desktop/source/deployment/gui/dp_gui.hrc desktop/source/deployment/gui/dp_gui_dialog2.cxx desktop/source/deployment/gui/dp_gui_dialog2.hxx desktop/source/deployment/gui/dp_gui_updatedialog.cxx desktop/source/deployment/gui/dp_gui_updatedialog.hxx desktop/source/deployment/manager/dp_extensionmanager.cxx desktop/source/deployment/manager/dp_extensionmanager.hxx desktop/source/deployment/misc/dp_misc.src desktop/source/deployment/registry/component/dp_component.cxx desktop/source/deployment/registry/configuration/dp_configuration.cxx desktop/source/deployment/registry/dp_backend.cxx desktop/source/deployment/registry/help/dp_help.cxx desktop/source/deployment/registry/script/dp_script.cxx desktop/source/migration/pages.cxx desktop/source/migration/pages.hxx desktop/source/migration/wizard.cxx desktop/source/migration/wizard.hrc desktop/source/migration/wizard.hxx desktop/source/migration/wizard.src desktop/source/pkgchk/unopkg/unopkg_shared.h desktop/source/so_comp/services.cxx desktop/source/splash/makefile.mk desktop/source/splash/services_spl.cxx desktop/source/splash/splash.cxx drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx editeng/inc/editeng/adjitem.hxx editeng/inc/editeng/bolnitem.hxx editeng/inc/editeng/borderline.hxx editeng/inc/editeng/boxitem.hxx editeng/inc/editeng/brkitem.hxx editeng/inc/editeng/brshitem.hxx editeng/inc/editeng/bulitem.hxx editeng/inc/editeng/charreliefitem.hxx editeng/inc/editeng/charrotateitem.hxx editeng/inc/editeng/charscaleitem.hxx editeng/inc/editeng/cmapitem.hxx editeng/inc/editeng/colritem.hxx editeng/inc/editeng/crsditem.hxx editeng/inc/editeng/editdata.hxx editeng/inc/editeng/editeng.hxx editeng/inc/editeng/editobj.hxx editeng/inc/editeng/editstat.hxx editeng/inc/editeng/editview.hxx editeng/inc/editeng/emphitem.hxx editeng/inc/editeng/escpitem.hxx editeng/inc/editeng/fhgtitem.hxx editeng/inc/editeng/flstitem.hxx editeng/inc/editeng/fontitem.hxx editeng/inc/editeng/frmdiritem.hxx editeng/inc/editeng/fwdtitem.hxx editeng/inc/editeng/hyznitem.hxx editeng/inc/editeng/kernitem.hxx editeng/inc/editeng/langitem.hxx editeng/inc/editeng/lrspitem.hxx editeng/inc/editeng/lspcitem.hxx editeng/inc/editeng/numitem.hxx editeng/inc/editeng/outliner.hxx editeng/inc/editeng/paravertalignitem.hxx editeng/inc/editeng/pmdlitem.hxx editeng/inc/editeng/postitem.hxx editeng/inc/editeng/protitem.hxx editeng/inc/editeng/shaditem.hxx editeng/inc/editeng/sizeitem.hxx editeng/inc/editeng/svxacorr.hxx editeng/inc/editeng/svxfont.hxx editeng/inc/editeng/svxrtf.hxx editeng/inc/editeng/swafopt.hxx editeng/inc/editeng/tstpitem.hxx editeng/inc/editeng/twolinesitem.hxx editeng/inc/editeng/txtrange.hxx editeng/inc/editeng/udlnitem.hxx editeng/inc/editeng/ulspitem.hxx editeng/inc/editeng/wghtitem.hxx editeng/inc/editeng/writingmodeitem.hxx editeng/inc/editeng/xmlcnitm.hxx editeng/inc/helpid.hrc editeng/inc/pch/precompiled_editeng.hxx editeng/source/editeng/editdbg.cxx editeng/source/editeng/editdoc.cxx editeng/source/editeng/editdoc.hxx editeng/source/editeng/editdoc2.cxx editeng/source/editeng/editeng.cxx editeng/source/editeng/editobj.cxx editeng/source/editeng/editobj2.hxx editeng/source/editeng/editsel.cxx editeng/source/editeng/editundo.cxx editeng/source/editeng/editundo.hxx editeng/source/editeng/editview.cxx editeng/source/editeng/edtspell.hxx editeng/source/editeng/eehtml.cxx editeng/source/editeng/eehtml.hxx editeng/source/editeng/eeobj.cxx editeng/source/editeng/eerdll.cxx editeng/source/editeng/eertfpar.cxx editeng/source/editeng/impedit.cxx editeng/source/editeng/impedit.hxx editeng/source/editeng/impedit2.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/editeng/impedit5.cxx editeng/source/editeng/makefile.mk editeng/source/items/bulitem.cxx editeng/source/items/charhiddenitem.cxx editeng/source/items/flditem.cxx editeng/source/items/frmitems.cxx editeng/source/items/makefile.mk editeng/source/items/numitem.cxx editeng/source/items/paraitem.cxx editeng/source/items/svxfont.cxx editeng/source/items/textitem.cxx editeng/source/items/writingmodeitem.cxx editeng/source/items/xmlcnitm.cxx editeng/source/misc/SvXMLAutoCorrectImport.cxx editeng/source/misc/svxacorr.cxx editeng/source/misc/txtrange.cxx editeng/source/misc/unolingu.cxx editeng/source/outliner/outleeng.cxx editeng/source/outliner/outliner.cxx editeng/source/outliner/outlundo.hxx editeng/source/outliner/outlvw.cxx editeng/source/outliner/paralist.cxx editeng/source/outliner/paralist.hxx editeng/source/rtf/rtfgrf.cxx editeng/source/rtf/rtfitem.cxx editeng/source/rtf/svxrtf.cxx editeng/source/uno/unoipset.cxx editeng/util/makefile.mk embeddedobj/prj/build.lst embeddedobj/source/commonembedding/miscobj.cxx eventattacher/prj/build.lst fileaccess/source/FileAccess.cxx formula/inc/formula/FormulaCompiler.hxx formula/inc/formula/token.hxx formula/inc/formula/tokenarray.hxx formula/source/core/api/FormulaCompiler.cxx formula/source/core/api/token.cxx formula/source/ui/dlg/FormulaHelper.cxx formula/source/ui/dlg/formula.cxx formula/source/ui/dlg/parawin.cxx formula/source/ui/dlg/structpg.cxx fpicker/prj/d.lst fpicker/source/aqua/FPentry.cxx fpicker/source/office/OfficeControlAccess.cxx fpicker/source/office/iodlg.cxx fpicker/source/office/iodlg.hxx fpicker/source/office/iodlg.src fpicker/source/office/iodlgimp.cxx fpicker/source/unx/gnome/FPentry.cxx fpicker/source/unx/gnome/SalGtkFilePicker.cxx fpicker/source/unx/gnome/SalGtkPicker.cxx fpicker/source/unx/kde4/KDE4FPEntry.cxx fpicker/source/win32/filepicker/FPentry.cxx framework/AllLangResTarget_fwe.mk framework/inc/dispatch/interaction.hxx framework/inc/framework/addonmenu.hxx framework/inc/framework/addonsoptions.hxx framework/inc/framework/bmkmenu.hxx framework/inc/framework/imageproducer.hxx framework/inc/framework/sfxhelperfunctions.hxx framework/inc/framework/statusbarconfiguration.hxx framework/inc/framework/titlehelper.hxx framework/inc/framework/toolboxconfiguration.hxx framework/inc/threadhelp/lockhelper.hxx framework/inc/xml/eventsdocumenthandler.hxx framework/inc/xml/statusbardocumenthandler.hxx framework/inc/xml/toolboxconfiguration.hxx framework/inc/xml/toolboxconfigurationdefines.hxx framework/inc/xml/toolboxdocumenthandler.hxx framework/prj/build.lst framework/qa/complex/ModuleManager/makefile.mk framework/qa/complex/accelerators/makefile.mk framework/qa/complex/framework/recovery/makefile.mk framework/qa/complex/imageManager/_XInitialization.java framework/source/classes/menumanager.cxx framework/source/dispatch/interaction.cxx framework/source/fwe/classes/bmkmenu.cxx framework/source/fwe/helper/actiontriggerhelper.cxx framework/source/fwe/helper/imageproducer.cxx framework/source/fwe/xml/menuconfiguration.cxx framework/source/fwe/xml/toolboxdocumenthandler.cxx framework/source/helper/uiconfigelementwrapperbase.cxx framework/source/helper/uielementwrapperbase.cxx framework/source/inc/pattern/window.hxx framework/source/jobs/jobdata.cxx framework/source/layoutmanager/layoutmanager.cxx framework/source/layoutmanager/panel.hxx framework/source/loadenv/loadenv.cxx framework/source/register/registerservices.cxx framework/source/services/menudocumenthandler.cxx framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx framework/source/uiconfiguration/uiconfigurationmanager.cxx framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx framework/source/uielement/addonstoolbarmanager.cxx framework/source/uielement/controlmenucontroller.cxx framework/source/uielement/fontsizemenucontroller.cxx framework/source/uielement/imagebuttontoolbarcontroller.cxx framework/source/uielement/macrosmenucontroller.cxx framework/source/uielement/menubarmanager.cxx framework/source/uielement/newmenucontroller.cxx framework/source/uielement/togglebuttontoolbarcontroller.cxx framework/source/uielement/toolbarmanager.cxx framework/source/uielement/toolbarsmenucontroller.cxx framework/test/makefile.mk framework/test/threadtest/makefile.mk framework/test/typecfg/makefile.mk framework/util/guiapps/makefile.mk framework/util/makefile.mk idl/inc/bastype.hxx idl/inc/hash.hxx idl/inc/lex.hxx idl/inc/module.hxx idl/inc/object.hxx idl/inc/slot.hxx idl/inc/types.hxx idl/source/cmptools/hash.cxx idl/source/cmptools/lex.cxx idl/source/objects/basobj.cxx idl/source/objects/bastype.cxx idl/source/objects/module.cxx idl/source/objects/object.cxx idl/source/objects/slot.cxx idl/source/objects/types.cxx idl/source/prj/command.cxx idl/source/prj/database.cxx idl/source/prj/globals.cxx idl/source/prj/svidl.cxx linguistic/inc/linguistic/misc.hxx linguistic/prj/build.lst linguistic/source/convdic.cxx linguistic/source/convdiclist.cxx linguistic/source/dicimp.cxx linguistic/source/dlistimp.cxx linguistic/source/gciterator.cxx linguistic/source/iprcache.cxx linguistic/source/lngopt.cxx linguistic/source/lngprophelp.cxx linguistic/source/lngsvcmgr.cxx linguistic/source/lngsvcmgr.hxx linguistic/source/misc2.cxx linguistic/workben/sprophelp.cxx officecfg/registry/data/org/openoffice/VCL.xcu officecfg/util/makefile.mk oovbaapi/ooo/vba/XApplicationBase.idl oovbaapi/ooo/vba/XVBAAppService.idl oovbaapi/ooo/vba/XVBADocService.idl oovbaapi/ooo/vba/excel/XApplication.idl oovbaapi/ooo/vba/excel/XRange.idl oovbaapi/ooo/vba/excel/XWorkbook.idl oovbaapi/ooo/vba/excel/XWorksheet.idl oovbaapi/ooo/vba/word/XApplication.idl oovbaapi/ooo/vba/word/XGlobals.idl oovbaapi/ooo/vba/word/XTableOfContents.idl readlicense_oo/prj/build.lst scripting/prj/build.lst scripting/prj/d.lst scripting/source/basprov/basprov.cxx scripting/source/basprov/basscript.cxx scripting/source/basprov/basscript.hxx scripting/source/dlgprov/dlgprov.cxx scripting/source/inc/util/util.hxx scripting/source/protocolhandler/scripthandler.cxx scripting/source/provider/ProviderCache.cxx scripting/source/pyprov/makefile.mk scripting/source/runtimemgr/ScriptNameResolverImpl.cxx scripting/source/runtimemgr/ScriptRuntimeManager.cxx scripting/source/runtimemgr/StorageBridge.cxx scripting/source/storage/ScriptMetadataImporter.cxx scripting/source/storage/ScriptSecurityManager.cxx scripting/source/storage/ScriptStorage.cxx scripting/source/storage/ScriptStorageManager.cxx sfx2/inc/about.hxx sfx2/inc/brokenpackageint.hxx sfx2/inc/docvor.hxx sfx2/inc/pch/precompiled_sfx2.hxx sfx2/inc/sfx2/app.hxx sfx2/inc/sfx2/basmgr.hxx sfx2/inc/sfx2/bindings.hxx sfx2/inc/sfx2/childwin.hxx sfx2/inc/sfx2/ctrlitem.hxx sfx2/inc/sfx2/dinfdlg.hxx sfx2/inc/sfx2/dispatch.hxx sfx2/inc/sfx2/docfilt.hxx sfx2/inc/sfx2/evntconf.hxx sfx2/inc/sfx2/fcontnr.hxx sfx2/inc/sfx2/frame.hxx sfx2/inc/sfx2/imagemgr.hxx sfx2/inc/sfx2/imgmgr.hxx sfx2/inc/sfx2/linksrc.hxx sfx2/inc/sfx2/macrconf.hxx sfx2/inc/sfx2/macropg.hxx sfx2/inc/sfx2/mnuitem.hxx sfx2/inc/sfx2/mnumgr.hxx sfx2/inc/sfx2/module.hxx sfx2/inc/sfx2/msg.hxx sfx2/inc/sfx2/objsh.hxx sfx2/inc/sfx2/passwd.hxx sfx2/inc/sfx2/prnmon.hxx sfx2/inc/sfx2/request.hxx sfx2/inc/sfx2/sfx.hrc sfx2/inc/sfx2/sfxbasemodel.hxx sfx2/inc/sfx2/sfxhtml.hxx sfx2/inc/sfx2/sfxresid.hxx sfx2/inc/sfx2/sfxsids.hrc sfx2/inc/sfx2/sfxuno.hxx sfx2/inc/sfx2/shell.hxx sfx2/inc/sfx2/stbitem.hxx sfx2/inc/sfx2/styfitem.hxx sfx2/inc/sfx2/tabdlg.hxx sfx2/inc/sfx2/tbxctrl.hxx sfx2/inc/sfx2/tplpitem.hxx sfx2/inc/sfx2/viewfrm.hxx sfx2/inc/sfx2/viewsh.hxx sfx2/inc/sfxbasic.hxx sfx2/inc/sorgitm.hxx sfx2/prj/build.lst sfx2/qa/complex/docinfo/makefile.mk sfx2/qa/cppunit/makefile.mk sfx2/sdi/makefile.mk sfx2/source/appl/app.cxx sfx2/source/appl/app.hrc sfx2/source/appl/app.src sfx2/source/appl/appbas.cxx sfx2/source/appl/appcfg.cxx sfx2/source/appl/appchild.cxx sfx2/source/appl/appmain.cxx sfx2/source/appl/appmisc.cxx sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/appl/appuno.cxx sfx2/source/appl/childwin.cxx sfx2/source/appl/fileobj.cxx sfx2/source/appl/helpinterceptor.cxx sfx2/source/appl/imagemgr.cxx sfx2/source/appl/impldde.cxx sfx2/source/appl/impldde.hxx sfx2/source/appl/linkmgr2.cxx sfx2/source/appl/lnkbase2.cxx sfx2/source/appl/makefile.mk sfx2/source/appl/module.cxx sfx2/source/appl/newhelp.cxx sfx2/source/appl/opengrf.cxx sfx2/source/appl/sfxdll.cxx sfx2/source/appl/sfxhelp.cxx sfx2/source/appl/shutdownicon.cxx sfx2/source/appl/shutdowniconunx.cxx sfx2/source/appl/workwin.cxx sfx2/source/bastyp/fltfnc.cxx sfx2/source/bastyp/frmhtml.cxx sfx2/source/bastyp/frmhtmlw.cxx sfx2/source/bastyp/helper.cxx sfx2/source/bastyp/minarray.cxx sfx2/source/bastyp/progress.cxx sfx2/source/bastyp/sfxhtml.cxx sfx2/source/config/evntconf.cxx sfx2/source/control/bindings.cxx sfx2/source/control/ctrlitem.cxx sfx2/source/control/dispatch.cxx sfx2/source/control/macrconf.cxx sfx2/source/control/macro.cxx sfx2/source/control/makefile.mk sfx2/source/control/minfitem.cxx sfx2/source/control/msg.cxx sfx2/source/control/msgpool.cxx sfx2/source/control/objface.cxx sfx2/source/control/request.cxx sfx2/source/control/shell.cxx sfx2/source/control/sorgitm.cxx sfx2/source/dialog/about.cxx sfx2/source/dialog/basedlgs.cxx sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dinfedt.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/dialog/filedlghelper.cxx sfx2/source/dialog/mailmodel.cxx sfx2/source/dialog/mailmodelapi.cxx sfx2/source/dialog/makefile.mk sfx2/source/dialog/mgetempl.cxx sfx2/source/dialog/passwd.cxx sfx2/source/dialog/passwd.hrc sfx2/source/dialog/printopt.cxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/splitwin.cxx sfx2/source/dialog/styfitem.cxx sfx2/source/dialog/tabdlg.cxx sfx2/source/dialog/taskpane.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/dialog/tplpitem.cxx sfx2/source/dialog/versdlg.cxx sfx2/source/doc/QuerySaveDocument.cxx sfx2/source/doc/SfxDocumentMetaData.cxx sfx2/source/doc/applet.cxx sfx2/source/doc/doc.hrc sfx2/source/doc/doc.src sfx2/source/doc/docfile.cxx sfx2/source/doc/docinf.cxx sfx2/source/doc/doctempl.cxx sfx2/source/doc/doctemplates.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/doc/makefile.mk sfx2/source/doc/objcont.cxx sfx2/source/doc/objitem.cxx sfx2/source/doc/objmisc.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/printhelper.cxx sfx2/source/doc/sfxacldetect.cxx sfx2/source/doc/sfxbasemodel.cxx sfx2/source/inc/applet.hxx sfx2/source/inc/fltoptint.hxx sfx2/source/inc/sfxlocal.hrc sfx2/source/inc/virtmenu.hxx sfx2/source/inc/workwin.hxx sfx2/source/menu/mnuitem.cxx sfx2/source/menu/objmnctl.cxx sfx2/source/menu/virtmenu.cxx sfx2/source/notify/eventsupplier.cxx sfx2/source/notify/makefile.mk sfx2/source/toolbox/imgmgr.cxx sfx2/source/toolbox/tbxitem.cxx sfx2/source/view/frame.cxx sfx2/source/view/orgmgr.cxx sfx2/source/view/printer.cxx sfx2/source/view/prnmon.cxx sfx2/source/view/viewfrm.cxx sfx2/source/view/viewprn.cxx sfx2/source/view/viewsh.cxx sfx2/util/makefile.mk sfx2/workben/custompanel/makefile.mk shell/source/backends/desktopbe/desktopbackend.cxx shell/source/backends/gconfbe/gconfbackend.cxx shell/source/backends/kde4be/kde4backend.cxx shell/source/backends/kdebe/kdebackend.cxx shell/source/win32/SysShentry.cxx shell/source/win32/shlxthandler/propsheets/propsheets.cxx shell/source/win32/simplemail/smplmailentry.cxx svx/inc/float3d.hrc svx/inc/fmhelp.hrc svx/inc/globlmn_tmpl.hrc svx/inc/helpid.hrc svx/inc/pch/precompiled_svx.hxx svx/inc/sjctrl.hxx svx/inc/srchitem.hxx svx/inc/svdibrow.hxx svx/inc/svx/SmartTagItem.hxx svx/inc/svx/algitem.hxx svx/inc/svx/camera3d.hxx svx/inc/svx/chrtitem.hxx svx/inc/svx/clipfmtitem.hxx svx/inc/svx/ctredlin.hxx svx/inc/svx/dbtoolsclient.hxx svx/inc/svx/deflt3d.hxx svx/inc/svx/dialogs.hrc svx/inc/svx/drawitem.hxx svx/inc/svx/e3ditem.hxx svx/inc/svx/extrud3d.hxx svx/inc/svx/flagsdef.hxx svx/inc/svx/float3d.hxx svx/inc/svx/frmsel.hxx svx/inc/svx/gallery.hxx svx/inc/svx/gallery1.hxx svx/inc/svx/galtheme.hxx svx/inc/svx/grfcrop.hxx svx/inc/svx/hdft.hxx svx/inc/svx/hlnkitem.hxx svx/inc/svx/hyprlink.hxx svx/inc/svx/itemwin.hxx svx/inc/svx/lathe3d.hxx svx/inc/svx/linkwarn.hxx svx/inc/svx/modctrl.hxx svx/inc/svx/msdffdef.hxx svx/inc/svx/obj3d.hxx svx/inc/svx/optgenrl.hxx svx/inc/svx/optgrid.hxx svx/inc/svx/pageitem.hxx svx/inc/svx/paraprev.hxx svx/inc/svx/postattr.hxx svx/inc/svx/rotmodit.hxx svx/inc/svx/ruler.hxx svx/inc/svx/rulritem.hxx svx/inc/svx/scene3d.hxx svx/inc/svx/sdasaitm.hxx svx/inc/svx/sdasitm.hxx svx/inc/svx/sdggaitm.hxx svx/inc/svx/sdmetitm.hxx svx/inc/svx/sdtaaitm.hxx svx/inc/svx/sdtaditm.hxx svx/inc/svx/sdtaitm.hxx svx/inc/svx/sdtakitm.hxx svx/inc/svx/sdtfchim.hxx svx/inc/svx/sdtfsitm.hxx svx/inc/svx/srchdlg.hxx svx/inc/svx/svddrag.hxx svx/inc/svx/svdetc.hxx svx/inc/svx/svdglue.hxx svx/inc/svx/svdhlpln.hxx svx/inc/svx/svdlayer.hxx svx/inc/svx/svdmark.hxx svx/inc/svx/svdmodel.hxx svx/inc/svx/svdoashp.hxx svx/inc/svx/svdobj.hxx svx/inc/svx/svdocirc.hxx svx/inc/svx/svdoedge.hxx svx/inc/svx/svdogrp.hxx svx/inc/svx/svdomeas.hxx svx/inc/svx/svdoole2.hxx svx/inc/svx/svdorect.hxx svx/inc/svx/svdotable.hxx svx/inc/svx/svdotext.hxx svx/inc/svx/svdovirt.hxx svx/inc/svx/svdpage.hxx svx/inc/svx/svdsnpv.hxx svx/inc/svx/svdtrans.hxx svx/inc/svx/svdundo.hxx svx/inc/svx/svimbase.hxx svx/inc/svx/svx3ditems.hxx svx/inc/svx/svxdlg.hxx svx/inc/svx/sxcikitm.hxx svx/inc/svx/sxekitm.hxx svx/inc/svx/sxelditm.hxx svx/inc/svx/sxenditm.hxx svx/inc/svx/sxmkitm.hxx svx/inc/svx/sxmtpitm.hxx svx/inc/svx/sxmuitm.hxx svx/inc/svx/tabarea.hxx svx/inc/svx/tabline.hxx svx/inc/svx/unoprov.hxx svx/inc/svx/viewlayoutitem.hxx svx/inc/svx/xbitmap.hxx svx/inc/svx/xbtmpit.hxx svx/inc/svx/xcolit.hxx svx/inc/svx/xfillit0.hxx svx/inc/svx/xflclit.hxx svx/inc/svx/xflftrit.hxx svx/inc/svx/xflgrit.hxx svx/inc/svx/xflhtit.hxx svx/inc/svx/xftadit.hxx svx/inc/svx/xftsfit.hxx svx/inc/svx/xftshit.hxx svx/inc/svx/xlineit0.hxx svx/inc/svx/xlinjoit.hxx svx/inc/svx/xlnclit.hxx svx/inc/svx/xlndsit.hxx svx/inc/svx/xlnedcit.hxx svx/inc/svx/xlnedit.hxx svx/inc/svx/xlnedwit.hxx svx/inc/svx/xlnstcit.hxx svx/inc/svx/xlnstit.hxx svx/inc/svx/xlnstwit.hxx svx/inc/svx/xlnwtit.hxx svx/inc/svx/xtextit0.hxx svx/inc/svx/zoomitem.hxx svx/inc/svx/zoomslideritem.hxx svx/inc/xpolyimp.hxx svx/inc/zoom_def.hxx svx/prj/d.lst svx/source/accessibility/AccessibleShape.cxx svx/source/accessibility/DescriptionGenerator.cxx svx/source/customshapes/EnhancedCustomShapeEngine.cxx svx/source/customshapes/EnhancedCustomShapeFontWork.cxx svx/source/dialog/_bmpmask.cxx svx/source/dialog/_contdlg.cxx svx/source/dialog/connctrl.cxx svx/source/dialog/contwnd.cxx svx/source/dialog/ctredlin.cxx svx/source/dialog/ctredlin.hrc svx/source/dialog/ctredlin.src svx/source/dialog/dialcontrol.cxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/docrecovery.cxx svx/source/dialog/fntctrl.cxx svx/source/dialog/fontwork.cxx svx/source/dialog/frmsel.cxx svx/source/dialog/graphctl.cxx svx/source/dialog/grfflt.cxx svx/source/dialog/hdft.cxx svx/source/dialog/hyperdlg.cxx svx/source/dialog/hyprdlg.hxx svx/source/dialog/hyprlink.cxx svx/source/dialog/hyprlink.hxx svx/source/dialog/hyprlink.src svx/source/dialog/imapdlg.cxx svx/source/dialog/imapwnd.cxx svx/source/dialog/linkwarn.hrc svx/source/dialog/makefile.mk svx/source/dialog/optgrid.cxx svx/source/dialog/orienthelper.cxx svx/source/dialog/pagectrl.cxx svx/source/dialog/prtqry.cxx svx/source/dialog/rlrcitem.cxx svx/source/dialog/rubydialog.cxx svx/source/dialog/rulritem.cxx svx/source/dialog/simptabl.cxx svx/source/dialog/srchdlg.cxx svx/source/dialog/svxbmpnumvalueset.cxx svx/source/dialog/svxruler.cxx svx/source/dialog/swframeexample.cxx svx/source/engine3d/float3d.cxx svx/source/engine3d/float3d.src svx/source/engine3d/svx3ditems.cxx svx/source/fmcomp/gridctrl.cxx svx/source/fmcomp/trace.cxx svx/source/form/ParseContext.cxx svx/source/form/datanavi.cxx svx/source/form/filtnav.cxx svx/source/form/fmexch.cxx svx/source/form/fmexpl.cxx svx/source/form/fmobjfac.cxx svx/source/form/fmpage.cxx svx/source/form/fmshell.cxx svx/source/form/fmshimp.cxx svx/source/form/fmsrcimp.cxx svx/source/form/fmvwimp.cxx svx/source/form/makefile.mk svx/source/form/tabwin.cxx svx/source/form/tbxform.cxx svx/source/form/typemap.cxx svx/source/gallery2/galbrws1.cxx svx/source/gallery2/galbrws2.cxx svx/source/gallery2/galexpl.cxx svx/source/gallery2/gallery1.cxx svx/source/gallery2/galtheme.cxx svx/source/gallery2/makefile.mk svx/source/gengal/gengal.cxx svx/source/gengal/makefile.mk svx/source/inc/fmgroup.hxx svx/source/intro/about_ooo.hrc svx/source/intro/iso.src svx/source/intro/ooo.src svx/source/items/SmartTagItem.cxx svx/source/items/algitem.cxx svx/source/items/chrtitem.cxx svx/source/items/clipfmtitem.cxx svx/source/items/customshapeitem.cxx svx/source/items/drawitem.cxx svx/source/items/e3ditem.cxx svx/source/items/grfitem.cxx svx/source/items/hlnkitem.cxx svx/source/items/makefile.mk svx/source/items/pageitem.cxx svx/source/items/rotmodit.cxx svx/source/items/viewlayoutitem.cxx svx/source/items/zoomitem.cxx svx/source/items/zoomslideritem.cxx svx/source/src/app.hrc svx/source/stbctrls/makefile.mk svx/source/stbctrls/modctrl.cxx svx/source/stbctrls/xmlsecctrl.cxx svx/source/stbctrls/zoomctrl.cxx svx/source/svdraw/clonelist.cxx svx/source/svdraw/svdattr.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdedtv2.cxx svx/source/svdraw/svdedxv.cxx svx/source/svdraw/svdetc.cxx svx/source/svdraw/svdfmtf.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdglue.cxx svx/source/svdraw/svdhdl.cxx svx/source/svdraw/svdhlpln.cxx svx/source/svdraw/svdibrow.cxx svx/source/svdraw/svdlayer.cxx svx/source/svdraw/svdmodel.cxx svx/source/svdraw/svdoashp.cxx svx/source/svdraw/svdobj.cxx svx/source/svdraw/svdocapt.cxx svx/source/svdraw/svdocirc.cxx svx/source/svdraw/svdoedge.cxx svx/source/svdraw/svdograf.cxx svx/source/svdraw/svdogrp.cxx svx/source/svdraw/svdomeas.cxx svx/source/svdraw/svdomedia.cxx svx/source/svdraw/svdopath.cxx svx/source/svdraw/svdotext.cxx svx/source/svdraw/svdotxdr.cxx svx/source/svdraw/svdotxed.cxx svx/source/svdraw/svdotxfl.cxx svx/source/svdraw/svdotxln.cxx svx/source/svdraw/svdotxtr.cxx svx/source/svdraw/svdoutl.cxx svx/source/svdraw/svdpage.cxx svx/source/svdraw/svdpagv.cxx svx/source/svdraw/svdpntv.cxx svx/source/svdraw/svdpoev.cxx svx/source/svdraw/svdsnpv.cxx svx/source/svdraw/svdstr.src svx/source/svdraw/svdtrans.cxx svx/source/svdraw/svdundo.cxx svx/source/svdraw/svdview.cxx svx/source/svdraw/svdxcgv.cxx svx/source/table/svdotable.cxx svx/source/tbxctrls/colorwindow.hxx svx/source/tbxctrls/extrusioncontrols.cxx svx/source/tbxctrls/fillctrl.cxx svx/source/tbxctrls/grafctrl.cxx svx/source/tbxctrls/itemwin.cxx svx/source/tbxctrls/layctrl.cxx svx/source/tbxctrls/lboxctrl.cxx svx/source/tbxctrls/linectrl.cxx svx/source/tbxctrls/tbcontrl.cxx svx/source/tbxctrls/verttexttbxctrl.cxx svx/source/unodraw/unomod.cxx svx/source/unodraw/unopage.cxx svx/source/unodraw/unoprov.cxx svx/source/unodraw/unoshape.cxx svx/source/unodraw/unoshtxt.cxx svx/source/xml/xmlxtexp.cxx svx/source/xoutdev/_xpoly.cxx svx/source/xoutdev/xattr.cxx svx/source/xoutdev/xattr2.cxx svx/source/xoutdev/xattrbmp.cxx svx/source/xoutdev/xtabcolr.cxx svx/util/makefile.mk svx/workben/edittest.cxx sysui/desktop/productversion.mk ucb/prj/build.lst ucb/source/cacher/cacheserv.cxx ucb/source/core/ucb1.component ucb/source/core/ucbserv.cxx ucb/source/core/ucbstore.cxx ucb/source/core/ucbstore.hxx ucb/source/sorter/sortmain.cxx ucb/source/ucp/file/prov.cxx ucb/source/ucp/file/shell.cxx ucb/source/ucp/ftp/ftpservices.cxx ucb/source/ucp/gio/gio_provider.cxx ucb/source/ucp/gvfs/gvfs_provider.cxx ucb/source/ucp/hierarchy/hierarchyservices.cxx ucb/source/ucp/odma/odma_lib.cxx ucb/source/ucp/odma/odma_services.cxx ucb/source/ucp/package/pkgservices.cxx ucb/source/ucp/tdoc/tdoc_services.cxx ucb/source/ucp/webdav/ContentProperties.cxx ucb/source/ucp/webdav/NeonHeadRequest.cxx ucb/source/ucp/webdav/webdavcontent.cxx ucb/source/ucp/webdav/webdavservices.cxx uui/source/iahndl.cxx uui/source/iahndl.hxx uui/source/loginerr.hxx uui/source/nameclashdlg.hxx uui/source/passcrtdlg.cxx uui/source/passworddlg.cxx uui/source/passworddlg.hxx uui/source/services.cxx vbahelper/inc/vbahelper/vbahelper.hxx vbahelper/prj/build.lst vbahelper/prj/d.lst vbahelper/source/msforms/makefile.mk vbahelper/source/msforms/vbauserform.cxx vbahelper/source/vbahelper/makefile.mk vbahelper/source/vbahelper/vbaapplicationbase.cxx vbahelper/source/vbahelper/vbacommandbarcontrol.cxx vbahelper/source/vbahelper/vbadocumentbase.cxx vbahelper/source/vbahelper/vbadocumentsbase.cxx vbahelper/source/vbahelper/vbahelper.cxx vbahelper/util/makefile.mk xmlhelp/source/cxxhelp/provider/databases.cxx xmlhelp/source/cxxhelp/provider/services.cxx xmlhelp/source/treeview/tvfactory.cxx xmloff/JunitTest_xmloff_unoapi.mk xmloff/inc/functional.hxx xmloff/inc/xmloff/formlayerexport.hxx xmloff/inc/xmloff/formlayerimport.hxx xmloff/inc/xmloff/functional.hxx xmloff/inc/xmloff/shapeimport.hxx xmloff/inc/xmloff/xmlcnitm.hxx xmloff/inc/xmloff/xmlnumfi.hxx xmloff/prj/build.lst xmloff/source/chart/SchXMLChartContext.cxx xmloff/source/chart/SchXMLExport.cxx xmloff/source/chart/SchXMLImport.cxx xmloff/source/chart/SchXMLLegendContext.hxx xmloff/source/chart/SchXMLPlotAreaContext.cxx xmloff/source/core/xmluconv.cxx xmloff/source/draw/sdxmlexp.cxx xmloff/source/draw/shapeexport4.cxx xmloff/source/draw/ximp3dobject.cxx xmloff/source/draw/ximp3dscene.cxx xmloff/source/forms/formlayerexport.cxx xmloff/source/forms/formlayerimport.cxx xmloff/source/forms/handler/vcl_time_handler.hxx xmloff/source/forms/layerimport.cxx xmloff/source/forms/layerimport.hxx xmloff/source/forms/property_meta_data.hxx xmloff/source/style/PageHeaderFooterContext.cxx xmloff/source/style/PageMasterStyleMap.cxx xmloff/source/style/prstylei.cxx xmloff/source/style/xmlimppr.cxx xmloff/source/style/xmlnumfi.cxx xmloff/source/style/xmlstyle.cxx xmloff/source/table/tabledesignsimporter.cxx xmloff/source/text/XMLTextNumRuleInfo.cxx xmloff/source/text/XMLTextShapeStyleContext.cxx xmloff/source/text/txtstyle.cxx xmloff/source/transform/ChartOOoTContext.cxx xmloff/source/transform/EventOOoTContext.cxx xmloff/source/transform/TransformerBase.cxx xmloff/util/makefile.mk xmlscript/util/xcr.component
2011-03-12 02:42:58 +01:00
sal_uInt16 nVarParCount = (pArg != NULL) ? pArg->Count() : 0;
if( nVarParCount > 1 )
{
SbxArrayRef xMethParameters = new SbxArray;
xMethParameters->Put( pMethVar, 0 ); // Method as parameter 0
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 Conflicts: avmedia/inc/avmedia/mediaitem.hxx avmedia/prj/build.lst avmedia/source/framework/mediaitem.cxx avmedia/source/gstreamer/gstcommon.hxx avmedia/source/gstreamer/gstframegrabber.cxx avmedia/source/gstreamer/gstframegrabber.hxx avmedia/source/gstreamer/gstmanager.cxx avmedia/source/gstreamer/gstmanager.hxx avmedia/source/gstreamer/gstplayer.cxx avmedia/source/gstreamer/gstplayer.hxx avmedia/source/gstreamer/gstuno.cxx avmedia/source/gstreamer/gstwindow.cxx avmedia/source/gstreamer/gstwindow.hxx avmedia/source/gstreamer/makefile.mk avmedia/source/quicktime/quicktimeuno.cxx avmedia/source/viewer/mediawindow.cxx avmedia/source/viewer/mediawindow_impl.cxx avmedia/source/viewer/mediawindow_impl.hxx avmedia/source/viewer/mediawindowbase_impl.cxx avmedia/source/win/winuno.cxx basic/inc/basic/basmgr.hxx basic/inc/basic/mybasic.hxx basic/inc/basic/process.hxx basic/inc/basic/sbmeth.hxx basic/inc/basic/sbmod.hxx basic/inc/basic/sbxdef.hxx basic/inc/basic/sbxvar.hxx basic/source/app/app.cxx basic/source/app/app.hxx basic/source/app/appbased.cxx basic/source/app/appedit.cxx basic/source/app/appwin.cxx basic/source/app/appwin.hxx basic/source/app/brkpnts.cxx basic/source/app/brkpnts.hxx basic/source/app/dialogs.cxx basic/source/app/dialogs.hxx basic/source/app/msgedit.cxx basic/source/app/mybasic.cxx basic/source/app/process.cxx basic/source/app/processw.hxx basic/source/app/textedit.cxx basic/source/basmgr/basicmanagerrepository.cxx basic/source/basmgr/basmgr.cxx basic/source/classes/disas.cxx basic/source/classes/eventatt.cxx basic/source/classes/image.cxx basic/source/classes/sb.cxx basic/source/classes/sbunoobj.cxx basic/source/classes/sbxmod.cxx basic/source/comp/codegen.cxx basic/source/comp/dim.cxx basic/source/comp/exprgen.cxx basic/source/comp/exprnode.cxx basic/source/comp/exprtree.cxx basic/source/comp/sbcomp.cxx basic/source/inc/expr.hxx basic/source/inc/object.hxx basic/source/inc/sbunoobj.hxx basic/source/runtime/dllmgr-x86.cxx basic/source/runtime/iosys.cxx basic/source/runtime/makefile.mk basic/source/runtime/methods.cxx basic/source/runtime/methods1.cxx basic/source/runtime/runtime.cxx basic/source/runtime/stdobj.cxx basic/source/runtime/step0.cxx basic/source/runtime/step1.cxx basic/source/runtime/step2.cxx basic/source/sbx/sbxarray.cxx basic/source/sbx/sbxbase.cxx basic/source/sbx/sbxbool.cxx basic/source/sbx/sbxbyte.cxx basic/source/sbx/sbxcoll.cxx basic/source/sbx/sbxconv.hxx basic/source/sbx/sbxcurr.cxx basic/source/sbx/sbxexec.cxx basic/source/sbx/sbxint.cxx basic/source/sbx/sbxobj.cxx basic/source/sbx/sbxscan.cxx basic/source/sbx/sbxstr.cxx basic/source/sbx/sbxvals.cxx basic/source/sbx/sbxvalue.cxx basic/source/sbx/sbxvar.cxx basic/workben/mgrtest.cxx configmgr/prj/build.lst configmgr/source/access.cxx configmgr/source/configurationprovider.cxx configmgr/source/defaultprovider.cxx configmgr/source/pad.cxx configmgr/source/services.cxx configmgr/source/update.cxx configmgr/source/xmlreader.cxx configmgr/source/xmlreader.hxx connectivity/prj/build.lst connectivity/qa/complex/connectivity/TestCase.java connectivity/source/cpool/Zregistration.cxx connectivity/source/drivers/adabas/Bservices.cxx connectivity/source/drivers/ado/Aservices.cxx connectivity/source/drivers/calc/Cservices.cxx connectivity/source/drivers/calc/makefile.mk connectivity/source/drivers/dbase/DIndex.cxx connectivity/source/drivers/dbase/DIndexIter.cxx connectivity/source/drivers/dbase/DNoException.cxx connectivity/source/drivers/dbase/DTable.cxx connectivity/source/drivers/dbase/Dservices.cxx connectivity/source/drivers/dbase/dindexnode.cxx connectivity/source/drivers/evoab/LNoException.cxx connectivity/source/drivers/evoab/LServices.cxx connectivity/source/drivers/evoab2/NServices.cxx connectivity/source/drivers/file/FNoException.cxx connectivity/source/drivers/file/FPreparedStatement.cxx connectivity/source/drivers/file/FResultSet.cxx connectivity/source/drivers/file/FStatement.cxx connectivity/source/drivers/file/quotedstring.cxx connectivity/source/drivers/flat/ETable.cxx connectivity/source/drivers/flat/Eservices.cxx connectivity/source/drivers/hsqldb/Hservices.cxx connectivity/source/drivers/jdbc/jservices.cxx connectivity/source/drivers/kab/KServices.cxx connectivity/source/drivers/macab/MacabServices.cxx connectivity/source/drivers/mozab/MResultSet.cxx connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx connectivity/source/drivers/mysql/Yservices.cxx connectivity/source/drivers/odbc/OFunctions.cxx connectivity/source/drivers/odbc/oservices.cxx connectivity/source/inc/dbase/DIndexPage.hxx connectivity/source/inc/file/FTable.hxx connectivity/source/manager/mregistration.cxx connectivity/source/parse/PColumn.cxx desktop/prj/build.lst desktop/qa/deployment_misc/test_dp_version.cxx desktop/source/app/app.cxx desktop/source/app/appfirststart.cxx desktop/source/app/cmdlineargs.cxx desktop/source/app/cmdlineargs.hxx desktop/source/app/sofficemain.cxx desktop/source/deployment/gui/dp_gui.hrc desktop/source/deployment/gui/dp_gui_dialog2.cxx desktop/source/deployment/gui/dp_gui_dialog2.hxx desktop/source/deployment/gui/dp_gui_updatedialog.cxx desktop/source/deployment/gui/dp_gui_updatedialog.hxx desktop/source/deployment/manager/dp_extensionmanager.cxx desktop/source/deployment/manager/dp_extensionmanager.hxx desktop/source/deployment/misc/dp_misc.src desktop/source/deployment/registry/component/dp_component.cxx desktop/source/deployment/registry/configuration/dp_configuration.cxx desktop/source/deployment/registry/dp_backend.cxx desktop/source/deployment/registry/help/dp_help.cxx desktop/source/deployment/registry/script/dp_script.cxx desktop/source/migration/pages.cxx desktop/source/migration/pages.hxx desktop/source/migration/wizard.cxx desktop/source/migration/wizard.hrc desktop/source/migration/wizard.hxx desktop/source/migration/wizard.src desktop/source/pkgchk/unopkg/unopkg_shared.h desktop/source/so_comp/services.cxx desktop/source/splash/makefile.mk desktop/source/splash/services_spl.cxx desktop/source/splash/splash.cxx drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx editeng/inc/editeng/adjitem.hxx editeng/inc/editeng/bolnitem.hxx editeng/inc/editeng/borderline.hxx editeng/inc/editeng/boxitem.hxx editeng/inc/editeng/brkitem.hxx editeng/inc/editeng/brshitem.hxx editeng/inc/editeng/bulitem.hxx editeng/inc/editeng/charreliefitem.hxx editeng/inc/editeng/charrotateitem.hxx editeng/inc/editeng/charscaleitem.hxx editeng/inc/editeng/cmapitem.hxx editeng/inc/editeng/colritem.hxx editeng/inc/editeng/crsditem.hxx editeng/inc/editeng/editdata.hxx editeng/inc/editeng/editeng.hxx editeng/inc/editeng/editobj.hxx editeng/inc/editeng/editstat.hxx editeng/inc/editeng/editview.hxx editeng/inc/editeng/emphitem.hxx editeng/inc/editeng/escpitem.hxx editeng/inc/editeng/fhgtitem.hxx editeng/inc/editeng/flstitem.hxx editeng/inc/editeng/fontitem.hxx editeng/inc/editeng/frmdiritem.hxx editeng/inc/editeng/fwdtitem.hxx editeng/inc/editeng/hyznitem.hxx editeng/inc/editeng/kernitem.hxx editeng/inc/editeng/langitem.hxx editeng/inc/editeng/lrspitem.hxx editeng/inc/editeng/lspcitem.hxx editeng/inc/editeng/numitem.hxx editeng/inc/editeng/outliner.hxx editeng/inc/editeng/paravertalignitem.hxx editeng/inc/editeng/pmdlitem.hxx editeng/inc/editeng/postitem.hxx editeng/inc/editeng/protitem.hxx editeng/inc/editeng/shaditem.hxx editeng/inc/editeng/sizeitem.hxx editeng/inc/editeng/svxacorr.hxx editeng/inc/editeng/svxfont.hxx editeng/inc/editeng/svxrtf.hxx editeng/inc/editeng/swafopt.hxx editeng/inc/editeng/tstpitem.hxx editeng/inc/editeng/twolinesitem.hxx editeng/inc/editeng/txtrange.hxx editeng/inc/editeng/udlnitem.hxx editeng/inc/editeng/ulspitem.hxx editeng/inc/editeng/wghtitem.hxx editeng/inc/editeng/writingmodeitem.hxx editeng/inc/editeng/xmlcnitm.hxx editeng/inc/helpid.hrc editeng/inc/pch/precompiled_editeng.hxx editeng/source/editeng/editdbg.cxx editeng/source/editeng/editdoc.cxx editeng/source/editeng/editdoc.hxx editeng/source/editeng/editdoc2.cxx editeng/source/editeng/editeng.cxx editeng/source/editeng/editobj.cxx editeng/source/editeng/editobj2.hxx editeng/source/editeng/editsel.cxx editeng/source/editeng/editundo.cxx editeng/source/editeng/editundo.hxx editeng/source/editeng/editview.cxx editeng/source/editeng/edtspell.hxx editeng/source/editeng/eehtml.cxx editeng/source/editeng/eehtml.hxx editeng/source/editeng/eeobj.cxx editeng/source/editeng/eerdll.cxx editeng/source/editeng/eertfpar.cxx editeng/source/editeng/impedit.cxx editeng/source/editeng/impedit.hxx editeng/source/editeng/impedit2.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/editeng/impedit5.cxx editeng/source/editeng/makefile.mk editeng/source/items/bulitem.cxx editeng/source/items/charhiddenitem.cxx editeng/source/items/flditem.cxx editeng/source/items/frmitems.cxx editeng/source/items/makefile.mk editeng/source/items/numitem.cxx editeng/source/items/paraitem.cxx editeng/source/items/svxfont.cxx editeng/source/items/textitem.cxx editeng/source/items/writingmodeitem.cxx editeng/source/items/xmlcnitm.cxx editeng/source/misc/SvXMLAutoCorrectImport.cxx editeng/source/misc/svxacorr.cxx editeng/source/misc/txtrange.cxx editeng/source/misc/unolingu.cxx editeng/source/outliner/outleeng.cxx editeng/source/outliner/outliner.cxx editeng/source/outliner/outlundo.hxx editeng/source/outliner/outlvw.cxx editeng/source/outliner/paralist.cxx editeng/source/outliner/paralist.hxx editeng/source/rtf/rtfgrf.cxx editeng/source/rtf/rtfitem.cxx editeng/source/rtf/svxrtf.cxx editeng/source/uno/unoipset.cxx editeng/util/makefile.mk embeddedobj/prj/build.lst embeddedobj/source/commonembedding/miscobj.cxx eventattacher/prj/build.lst fileaccess/source/FileAccess.cxx formula/inc/formula/FormulaCompiler.hxx formula/inc/formula/token.hxx formula/inc/formula/tokenarray.hxx formula/source/core/api/FormulaCompiler.cxx formula/source/core/api/token.cxx formula/source/ui/dlg/FormulaHelper.cxx formula/source/ui/dlg/formula.cxx formula/source/ui/dlg/parawin.cxx formula/source/ui/dlg/structpg.cxx fpicker/prj/d.lst fpicker/source/aqua/FPentry.cxx fpicker/source/office/OfficeControlAccess.cxx fpicker/source/office/iodlg.cxx fpicker/source/office/iodlg.hxx fpicker/source/office/iodlg.src fpicker/source/office/iodlgimp.cxx fpicker/source/unx/gnome/FPentry.cxx fpicker/source/unx/gnome/SalGtkFilePicker.cxx fpicker/source/unx/gnome/SalGtkPicker.cxx fpicker/source/unx/kde4/KDE4FPEntry.cxx fpicker/source/win32/filepicker/FPentry.cxx framework/AllLangResTarget_fwe.mk framework/inc/dispatch/interaction.hxx framework/inc/framework/addonmenu.hxx framework/inc/framework/addonsoptions.hxx framework/inc/framework/bmkmenu.hxx framework/inc/framework/imageproducer.hxx framework/inc/framework/sfxhelperfunctions.hxx framework/inc/framework/statusbarconfiguration.hxx framework/inc/framework/titlehelper.hxx framework/inc/framework/toolboxconfiguration.hxx framework/inc/threadhelp/lockhelper.hxx framework/inc/xml/eventsdocumenthandler.hxx framework/inc/xml/statusbardocumenthandler.hxx framework/inc/xml/toolboxconfiguration.hxx framework/inc/xml/toolboxconfigurationdefines.hxx framework/inc/xml/toolboxdocumenthandler.hxx framework/prj/build.lst framework/qa/complex/ModuleManager/makefile.mk framework/qa/complex/accelerators/makefile.mk framework/qa/complex/framework/recovery/makefile.mk framework/qa/complex/imageManager/_XInitialization.java framework/source/classes/menumanager.cxx framework/source/dispatch/interaction.cxx framework/source/fwe/classes/bmkmenu.cxx framework/source/fwe/helper/actiontriggerhelper.cxx framework/source/fwe/helper/imageproducer.cxx framework/source/fwe/xml/menuconfiguration.cxx framework/source/fwe/xml/toolboxdocumenthandler.cxx framework/source/helper/uiconfigelementwrapperbase.cxx framework/source/helper/uielementwrapperbase.cxx framework/source/inc/pattern/window.hxx framework/source/jobs/jobdata.cxx framework/source/layoutmanager/layoutmanager.cxx framework/source/layoutmanager/panel.hxx framework/source/loadenv/loadenv.cxx framework/source/register/registerservices.cxx framework/source/services/menudocumenthandler.cxx framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx framework/source/uiconfiguration/uiconfigurationmanager.cxx framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx framework/source/uielement/addonstoolbarmanager.cxx framework/source/uielement/controlmenucontroller.cxx framework/source/uielement/fontsizemenucontroller.cxx framework/source/uielement/imagebuttontoolbarcontroller.cxx framework/source/uielement/macrosmenucontroller.cxx framework/source/uielement/menubarmanager.cxx framework/source/uielement/newmenucontroller.cxx framework/source/uielement/togglebuttontoolbarcontroller.cxx framework/source/uielement/toolbarmanager.cxx framework/source/uielement/toolbarsmenucontroller.cxx framework/test/makefile.mk framework/test/threadtest/makefile.mk framework/test/typecfg/makefile.mk framework/util/guiapps/makefile.mk framework/util/makefile.mk idl/inc/bastype.hxx idl/inc/hash.hxx idl/inc/lex.hxx idl/inc/module.hxx idl/inc/object.hxx idl/inc/slot.hxx idl/inc/types.hxx idl/source/cmptools/hash.cxx idl/source/cmptools/lex.cxx idl/source/objects/basobj.cxx idl/source/objects/bastype.cxx idl/source/objects/module.cxx idl/source/objects/object.cxx idl/source/objects/slot.cxx idl/source/objects/types.cxx idl/source/prj/command.cxx idl/source/prj/database.cxx idl/source/prj/globals.cxx idl/source/prj/svidl.cxx linguistic/inc/linguistic/misc.hxx linguistic/prj/build.lst linguistic/source/convdic.cxx linguistic/source/convdiclist.cxx linguistic/source/dicimp.cxx linguistic/source/dlistimp.cxx linguistic/source/gciterator.cxx linguistic/source/iprcache.cxx linguistic/source/lngopt.cxx linguistic/source/lngprophelp.cxx linguistic/source/lngsvcmgr.cxx linguistic/source/lngsvcmgr.hxx linguistic/source/misc2.cxx linguistic/workben/sprophelp.cxx officecfg/registry/data/org/openoffice/VCL.xcu officecfg/util/makefile.mk oovbaapi/ooo/vba/XApplicationBase.idl oovbaapi/ooo/vba/XVBAAppService.idl oovbaapi/ooo/vba/XVBADocService.idl oovbaapi/ooo/vba/excel/XApplication.idl oovbaapi/ooo/vba/excel/XRange.idl oovbaapi/ooo/vba/excel/XWorkbook.idl oovbaapi/ooo/vba/excel/XWorksheet.idl oovbaapi/ooo/vba/word/XApplication.idl oovbaapi/ooo/vba/word/XGlobals.idl oovbaapi/ooo/vba/word/XTableOfContents.idl readlicense_oo/prj/build.lst scripting/prj/build.lst scripting/prj/d.lst scripting/source/basprov/basprov.cxx scripting/source/basprov/basscript.cxx scripting/source/basprov/basscript.hxx scripting/source/dlgprov/dlgprov.cxx scripting/source/inc/util/util.hxx scripting/source/protocolhandler/scripthandler.cxx scripting/source/provider/ProviderCache.cxx scripting/source/pyprov/makefile.mk scripting/source/runtimemgr/ScriptNameResolverImpl.cxx scripting/source/runtimemgr/ScriptRuntimeManager.cxx scripting/source/runtimemgr/StorageBridge.cxx scripting/source/storage/ScriptMetadataImporter.cxx scripting/source/storage/ScriptSecurityManager.cxx scripting/source/storage/ScriptStorage.cxx scripting/source/storage/ScriptStorageManager.cxx sfx2/inc/about.hxx sfx2/inc/brokenpackageint.hxx sfx2/inc/docvor.hxx sfx2/inc/pch/precompiled_sfx2.hxx sfx2/inc/sfx2/app.hxx sfx2/inc/sfx2/basmgr.hxx sfx2/inc/sfx2/bindings.hxx sfx2/inc/sfx2/childwin.hxx sfx2/inc/sfx2/ctrlitem.hxx sfx2/inc/sfx2/dinfdlg.hxx sfx2/inc/sfx2/dispatch.hxx sfx2/inc/sfx2/docfilt.hxx sfx2/inc/sfx2/evntconf.hxx sfx2/inc/sfx2/fcontnr.hxx sfx2/inc/sfx2/frame.hxx sfx2/inc/sfx2/imagemgr.hxx sfx2/inc/sfx2/imgmgr.hxx sfx2/inc/sfx2/linksrc.hxx sfx2/inc/sfx2/macrconf.hxx sfx2/inc/sfx2/macropg.hxx sfx2/inc/sfx2/mnuitem.hxx sfx2/inc/sfx2/mnumgr.hxx sfx2/inc/sfx2/module.hxx sfx2/inc/sfx2/msg.hxx sfx2/inc/sfx2/objsh.hxx sfx2/inc/sfx2/passwd.hxx sfx2/inc/sfx2/prnmon.hxx sfx2/inc/sfx2/request.hxx sfx2/inc/sfx2/sfx.hrc sfx2/inc/sfx2/sfxbasemodel.hxx sfx2/inc/sfx2/sfxhtml.hxx sfx2/inc/sfx2/sfxresid.hxx sfx2/inc/sfx2/sfxsids.hrc sfx2/inc/sfx2/sfxuno.hxx sfx2/inc/sfx2/shell.hxx sfx2/inc/sfx2/stbitem.hxx sfx2/inc/sfx2/styfitem.hxx sfx2/inc/sfx2/tabdlg.hxx sfx2/inc/sfx2/tbxctrl.hxx sfx2/inc/sfx2/tplpitem.hxx sfx2/inc/sfx2/viewfrm.hxx sfx2/inc/sfx2/viewsh.hxx sfx2/inc/sfxbasic.hxx sfx2/inc/sorgitm.hxx sfx2/prj/build.lst sfx2/qa/complex/docinfo/makefile.mk sfx2/qa/cppunit/makefile.mk sfx2/sdi/makefile.mk sfx2/source/appl/app.cxx sfx2/source/appl/app.hrc sfx2/source/appl/app.src sfx2/source/appl/appbas.cxx sfx2/source/appl/appcfg.cxx sfx2/source/appl/appchild.cxx sfx2/source/appl/appmain.cxx sfx2/source/appl/appmisc.cxx sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/appl/appuno.cxx sfx2/source/appl/childwin.cxx sfx2/source/appl/fileobj.cxx sfx2/source/appl/helpinterceptor.cxx sfx2/source/appl/imagemgr.cxx sfx2/source/appl/impldde.cxx sfx2/source/appl/impldde.hxx sfx2/source/appl/linkmgr2.cxx sfx2/source/appl/lnkbase2.cxx sfx2/source/appl/makefile.mk sfx2/source/appl/module.cxx sfx2/source/appl/newhelp.cxx sfx2/source/appl/opengrf.cxx sfx2/source/appl/sfxdll.cxx sfx2/source/appl/sfxhelp.cxx sfx2/source/appl/shutdownicon.cxx sfx2/source/appl/shutdowniconunx.cxx sfx2/source/appl/workwin.cxx sfx2/source/bastyp/fltfnc.cxx sfx2/source/bastyp/frmhtml.cxx sfx2/source/bastyp/frmhtmlw.cxx sfx2/source/bastyp/helper.cxx sfx2/source/bastyp/minarray.cxx sfx2/source/bastyp/progress.cxx sfx2/source/bastyp/sfxhtml.cxx sfx2/source/config/evntconf.cxx sfx2/source/control/bindings.cxx sfx2/source/control/ctrlitem.cxx sfx2/source/control/dispatch.cxx sfx2/source/control/macrconf.cxx sfx2/source/control/macro.cxx sfx2/source/control/makefile.mk sfx2/source/control/minfitem.cxx sfx2/source/control/msg.cxx sfx2/source/control/msgpool.cxx sfx2/source/control/objface.cxx sfx2/source/control/request.cxx sfx2/source/control/shell.cxx sfx2/source/control/sorgitm.cxx sfx2/source/dialog/about.cxx sfx2/source/dialog/basedlgs.cxx sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dinfedt.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/dialog/filedlghelper.cxx sfx2/source/dialog/mailmodel.cxx sfx2/source/dialog/mailmodelapi.cxx sfx2/source/dialog/makefile.mk sfx2/source/dialog/mgetempl.cxx sfx2/source/dialog/passwd.cxx sfx2/source/dialog/passwd.hrc sfx2/source/dialog/printopt.cxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/splitwin.cxx sfx2/source/dialog/styfitem.cxx sfx2/source/dialog/tabdlg.cxx sfx2/source/dialog/taskpane.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/dialog/tplpitem.cxx sfx2/source/dialog/versdlg.cxx sfx2/source/doc/QuerySaveDocument.cxx sfx2/source/doc/SfxDocumentMetaData.cxx sfx2/source/doc/applet.cxx sfx2/source/doc/doc.hrc sfx2/source/doc/doc.src sfx2/source/doc/docfile.cxx sfx2/source/doc/docinf.cxx sfx2/source/doc/doctempl.cxx sfx2/source/doc/doctemplates.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/doc/makefile.mk sfx2/source/doc/objcont.cxx sfx2/source/doc/objitem.cxx sfx2/source/doc/objmisc.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/printhelper.cxx sfx2/source/doc/sfxacldetect.cxx sfx2/source/doc/sfxbasemodel.cxx sfx2/source/inc/applet.hxx sfx2/source/inc/fltoptint.hxx sfx2/source/inc/sfxlocal.hrc sfx2/source/inc/virtmenu.hxx sfx2/source/inc/workwin.hxx sfx2/source/menu/mnuitem.cxx sfx2/source/menu/objmnctl.cxx sfx2/source/menu/virtmenu.cxx sfx2/source/notify/eventsupplier.cxx sfx2/source/notify/makefile.mk sfx2/source/toolbox/imgmgr.cxx sfx2/source/toolbox/tbxitem.cxx sfx2/source/view/frame.cxx sfx2/source/view/orgmgr.cxx sfx2/source/view/printer.cxx sfx2/source/view/prnmon.cxx sfx2/source/view/viewfrm.cxx sfx2/source/view/viewprn.cxx sfx2/source/view/viewsh.cxx sfx2/util/makefile.mk sfx2/workben/custompanel/makefile.mk shell/source/backends/desktopbe/desktopbackend.cxx shell/source/backends/gconfbe/gconfbackend.cxx shell/source/backends/kde4be/kde4backend.cxx shell/source/backends/kdebe/kdebackend.cxx shell/source/win32/SysShentry.cxx shell/source/win32/shlxthandler/propsheets/propsheets.cxx shell/source/win32/simplemail/smplmailentry.cxx svx/inc/float3d.hrc svx/inc/fmhelp.hrc svx/inc/globlmn_tmpl.hrc svx/inc/helpid.hrc svx/inc/pch/precompiled_svx.hxx svx/inc/sjctrl.hxx svx/inc/srchitem.hxx svx/inc/svdibrow.hxx svx/inc/svx/SmartTagItem.hxx svx/inc/svx/algitem.hxx svx/inc/svx/camera3d.hxx svx/inc/svx/chrtitem.hxx svx/inc/svx/clipfmtitem.hxx svx/inc/svx/ctredlin.hxx svx/inc/svx/dbtoolsclient.hxx svx/inc/svx/deflt3d.hxx svx/inc/svx/dialogs.hrc svx/inc/svx/drawitem.hxx svx/inc/svx/e3ditem.hxx svx/inc/svx/extrud3d.hxx svx/inc/svx/flagsdef.hxx svx/inc/svx/float3d.hxx svx/inc/svx/frmsel.hxx svx/inc/svx/gallery.hxx svx/inc/svx/gallery1.hxx svx/inc/svx/galtheme.hxx svx/inc/svx/grfcrop.hxx svx/inc/svx/hdft.hxx svx/inc/svx/hlnkitem.hxx svx/inc/svx/hyprlink.hxx svx/inc/svx/itemwin.hxx svx/inc/svx/lathe3d.hxx svx/inc/svx/linkwarn.hxx svx/inc/svx/modctrl.hxx svx/inc/svx/msdffdef.hxx svx/inc/svx/obj3d.hxx svx/inc/svx/optgenrl.hxx svx/inc/svx/optgrid.hxx svx/inc/svx/pageitem.hxx svx/inc/svx/paraprev.hxx svx/inc/svx/postattr.hxx svx/inc/svx/rotmodit.hxx svx/inc/svx/ruler.hxx svx/inc/svx/rulritem.hxx svx/inc/svx/scene3d.hxx svx/inc/svx/sdasaitm.hxx svx/inc/svx/sdasitm.hxx svx/inc/svx/sdggaitm.hxx svx/inc/svx/sdmetitm.hxx svx/inc/svx/sdtaaitm.hxx svx/inc/svx/sdtaditm.hxx svx/inc/svx/sdtaitm.hxx svx/inc/svx/sdtakitm.hxx svx/inc/svx/sdtfchim.hxx svx/inc/svx/sdtfsitm.hxx svx/inc/svx/srchdlg.hxx svx/inc/svx/svddrag.hxx svx/inc/svx/svdetc.hxx svx/inc/svx/svdglue.hxx svx/inc/svx/svdhlpln.hxx svx/inc/svx/svdlayer.hxx svx/inc/svx/svdmark.hxx svx/inc/svx/svdmodel.hxx svx/inc/svx/svdoashp.hxx svx/inc/svx/svdobj.hxx svx/inc/svx/svdocirc.hxx svx/inc/svx/svdoedge.hxx svx/inc/svx/svdogrp.hxx svx/inc/svx/svdomeas.hxx svx/inc/svx/svdoole2.hxx svx/inc/svx/svdorect.hxx svx/inc/svx/svdotable.hxx svx/inc/svx/svdotext.hxx svx/inc/svx/svdovirt.hxx svx/inc/svx/svdpage.hxx svx/inc/svx/svdsnpv.hxx svx/inc/svx/svdtrans.hxx svx/inc/svx/svdundo.hxx svx/inc/svx/svimbase.hxx svx/inc/svx/svx3ditems.hxx svx/inc/svx/svxdlg.hxx svx/inc/svx/sxcikitm.hxx svx/inc/svx/sxekitm.hxx svx/inc/svx/sxelditm.hxx svx/inc/svx/sxenditm.hxx svx/inc/svx/sxmkitm.hxx svx/inc/svx/sxmtpitm.hxx svx/inc/svx/sxmuitm.hxx svx/inc/svx/tabarea.hxx svx/inc/svx/tabline.hxx svx/inc/svx/unoprov.hxx svx/inc/svx/viewlayoutitem.hxx svx/inc/svx/xbitmap.hxx svx/inc/svx/xbtmpit.hxx svx/inc/svx/xcolit.hxx svx/inc/svx/xfillit0.hxx svx/inc/svx/xflclit.hxx svx/inc/svx/xflftrit.hxx svx/inc/svx/xflgrit.hxx svx/inc/svx/xflhtit.hxx svx/inc/svx/xftadit.hxx svx/inc/svx/xftsfit.hxx svx/inc/svx/xftshit.hxx svx/inc/svx/xlineit0.hxx svx/inc/svx/xlinjoit.hxx svx/inc/svx/xlnclit.hxx svx/inc/svx/xlndsit.hxx svx/inc/svx/xlnedcit.hxx svx/inc/svx/xlnedit.hxx svx/inc/svx/xlnedwit.hxx svx/inc/svx/xlnstcit.hxx svx/inc/svx/xlnstit.hxx svx/inc/svx/xlnstwit.hxx svx/inc/svx/xlnwtit.hxx svx/inc/svx/xtextit0.hxx svx/inc/svx/zoomitem.hxx svx/inc/svx/zoomslideritem.hxx svx/inc/xpolyimp.hxx svx/inc/zoom_def.hxx svx/prj/d.lst svx/source/accessibility/AccessibleShape.cxx svx/source/accessibility/DescriptionGenerator.cxx svx/source/customshapes/EnhancedCustomShapeEngine.cxx svx/source/customshapes/EnhancedCustomShapeFontWork.cxx svx/source/dialog/_bmpmask.cxx svx/source/dialog/_contdlg.cxx svx/source/dialog/connctrl.cxx svx/source/dialog/contwnd.cxx svx/source/dialog/ctredlin.cxx svx/source/dialog/ctredlin.hrc svx/source/dialog/ctredlin.src svx/source/dialog/dialcontrol.cxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/docrecovery.cxx svx/source/dialog/fntctrl.cxx svx/source/dialog/fontwork.cxx svx/source/dialog/frmsel.cxx svx/source/dialog/graphctl.cxx svx/source/dialog/grfflt.cxx svx/source/dialog/hdft.cxx svx/source/dialog/hyperdlg.cxx svx/source/dialog/hyprdlg.hxx svx/source/dialog/hyprlink.cxx svx/source/dialog/hyprlink.hxx svx/source/dialog/hyprlink.src svx/source/dialog/imapdlg.cxx svx/source/dialog/imapwnd.cxx svx/source/dialog/linkwarn.hrc svx/source/dialog/makefile.mk svx/source/dialog/optgrid.cxx svx/source/dialog/orienthelper.cxx svx/source/dialog/pagectrl.cxx svx/source/dialog/prtqry.cxx svx/source/dialog/rlrcitem.cxx svx/source/dialog/rubydialog.cxx svx/source/dialog/rulritem.cxx svx/source/dialog/simptabl.cxx svx/source/dialog/srchdlg.cxx svx/source/dialog/svxbmpnumvalueset.cxx svx/source/dialog/svxruler.cxx svx/source/dialog/swframeexample.cxx svx/source/engine3d/float3d.cxx svx/source/engine3d/float3d.src svx/source/engine3d/svx3ditems.cxx svx/source/fmcomp/gridctrl.cxx svx/source/fmcomp/trace.cxx svx/source/form/ParseContext.cxx svx/source/form/datanavi.cxx svx/source/form/filtnav.cxx svx/source/form/fmexch.cxx svx/source/form/fmexpl.cxx svx/source/form/fmobjfac.cxx svx/source/form/fmpage.cxx svx/source/form/fmshell.cxx svx/source/form/fmshimp.cxx svx/source/form/fmsrcimp.cxx svx/source/form/fmvwimp.cxx svx/source/form/makefile.mk svx/source/form/tabwin.cxx svx/source/form/tbxform.cxx svx/source/form/typemap.cxx svx/source/gallery2/galbrws1.cxx svx/source/gallery2/galbrws2.cxx svx/source/gallery2/galexpl.cxx svx/source/gallery2/gallery1.cxx svx/source/gallery2/galtheme.cxx svx/source/gallery2/makefile.mk svx/source/gengal/gengal.cxx svx/source/gengal/makefile.mk svx/source/inc/fmgroup.hxx svx/source/intro/about_ooo.hrc svx/source/intro/iso.src svx/source/intro/ooo.src svx/source/items/SmartTagItem.cxx svx/source/items/algitem.cxx svx/source/items/chrtitem.cxx svx/source/items/clipfmtitem.cxx svx/source/items/customshapeitem.cxx svx/source/items/drawitem.cxx svx/source/items/e3ditem.cxx svx/source/items/grfitem.cxx svx/source/items/hlnkitem.cxx svx/source/items/makefile.mk svx/source/items/pageitem.cxx svx/source/items/rotmodit.cxx svx/source/items/viewlayoutitem.cxx svx/source/items/zoomitem.cxx svx/source/items/zoomslideritem.cxx svx/source/src/app.hrc svx/source/stbctrls/makefile.mk svx/source/stbctrls/modctrl.cxx svx/source/stbctrls/xmlsecctrl.cxx svx/source/stbctrls/zoomctrl.cxx svx/source/svdraw/clonelist.cxx svx/source/svdraw/svdattr.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdedtv2.cxx svx/source/svdraw/svdedxv.cxx svx/source/svdraw/svdetc.cxx svx/source/svdraw/svdfmtf.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdglue.cxx svx/source/svdraw/svdhdl.cxx svx/source/svdraw/svdhlpln.cxx svx/source/svdraw/svdibrow.cxx svx/source/svdraw/svdlayer.cxx svx/source/svdraw/svdmodel.cxx svx/source/svdraw/svdoashp.cxx svx/source/svdraw/svdobj.cxx svx/source/svdraw/svdocapt.cxx svx/source/svdraw/svdocirc.cxx svx/source/svdraw/svdoedge.cxx svx/source/svdraw/svdograf.cxx svx/source/svdraw/svdogrp.cxx svx/source/svdraw/svdomeas.cxx svx/source/svdraw/svdomedia.cxx svx/source/svdraw/svdopath.cxx svx/source/svdraw/svdotext.cxx svx/source/svdraw/svdotxdr.cxx svx/source/svdraw/svdotxed.cxx svx/source/svdraw/svdotxfl.cxx svx/source/svdraw/svdotxln.cxx svx/source/svdraw/svdotxtr.cxx svx/source/svdraw/svdoutl.cxx svx/source/svdraw/svdpage.cxx svx/source/svdraw/svdpagv.cxx svx/source/svdraw/svdpntv.cxx svx/source/svdraw/svdpoev.cxx svx/source/svdraw/svdsnpv.cxx svx/source/svdraw/svdstr.src svx/source/svdraw/svdtrans.cxx svx/source/svdraw/svdundo.cxx svx/source/svdraw/svdview.cxx svx/source/svdraw/svdxcgv.cxx svx/source/table/svdotable.cxx svx/source/tbxctrls/colorwindow.hxx svx/source/tbxctrls/extrusioncontrols.cxx svx/source/tbxctrls/fillctrl.cxx svx/source/tbxctrls/grafctrl.cxx svx/source/tbxctrls/itemwin.cxx svx/source/tbxctrls/layctrl.cxx svx/source/tbxctrls/lboxctrl.cxx svx/source/tbxctrls/linectrl.cxx svx/source/tbxctrls/tbcontrl.cxx svx/source/tbxctrls/verttexttbxctrl.cxx svx/source/unodraw/unomod.cxx svx/source/unodraw/unopage.cxx svx/source/unodraw/unoprov.cxx svx/source/unodraw/unoshape.cxx svx/source/unodraw/unoshtxt.cxx svx/source/xml/xmlxtexp.cxx svx/source/xoutdev/_xpoly.cxx svx/source/xoutdev/xattr.cxx svx/source/xoutdev/xattr2.cxx svx/source/xoutdev/xattrbmp.cxx svx/source/xoutdev/xtabcolr.cxx svx/util/makefile.mk svx/workben/edittest.cxx sysui/desktop/productversion.mk ucb/prj/build.lst ucb/source/cacher/cacheserv.cxx ucb/source/core/ucb1.component ucb/source/core/ucbserv.cxx ucb/source/core/ucbstore.cxx ucb/source/core/ucbstore.hxx ucb/source/sorter/sortmain.cxx ucb/source/ucp/file/prov.cxx ucb/source/ucp/file/shell.cxx ucb/source/ucp/ftp/ftpservices.cxx ucb/source/ucp/gio/gio_provider.cxx ucb/source/ucp/gvfs/gvfs_provider.cxx ucb/source/ucp/hierarchy/hierarchyservices.cxx ucb/source/ucp/odma/odma_lib.cxx ucb/source/ucp/odma/odma_services.cxx ucb/source/ucp/package/pkgservices.cxx ucb/source/ucp/tdoc/tdoc_services.cxx ucb/source/ucp/webdav/ContentProperties.cxx ucb/source/ucp/webdav/NeonHeadRequest.cxx ucb/source/ucp/webdav/webdavcontent.cxx ucb/source/ucp/webdav/webdavservices.cxx uui/source/iahndl.cxx uui/source/iahndl.hxx uui/source/loginerr.hxx uui/source/nameclashdlg.hxx uui/source/passcrtdlg.cxx uui/source/passworddlg.cxx uui/source/passworddlg.hxx uui/source/services.cxx vbahelper/inc/vbahelper/vbahelper.hxx vbahelper/prj/build.lst vbahelper/prj/d.lst vbahelper/source/msforms/makefile.mk vbahelper/source/msforms/vbauserform.cxx vbahelper/source/vbahelper/makefile.mk vbahelper/source/vbahelper/vbaapplicationbase.cxx vbahelper/source/vbahelper/vbacommandbarcontrol.cxx vbahelper/source/vbahelper/vbadocumentbase.cxx vbahelper/source/vbahelper/vbadocumentsbase.cxx vbahelper/source/vbahelper/vbahelper.cxx vbahelper/util/makefile.mk xmlhelp/source/cxxhelp/provider/databases.cxx xmlhelp/source/cxxhelp/provider/services.cxx xmlhelp/source/treeview/tvfactory.cxx xmloff/JunitTest_xmloff_unoapi.mk xmloff/inc/functional.hxx xmloff/inc/xmloff/formlayerexport.hxx xmloff/inc/xmloff/formlayerimport.hxx xmloff/inc/xmloff/functional.hxx xmloff/inc/xmloff/shapeimport.hxx xmloff/inc/xmloff/xmlcnitm.hxx xmloff/inc/xmloff/xmlnumfi.hxx xmloff/prj/build.lst xmloff/source/chart/SchXMLChartContext.cxx xmloff/source/chart/SchXMLExport.cxx xmloff/source/chart/SchXMLImport.cxx xmloff/source/chart/SchXMLLegendContext.hxx xmloff/source/chart/SchXMLPlotAreaContext.cxx xmloff/source/core/xmluconv.cxx xmloff/source/draw/sdxmlexp.cxx xmloff/source/draw/shapeexport4.cxx xmloff/source/draw/ximp3dobject.cxx xmloff/source/draw/ximp3dscene.cxx xmloff/source/forms/formlayerexport.cxx xmloff/source/forms/formlayerimport.cxx xmloff/source/forms/handler/vcl_time_handler.hxx xmloff/source/forms/layerimport.cxx xmloff/source/forms/layerimport.hxx xmloff/source/forms/property_meta_data.hxx xmloff/source/style/PageHeaderFooterContext.cxx xmloff/source/style/PageMasterStyleMap.cxx xmloff/source/style/prstylei.cxx xmloff/source/style/xmlimppr.cxx xmloff/source/style/xmlnumfi.cxx xmloff/source/style/xmlstyle.cxx xmloff/source/table/tabledesignsimporter.cxx xmloff/source/text/XMLTextNumRuleInfo.cxx xmloff/source/text/XMLTextShapeStyleContext.cxx xmloff/source/text/txtstyle.cxx xmloff/source/transform/ChartOOoTContext.cxx xmloff/source/transform/EventOOoTContext.cxx xmloff/source/transform/TransformerBase.cxx xmloff/util/makefile.mk xmlscript/util/xcr.component
2011-03-12 02:42:58 +01:00
for( sal_uInt16 i = 1 ; i < nVarParCount ; ++i )
{
SbxVariable* pPar = pArg->Get( i );
xMethParameters->Put( pPar, i );
}
pMethVar->SetParameters( xMethParameters );
pMethVar->Get( aVals );
pMethVar->SetParameters( NULL );
}
else
{
pMethVar->Get( aVals );
}
pVar->Put( aVals );
}
}
else if( pHint->GetId() == SBX_HINT_DATACHANGED )
{
SbxVariable* pMethVar = NULL;
bool bSet = pProcProperty->isSet();
if( bSet )
{
pProcProperty->setSet( false );
OUString aProcName("Property Set ");
aProcName += pProcProperty->GetName();
pMethVar = Find( aProcName, SbxCLASS_METHOD );
}
if( !pMethVar ) // Let
{
OUString aProcName("Property Let " );
aProcName += pProcProperty->GetName();
pMethVar = Find( aProcName, SbxCLASS_METHOD );
}
if( pMethVar )
{
// Setup parameters
SbxArrayRef xArray = new SbxArray;
xArray->Put( pMethVar, 0 ); // Method as parameter 0
xArray->Put( pVar, 1 );
pMethVar->SetParameters( xArray );
SbxValues aVals;
pMethVar->Get( aVals );
pMethVar->SetParameters( NULL );
}
}
}
2000-09-18 15:18:56 +00:00
if( pProp )
{
if( pProp->GetModule() != this )
SetError( SbxERR_BAD_ACTION );
}
else if( pMeth )
{
if( pHint->GetId() == SBX_HINT_DATAWANTED )
{
if( pMeth->bInvalid && !Compile() )
{
2010-10-06 22:33:21 +02:00
// auto compile has not worked!
2000-09-18 15:18:56 +00:00
StarBASIC::Error( SbERR_BAD_PROP_VALUE );
}
2000-09-18 15:18:56 +00:00
else
{
2010-10-06 22:33:21 +02:00
// Call of a subprogram
2012-01-15 16:15:08 +01:00
SbModule* pOld = GetSbData()->pMod;
GetSbData()->pMod = this;
2000-09-18 15:18:56 +00:00
Run( (SbMethod*) pVar );
2012-01-15 16:15:08 +01:00
GetSbData()->pMod = pOld;
2000-09-18 15:18:56 +00:00
}
}
}
else
{
// #i92642: Special handling for name property to avoid
// side effects when using name as variable implicitely
bool bForwardToSbxObject = true;
sal_uIntPtr nId = pHint->GetId();
if( (nId == SBX_HINT_DATAWANTED || nId == SBX_HINT_DATACHANGED) &&
pVar->GetName().equalsIgnoreAsciiCase( "name" ) )
{
bForwardToSbxObject = false;
}
if( bForwardToSbxObject )
{
SbxObject::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
}
}
2000-09-18 15:18:56 +00:00
}
}
2010-10-06 22:33:21 +02:00
// The setting of the source makes the image invalid
// and scans the method definitions newly in
2000-09-18 15:18:56 +00:00
void SbModule::SetSource( const OUString& r )
2000-09-18 15:18:56 +00:00
{
SetSource32( r );
}
void SbModule::SetSource32( const OUString& r )
{
// Default basic mode to library container mode, but.. allow Option VBASupport 0/1 override
SetVBACompat( getDefaultVBAMode( static_cast< StarBASIC*>( GetParent() ) ) );
aOUSource = r;
2000-09-18 15:18:56 +00:00
StartDefinitions();
SbiTokenizer aTok( r );
aTok.SetCompatible( IsVBACompat() );
2000-09-18 15:18:56 +00:00
while( !aTok.IsEof() )
{
SbiToken eEndTok = NIL;
2010-10-06 22:33:21 +02:00
// Searching for SUB or FUNCTION
2000-09-18 15:18:56 +00:00
SbiToken eLastTok = NIL;
while( !aTok.IsEof() )
{
2010-10-06 22:33:21 +02:00
// #32385: not by declare
2000-09-18 15:18:56 +00:00
SbiToken eCurTok = aTok.Next();
if( eLastTok != DECLARE )
{
if( eCurTok == SUB )
{
eEndTok = ENDSUB; break;
}
if( eCurTok == FUNCTION )
{
eEndTok = ENDFUNC; break;
}
if( eCurTok == PROPERTY )
{
eEndTok = ENDPROPERTY; break;
}
if( eCurTok == OPTION )
{
eCurTok = aTok.Next();
if( eCurTok == COMPATIBLE )
{
aTok.SetCompatible( true );
}
else if ( ( eCurTok == VBASUPPORT ) && ( aTok.Next() == NUMBER ) )
{
sal_Bool bIsVBA = ( aTok.GetDbl()== 1 );
SetVBACompat( bIsVBA );
aTok.SetCompatible( bIsVBA );
}
}
2000-09-18 15:18:56 +00:00
}
eLastTok = eCurTok;
}
2010-10-06 22:33:21 +02:00
// Definition of the method
SbMethod* pMeth = NULL;
2000-09-18 15:18:56 +00:00
if( eEndTok != NIL )
{
sal_uInt16 nLine1 = aTok.GetLine();
2000-09-18 15:18:56 +00:00
if( aTok.Next() == SYMBOL )
{
OUString aName_( aTok.GetSym() );
2000-09-18 15:18:56 +00:00
SbxDataType t = aTok.GetType();
if( t == SbxVARIANT && eEndTok == ENDSUB )
{
2000-09-18 15:18:56 +00:00
t = SbxVOID;
}
pMeth = GetMethod( aName_, t );
2000-09-18 15:18:56 +00:00
pMeth->nLine1 = pMeth->nLine2 = nLine1;
2010-10-06 22:33:21 +02:00
// The method is for a start VALID
pMeth->bInvalid = sal_False;
2000-09-18 15:18:56 +00:00
}
else
{
2000-09-18 15:18:56 +00:00
eEndTok = NIL;
}
2000-09-18 15:18:56 +00:00
}
2010-10-06 22:33:21 +02:00
// Skip up to END SUB/END FUNCTION
2000-09-18 15:18:56 +00:00
if( eEndTok != NIL )
{
while( !aTok.IsEof() )
{
if( aTok.Next() == eEndTok )
{
pMeth->nLine2 = aTok.GetLine();
break;
}
}
if( aTok.IsEof() )
{
2000-09-18 15:18:56 +00:00
pMeth->nLine2 = aTok.GetLine();
}
2000-09-18 15:18:56 +00:00
}
}
EndDefinitions( sal_True );
2000-09-18 15:18:56 +00:00
}
2010-10-06 22:33:21 +02:00
// Broadcast of a hint to all Basics
2000-09-18 15:18:56 +00:00
static void _SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p )
2000-09-18 15:18:56 +00:00
{
2010-10-06 22:33:21 +02:00
// Self a BASIC?
2000-09-18 15:18:56 +00:00
if( pObj->IsA( TYPE(StarBASIC) ) && pObj->IsBroadcaster() )
pObj->GetBroadcaster().Broadcast( SbxHint( nId, p ) );
2010-10-06 22:33:21 +02:00
// Then ask for the subobjects
2000-09-18 15:18:56 +00:00
SbxArray* pObjs = pObj->GetObjects();
for( sal_uInt16 i = 0; i < pObjs->Count(); i++ )
2000-09-18 15:18:56 +00:00
{
SbxVariable* pVar = pObjs->Get( i );
if( pVar->IsA( TYPE(SbxObject) ) )
_SendHint( PTR_CAST(SbxObject,pVar), nId, p );
}
}
static void SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p )
2000-09-18 15:18:56 +00:00
{
while( pObj->GetParent() )
pObj = pObj->GetParent();
_SendHint( pObj, nId, p );
}
2010-10-06 22:33:21 +02:00
// #57841 Clear Uno-Objects, which were helt in RTL functions,
// at the end of the program, so that nothing were helt.
2000-09-18 15:18:56 +00:00
void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic )
{
2010-10-06 22:33:21 +02:00
// delete the return value of CreateUnoService
static OUString aName("CreateUnoService");
2000-09-18 15:18:56 +00:00
SbxVariable* pVar = pBasic->GetRtl()->Find( aName, SbxCLASS_METHOD );
if( pVar )
{
2000-09-18 15:18:56 +00:00
pVar->SbxValue::Clear();
}
2010-10-06 22:33:21 +02:00
// delete the return value of CreateUnoDialog
static OUString aName2("CreateUnoDialog");
pVar = pBasic->GetRtl()->Find( aName2, SbxCLASS_METHOD );
if( pVar )
{
pVar->SbxValue::Clear();
}
2010-10-06 22:33:21 +02:00
// delete the return value of CDec
static OUString aName3("CDec");
pVar = pBasic->GetRtl()->Find( aName3, SbxCLASS_METHOD );
if( pVar )
{
pVar->SbxValue::Clear();
}
2010-10-06 22:33:21 +02:00
// delete return value of CreateObject
static OUString aName4("CreateObject");
pVar = pBasic->GetRtl()->Find( aName4, SbxCLASS_METHOD );
if( pVar )
{
pVar->SbxValue::Clear();
}
2010-10-06 22:33:21 +02:00
// Go over all Sub-Basics
2000-09-18 15:18:56 +00:00
SbxArray* pObjs = pBasic->GetObjects();
sal_uInt16 nCount = pObjs->Count();
for( sal_uInt16 i = 0 ; i < nCount ; i++ )
2000-09-18 15:18:56 +00:00
{
SbxVariable* pObjVar = pObjs->Get( i );
StarBASIC* pSubBasic = PTR_CAST( StarBASIC, pObjVar );
if( pSubBasic )
{
2000-09-18 15:18:56 +00:00
ClearUnoObjectsInRTL_Impl_Rek( pSubBasic );
}
2000-09-18 15:18:56 +00:00
}
}
void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic )
{
2010-10-06 22:33:21 +02:00
// #67781 Delete return values of the Uno-methods
2000-09-18 15:18:56 +00:00
clearUnoMethods();
clearUnoServiceCtors();
2000-09-18 15:18:56 +00:00
ClearUnoObjectsInRTL_Impl_Rek( pBasic );
2010-10-06 22:33:21 +02:00
// Search for the topmost Basic
2000-09-18 15:18:56 +00:00
SbxObject* p = pBasic;
while( p->GetParent() )
p = p->GetParent();
if( ((StarBASIC*)p) != pBasic )
ClearUnoObjectsInRTL_Impl_Rek( (StarBASIC*)p );
2000-09-18 15:18:56 +00:00
}
bool SbModule::IsVBACompat() const
{
return mbVBACompat;
}
2000-09-18 15:18:56 +00:00
void SbModule::SetVBACompat( bool bCompat )
{
if( mbVBACompat != bCompat )
{
mbVBACompat = bCompat;
// initialize VBA document API
if( mbVBACompat ) try
{
StarBASIC* pBasic = static_cast< StarBASIC* >( GetParent() );
uno::Reference< lang::XMultiServiceFactory > xFactory( getDocumentModel( pBasic ), uno::UNO_QUERY_THROW );
xFactory->createInstance( "ooo.vba.VBAGlobals" );
}
catch( Exception& )
{
}
}
}
2010-10-06 22:33:21 +02:00
// Run a Basic-subprogram
sal_uInt16 SbModule::Run( SbMethod* pMeth )
2000-09-18 15:18:56 +00:00
{
SAL_INFO("basic","About to run " << OUStringToOString( pMeth->GetName(), RTL_TEXTENCODING_UTF8 ).getStr() << ", vba compatmode is " << mbVBACompat );
static sal_uInt16 nMaxCallLevel = 0;
sal_uInt16 nRes = 0;
bool bDelInst = ( GetSbData()->pInst == NULL );
bool bQuit = false;
2000-09-18 15:18:56 +00:00
StarBASICRef xBasic;
uno::Reference< frame::XModel > xModel;
uno::Reference< script::vba::XVBACompatibility > xVBACompat;
2000-09-18 15:18:56 +00:00
if( bDelInst )
{
2010-10-06 22:33:21 +02:00
// #32779: Hold Basic during the execution
2000-09-18 15:18:56 +00:00
xBasic = (StarBASIC*) GetParent();
2012-01-15 16:15:08 +01:00
GetSbData()->pInst = new SbiInstance( (StarBASIC*) GetParent() );
2000-09-18 15:18:56 +00:00
/* If a VBA script in a document is started, get the VBA compatibility
interface from the document Basic library container, and notify all
VBA script listeners about the started script. */
if( mbVBACompat )
{
StarBASIC* pBasic = static_cast< StarBASIC* >( GetParent() );
if( pBasic && pBasic->IsDocBasic() ) try
{
xModel.set( getDocumentModel( pBasic ), uno::UNO_SET_THROW );
xVBACompat.set( getVBACompatibility( xModel ), uno::UNO_SET_THROW );
xVBACompat->broadcastVBAScriptEvent( script::vba::VBAScriptEventId::SCRIPT_STARTED, GetName() );
}
catch(const uno::Exception& )
{
}
}
// Launcher problem
2007-08-17 07:15:47 +00:00
// i80726 The Find below will genarate an error in Testtool so we reset it unless there was one before already
sal_Bool bWasError = SbxBase::GetError() != 0;
SbxVariable* pMSOMacroRuntimeLibVar = Find( "Launcher", SbxCLASS_OBJECT );
2007-08-17 07:15:47 +00:00
if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) )
SbxBase::ResetError();
if( pMSOMacroRuntimeLibVar )
{
StarBASIC* pMSOMacroRuntimeLib = PTR_CAST(StarBASIC,pMSOMacroRuntimeLibVar);
if( pMSOMacroRuntimeLib )
{
sal_uInt16 nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SBX_GBLSEARCH;
pMSOMacroRuntimeLib->ResetFlag( SBX_GBLSEARCH );
SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( "Application", SbxCLASS_METHOD );
pMSOMacroRuntimeLib->SetFlag( nGblFlag );
if( pAppSymbol )
{
pMSOMacroRuntimeLib->SetFlag( SBX_EXTSEARCH ); // Could have been disabled before
GetSbData()->pMSOMacroRuntimLib = pMSOMacroRuntimeLib;
}
}
}
if( nMaxCallLevel == 0 )
{
#ifdef UNX
struct rlimit rl;
getrlimit ( RLIMIT_STACK, &rl );
#endif
#if defined LINUX
// Empiric value, 900 = needed bytes/Basic call level
// for Linux including 10% safety margin
nMaxCallLevel = rl.rlim_cur / 900;
#elif defined SOLARIS
// Empiric value, 1650 = needed bytes/Basic call level
// for Solaris including 10% safety margin
nMaxCallLevel = rl.rlim_cur / 1650;
#elif defined WIN32
nMaxCallLevel = 5800;
#else
nMaxCallLevel = MAXRECURSION;
#endif
}
2000-09-18 15:18:56 +00:00
}
2010-10-06 22:33:21 +02:00
// Recursion to deep?
2012-01-15 16:15:08 +01:00
if( ++GetSbData()->pInst->nCallLvl <= nMaxCallLevel )
2000-09-18 15:18:56 +00:00
{
2010-10-06 22:33:21 +02:00
// Define a globale variable in all Mods
2000-09-18 15:18:56 +00:00
GlobalRunInit( /* bBasicStart = */ bDelInst );
2010-10-06 22:33:21 +02:00
// Appeared a compiler error? Then we don't launch
if( !GetSbData()->bGlobalInitErr )
2000-09-18 15:18:56 +00:00
{
if( bDelInst )
{
SendHint( GetParent(), SBX_HINT_BASICSTART, pMeth );
2010-10-06 22:33:21 +02:00
// 1996-10-16: #31460 New concept for StepInto/Over/Out
// For an explanation see runtime.cxx at SbiInstance::CalcBreakCallLevel()
// Identify the BreakCallLevel
2012-01-15 16:15:08 +01:00
GetSbData()->pInst->CalcBreakCallLevel( pMeth->GetDebugFlags() );
2000-09-18 15:18:56 +00:00
}
2012-01-15 16:15:08 +01:00
SbModule* pOldMod = GetSbData()->pMod;
GetSbData()->pMod = this;
2000-09-18 15:18:56 +00:00
SbiRuntime* pRt = new SbiRuntime( this, pMeth, pMeth->nStart );
2012-01-15 16:15:08 +01:00
pRt->pNext = GetSbData()->pInst->pRun;
if( pRt->pNext )
pRt->pNext->block();
2012-01-15 16:15:08 +01:00
GetSbData()->pInst->pRun = pRt;
if ( mbVBACompat )
{
2012-01-15 16:15:08 +01:00
GetSbData()->pInst->EnableCompatibility( sal_True );
}
2000-09-18 15:18:56 +00:00
while( pRt->Step() ) {}
if( pRt->pNext )
pRt->pNext->unblock();
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// #63710 It can happen by an another thread handling at events,
// that the show call returns to an dialog (by closing the
// dialog per UI), before a by an event triggered further call returned,
// which stands in Basic more top in the stack and that had been run on
// a Basic-Breakpoint. Then would the instance below destroyed. And if the Basic,
// that stand still in the call, further runs, there is a GPF.
// Thus here had to be wait until the other call comes back.
2000-09-18 15:18:56 +00:00
if( bDelInst )
{
2010-10-06 22:33:21 +02:00
// Compare here with 1 instead of 0, because before nCallLvl--
2012-01-15 16:15:08 +01:00
while( GetSbData()->pInst->nCallLvl != 1 )
2000-09-18 15:18:56 +00:00
GetpApp()->Yield();
}
nRes = sal_True;
2012-01-15 16:15:08 +01:00
GetSbData()->pInst->pRun = pRt->pNext;
GetSbData()->pInst->nCallLvl--; // Call-Level down again
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// Exist an higher-ranking runtime instance?
// Then take over SbDEBUG_BREAK, if set
2000-09-18 15:18:56 +00:00
SbiRuntime* pRtNext = pRt->pNext;
if( pRtNext && (pRt->GetDebugFlags() & SbDEBUG_BREAK) )
pRtNext->SetDebugFlags( SbDEBUG_BREAK );
delete pRt;
2012-01-15 16:15:08 +01:00
GetSbData()->pMod = pOldMod;
2000-09-18 15:18:56 +00:00
if( bDelInst )
{
2010-10-06 22:33:21 +02:00
// #57841 Clear Uno-Objects, which were helt in RTL functions,
// at the end of the program, so that nothing were helt.
2000-09-18 15:18:56 +00:00
ClearUnoObjectsInRTL_Impl( xBasic );
clearNativeObjectWrapperVector();
SAL_WARN_IF(GetSbData()->pInst->nCallLvl != 0,"basic","BASIC-Call-Level > 0");
delete GetSbData()->pInst, GetSbData()->pInst = NULL, bDelInst = false;
// #i30690
SolarMutexGuard aSolarGuard;
2000-09-18 15:18:56 +00:00
SendHint( GetParent(), SBX_HINT_BASICSTOP, pMeth );
GlobalRunDeInit();
#ifdef DBG_UTIL
ResetCapturedAssertions();
#endif
if( xVBACompat.is() )
{
// notify all VBA script listeners about the stopped script
try
{
xVBACompat->broadcastVBAScriptEvent( script::vba::VBAScriptEventId::SCRIPT_STOPPED, GetName() );
}
catch(const uno::Exception& )
{
}
// VBA always ensures screenupdating is enabled after completing
::basic::vba::lockControllersOfAllDocuments( xModel, sal_False );
::basic::vba::enableContainerWindowsOfAllDocuments( xModel, sal_True );
}
#ifdef DBG_TRACE_BASIC
dbg_DeInitTrace();
#endif
2000-09-18 15:18:56 +00:00
}
}
else
2012-01-15 16:15:08 +01:00
GetSbData()->pInst->nCallLvl--; // Call-Level down again
2000-09-18 15:18:56 +00:00
}
else
{
2012-01-15 16:15:08 +01:00
GetSbData()->pInst->nCallLvl--; // Call-Level down again
2000-09-18 15:18:56 +00:00
StarBASIC::FatalError( SbERR_STACK_OVERFLOW );
}
StarBASIC* pBasic = PTR_CAST(StarBASIC,GetParent());
2000-09-18 15:18:56 +00:00
if( bDelInst )
{
2010-10-06 22:33:21 +02:00
// #57841 Clear Uno-Objects, which were helt in RTL functions,
// the end of the program, so that nothing were helt.
2000-09-18 15:18:56 +00:00
ClearUnoObjectsInRTL_Impl( xBasic );
2012-01-15 16:15:08 +01:00
delete GetSbData()->pInst;
GetSbData()->pInst = NULL;
2000-09-18 15:18:56 +00:00
}
2012-01-15 16:15:08 +01:00
if ( pBasic && pBasic->IsDocBasic() && pBasic->IsQuitApplication() && !GetSbData()->pInst )
bQuit = true;
if ( bQuit )
{
Application::PostUserEvent( LINK( &AsyncQuitHandler::instance(), AsyncQuitHandler, OnAsyncQuit ), NULL );
}
2000-09-18 15:18:56 +00:00
return nRes;
}
2010-10-06 22:33:21 +02:00
// Execute of the init method of a module after the loading
// or the compilation
2000-09-18 15:18:56 +00:00
void SbModule::RunInit()
{
if( pImage
&& !pImage->bInit
&& pImage->GetFlag( SBIMG_INITCODE ) )
{
2010-10-06 22:33:21 +02:00
// Set flag, so that RunInit get activ (Testtool)
GetSbData()->bRunInit = true;
2000-09-18 15:18:56 +00:00
2012-01-15 16:15:08 +01:00
SbModule* pOldMod = GetSbData()->pMod;
GetSbData()->pMod = this;
2010-10-06 22:33:21 +02:00
// The init code starts always here
2000-09-18 15:18:56 +00:00
SbiRuntime* pRt = new SbiRuntime( this, NULL, 0 );
2012-01-15 16:15:08 +01:00
pRt->pNext = GetSbData()->pInst->pRun;
GetSbData()->pInst->pRun = pRt;
2000-09-18 15:18:56 +00:00
while( pRt->Step() ) {}
2012-01-15 16:15:08 +01:00
GetSbData()->pInst->pRun = pRt->pNext;
2000-09-18 15:18:56 +00:00
delete pRt;
2012-01-15 16:15:08 +01:00
GetSbData()->pMod = pOldMod;
pImage->bInit = true;
pImage->bFirstInit = false;
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// RunInit is not activ anymore
GetSbData()->bRunInit = false;
2000-09-18 15:18:56 +00:00
}
}
2010-10-06 22:33:21 +02:00
// Delete with private/dim declared variables
void SbModule::AddVarName( const OUString& aName )
{
// see if the name is added already
std::vector< OUString >::iterator it_end = mModuleVariableNames.end();
for ( std::vector< OUString >::iterator it = mModuleVariableNames.begin(); it != it_end; ++it )
{
if ( aName == *it )
return;
}
mModuleVariableNames.push_back( aName );
}
void SbModule::RemoveVars()
{
std::vector< OUString >::iterator it_end = mModuleVariableNames.end();
for ( std::vector< OUString >::iterator it = mModuleVariableNames.begin(); it != it_end; ++it )
{
// We don't want a Find being called in a derived class ( e.g.
// SbUserform because it could trigger say an initialise event
// which would cause basic to be re-run in the middle of the init ( and remember RemoveVars is called from compile and we don't want code to run as part of the compile )
SbxVariableRef p = SbModule::Find( *it, SbxCLASS_PROPERTY );
if( p.Is() )
Remove (p);
}
}
2000-09-18 15:18:56 +00:00
void SbModule::ClearPrivateVars()
{
for( sal_uInt16 i = 0 ; i < pProps->Count() ; i++ )
2000-09-18 15:18:56 +00:00
{
SbProperty* p = PTR_CAST(SbProperty,pProps->Get( i ) );
if( p )
{
2010-10-06 22:33:21 +02:00
// Delete not the arrays, only their content
2000-09-18 15:18:56 +00:00
if( p->GetType() & SbxARRAY )
{
SbxArray* pArray = PTR_CAST(SbxArray,p->GetObject());
if( pArray )
{
for( sal_uInt16 j = 0 ; j < pArray->Count() ; j++ )
2000-09-18 15:18:56 +00:00
{
SbxVariable* pj = PTR_CAST(SbxVariable,pArray->Get( j ));
pj->SbxValue::Clear();
}
}
}
else
{
p->SbxValue::Clear();
}
}
}
}
void SbModule::implClearIfVarDependsOnDeletedBasic( SbxVariable* pVar, StarBASIC* pDeletedBasic )
{
if( pVar->SbxValue::GetType() != SbxOBJECT || pVar->ISA( SbProcedureProperty ) )
return;
SbxObject* pObj = PTR_CAST(SbxObject,pVar->GetObject());
if( pObj != NULL )
{
SbxObject* p = pObj;
SbModule* pMod = PTR_CAST( SbModule, p );
if( pMod != NULL )
pMod->ClearVarsDependingOnDeletedBasic( pDeletedBasic );
while( (p = p->GetParent()) != NULL )
{
StarBASIC* pBasic = PTR_CAST( StarBASIC, p );
if( pBasic != NULL && pBasic == pDeletedBasic )
{
pVar->SbxValue::Clear();
break;
}
}
}
}
void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic )
{
(void)pDeletedBasic;
for( sal_uInt16 i = 0 ; i < pProps->Count() ; i++ )
{
SbProperty* p = PTR_CAST(SbProperty,pProps->Get( i ) );
if( p )
{
if( p->GetType() & SbxARRAY )
{
SbxArray* pArray = PTR_CAST(SbxArray,p->GetObject());
if( pArray )
{
for( sal_uInt16 j = 0 ; j < pArray->Count() ; j++ )
{
SbxVariable* pVar = PTR_CAST(SbxVariable,pArray->Get( j ));
implClearIfVarDependsOnDeletedBasic( pVar, pDeletedBasic );
}
}
}
else
{
implClearIfVarDependsOnDeletedBasic( p, pDeletedBasic );
}
}
}
}
2000-09-18 15:18:56 +00:00
void StarBASIC::ClearAllModuleVars( void )
{
2010-10-06 22:33:21 +02:00
// Initialise the own module
for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ )
2000-09-18 15:18:56 +00:00
{
SbModule* pModule = (SbModule*)pModules->Get( nMod );
2010-10-06 22:33:21 +02:00
// Initialise only, if the startcode was already executed
if( pModule->pImage && pModule->pImage->bInit && !pModule->isProxyModule() && !pModule->ISA(SbObjModule) )
2000-09-18 15:18:56 +00:00
pModule->ClearPrivateVars();
}
2000-09-18 15:18:56 +00:00
}
2010-10-06 22:33:21 +02:00
// Execution of the init-code of all module
void SbModule::GlobalRunInit( bool bBasicStart )
2000-09-18 15:18:56 +00:00
{
2010-10-06 22:33:21 +02:00
// If no Basic-Start, only initialise, if the module is not initialised
2000-09-18 15:18:56 +00:00
if( !bBasicStart )
if( !(pImage && !pImage->bInit) )
return;
2010-10-06 22:33:21 +02:00
// Initialise GlobalInitErr-Flag for Compiler-Error
// With the help of this flags could be located in SbModule::Run() after the call of
// GlobalRunInit, if at the intialising of the module
2010-12-04 13:16:21 +09:00
// an error occurred. Then it will not be launched.
GetSbData()->bGlobalInitErr = false;
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// Parent of the module is a Basic
2000-09-18 15:18:56 +00:00
StarBASIC *pBasic = PTR_CAST(StarBASIC,GetParent());
if( pBasic )
{
pBasic->InitAllModules();
SbxObject* pParent_ = pBasic->GetParent();
if( pParent_ )
{
StarBASIC * pParentBasic = PTR_CAST(StarBASIC,pParent_);
if( pParentBasic )
{
pParentBasic->InitAllModules( pBasic );
// #109018 Parent can also have a parent (library in doc)
SbxObject* pParentParent = pParentBasic->GetParent();
if( pParentParent )
{
StarBASIC * pParentParentBasic = PTR_CAST(StarBASIC,pParentParent);
if( pParentParentBasic )
pParentParentBasic->InitAllModules( pParentBasic );
}
}
}
2000-09-18 15:18:56 +00:00
}
}
void SbModule::GlobalRunDeInit( void )
{
StarBASIC *pBasic = PTR_CAST(StarBASIC,GetParent());
if( pBasic )
{
pBasic->DeInitAllModules();
SbxObject* pParent_ = pBasic->GetParent();
if( pParent_ )
pBasic = PTR_CAST(StarBASIC,pParent_);
if( pBasic )
pBasic->DeInitAllModules();
}
}
2010-10-06 22:33:21 +02:00
// Search for the next STMNT-Command in the code. This was used from the STMNT-
// Opcode to set the endcolumn.
2000-09-18 15:18:56 +00:00
const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, sal_uInt16& nCol ) const
{
return FindNextStmnt( p, nLine, nCol, sal_False );
}
const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, sal_uInt16& nCol,
sal_Bool bFollowJumps, const SbiImage* pImg ) const
2000-09-18 15:18:56 +00:00
{
sal_uInt32 nPC = (sal_uInt32) ( p - (const sal_uInt8*) pImage->GetCode() );
2000-09-18 15:18:56 +00:00
while( nPC < pImage->GetCodeSize() )
{
SbiOpcode eOp = (SbiOpcode ) ( *p++ );
nPC++;
if( bFollowJumps && eOp == _JUMP && pImg )
{
SAL_WARN_IF( !pImg, "basic", "FindNextStmnt: pImg==NULL with FollowJumps option" );
sal_uInt32 nOp1 = *p++; nOp1 |= *p++ << 8;
nOp1 |= *p++ << 16; nOp1 |= *p++ << 24;
p = (const sal_uInt8*) pImg->GetCode() + nOp1;
}
else if( eOp >= SbOP1_START && eOp <= SbOP1_END )
p += 4, nPC += 4;
2000-09-18 15:18:56 +00:00
else if( eOp == _STMNT )
{
sal_uInt32 nl, nc;
2000-09-18 15:18:56 +00:00
nl = *p++; nl |= *p++ << 8;
nl |= *p++ << 16 ; nl |= *p++ << 24;
2000-09-18 15:18:56 +00:00
nc = *p++; nc |= *p++ << 8;
nc |= *p++ << 16 ; nc |= *p++ << 24;
nLine = (sal_uInt16)nl; nCol = (sal_uInt16)nc;
2000-09-18 15:18:56 +00:00
return p;
}
else if( eOp >= SbOP2_START && eOp <= SbOP2_END )
p += 8, nPC += 8;
2000-09-18 15:18:56 +00:00
else if( !( eOp >= SbOP0_START && eOp <= SbOP0_END ) )
{
StarBASIC::FatalError( SbERR_INTERNAL_ERROR );
break;
}
}
return NULL;
}
2010-10-06 22:33:21 +02:00
// Test, if a line contains STMNT-Opcodes
2000-09-18 15:18:56 +00:00
sal_Bool SbModule::IsBreakable( sal_uInt16 nLine ) const
2000-09-18 15:18:56 +00:00
{
if( !pImage )
return sal_False;
const sal_uInt8* p = (const sal_uInt8* ) pImage->GetCode();
sal_uInt16 nl, nc;
2000-09-18 15:18:56 +00:00
while( ( p = FindNextStmnt( p, nl, nc ) ) != NULL )
if( nl == nLine )
return sal_True;
return sal_False;
2000-09-18 15:18:56 +00:00
}
sal_Bool SbModule::IsBP( sal_uInt16 nLine ) const
2000-09-18 15:18:56 +00:00
{
if( pBreaks )
{
for( size_t i = 0; i < pBreaks->size(); i++ )
2000-09-18 15:18:56 +00:00
{
sal_uInt16 b = pBreaks->operator[]( i );
2000-09-18 15:18:56 +00:00
if( b == nLine )
return sal_True;
2000-09-18 15:18:56 +00:00
if( b < nLine )
break;
}
}
return sal_False;
2000-09-18 15:18:56 +00:00
}
sal_Bool SbModule::SetBP( sal_uInt16 nLine )
2000-09-18 15:18:56 +00:00
{
if( !IsBreakable( nLine ) )
return sal_False;
2000-09-18 15:18:56 +00:00
if( !pBreaks )
pBreaks = new SbiBreakpoints;
size_t i;
for( i = 0; i < pBreaks->size(); i++ )
2000-09-18 15:18:56 +00:00
{
sal_uInt16 b = pBreaks->operator[]( i );
2000-09-18 15:18:56 +00:00
if( b == nLine )
return sal_True;
2000-09-18 15:18:56 +00:00
if( b < nLine )
break;
}
pBreaks->insert( pBreaks->begin() + i, nLine );
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// #38568: Set during runtime as well here SbDEBUG_BREAK
2012-01-15 16:15:08 +01:00
if( GetSbData()->pInst && GetSbData()->pInst->pRun )
GetSbData()->pInst->pRun->SetDebugFlags( SbDEBUG_BREAK );
2000-09-18 15:18:56 +00:00
return IsBreakable( nLine );
}
sal_Bool SbModule::ClearBP( sal_uInt16 nLine )
2000-09-18 15:18:56 +00:00
{
sal_Bool bRes = sal_False;
2000-09-18 15:18:56 +00:00
if( pBreaks )
{
for( size_t i = 0; i < pBreaks->size(); i++ )
2000-09-18 15:18:56 +00:00
{
sal_uInt16 b = pBreaks->operator[]( i );
2000-09-18 15:18:56 +00:00
if( b == nLine )
{
pBreaks->erase( pBreaks->begin() + i );
bRes = sal_True;
break;
2000-09-18 15:18:56 +00:00
}
if( b < nLine )
break;
}
if( pBreaks->empty() )
2000-09-18 15:18:56 +00:00
delete pBreaks, pBreaks = NULL;
}
return bRes;
}
void SbModule::ClearAllBP()
{
delete pBreaks;
pBreaks = NULL;
2000-09-18 15:18:56 +00:00
}
void
SbModule::fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg ) const
{
if ( !pImg )
pImg = pImage;
for( sal_uInt32 i = 0; i < pMethods->Count(); i++ )
{
SbMethod* pMeth = PTR_CAST(SbMethod,pMethods->Get( (sal_uInt16)i ) );
if( pMeth )
{
//fixup method start positions
if ( bCvtToLegacy )
pMeth->nStart = pImg->CalcLegacyOffset( pMeth->nStart );
else
pMeth->nStart = pImg->CalcNewOffset( (sal_uInt16)pMeth->nStart );
}
}
}
sal_Bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
2000-09-18 15:18:56 +00:00
{
Clear();
if( !SbxObject::LoadData( rStrm, 1 ) )
return sal_False;
2010-10-06 22:33:21 +02:00
// As a precaution...
2000-09-18 15:18:56 +00:00
SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH );
sal_uInt8 bImage;
2000-09-18 15:18:56 +00:00
rStrm >> bImage;
if( bImage )
{
SbiImage* p = new SbiImage;
sal_uInt32 nImgVer = 0;
if( !p->Load( rStrm, nImgVer ) )
2000-09-18 15:18:56 +00:00
{
delete p;
return sal_False;
2000-09-18 15:18:56 +00:00
}
// If the image is in old format, we fix up the method start offsets
if ( nImgVer < B_EXT_IMG_VERSION )
{
fixUpMethodStart( false, p );
p->ReleaseLegacyBuffer();
}
2000-09-18 15:18:56 +00:00
aComment = p->aComment;
SetName( p->aName );
if( p->GetCodeSize() )
{
aOUSource = p->aOUSource;
2010-10-06 22:33:21 +02:00
// Old version: image away
2000-09-18 15:18:56 +00:00
if( nVer == 1 )
{
SetSource32( p->aOUSource );
2000-09-18 15:18:56 +00:00
delete p;
}
else
pImage = p;
}
else
{
SetSource32( p->aOUSource );
2000-09-18 15:18:56 +00:00
delete p;
}
}
return sal_True;
2000-09-18 15:18:56 +00:00
}
sal_Bool SbModule::StoreData( SvStream& rStrm ) const
2000-09-18 15:18:56 +00:00
{
bool bFixup = ( pImage && !pImage->ExceedsLegacyLimits() );
if ( bFixup )
fixUpMethodStart( true );
sal_Bool bRet = SbxObject::StoreData( rStrm );
if ( !bRet )
return sal_False;
2000-09-18 15:18:56 +00:00
if( pImage )
{
pImage->aOUSource = aOUSource;
2000-09-18 15:18:56 +00:00
pImage->aComment = aComment;
pImage->aName = GetName();
rStrm << (sal_uInt8) 1;
// # PCode is saved only for legacy formats only
// It should be noted that it probably isn't necessary
// It would be better not to store the image ( more flexible with
// formats )
bool bRes = pImage->Save( rStrm, B_LEGACYVERSION );
if ( bFixup )
fixUpMethodStart( false ); // restore method starts
return bRes;
2000-09-18 15:18:56 +00:00
}
else
{
SbiImage aImg;
aImg.aOUSource = aOUSource;
2000-09-18 15:18:56 +00:00
aImg.aComment = aComment;
aImg.aName = GetName();
rStrm << (sal_uInt8) 1;
2000-09-18 15:18:56 +00:00
return aImg.Save( rStrm );
}
}
sal_Bool SbModule::ExceedsLegacyModuleSize()
{
if ( !IsCompiled() )
Compile();
if ( pImage && pImage->ExceedsLegacyLimits() )
return true;
return false;
}
class ErrorHdlResetter
{
Link mErrHandler;
bool mbError;
public:
ErrorHdlResetter() : mbError( false )
{
// save error handler
mErrHandler = StarBASIC::GetGlobalErrorHdl();
// set new error handler
StarBASIC::SetGlobalErrorHdl( LINK( this, ErrorHdlResetter, BasicErrorHdl ) );
}
~ErrorHdlResetter()
{
// restore error handler
StarBASIC::SetGlobalErrorHdl(mErrHandler);
}
DECL_LINK( BasicErrorHdl, StarBASIC * );
bool HasError() { return mbError; }
};
IMPL_LINK( ErrorHdlResetter, BasicErrorHdl, StarBASIC *, /*pBasic*/)
{
mbError = true;
return 0;
}
void SbModule::GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache)
{
ErrorHdlResetter aErrHdl;
SbxBase::ResetError();
SbiParser* pParser = new SbiParser( (StarBASIC*) GetParent(), this );
pParser->SetCodeCompleting(true);
while( pParser->Parse() ) {}
SbiSymPool* pPool = pParser->pPool;
//CodeCompleteVarTypes aGlobVarTypes;
aCache.Clear();
for( sal_uInt16 i = 0; i < pPool->GetSize(); ++i )
{
SbiSymDef* pSymDef = pPool->Get(i);
//std::cerr << "i: " << i << ", type: " << pSymDef->GetType() << std::endl;
if( pSymDef->GetType() == SbxOBJECT )
{
if( !pParser->aGblStrings.Find( pSymDef->GetTypeId() ).isEmpty() )
{
//aGlobVarTypes.insert( CodeCompleteVarTypes::value_type( pSymDef->GetName(), pParser->aGblStrings.Find( pSymDef->GetTypeId() ) ) );
aCache.InsertGlobalVar( pSymDef->GetName(), pParser->aGblStrings.Find(pSymDef->GetTypeId()) );
}
}
SbiSymPool& pChildPool = pSymDef->GetPool();
//CodeCompleteVarTypes aLocVarTypes;
for(sal_uInt16 j = 0; j < pChildPool.GetSize(); ++j )
{
SbiSymDef* pChildSymDef = pChildPool.Get(j);
//std::cerr << "j: " << j << ", type: " << pChildSymDef->GetType() << std::endl;
if( pChildSymDef->GetType() == SbxOBJECT )
{
if( !pParser->aGblStrings.Find( pChildSymDef->GetTypeId() ).isEmpty() )
{
//aLocVarTypes.insert( CodeCompleteVarTypes::value_type( pChildSymDef->GetName(), pParser->aGblStrings.Find( pChildSymDef->GetTypeId() ) ) );
aCache.InsertLocalVar( pSymDef->GetName(), pChildSymDef->GetName(), pParser->aGblStrings.Find(pChildSymDef->GetTypeId()) );
}
}
}
//aCache.InsertProcedure( pSymDef->GetName(), aLocVarTypes );
}
//aCache.InsertProcedure( CodeCompleteDataCache::GLOB_KEY, aGlobVarTypes );
delete pParser;
}
SbxArrayRef SbModule::GetMethods()
{
return pMethods;
}
bool SbModule::HasExeCode()
{
// And empty Image always has the Global Chain set up
static const unsigned char pEmptyImage[] = { 0x45, 0x0 , 0x0, 0x0, 0x0 };
// lets be stricter for the moment than VBA
if (!IsCompiled())
{
ErrorHdlResetter aGblErrHdl;
Compile();
if (aGblErrHdl.HasError()) //assume unsafe on compile error
return true;
}
bool bRes = false;
if (pImage && !(pImage->GetCodeSize() == 5 && (memcmp(pImage->GetCode(), pEmptyImage, pImage->GetCodeSize()) == 0 )))
bRes = true;
return bRes;
}
// Store only image, no source
sal_Bool SbModule::StoreBinaryData( SvStream& rStrm )
{
return StoreBinaryData( rStrm, 0 );
}
sal_Bool SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer )
{
sal_Bool bRet = Compile();
if( bRet )
{
bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts
if ( bFixup ) // save in old image format, fix up method starts
fixUpMethodStart( true );
2001-11-14 10:11:32 +00:00
bRet = SbxObject::StoreData( rStrm );
if( bRet )
{
pImage->aOUSource = OUString();
pImage->aComment = aComment;
pImage->aName = GetName();
rStrm << (sal_uInt8) 1;
if ( nVer )
bRet = pImage->Save( rStrm, B_EXT_IMG_VERSION );
else
bRet = pImage->Save( rStrm, B_LEGACYVERSION );
if ( bFixup )
fixUpMethodStart( false ); // restore method starts
pImage->aOUSource = aOUSource;
}
}
return bRet;
}
// Called for >= OO 1.0 passwd protected libraries only
sal_Bool SbModule::LoadBinaryData( SvStream& rStrm )
{
OUString aKeepSource = aOUSource;
bool bRet = LoadData( rStrm, 2 );
LoadCompleted();
aOUSource = aKeepSource;
return bRet;
}
sal_Bool SbModule::LoadCompleted()
2000-09-18 15:18:56 +00:00
{
SbxArray* p = GetMethods();
sal_uInt16 i;
2000-09-18 15:18:56 +00:00
for( i = 0; i < p->Count(); i++ )
{
SbMethod* q = PTR_CAST(SbMethod,p->Get( i ) );
if( q )
q->pMod = this;
}
p = GetProperties();
for( i = 0; i < p->Count(); i++ )
{
SbProperty* q = PTR_CAST(SbProperty,p->Get( i ) );
if( q )
q->pMod = this;
}
return sal_True;
2000-09-18 15:18:56 +00:00
}
void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint )
{
bool bDone = false;
const SbxHint* pHint = PTR_CAST(SbxHint,&rHint);
if( pHint )
{
SbxVariable* pVar = pHint->GetVar();
SbProcedureProperty* pProcProperty = PTR_CAST( SbProcedureProperty, pVar );
if( pProcProperty )
{
bDone = true;
if( pHint->GetId() == SBX_HINT_DATAWANTED )
{
OUString aProcName("Property Get ");
aProcName += pProcProperty->GetName();
SbxVariable* pMeth = Find( aProcName, SbxCLASS_METHOD );
if( pMeth )
{
SbxValues aVals;
aVals.eType = SbxVARIANT;
SbxArray* pArg = pVar->GetParameters();
sal_uInt16 nVarParCount = (pArg != NULL) ? pArg->Count() : 0;
if( nVarParCount > 1 )
{
SbxArrayRef xMethParameters = new SbxArray;
xMethParameters->Put( pMeth, 0 ); // Method as parameter 0
for( sal_uInt16 i = 1 ; i < nVarParCount ; ++i )
{
SbxVariable* pPar = pArg->Get( i );
xMethParameters->Put( pPar, i );
}
pMeth->SetParameters( xMethParameters );
pMeth->Get( aVals );
pMeth->SetParameters( NULL );
}
else
{
pMeth->Get( aVals );
}
pVar->Put( aVals );
}
}
else if( pHint->GetId() == SBX_HINT_DATACHANGED )
{
SbxVariable* pMeth = NULL;
bool bSet = pProcProperty->isSet();
if( bSet )
{
pProcProperty->setSet( false );
OUString aProcName("Property Set " );
aProcName += pProcProperty->GetName();
pMeth = Find( aProcName, SbxCLASS_METHOD );
}
if( !pMeth ) // Let
{
OUString aProcName("Property Let " );
aProcName += pProcProperty->GetName();
pMeth = Find( aProcName, SbxCLASS_METHOD );
}
if( pMeth )
{
// Setup parameters
SbxArrayRef xArray = new SbxArray;
xArray->Put( pMeth, 0 ); // Method as parameter 0
xArray->Put( pVar, 1 );
pMeth->SetParameters( xArray );
SbxValues aVals;
pMeth->Get( aVals );
pMeth->SetParameters( NULL );
}
}
}
}
if( !bDone )
SbModule::Notify( rBC, rHint );
2000-09-18 15:18:56 +00:00
}
// Implementation SbJScriptModule (Basic module for JavaScript source code)
SbJScriptModule::SbJScriptModule( const OUString& rName )
2000-09-18 15:18:56 +00:00
:SbModule( rName )
{
}
sal_Bool SbJScriptModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
2000-09-18 15:18:56 +00:00
{
(void)nVer;
2000-09-18 15:18:56 +00:00
Clear();
if( !SbxObject::LoadData( rStrm, 1 ) )
return sal_False;
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// Get the source string
aOUSource = rStrm.ReadUniOrByteString( osl_getThreadTextEncoding() );
return sal_True;
2000-09-18 15:18:56 +00:00
}
sal_Bool SbJScriptModule::StoreData( SvStream& rStrm ) const
2000-09-18 15:18:56 +00:00
{
if( !SbxObject::StoreData( rStrm ) )
return sal_False;
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// Write the source string
OUString aTmp = aOUSource;
rStrm.WriteUniOrByteString( aTmp, osl_getThreadTextEncoding() );
return sal_True;
2000-09-18 15:18:56 +00:00
}
/////////////////////////////////////////////////////////////////////////
SbMethod::SbMethod( const OUString& r, SbxDataType t, SbModule* p )
2000-09-18 15:18:56 +00:00
: SbxMethod( r, t ), pMod( p )
{
bInvalid = sal_True;
2000-09-18 15:18:56 +00:00
nStart =
nDebugFlags =
nLine1 =
nLine2 = 0;
refStatics = new SbxArray;
mCaller = 0;
// HACK due to 'Referenz could not be saved'
2000-09-18 15:18:56 +00:00
SetFlag( SBX_NO_MODIFY );
}
SbMethod::SbMethod( const SbMethod& r )
: SvRefBase( r ), SbxMethod( r )
{
pMod = r.pMod;
bInvalid = r.bInvalid;
nStart = r.nStart;
nDebugFlags = r.nDebugFlags;
nLine1 = r.nLine1;
nLine2 = r.nLine2;
refStatics = r.refStatics;
mCaller = r.mCaller;
SetFlag( SBX_NO_MODIFY );
}
2000-09-18 15:18:56 +00:00
SbMethod::~SbMethod()
{
}
2000-09-18 15:18:56 +00:00
void SbMethod::ClearStatics()
{
refStatics = new SbxArray;
}
2000-09-18 15:18:56 +00:00
SbxArray* SbMethod::GetStatics()
{
return refStatics;
2000-09-18 15:18:56 +00:00
}
sal_Bool SbMethod::LoadData( SvStream& rStrm, sal_uInt16 nVer )
2000-09-18 15:18:56 +00:00
{
if( !SbxMethod::LoadData( rStrm, 1 ) )
return sal_False;
sal_Int16 n;
2000-09-18 15:18:56 +00:00
rStrm >> n;
sal_Int16 nTempStart = (sal_Int16)nStart;
2000-09-18 15:18:56 +00:00
if( nVer == 2 )
rStrm >> nLine1 >> nLine2 >> nTempStart >> bInvalid;
// HACK ue to 'Referenz could not be saved'
2000-09-18 15:18:56 +00:00
SetFlag( SBX_NO_MODIFY );
nStart = nTempStart;
return sal_True;
2000-09-18 15:18:56 +00:00
}
sal_Bool SbMethod::StoreData( SvStream& rStrm ) const
2000-09-18 15:18:56 +00:00
{
if( !SbxMethod::StoreData( rStrm ) )
return sal_False;
rStrm << (sal_Int16) nDebugFlags
<< (sal_Int16) nLine1
<< (sal_Int16) nLine2
<< (sal_Int16) nStart
<< (sal_uInt8) bInvalid;
return sal_True;
2000-09-18 15:18:56 +00:00
}
void SbMethod::GetLineRange( sal_uInt16& l1, sal_uInt16& l2 )
2000-09-18 15:18:56 +00:00
{
l1 = nLine1; l2 = nLine2;
}
2010-10-06 22:33:21 +02:00
// Could later be deleted
2000-09-18 15:18:56 +00:00
SbxInfo* SbMethod::GetInfo()
{
return pInfo;
}
2010-10-06 22:33:21 +02:00
// Interface to execute a method of the applications
// With special RefCounting, so that the Basic was not fired of by CloseDocument()
2010-10-06 22:33:21 +02:00
// The return value will be delivered as string.
ErrCode SbMethod::Call( SbxValue* pRet, SbxVariable* pCaller )
2000-09-18 15:18:56 +00:00
{
if ( pCaller )
{
SAL_INFO("basic", "SbMethod::Call Have been passed a caller 0x" << pCaller );
mCaller = pCaller;
}
2000-09-18 15:18:56 +00:00
// RefCount vom Modul hochzaehlen
SbModule* pMod_ = (SbModule*)GetParent();
pMod_->AddRef();
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// Increment the RefCount of the Basic
StarBASIC* pBasic = (StarBASIC*)pMod_->GetParent();
2000-09-18 15:18:56 +00:00
pBasic->AddRef();
2010-10-06 22:33:21 +02:00
// Establish the values to get the return value
2000-09-18 15:18:56 +00:00
SbxValues aVals;
aVals.eType = SbxVARIANT;
// #104083: Compile BEFORE get
if( bInvalid && !pMod_->Compile() )
StarBASIC::Error( SbERR_BAD_PROP_VALUE );
2000-09-18 15:18:56 +00:00
Get( aVals );
if ( pRet )
pRet->Put( aVals );
2010-10-06 22:33:21 +02:00
// Was there an error
2000-09-18 15:18:56 +00:00
ErrCode nErr = SbxBase::GetError();
SbxBase::ResetError();
2010-10-06 22:33:21 +02:00
// Release objects
pMod_->ReleaseRef();
2000-09-18 15:18:56 +00:00
pBasic->ReleaseRef();
mCaller = 0;
2000-09-18 15:18:56 +00:00
return nErr;
}
// #100883 Own Broadcast for SbMethod
void SbMethod::Broadcast( sal_uIntPtr nHintId )
{
if( pCst && !IsSet( SBX_NO_BROADCAST ) )
{
2010-10-06 22:33:21 +02:00
// Because the method could be called from outside, test here once again
// the authorisation
if( nHintId & SBX_HINT_DATAWANTED )
if( !CanRead() )
return;
if( nHintId & SBX_HINT_DATACHANGED )
if( !CanWrite() )
return;
if( pMod && !pMod->IsCompiled() )
pMod->Compile();
// Block broadcasts while creating new method
SfxBroadcaster* pSave = pCst;
pCst = NULL;
SbMethod* pThisCopy = new SbMethod( *this );
SbMethodRef xHolder = pThisCopy;
if( mpPar.Is() )
{
2010-10-06 22:33:21 +02:00
// Enrigister this as element 0, but don't reset the parent!
if( GetType() != SbxVOID )
mpPar->PutDirect( pThisCopy, 0 );
SetParameters( NULL );
}
pCst = pSave;
pSave->Broadcast( SbxHint( nHintId, pThisCopy ) );
sal_uInt16 nSaveFlags = GetFlags();
SetFlag( SBX_READWRITE );
pCst = NULL;
Put( pThisCopy->GetValues_Impl() );
pCst = pSave;
SetFlags( nSaveFlags );
}
}
2000-09-18 15:18:56 +00:00
2010-10-06 22:33:21 +02:00
// Implementation of SbJScriptMethod (method class as a wrapper for JavaScript-functions)
2000-09-18 15:18:56 +00:00
SbJScriptMethod::SbJScriptMethod( const OUString& r, SbxDataType t, SbModule* p )
2000-09-18 15:18:56 +00:00
: SbMethod( r, t, p )
{
}
SbJScriptMethod::~SbJScriptMethod()
{}
SbObjModule::SbObjModule( const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible )
: SbModule( rName, bIsVbaCompatible )
{
SetModuleType( mInfo.ModuleType );
if ( mInfo.ModuleType == script::ModuleType::FORM )
{
SetClassName( "Form" );
}
else if ( mInfo.ModuleObject.is() )
{
SetUnoObject( uno::makeAny( mInfo.ModuleObject ) );
}
}
SbObjModule::~SbObjModule()
{
}
void
SbObjModule::SetUnoObject( const uno::Any& aObj ) throw ( uno::RuntimeException )
{
SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxVariable*)pDocObject);
if ( pUnoObj && pUnoObj->getUnoAny() == aObj ) // object is equal, nothing to do
return;
pDocObject = new SbUnoObject( GetName(), uno::makeAny( aObj ) );
com::sun::star::uno::Reference< com::sun::star::lang::XServiceInfo > xServiceInfo( aObj, com::sun::star::uno::UNO_QUERY_THROW );
if( xServiceInfo->supportsService( "ooo.vba.excel.Worksheet" ) )
{
SetClassName( "Worksheet" );
}
else if( xServiceInfo->supportsService( "ooo.vba.excel.Workbook" ) )
{
SetClassName( "Workbook" );
}
}
SbxVariable*
SbObjModule::GetObject()
{
return pDocObject;
}
SbxVariable*
SbObjModule::Find( const OUString& rName, SbxClassType t )
{
SbxVariable* pVar = NULL;
if ( pDocObject)
pVar = pDocObject->Find( rName, t );
if ( !pVar )
pVar = SbModule::Find( rName, t );
return pVar;
}
void SbObjModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType )
{
SbModule::handleProcedureProperties( rBC, rHint );
}
typedef ::cppu::WeakImplHelper3<
awt::XTopWindowListener,
awt::XWindowListener,
document::XEventListener > FormObjEventListener_BASE;
class FormObjEventListenerImpl : public FormObjEventListener_BASE
{
SbUserFormModule* mpUserForm;
uno::Reference< lang::XComponent > mxComponent;
uno::Reference< frame::XModel > mxModel;
bool mbDisposed;
sal_Bool mbOpened;
sal_Bool mbActivated;
sal_Bool mbShowing;
FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined
FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&); // not defined
public:
FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) :
mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ),
mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False )
{
2010-03-05 20:14:25 +00:00
if ( mxComponent.is() )
{
SAL_INFO("basic", "*********** Registering the listeners");
try
{
uno::Reference< awt::XTopWindow >( mxComponent, uno::UNO_QUERY_THROW )->addTopWindowListener( this );
}
catch(const uno::Exception& ) {}
try
{
uno::Reference< awt::XWindow >( mxComponent, uno::UNO_QUERY_THROW )->addWindowListener( this );
}
catch(const uno::Exception& ) {}
}
if ( mxModel.is() )
{
try
{
uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->addEventListener( this );
}
catch(const uno::Exception& ) {}
}
}
virtual ~FormObjEventListenerImpl()
{
removeListener();
}
sal_Bool isShowing() const { return mbShowing; }
void removeListener()
{
if ( mxComponent.is() && !mbDisposed )
{
SAL_INFO("basic", "*********** Removing the listeners");
try
{
uno::Reference< awt::XTopWindow >( mxComponent, uno::UNO_QUERY_THROW )->removeTopWindowListener( this );
}
catch(const uno::Exception& ) {}
try
{
uno::Reference< awt::XWindow >( mxComponent, uno::UNO_QUERY_THROW )->removeWindowListener( this );
}
catch(const uno::Exception& ) {}
}
mxComponent.clear();
if ( mxModel.is() && !mbDisposed )
{
try
{
uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->removeEventListener( this );
}
catch(const uno::Exception& ) {}
}
mxModel.clear();
}
virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
if ( mpUserForm )
{
mbOpened = sal_True;
mbShowing = sal_True;
if ( mbActivated )
{
mbOpened = mbActivated = sal_False;
mpUserForm->triggerActivateEvent();
}
}
}
2010-10-19 23:45:24 -05:00
virtual void SAL_CALL windowClosing( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
2012-09-12 14:35:23 +01:00
#ifdef IN_THE_FUTURE
uno::Reference< awt::XDialog > xDialog( e.Source, uno::UNO_QUERY );
if ( xDialog.is() )
{
uno::Reference< awt::XControl > xControl( xDialog, uno::UNO_QUERY );
if ( xControl->getPeer().is() )
{
uno::Reference< document::XVbaMethodParameter > xVbaMethodParameter( xControl->getPeer(), uno::UNO_QUERY );
if ( xVbaMethodParameter.is() )
{
sal_Int8 nCancel = 0;
sal_Int8 nCloseMode = ::ooo::vba::VbQueryClose::vbFormControlMenu;
Sequence< Any > aParams;
aParams.realloc(2);
aParams[0] <<= nCancel;
aParams[1] <<= nCloseMode;
mpUserForm->triggerMethod( "Userform_QueryClose", aParams);
return;
}
}
}
mpUserForm->triggerMethod( "Userform_QueryClose" );
2012-09-12 14:35:23 +01:00
#endif
}
2010-10-19 23:45:24 -05:00
virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
mbOpened = sal_False;
mbShowing = sal_False;
}
virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
}
virtual void SAL_CALL windowNormalized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
}
virtual void SAL_CALL windowActivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
if ( mpUserForm )
{
mbActivated = sal_True;
if ( mbOpened )
{
mbOpened = mbActivated = sal_False;
mpUserForm->triggerActivateEvent();
}
}
}
virtual void SAL_CALL windowDeactivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
if ( mpUserForm )
mpUserForm->triggerDeactivateEvent();
}
virtual void SAL_CALL windowResized( const awt::WindowEvent& /*e*/ ) throw (uno::RuntimeException)
{
if ( mpUserForm )
{
mpUserForm->triggerResizeEvent();
mpUserForm->triggerLayoutEvent();
}
}
virtual void SAL_CALL windowMoved( const awt::WindowEvent& /*e*/ ) throw (uno::RuntimeException)
{
if ( mpUserForm )
mpUserForm->triggerLayoutEvent();
}
virtual void SAL_CALL windowShown( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
}
virtual void SAL_CALL windowHidden( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
{
}
virtual void SAL_CALL notifyEvent( const document::EventObject& rEvent ) throw (uno::RuntimeException)
{
// early dosposing on document event "OnUnload", to be sure Basic still exists when calling VBA "UserForm_Terminate"
if( rEvent.EventName == GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ) )
{
removeListener();
mbDisposed = true;
if ( mpUserForm )
mpUserForm->ResetApiObj(); // will trigger "UserForm_Terminate"
}
}
virtual void SAL_CALL disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
SAL_INFO("basic", "** Userform/Dialog disposing");
removeListener();
mbDisposed = true;
if ( mpUserForm )
mpUserForm->ResetApiObj( false ); // pass false (too late to trigger VBA events here)
}
};
SbUserFormModule::SbUserFormModule( const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsCompat )
: SbObjModule( rName, mInfo, bIsCompat )
, m_mInfo( mInfo )
, mbInit( false )
{
m_xModel.set( mInfo.ModuleObject, uno::UNO_QUERY_THROW );
}
SbUserFormModule::~SbUserFormModule()
{
}
void SbUserFormModule::ResetApiObj( bool bTriggerTerminateEvent )
{
SAL_INFO("basic", " SbUserFormModule::ResetApiObj( " << (bTriggerTerminateEvent ? "true )" : "false )") );
if ( bTriggerTerminateEvent && m_xDialog.is() ) // probably someone close the dialog window
{
triggerTerminateEvent();
}
pDocObject = NULL;
m_xDialog = NULL;
}
void SbUserFormModule::triggerMethod( const OUString& aMethodToRun )
{
Sequence< Any > aArguments;
triggerMethod( aMethodToRun, aArguments );
}
void SbUserFormModule::triggerMethod( const OUString& aMethodToRun, Sequence< Any >& aArguments )
{
SAL_INFO("basic", "*** trigger " << OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8 ).getStr() << " ***");
// Search method
SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxCLASS_METHOD );
if( pMeth )
{
if ( aArguments.getLength() > 0 ) // Setup parameters
{
SbxArrayRef xArray = new SbxArray;
xArray->Put( pMeth, 0 ); // Method as parameter 0
for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i )
{
SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT );
unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), aArguments[i] );
xArray->Put( xSbxVar, static_cast< sal_uInt16 >( i ) + 1 );
// Enable passing by ref
if ( xSbxVar->GetType() != SbxVARIANT )
xSbxVar->SetFlag( SBX_FIXED );
}
pMeth->SetParameters( xArray );
SbxValues aVals;
pMeth->Get( aVals );
for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i )
{
aArguments[i] = sbxToUnoValue( xArray->Get( static_cast< sal_uInt16 >(i) + 1) );
}
pMeth->SetParameters( NULL );
}
else
{
SbxValues aVals;
pMeth->Get( aVals );
}
}
}
void SbUserFormModule::triggerActivateEvent( void )
{
SAL_INFO("basic", "**** entering SbUserFormModule::triggerActivate");
triggerMethod( "UserForm_Activate" );
SAL_INFO("basic", "**** leaving SbUserFormModule::triggerActivate");
}
void SbUserFormModule::triggerDeactivateEvent( void )
{
SAL_INFO("basic", "**** SbUserFormModule::triggerDeactivate");
triggerMethod( "Userform_Deactivate" );
}
void SbUserFormModule::triggerInitializeEvent( void )
{
if ( mbInit )
return;
SAL_INFO("basic", "**** SbUserFormModule::triggerInitializeEvent");
static OUString aInitMethodName( "Userform_Initialize");
triggerMethod( aInitMethodName );
mbInit = true;
}
void SbUserFormModule::triggerTerminateEvent( void )
{
SAL_INFO("basic", "**** SbUserFormModule::triggerTerminateEvent");
static OUString aTermMethodName( "Userform_Terminate" );
triggerMethod( aTermMethodName );
mbInit=false;
}
void SbUserFormModule::triggerLayoutEvent( void )
{
static OUString aMethodName( "Userform_Layout" );
triggerMethod( aMethodName );
}
void SbUserFormModule::triggerResizeEvent( void )
{
static OUString aMethodName("Userform_Resize");
triggerMethod( aMethodName );
}
SbUserFormModuleInstance* SbUserFormModule::CreateInstance()
{
SbUserFormModuleInstance* pInstance = new SbUserFormModuleInstance( this, GetName(), m_mInfo, IsVBACompat() );
return pInstance;
}
SbUserFormModuleInstance::SbUserFormModuleInstance( SbUserFormModule* pParentModule,
const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat )
: SbUserFormModule( rName, mInfo, bIsVBACompat )
, m_pParentModule( pParentModule )
{
}
sal_Bool SbUserFormModuleInstance::IsClass( const OUString& rName ) const
{
sal_Bool bParentNameMatches = m_pParentModule->GetName().equalsIgnoreAsciiCase( rName );
sal_Bool bRet = bParentNameMatches || SbxObject::IsClass( rName );
return bRet;
}
SbxVariable* SbUserFormModuleInstance::Find( const OUString& rName, SbxClassType t )
{
SbxVariable* pVar = m_pParentModule->Find( rName, t );
return pVar;
}
void SbUserFormModule::Load()
{
SAL_INFO("basic", "** load() ");
// forces a load
if ( !pDocObject )
InitObject();
}
2010-10-19 23:45:24 -05:00
void SbUserFormModule::Unload()
{
SAL_INFO("basic", "** Unload() ");
sal_Int8 nCancel = 0;
sal_Int8 nCloseMode = ::ooo::vba::VbQueryClose::vbFormCode;
Sequence< Any > aParams;
aParams.realloc(2);
aParams[0] <<= nCancel;
aParams[1] <<= nCloseMode;
triggerMethod( "Userform_QueryClose", aParams);
aParams[0] >>= nCancel;
// basic boolean ( and what the user might use ) can be ambiguous ( e.g. basic true = -1 )
// test agains 0 ( false ) and assume anything else is true
// ( Note: ) this used to work ( something changes somewhere )
if (nCancel != 0)
{
return;
}
if ( m_xDialog.is() )
{
triggerTerminateEvent();
}
// Search method
SbxVariable* pMeth = SbObjModule::Find( "UnloadObject", SbxCLASS_METHOD );
if( pMeth )
{
SAL_INFO("basic", "Attempting too run the UnloadObjectMethod");
m_xDialog.clear(); //release ref to the uno object
SbxValues aVals;
bool bWaitForDispose = true; // assume dialog is showing
if ( m_DialogListener.get() )
{
bWaitForDispose = m_DialogListener->isShowing();
SAL_INFO("basic", "Showing " << bWaitForDispose );
}
pMeth->Get( aVals);
if ( !bWaitForDispose )
{
// we've either already got a dispose or we'er never going to get one
ResetApiObj();
} // else wait for dispose
SAL_INFO("basic", "UnloadObject completed ( we hope )");
}
}
2010-10-19 23:45:24 -05:00
void registerComponentToBeDisposedForBasic( Reference< XComponent > xComponent, StarBASIC* pBasic );
void SbUserFormModule::InitObject()
{
try
{
OUString aHook("VBAGlobals");
SbUnoObject* pGlobs = (SbUnoObject*)GetParent()->Find( aHook, SbxCLASS_DONTCARE );
if ( m_xModel.is() && pGlobs )
{
// broadcast INITIALIZE_USERFORM script event before the dialog is created
Reference< script::vba::XVBACompatibility > xVBACompat( getVBACompatibility( m_xModel ), uno::UNO_SET_THROW );
xVBACompat->broadcastVBAScriptEvent( script::vba::VBAScriptEventId::INITIALIZE_USERFORM, GetName() );
uno::Reference< lang::XMultiServiceFactory > xVBAFactory( pGlobs->getUnoAny(), uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
OUString sDialogUrl( "vnd.sun.star.script:" );
OUString sProjectName( "Standard" );
try
{
Reference< beans::XPropertySet > xProps( m_xModel, UNO_QUERY_THROW );
uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue( "BasicLibraries" ), uno::UNO_QUERY_THROW );
sProjectName = xVBAMode->getProjectName();
}
catch(const Exception& ) {}
sDialogUrl = sDialogUrl + sProjectName + "." + GetName() + "?location=document";
uno::Reference< awt::XDialogProvider > xProvider = awt::DialogProvider::createWithModel( xContext, m_xModel );
m_xDialog = xProvider->createDialog( sDialogUrl );
// create vba api object
uno::Sequence< uno::Any > aArgs(4);
aArgs[ 0 ] = uno::Any();
aArgs[ 1 ] <<= m_xDialog;
aArgs[ 2 ] <<= m_xModel;
aArgs[ 3 ] <<= OUString( GetParent()->GetName() );
pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( "ooo.vba.msforms.UserForm", aArgs ) ) );
uno::Reference< lang::XComponent > xComponent( m_xDialog, uno::UNO_QUERY_THROW );
// the dialog must be disposed at the end!
StarBASIC* pParentBasic = NULL;
SbxObject* pCurObject = this;
do
{
SbxObject* pObjParent = pCurObject->GetParent();
pParentBasic = PTR_CAST( StarBASIC, pObjParent );
pCurObject = pObjParent;
}
while( pParentBasic == NULL && pCurObject != NULL );
SAL_WARN_IF( pParentBasic == NULL, "basic", "pParentBasic == NULL" );
registerComponentToBeDisposedForBasic( xComponent, pParentBasic );
// if old listener object exists, remove it from dialog and document model
if( m_DialogListener.is() )
m_DialogListener->removeListener();
m_DialogListener.set( new FormObjEventListenerImpl( this, xComponent, m_xModel ) );
triggerInitializeEvent();
}
}
catch(const uno::Exception& )
{
}
}
SbxVariable*
SbUserFormModule::Find( const OUString& rName, SbxClassType t )
{
2012-01-15 16:15:08 +01:00
if ( !pDocObject && !GetSbData()->bRunInit && GetSbData()->pInst )
InitObject();
return SbObjModule::Find( rName, t );
}
2000-09-18 15:18:56 +00:00
SbProperty::SbProperty( const OUString& r, SbxDataType t, SbModule* p )
2000-09-18 15:18:56 +00:00
: SbxProperty( r, t ), pMod( p )
{
bInvalid = sal_False;
2000-09-18 15:18:56 +00:00
}
SbProperty::~SbProperty()
{}
SbProcedureProperty::~SbProcedureProperty()
{}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */