Tag: cws_src680_dba31
User: oj      
Date: 05/04/05 01:10:51

Modified:
 /dba/dbaccess/source/ui/app/
  AppController.cxx
 /dba/dbaccess/source/ui/inc/
  linkeddocuments.hxx
 /dba/dbaccess/source/ui/misc/
  linkeddocuments.cxx

Log:
 #i46465# return document defintion to controller

File Changes:

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.18&r2=1.18.12.1
Delta lines:  +8 -5
-------------------
--- AppController.cxx   18 Mar 2005 10:07:07 -0000      1.18
+++ AppController.cxx   5 Apr 2005 08:10:47 -0000       1.18.12.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.18 $
+ *  $Revision: 1.18.12.1 $
  *
- *  last change: $Author: obo $ $Date: 2005/03/18 10:07:07 $
+ *  last change: $Author: oj $ $Date: 2005/04/05 08:10:47 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -1791,10 +1791,13 @@
                                    }
                            }
                        
+                Reference< XComponent > xComponent,xDefinition;
                                if ( E_REPORT == _eType )
-                                       
aHelper->newReportWithPilot(nCommandType,sName);
+                                       xComponent = 
aHelper->newReportWithPilot(xDefinition,nCommandType,sName);
                                else
-                                       
aHelper->newFormWithPilot(nCommandType,sName);
+                                       xComponent = 
aHelper->newFormWithPilot(xDefinition,nCommandType,sName);
+
+                               addDocumentListener(xComponent,xDefinition);
                        }
         }
         break;

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

File [changed]: linkeddocuments.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/linkeddocuments.hxx?r1=1.9&r2=1.9.18.1
Delta lines:  +11 -8
--------------------
--- linkeddocuments.hxx 10 Mar 2005 16:51:50 -0000      1.9
+++ linkeddocuments.hxx 5 Apr 2005 08:10:48 -0000       1.9.18.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: linkeddocuments.hxx,v $
  *
- *  $Revision: 1.9 $
+ *  $Revision: 1.9.18.1 $
  *
- *  last change: $Author: vg $ $Date: 2005/03/10 16:51:50 $
+ *  last change: $Author: oj $ $Date: 2005/04/05 08:10:48 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -138,18 +138,21 @@
                ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XComponent>           newForm(sal_Int32 _nNewFormId
                                                                
,::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& 
_xDefinition);
 
-        void   newWithPilot(
+        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>  
    newWithPilot(
                             const char* _pWizardService
+                            ,::com::sun::star::uno::Reference< 
::com::sun::star::lang::XComponent>& _xDefinition
                             ,const sal_Int32 _nCommandType = -1
                                                        ,const ::rtl::OUString& 
_rObjectName = ::rtl::OUString()
                                                );
 
-               void    newFormWithPilot(
-                                                       const sal_Int32 
_nCommandType = -1
+               ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XComponent>       newFormWithPilot(
+                            ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XComponent>& _xDefinition
+                                                       ,const sal_Int32 
_nCommandType = -1
                                                        ,const ::rtl::OUString& 
_rObjectName = ::rtl::OUString()
                                                );
-               void    newReportWithPilot(
-                                                       const sal_Int32 
_nCommandType = -1
+               ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XComponent>       newReportWithPilot(
+                                                       
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& 
_xDefinition
+                            ,const sal_Int32 _nCommandType = -1
                                                        ,const ::rtl::OUString& 
_rObjectName = ::rtl::OUString()
                                                );
                void    newQueryWithPilot(

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

File [changed]: linkeddocuments.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/linkeddocuments.cxx?r1=1.13&r2=1.13.18.1
Delta lines:  +24 -11
---------------------
--- linkeddocuments.cxx 10 Mar 2005 16:52:22 -0000      1.13
+++ linkeddocuments.cxx 5 Apr 2005 08:10:48 -0000       1.13.18.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: linkeddocuments.cxx,v $
  *
- *  $Revision: 1.13 $
+ *  $Revision: 1.13.18.1 $
  *
- *  last change: $Author: vg $ $Date: 2005/03/10 16:52:22 $
+ *  last change: $Author: oj $ $Date: 2005/04/05 08:10:48 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -289,11 +289,13 @@
                return xRet;
        }
     //------------------------------------------------------------------
-    void OLinkedDocumentsAccess::newWithPilot(const char* _pWizardService
+    Reference< XComponent> OLinkedDocumentsAccess::newWithPilot(const char* 
_pWizardService
+                                                , Reference< XComponent >& 
_xDefinition
                                                 , const sal_Int32 _nCommandType
                                                        , const 
::rtl::OUString& _rObjectName                                                
                                                 )
        {
+        Reference< XComponent> xRet;
                try
                {
                        ::svx::ODataAccessDescriptor aDesc;
@@ -311,34 +313,45 @@
                 
xFormWizard.set(m_xORB->createInstanceWithArguments(::rtl::OUString::createFromAscii(_pWizardService),aDesc.createAnySequence()),UNO_QUERY);
                        }
                        if ( xFormWizard.is() )
+            {
                                
xFormWizard->trigger(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("start")));
-               
+                Reference<XPropertySet> xProp(xFormWizard,UNO_QUERY_THROW);
+                Reference<XPropertySetInfo> xInfo = 
xProp->getPropertySetInfo();
+                if ( 
xInfo->hasPropertyByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Document")))
 )
+                {
+                    
_xDefinition.set(xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentDefinition"))),UNO_QUERY);
+                    
xRet.set(xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Document"))),UNO_QUERY);
+                }
+            }
                }
                catch(const Exception&)
                {
                        OSL_ENSURE(sal_False, 
"OLinkedDocumentsAccess::newWithPilot: caught an exception while loading the 
object!");
                }
+        return xRet;
        }
        //------------------------------------------------------------------
-       void OLinkedDocumentsAccess::newFormWithPilot(const sal_Int32 
_nCommandType,const ::rtl::OUString& _rObjectName)
+       Reference< XComponent> 
OLinkedDocumentsAccess::newFormWithPilot(Reference< XComponent >& 
_xDefinition,const sal_Int32 _nCommandType,const ::rtl::OUString& _rObjectName)
        {
-        
newWithPilot("com.sun.star.wizards.form.CallFormWizard",_nCommandType,_rObjectName);
+        return 
newWithPilot("com.sun.star.wizards.form.CallFormWizard",_xDefinition,_nCommandType,_rObjectName);
        }
 
     //------------------------------------------------------------------
-       void OLinkedDocumentsAccess::newReportWithPilot(const sal_Int32 
_nCommandType,const ::rtl::OUString& _rObjectName)
+       Reference< XComponent> 
OLinkedDocumentsAccess::newReportWithPilot(Reference< XComponent >& 
_xDefinition,const sal_Int32 _nCommandType,const ::rtl::OUString& _rObjectName)
        {
-        
newWithPilot("com.sun.star.wizards.report.CallReportWizard",_nCommandType,_rObjectName);
+        return 
newWithPilot("com.sun.star.wizards.report.CallReportWizard",_xDefinition,_nCommandType,_rObjectName);
        }
     //------------------------------------------------------------------
        void OLinkedDocumentsAccess::newTableWithPilot()
        {
-        newWithPilot("com.sun.star.wizards.table.CallTableWizard");
+        Reference< XComponent > xDefinition;
+        newWithPilot("com.sun.star.wizards.table.CallTableWizard",xDefinition);
        }    
     //------------------------------------------------------------------
        void OLinkedDocumentsAccess::newQueryWithPilot(const sal_Int32 
_nCommandType,const ::rtl::OUString& _rObjectName)
        {
-        
newWithPilot("com.sun.star.wizards.query.CallQueryWizard",_nCommandType,_rObjectName);
+        Reference< XComponent > xDefinition;
+        
newWithPilot("com.sun.star.wizards.query.CallQueryWizard",xDefinition,_nCommandType,_rObjectName);
        }
        //------------------------------------------------------------------
        Reference< XComponent > OLinkedDocumentsAccess::newForm(sal_Int32 
_nNewFormId,Reference< XComponent >& _xDefinition)




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

Reply via email to