Tag: cws_dev300_dba30d
User: oj      
Date: 2008-06-02 08:30:12+0000
Modified:
   dba/reportdesign/source/core/api/ReportEngineJFree.cxx
   dba/reportdesign/source/core/inc/ReportEngineJFree.hxx

Log:
 #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.8&r2=1.8.24.1
Delta lines:  +15 -15
---------------------
--- ReportEngineJFree.cxx       2008-04-10 18:14:17+0000        1.8
+++ ReportEngineJFree.cxx       2008-06-02 08:30:08+0000        1.8.24.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: ReportEngineJFree.cxx,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.24.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -245,22 +245,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() ) 
@@ -283,7 +277,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;
@@ -291,6 +285,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(

Directory: /dba/reportdesign/source/core/inc/
=============================================

File [changed]: ReportEngineJFree.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/inc/ReportEngineJFree.hxx?r1=1.4&r2=1.4.24.1
Delta lines:  +4 -2
-------------------
--- ReportEngineJFree.hxx       2008-04-10 18:20:11+0000        1.4
+++ ReportEngineJFree.hxx       2008-06-02 08:30:09+0000        1.4.24.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: ReportEngineJFree.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.24.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -109,6 +109,7 @@
                static ::rtl::OUString getImplementationName_Static(void) 
throw( ::com::sun::star::uno::RuntimeException );
         static ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface > SAL_CALL
                        create(::com::sun::star::uno::Reference< 
::com::sun::star::uno::XComponentContext > const & xContext);
+    private:
                // com::sun::star::beans::XPropertySet
                virtual ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) 
throw(::com::sun::star::uno::RuntimeException);
                virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& 
aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw 
(::com::sun::star::beans::UnknownPropertyException, 
::com::sun::star::beans::PropertyVetoException, 
::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException);
@@ -129,6 +130,7 @@
                        // Methods
                virtual ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XModel > SAL_CALL createDocumentModel(  ) throw 
(::com::sun::star::lang::DisposedException, 
::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) ;
                virtual ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XModel > SAL_CALL createDocumentAlive( const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _frame ) 
throw (::com::sun::star::lang::DisposedException, 
::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) ;
+        ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > 
SAL_CALL createDocumentAlive( const ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XFrame >& _frame ,bool _bHidden) throw 
(::com::sun::star::lang::DisposedException, 
::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) ;
                virtual ::com::sun::star::util::URL SAL_CALL createDocument(  ) 
throw (::com::sun::star::lang::DisposedException, 
::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) ;
                virtual void SAL_CALL interrupt(  ) throw 
(::com::sun::star::lang::DisposedException, ::com::sun::star::uno::Exception, 
::com::sun::star::uno::RuntimeException) ;
 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to