Tag: cws_src680_dba24a User: oj Date: 2007-08-28 05:32:56+0000 Modified: dba/dbaccess/source/core/dataaccess/documentdefinition.cxx dba/dbaccess/source/core/dataaccess/documentdefinition.hxx
Log: #i49441# no macro execution when loading preview File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: documentdefinition.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentdefinition.cxx?r1=1.46&r2=1.46.6.1 Delta lines: +14 -14 --------------------- --- documentdefinition.cxx 2007-08-03 10:22:23+0000 1.46 +++ documentdefinition.cxx 2007-08-28 05:32:53+0000 1.46.6.1 @@ -4,9 +4,9 @@ * * $RCSfile: documentdefinition.cxx,v $ * - * $Revision: 1.46 $ + * $Revision: 1.46.6.1 $ * - * last change: $Author: hr $ $Date: 2007/08/03 10:22:23 $ + * last change: $Author: oj $ $Date: 2007/08/28 05:32:53 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -534,7 +534,7 @@ DBG_CTOR(ODocumentDefinition, NULL); registerProperties(); if ( _aClassID.getLength() ) - loadEmbeddedObject(_aClassID,_xConnection); + loadEmbeddedObject(MacroExecMode::USE_CONFIG,_aClassID,_xConnection); } //-------------------------------------------------------------------------- @@ -892,7 +892,7 @@ if ( m_pImpl->m_aProps.sPersistentName.getLength() ) { m_bOpenInDesign = bOpenInDesign; - loadEmbeddedObject(Sequence< sal_Int8 >(),xConnection,!bOpenInDesign); + loadEmbeddedObject(MacroExecMode::USE_CONFIG,Sequence< sal_Int8 >(),xConnection,!bOpenInDesign); if ( m_xEmbeddedObject.is() ) { xModel.set(getComponent(),UNO_QUERY); @@ -946,7 +946,7 @@ Reference< XStorage> xStorage(aIni[0],UNO_QUERY); ::rtl::OUString sPersistentName; aIni[1] >>= sPersistentName; - loadEmbeddedObject( Sequence< sal_Int8 >(), Reference< XConnection >(), sal_False ); + loadEmbeddedObject(MacroExecMode::USE_CONFIG, Sequence< sal_Int8 >(), Reference< XConnection >(), sal_False ); Reference<XEmbedPersist> xPersist(m_xEmbeddedObject,UNO_QUERY); if ( xPersist.is() ) { @@ -1209,7 +1209,7 @@ return sal_True; } // ----------------------------------------------------------------------------- -void ODocumentDefinition::fillLoadArgs(Sequence<PropertyValue>& _rArgs,Sequence<PropertyValue>& _rEmbeddedObjectDescriptor,const Reference<XConnection>& _xConnection,sal_Bool _bReadOnly) +void ODocumentDefinition::fillLoadArgs(Sequence<PropertyValue>& _rArgs,Sequence<PropertyValue>& _rEmbeddedObjectDescriptor,const Reference<XConnection>& _xConnection,sal_Bool _bReadOnly,sal_Int16 _nMarcoExcecMode) { sal_Int32 nLen = _rArgs.getLength(); { @@ -1230,7 +1230,7 @@ _rArgs[nLen++].Value <<= _bReadOnly; _rArgs[nLen].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode")); - _rArgs[nLen++].Value <<= MacroExecMode::USE_CONFIG; + _rArgs[nLen++].Value <<= _nMarcoExcecMode; if ( m_pImpl->m_aProps.aTitle.getLength() ) { @@ -1280,7 +1280,7 @@ _rEmbeddedObjectDescriptor[nLen++].Value <<= aOutFrameProps; } // ----------------------------------------------------------------------------- -void ODocumentDefinition::loadEmbeddedObject(const Sequence< sal_Int8 >& _aClassID,const Reference<XConnection>& _xConnection,sal_Bool _bReadOnly) +void ODocumentDefinition::loadEmbeddedObject(sal_Int16 _nMarcoExcecMode,const Sequence< sal_Int8 >& _aClassID,const Reference<XConnection>& _xConnection,sal_Bool _bReadOnly) { if ( !m_xEmbeddedObject.is() ) { @@ -1331,7 +1331,7 @@ OSL_ENSURE( aClassID.getLength(),"No Class ID" ); Sequence<PropertyValue> aArgs,aEmbeddedObjectDescriptor; - fillLoadArgs(aArgs,aEmbeddedObjectDescriptor,_xConnection,_bReadOnly); + fillLoadArgs(aArgs,aEmbeddedObjectDescriptor,_xConnection,_bReadOnly,_nMarcoExcecMode); m_xEmbeddedObject.set(xEmbedFactory->createInstanceUserInit(aClassID ,sDocumentService @@ -1374,7 +1374,7 @@ m_xEmbeddedObject->setClientSite(xClient); Sequence<PropertyValue> aArgs,aEmbeddedObjectDescriptor; - fillLoadArgs(aArgs,aEmbeddedObjectDescriptor,_xConnection,_bReadOnly); + fillLoadArgs(aArgs,aEmbeddedObjectDescriptor,_xConnection,_bReadOnly,_nMarcoExcecMode); Reference<XCommonEmbedPersist> xCommon(m_xEmbeddedObject,UNO_QUERY); OSL_ENSURE(xCommon.is(),"unsupported interface!"); if ( xCommon.is() ) @@ -1412,7 +1412,7 @@ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentTitle" ) )] <<= m_pImpl->m_aProps.aTitle; aHelper[ - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MacroExecutionMode" ))] <<= MacroExecMode::USE_CONFIG; + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MacroExecutionMode" ))] <<= _nMarcoExcecMode; aHelper >> aArgs; @@ -1422,7 +1422,7 @@ // ----------------------------------------------------------------------------- void ODocumentDefinition::generateNewImage(Any& _rImage) { - loadEmbeddedObject( Sequence< sal_Int8 >(), Reference< XConnection >(), sal_True ); + loadEmbeddedObject( MacroExecMode::NEVER_EXECUTE,Sequence< sal_Int8 >(), Reference< XConnection >(), sal_True ); if ( m_xEmbeddedObject.is() ) { try @@ -1451,7 +1451,7 @@ // ----------------------------------------------------------------------------- void ODocumentDefinition::fillDocumentInfo(Any& _rInfo) { - loadEmbeddedObject( Sequence< sal_Int8 >(), Reference< XConnection >(), sal_True ); + loadEmbeddedObject( MacroExecMode::NEVER_EXECUTE,Sequence< sal_Int8 >(), Reference< XConnection >(), sal_True ); if ( m_xEmbeddedObject.is() ) { try File [changed]: documentdefinition.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentdefinition.hxx?r1=1.22&r2=1.22.6.1 Delta lines: +12 -6 -------------------- --- documentdefinition.hxx 2007-08-02 14:25:38+0000 1.22 +++ documentdefinition.hxx 2007-08-28 05:32:54+0000 1.22.6.1 @@ -4,9 +4,9 @@ * * $RCSfile: documentdefinition.hxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.22.6.1 $ * - * last change: $Author: hr $ $Date: 2007/08/02 14:25:38 $ + * last change: $Author: oj $ $Date: 2007/08/28 05:32:54 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -113,18 +113,24 @@ * * \param _rArgs * \param _rEmbeddedObjectDescriptor + * \param _xConnection + * \param _bReadOnly + * \param _nMarcoExcecMode */ void fillLoadArgs(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _rArgs , ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _rEmbeddedObjectDescriptor ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection - ,sal_Bool _bReadOnly); + ,sal_Bool _bReadOnly + ,sal_Int16 _nMarcoExcecMode); /** loads the EmbeddedObject if not already loaded @param _aClassID If set, it will be used to create the embedded object. */ - void loadEmbeddedObject(const ::com::sun::star::uno::Sequence< sal_Int8 >& _aClassID = ::com::sun::star::uno::Sequence< sal_Int8 >() + void loadEmbeddedObject(sal_Int16 _nMarcoExcecMode + ,const ::com::sun::star::uno::Sequence< sal_Int8 >& _aClassID = ::com::sun::star::uno::Sequence< sal_Int8 >() ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>() - ,sal_Bool _bReadOnly = sal_False); + ,sal_Bool _bReadOnly = sal_False + ); void generateNewImage(::com::sun::star::uno::Any& _rImage); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
