User: vg      
Date: 2008-01-29 08:52:10+0000
Modified:
   dba/dbaccess/source/ui/misc/linkeddocuments.cxx

Log:
 INTEGRATION: CWS dba24e_SRC680 (1.25.4); FILE MERGED
 2007/12/19 12:27:42 oj 1.25.4.1: #i84339# some code cleanups for the wizards

File Changes:

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.25&r2=1.26
Delta lines:  +16 -10
---------------------
--- linkeddocuments.cxx 2007-11-20 19:23:54+0000        1.25
+++ linkeddocuments.cxx 2008-01-29 08:52:08+0000        1.26
@@ -200,6 +200,7 @@
        DBG_NAME(OLinkedDocumentsAccess)        
        //------------------------------------------------------------------
        OLinkedDocumentsAccess::OLinkedDocumentsAccess(Window* _pDialogParent
+                                                    , const Reference< XFrame 
>& _rxParentFrame
                                                                                
                        , const Reference< XMultiServiceFactory >& _rxORB
                                                                                
                        , const Reference< XNameAccess >& _rxContainer
                                                                                
                        , const Reference< XConnection>& _xConnection
@@ -208,6 +209,7 @@
                :m_xORB(_rxORB)
                ,m_xDocumentContainer(_rxContainer)
                ,m_xConnection(_xConnection)
+        ,m_xParentFrame(_rxParentFrame)
                ,m_pDialogParent(_pDialogParent)
         ,m_sDataSourceName(_sDataSourceName)
        {
@@ -284,12 +286,14 @@
                                aDesc[::svx::daCommand] <<= _rObjectName;
                        if ( m_xConnection.is() )
                                aDesc[::svx::daConnection] <<= m_xConnection;
+
             Sequence<Any> aSeq = aDesc.createAnySequence();
-            sal_Int32 nPos = aSeq.getLength();
-            aSeq.realloc(nPos+1);
-            PropertyValue aProp;
-            aProp.Name = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentDefinition"));
-            aSeq[nPos] <<= aProp;
+            const sal_Int32 nLength = aSeq.getLength();
+            aSeq.realloc(nLength + 1 );
+            PropertyValue aVal;
+            aVal.Name = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentFrame"));
+            aVal.Value <<= m_xParentFrame;
+            aSeq[nLength] <<= aVal;
                        
                        Reference< XJobExecutor > xFormWizard;
                        {
@@ -309,6 +313,8 @@
                                                
xRet.set(xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Document"))),UNO_QUERY);
                                        }
                                }
+                
xFormWizard->trigger(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("end")));
+                ::comphelper::disposeComponent(xFormWizard);
             }
                }
                catch(const Exception&)
@@ -329,16 +335,16 @@
         return 
newWithPilot("com.sun.star.wizards.report.CallReportWizard",_xDefinition,_nCommandType,_rObjectName);
        }
     //------------------------------------------------------------------
-       void OLinkedDocumentsAccess::newTableWithPilot()
+       Reference< XComponent> OLinkedDocumentsAccess::newTableWithPilot()
        {
         Reference< XComponent > xDefinition;
-        newWithPilot("com.sun.star.wizards.table.CallTableWizard",xDefinition);
+        return 
newWithPilot("com.sun.star.wizards.table.CallTableWizard",xDefinition);
        }    
     //------------------------------------------------------------------
-       void OLinkedDocumentsAccess::newQueryWithPilot(const sal_Int32 
_nCommandType,const ::rtl::OUString& _rObjectName)
+       Reference< XComponent> OLinkedDocumentsAccess::newQueryWithPilot(const 
sal_Int32 _nCommandType,const ::rtl::OUString& _rObjectName)
        {
         Reference< XComponent > xDefinition;
-        
newWithPilot("com.sun.star.wizards.query.CallQueryWizard",xDefinition,_nCommandType,_rObjectName);
+        return 
newWithPilot("com.sun.star.wizards.query.CallQueryWizard",xDefinition,_nCommandType,_rObjectName);
        }
        //------------------------------------------------------------------
        Reference< XComponent > OLinkedDocumentsAccess::newDocument(sal_Int32 
_nNewFormId,Reference< XComponent >& _xDefinition,const sal_Int32 
_nCommandType,const ::rtl::OUString& _sObjectName)




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

Reply via email to