User: obo Date: 05/12/21 05:36:07 Modified: /dba/dbaccess/source/core/dataaccess/ documentdefinition.cxx
Log: INTEGRATION: CWS dba202a (1.29.22); FILE MERGED 2005/11/24 16:33:31 fs 1.29.22.2: RESYNC: (1.29-1.32); FILE MERGED 2005/11/01 09:03:16 fs 1.29.22.1: #i57097# +getDefaultDocumentTypeClassId 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.32&r2=1.33 Delta lines: +14 -43 --------------------- --- documentdefinition.cxx 3 Nov 2005 12:35:42 -0000 1.32 +++ documentdefinition.cxx 21 Dec 2005 13:36:04 -0000 1.33 @@ -315,28 +315,19 @@ virtual void SAL_CALL saveObject( ) throw (ObjectSaveVetoException, Exception, RuntimeException) { - if ( m_pClient ) - m_pClient->saveObject(); } virtual void SAL_CALL onShowWindow( sal_Bool bVisible ) throw (RuntimeException) { - if ( m_pClient ) - m_pClient->onShowWindow(bVisible); } // XComponentSupplier virtual Reference< ::com::sun::star::util::XCloseable > SAL_CALL getComponent( ) throw (RuntimeException) { - Reference< ::com::sun::star::util::XCloseable > xRet; - // if ( m_pClient ) - // xRet = m_pClient->getComponent(); - return xRet; + return Reference< css::util::XCloseable >(); } // XEmbeddedClient virtual void SAL_CALL visibilityChanged( ::sal_Bool bVisible ) throw (WrongStateException, RuntimeException) { - if ( m_pClient ) - m_pClient->visibilityChanged( bVisible ); } inline void resetClient(ODocumentDefinition* _pClient) { m_pClient = _pClient; } }; @@ -1041,10 +1032,6 @@ // inserted(); } // ----------------------------------------------------------------------------- -void SAL_CALL ODocumentDefinition::saveObject( ) throw (ObjectSaveVetoException, Exception, RuntimeException) -{ -} -// ----------------------------------------------------------------------------- sal_Bool ODocumentDefinition::save(sal_Bool _bApprove) { // default handling: instantiate an interaction handler and let it handle the parameter request @@ -1180,6 +1167,12 @@ _rEmbeddedObjectDescriptor[nLen++].Value <<= xInterceptor; } // ----------------------------------------------------------------------------- +Sequence< sal_Int8 > ODocumentDefinition::getDefaultDocumentTypeClassId() +{ + return lcl_GetSequenceClassID( SO3_SW_CLASSID ); +} + +// ----------------------------------------------------------------------------- void ODocumentDefinition::loadEmbeddedObject(const Sequence< sal_Int8 >& _aClassID,const Reference<XConnection>& _xConnection,sal_Bool _bReadOnly) { if ( !m_xEmbeddedObject.is() ) @@ -1201,7 +1194,7 @@ } else { - aClassID = lcl_GetSequenceClassID(SO3_SW_CLASSID); + aClassID = getDefaultDocumentTypeClassId(); sDocumentService = lcl_GetDocumentServiceFromMediaType(xStorage,m_pImpl->m_aProps.sPersistentName); } @@ -1241,7 +1234,10 @@ else if ( m_xEmbeddedObject->getCurrentState() == EmbedStates::LOADED ) { if ( !m_pClientHelper ) + { m_pClientHelper = new OEmbeddedClientHelper(this); + m_pClientHelper->acquire(); + } Reference<XEmbeddedClient> xClient = m_pClientHelper; m_xEmbeddedObject->setClientSite(xClient); @@ -1295,11 +1291,6 @@ } } // ----------------------------------------------------------------------------- -void SAL_CALL ODocumentDefinition::onShowWindow( sal_Bool bVisible ) throw (RuntimeException) -{ - ::osl::MutexGuard aGuard(m_aMutex); -} -// ----------------------------------------------------------------------------- void ODocumentDefinition::generateNewImage(Any& _rImage) { loadEmbeddedObject( Sequence< sal_Int8 >(), Reference< XConnection >(), sal_True ); @@ -1371,26 +1362,6 @@ } } return xComp; -} -// ----------------------------------------------------------------------------- -void SAL_CALL ODocumentDefinition::visibilityChanged( ::sal_Bool bVisible ) throw (WrongStateException, RuntimeException) -{ -// ::osl::MutexGuard aGuard(m_aMutex); -// if ( m_xEmbeddedObject.is() && !bVisible ) -// { -// try -// { -// Reference< com::sun::star::util::XCloseable> xCloseable(m_xEmbeddedObject,UNO_QUERY); -// if ( xCloseable.is() ) -// xCloseable->close(sal_True); -// } -// catch(Exception) -// { -// } -// m_xEmbeddedObject = NULL; -// if ( m_pClientHelper ) -// m_pClientHelper->resetClient(NULL); -// } } // ----------------------------------------------------------------------------- void SAL_CALL ODocumentDefinition::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
