LCOV - code coverage report
Current view: top level - reportdesign/source/core/api - ReportEngineJFree.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 196 0.0 %
Date: 2012-08-25 Functions: 0 34 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 470 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #include <com/sun/star/beans/PropertyValue.hpp>
      29                 :            : #include "ReportEngineJFree.hxx"
      30                 :            : #include <comphelper/enumhelper.hxx>
      31                 :            : #include <comphelper/documentconstants.hxx>
      32                 :            : #include <comphelper/storagehelper.hxx>
      33                 :            : #include <connectivity/dbtools.hxx>
      34                 :            : #include <comphelper/sequence.hxx>
      35                 :            : #include <comphelper/mimeconfighelper.hxx>
      36                 :            : #include <comphelper/property.hxx>
      37                 :            : #include <comphelper/string.hxx>
      38                 :            : #include <com/sun/star/beans/PropertyAttribute.hpp>
      39                 :            : #include <com/sun/star/beans/NamedValue.hpp>
      40                 :            : #include <com/sun/star/frame/XComponentLoader.hpp>
      41                 :            : #include <com/sun/star/frame/FrameSearchFlag.hpp>
      42                 :            : #include <com/sun/star/embed/XTransactedObject.hpp>
      43                 :            : #include <com/sun/star/sdb/XCompletedExecution.hpp>
      44                 :            : #include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
      45                 :            : #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
      46                 :            : #include <com/sun/star/sdb/CommandType.hpp>
      47                 :            : 
      48                 :            : #include <com/sun/star/task/XInteractionHandler.hpp>
      49                 :            : #include <com/sun/star/task/XJob.hpp>
      50                 :            : 
      51                 :            : #include <tools/debug.hxx>
      52                 :            : #include <unotools/useroptions.hxx>
      53                 :            : #include <unotools/tempfile.hxx>
      54                 :            : #include <unotools/sharedunocomponent.hxx>
      55                 :            : 
      56                 :            : #include "Tools.hxx"
      57                 :            : #include "corestrings.hrc"
      58                 :            : #include "core_resource.hrc"
      59                 :            : #include "core_resource.hxx"
      60                 :            : 
      61                 :            : #include <connectivity/CommonTools.hxx>
      62                 :            : #include <rtl/ustrbuf.hxx>
      63                 :            : #include <sfx2/docfilt.hxx>
      64                 :            : // =============================================================================
      65                 :            : namespace reportdesign
      66                 :            : {
      67                 :            : // =============================================================================
      68                 :            :     using namespace com::sun::star;
      69                 :            :     using namespace comphelper;
      70                 :            : 
      71                 :            : DBG_NAME( rpt_OReportEngineJFree )
      72                 :            : // -----------------------------------------------------------------------------
      73                 :          0 : OReportEngineJFree::OReportEngineJFree( const uno::Reference< uno::XComponentContext >& context)
      74                 :            : :ReportEngineBase(m_aMutex)
      75                 :            : ,ReportEnginePropertySet(context,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),uno::Sequence< ::rtl::OUString >())
      76                 :            : ,m_xContext(context)
      77 [ #  # ][ #  # ]:          0 : ,m_nMaxRows(0)
                 [ #  # ]
      78                 :            : {
      79                 :            :     DBG_CTOR( rpt_OReportEngineJFree,NULL);
      80                 :          0 : }
      81                 :            : // -----------------------------------------------------------------------------
      82                 :            : // TODO: VirtualFunctionFinder: This is virtual function!
      83                 :            : //
      84 [ #  # ][ #  # ]:          0 : OReportEngineJFree::~OReportEngineJFree()
      85                 :            : {
      86                 :            :     DBG_DTOR( rpt_OReportEngineJFree,NULL);
      87         [ #  # ]:          0 : }
      88                 :            : //--------------------------------------------------------------------------
      89 [ #  # ][ #  # ]:          0 : IMPLEMENT_FORWARD_XINTERFACE2(OReportEngineJFree,ReportEngineBase,ReportEnginePropertySet)
      90                 :            : // -----------------------------------------------------------------------------
      91                 :          0 : void SAL_CALL OReportEngineJFree::dispose() throw(uno::RuntimeException)
      92                 :            : {
      93                 :          0 :     ReportEnginePropertySet::dispose();
      94                 :          0 :     cppu::WeakComponentImplHelperBase::dispose();
      95                 :          0 :     m_xActiveConnection.clear();
      96                 :          0 : }
      97                 :            : // -----------------------------------------------------------------------------
      98                 :          0 : ::rtl::OUString OReportEngineJFree::getImplementationName_Static(  ) throw(uno::RuntimeException)
      99                 :            : {
     100                 :          0 :     return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.OReportEngineJFree"));
     101                 :            : }
     102                 :            : 
     103                 :            : //--------------------------------------------------------------------------
     104                 :          0 : ::rtl::OUString SAL_CALL OReportEngineJFree::getImplementationName(  ) throw(uno::RuntimeException)
     105                 :            : {
     106                 :          0 :     return getImplementationName_Static();
     107                 :            : }
     108                 :            : //--------------------------------------------------------------------------
     109                 :          0 : uno::Sequence< ::rtl::OUString > OReportEngineJFree::getSupportedServiceNames_Static(  ) throw(uno::RuntimeException)
     110                 :            : {
     111                 :          0 :     uno::Sequence< ::rtl::OUString > aServices(1);
     112 [ #  # ][ #  # ]:          0 :     aServices.getArray()[0] = SERVICE_REPORTENGINE;
     113                 :            : 
     114                 :          0 :     return aServices;
     115                 :            : }
     116                 :            : //------------------------------------------------------------------------------
     117                 :          0 : uno::Reference< uno::XInterface > OReportEngineJFree::create(uno::Reference< uno::XComponentContext > const & xContext)
     118                 :            : {
     119         [ #  # ]:          0 :     return *(new OReportEngineJFree(xContext));
     120                 :            : }
     121                 :            : 
     122                 :            : //--------------------------------------------------------------------------
     123                 :          0 : uno::Sequence< ::rtl::OUString > SAL_CALL OReportEngineJFree::getSupportedServiceNames(  ) throw(uno::RuntimeException)
     124                 :            : {
     125                 :          0 :     return getSupportedServiceNames_Static();
     126                 :            : }
     127                 :            : //------------------------------------------------------------------------------
     128                 :          0 : sal_Bool SAL_CALL OReportEngineJFree::supportsService(const ::rtl::OUString& ServiceName) throw( uno::RuntimeException )
     129                 :            : {
     130         [ #  # ]:          0 :     return ::comphelper::existsValue(ServiceName,getSupportedServiceNames_Static());
     131                 :            : }
     132                 :            : // -----------------------------------------------------------------------------
     133                 :            : // XReportEngine
     134                 :            :     // Attributes
     135                 :          0 : uno::Reference< report::XReportDefinition > SAL_CALL OReportEngineJFree::getReportDefinition() throw (uno::RuntimeException)
     136                 :            : {
     137         [ #  # ]:          0 :     ::osl::MutexGuard aGuard(m_aMutex);
     138         [ #  # ]:          0 :     return m_xReport;
     139                 :            : }
     140                 :            : // -----------------------------------------------------------------------------
     141                 :          0 : void SAL_CALL OReportEngineJFree::setReportDefinition( const uno::Reference< report::XReportDefinition >& _report ) throw (lang::IllegalArgumentException, uno::RuntimeException)
     142                 :            : {
     143         [ #  # ]:          0 :     if ( !_report.is() )
     144         [ #  # ]:          0 :         throw lang::IllegalArgumentException();
     145         [ #  # ]:          0 :     BoundListeners l;
     146                 :            :     {
     147         [ #  # ]:          0 :         ::osl::MutexGuard aGuard(m_aMutex);
     148 [ #  # ][ #  # ]:          0 :         if ( m_xReport != _report )
     149                 :            :         {
     150 [ #  # ][ #  # ]:          0 :             prepareSet(PROPERTY_REPORTDEFINITION, uno::makeAny(m_xReport), uno::makeAny(_report), &l);
         [ #  # ][ #  # ]
     151         [ #  # ]:          0 :             m_xReport = _report;
     152         [ #  # ]:          0 :         }
     153                 :            :     }
     154 [ #  # ][ #  # ]:          0 :     l.notify();
     155                 :          0 : }
     156                 :            : // -----------------------------------------------------------------------------
     157                 :          0 : uno::Reference< task::XStatusIndicator > SAL_CALL OReportEngineJFree::getStatusIndicator() throw (uno::RuntimeException)
     158                 :            : {
     159         [ #  # ]:          0 :     ::osl::MutexGuard aGuard(m_aMutex);
     160         [ #  # ]:          0 :     return m_StatusIndicator;
     161                 :            : }
     162                 :            : // -----------------------------------------------------------------------------
     163                 :          0 : void SAL_CALL OReportEngineJFree::setStatusIndicator( const uno::Reference< task::XStatusIndicator >& _statusindicator ) throw (uno::RuntimeException)
     164                 :            : {
     165         [ #  # ]:          0 :     set(PROPERTY_STATUSINDICATOR,_statusindicator,m_StatusIndicator);
     166                 :          0 : }
     167                 :            : // -----------------------------------------------------------------------------
     168                 :          0 : ::rtl::OUString OReportEngineJFree::getNewOutputName()
     169                 :            : {
     170                 :          0 :     ::rtl::OUString sOutputName;
     171                 :            :     {
     172         [ #  # ]:          0 :         ::osl::MutexGuard aGuard(m_aMutex);
     173         [ #  # ]:          0 :         ::connectivity::checkDisposed(ReportEngineBase::rBHelper.bDisposed);
     174 [ #  # ][ #  # ]:          0 :         if ( !m_xReport.is() || !m_xActiveConnection.is() )
                 [ #  # ]
     175         [ #  # ]:          0 :             throw lang::IllegalArgumentException();
     176                 :            : 
     177 [ #  # ][ #  # ]:          0 :         static const ::rtl::OUString s_sMediaType(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
         [ #  # ][ #  # ]
     178                 :            :         try
     179                 :            :         {
     180 [ #  # ][ #  # ]:          0 :             const uno::Reference< lang::XMultiServiceFactory > xFactory(m_xContext->getServiceManager(),uno::UNO_QUERY_THROW);
                 [ #  # ]
     181         [ #  # ]:          0 :             MimeConfigurationHelper aConfighelper(xFactory);
     182 [ #  # ][ #  # ]:          0 :             const ::rtl::OUString sMimeType = m_xReport->getMimeType();
     183 [ #  # ][ #  # ]:          0 :             const SfxFilter* pFilter = SfxFilter::GetDefaultFilter( aConfighelper.GetDocServiceNameFromMediaType(sMimeType) );
         [ #  # ][ #  # ]
     184         [ #  # ]:          0 :             String sExt;
     185         [ #  # ]:          0 :             if ( pFilter )
     186 [ #  # ][ #  # ]:          0 :                 sExt = ::comphelper::string::stripStart(pFilter->GetDefaultExtension(), '*');
         [ #  # ][ #  # ]
                 [ #  # ]
     187                 :            :             else
     188         [ #  # ]:          0 :                 sExt = rtl::OUString(".rpt");
     189                 :            : 
     190 [ #  # ][ #  # ]:          0 :             uno::Reference< embed::XStorage > xTemp = OStorageHelper::GetTemporaryStorage(/*sFileTemp,embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE,*/uno::Reference< lang::XMultiServiceFactory >(m_xContext->getServiceManager(),uno::UNO_QUERY));
         [ #  # ][ #  # ]
     191         [ #  # ]:          0 :             utl::DisposableComponent aTemp(xTemp);
     192         [ #  # ]:          0 :             uno::Sequence< beans::PropertyValue > aEmpty;
     193         [ #  # ]:          0 :             uno::Reference< beans::XPropertySet> xStorageProp(xTemp,uno::UNO_QUERY);
     194         [ #  # ]:          0 :             if ( xStorageProp.is() )
     195                 :            :             {
     196 [ #  # ][ #  # ]:          0 :                 xStorageProp->setPropertyValue( s_sMediaType, uno::makeAny(sMimeType));
                 [ #  # ]
     197                 :            :             }
     198 [ #  # ][ #  # ]:          0 :             m_xReport->storeToStorage(xTemp,aEmpty); // store to temp file because it may contain information which isn't in the database yet.
     199                 :            : 
     200         [ #  # ]:          0 :             uno::Sequence< beans::NamedValue > aConvertedProperties(8);
     201                 :          0 :             sal_Int32 nPos = 0;
     202 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStorage"));
     203 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos++].Value <<= xTemp;
     204 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OutputStorage"));
     205                 :            : 
     206                 :          0 :             ::rtl::OUString sFileURL;
     207 [ #  # ][ #  # ]:          0 :             String sName = m_xReport->getCaption();
                 [ #  # ]
     208         [ #  # ]:          0 :             if ( !sName.Len() )
     209 [ #  # ][ #  # ]:          0 :                 sName = m_xReport->getName();
                 [ #  # ]
     210                 :            :             {
     211         [ #  # ]:          0 :                 ::utl::TempFile aTestFile(sName,sal_False,&sExt);
     212 [ #  # ][ #  # ]:          0 :                 if ( !aTestFile.IsValid() )
     213                 :            :                 {
     214 [ #  # ][ #  # ]:          0 :                     sName = RPT_RESSTRING(RID_STR_REPORT,m_xContext->getServiceManager());
         [ #  # ][ #  # ]
     215         [ #  # ]:          0 :                     ::utl::TempFile aFile(sName,sal_False,&sExt);
     216 [ #  # ][ #  # ]:          0 :                     sFileURL = aFile.GetURL();
         [ #  # ][ #  # ]
     217                 :            :                 }
     218                 :            :                 else
     219 [ #  # ][ #  # ]:          0 :                     sFileURL = aTestFile.GetURL();
         [ #  # ][ #  # ]
     220                 :            :             }
     221                 :            : 
     222 [ #  # ][ #  # ]:          0 :             uno::Reference< embed::XStorage > xOut = OStorageHelper::GetStorageFromURL(sFileURL,embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE,uno::Reference< lang::XMultiServiceFactory >(m_xContext->getServiceManager(),uno::UNO_QUERY));
         [ #  # ][ #  # ]
     223         [ #  # ]:          0 :             utl::DisposableComponent aOut(xOut);
     224         [ #  # ]:          0 :             xStorageProp.set(xOut,uno::UNO_QUERY);
     225         [ #  # ]:          0 :             if ( xStorageProp.is() )
     226                 :            :             {
     227 [ #  # ][ #  # ]:          0 :                 xStorageProp->setPropertyValue( s_sMediaType, uno::makeAny(sMimeType));
                 [ #  # ]
     228                 :            :             }
     229                 :            : 
     230 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos++].Value <<= xOut;
     231                 :            : 
     232 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos].Name = PROPERTY_REPORTDEFINITION;
     233 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos++].Value <<= m_xReport;
     234                 :            : 
     235 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos].Name = PROPERTY_ACTIVECONNECTION;
     236 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos++].Value <<= m_xActiveConnection;
     237                 :            : 
     238 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos].Name = PROPERTY_MAXROWS;
     239 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos++].Value <<= m_nMaxRows;
     240                 :            : 
     241                 :            :             // some meta data
     242         [ #  # ]:          0 :             SvtUserOptions aUserOpts;
     243 [ #  # ][ #  # ]:          0 :             ::rtl::OUStringBuffer sAuthor(aUserOpts.GetFirstName());
     244         [ #  # ]:          0 :             sAuthor.appendAscii(" ");
     245 [ #  # ][ #  # ]:          0 :             sAuthor.append(aUserOpts.GetLastName());
     246 [ #  # ][ #  # ]:          0 :             static const ::rtl::OUString s_sAuthor(RTL_CONSTASCII_USTRINGPARAM("Author"));
         [ #  # ][ #  # ]
     247         [ #  # ]:          0 :             aConvertedProperties[nPos].Name = s_sAuthor;
     248 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos++].Value <<= sAuthor.makeStringAndClear();
                 [ #  # ]
     249                 :            : 
     250 [ #  # ][ #  # ]:          0 :             static const ::rtl::OUString s_sTitle(RTL_CONSTASCII_USTRINGPARAM("Title"));
         [ #  # ][ #  # ]
     251         [ #  # ]:          0 :             aConvertedProperties[nPos].Name = s_sTitle;
     252 [ #  # ][ #  # ]:          0 :             aConvertedProperties[nPos++].Value <<= m_xReport->getCaption();
         [ #  # ][ #  # ]
     253                 :            : 
     254                 :            :             // create job factory and initialize
     255         [ #  # ]:          0 :             const ::rtl::OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(xFactory);
     256 [ #  # ][ #  # ]:          0 :             uno::Reference<task::XJob> xJob(m_xContext->getServiceManager()->createInstanceWithContext(sReportEngineServiceName,m_xContext),uno::UNO_QUERY_THROW);
         [ #  # ][ #  # ]
                 [ #  # ]
     257 [ #  # ][ #  # ]:          0 :             if ( !m_xReport->getCommand().isEmpty() )
                 [ #  # ]
     258                 :            :             {
     259 [ #  # ][ #  # ]:          0 :                 xJob->execute(aConvertedProperties);
     260         [ #  # ]:          0 :                 if ( xStorageProp.is() )
     261                 :            :                 {
     262                 :          0 :                     sOutputName = sFileURL;
     263                 :            :                 }
     264                 :            :             }
     265                 :            : 
     266         [ #  # ]:          0 :             uno::Reference<embed::XTransactedObject> xTransact(xOut,uno::UNO_QUERY);
     267 [ #  # ][ #  # ]:          0 :             if ( !sOutputName.isEmpty() && xTransact.is() )
                 [ #  # ]
     268 [ #  # ][ #  # ]:          0 :                 xTransact->commit();
     269                 :            : 
     270         [ #  # ]:          0 :             if ( sOutputName.isEmpty() )
     271 [ #  # ][ #  # ]:          0 :                 throw lang::IllegalArgumentException();
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     272                 :            :         }
     273         [ #  # ]:          0 :         catch(const uno::Exception& e)
     274                 :            :         {
     275                 :            :             (void)e; // helper to know what e contains
     276                 :          0 :             throw;
     277         [ #  # ]:          0 :         }
     278                 :            :     }
     279                 :          0 :     return sOutputName;
     280                 :            : }
     281                 :            : // -----------------------------------------------------------------------------
     282                 :            : // Methods
     283                 :          0 : uno::Reference< frame::XModel > SAL_CALL OReportEngineJFree::createDocumentModel( ) throw (lang::DisposedException, lang::IllegalArgumentException, uno::Exception, uno::RuntimeException)
     284                 :            : {
     285         [ #  # ]:          0 :     return createDocumentAlive(NULL,true);
     286                 :            : }
     287                 :            : // -----------------------------------------------------------------------------
     288                 :          0 : uno::Reference< frame::XModel > SAL_CALL OReportEngineJFree::createDocumentAlive( const uno::Reference< frame::XFrame >& _frame ) throw (lang::DisposedException, lang::IllegalArgumentException, uno::Exception, uno::RuntimeException)
     289                 :            : {
     290                 :          0 :     return createDocumentAlive(_frame,false);
     291                 :            : }
     292                 :            : // -----------------------------------------------------------------------------
     293                 :          0 : 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)
     294                 :            : {
     295                 :          0 :     uno::Reference< frame::XModel > xModel;
     296         [ #  # ]:          0 :     ::rtl::OUString sOutputName = getNewOutputName(); // starts implicite the report generator
     297         [ #  # ]:          0 :     if ( !sOutputName.isEmpty() )
     298                 :            :     {
     299         [ #  # ]:          0 :         ::osl::MutexGuard aGuard(m_aMutex);
     300         [ #  # ]:          0 :         ::connectivity::checkDisposed(ReportEngineBase::rBHelper.bDisposed);
     301         [ #  # ]:          0 :         uno::Reference<frame::XComponentLoader> xFrameLoad(_frame,uno::UNO_QUERY);
     302         [ #  # ]:          0 :         if ( !xFrameLoad.is() )
     303                 :            :         {
     304                 :            :             // if there is no frame given, find the right
     305 [ #  # ][ #  # ]:          0 :             xFrameLoad.set( m_xContext->getServiceManager()->createInstanceWithContext(
                 [ #  # ]
     306                 :            :                                                     ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))
     307                 :          0 :                                                     ,m_xContext)
     308 [ #  # ][ #  # ]:          0 :                                                     ,uno::UNO_QUERY);
                 [ #  # ]
     309         [ #  # ]:          0 :             ::rtl::OUString sTarget(RTL_CONSTASCII_USTRINGPARAM("_blank"));
     310                 :          0 :             sal_Int32 nFrameSearchFlag = frame::FrameSearchFlag::TASKS | frame::FrameSearchFlag::CREATE;
     311 [ #  # ][ #  # ]:          0 :             uno::Reference< frame::XFrame> xFrame = uno::Reference< frame::XFrame>(xFrameLoad,uno::UNO_QUERY)->findFrame(sTarget,nFrameSearchFlag);
                 [ #  # ]
     312         [ #  # ]:          0 :             xFrameLoad.set( xFrame,uno::UNO_QUERY);
     313                 :            :         }
     314                 :            : 
     315         [ #  # ]:          0 :         if ( xFrameLoad.is() )
     316                 :            :         {
     317 [ #  # ][ #  # ]:          0 :             uno::Sequence < beans::PropertyValue > aArgs( _bHidden ? 3 : 2 );
     318                 :          0 :             sal_Int32 nLen = 0;
     319 [ #  # ][ #  # ]:          0 :             aArgs[nLen].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate"));
     320 [ #  # ][ #  # ]:          0 :             aArgs[nLen++].Value <<= sal_False;
     321                 :            : 
     322 [ #  # ][ #  # ]:          0 :             aArgs[nLen].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
     323 [ #  # ][ #  # ]:          0 :             aArgs[nLen++].Value <<= sal_True;
     324                 :            : 
     325         [ #  # ]:          0 :             if ( _bHidden )
     326                 :            :             {
     327 [ #  # ][ #  # ]:          0 :                 aArgs[nLen].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hidden"));
     328 [ #  # ][ #  # ]:          0 :                 aArgs[nLen++].Value <<= sal_True;
     329                 :            :             }
     330                 :            : 
     331 [ #  # ][ #  # ]:          0 :             uno::Reference< lang::XMultiServiceFactory > xFac(m_xContext->getServiceManager(),uno::UNO_QUERY);
                 [ #  # ]
     332         [ #  # ]:          0 :             xModel.set( xFrameLoad->loadComponentFromURL(
     333                 :            :                 sOutputName,
     334                 :            :                 ::rtl::OUString(), // empty frame name
     335                 :            :                 0,
     336                 :            :                 aArgs
     337 [ #  # ][ #  # ]:          0 :                 ),uno::UNO_QUERY);
                 [ #  # ]
     338         [ #  # ]:          0 :         }
     339                 :            :     }
     340                 :          0 :     return xModel;
     341                 :            : }
     342                 :            : // -----------------------------------------------------------------------------
     343                 :          0 : util::URL SAL_CALL OReportEngineJFree::createDocument( ) throw (lang::DisposedException, lang::IllegalArgumentException, uno::Exception, uno::RuntimeException)
     344                 :            : {
     345                 :          0 :     util::URL aRet;
     346         [ #  # ]:          0 :     uno::Reference< frame::XModel > xModel = createDocumentModel();
     347         [ #  # ]:          0 :     if ( xModel.is() )
     348                 :            :     {
     349         [ #  # ]:          0 :         ::osl::MutexGuard aGuard(m_aMutex);
     350 [ #  # ][ #  # ]:          0 :         ::connectivity::checkDisposed(ReportEngineBase::rBHelper.bDisposed);
     351                 :            :     }
     352                 :          0 :     return aRet;
     353                 :            : }
     354                 :            : // -----------------------------------------------------------------------------
     355                 :          0 : void SAL_CALL OReportEngineJFree::interrupt(  ) throw (lang::DisposedException, uno::Exception, uno::RuntimeException)
     356                 :            : {
     357                 :            :     {
     358         [ #  # ]:          0 :         ::osl::MutexGuard aGuard(m_aMutex);
     359 [ #  # ][ #  # ]:          0 :         ::connectivity::checkDisposed(ReportEngineBase::rBHelper.bDisposed);
     360                 :            :     }
     361                 :          0 : }
     362                 :            : // -----------------------------------------------------------------------------
     363                 :          0 : uno::Reference< beans::XPropertySetInfo > SAL_CALL OReportEngineJFree::getPropertySetInfo(  ) throw(uno::RuntimeException)
     364                 :            : {
     365                 :          0 :     return ReportEnginePropertySet::getPropertySetInfo();
     366                 :            : }
     367                 :            : // -------------------------------------------------------------------------
     368                 :          0 : void SAL_CALL OReportEngineJFree::setPropertyValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
     369                 :            : {
     370                 :          0 :     ReportEnginePropertySet::setPropertyValue( aPropertyName, aValue );
     371                 :          0 : }
     372                 :            : // -----------------------------------------------------------------------------
     373                 :          0 : uno::Any SAL_CALL OReportEngineJFree::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     374                 :            : {
     375                 :          0 :     return ReportEnginePropertySet::getPropertyValue( PropertyName);
     376                 :            : }
     377                 :            : // -----------------------------------------------------------------------------
     378                 :          0 : void SAL_CALL OReportEngineJFree::addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     379                 :            : {
     380                 :          0 :     ReportEnginePropertySet::addPropertyChangeListener( aPropertyName, xListener );
     381                 :          0 : }
     382                 :            : // -----------------------------------------------------------------------------
     383                 :          0 : void SAL_CALL OReportEngineJFree::removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     384                 :            : {
     385                 :          0 :     ReportEnginePropertySet::removePropertyChangeListener( aPropertyName, aListener );
     386                 :          0 : }
     387                 :            : // -----------------------------------------------------------------------------
     388                 :          0 : void SAL_CALL OReportEngineJFree::addVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     389                 :            : {
     390                 :          0 :     ReportEnginePropertySet::addVetoableChangeListener( PropertyName, aListener );
     391                 :          0 : }
     392                 :            : // -----------------------------------------------------------------------------
     393                 :          0 : void SAL_CALL OReportEngineJFree::removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     394                 :            : {
     395                 :          0 :     ReportEnginePropertySet::removeVetoableChangeListener( PropertyName, aListener );
     396                 :          0 : }
     397                 :            : // -----------------------------------------------------------------------------
     398                 :          0 : uno::Reference< sdbc::XConnection > SAL_CALL OReportEngineJFree::getActiveConnection() throw (uno::RuntimeException)
     399                 :            : {
     400                 :          0 :     return m_xActiveConnection;
     401                 :            : }
     402                 :            : // -----------------------------------------------------------------------------
     403                 :          0 : void SAL_CALL OReportEngineJFree::setActiveConnection( const uno::Reference< sdbc::XConnection >& _activeconnection ) throw (lang::IllegalArgumentException, uno::RuntimeException)
     404                 :            : {
     405         [ #  # ]:          0 :     if ( !_activeconnection.is() )
     406         [ #  # ]:          0 :         throw lang::IllegalArgumentException();
     407         [ #  # ]:          0 :     set(PROPERTY_ACTIVECONNECTION,_activeconnection,m_xActiveConnection);
     408                 :          0 : }
     409                 :            : // -----------------------------------------------------------------------------
     410                 :          0 : ::sal_Int32 SAL_CALL OReportEngineJFree::getMaxRows() throw (uno::RuntimeException)
     411                 :            : {
     412         [ #  # ]:          0 :     ::osl::MutexGuard aGuard(m_aMutex);
     413         [ #  # ]:          0 :     return m_nMaxRows;
     414                 :            : }
     415                 :            : // -----------------------------------------------------------------------------
     416                 :          0 : void SAL_CALL OReportEngineJFree::setMaxRows( ::sal_Int32 _MaxRows ) throw (uno::RuntimeException)
     417                 :            : {
     418         [ #  # ]:          0 :     set(PROPERTY_MAXROWS,_MaxRows,m_nMaxRows);
     419                 :          0 : }
     420                 :            : // =============================================================================
     421                 :            : } // namespace reportdesign
     422                 :            : // =============================================================================
     423                 :            : 
     424                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10