User: rt      
Date: 2008-07-10 15:54:51+0000
Modified:
   dba/reportdesign/source/core/api/ReportDefinition.cxx

Log:
 INTEGRATION: CWS rptfix02 (1.10.2); FILE MERGED
 2008/07/01 14:08:35 oj 1.10.2.1: #i91253# handle old version which do not have 
a meta.xml file

File Changes:

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

File [changed]: ReportDefinition.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/ReportDefinition.cxx?r1=1.10&r2=1.11
Delta lines:  +30 -2
--------------------
--- ReportDefinition.cxx        2008-06-25 14:15:35+0000        1.10
+++ ReportDefinition.cxx        2008-07-10 15:54:49+0000        1.11
@@ -527,6 +527,7 @@
     uno::Reference< sdbc::XConnection>                      
m_xActiveConnection;
     uno::Reference< frame::XTitle >                         m_xTitleHelper;
     uno::Reference< frame::XUntitledNumbers >               
m_xNumberedControllers;
+    uno::Reference< document::XDocumentProperties >         
m_xDocumentProperties;
 
     ::boost::shared_ptr< ::comphelper::EmbeddedObjectContainer>                
  
                                                             m_pObjectContainer;
@@ -1413,6 +1414,21 @@
     if( !bErr )
        {
                if( !WriteThroughComponent(
+                       xCom, "meta.xml",
+                       "com.sun.star.comp.report.XMLMetaExporter",
+                       aDelegatorArguments, aProps, sal_True,_xStorageToSaveTo 
) )
+               {
+                       if( !bWarn )
+                       {
+                               bWarn = sal_True;
+                               sWarnFile = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("meta.xml"));
+                       }
+               }
+       } // if( !bErr )
+
+    if( !bErr )
+       {
+               if( !WriteThroughComponent(
                        xCom, "styles.xml",
                        "com.sun.star.comp.report.XMLStylesExporter",
                        aDelegatorArguments, aProps, sal_True,_xStorageToSaveTo 
) )
@@ -2583,7 +2599,6 @@
     {
         uno::Reference< frame::XModel > xThis   (static_cast< frame::XModel* 
>(this), uno::UNO_QUERY_THROW);
         ::comphelper::NumberedCollection*         pHelper = new 
::comphelper::NumberedCollection();
-    
         m_pImpl->m_xNumberedControllers = uno::Reference< 
frame::XUntitledNumbers >(static_cast< ::cppu::OWeakObject* >(pHelper), 
uno::UNO_QUERY_THROW);
     
         pHelper->setOwner          (xThis);
@@ -2700,7 +2715,20 @@
     return impl_getUntitledHelper_throw()->getUntitledPrefix ();
 }
 // 
-----------------------------------------------------------------------------
-
+uno::Reference< document::XDocumentProperties > SAL_CALL 
OReportDefinition::getDocumentProperties(  ) throw (uno::RuntimeException)
+{
+    ::osl::MutexGuard aGuard(m_aMutex);
+    ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
+    if ( !m_pImpl->m_xDocumentProperties.is() )
+    {
+        uno::Reference< lang::XInitialization > xDocProps(
+            
m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(
+                            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"com.sun.star.document.DocumentProperties")) ,m_aProps->m_xContext),
+                uno::UNO_QUERY_THROW);
+        m_pImpl->m_xDocumentProperties.set(xDocProps, uno::UNO_QUERY_THROW);
+    }
+    return m_pImpl->m_xDocumentProperties;
+}
 // 
=============================================================================
 }// namespace reportdesign
 // 
=============================================================================




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

Reply via email to