User: ihi     
Date: 2007-11-21 16:05:30+0000
Modified:
   dba/dbaccess/source/ui/inc/querycontroller.hxx

Log:
 INTEGRATION: CWS dba24c (1.36.40); FILE MERGED
 2007/10/29 22:44:10 fs 1.36.40.5: merging changes from CWS dba24b herein, to 
not wait for later resync
 2007/09/17 09:14:20 fs 1.36.40.4: #i49183# don't auto-close designer if we 
created a new view, which supports XAlterView
 2007/09/13 11:36:37 fs 1.36.40.3: #i49183# also allow to edit a view's 
command, if it supports the XAlterView interface
 2007/09/12 09:06:02 fs 1.36.40.2: #i77492# when designing an independent SQL 
command, also allow for direct SQL, and expose this setting as property 
EscapeProcessing
 2007/09/05 07:27:02 fs 1.36.40.1: dummy change to provoke this file being 
rebuilt (there was an incompatibility in svx/ParseContext.hxx)

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.37&r2=1.38
Delta lines:  +43 -57
---------------------
--- querycontroller.hxx 2007-11-01 15:22:40+0000        1.37
+++ querycontroller.hxx 2007-11-21 16:05:27+0000        1.38
@@ -32,63 +32,34 @@
  *    MA  02111-1307  USA
  *
  ************************************************************************/
+
 #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>
+#include <com/sun/star/sdbcx/XAlterView.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
@@ -117,8 +88,10 @@
                ::std::vector<sal_uInt32>                               
m_vColumnWidth;
 
                ::com::sun::star::uno::Reference< 
::com::sun::star::sdb::XSQLQueryComposer >    m_xComposer;
+        /// if we're editing an existing view, this is non-NULL
+        ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XAlterView 
>         m_xAlterView;
 
-               ::rtl::OUString m_sStatement;               // contains the sql 
statement
+               ::rtl::OUString m_sStatement;               // contains the 
current sql statement
                ::rtl::OUString m_sUpdateCatalogName;   // catalog for update 
data
                ::rtl::OUString m_sUpdateSchemaName;    // schema for update 
data
                ::rtl::OUString m_sUpdateTableName;     // table for update data
@@ -126,23 +99,34 @@
 
                sal_Int32               m_nVisibleRows;         // which rows 
the selection browse should show
                sal_Int32               m_nSplitPos;            // the position 
of the splitter
-               sal_Bool                m_bDesign;                      // if 
design is true then we show the complete design otherwise only the text format
+        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_bEsacpeProcessing;// 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)?
+               sal_Bool                m_bEscapeProcessing;// is true when we 
shouldn't parse the statement
+
+
+        /** 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    editingView() const    { return m_nCommandType == 
::com::sun::star::sdb::CommandType::TABLE; }
+        inline  bool    editingQuery() const   { return m_nCommandType == 
::com::sun::star::sdb::CommandType::QUERY; }
+        inline  bool    editingCommand() const { return m_nCommandType == 
::com::sun::star::sdb::CommandType::COMMAND; }
 
-               ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameAccess> getElements() const;
                sal_Bool askForNewName( const ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameAccess>& _xElements,
                                                        sal_Bool _bSaveAs);
                // creates the querycomposer
                void setQueryComposer();
                void deleteIterator();
                void executeQuery();
-               void doSaveAsDoc(sal_Bool _bSaveAs);
+               bool doSaveAsDoc(sal_Bool _bSaveAs);
 
                void saveViewSettings(::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue>& _rViewProps);
                void loadViewSettings(const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue>& _rViewProps);     
@@ -174,8 +158,8 @@
                virtual void    setModified(sal_Bool _bModified=sal_True);
                
                // should the statement be parsed by our own sql parser
-               sal_Bool                isEsacpeProcessing()    const { return 
m_bEsacpeProcessing; }
-               sal_Bool                isDesignMode()                  const { 
return m_bDesign; }
+               sal_Bool                isEsacpeProcessing()    const { return 
m_bEscapeProcessing; }
+               sal_Bool                isGraphicalDesign()     const { return 
m_bGraphicalDesign; }
                sal_Bool                isDistinct()                    const { 
return m_bDistinct; }
                
                ::rtl::OUString getStatement()                  const { return 
m_sStatement; }
@@ -230,6 +214,8 @@
 
         /// sets m_sStatement, and notifies our respective property change 
listeners
         void    setStatement_fireEvent( const ::rtl::OUString& _rNewStatement, 
bool _bFireStatementChange = true );
+        /// sets the m_bEscapeProcessing member, and notifies our respective 
property change listeners
+        void    setEscapeProcessing_fireEvent( const sal_Bool 
_bEscapeProcessing );
 
         // OJoinController overridables
         virtual bool allowViews() const;




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

Reply via email to