summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/inc/querycontroller.hxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-02-28 09:11:33 +0000
committerOcke Janssen <oj@openoffice.org>2001-02-28 09:11:33 +0000
commit1d8e2404d2253d602052a4bd1511fafcfbcd1888 (patch)
tree617cecfbea13972fd792f300715eb8459b02d8f6 /dbaccess/source/ui/inc/querycontroller.hxx
parent2f2ac1c5f26a9948c1d1ffbc6e264e3ecb7dd214 (diff)
changes for the new relation design
Diffstat (limited to 'dbaccess/source/ui/inc/querycontroller.hxx')
-rw-r--r--dbaccess/source/ui/inc/querycontroller.hxx97
1 files changed, 67 insertions, 30 deletions
diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx
index 8244aa3c75d6..4c67761a9168 100644
--- a/dbaccess/source/ui/inc/querycontroller.hxx
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -1,8 +1,68 @@
+/*************************************************************************
+ *
+ * $RCSfile: querycontroller.hxx,v $
+ *
+ * $Revision: 1.6 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-28 10:10:02 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
#ifndef DBAUI_QUERYCONTROLLER_HXX
#define DBAUI_QUERYCONTROLLER_HXX
-#ifndef DBAUI_GENERICCONTROLLER_HXX
-#include "genericcontroller.hxx"
+#ifndef DBAUI_JOINCONTROLLER_HXX
+#include "JoinController.hxx"
#endif
#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
@@ -52,24 +112,18 @@ namespace dbaui
class OAddTableDlg;
class OTableFieldDesc;
class OQueryTableWindow;
- class OQueryController : public OGenericUnoController
+ class OQueryController : public OJoinController
{
- SfxUndoManager m_aUndoManager;
- ::std::vector< OTableConnectionData*> m_vTableConnectionData;
- ::std::vector< OTableWindowData*> m_vTableData;
::std::vector<OTableFieldDesc*> m_vTableFieldDesc;
OQueryParseContext* m_pParseContext;
::connectivity::OSQLParser* m_pSqlParser; // to parse sql statements
::connectivity::OSQLParseTreeIterator* m_pSqlIterator; // to iterate through them
::std::vector<sal_uInt32> m_vColumnWidth;
- Fraction m_aZoom;
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer > m_xComposer;
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
- ::rtl::OUString m_sDataSourceName; // is set in initialze
::rtl::OUString m_sStatement; // contains the sql statement
::rtl::OUString m_sUpdateCatalogName; // catalog for update data
::rtl::OUString m_sUpdateSchemaName; // schema for update data
@@ -77,19 +131,15 @@ namespace dbaui
::rtl::OUString m_sName; // name of the query
OQueryContainerWindow* m_pWindow; // temporary window
- OAddTableDlg* m_pAddTabDlg; // isa set by the first call of execute, the owner is the design view
sal_Int32 m_nVisibleRows; // which rows the selection browse should show
sal_Int32 m_nSplitPos; // the position of the splitter
- sal_Bool m_bEditable; // is the control readonly or not
sal_Bool m_bDesign; // if design is true then we show the complete design otherwise only the text format
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_bModified; // is the data modified
sal_Bool m_bEsacpeProcessing;// is true when we shouldn't parse the statement
- sal_Bool m_bOwnConnection; // is true when we created our own connection
// creates the querycomposer
void setQueryComposer();
@@ -104,27 +154,19 @@ namespace dbaui
virtual ToolBox* CreateToolBox(Window* pParent);
OQueryView* getQueryView() { return static_cast<OQueryView*>(m_pView); }
- void createNewConnection(sal_Bool _bUI = sal_False);
+ virtual void createNewConnection(sal_Bool _bUI = sal_False);
public:
OQueryController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
~OQueryController();
- // temp
- virtual VCLXWindow* getWindowPeer();
- // removes the connection from the vector and delete it
- void removeConnectionData(const OTableConnectionData* _pData);
- ::std::vector< OTableWindowData*>* getTableWindowData() { return &m_vTableData; }
::std::vector<OTableFieldDesc*>* getTableFieldDesc() { return &m_vTableFieldDesc; }
- ::std::vector< OTableConnectionData*>* getTableConnectionData() { return &m_vTableConnectionData;}
- void SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY );
- void SaveTabWinPosSize(OQueryTableWindow* pTabWin, long nOffsetX, long nOffsetY);
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() { return m_xConnection; }
+ VCLXWindow* getWindowPeer();
+
+ virtual void setModified(sal_Bool _bModified=sal_True);
// should the statement be parsed by our own sql parser
- sal_Bool isReadOnly() const { return !m_bEditable; }
- sal_Bool isModified() const { return m_bModified; }
sal_Bool isEsacpeProcessing() const { return m_bEsacpeProcessing; }
sal_Bool isDesignMode() const { return m_bDesign; }
sal_Bool isDistinct() const { return m_bDistinct; }
@@ -136,11 +178,6 @@ namespace dbaui
void setDistinct(sal_Bool _bDistinct) { m_bDistinct = _bDistinct;}
void setSplitPos(sal_Int32 _nSplitPos) { m_nSplitPos = _nSplitPos;}
void setVisibleRows(sal_Int32 _nVisibleRows) { m_nVisibleRows = _nVisibleRows;}
- void setModified(sal_Bool _bModified=sal_True);
-
- // const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();}
- // need for undo's and redo's
- SfxUndoManager* getUndoMgr();
::connectivity::OSQLParser* getParser() { return m_pSqlParser; }
::connectivity::OSQLParseTreeIterator& getParseIterator() { return *m_pSqlIterator; }