Tag: cws_src680_reportdesign02
User: oj      
Date: 2007-10-26 11:05:08+0000
Modified:
   dba/dbaccess/source/core/dataaccess/documentdefinition.cxx
   dba/dbaccess/source/ui/app/AppController.cxx
   dba/dbaccess/source/ui/app/AppDetailView.cxx

Log:
 #i82914# check report engine service name

File Changes:

Directory: /dba/dbaccess/source/core/dataaccess/
================================================

File [changed]: documentdefinition.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentdefinition.cxx?r1=1.47&r2=1.47.22.1
Delta lines:  +5 -6
-------------------
--- documentdefinition.cxx      2007-09-26 14:40:19+0000        1.47
+++ documentdefinition.cxx      2007-10-26 11:05:05+0000        1.47.22.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: documentdefinition.cxx,v $
  *
- *  $Revision: 1.47 $
+ *  $Revision: 1.47.22.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:40:19 $
+ *  last change: $Author: oj $ $Date: 2007/10/26 11:05:05 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1303,13 +1303,12 @@
                                {
                                        sDocumentService = 
GetDocumentServiceFromMediaType(xStorage,m_pImpl->m_aProps.sPersistentName,m_xORB,aClassID);
                     // check if we are not a form and
-                    // the com.sun.star.report.pentaho.SOReportJobFactory is 
not present.
                                        if (m_bForm == 0 /* MAGIC! */ && 
!sDocumentService.equalsAscii("com.sun.star.text.TextDocument"))
                                        {
                                                // we seems to be a new report, 
check if report extension is present.
                                Reference< XContentEnumerationAccess > 
xEnumAccess(m_xORB, UNO_QUERY);
-                               static ::rtl::OUString 
s_sReportDesign(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.pentaho.SOReportJobFactory"));
-                               Reference< XEnumeration > xEnumDrivers = 
xEnumAccess->createContentEnumeration(s_sReportDesign);
+                        const ::rtl::OUString sReportEngineServiceName = 
::dbtools::getDefaultReportEngineServiceName(m_xORB);
+                               Reference< XEnumeration > xEnumDrivers = 
xEnumAccess->createContentEnumeration(sReportEngineServiceName);
                                if ( !xEnumDrivers.is() || 
!xEnumDrivers->hasMoreElements() )
                                                {
                                                        
com::sun::star::io::WrongFormatException aWFE;

Directory: /dba/dbaccess/source/ui/app/
=======================================

File [changed]: AppController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.47&r2=1.47.16.1
Delta lines:  +10 -6
--------------------
--- AppController.cxx   2007-09-26 14:46:26+0000        1.47
+++ AppController.cxx   2007-10-26 11:05:06+0000        1.47.16.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.47 $
+ *  $Revision: 1.47.16.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:46:26 $
+ *  last change: $Author: oj $ $Date: 2007/10/26 11:05:06 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -678,11 +678,15 @@
                                        aReturn.bEnabled = xEnumAccess.is();
                        if ( aReturn.bEnabled )
                     {
-                        static ::rtl::OUString 
s_sReportDesign(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.pentaho.SOReportJobFactory"));
-                       Reference< XEnumeration > xEnumDrivers = 
xEnumAccess->createContentEnumeration(s_sReportDesign);
+                        const ::rtl::OUString sReportEngineServiceName = 
::dbtools::getDefaultReportEngineServiceName(m_xServiceFactory);
+                        aReturn.bEnabled = 
sReportEngineServiceName.getLength() != 0;
+                        if ( aReturn.bEnabled )
+                        {
+                           const Reference< XEnumeration > xEnumDrivers = 
xEnumAccess->createContentEnumeration(sReportEngineServiceName);
                         aReturn.bEnabled = xEnumDrivers.is() && 
xEnumDrivers->hasMoreElements();
                     }
                 }
+                }
                                break;
                        case SID_DB_APP_VIEW_TABLES:
                                aReturn.bEnabled = sal_True;

File [changed]: AppDetailView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailView.cxx?r1=1.25&r2=1.25.24.1
Delta lines:  +6 -5
-------------------
--- AppDetailView.cxx   2007-09-26 14:47:27+0000        1.25
+++ AppDetailView.cxx   2007-10-26 11:05:06+0000        1.25.24.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppDetailView.cxx,v $
  *
- *  $Revision: 1.25 $
+ *  $Revision: 1.25.24.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/09/26 14:47:27 $
+ *  last change: $Author: oj $ $Date: 2007/10/26 11:05:06 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -754,7 +754,8 @@
     OSL_ENSURE( ( _eType >= 0 ) && ( _eType < E_ELEMENT_TYPE_COUNT ), 
"OApplicationDetailView::impl_getTaskPaneData: illegal element type!" );
     TaskPaneData& rData = m_aTaskPaneData[ _eType ];
 
-    if ( rData.aTasks.empty() )
+//    if ( rData.aTasks.empty() )
+    //oj: do not check, otherwise extensions will only be visible after a 
reload.
         impl_fillTaskPaneData( _eType, rData );
 
     return rData;




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

Reply via email to