Tag: cws_src680_rptchart01
User: oj      
Date: 2008-02-21 10:00:13+0000
Modified:
   dba/reportdesign/source/core/api/ReportDefinition.cxx
   dba/reportdesign/source/ui/inc/InsertFunctions.hxx
   dba/reportdesign/source/ui/report/InsertFunctions.cxx
   dba/reportdesign/source/ui/report/dlgedfunc.cxx

Log:
 #i85225# create DatabaseDataProvider in factory

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.5.20.6&r2=1.5.20.7
Delta lines:  +7 -3
-------------------
--- ReportDefinition.cxx        2008-02-19 06:42:50+0000        1.5.20.6
+++ ReportDefinition.cxx        2008-02-21 10:00:10+0000        1.5.20.7
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ReportDefinition.cxx,v $
  *
- *  $Revision: 1.5.20.6 $
+ *  $Revision: 1.5.20.7 $
  *
- *  last change: $Author: oj $ $Date: 2008/02/19 06:42:50 $
+ *  last change: $Author: oj $ $Date: 2008/02/21 10:00:10 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -2117,7 +2117,11 @@
     else if ( aServiceSpecifier.indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportGraphicObjectResolver")))
 == 0 )
         return static_cast< ::cppu::OWeakObject* >(new SvXMLGraphicHelper( 
GRAPHICHELPER_MODE_WRITE ));
     else if ( aServiceSpecifier.indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataProvider")))
 == 0 )
-        return uno::Reference< uno::XInterface 
>(chart2::data::DatabaseDataProvider::createWithConnection( 
m_aProps->m_xContext, m_pImpl->m_xActiveConnection ),uno::UNO_QUERY);
+    {
+        uno::Reference<chart2::data::XDatabaseDataProvider> 
xDataProvider(chart2::data::DatabaseDataProvider::createWithConnection( 
m_aProps->m_xContext, m_pImpl->m_xActiveConnection ));
+        xDataProvider->setRowLimit(10);
+        return uno::Reference< uno::XInterface >(xDataProvider,uno::UNO_QUERY);
+    }
     else
         xShape.set(SvxUnoDrawMSFactory::createInstance( aServiceSpecifier 
),uno::UNO_QUERY_THROW);
     

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

File [changed]: InsertFunctions.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/InsertFunctions.hxx?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +5 -7
-------------------
--- InsertFunctions.hxx 2008-01-24 13:00:46+0000        1.1.2.1
+++ InsertFunctions.hxx 2008-02-21 10:00:10+0000        1.1.2.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: InsertFunctions.hxx,v $
  *
- *  $Revision: 1.1.2.1 $
+ *  $Revision: 1.1.2.2 $
  *
- *  last change: $Author: oj $ $Date: 2008/01/24 13:00:46 $
+ *  last change: $Author: oj $ $Date: 2008/02/21 10:00:10 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -49,10 +49,8 @@
 namespace rptui
 {
 /************************************************************************/
-    void InitializeChart( const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XComponentContext >& context,
-                    const ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XModel>& _xModel,
-                    const ::com::sun::star::uno::Reference < 
::com::sun::star::embed::XEmbeddedObject >& xObj,
-                    const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection>& _xConnection);
+    void InitializeChart( const ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XModel>& _xModel,
+                          const ::com::sun::star::uno::Reference < 
::com::sun::star::embed::XEmbeddedObject >& xObj);
 // ---------
 } // namespace rptui
 // ---------

Directory: /dba/reportdesign/source/ui/report/
==============================================

File [changed]: InsertFunctions.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/InsertFunctions.cxx?r1=1.1.2.2&r2=1.1.2.3
Delta lines:  +6 -8
-------------------
--- InsertFunctions.cxx 2008-01-30 11:29:45+0000        1.1.2.2
+++ InsertFunctions.cxx 2008-02-21 10:00:11+0000        1.1.2.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: InsertFunctions.cxx,v $
  *
- *  $Revision: 1.1.2.2 $
+ *  $Revision: 1.1.2.3 $
  *
- *  last change: $Author: oj $ $Date: 2008/01/30 11:29:45 $
+ *  last change: $Author: oj $ $Date: 2008/02/21 10:00:11 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -96,10 +96,8 @@
 namespace rptui
 {
 //------------------------------------------------------------------------
-void InitializeChart( const uno::Reference< uno::XComponentContext >& context,
-                    const uno::Reference< frame::XModel>& _xModel,
-                    const uno::Reference < embed::XEmbeddedObject >& xObj,
-                    const uno::Reference< sdbc::XConnection>& _xConnection)
+void InitializeChart( const uno::Reference< frame::XModel>& _xModel,
+                      const uno::Reference < embed::XEmbeddedObject >& xObj)
 {
     //ScDocShell* pDocShell = pViewData->GetDocShell();
     //ScDocument* pScDoc = pDocShell->GetDocument();
@@ -151,8 +149,8 @@
             if( xChartModel.is() )
                 xChartModel->lockControllers();
 
-            uno::Reference< chart2::data::XDatabaseDataProvider > 
xDataProvider( chart2::data::DatabaseDataProvider::createWithConnection( 
context, _xConnection ));
-            xDataProvider->setRowLimit(10);
+            uno::Reference< lang::XMultiServiceFactory> 
xFac(_xModel,uno::UNO_QUERY_THROW);
+            uno::Reference< chart2::data::XDatabaseDataProvider > 
xDataProvider( 
xFac->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataProvider"))),uno::UNO_QUERY);
             xReceiver->attachDataProvider( xDataProvider.get() );
 
             uno::Reference< util::XNumberFormatsSupplier > 
xNumberFormatsSupplier( _xModel, uno::UNO_QUERY );

File [changed]: dlgedfunc.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/dlgedfunc.cxx?r1=1.5.62.3&r2=1.5.62.4
Delta lines:  +3 -5
-------------------
--- dlgedfunc.cxx       2008-02-19 17:11:38+0000        1.5.62.3
+++ dlgedfunc.cxx       2008-02-21 10:00:11+0000        1.5.62.4
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dlgedfunc.cxx,v $
  *
- *  $Revision: 1.5.62.3 $
+ *  $Revision: 1.5.62.4 $
  *
- *  last change: $Author: oj $ $Date: 2008/02/19 17:11:38 $
+ *  last change: $Author: oj $ $Date: 2008/02/21 10:00:11 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -653,9 +653,7 @@
                 OOle2Obj* pObj = 
dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj());
                        if ( pObj && !pObj->IsEmpty() )
                 {
-                    uno::Reference< embed::XEmbeddedObject > xEmbeddedObj = 
pObj->GetObjRef();
-                    uno::Reference< frame::XModel> xModel = 
pController->getModel();
-                    
InitializeChart(pController->getContext(),xModel,xEmbeddedObj,pController->getConnection());
+                    InitializeChart(pController->getModel(),pObj->GetObjRef());
                 }
             }
         }




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

Reply via email to