Tag: cws_src680_dba24c
User: fs      
Date: 2007-09-13 11:36:39+0000
Modified:
   dba/dbaccess/source/ui/inc/querycontroller.hxx

Log:
 #i49183# also allow to edit a view's command, if it supports the XAlterView 
interface

File Changes:

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

File [changed]: querycontroller.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/querycontroller.hxx?r1=1.36.40.2&r2=1.36.40.3
Delta lines:  +33 -53
---------------------
--- querycontroller.hxx 2007-09-12 09:06:02+0000        1.36.40.2
+++ querycontroller.hxx 2007-09-13 11:36:37+0000        1.36.40.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: querycontroller.hxx,v $
  *
- *  $Revision: 1.36.40.2 $
+ *  $Revision: 1.36.40.3 $
  *
- *  last change: $Author: fs $ $Date: 2007/09/12 09:06:02 $
+ *  last change: $Author: fs $ $Date: 2007/09/13 11:36:37 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -36,60 +36,29 @@
 #ifndef DBAUI_QUERYCONTROLLER_HXX
 #define DBAUI_QUERYCONTROLLER_HXX
 
-#ifndef DBAUI_JOINCONTROLLER_HXX
 #include "JoinController.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
-#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSER_HPP_
-#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
-#endif
-#ifndef DBAUI_QUERYVIEW_HXX
+#include "JoinTableView.hxx"
+#include "querycontainerwindow.hxx"
 #include "queryview.hxx"
-#endif
-#ifndef _UNDO_HXX
-#include <svtools/undo.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_
-#include <comphelper/propertycontainer.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
+#include "svx/ParseContext.hxx"
+#include "TableFieldDescription.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#include <com/sun/star/sdb/CommandType.hpp>
+#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+/** === end UNO includes === **/
+
 #include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _CONNECTIVITY_PARSE_SQLITERATOR_HXX_
-#include <connectivity/sqliterator.hxx>
-#endif
-#ifndef _CONNECTIVITY_SQLPARSE_HXX
-#include <connectivity/sqlparse.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
+#include <comphelper/propertycontainer.hxx>
 #include <comphelper/uno3.hxx>
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
 #include <comphelper/uno3.hxx>
-#endif
-#ifndef _CONNECTIVITY_SQLNODE_HXX
+#include <connectivity/sqliterator.hxx>
 #include <connectivity/sqlnode.hxx>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
-#include <com/sun/star/io/XObjectOutputStream.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
-#include <com/sun/star/io/XObjectInputStream.hpp>
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
-#include "JoinTableView.hxx"
-#endif
-#ifndef SVX_QUERYDESIGNCONTEXT_HXX
-#include "svx/ParseContext.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
-#include "querycontainerwindow.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDDESC_HXX
-#include "TableFieldDescription.hxx"
-#endif
+#include <connectivity/sqlparse.hxx>
+#include <svtools/undo.hxx>
 
 class VCLXWindow;
 namespace dbaui
@@ -127,16 +96,27 @@
 
                sal_Int32               m_nVisibleRows;         // which rows 
the selection browse should show
                sal_Int32               m_nSplitPos;            // the position 
of the splitter
+        sal_Int32       m_nCommandType;     // the type of the object we're 
designing
                sal_Bool                m_bGraphicalDesign; // are we in the 
graphical design mode (TRUE) or in the text design (FALSE)?
                sal_Bool                m_bDistinct;            // true when 
you want "select distinct" otherwise false
                sal_Bool                m_bViewAlias;           // show the 
alias row in the design view
                sal_Bool                m_bViewTable;           // show the 
table row in the design view
                sal_Bool                m_bViewFunction;        // show the 
function row in the design view
                sal_Bool                m_bEscapeProcessing;// is true when we 
shouldn't parse the statement
-               sal_Bool                m_bCreateView;          // set to true 
when we should create a view otherwise we create a normal query
-        sal_Bool        m_bIndependent;     // are we creating an 
"independent" SQL command (which does *not* belong to a data source)?
 
-               ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameAccess> getElements() const;
+
+        /** returns the container of queries, views, or command definitions, 
depending on what object type
+            we design currently.
+
+            Not allowed to be called if we design an independent SQL command.
+        */
+               ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameAccess >
+            getObjectContainer() const;
+
+        inline  bool    creatingView() const    { return m_nCommandType == 
::com::sun::star::sdb::CommandType::TABLE; }
+        inline  bool    creatingQuery() const   { return m_nCommandType == 
::com::sun::star::sdb::CommandType::QUERY; }
+        inline  bool    creatingCommand() const { return m_nCommandType == 
::com::sun::star::sdb::CommandType::COMMAND; }
+
                sal_Bool askForNewName( const ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameAccess>& _xElements,
                                                        sal_Bool _bSaveAs);
                // creates the querycomposer




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

Reply via email to