User: ihi     
Date: 2007-11-20 19:23:56+0000
Modified:
   dba/dbaccess/source/ui/misc/linkeddocuments.cxx

Log:
 INTEGRATION: CWS reportdesign01 (1.23.10); FILE MERGED
 2007/10/25 08:56:26 lla 1.23.10.6: #i78099# merge problem fixed
 2007/10/15 08:52:14 oj 1.23.10.5: RESYNC: (1.23-1.24); FILE MERGED
 2007/10/11 06:28:04 oj 1.23.10.4: #i81105# fix for absent extension
 2007/09/25 08:32:51 lla 1.23.10.3: #i77897# use a SQLException instead.
 2007/09/25 05:31:01 lla 1.23.10.2: #i78099# no error window if user pressed 
cancel
 2007/09/21 10:51:39 oj 1.23.10.1: #i77690# add new context menu entry to 
create a report with prefilled table or query

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.24&r2=1.25
Delta lines:  +34 -20
---------------------
--- linkeddocuments.cxx 2007-08-31 09:15:32+0000        1.24
+++ linkeddocuments.cxx 2007-11-20 19:23:54+0000        1.25
@@ -142,10 +142,12 @@
 #include <comphelper/mimeconfighelper.hxx>
 #endif
 
+#include <cppuhelper/exc_hlp.hxx>
 #include <connectivity/dbtools.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <com/sun/star/io/WrongFormatException.hpp>
 #include "ExtensionNotPresent.hxx"
+#include "com/sun/star/sdb/RowSetVetoException.hpp"
 
 //......................................................................
 namespace dbaui
@@ -339,7 +341,7 @@
         
newWithPilot("com.sun.star.wizards.query.CallQueryWizard",xDefinition,_nCommandType,_rObjectName);
        }
        //------------------------------------------------------------------
-       Reference< XComponent > OLinkedDocumentsAccess::newForm(sal_Int32 
_nNewFormId,Reference< XComponent >& _xDefinition)
+       Reference< XComponent > OLinkedDocumentsAccess::newDocument(sal_Int32 
_nNewFormId,Reference< XComponent >& _xDefinition,const sal_Int32 
_nCommandType,const ::rtl::OUString& _sObjectName)
        {
         OSL_ENSURE(m_xDocumentContainer.is(), 
"OLinkedDocumentsAccess::OLinkedDocumentsAccess: invalid document container!");
                // determine the URL to use for the new document
@@ -399,6 +401,12 @@
                                        aCommand.Argument <<= aOpenCommand;
                                        WaitObject aWaitCursor( m_pDialogParent 
);
                                        
xNewDocument.set(xContent->execute(aCommand,xContent->createCommandIdentifier(),Reference<
 XCommandEnvironment >()),UNO_QUERY);
+                    Reference<XPropertySet> xProp(xNewDocument,UNO_QUERY);
+                    if ( xProp.is() && _sObjectName.getLength() )
+                    {
+                        
xProp->setPropertyValue(PROPERTY_COMMANDTYPE,makeAny(_nCommandType));
+                        
xProp->setPropertyValue(PROPERTY_COMMAND,makeAny(_sObjectName));
+                    }
                                }
                        }
                }
@@ -453,6 +461,11 @@
                }
                catch(Exception& e) 
                {
+            Any aAny = ::cppu::getCaughtException();
+            com::sun::star::sdbc::SQLException a;
+            if ((aAny >>= a) &&
+                (a.ErrorCode != dbtools::ParameterInteractionCancelled))
+            {
             com::sun::star::sdbc::SQLException aSQLException;
             aSQLException.Message = e.Message;
             aSQLException.Context = e.Context;
@@ -469,6 +482,7 @@
                        // ErrorBox aError(m_pDialogParent, WB_OK, sMessage);
                        // aError.Execute();
                }
+        }
         if (aInfo.isValid())
         {
             showError(aInfo, VCLUnoHelper::GetInterface(m_pDialogParent), 
m_xORB );




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

Reply via email to