Tag: cws_src680_qiq
User: fs      
Date: 2006/07/03 12:48:04

Modified:
   dba/dbaccess/source/ui/inc/RelationTableView.hxx
   dba/dbaccess/source/ui/inc/TableWindow.hxx
   dba/dbaccess/source/ui/inc/dbu_qry.hrc
   dba/dbaccess/source/ui/querydesign/QTableWindow.cxx
   dba/dbaccess/source/ui/querydesign/QTableWindow.hxx
   dba/dbaccess/source/ui/querydesign/QueryDesignView.cxx
   dba/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
   dba/dbaccess/source/ui/querydesign/QueryTableView.cxx
   dba/dbaccess/source/ui/querydesign/TableWindow.cxx
   dba/dbaccess/source/ui/querydesign/query.src
   dba/dbaccess/source/ui/querydesign/querycontroller.cxx

Log:
 #i51143# don't allow to add queries to the designer which do not produce a 
result set

File Changes:

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

File [changed]: RelationTableView.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/RelationTableView.hxx?r1=1.7&r2=1.7.124.1
Delta lines:  +3 -4
-------------------
--- RelationTableView.hxx       8 Sep 2005 15:33:30 -0000       1.7
+++ RelationTableView.hxx       3 Jul 2006 19:47:59 -0000       1.7.124.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RelationTableView.hxx,v $
  *
- *  $Revision: 1.7 $
+ *  $Revision: 1.7.124.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 15:33:30 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:47:59 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -57,7 +57,6 @@
                ORelationTableView( Window* pParent, ORelationDesignView* pView 
);
                virtual ~ORelationTableView();
 
-               //      virtual void AddTabWin(const ::rtl::OUString& 
_rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE);
                virtual void RemoveTabWin( OTableWindow* pTabWin );
                virtual void AddConnection(const OJoinExchangeData& jxdSource, 
const OJoinExchangeData& jxdDest);
                virtual ::std::vector<OTableConnection*>::const_iterator 
RemoveConnection(OTableConnection* pConn,sal_Bool _bDelete);

File [changed]: TableWindow.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/TableWindow.hxx?r1=1.13.122.2&r2=1.13.122.3
Delta lines:  +9 -4
-------------------
--- TableWindow.hxx     27 Jun 2006 12:37:44 -0000      1.13.122.2
+++ TableWindow.hxx     3 Jul 2006 19:47:59 -0000       1.13.122.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TableWindow.hxx,v $
  *
- *  $Revision: 1.13.122.2 $
+ *  $Revision: 1.13.122.3 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/27 12:37:44 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:47:59 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -148,6 +148,11 @@
         */
         virtual bool    allowQueries() const = 0;
 
+        /** called when Init fails because the m_xTableOrQuery object could 
not provide columns, but no
+            exception was thrown. Expected to throw.
+        */
+        virtual void    onNoColumns_throw();
+
                OTableWindow( Window* pParent, OTableWindowData* pTabWinData );
 
        public:
@@ -227,7 +232,7 @@
                // habe ich Connections nach aussen ?
                BOOL ExistsAConn() const;
 
-               virtual void EnumValidFields(::std::vector< ::rtl::OUString>& 
arrstrFields);
+               void EnumValidFields(::std::vector< ::rtl::OUString>& 
arrstrFields);
 
                // OEventListenerAdapter
                virtual void _disposing( const 
::com::sun::star::lang::EventObject& _rSource );

File [changed]: dbu_qry.hrc
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/dbu_qry.hrc?r1=1.6.124.1&r2=1.6.124.2
Delta lines:  +4 -3
-------------------
--- dbu_qry.hrc 10 May 2006 11:00:52 -0000      1.6.124.1
+++ dbu_qry.hrc 3 Jul 2006 19:47:59 -0000       1.6.124.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbu_qry.hrc,v $
  *
- *  $Revision: 1.6.124.1 $
+ *  $Revision: 1.6.124.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/10 11:00:52 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:47:59 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -88,10 +88,11 @@
 #define STR_QUERY_SAVEMODIFIED              RID_STR_QRY_START + 45
 #define STR_ERROR_PARSING_STATEMENT         RID_STR_QRY_START + 46
 #define STR_INFO_OPENING_IN_SQL_VIEW        RID_STR_QRY_START + 47
+#define STR_STATEMENT_WITHOUT_RESULT_SET    RID_STR_QRY_START + 48
     // please adjust checking when inserting new strings
 
 
-#if STR_INFO_OPENING_IN_SQL_VIEW > RID_STR_QRY_END
+#if STR_STATEMENT_WITHOUT_RESULT_SET > RID_STR_QRY_END
 #error resource id overflow in #file, #line
 #endif
 

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

File [changed]: QTableWindow.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/QTableWindow.cxx?r1=1.15.122.1&r2=1.15.122.2
Delta lines:  +13 -2
--------------------
--- QTableWindow.cxx    10 May 2006 11:05:50 -0000      1.15.122.1
+++ QTableWindow.cxx    3 Jul 2006 19:47:59 -0000       1.15.122.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: QTableWindow.cxx,v $
  *
- *  $Revision: 1.15.122.1 $
+ *  $Revision: 1.15.122.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/10 11:05:50 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:47:59 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -204,6 +204,17 @@
                
pInfo->SetDataType(::comphelper::getINT32(_xColumn->getPropertyValue(PROPERTY_TYPE)));
        return pInfo;
 }
+// 
-----------------------------------------------------------------------------
+void OQueryTableWindow::onNoColumns_throw()
+{
+    if ( isQuery() )
+    {
+        String sError( ModuleRes( STR_STATEMENT_WITHOUT_RESULT_SET ) );
+        ::dbtools::throwSQLException( sError, ::dbtools::SQL_GENERAL_ERROR, 
NULL );
+    }
+    OTableWindow::onNoColumns_throw();
+}
+
 // 
-----------------------------------------------------------------------------
 bool OQueryTableWindow::allowQueries() const
 {

File [changed]: QTableWindow.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/QTableWindow.hxx?r1=1.6.122.1&r2=1.6.122.2
Delta lines:  +3 -2
-------------------
--- QTableWindow.hxx    10 May 2006 11:05:50 -0000      1.6.122.1
+++ QTableWindow.hxx    3 Jul 2006 19:48:00 -0000       1.6.122.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: QTableWindow.hxx,v $
  *
- *  $Revision: 1.6.122.1 $
+ *  $Revision: 1.6.122.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/10 11:05:50 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:48:00 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -104,6 +104,7 @@
                                                                        bool 
_bPrimaryKey);
 
         virtual bool    allowQueries() const;
+        virtual void    onNoColumns_throw();
        };
 }
 #endif // DBAUI_QUERY_TABLEWINDOW_HXX

File [changed]: QueryDesignView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/QueryDesignView.cxx?r1=1.78.16.6&r2=1.78.16.7
Delta lines:  +19 -20
---------------------
--- QueryDesignView.cxx 30 Jun 2006 13:31:23 -0000      1.78.16.6
+++ QueryDesignView.cxx 3 Jul 2006 19:48:00 -0000       1.78.16.7
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: QueryDesignView.cxx,v $
  *
- *  $Revision: 1.78.16.6 $
+ *  $Revision: 1.78.16.7 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/30 13:31:23 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:48:00 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -175,7 +175,7 @@
        SqlParseError GetHavingCriteria(OQueryDesignView* _pView,
                                                                        
OSelectionBrowseBox* _pSelectionBrw,
                                                                        const 
::connectivity::OSQLParseNode* pSelectRoot,
-                                                                       int 
&rLevel );
+                                                                       
sal_uInt16& rLevel );
 
        SqlParseError GetOrderCriteria( OQueryDesignView* _pView,
                                                                        
OSelectionBrowseBox* _pSelectionBrw,
@@ -184,7 +184,7 @@
        SqlParseError AddFunctionCondition(OQueryDesignView* _pView,
                                                                        
OSelectionBrowseBox* _pSelectionBrw,
                                                                        const 
::connectivity::OSQLParseNode * pCondition,
-                                                                       const 
int nLevel,
+                                                                       const 
sal_uInt16 nLevel,
                                                                        
sal_Bool bHaving);
 
        
//------------------------------------------------------------------------------
@@ -750,11 +750,10 @@
                                                {
                                                        OQueryTableWindow* 
pTabWin = static_cast<OQueryTableWindow*>(tableIter->second);
 
-                                                       if ( bFound = 
pTabWin->ExistsField( rFieldName, aInfo ) )
-                                                       {
+                            bFound = pTabWin->ExistsField( rFieldName, aInfo );
+                                                       if ( bFound )
                                                                rFieldName = 
aInfo->GetField();
                                                        }
-                                               }
                                                if ( ( rFieldName.toChar() != 
'*' ) && ( rFieldName.indexOf( aQuote ) == -1 ) )
                                                {
                                                        
OSL_ENSURE(pEntryField->GetTable().getLength(),"No table field name!");
@@ -813,7 +812,7 @@
                OTableFields::iterator aIter = _rFieldList.begin();
                for(;aIter != _rFieldList.end();++aIter)
                {
-                       nMaxCriteria = 
::std::max<sal_uInt16>(nMaxCriteria,(*aIter)->GetCriteria().size());
+                       nMaxCriteria = 
::std::max<sal_uInt16>(nMaxCriteria,(sal_uInt16)(*aIter)->GetCriteria().size());
                }
                Reference< XConnection> xConnection = 
static_cast<OQueryController*>(_pView->getController())->getConnection();
                if(!xConnection.is())
@@ -1038,7 +1037,7 @@
                                                aWorkStr += 
::dbtools::quoteName(aQuote, aColumnName);
                                        }
                                        aWorkStr += ::rtl::OUString(' ');
-                                       aWorkStr += String::CreateFromAscii( 
";ASC;DESC" ).GetToken( eOrder );
+                                       aWorkStr += String::CreateFromAscii( 
";ASC;DESC" ).GetToken( (USHORT)eOrder );
                                        aWorkStr += ::rtl::OUString(',');
                                }
                        }
@@ -1242,13 +1241,13 @@
        SqlParseError GetORCriteria(OQueryDesignView* _pView,
                                                                
OSelectionBrowseBox* _pSelectionBrw,
                                                                const 
::connectivity::OSQLParseNode * pCondition,
-                                                               int& nLevel ,
+                                                               sal_uInt16& 
nLevel ,
                                                                sal_Bool 
bHaving = sal_False);
        // 
-----------------------------------------------------------------------------
        SqlParseError GetSelectionCriteria(     OQueryDesignView* _pView,
                                                                                
OSelectionBrowseBox* _pSelectionBrw,
                                                                                
const ::connectivity::OSQLParseNode* pNode,
-                                                                               
int& rLevel )
+                                                                               
sal_uInt16& rLevel )
        {
                if (!SQL_ISRULE(pNode, select_statement))
                        return eNoSelectStatement;
@@ -1286,19 +1285,19 @@
        SqlParseError GetANDCriteria(   OQueryDesignView* _pView,
                                                                        
OSelectionBrowseBox* _pSelectionBrw,
                                                                        const  
::connectivity::OSQLParseNode * pCondition,
-                                                                       const 
int nLevel,
+                                                                       const 
sal_uInt16 nLevel,
                                                                        
sal_Bool bHaving );
        
//------------------------------------------------------------------------------
        SqlParseError ComparisonPredicate(OQueryDesignView* _pView,
                                                        OSelectionBrowseBox* 
_pSelectionBrw,
                                                        const 
::connectivity::OSQLParseNode * pCondition,
-                                                       const int nLevel,
+                                                       const sal_uInt16 nLevel,
                                                        sal_Bool bHaving );
        
//------------------------------------------------------------------------------
        SqlParseError GetORCriteria(OQueryDesignView* _pView,
                                                                
OSelectionBrowseBox* _pSelectionBrw,
                                                                const 
::connectivity::OSQLParseNode * pCondition,
-                                                               int& nLevel ,
+                                                               sal_uInt16& 
nLevel ,
                                                                sal_Bool 
bHaving)
        {
                SqlParseError eErrorCode = eOk;
@@ -1331,7 +1330,7 @@
        SqlParseError GetANDCriteria(   OQueryDesignView* _pView,
                                                                        
OSelectionBrowseBox* _pSelectionBrw,
                                                                        const  
::connectivity::OSQLParseNode * pCondition,
-                                                                       const 
int nLevel,
+                                                                       const 
sal_uInt16 nLevel,
                                                                        
sal_Bool bHaving )
        {
                ::com::sun::star::lang::Locale  aLocale = _pView->getLocale();
@@ -1344,7 +1343,7 @@
                // Runde Klammern
                if (SQL_ISRULE(pCondition,boolean_primary))
                {
-                       int nLevel2 = nLevel;
+                       sal_uInt16 nLevel2 = nLevel;
                        eErrorCode = 
GetORCriteria(_pView,_pSelectionBrw,pCondition->getChild(1), nLevel2,bHaving );
                }
                // Das erste Element ist (wieder) eine AND-Verknuepfung
@@ -1440,7 +1439,7 @@
        SqlParseError AddFunctionCondition(OQueryDesignView* _pView,
                                                        OSelectionBrowseBox* 
_pSelectionBrw,
                                                        const 
::connectivity::OSQLParseNode * pCondition,
-                                                       const int nLevel,
+                                                       const sal_uInt16 nLevel,
                                                        sal_Bool bHaving)
        {
                SqlParseError eErrorCode = eOk;
@@ -1529,7 +1528,7 @@
        SqlParseError ComparisonPredicate(OQueryDesignView* _pView,
                                                        OSelectionBrowseBox* 
_pSelectionBrw,
                                                        const 
::connectivity::OSQLParseNode * pCondition,
-                                                       const int nLevel,
+                                                       const sal_uInt16 nLevel,
                                                        sal_Bool bHaving )
        {
                SqlParseError eErrorCode = eOk;
@@ -1943,7 +1942,7 @@
                                        if ( (eErrorCode = 
InstallFields(_pView,pParseTree, pTableView->GetTabWinMap())) == eOk )
                                        {
                                                // GetSelectionCriteria must be 
called before GetHavingCriteria
-                                               int nLevel=0;
+                                               sal_uInt16 nLevel=0;
 
                                                if ( eOk == (eErrorCode = 
GetSelectionCriteria(_pView,_pSelectionBrw,pParseTree,nLevel)) )
                                                {
@@ -2263,7 +2262,7 @@
        SqlParseError GetHavingCriteria(        OQueryDesignView* _pView,
                                                        OSelectionBrowseBox* 
_pSelectionBrw,
                                                        const 
::connectivity::OSQLParseNode* pSelectRoot,
-                                                       int &rLevel )
+                                                       sal_uInt16& rLevel )
        {
                SqlParseError eErrorCode = eOk;
                if (!pSelectRoot->getChild(3)->getChild(3)->isLeaf())

File [changed]: QueryTabWinUndoAct.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx?r1=1.4&r2=1.4.124.1
Delta lines:  +4 -4
-------------------
--- QueryTabWinUndoAct.hxx      8 Sep 2005 16:26:33 -0000       1.4
+++ QueryTabWinUndoAct.hxx      3 Jul 2006 19:48:00 -0000       1.4.124.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: QueryTabWinUndoAct.hxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.4.124.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 16:26:33 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:48:00 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -76,7 +76,7 @@
                        // anschliessend sollte das SetOwnership aufgerufen 
werden
 
                // Zugriff auf die verwalteten Connections
-               USHORT  ConnCount() { return m_vTableConnection.size(); }
+               USHORT  ConnCount() { return (USHORT)m_vTableConnection.size(); 
}
 
                ::std::vector<OTableConnection*>*               
GetTabConnList() { return &m_vTableConnection; }
 

File [changed]: QueryTableView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/QueryTableView.cxx?r1=1.36.10.3&r2=1.36.10.4
Delta lines:  +6 -4
-------------------
--- QueryTableView.cxx  27 Jun 2006 12:52:57 -0000      1.36.10.3
+++ QueryTableView.cxx  3 Jul 2006 19:48:00 -0000       1.36.10.4
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: QueryTableView.cxx,v $
  *
- *  $Revision: 1.36.10.3 $
+ *  $Revision: 1.36.10.4 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/27 12:52:57 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:48:00 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -559,7 +559,9 @@
                if (pNewTabWinData && pNewTabWinData->GetWinName() == strAlias 
&& pNewTabWinData->GetComposedName() == _rComposedName && 
pNewTabWinData->GetTableName() == _rTableName)
                        break;
        }
-       if(bAppend || (bAppend = (aWinIter == pWindowData->end())))
+    if ( !bAppend )
+        bAppend = ( aWinIter == pWindowData->end() );
+       if ( bAppend )
                pNewTabWinData = new OQueryTableWindowData(_rComposedName, 
_rTableName, strAlias);
                // die TabWinData brauche ich nicht in die entsprechende Liste 
der DocShell eintragen, das macht ShowTabWin
 

File [changed]: TableWindow.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/TableWindow.cxx?r1=1.30.122.2&r2=1.30.122.3
Delta lines:  +28 -9
--------------------
--- TableWindow.cxx     27 Jun 2006 12:55:06 -0000      1.30.122.2
+++ TableWindow.cxx     3 Jul 2006 19:48:01 -0000       1.30.122.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TableWindow.cxx,v $
  *
- *  $Revision: 1.30.122.2 $
+ *  $Revision: 1.30.122.3 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/27 12:55:06 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:48:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -110,6 +110,9 @@
 #ifndef DBACCESS_UI_BROWSER_ID_HXX
 #include "browserids.hxx"
 #endif
+#ifndef _CPPUHELPER_EXC_HLP_HXX_
+#include <cppuhelper/exc_hlp.hxx>
+#endif
 
 using namespace dbaui;
 using namespace ::utl;
@@ -296,9 +299,9 @@
                        SvLBoxEntry* pEntry = NULL;
                        for (; pBegin != pEnd; ++pBegin)
                        {
-                               bool bPrimaryKeyColumn;
+                               bool bPrimaryKeyColumn = xPKeyColumns.is() && 
xPKeyColumns->hasByName( *pBegin );
                                // is this column in the primary key
-                               if ( bPrimaryKeyColumn = (xPKeyColumns.is() && 
xPKeyColumns->hasByName(*pBegin)) )
+                               if ( bPrimaryKeyColumn )
                                        pEntry = 
m_pListBox->InsertEntry(*pBegin, aPrimKeyImage, aPrimKeyImage);
                                else
                                        pEntry = 
m_pListBox->InsertEntry(*pBegin);
@@ -329,6 +332,12 @@
        _pUserData = NULL;
 }
 
//------------------------------------------------------------------------------
+void OTableWindow::onNoColumns_throw()
+{
+    OSL_ENSURE( false, "OTableWindow::onNoColumns_throw: cannot really handle 
this!" );
+    throw SQLException();
+}
+//------------------------------------------------------------------------------
 void OTableWindow::clearListBox()
 {
        // da ich defaultmaessig keine USerData an die Items haenge, kann ich 
hier einfach loeschen
@@ -388,11 +397,20 @@
         Reference< XColumnsSupplier > xColumnsSups( m_xTableOrQuery, 
UNO_QUERY_THROW );
                m_xColumns = xColumnsSups->getColumns();
 
+        Reference< XIndexAccess > xColumnsAsIndex( m_xColumns,UNO_QUERY );
+        if ( !m_xColumns.is() || ( xColumnsAsIndex->getCount() == 0 ) )
+        {
+            onNoColumns_throw();
+            DBG_ERROR( "OTableWindow::Init: onNoColumns_throw is expected to 
throw!" );
+            bSuccess = false;
+        }
+        else
         bSuccess = true;
     }
-       catch ( SQLException& e )
+       catch ( const SQLException& )
        {
-               ::dbaui::showError( ::dbtools::SQLExceptionInfo( e ), pParent, 
pParent->getController()->getORB() );
+        ::dbaui::showError( ::dbtools::SQLExceptionInfo( 
::cppu::getCaughtException() ),
+            pParent, pParent->getController()->getORB() );
        }
        catch( const WrappedTargetException& e )
        {
@@ -423,7 +441,8 @@
 
                // die Felder in die ListBox eintragen
                clearListBox();
-               if ( bSuccess = FillListBox() )
+        bSuccess = FillListBox();
+               if ( bSuccess )
                        m_pListBox->SelectAll( FALSE );
        }
 

File [changed]: query.src
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/query.src?r1=1.95.98.3&r2=1.95.98.4
Delta lines:  +7 -2
-------------------
--- query.src   15 May 2006 14:17:50 -0000      1.95.98.3
+++ query.src   3 Jul 2006 19:48:01 -0000       1.95.98.4
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: query.src,v $
  *
- *  $Revision: 1.95.98.3 $
+ *  $Revision: 1.95.98.4 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/15 14:17:50 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:48:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -504,3 +504,8 @@
     Text [ en-US ] = "The query will be opened in SQL view.";
 };
 
+String STR_STATEMENT_WITHOUT_RESULT_SET
+{
+    Text [ de ] = "Die Abfrage erzeugt keine Ergebnismenge, und kann deswegen 
nicht Teil einer anderen Abfrage sein.";
+    Text [ en-US ] = "The query does not create a result set, and thus cannot 
be part of another query.";
+};

File [changed]: querycontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/querycontroller.cxx?r1=1.103.4.11&r2=1.103.4.12
Delta lines:  +5 -33
--------------------
--- querycontroller.cxx 28 Jun 2006 10:31:11 -0000      1.103.4.11
+++ querycontroller.cxx 3 Jul 2006 19:48:01 -0000       1.103.4.12
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: querycontroller.cxx,v $
  *
- *  $Revision: 1.103.4.11 $
+ *  $Revision: 1.103.4.12 $
  *
- *  last change: $Author: fs $ $Date: 2006/06/28 10:31:11 $
+ *  last change: $Author: fs $ $Date: 2006/07/03 19:48:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1123,30 +1123,6 @@
        return xElements;
 }
 
-//typedef ::cppu::ImplHelper1< XLoadEventListener > 
OQueryControllerLoadListener_BASE;
-//class OQueryControllerLoadListener : public OQueryControllerLoadListener_BASE
-//{
-//     OQueryController* m_pController;
-//public:
-//     OQueryControllerLoadListener(OQueryController* _pController) : 
m_pController(_pController)
-//     {
-//             OSL_ENSURE(m_pController,"Controller can not be NULL!");
-//     }
-//     // 
-----------------------------------------------------------------------------
-//     virtual void SAL_CALL disposing( const EventObject& Source ) throw 
(RuntimeException)
-//     {
-//     }
-//     // 
-----------------------------------------------------------------------------
-//     // XLoadEventListener
-//     virtual void SAL_CALL loadFinished( const Reference< XFrameLoader >& 
aLoader ) throw (RuntimeException)
-//     {
-//     }
-//     // 
-----------------------------------------------------------------------------
-//     virtual void SAL_CALL loadCancelled( const Reference< XFrameLoader >& 
aLoader ) throw (RuntimeException)
-//     {
-//             m_pController->Execute(ID_BROWSER_CLOSE);
-//     }
-//};
 // 
-----------------------------------------------------------------------------
 void OQueryController::executeQuery()
 {
@@ -1162,15 +1138,10 @@
                        getContainer()->showPreview(m_xCurrentFrame);
                        InvalidateFeature(SID_DB_QUERY_PREVIEW);
 
-//                     Reference< XFrame > xBeamer = 
getContainer()->getPreviewFrame();
-//                     Reference< XLoadEventListener> xLoadEvtL = new 
OQueryControllerLoadListener(this);
-//                     xBeamer->addFrameActionListener( xLoadEvtL );
-
                        URL aWantToDispatch;
                        aWantToDispatch.Complete = 
::rtl::OUString::createFromAscii(".component:DB/DataSourceBrowser");
 
-                       ::rtl::OUString sFrameName = FRAME_NAME_QUERY_PREVIEW;
-                       //  | FrameSearchFlag::CREATE
+                       ::rtl::OUString sFrameName( FRAME_NAME_QUERY_PREVIEW );
                        sal_Int32 nSearchFlags = FrameSearchFlag::CHILDREN;
 
                        Reference< XDispatch> xDisp;
@@ -1279,7 +1250,8 @@
                 aNameChecker,
                                SAD_DEFAULT );
 
-               if(bRet = (aDlg.Execute() == RET_OK))
+        bRet = ( aDlg.Execute() == RET_OK );
+               if ( bRet )
                {
                        m_sName = aDlg.getName();
                        if(m_bCreateView)




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

Reply via email to