User: kz Date: 2008-06-25 11:35:42+0000 Modified: dba/reportdesign/source/core/api/ReportEngineJFree.cxx
Log: INTEGRATION: CWS dba30d (1.8.24); FILE MERGED 2008/06/02 08:30:08 oj 1.8.24.1: #i88750# load frame hidden File Changes: Directory: /dba/reportdesign/source/core/api/ ============================================= File [changed]: ReportEngineJFree.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/ReportEngineJFree.cxx?r1=1.9&r2=1.10 Delta lines: +13 -13 --------------------- --- ReportEngineJFree.cxx 2008-06-16 13:29:37+0000 1.9 +++ ReportEngineJFree.cxx 2008-06-25 11:35:39+0000 1.10 @@ -256,22 +256,16 @@ // Methods uno::Reference< frame::XModel > SAL_CALL OReportEngineJFree::createDocumentModel( ) throw (lang::DisposedException, lang::IllegalArgumentException, uno::Exception, uno::RuntimeException) { - uno::Reference< frame::XModel > xModel; - ::rtl::OUString sOutputName = getNewOutputName(); - if ( sOutputName.getLength() ) - { - uno::Reference< lang::XMultiServiceFactory > xFac(m_xContext->getServiceManager(),uno::UNO_QUERY); - ::comphelper::MimeConfigurationHelper aHelper(xFac); - ::rtl::OUString sServiceName = aHelper.GetDocServiceNameFromMediaType(m_xReport->getMimeType()); - xModel.set(m_xContext->getServiceManager()->createInstanceWithContext(sServiceName,m_xContext),uno::UNO_QUERY_THROW); - uno::Sequence< beans::PropertyValue > aArguments; - xModel->attachResource(sOutputName,aArguments); - } - return xModel; + return createDocumentAlive(NULL,true); } // ----------------------------------------------------------------------------- uno::Reference< frame::XModel > SAL_CALL OReportEngineJFree::createDocumentAlive( const uno::Reference< frame::XFrame >& _frame ) throw (lang::DisposedException, lang::IllegalArgumentException, uno::Exception, uno::RuntimeException) { + return createDocumentAlive(_frame,false); +} +// ----------------------------------------------------------------------------- +uno::Reference< frame::XModel > SAL_CALL OReportEngineJFree::createDocumentAlive( const uno::Reference< frame::XFrame >& _frame,bool _bHidden ) throw (lang::DisposedException, lang::IllegalArgumentException, uno::Exception, uno::RuntimeException) +{ uno::Reference< frame::XModel > xModel; ::rtl::OUString sOutputName = getNewOutputName(); // starts implicite the report generator if ( sOutputName.getLength() ) @@ -294,7 +288,7 @@ if ( xFrameLoad.is() ) { - uno::Sequence < beans::PropertyValue > aArgs( 2 ); + uno::Sequence < beans::PropertyValue > aArgs( _bHidden ? 3 : 2 ); sal_Int32 nLen = 0; aArgs[nLen].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")); aArgs[nLen++].Value <<= sal_False; @@ -302,6 +296,12 @@ aArgs[nLen].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); aArgs[nLen++].Value <<= sal_True; + if ( _bHidden ) + { + aArgs[nLen].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hidden")); + aArgs[nLen++].Value <<= sal_True; + } + uno::Reference< lang::XMultiServiceFactory > xFac(m_xContext->getServiceManager(),uno::UNO_QUERY); ::comphelper::MimeConfigurationHelper aHelper(xFac); xModel.set( xFrameLoad->loadComponentFromURL( --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
