summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/inc
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/inc')
-rw-r--r--dbaccess/source/ui/inc/AccessibleBaseIFace.hxx55
-rw-r--r--dbaccess/source/ui/inc/AppElementType.hxx68
-rw-r--r--dbaccess/source/ui/inc/CollectionView.hxx90
-rw-r--r--dbaccess/source/ui/inc/ColumnControlWindow.hxx85
-rw-r--r--dbaccess/source/ui/inc/ConnectionLine.hxx112
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineAccess.hxx110
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineData.hxx102
-rw-r--r--dbaccess/source/ui/inc/DExport.hxx191
-rw-r--r--dbaccess/source/ui/inc/ExtensionNotPresent.hxx89
-rw-r--r--dbaccess/source/ui/inc/FieldControls.hxx191
-rw-r--r--dbaccess/source/ui/inc/FieldDescControl.hxx234
-rw-r--r--dbaccess/source/ui/inc/FieldDescriptions.hxx125
-rw-r--r--dbaccess/source/ui/inc/GeneralUndo.hxx57
-rw-r--r--dbaccess/source/ui/inc/HtmlReader.hxx92
-rw-r--r--dbaccess/source/ui/inc/IClipBoardTest.hxx50
-rw-r--r--dbaccess/source/ui/inc/IItemSetHelper.hxx72
-rw-r--r--dbaccess/source/ui/inc/IUpdateHelper.hxx54
-rw-r--r--dbaccess/source/ui/inc/JAccess.hxx89
-rw-r--r--dbaccess/source/ui/inc/JoinController.hxx180
-rw-r--r--dbaccess/source/ui/inc/JoinDesignView.hxx87
-rw-r--r--dbaccess/source/ui/inc/JoinExchange.hxx89
-rw-r--r--dbaccess/source/ui/inc/JoinTableView.hxx326
-rw-r--r--dbaccess/source/ui/inc/QEnumTypes.hxx92
-rw-r--r--dbaccess/source/ui/inc/QueryDesignView.hxx177
-rw-r--r--dbaccess/source/ui/inc/QueryTableView.hxx145
-rw-r--r--dbaccess/source/ui/inc/QueryTextView.hxx74
-rw-r--r--dbaccess/source/ui/inc/QueryViewSwitch.hxx106
-rw-r--r--dbaccess/source/ui/inc/RTableConnectionData.hxx102
-rw-r--r--dbaccess/source/ui/inc/RefFunctor.hxx60
-rw-r--r--dbaccess/source/ui/inc/RelControliFace.hxx61
-rw-r--r--dbaccess/source/ui/inc/RelationControl.hrc34
-rw-r--r--dbaccess/source/ui/inc/RelationControl.hxx105
-rw-r--r--dbaccess/source/ui/inc/RelationController.hxx99
-rw-r--r--dbaccess/source/ui/inc/RelationDesignView.hxx68
-rw-r--r--dbaccess/source/ui/inc/RelationDlg.hxx115
-rw-r--r--dbaccess/source/ui/inc/RelationTableView.hxx84
-rw-r--r--dbaccess/source/ui/inc/RtfReader.hxx80
-rw-r--r--dbaccess/source/ui/inc/ScrollHelper.hxx77
-rw-r--r--dbaccess/source/ui/inc/SqlNameEdit.hxx110
-rw-r--r--dbaccess/source/ui/inc/TableConnection.hxx111
-rw-r--r--dbaccess/source/ui/inc/TableConnectionData.hxx115
-rw-r--r--dbaccess/source/ui/inc/TableController.hxx160
-rw-r--r--dbaccess/source/ui/inc/TableCopyHelper.hxx200
-rw-r--r--dbaccess/source/ui/inc/TableDesignControl.hxx102
-rw-r--r--dbaccess/source/ui/inc/TableDesignHelpBar.hxx75
-rw-r--r--dbaccess/source/ui/inc/TableDesignView.hxx123
-rw-r--r--dbaccess/source/ui/inc/TableFieldDescription.hxx163
-rw-r--r--dbaccess/source/ui/inc/TableGrantCtrl.hxx117
-rw-r--r--dbaccess/source/ui/inc/TableRow.hxx93
-rw-r--r--dbaccess/source/ui/inc/TableRowExchange.hxx53
-rw-r--r--dbaccess/source/ui/inc/TableWindow.hxx211
-rw-r--r--dbaccess/source/ui/inc/TableWindowAccess.hxx121
-rw-r--r--dbaccess/source/ui/inc/TableWindowData.hxx106
-rw-r--r--dbaccess/source/ui/inc/TableWindowListBox.hxx111
-rw-r--r--dbaccess/source/ui/inc/TableWindowTitle.hxx59
-rw-r--r--dbaccess/source/ui/inc/TablesSingleDlg.hxx87
-rw-r--r--dbaccess/source/ui/inc/TokenWriter.hxx259
-rw-r--r--dbaccess/source/ui/inc/TypeInfo.hxx146
-rw-r--r--dbaccess/source/ui/inc/UITools.hxx464
-rw-r--r--dbaccess/source/ui/inc/UserAdminDlg.hxx93
-rw-r--r--dbaccess/source/ui/inc/VertSplitView.hxx60
-rw-r--r--dbaccess/source/ui/inc/WCPage.hxx110
-rw-r--r--dbaccess/source/ui/inc/WColumnSelect.hxx105
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx423
-rw-r--r--dbaccess/source/ui/inc/WExtendPages.hxx86
-rw-r--r--dbaccess/source/ui/inc/WNameMatch.hxx102
-rw-r--r--dbaccess/source/ui/inc/WTabPage.hxx60
-rw-r--r--dbaccess/source/ui/inc/WTypeSelect.hxx144
-rw-r--r--dbaccess/source/ui/inc/adtabdlg.hxx127
-rw-r--r--dbaccess/source/ui/inc/advancedsettingsdlg.hxx97
-rw-r--r--dbaccess/source/ui/inc/asyncmodaldialog.hxx67
-rw-r--r--dbaccess/source/ui/inc/browserids.hxx121
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx369
-rw-r--r--dbaccess/source/ui/inc/brwview.hxx117
-rw-r--r--dbaccess/source/ui/inc/callbacks.hxx129
-rw-r--r--dbaccess/source/ui/inc/charsetlistbox.hxx68
-rw-r--r--dbaccess/source/ui/inc/charsets.hxx144
-rw-r--r--dbaccess/source/ui/inc/commontypes.hxx58
-rw-r--r--dbaccess/source/ui/inc/curledit.hxx89
-rw-r--r--dbaccess/source/ui/inc/databaseobjectview.hxx264
-rw-r--r--dbaccess/source/ui/inc/datasourceconnector.hxx96
-rw-r--r--dbaccess/source/ui/inc/datasourcemap.hxx266
-rw-r--r--dbaccess/source/ui/inc/dbadmin.hxx139
-rw-r--r--dbaccess/source/ui/inc/dbexchange.hxx99
-rw-r--r--dbaccess/source/ui/inc/dbtreelistbox.hxx170
-rw-r--r--dbaccess/source/ui/inc/dbu_brw.hrc55
-rw-r--r--dbaccess/source/ui/inc/dbu_control.hrc56
-rw-r--r--dbaccess/source/ui/inc/dbu_dlg.hrc135
-rw-r--r--dbaccess/source/ui/inc/dbu_misc.hrc62
-rw-r--r--dbaccess/source/ui/inc/dbu_qry.hrc96
-rw-r--r--dbaccess/source/ui/inc/dbu_rel.hrc50
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc420
-rw-r--r--dbaccess/source/ui/inc/dbu_tbl.hrc99
-rw-r--r--dbaccess/source/ui/inc/dbu_uno.hrc56
-rw-r--r--dbaccess/source/ui/inc/dbwiz.hxx135
-rw-r--r--dbaccess/source/ui/inc/dbwizsetup.hxx197
-rw-r--r--dbaccess/source/ui/inc/defaultobjectnamecheck.hxx146
-rw-r--r--dbaccess/source/ui/inc/directsql.hxx141
-rw-r--r--dbaccess/source/ui/inc/dlgattr.hrc37
-rw-r--r--dbaccess/source/ui/inc/dlgattr.hxx64
-rw-r--r--dbaccess/source/ui/inc/dlgsave.hxx99
-rw-r--r--dbaccess/source/ui/inc/dlgsize.hxx72
-rw-r--r--dbaccess/source/ui/inc/dsitems.hxx107
-rw-r--r--dbaccess/source/ui/inc/dsmeta.hxx145
-rw-r--r--dbaccess/source/ui/inc/exsrcbrw.hxx115
-rw-r--r--dbaccess/source/ui/inc/formadapter.hxx449
-rw-r--r--dbaccess/source/ui/inc/imageprovider.hxx188
-rw-r--r--dbaccess/source/ui/inc/indexcollection.hxx119
-rw-r--r--dbaccess/source/ui/inc/indexdialog.hxx185
-rw-r--r--dbaccess/source/ui/inc/indexes.hxx105
-rw-r--r--dbaccess/source/ui/inc/indexfieldscontrol.hxx112
-rw-r--r--dbaccess/source/ui/inc/linkeddocuments.hxx141
-rw-r--r--dbaccess/source/ui/inc/listviewitems.hxx70
-rw-r--r--dbaccess/source/ui/inc/localresaccess.hxx62
-rw-r--r--dbaccess/source/ui/inc/makefile.mk43
-rw-r--r--dbaccess/source/ui/inc/marktree.hxx86
-rw-r--r--dbaccess/source/ui/inc/moduledbu.hxx106
-rw-r--r--dbaccess/source/ui/inc/objectnamecheck.hxx77
-rw-r--r--dbaccess/source/ui/inc/opendoccontrols.hxx95
-rw-r--r--dbaccess/source/ui/inc/paramdialog.hxx126
-rw-r--r--dbaccess/source/ui/inc/propertysetitem.hxx69
-rw-r--r--dbaccess/source/ui/inc/propertystorage.hxx97
-rw-r--r--dbaccess/source/ui/inc/querycontainerwindow.hxx126
-rw-r--r--dbaccess/source/ui/inc/querycontroller.hxx261
-rw-r--r--dbaccess/source/ui/inc/queryfilter.hxx149
-rw-r--r--dbaccess/source/ui/inc/queryorder.hxx130
-rw-r--r--dbaccess/source/ui/inc/queryview.hxx60
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hrc107
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hxx347
-rw-r--r--dbaccess/source/ui/inc/sbamultiplex.hxx438
-rw-r--r--dbaccess/source/ui/inc/sqledit.hxx91
-rw-r--r--dbaccess/source/ui/inc/sqlmessage.hxx137
-rw-r--r--dbaccess/source/ui/inc/statusbarontroller.hxx54
-rw-r--r--dbaccess/source/ui/inc/stringlistitem.hxx68
-rw-r--r--dbaccess/source/ui/inc/tabletree.hxx200
-rw-r--r--dbaccess/source/ui/inc/textconnectionsettings.hxx82
-rw-r--r--dbaccess/source/ui/inc/toolbox_tmpl.hrc100
-rw-r--r--dbaccess/source/ui/inc/toolboxcontroller.hxx75
-rw-r--r--dbaccess/source/ui/inc/undosqledit.hxx59
-rw-r--r--dbaccess/source/ui/inc/unoadmin.hxx81
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx499
-rw-r--r--dbaccess/source/ui/inc/unosqlmessage.hxx90
142 files changed, 18187 insertions, 0 deletions
diff --git a/dbaccess/source/ui/inc/AccessibleBaseIFace.hxx b/dbaccess/source/ui/inc/AccessibleBaseIFace.hxx
new file mode 100644
index 000000000000..a6e8fbeed6d1
--- /dev/null
+++ b/dbaccess/source/ui/inc/AccessibleBaseIFace.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_ACCESSIBLE_HELPER_IFACE_HXX
+#define DBAUI_ACCESSIBLE_HELPER_IFACE_HXX
+
+#include <sal/types.h>
+
+namespace dbaui
+{
+ class SAL_NO_VTABLE IAccessibleHelper
+ {
+ protected:
+ /** isEditable returns the current editable state
+ @return true if it is editable otherwise false
+ */
+ virtual sal_Bool isEditable() const = 0;
+ public:
+ /** notifies all listeners that this object has changed
+ @param _nEventId the event id
+ @param _aOldValue the old value
+ @param _aNewValue the new value
+ */
+ virtual void notifyAccessibleEvent( sal_Int16 _nEventId,
+ const ::com::sun::star::uno::Any& _aOldValue,
+ const ::com::sun::star::uno::Any& _aNewValue) = 0;
+ };
+}
+#endif // DBAUI_ACCESSIBLE_HELPER_IFACE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/AppElementType.hxx b/dbaccess/source/ui/inc/AppElementType.hxx
new file mode 100644
index 000000000000..6a6c25c704d7
--- /dev/null
+++ b/dbaccess/source/ui/inc/AppElementType.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_APPELEMENTTYPE_HXX
+#define DBAUI_APPELEMENTTYPE_HXX
+
+#include <com/sun/star/sdb/application/DatabaseObject.hpp>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ enum ElementType
+ {
+ E_TABLE = ::com::sun::star::sdb::application::DatabaseObject::TABLE,
+ E_QUERY = ::com::sun::star::sdb::application::DatabaseObject::QUERY,
+ E_FORM = ::com::sun::star::sdb::application::DatabaseObject::FORM,
+ E_REPORT = ::com::sun::star::sdb::application::DatabaseObject::REPORT,
+
+ E_NONE = 4,
+ E_ELEMENT_TYPE_COUNT = E_NONE
+ };
+
+ enum PreviewMode
+ {
+ E_PREVIEWNONE = 0,
+ E_DOCUMENT = 1,
+ E_DOCUMENTINFO = 2
+ };
+
+ enum ElementOpenMode
+ {
+ E_OPEN_NORMAL,
+ E_OPEN_DESIGN,
+ E_OPEN_FOR_MAIL
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+#endif // DBAUI_APPELEMENTTYPE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx
new file mode 100644
index 000000000000..deb5750b9566
--- /dev/null
+++ b/dbaccess/source/ui/inc/CollectionView.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_COLLECTIONVIEW_HXX
+#define DBAUI_COLLECTIONVIEW_HXX
+
+#include <svtools/fileview.hxx>
+#include <vcl/button.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include <com/sun/star/ucb/XContent.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+ /* this class allows to browse through the collection of forms and reports
+ */
+ class OCollectionView : public ModalDialog
+ {
+ FixedText m_aFTCurrentPath;
+ ImageButton m_aNewFolder;
+ ImageButton m_aUp;
+ SvtFileView m_aView;
+ FixedText m_aFTName;
+ Edit m_aName;
+ FixedLine m_aFL;
+ PushButton m_aPB_OK;
+ CancelButton m_aPB_CANCEL;
+ HelpButton m_aPB_HELP;
+ String m_sPath;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> m_xContent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ Size m_aDlgSize;
+ Size m_a6Size;
+ sal_Int32 m_nFixDeltaHeight;
+ sal_Bool m_bCreateForm;
+
+ DECL_LINK(Up_Click,PushButton*);
+ DECL_LINK(NewFolder_Click,PushButton*);
+ DECL_LINK(Save_Click,PushButton*);
+ DECL_LINK(Dbl_Click_FileView,SvtFileView*);
+
+ /// sets the fixedtext to the right content
+ void initCurrentPath();
+ public:
+ OCollectionView( Window * pParent
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent
+ ,const ::rtl::OUString& _sDefaultName
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB);
+ virtual ~OCollectionView();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> getSelectedFolder() const;
+ ::rtl::OUString getName() const;
+ };
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+
+#endif //DBAUI_COLLECTIONVIEW_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
new file mode 100644
index 000000000000..d0a7357d66be
--- /dev/null
+++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_COLUMNCONTROLWINDOW_HXX
+#define DBAUI_COLUMNCONTROLWINDOW_HXX
+
+#include "FieldDescControl.hxx"
+#include "TypeInfo.hxx"
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+ // =============================================================================================
+ // OColumnControlWindow
+ // =============================================================================================
+ class OColumnControlWindow : public OFieldDescControl
+ {
+ ::com::sun::star::lang::Locale m_aLocale;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
+ mutable ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
+
+ OTypeInfoMap m_aDestTypeInfo;
+ ::std::vector<OTypeInfoMap::iterator> m_aDestTypeInfoIndex;
+
+ mutable TOTypeInfoSP m_pTypeInfo; // default type
+ String m_sTypeNames; // these type names are the ones out of the resource file
+ ::rtl::OUString m_sAutoIncrementValue;
+ sal_Bool m_bAutoIncrementEnabled;
+ protected:
+ virtual void ActivateAggregate( EControlType eType );
+ virtual void DeactivateAggregate( EControlType eType );
+
+ virtual ::com::sun::star::lang::Locale GetLocale() const;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const;
+ virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos);
+ virtual sal_Bool isAutoIncrementValueEnabled() const;
+ virtual ::rtl::OUString getAutoIncrementValue() const;
+ virtual void CellModified(long nRow, USHORT nColId );
+
+ public:
+ OColumnControlWindow(Window* pParent
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
+ virtual ~OColumnControlWindow();
+
+ void setConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xCon);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> getMetaData();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection();
+ virtual const OTypeInfoMap* getTypeInfo() const;
+ TOTypeInfoSP getDefaultTyp() const;
+ };
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+#endif // DBAUI_COLUMNCONTROLWINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx
new file mode 100644
index 000000000000..1fdbc04b182d
--- /dev/null
+++ b/dbaccess/source/ui/inc/ConnectionLine.hxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_CONNECTIONLINE_HXX
+#define DBAUI_CONNECTIONLINE_HXX
+
+#include <tools/gen.hxx>
+#include <tools/string.hxx>
+#include "ConnectionLineData.hxx"
+#include <functional>
+
+class OutputDevice;
+namespace dbaui
+{
+
+ //==================================================================
+ // ConnData ---------->* ConnLineData
+ // ^1 ^1
+ // | |
+ // Conn ---------->* ConnLine
+ //==================================================================
+
+ /*
+ the class OConnectionLine represents the graphical line between the to two windows
+ **/
+ class OConnectionLineData;
+ class OTableConnection;
+ class OTableWindow;
+ class OConnectionLine
+ {
+ OTableConnection* m_pTabConn;
+ OConnectionLineDataRef m_pData;
+
+ Point m_aSourceConnPos,
+ m_aDestConnPos;
+ Point m_aSourceDescrLinePos,
+ m_aDestDescrLinePos;
+ public:
+ OConnectionLine( OTableConnection* pConn, OConnectionLineDataRef pLineData );
+ OConnectionLine( const OConnectionLine& rLine );
+ virtual ~OConnectionLine();
+
+ virtual OConnectionLine& operator=( const OConnectionLine& rLine );
+
+ Rectangle GetBoundingRect();
+ BOOL RecalcLine();
+ void Draw( OutputDevice* pOutDev );
+ bool CheckHit( const Point& rMousePos ) const;
+ String GetSourceFieldName() const { return m_pData->GetSourceFieldName(); }
+ String GetDestFieldName() const { return m_pData->GetDestFieldName(); }
+
+ BOOL IsValid() const;
+
+ Rectangle GetSourceTextPos() const;
+ Rectangle GetDestTextPos() const;
+
+ OConnectionLineDataRef GetData() const { return m_pData; }
+
+ Point getMidPoint() const;
+ };
+ /// unary_function Functor object for class OConnectionLine returntype is void
+ /// draws a connectionline object on outputdevice
+ struct TConnectionLineDrawFunctor : ::std::unary_function<OConnectionLine*,void>
+ {
+ OutputDevice* pDevice;
+ TConnectionLineDrawFunctor(OutputDevice* _pDevice)
+ {
+ pDevice = _pDevice;
+ }
+ inline void operator()(OConnectionLine* _pLine)
+ {
+ _pLine->Draw(pDevice);
+ }
+ };
+ /// binary_function Functor object for class OConnectionLine returntype is bool
+ /// checks if the point is on connectionline
+ struct TConnectionLineCheckHitFunctor : ::std::binary_function<OConnectionLine*,Point,bool>
+ {
+ inline bool operator()(const OConnectionLine* lhs,const Point& rhs) const
+ {
+ return lhs->CheckHit(rhs);
+ }
+ };
+
+}
+#endif // DBAUI_CONNECTIONLINE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
new file mode 100644
index 000000000000..e9edc1837a5c
--- /dev/null
+++ b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBACCESS_CONNECTIONLINEACCESS_HXX
+#define DBACCESS_CONNECTIONLINEACCESS_HXX
+
+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+
+namespace dbaui
+{
+ typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleRelationSet,
+ ::com::sun::star::accessibility::XAccessible
+ > OConnectionLineAccess_BASE;
+ class OTableConnection;
+ /** the class OConnectionLineAccess represents the accessible object for the connection between two table windows
+ like they are used in the QueryDesign and the RelationDesign
+ */
+ class OConnectionLineAccess : public VCLXAccessibleComponent
+ , public OConnectionLineAccess_BASE
+ {
+ const OTableConnection* m_pLine; // the window which I should give accessibility to
+ protected:
+ /** this function is called upon disposing the component
+ */
+ virtual void SAL_CALL disposing();
+
+ /** isEditable returns the current editable state
+ @return true if it is editable otherwise false
+ */
+ virtual sal_Bool isEditable() const;
+ public:
+ OConnectionLineAccess(OTableConnection* _pLine);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw ()
+ { // here inline is allowed because we do not use this class outside this dll
+ VCLXAccessibleComponent::acquire( );
+ }
+ virtual void SAL_CALL release( ) throw ()
+ { // here inline is allowed because we do not use this class outside this dll
+ VCLXAccessibleComponent::release( );
+ }
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo - static methods
+ static ::rtl::OUString getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException );
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleComponent
+ virtual sal_Bool SAL_CALL contains( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isShowing( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isVisible( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isFocusTraversable( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleRelationSet
+ virtual sal_Int32 SAL_CALL getRelationCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::AccessibleRelation SAL_CALL getRelation( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL containsRelation( sal_Int16 aRelationType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::AccessibleRelation SAL_CALL getRelationByType( sal_Int16 aRelationType ) throw (::com::sun::star::uno::RuntimeException);
+ };
+}
+#endif // DBACCESS_CONNECTIONLINEACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ConnectionLineData.hxx b/dbaccess/source/ui/inc/ConnectionLineData.hxx
new file mode 100644
index 000000000000..176e169b3fd3
--- /dev/null
+++ b/dbaccess/source/ui/inc/ConnectionLineData.hxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_CONNECTIONLINEDATA_HXX
+#define DBAUI_CONNECTIONLINEDATA_HXX
+
+#include "QEnumTypes.hxx"
+#include <vector>
+
+#include <rtl/ref.hxx>
+#include <salhelper/simplereferenceobject.hxx>
+#include "RefFunctor.hxx"
+#include <rtl/ustring.hxx>
+
+namespace dbaui
+{
+
+ //==================================================================
+ // ConnData ---------->* ConnLineData
+ // ^1 ^1
+ // | |
+ // Conn ---------->* ConnLine
+ //==================================================================
+
+
+ //==================================================================
+ /**
+ the class OConnectionLineData contains the data of a connection
+ e.g. the source and the destanation field
+ **/
+ class OConnectionLineData : public ::salhelper::SimpleReferenceObject
+ {
+ ::rtl::OUString m_aSourceFieldName;
+ ::rtl::OUString m_aDestFieldName;
+
+ friend bool operator==(const OConnectionLineData& lhs, const OConnectionLineData& rhs);
+ friend bool operator!=(const OConnectionLineData& lhs, const OConnectionLineData& rhs) { return !(lhs == rhs); }
+ protected:
+ virtual ~OConnectionLineData();
+ public:
+ OConnectionLineData();
+ OConnectionLineData( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName );
+ OConnectionLineData( const OConnectionLineData& rConnLineData );
+
+ // eine Kopie der eigenen Instanz liefern (das ist mir irgendwie angenehmer als ein virtueller Zuweisungsoperator)
+ void CopyFrom(const OConnectionLineData& rSource);
+
+ // Memberzugriff (schreiben)
+ void SetFieldName(EConnectionSide nWhich, const ::rtl::OUString& strFieldName)
+ {
+ if (nWhich==JTCS_FROM)
+ m_aSourceFieldName = strFieldName;
+ else
+ m_aDestFieldName = strFieldName;
+ }
+ void SetSourceFieldName( const ::rtl::OUString& rSourceFieldName){ SetFieldName(JTCS_FROM, rSourceFieldName); }
+ void SetDestFieldName( const ::rtl::OUString& rDestFieldName ){ SetFieldName(JTCS_TO, rDestFieldName); }
+
+ inline bool clearSourceFieldName() { SetSourceFieldName(::rtl::OUString()); return true;}
+ inline bool clearDestFieldName() { SetDestFieldName(::rtl::OUString()); return true;}
+
+ // Memberzugriff (lesen)
+ ::rtl::OUString GetFieldName(EConnectionSide nWhich) const { return (nWhich == JTCS_FROM) ? m_aSourceFieldName : m_aDestFieldName; }
+ ::rtl::OUString GetSourceFieldName() const { return GetFieldName(JTCS_FROM); }
+ ::rtl::OUString GetDestFieldName() const { return GetFieldName(JTCS_TO); }
+
+ bool Reset();
+ OConnectionLineData& operator=( const OConnectionLineData& rConnLineData );
+ };
+
+ //-------------------------------------------------------------------------
+ //------------------------------------------------------------------
+ typedef ::rtl::Reference< OConnectionLineData > OConnectionLineDataRef;
+ typedef ::std::vector< OConnectionLineDataRef > OConnectionLineDataVec;
+}
+#endif // DBAUI_CONNECTIONLINEDATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/DExport.hxx b/dbaccess/source/ui/inc/DExport.hxx
new file mode 100644
index 000000000000..fde1711272a7
--- /dev/null
+++ b/dbaccess/source/ui/inc/DExport.hxx
@@ -0,0 +1,191 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_DATABASEEXPORT_HXX
+#define DBAUI_DATABASEEXPORT_HXX
+
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/Date.hpp>
+#include <vector>
+#include <tools/string.hxx>
+#include <comphelper/stl_types.hxx>
+#include "TypeInfo.hxx"
+#include "WTypeSelect.hxx"
+#include "commontypes.hxx"
+#include "IUpdateHelper.hxx"
+#include "WTypeSelect.hxx"
+
+namespace com { namespace sun { namespace star {
+ namespace awt{
+ struct FontDescriptor;
+ }
+ namespace sdbc{
+ class XPreparedStatement;
+ class XDatabaseMetaData;
+ }
+}}}
+
+#define COLUMN_POSITION_NOT_FOUND ((sal_Int32)-1)
+
+class Window;
+class SvNumberFormatter;
+namespace dbaui
+{
+ class OFieldDescription;
+ class OTypeInfo;
+ class OWizTypeSelect;
+ class ODatabaseExport
+ {
+ public:
+ DECLARE_STL_MAP(::rtl::OUString,OFieldDescription*,::comphelper::UStringMixLess,TColumns);
+ typedef ::std::vector<TColumns::const_iterator> TColumnVector;
+ typedef ::std::vector< ::std::pair<sal_Int32,sal_Int32> > TPositions;
+
+ protected:
+ TPositions m_vColumns; // Welche Spalten "ubernommen werden sollen
+ ::std::vector<sal_Int32> m_vColumnTypes; // FeldTypen f"ur schnelleren Zugriff
+ ::std::vector<sal_Int32> m_vColumnSize;
+ ::std::vector<sal_Int16> m_vNumberFormat;
+ ::com::sun::star::lang::Locale m_aLocale;
+
+ TColumns m_aDestColumns; // container for new created columns
+ TColumnVector m_vDestVector;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTable; // dest table
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xTables; // container
+ SharedConnection m_xConnection; // dest conn
+
+ ::boost::shared_ptr<IUpdateHelper> m_pUpdateHelper;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > m_xResultSet; //
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xFactory;
+ ::com::sun::star::util::Date m_aNullDate;
+
+ SvNumberFormatter* m_pFormatter;
+ SvStream& m_rInputStream;
+ //dyf add 2006/06/01
+ //for save the selected tablename
+ ::rtl::OUString m_sDefaultTableName;
+ //dyf add end
+ String m_sTextToken; // Zellen Inhalt
+ String m_sNumToken; /// SDNUM value
+ String m_sValToken; /// SDVAL value
+ TOTypeInfoSP m_pTypeInfo; // contains the default type
+ const TColumnVector* m_pColumnList;
+ const OTypeInfoMap* m_pInfoMap;
+ sal_Int32 m_nColumnPos; // aktuelle Spaltenposition
+ sal_Int32 m_nRows; // Anzahl der Zeilen die durchsucht werden sollen
+ sal_Int32 m_nRowCount; // current count of rows
+ rtl_TextEncoding m_nDefToken; // Sprache
+ sal_Bool m_bError; // Fehler und Abbruchstatus
+ sal_Bool m_bInTbl; // Ist gesetzt, wenn der Parser sich in der RTF Tabelle befindet
+ sal_Bool m_bHead; // ist true, wenn die Kopfzeile noch nicht gelesen wurde
+ sal_Bool m_bDontAskAgain;// Falls beim Einf"ugen ein Fehler auftritt, soll die Fehlermeldung nicht
+ sal_Bool m_bIsAutoIncrement; // if PKey is set by user
+ sal_Bool m_bFoundTable; // set to true when a table was found
+ sal_Bool m_bCheckOnly;
+ bool m_bAppendFirstLine;
+
+
+ virtual sal_Bool CreateTable(int nToken) = 0;
+ virtual TypeSelectionPageFactory
+ getTypeSelectionPageFactory() = 0;
+
+ void CreateDefaultColumn(const ::rtl::OUString& _rColumnName);
+ sal_Int16 CheckString(const String& aToken, sal_Int16 _nOldNumberFormat);
+ void adjustFormat();
+ void eraseTokens();
+ void insertValueIntoColumn();
+ sal_Bool createRowSet();
+ void showErrorDialog(const ::com::sun::star::sdbc::SQLException& e);
+ void ensureFormatter();
+
+ /** executeWizard calls a wizard to create/append data
+ @param _sTableName the tablename
+ @param _aTextColor the text color of the new created table
+ @param _rFont the font of the new table
+
+ @return true when an error occurs
+ */
+ sal_Bool executeWizard( const ::rtl::OUString& _sTableName,
+ const ::com::sun::star::uno::Any& _aTextColor,
+ const ::com::sun::star::awt::FontDescriptor& _rFont);
+
+ virtual ~ODatabaseExport();
+ public:
+ ODatabaseExport(
+ const SharedConnection& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const TColumnVector* rList,
+ const OTypeInfoMap* _pInfoMap,
+ SvStream& _rInputStream
+ );
+
+ // wird f"ur auto. Typ-Erkennung gebraucht
+ ODatabaseExport(
+ sal_Int32 nRows,
+ const TPositions& _rColumnPositions,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const TColumnVector* rList,
+ const OTypeInfoMap* _pInfoMap,
+ sal_Bool _bAutoIncrementEnabled,
+ SvStream& _rInputStream
+ );
+
+ void SetColumnTypes(const TColumnVector* rList,const OTypeInfoMap* _pInfoMap);
+
+ //dyf add 20070601
+ inline void SetTableName(const ::rtl::OUString &_sTableName){ m_sDefaultTableName = _sTableName ; }
+ //dyf add end
+
+ virtual void release() = 0;
+
+ void enableCheckOnly() { m_bCheckOnly = sal_True; }
+ sal_Bool isCheckEnabled() const { return m_bCheckOnly; }
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > createPreparedStatment( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDestTable
+ ,const TPositions& _rvColumns);
+ };
+}
+
+#endif // DBAUI_DATABASEEXPORT_HXX
+
+
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ExtensionNotPresent.hxx b/dbaccess/source/ui/inc/ExtensionNotPresent.hxx
new file mode 100644
index 000000000000..78f88c3eb522
--- /dev/null
+++ b/dbaccess/source/ui/inc/ExtensionNotPresent.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBU_EXTENSIONNOTPRESENT_HXX
+#define DBU_EXTENSIONNOTPRESENT_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+#include <vcl/button.hxx>
+#include <com/sun/star/report/XReportDefinition.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/system/XSystemShellExecute.hpp>
+
+namespace dbaui
+{
+
+/*************************************************************************
+|*
+|* Groups and Sorting dialog
+|*
+\************************************************************************/
+class OExtensionNotPresentDialog : public ModalDialog
+{
+ FixedImage m_aFI_WARNING;
+ FixedText m_aFT_TEXT;
+
+ PushButton m_aPB_DOWNLOAD;
+ CancelButton m_aPB_CANCEL;
+
+ ::com::sun::star::lang::Locale m_nLocale;
+ com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xMultiServiceFactory;
+
+ /** returns the format string.
+ */
+ // ::rtl::OUString getFormatString(::sal_Int16 _nNumberFormatIndex);
+
+ DECL_LINK(Download_Click,PushButton*);
+
+ // not CopyCTOR, no self assignment
+ OExtensionNotPresentDialog(const OExtensionNotPresentDialog&);
+ void operator =(const OExtensionNotPresentDialog&);
+
+ // get some values out of the configuration
+ rtl::OUString getFromConfigurationExtension(rtl::OUString const& _sPropertyName) const;
+ rtl::OUString getFromConfigurationExtension(rtl::OString const& _sPropertyName) const; // syntactic sugar
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::system::XSystemShellExecute > getShellExecuter() const;
+
+public:
+ OExtensionNotPresentDialog( Window* pParent, com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > );
+ virtual ~OExtensionNotPresentDialog();
+ virtual short Execute();
+
+ inline String getText() const { return m_aFT_TEXT.GetText(); }
+};
+// =============================================================================
+} // namespace rptui
+// =============================================================================
+#endif // DBU_EXTENSIONNOTPRESENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx
new file mode 100644
index 000000000000..3a9133dc193e
--- /dev/null
+++ b/dbaccess/source/ui/inc/FieldControls.hxx
@@ -0,0 +1,191 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_FIELDCONTROLS_HXX
+#define DBAUI_FIELDCONTROLS_HXX
+
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/svapp.hxx>
+#include "SqlNameEdit.hxx"
+#include "moduledbu.hxx"
+
+
+namespace dbaui
+{
+ namespace
+ {
+ void lcl_setSpecialReadOnly( BOOL _bReadOnly, Window* _pWin )
+ {
+ StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings();
+ const Color& rNewColor = _bReadOnly ? aSystemStyle.GetDialogColor() : aSystemStyle.GetFieldColor();
+ _pWin->SetBackground(Wallpaper(rNewColor));
+ _pWin->SetControlBackground(rNewColor);
+ }
+ }
+
+ //==================================================================
+ class OPropColumnEditCtrl : public OSQLNameEdit
+ {
+ OModuleClient m_aModuleClient;
+ short m_nPos;
+ String m_strHelpText;
+ public:
+ inline OPropColumnEditCtrl(Window* pParent, ::rtl::OUString& _rAllowedChars, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
+
+ inline BOOL IsModified() const { return GetText() != GetSavedValue(); }
+
+ short GetPos() const { return m_nPos; }
+ String GetHelp() const { return m_strHelpText; }
+
+ virtual void SetSpecialReadOnly(BOOL _bReadOnly)
+ {
+ SetReadOnly(_bReadOnly);
+ lcl_setSpecialReadOnly(_bReadOnly,this);
+ }
+ };
+ inline OPropColumnEditCtrl::OPropColumnEditCtrl(Window* pParent,
+ ::rtl::OUString& _rAllowedChars,
+ USHORT nHelpId,
+ short nPosition,
+ WinBits nWinStyle)
+ :OSQLNameEdit(pParent, _rAllowedChars,nWinStyle)
+ ,m_nPos(nPosition)
+ {
+ m_strHelpText=String(ModuleRes(nHelpId));
+ }
+ //==================================================================
+ class OPropEditCtrl : public Edit
+ {
+ OModuleClient m_aModuleClient;
+ short m_nPos;
+ String m_strHelpText;
+
+ public:
+ inline OPropEditCtrl(Window* pParent, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
+ inline OPropEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition = -1);
+
+ inline BOOL IsModified() const { return GetText() != GetSavedValue(); }
+
+ short GetPos() const { return m_nPos; }
+ String GetHelp() const { return m_strHelpText; }
+
+ virtual void SetSpecialReadOnly(BOOL _bReadOnly)
+ {
+ SetReadOnly(_bReadOnly);
+ lcl_setSpecialReadOnly(_bReadOnly,this);
+ }
+ };
+
+ inline OPropEditCtrl::OPropEditCtrl(Window* pParent, USHORT nHelpId, short nPosition, WinBits nWinStyle)
+ :Edit(pParent, nWinStyle)
+ ,m_nPos(nPosition)
+ {
+ m_strHelpText =String(ModuleRes(nHelpId));
+ }
+ inline OPropEditCtrl::OPropEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition)
+ :Edit(pParent, _rRes)
+ ,m_nPos(nPosition)
+ {
+ m_strHelpText =String(ModuleRes(nHelpId));
+ }
+
+ //==================================================================
+ class OPropNumericEditCtrl : public NumericField
+ {
+ short m_nPos;
+ String m_strHelpText;
+
+ public:
+ inline OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
+ inline OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition = -1);
+
+ inline BOOL IsModified() const { return GetText() != GetSavedValue(); }
+
+ short GetPos() const { return m_nPos; }
+ String GetHelp() const { return m_strHelpText; }
+
+ virtual void SetSpecialReadOnly(BOOL _bReadOnly)
+ {
+ SetReadOnly(_bReadOnly);
+ lcl_setSpecialReadOnly(_bReadOnly,this);
+ }
+ };
+
+ inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, short nPosition, WinBits nWinStyle)
+ :NumericField(pParent, nWinStyle)
+ ,m_nPos(nPosition)
+ {
+ m_strHelpText =String(ModuleRes(nHelpId));
+ }
+ inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition)
+ :NumericField(pParent, _rRes)
+ ,m_nPos(nPosition)
+ {
+ m_strHelpText =String(ModuleRes(nHelpId));
+ }
+
+ //==================================================================
+ class OPropListBoxCtrl : public ListBox
+ {
+ short m_nPos;
+ String m_strHelpText;
+
+ public:
+ inline OPropListBoxCtrl(Window* pParent, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
+ inline OPropListBoxCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition = -1);
+
+ inline BOOL IsModified() const { return GetSelectEntryPos() != GetSavedValue(); }
+
+ short GetPos() const { return m_nPos; }
+ String GetHelp() const { return m_strHelpText; }
+
+ virtual void SetSpecialReadOnly(BOOL _bReadOnly)
+ {
+ SetReadOnly(_bReadOnly);
+ lcl_setSpecialReadOnly(_bReadOnly,this);
+ }
+ };
+
+ inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, USHORT nHelpId, short nPosition, WinBits nWinStyle)
+ :ListBox(pParent, nWinStyle)
+ ,m_nPos(nPosition)
+ {
+ m_strHelpText =String(ModuleRes(nHelpId));
+ }
+ inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition)
+ :ListBox(pParent, _rRes)
+ ,m_nPos(nPosition)
+ {
+ m_strHelpText =String(ModuleRes(nHelpId));
+ }
+}
+#endif // DBAUI_FIELDCONTROLS_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
new file mode 100644
index 000000000000..d6677b14169e
--- /dev/null
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -0,0 +1,234 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
+#define DBAUI_FIELDDESCRIPTIONCONTROL_HXX
+
+#include <vcl/tabpage.hxx>
+#include "QEnumTypes.hxx"
+#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#include "TypeInfo.hxx"
+
+//------------------------------------------------------------------
+// die Spalten einer Feld-Beschreibung einer Tabelle
+#define FIELD_NAME 1
+#define FIELD_TYPE 2
+#define HELP_TEXT 3
+#define COLUMN_DESCRIPTION 4
+
+#define FIELD_FIRST_VIRTUAL_COLUMN 5
+
+#define FIELD_PROPERTY_REQUIRED 5
+#define FIELD_PROPERTY_NUMTYPE 6
+#define FIELD_PROPERTY_AUTOINC 7
+#define FIELD_PROPERTY_DEFAULT 8
+#define FIELD_PROPERTY_TEXTLEN 9
+#define FIELD_PROPERTY_LENGTH 10
+#define FIELD_PROPERTY_SCALE 11
+#define FIELD_PROPERTY_BOOL_DEFAULT 12
+#define FIELD_PROPERTY_FORMAT 13
+#define FIELD_PRPOERTY_COLUMNNAME 14
+#define FIELD_PRPOERTY_TYPE 15
+#define FIELD_PRPOERTY_AUTOINCREMENT 16
+
+class FixedText;
+class PushButton;
+class SvxNumberFormatShell;
+class ScrollBar;
+class Button;
+class ListBox;
+class Control;
+class SvNumberFormatter;
+
+namespace dbaui
+{
+
+ class OTableDesignHelpBar;
+ class OPropListBoxCtrl;
+ class OPropEditCtrl;
+ class OPropNumericEditCtrl;
+ class OFieldDescription;
+ class OTypeInfo;
+ class OPropColumnEditCtrl;
+ //==================================================================
+ class OFieldDescControl : public TabPage
+ {
+ private:
+ OTableDesignHelpBar* pHelp;
+ Window* pLastFocusWindow;
+ Window* m_pActFocusWindow;
+
+ FixedText* pDefaultText;
+ FixedText* pRequiredText;
+ FixedText* pAutoIncrementText;
+ FixedText* pTextLenText;
+ FixedText* pNumTypeText;
+ FixedText* pLengthText;
+ FixedText* pScaleText;
+ FixedText* pFormatText;
+ FixedText* pBoolDefaultText;
+ FixedText* m_pColumnNameText;
+ FixedText* m_pTypeText;
+ FixedText* m_pAutoIncrementValueText;
+
+ OPropListBoxCtrl* pRequired;
+ OPropListBoxCtrl* pNumType;
+ OPropListBoxCtrl* pAutoIncrement;
+ OPropEditCtrl* pDefault;
+ OPropNumericEditCtrl* pTextLen;
+ OPropNumericEditCtrl* pLength;
+ OPropNumericEditCtrl* pScale;
+ OPropEditCtrl* pFormatSample;
+ OPropListBoxCtrl* pBoolDefault;
+ OPropColumnEditCtrl* m_pColumnName;
+ OPropListBoxCtrl* m_pType;
+ OPropEditCtrl* m_pAutoIncrementValue;
+
+ PushButton* pFormat;
+
+ ScrollBar* m_pVertScroll;
+ ScrollBar* m_pHorzScroll;
+
+ TOTypeInfoSP m_pPreviousType;
+ USHORT nCurChildId;
+ short m_nPos;
+ XubString aYes;
+ XubString aNo;
+
+ long m_nOldVThumb;
+ long m_nOldHThumb;
+ sal_Int32 m_nWidth;
+
+ ULONG nDelayedGrabFocusEvent;
+ sal_Bool m_bAdded;
+ bool m_bRightAligned;
+
+ OFieldDescription* pActFieldDescr;
+
+ DECL_LINK( OnScroll, ScrollBar*);
+
+ DECL_LINK( FormatClickHdl, Button * );
+ DECL_LINK( ChangeHdl, ListBox * );
+
+ DECL_LINK( DelayedGrabFocus, Control** );
+ // von ActivatePropertyField benutzt
+ DECL_LINK( OnControlFocusLost, Control* );
+ DECL_LINK( OnControlFocusGot, Control* );
+
+ void UpdateFormatSample(OFieldDescription* pFieldDescr);
+ void ArrangeAggregates();
+
+ void SetPosSize( Control** ppControl, long nRow, USHORT nCol );
+
+ void ScrollAggregate(Control* pText, Control* pInput, Control* pButton, long nDeltaX, long nDeltaY);
+ void ScrollAllAggregates();
+
+ sal_Bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const;
+ void Contruct();
+ OPropNumericEditCtrl* CreateNumericControl(USHORT _nHelpStr,short _nProperty,ULONG _nHelpId);
+ FixedText* CreateText(USHORT _nTextRes);
+ void InitializeControl(Control* _pControl,ULONG _nHelpId,bool _bAddChangeHandler);
+
+ protected:
+ inline void setRightAligned() { m_bRightAligned = true; }
+ inline bool isRightAligned() const { return m_bRightAligned; }
+
+ inline void saveCurrentFieldDescData() { SaveData( pActFieldDescr ); }
+ inline OFieldDescription* getCurrentFieldDescData() { return pActFieldDescr; }
+ inline void setCurrentFieldDescData( OFieldDescription* _pDesc ) { pActFieldDescr = _pDesc; }
+
+ sal_uInt16 CountActiveAggregates() const;
+ sal_Int32 GetMaxControlHeight() const;
+
+ virtual void ActivateAggregate( EControlType eType );
+ virtual void DeactivateAggregate( EControlType eType );
+ virtual BOOL IsReadOnly() { return FALSE; };
+
+ // Sind von den abgeleiteten Klassen zu impl.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const = 0;
+
+ virtual ::com::sun::star::lang::Locale GetLocale() const = 0;
+
+ virtual void CellModified(long nRow, USHORT nColId ) = 0;
+ virtual void SetModified(BOOL bModified); // base implementation is empty
+
+ virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) = 0;
+ virtual const OTypeInfoMap* getTypeInfo() const = 0;
+
+ virtual sal_Bool isAutoIncrementValueEnabled() const = 0;
+ virtual ::rtl::OUString getAutoIncrementValue() const = 0;
+
+ String BoolStringPersistent(const String& rUIString) const;
+ String BoolStringUI(const String& rPersistentString) const;
+
+ const OPropColumnEditCtrl* getColumnCtrl() const { return m_pColumnName; }
+
+ public:
+ OFieldDescControl( Window* pParent, OTableDesignHelpBar* pHelpBar);
+ OFieldDescControl( Window* pParent, const ResId& rResId, OTableDesignHelpBar* pHelpBar);
+ virtual ~OFieldDescControl();
+
+ void DisplayData(OFieldDescription* pFieldDescr );
+ // void DisplayData(const OColumn* pColumn);
+
+ void SaveData( OFieldDescription* pFieldDescr );
+ // void SaveData( OColumn* pColumn);
+
+ void SetControlText( USHORT nControlId, const String& rText );
+ String GetControlText( USHORT nControlId );
+ void SetReadOnly( BOOL bReadOnly );
+
+ // Resize aufegrufen
+ void CheckScrollBars();
+ sal_Bool isCutAllowed();
+ sal_Bool isCopyAllowed();
+ sal_Bool isPasteAllowed();
+
+ void cut();
+ void copy();
+ void paste();
+
+ virtual void Init();
+ virtual void GetFocus();
+ virtual void LoseFocus();
+ virtual void Resize();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> getMetaData() = 0;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection() = 0;
+
+ String getControlDefault( const OFieldDescription* _pFieldDescr ,sal_Bool _bCheck = sal_True) const;
+
+ inline void setEditWidth(sal_Int32 _nWidth) { m_nWidth = _nWidth; }
+ protected:
+ void implFocusLost(Window* _pWhich);
+ };
+}
+#endif // DBAUI_FIELDDESCRIPTIONCONTROL_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldDescriptions.hxx b/dbaccess/source/ui/inc/FieldDescriptions.hxx
new file mode 100644
index 000000000000..6764192599aa
--- /dev/null
+++ b/dbaccess/source/ui/inc/FieldDescriptions.hxx
@@ -0,0 +1,125 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#define DBAUI_FIELDDESCRIPTIONS_HXX
+
+#include "QEnumTypes.hxx"
+#include <editeng/svxenum.hxx>
+#include "TypeInfo.hxx"
+#include <osl/diagnose.h>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+
+namespace dbaui
+{
+ class OFieldDescription
+ {
+ private:
+ ::com::sun::star::uno::Any m_aDefaultValue; // the default value from the database
+ ::com::sun::star::uno::Any m_aControlDefault; // the value which the control inserts as default
+ ::com::sun::star::uno::Any m_aWidth; // sal_Int32 or void
+ ::com::sun::star::uno::Any m_aRelativePosition; // sal_Int32 or void
+
+ TOTypeInfoSP m_pType;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xDest;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > m_xDestInfo;
+
+ ::rtl::OUString m_sName;
+ ::rtl::OUString m_sTypeName;
+ ::rtl::OUString m_sDescription;
+ ::rtl::OUString m_sHelpText;
+
+ ::rtl::OUString m_sAutoIncrementValue;
+ sal_Int32 m_nType; // only used when m_pType is null
+ sal_Int32 m_nPrecision;
+ sal_Int32 m_nScale;
+ sal_Int32 m_nIsNullable;
+ sal_Int32 m_nFormatKey;
+ SvxCellHorJustify m_eHorJustify;
+ sal_Bool m_bIsAutoIncrement;
+ sal_Bool m_bIsPrimaryKey;
+ sal_Bool m_bIsCurrency;
+ sal_Bool m_bHidden;
+
+ public:
+ OFieldDescription();
+ OFieldDescription( const OFieldDescription& rDescr );
+ OFieldDescription(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xAffectedCol
+ ,sal_Bool _bUseAsDest = sal_False);
+ ~OFieldDescription();
+
+ void SetName(const ::rtl::OUString& _rName);
+ void SetDescription(const ::rtl::OUString& _rDescription);
+ void SetHelpText(const ::rtl::OUString& _sHelptext);
+ void SetDefaultValue(const ::com::sun::star::uno::Any& _rDefaultValue);
+ void SetControlDefault(const ::com::sun::star::uno::Any& _rControlDefault);
+ void SetAutoIncrementValue(const ::rtl::OUString& _sAutoIncValue);
+ void SetType(TOTypeInfoSP _pType);
+ void SetTypeValue(sal_Int32 _nType);
+ void SetTypeName(const ::rtl::OUString& _sTypeName);
+ void SetPrecision(const sal_Int32& _rPrecision);
+ void SetScale(const sal_Int32& _rScale);
+ void SetIsNullable(const sal_Int32& _rIsNullable);
+ void SetFormatKey(const sal_Int32& _rFormatKey);
+ void SetHorJustify(const SvxCellHorJustify& _rHorJustify);
+ void SetAutoIncrement(sal_Bool _bAuto);
+ void SetPrimaryKey(sal_Bool _bPKey);
+ void SetCurrency(sal_Bool _bIsCurrency);
+
+ /** copies the content of the field eescription into the column
+ @param _rxColumn the dest
+ */
+ void copyColumnSettingsTo(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn);
+
+ void FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bForce,sal_Bool _bReset);
+
+ ::rtl::OUString GetName() const;
+ ::rtl::OUString GetDescription() const;
+ ::rtl::OUString GetHelpText() const;
+ ::com::sun::star::uno::Any GetControlDefault() const;
+ ::rtl::OUString GetAutoIncrementValue() const;
+ sal_Int32 GetType() const;
+ ::rtl::OUString GetTypeName() const;
+ sal_Int32 GetPrecision() const;
+ sal_Int32 GetScale() const;
+ sal_Int32 GetIsNullable() const;
+ sal_Int32 GetFormatKey() const;
+ SvxCellHorJustify GetHorJustify() const;
+ TOTypeInfoSP getTypeInfo() const;
+ TOTypeInfoSP getSpecialTypeInfo() const;
+ sal_Bool IsAutoIncrement() const;
+ sal_Bool IsPrimaryKey() const;
+ sal_Bool IsCurrency() const;
+ sal_Bool IsNullable() const;
+ };
+}
+#endif // DBAUI_FIELDDESCRIPTIONS_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/GeneralUndo.hxx b/dbaccess/source/ui/inc/GeneralUndo.hxx
new file mode 100644
index 000000000000..727ffb091b0a
--- /dev/null
+++ b/dbaccess/source/ui/inc/GeneralUndo.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_GENERALUNDO_HXX
+#define DBAUI_GENERALUNDO_HXX
+
+#include <svl/undo.hxx>
+#include "moduledbu.hxx"
+
+namespace dbaui
+{
+ // ================================================================================================
+ // SbaCommentUndoAction - Undo-Basisklasse fuer Aktionen, deren GetComment einen aus einer Sba-Ressource
+ // geladenen String liefert
+
+ class OCommentUndoAction : public SfxUndoAction
+ {
+ OModuleClient m_aModuleClient;
+
+ protected:
+ String m_strComment; // undo, redo comment
+
+ public:
+ TYPEINFO();
+ OCommentUndoAction(USHORT nCommentID) { m_strComment = String(ModuleRes(nCommentID)); }
+
+ virtual UniString GetComment() const { return m_strComment; }
+ };
+}
+#endif // DBAUI_GENERALUNDO_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx
new file mode 100644
index 000000000000..73f9db169066
--- /dev/null
+++ b/dbaccess/source/ui/inc/HtmlReader.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_HTMLREADER_HXX
+#define DBAUI_HTMLREADER_HXX
+
+#include "DExport.hxx"
+#include <svtools/parhtml.hxx>
+#include <editeng/svxenum.hxx>
+#include <tools/stream.hxx>
+#include <com/sun/star/awt/FontDescriptor.hpp>
+
+
+namespace dbaui
+{
+ //===============================================================================================
+ // OHTMLReader
+ //===============================================================================================
+ class OHTMLReader : public HTMLParser, public ODatabaseExport
+ {
+ String m_sCurrent;
+ sal_Int32 m_nTableCount;
+ sal_Int16 m_nWidth;
+ sal_Int16 m_nColumnWidth; // max. Spaltenbreite
+ sal_Bool m_bMetaOptions; // true when we scaned the meta information
+ sal_Bool m_bSDNum;
+
+ protected:
+ virtual void NextToken( int nToken ); // Basisklasse
+ virtual sal_Bool CreateTable(int nToken);
+ virtual TypeSelectionPageFactory
+ getTypeSelectionPageFactory();
+
+ void TableDataOn(SvxCellHorJustify& eVal,int nToken);
+ void TableFontOn(::com::sun::star::awt::FontDescriptor& _rFont,sal_Int32 &_rTextColor);
+ sal_Int16 GetWidthPixel( const HTMLOption* pOption );
+ void setTextEncoding();
+ void fetchOptions();
+ virtual ~OHTMLReader();
+ public:
+ OHTMLReader(SvStream& rIn,
+ const SharedConnection& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const TColumnVector* rList = 0,
+ const OTypeInfoMap* _pInfoMap = 0);
+ // wird f"ur auto. Typ-Erkennung gebraucht
+ OHTMLReader(SvStream& rIn,
+ sal_Int32 nRows,
+ const TPositions &_rColumnPositions,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const TColumnVector* rList,
+ const OTypeInfoMap* _pInfoMap,
+ sal_Bool _bAutoIncrementEnabled);
+
+ virtual SvParserState CallParser();// Basisklasse
+ virtual void release();
+ // birgt nur korrekte Daten, wenn der 1. CTOR benutzt wurde
+ };
+
+ SV_DECL_IMPL_REF( OHTMLReader );
+}
+#endif // DBAUI_HTMLREADER_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/IClipBoardTest.hxx b/dbaccess/source/ui/inc/IClipBoardTest.hxx
new file mode 100644
index 000000000000..dfb7085965fb
--- /dev/null
+++ b/dbaccess/source/ui/inc/IClipBoardTest.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
+#define DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
+#include <sal/types.h>
+
+namespace dbaui
+{
+ class SAL_NO_VTABLE IClipboardTest
+ {
+ public:
+ virtual sal_Bool isCutAllowed() = 0;
+ virtual sal_Bool isCopyAllowed() = 0;
+ virtual sal_Bool isPasteAllowed() = 0;
+
+ virtual sal_Bool hasChildPathFocus() = 0;
+
+ virtual void copy() = 0;
+ virtual void cut() = 0;
+ virtual void paste() = 0;
+ };
+}
+#endif // DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/IItemSetHelper.hxx b/dbaccess/source/ui/inc/IItemSetHelper.hxx
new file mode 100644
index 000000000000..d6e082d77510
--- /dev/null
+++ b/dbaccess/source/ui/inc/IItemSetHelper.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_ITEMSETHELPER_HXX
+#define DBAUI_ITEMSETHELPER_HXX
+
+#include <sal/types.h>
+#include <comphelper/uno3.hxx>
+#include "dsntypes.hxx"
+
+FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
+FORWARD_DECLARE_INTERFACE(sdbc,XDriver)
+FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
+
+class SfxItemSet;
+namespace dbaui
+{
+ class SAL_NO_VTABLE IItemSetHelper
+ {
+ public:
+ virtual const SfxItemSet* getOutputSet() const = 0;
+ virtual SfxItemSet* getWriteOutputSet() = 0;
+ };
+
+ class SAL_NO_VTABLE IDatabaseSettingsDialog
+ {
+ public:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const = 0;
+ virtual ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >,sal_Bool> createConnection() = 0;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver() = 0;
+ virtual ::rtl::OUString getDatasourceType(const SfxItemSet& _rSet) const = 0;
+ virtual void clearPassword() = 0;
+ virtual sal_Bool saveDatasource() = 0;
+ virtual void setTitle(const ::rtl::OUString& _sTitle) = 0;
+
+ /** enables or disables the user's possibility to confirm the settings
+
+ In a wizard, disabling this will usually disable the "Finish" button.
+ In a normal tab dialog, this will usually disable the "OK" button.
+ */
+ virtual void enableConfirmSettings( bool _bEnable ) = 0;
+ };
+}
+#endif // DBAUI_ITEMSETHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/IUpdateHelper.hxx b/dbaccess/source/ui/inc/IUpdateHelper.hxx
new file mode 100644
index 000000000000..a13dbb5fa6a2
--- /dev/null
+++ b/dbaccess/source/ui/inc/IUpdateHelper.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_IUPDATEHELPER_HXX
+#define DBAUI_IUPDATEHELPER_HXX
+
+#include <com/sun/star/util/Date.hpp>
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/util/Time.hpp>
+
+namespace dbaui
+{
+ class SAL_NO_VTABLE IUpdateHelper
+ {
+ public:
+ virtual void updateString(sal_Int32 _nPos, const ::rtl::OUString& _sValue) = 0;
+ virtual void updateDouble(sal_Int32 _nPos,const double& _nValue) = 0;
+ virtual void updateInt(sal_Int32 _nPos,const sal_Int32& _nValue) = 0;
+ virtual void updateNull(sal_Int32 _nPos, ::sal_Int32 sqlType) = 0;
+ virtual void updateDate(sal_Int32 _nPos,const ::com::sun::star::util::Date& _nValue) = 0;
+ virtual void updateTime(sal_Int32 _nPos,const ::com::sun::star::util::Time& _nValue) = 0;
+ virtual void updateTimestamp(sal_Int32 _nPos,const ::com::sun::star::util::DateTime& _nValue) = 0;
+ virtual void moveToInsertRow() = 0;
+ virtual void insertRow() = 0;
+ };
+}
+
+#endif // DBAUI_IUPDATEHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JAccess.hxx b/dbaccess/source/ui/inc/JAccess.hxx
new file mode 100644
index 000000000000..bfedcaa2ed66
--- /dev/null
+++ b/dbaccess/source/ui/inc/JAccess.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBACCESS_JACCESS_HXX
+#define DBACCESS_JACCESS_HXX
+
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+namespace dbaui
+{
+ class OJoinTableView;
+ typedef ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessible
+ > OJoinDesignViewAccess_BASE;
+ /** the class OJoinDesignViewAccess represents the accessible object for join views
+ like the QueryDesign and the RelationDesign
+ */
+ class OJoinDesignViewAccess : public VCLXAccessibleComponent, public OJoinDesignViewAccess_BASE
+ {
+ OJoinTableView* m_pTableView; // the window which I should give accessibility to
+
+ protected:
+ /** isEditable returns the current editable state
+ @return true if the controller is not readonly otherwise false
+ */
+ virtual sal_Bool isEditable() const;
+ public:
+ /** OJoinDesignViewAccess needs a valid view
+ */
+ OJoinDesignViewAccess( OJoinTableView* _pTableView);
+
+ // XInterface
+ DECLARE_XINTERFACE( )
+ DECLARE_XTYPEPROVIDER( )
+
+ // XServiceInfo - static methods
+ static ::rtl::OUString getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException );
+
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+
+ OJoinTableView* getTableView() const { return m_pTableView; }
+
+ void notifyAccessibleEvent(
+ const sal_Int16 _nEventId,
+ const ::com::sun::star::uno::Any& _rOldValue,
+ const ::com::sun::star::uno::Any& _rNewValue
+ )
+ {
+ NotifyAccessibleEvent(_nEventId,_rOldValue,_rNewValue);
+ }
+
+ void clearTableView();
+ };
+}
+#endif // DBACCESS_JACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx
new file mode 100644
index 000000000000..bf8b02ddb4a4
--- /dev/null
+++ b/dbaccess/source/ui/inc/JoinController.hxx
@@ -0,0 +1,180 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_JOINCONTROLLER_HXX
+#define DBAUI_JOINCONTROLLER_HXX
+
+#include "singledoccontroller.hxx"
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include "moduledbu.hxx"
+#include "JoinTableView.hxx"
+#include "JoinDesignView.hxx"
+#include "TableConnectionData.hxx"
+#include "TableWindowData.hxx"
+#ifndef _MEMORY_
+#include <memory>
+#endif
+#include <boost/shared_ptr.hpp>
+
+namespace comphelper
+{
+ class NamedValueCollection;
+}
+
+class VCLXWindow;
+namespace dbaui
+{
+ class OAddTableDlg;
+ class AddTableDialogContext;
+ class OTableConnectionData;
+ class OTableWindowData;
+ class OTableWindow;
+ typedef OSingleDocumentController OJoinController_BASE;
+
+ class OJoinController : public OJoinController_BASE
+ {
+ OModuleClient m_aModuleClient;
+ protected:
+ TTableConnectionData m_vTableConnectionData;
+ TTableWindowData m_vTableData;
+
+ Fraction m_aZoom;
+ ::dbtools::SQLExceptionInfo m_aExceptionInfo;
+
+ OAddTableDlg* m_pAddTableDialog;
+ ::std::auto_ptr< AddTableDialogContext > m_pDialogContext;
+ Point m_aMinimumTableViewSize;
+
+ // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
+ virtual FeatureState GetState(sal_uInt16 nId) const;
+ // execute a feature
+ virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
+
+ /** loads the information for the windows.
+ @param i_rViewSettings
+ The properties which comes from the layout information.
+ */
+ void loadTableWindows( const ::comphelper::NamedValueCollection& i_rViewSettings );
+
+ /** loads the information for one window.
+ @param _rTable
+ The properties which comes from the layout information.
+ */
+ void loadTableWindow( const ::comphelper::NamedValueCollection& i_rTableWindowSettings );
+
+ /** saves the TableWindows structure in a sequence of property values
+ @param _rViewProps
+ Contains the new sequence.
+ */
+ void saveTableWindows( ::comphelper::NamedValueCollection& o_rViewSettings ) const;
+
+ virtual ~OJoinController();
+ public:
+ OJoinController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
+
+ // ---------------------------------------------------------------
+ // attribute access
+ inline TTableWindowData* getTableWindowData() { return &m_vTableData; }
+ inline TTableConnectionData* getTableConnectionData() { return &m_vTableConnectionData;}
+ inline OAddTableDlg* getAddTableDialog()const { return m_pAddTableDialog; }
+
+ // ---------------------------------------------------------------
+ // OSingleDocumentController overridables
+ virtual void reconnect( sal_Bool _bUI );
+ virtual void impl_onModifyChanged();
+
+ // ---------------------------------------------------------------
+ // own overridables
+ /** determines whether or not it's allowed for database views to participate in the game
+ */
+ virtual bool allowViews() const = 0;
+
+ /** determines whether or not it's allowed for queries to participate in the game
+ */
+ virtual bool allowQueries() const = 0;
+
+ /** provides access to the OJoinDesignView belonging to the controller, which might
+ or might not be the direct view (getView)
+ */
+ virtual OJoinDesignView* getJoinView();
+
+
+ // ---------------------------------------------------------------
+ /** erase the data in the data vector
+ @param _pData
+ the data whioch should be erased
+ */
+ void removeConnectionData(const TTableConnectionData::value_type& _pData);
+
+ void SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY );
+
+ void SaveTabWinPosSize(OTableWindow* pTabWin, long nOffsetX, long nOffsetY);
+
+ // ---------------------------------------------------------------
+ // UNO interface overridables
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL disposing();
+ // ::com::sun::star::frame::XController
+ virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
+
+
+ // ---------------------------------------------------------------
+ // misc
+ /** only defines a method to save a SQLException in d&d methods to show the error at a later state
+ set the internal member m_aExceptionInfo to _rInfo
+ */
+ void setErrorOccured(const ::dbtools::SQLExceptionInfo& _rInfo)
+ {
+ m_aExceptionInfo = _rInfo;
+ }
+ /**
+ just returns the internal member and clears it
+ */
+ ::dbtools::SQLExceptionInfo clearOccuredError()
+ {
+ ::dbtools::SQLExceptionInfo aInfo = m_aExceptionInfo;
+ m_aExceptionInfo = ::dbtools::SQLExceptionInfo();
+ return aInfo;
+ }
+
+ protected:
+ TTableWindowData::value_type createTableWindowData(const ::rtl::OUString& _sComposedName,const ::rtl::OUString& _sTableName,const ::rtl::OUString& _sWindowName);
+ // ask the user if the design should be saved when it is modified
+ virtual short saveModified() = 0;
+ // called when the orignal state should be reseted (first time load)
+ virtual void reset() = 0;
+ virtual void describeSupportedFeatures();
+
+ AddTableDialogContext& impl_getDialogContext() const;
+ };
+}
+#endif // DBAUI_JOINCONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JoinDesignView.hxx b/dbaccess/source/ui/inc/JoinDesignView.hxx
new file mode 100644
index 000000000000..386d49777ab8
--- /dev/null
+++ b/dbaccess/source/ui/inc/JoinDesignView.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_JOINDESIGNVIEW_HXX
+#define DBAUI_JOINDESIGNVIEW_HXX
+
+#include "dataview.hxx"
+#ifndef _VECTOR_
+#include <vector>
+#endif
+#include <tools/string.hxx>
+#include "QEnumTypes.hxx"
+
+#include <memory>
+
+namespace dbaui
+{
+ class OTableConnection;
+ class OConnectionLineData;
+ class OJoinController;
+ class OScrollWindowHelper;
+ class OJoinTableView;
+ class OTableWindow;
+
+ class OJoinDesignView : public ODataView
+ {
+ protected:
+ OScrollWindowHelper* m_pScrollWindow; // contains only the scrollbars
+ OJoinTableView* m_pTableView; // presents the upper window
+ OJoinController& m_rController;
+
+ public:
+ OJoinDesignView(Window* pParent,
+ OJoinController& _rController,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ virtual ~OJoinDesignView();
+
+ // set the view readonly or not
+ virtual void setReadOnly(sal_Bool _bReadOnly);
+ // set the statement for representation
+ /// late construction
+ virtual void Construct();
+ virtual void initialize();
+ virtual void KeyInput( const KeyEvent& rEvt );
+
+ virtual void SaveTabWinUIConfig(OTableWindow* pWin);
+ OJoinController& getController() const { return m_rController; }
+ // called when fields are deleted
+
+ OJoinTableView* getTableView() const { return m_pTableView; }
+ OScrollWindowHelper* getScrollHelper() const { return m_pScrollWindow; }
+ protected:
+ // return the Rectangle where I can paint myself
+ virtual void resizeDocumentView(Rectangle& rRect);
+ DECL_LINK( SplitHdl, void* );
+ };
+}
+#endif // DBAUI_JOINDESIGNVIEW_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JoinExchange.hxx b/dbaccess/source/ui/inc/JoinExchange.hxx
new file mode 100644
index 000000000000..d56547513301
--- /dev/null
+++ b/dbaccess/source/ui/inc/JoinExchange.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_JOINEXCHANGE_HXX
+#define DBAUI_JOINEXCHANGE_HXX
+
+#include "dbexchange.hxx"
+#include "TableWindowListBox.hxx"
+
+#include <svtools/transfer.hxx>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+namespace dbaui
+{
+ //==================================================================
+ // OJoinExchObj :
+ // Zusaetzliche Daten fuer das Erzeugen von Joins in der JoinShell
+ //==================================================================
+
+ typedef ::cppu::ImplHelper1< ::com::sun::star::lang::XUnoTunnel > OJoinExchObj_Base;
+ class OJoinExchObj
+ :public TransferableHelper
+ ,public OJoinExchObj_Base
+ {
+ static String m_sJoinFormat;
+ sal_Bool m_bFirstEntry;
+
+ protected:
+ OJoinExchangeData m_jxdSourceDescription;
+ IDragTransferableListener* m_pDragListener;
+
+ virtual ~OJoinExchObj();
+ public:
+ OJoinExchObj(const OJoinExchangeData& jxdSource,sal_Bool _bFirstEntry=sal_False);
+
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ void StartDrag( Window* pWindow, sal_Int8 nDragSourceActions, IDragTransferableListener* _pListener );
+
+ static OJoinExchangeData GetSourceDescription(const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& _rxObject);
+ static sal_Bool isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID=SOT_FORMATSTR_ID_SBA_JOIN);
+
+ protected:
+ virtual void AddSupportedFormats();
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual void DragFinished( sal_Int8 nDropAction );
+
+ static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
+
+ private:
+ using TransferableHelper::StartDrag;
+ };
+}
+#endif // DBAUI_JOINEXCHANGE_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
new file mode 100644
index 000000000000..a2fa86925441
--- /dev/null
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -0,0 +1,326 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_JOINTABLEVIEW_HXX
+#define DBAUI_JOINTABLEVIEW_HXX
+
+#include <vcl/window.hxx>
+#include <vcl/timer.hxx>
+#include <vcl/scrbar.hxx>
+#include <tools/rtti.hxx>
+#include <svtools/transfer.hxx>
+
+#include <comphelper/stl_types.hxx>
+#include "callbacks.hxx"
+#include "TableConnectionData.hxx"
+#include "TableWindowData.hxx"
+#include <memory>
+#include <vector>
+
+struct AcceptDropEvent;
+struct ExecuteDropEvent;
+class SfxUndoAction;
+namespace dbaui
+{
+ class OTableConnection;
+ class OTableWindow;
+ struct OJoinExchangeData;
+ class OJoinDesignView;
+ class OTableWindowData;
+ class OJoinDesignViewAccess;
+
+ // this class conatins only the scrollbars to avoid that the tablewindows clip the scrollbars
+ class OJoinTableView;
+ class OScrollWindowHelper : public Window
+ {
+ ScrollBar m_aHScrollBar;
+ ScrollBar m_aVScrollBar;
+ Window* m_pCornerWindow;
+ OJoinTableView* m_pTableView;
+
+ protected:
+ virtual void Resize();
+ public:
+ OScrollWindowHelper( Window* pParent);
+ ~OScrollWindowHelper();
+
+ void setTableView(OJoinTableView* _pTableView);
+
+ void resetRange(const Point& _aSize);
+
+ // own methods
+ ScrollBar* GetHScrollBar() { return &m_aHScrollBar; }
+ ScrollBar* GetVScrollBar() { return &m_aVScrollBar; }
+ };
+
+
+ class OJoinTableView : public Window
+ ,public IDragTransferableListener
+ ,public DropTargetHelper
+ {
+ friend class OJoinMoveTabWinUndoAct;
+ public:
+ DECLARE_STL_USTRINGACCESS_MAP(OTableWindow*,OTableWindowMap);
+ private:
+ OTableWindowMap m_aTableMap;
+ ::std::vector<OTableConnection*> m_vTableConnection;
+
+ Timer m_aDragScrollTimer;
+ Rectangle m_aDragRect;
+ Rectangle m_aSizingRect;
+ Point m_aDragOffset;
+ Point m_aScrollOffset;
+ Point m_ptPrevDraggingPos;
+ Size m_aOutputSize;
+
+
+ OTableWindow* m_pDragWin;
+ OTableWindow* m_pSizingWin;
+ OTableConnection* m_pSelectedConn;
+
+
+ BOOL m_bTrackingInitiallyMoved;
+
+ DECL_LINK(OnDragScrollTimer, void*);
+
+ protected:
+ OTableWindow* m_pLastFocusTabWin;
+ OJoinDesignView* m_pView;
+ OJoinDesignViewAccess* m_pAccessible;
+
+ public:
+ OJoinTableView( Window* pParent, OJoinDesignView* pView );
+ virtual ~OJoinTableView();
+
+ // window override
+ virtual void StateChanged( StateChangedType nStateChange );
+ virtual void GetFocus();
+ virtual void LoseFocus();
+ virtual void KeyInput( const KeyEvent& rEvt );
+ // Accessibility
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ // own methods
+ ScrollBar* GetHScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetHScrollBar(); }
+ ScrollBar* GetVScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetVScrollBar(); }
+ DECL_LINK( ScrollHdl, ScrollBar* );
+
+ void DrawConnections( const Rectangle& rRect );
+ void InvalidateConnections();
+
+ void BeginChildMove( OTableWindow* pTabWin, const Point& rMousePos );
+ void BeginChildSizing( OTableWindow* pTabWin, const Pointer& rPointer );
+
+ void NotifyTitleClicked( OTableWindow* pTabWin, const Point rMousePos );
+
+ virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE);
+ virtual void RemoveTabWin( OTableWindow* pTabWin );
+
+ // alle TabWins verstecken (NICHT loeschen, sie werden in eine Undo-Action gepackt)
+ virtual void HideTabWins();
+
+ virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest) = 0;
+
+ /** RemoveConnection allows to remove connections from join table view, it implies that the same as addConnection
+
+ @param _pConnection
+ the connection which should be removed
+ @param _bDelete
+ when truie then the connection will be deleted
+
+ @return an iterator to next valid connection, so it can be used in any loop
+ */
+ virtual bool RemoveConnection(OTableConnection* _pConnection,sal_Bool _bDelete);
+
+ /** allows to add new connections to join table view, it implies an invalidation of the features
+ ID_BROWSER_ADDTABLE and SID_RELATION_ADD_RELATION also the modified flag will be set to true
+ @param _pConnection
+ the connection which should be added
+ @param _bAddData
+ <TRUE/> when the data should also be appended
+ */
+ void addConnection(OTableConnection* _pConnection,sal_Bool _bAddData = sal_True);
+
+ BOOL ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars );
+ ULONG GetTabWinCount();
+ Point GetScrollOffset() const { return m_aScrollOffset; }
+
+ OJoinDesignView* getDesignView() const { return m_pView; }
+ OTableWindow* GetTabWindow( const String& rName );
+
+ OTableConnection* GetSelectedConn() { return m_pSelectedConn; }
+ void DeselectConn(OTableConnection* pConn); // NULL ist ausdruecklich zugelassen, dann passiert nichts
+ void SelectConn(OTableConnection* pConn);
+
+ OTableWindowMap* GetTabWinMap() { return &m_aTableMap; }
+ const OTableWindowMap* GetTabWinMap() const { return &m_aTableMap; }
+
+ /** gives a read only access to the connection vector
+ */
+ const ::std::vector<OTableConnection*>* getTableConnections() const { return &m_vTableConnection; }
+
+
+ BOOL ExistsAConn(const OTableWindow* pFromWin) const;
+
+ /** getTableConnections searchs for all connections of a table
+ @param _pFromWin the table for which connections should be found
+
+ @return an iterator which can be used to travel all connections of the table
+ */
+ ::std::vector<OTableConnection*>::const_iterator getTableConnections(const OTableWindow* _pFromWin) const;
+
+ /** getConnectionCount returns how many connection belongs to single table
+ @param _pFromWin the table for which connections should be found
+
+ @return the count of connections wich belongs to this table
+ */
+ sal_Int32 getConnectionCount(const OTableWindow* _pFromWin) const;
+
+ OTableConnection* GetTabConn(const OTableWindow* pLhs,const OTableWindow* pRhs,bool _bSupressCrossOrNaturalJoin = false,const OTableConnection* _rpFirstAfter = NULL) const;
+
+ // clears the window map and connection vector without destroying it
+ // that means teh data of the windows and connection will be untouched
+ void clearLayoutInformation();
+
+ // set the focus to that tab win which most recently had it (or to the first available one)
+ void GrabTabWinFocus();
+
+ // ReSync ist dazu gedacht, aus dem Dokument alle WinData und ConnData zu holen und entsprechend Wins und Conns anzulegen
+ virtual void ReSync() { }
+ // ClearAll implementiert ein hartes Loeschen, es werden alle Conns und alle Wins aus ihren jeweiligen Listen geloescht
+ // sowie die entsprechenden Datas aus dem Dokument ausgetragen
+ virtual void ClearAll();
+
+ // wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen
+ virtual BOOL IsAddAllowed();
+ virtual long PreNotify(NotifyEvent& rNEvt);
+
+ // DnD stuff
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+
+ /**
+ can be used in derevied classes to make some special ui handling
+ after d&d
+ */
+ virtual void lookForUiActivities();
+
+ // wird nach Verschieben/Groessenaenderung der TabWins aufgerufen (die Standardimplementation reicht die neuen Daten einfach
+ // an die Daten des Wins weiter)
+ virtual void TabWinMoved(OTableWindow* ptWhich, const Point& ptOldPosition);
+ // die Position ist "virtuell" : der Container hat sozusagen eine virtuelle Flaeche, von der immer nur ein bestimmter Bereich
+ // - der mittels der Scrollbar veraendert werden kann - zu sehen ist. Insbesondere hat ptOldPosition immer positive Koordinaten,
+ // auch wenn er einen Punkt oberhalb des aktuell sichtbaren Bereichs bezeichnet, dessen physische Ordinate eigentlich
+ // negativ ist.
+ virtual void TabWinSized(OTableWindow* ptWhich, const Point& ptOldPosition, const Size& szOldSize);
+
+ void modified();
+
+ /** returns if teh given window is visible.
+ @param _rPoint
+ The Point to check
+ @param _rSize
+ The Size to be check as well
+ @return
+ <TRUE/> if the area is visible otherwise <FALSE/>
+
+ */
+ BOOL isMovementAllowed(const Point& _rPoint,const Size& _rSize);
+
+ Size getRealOutputSize() const { return m_aOutputSize; }
+
+
+
+ virtual void EnsureVisible(const OTableWindow* _pWin);
+ virtual void EnsureVisible(const Point& _rPoint,const Size& _rSize);
+
+ TTableWindowData::value_type createTableWindowData(const ::rtl::OUString& _rComposedName
+ ,const ::rtl::OUString& _sTableName
+ ,const ::rtl::OUString& _rWinName);
+
+ protected:
+ virtual void MouseButtonUp( const MouseEvent& rEvt );
+ virtual void MouseButtonDown( const MouseEvent& rEvt );
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual void Paint( const Rectangle& rRect );
+ virtual void ConnDoubleClicked( OTableConnection* pConnection );
+ virtual void SetDefaultTabWinPosSize( OTableWindow* pTabWin );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ virtual void Resize();
+
+ virtual void dragFinished( );
+ // hier ist die Position (die sich waehrend des Sizings aendern kann) physisch, da waehrend des Sizens nicht gescrollt wird
+ virtual void Command(const CommandEvent& rEvt);
+
+ virtual OTableWindowData* CreateImpl(const ::rtl::OUString& _rComposedName
+ ,const ::rtl::OUString& _sTableName
+ ,const ::rtl::OUString& _rWinName);
+
+ /** factory method to create table windows
+ @param _pData
+ The data corresponding to the window.
+ @return
+ The new TableWindow
+ */
+ virtual OTableWindow* createWindow(const TTableWindowData::value_type& _pData) = 0;
+
+ /** determines whether the classes Init method should accept a query name, or only table names
+ */
+ virtual bool allowQueries() const;
+
+ /** called when init fails at the tablewindowdata because the m_xTable object could not provide columns, but no
+ exception was thrown. Expected to throw.
+ */
+ virtual void onNoColumns_throw();
+
+ virtual bool supressCrossNaturalJoin(const TTableConnectionData::value_type& _pData) const;
+
+ private:
+ void InitColors();
+ BOOL ScrollWhileDragging();
+
+ /** executePopup opens the context menu to delate a connection
+ @param _aPos the position where the popup menu should appear
+ @param _pSelConnection the connection which should be deleted
+ */
+ void executePopup(const Point& _aPos,OTableConnection* _pSelConnection);
+
+ /** invalidateAndModify invalidates this window without children and
+ set the controller modified
+ @param _pAction a possible undo action to add at the controller
+ */
+ void invalidateAndModify(SfxUndoAction *_pAction=NULL);
+
+ private:
+ using Window::Scroll;
+ };
+}
+#endif // DBAUI_JOINTABLEVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QEnumTypes.hxx b/dbaccess/source/ui/inc/QEnumTypes.hxx
new file mode 100644
index 000000000000..828595cd39b5
--- /dev/null
+++ b/dbaccess/source/ui/inc/QEnumTypes.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_ENUMTYPES_HXX
+#define DBAUI_ENUMTYPES_HXX
+
+namespace dbaui
+{
+ enum EOrderDir
+ {
+ ORDER_NONE=0,
+ ORDER_ASC,
+ ORDER_DESC
+ };
+
+ enum EFunctionType
+ {
+ FKT_NONE =0x00000000,
+ FKT_OTHER =0x00000001,
+ FKT_AGGREGATE =0x00000002,
+ FKT_CONDITION =0x00000004,
+ FKT_NUMERIC =0x00000008
+ // wenn dieser Fkt.Typ gesetzt handelt es sich um EXISTS oder UNIQUE, der FieldName enthält das gesamte Statement
+ };
+
+ enum EConnectionSide
+ {
+ JTCS_FROM=0,
+ JTCS_TO
+ };
+
+ enum ETableFieldType
+ {
+ TAB_NORMAL_FIELD=0,
+ TAB_PRIMARY_FIELD
+ };
+
+ enum EJoinType
+ {
+ FULL_JOIN=0,
+ LEFT_JOIN,
+ RIGHT_JOIN,
+ UNION_JOIN,
+ CROSS_JOIN,
+ INNER_JOIN
+ };
+
+ //==================================================================
+ enum EControlType
+ {
+ tpDefault = 0,
+ tpRequired,
+ tpTextLen,
+ tpNumType,
+ tpLength,
+ tpScale,
+ tpFormat,
+ tpAutoIncrement,
+ tpBoolDefault,
+ tpColumnName,
+ tpType,
+ tpAutoIncrementValue
+ };
+}
+#endif // DBAUI_ENUMTYPES_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx
new file mode 100644
index 000000000000..5c781b77d74b
--- /dev/null
+++ b/dbaccess/source/ui/inc/QueryDesignView.hxx
@@ -0,0 +1,177 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_QUERYDESIGNVIEW_HXX
+#define DBAUI_QUERYDESIGNVIEW_HXX
+
+#include "queryview.hxx"
+#include <vcl/split.hxx>
+#include <tools/string.hxx>
+#include "QEnumTypes.hxx"
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include "querycontroller.hxx"
+#include "ConnectionLineData.hxx"
+
+namespace connectivity
+{
+ class OSQLParseNode;
+}
+
+class ComboBox;
+namespace dbaui
+{
+ enum SqlParseError
+ {
+ eIllegalJoin,
+ eStatementTooLong,
+ eNoConnection,
+ eNoSelectStatement,
+ eStatementTooComplex,
+ eColumnInLikeNotFound,
+ eNoColumnInLike,
+ eColumnNotFound,
+ eNativeMode,
+ eTooManyTables,
+ eTooManyConditions,
+ eTooManyColumns,
+ eIllegalJoinCondition,
+ eOk
+ };
+
+ class OQueryViewSwitch;
+ class OAddTableDlg;
+ class OQueryTableWindow;
+ class OSelectionBrowseBox;
+ class OTableConnection;
+ class OQueryTableConnectionData;
+ class OQueryContainerWindow;
+
+ class OQueryDesignView : public OQueryView
+ {
+ enum ChildFocusState
+ {
+ SELECTION,
+ TABLEVIEW,
+ NONE
+ };
+
+ Splitter m_aSplitter;
+
+ ::com::sun::star::lang::Locale m_aLocale;
+ ::rtl::OUString m_sDecimalSep;
+
+ OSelectionBrowseBox* m_pSelectionBox; // presents the lower window
+ ChildFocusState m_eChildFocus;
+ sal_Bool m_bInKeyEvent;
+ sal_Bool m_bInSplitHandler;
+
+ public:
+ OQueryDesignView(OQueryContainerWindow* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ virtual ~OQueryDesignView();
+
+ virtual sal_Bool isCutAllowed();
+ virtual sal_Bool isPasteAllowed();
+ virtual sal_Bool isCopyAllowed();
+ virtual void copy();
+ virtual void cut();
+ virtual void paste();
+ // clears the whole query
+ virtual void clear();
+ // set the view readonly or not
+ virtual void setReadOnly(sal_Bool _bReadOnly);
+ // check if the statement is correct when not returning false
+ virtual sal_Bool checkStatement();
+ // set the statement for representation
+ virtual void setStatement(const ::rtl::OUString& _rsStatement);
+ // returns the current sql statement
+ virtual ::rtl::OUString getStatement();
+ /// late construction
+ virtual void Construct();
+ virtual void initialize();
+ // window overloads
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void GetFocus();
+
+ sal_Bool isSlotEnabled(sal_Int32 _nSlotId);
+ void setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable);
+ void setNoneVisbleRow(sal_Int32 _nRows);
+
+ ::com::sun::star::lang::Locale getLocale() const { return m_aLocale;}
+ ::rtl::OUString getDecimalSeparator() const { return m_sDecimalSep;}
+
+ SqlParseError InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis=sal_True, sal_Bool bActivate = sal_True);
+ bool HasFieldByAliasName(const ::rtl::OUString& rFieldName, OTableFieldDescRef& rInfo) const;
+ // save the position of the table window and the pos of the splitters
+ // called when fields are deleted
+ void DeleteFields( const ::rtl::OUString& rAliasName );
+ // called when a table from tabeview was deleted
+ void TableDeleted(const ::rtl::OUString& rAliasName);
+
+ sal_Int32 getColWidth( sal_uInt16 _nColPos) const;
+ void fillValidFields(const ::rtl::OUString& strTableName, ComboBox* pFieldList);
+
+ void SaveUIConfig();
+ void stopTimer();
+ void startTimer();
+ void reset();
+
+ /** initializes the view from the current parser / parse iterator of the controller
+
+ @param _pErrorInfo
+ When not <NULL/>, the instance pointed to by this parameter takes the error
+ which happened during the initialization.
+ If it is not <NULL/>, then any such error will be displayed, using the controller's
+ showError method.
+
+ @return <TRUE/> if and only if the initialization was successful
+ */
+ bool initByParseIterator( ::dbtools::SQLExceptionInfo* _pErrorInfo );
+
+ void initByFieldDescriptions(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rFieldDescriptions
+ );
+
+ ::connectivity::OSQLParseNode* getPredicateTreeFromEntry( OTableFieldDescRef pEntry,
+ const String& _sCriteria,
+ ::rtl::OUString& _rsErrorMessage,
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn) const;
+
+ void fillFunctionInfo( const ::connectivity::OSQLParseNode* pNode
+ ,const ::rtl::OUString& sFunctionTerm
+ ,OTableFieldDescRef& aInfo);
+ protected:
+ // return the Rectangle where I can paint myself
+ virtual void resizeDocumentView(Rectangle& rRect);
+ DECL_LINK( SplitHdl, void* );
+
+ private:
+ using OQueryView::SaveTabWinUIConfig;
+ };
+}
+#endif // DBAUI_QUERYDESIGNVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QueryTableView.hxx b/dbaccess/source/ui/inc/QueryTableView.hxx
new file mode 100644
index 000000000000..590ef4a42925
--- /dev/null
+++ b/dbaccess/source/ui/inc/QueryTableView.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_QUERYTABLEVIEW_HXX
+#define DBAUI_QUERYTABLEVIEW_HXX
+
+#include "JoinTableView.hxx"
+#include <com/sun/star/container/XNameAccess.hpp>
+#include "querycontroller.hxx"
+
+namespace dbaui
+{
+
+ struct TabWinsChangeNotification
+ {
+ enum ACTION_TYPE { AT_ADDED_WIN, AT_REMOVED_WIN };
+ ACTION_TYPE atActionPerformed;
+ String strAffectedTable;
+
+ TabWinsChangeNotification(ACTION_TYPE at, const String& str) : atActionPerformed(at), strAffectedTable(str) { }
+ };
+
+ //========================================================================
+ class OQueryTabWinUndoAct;
+ class OQueryTabConnUndoAction;
+ class OQueryTableConnection;
+ class OQueryTableWindow;
+ class OQueryDesignView;
+ class OQueryTableView : public OJoinTableView
+ {
+ Link m_lnkTabWinsChangeHandler;
+
+ protected:
+ virtual void ConnDoubleClicked(OTableConnection* pConnection);
+ virtual void KeyInput(const KeyEvent& rEvt);
+
+ virtual OTableWindow* createWindow(const TTableWindowData::value_type& _pData);
+
+ /** called when init fails at the tablewindowdata because the m_xTable object could not provide columns, but no
+ exception was thrown. Expected to throw.
+ */
+ virtual void onNoColumns_throw();
+
+ virtual bool supressCrossNaturalJoin(const TTableConnectionData::value_type& _pData) const;
+ public:
+ OQueryTableView(Window* pParent,OQueryDesignView* pView);
+ virtual ~OQueryTableView();
+
+ // Basisklasse ueberschrieben : Fenster kreieren und loeschen
+ // (eigentlich nicht wirklich LOESCHEN, es geht in die Verantwortung einer UNDO-Action ueber)
+ virtual void AddTabWin( const ::rtl::OUString& _rTableName, const ::rtl::OUString& _rAliasName, BOOL bNewTable = FALSE );
+ virtual void RemoveTabWin(OTableWindow* pTabWin);
+
+ // und ein AddTabWin, das einen Alias vorgibt
+ void AddTabWin(const ::rtl::OUString& strDatabase, const ::rtl::OUString& strTableName, const ::rtl::OUString& strAlias, BOOL bNewTable = FALSE);
+ // TabWin suchen
+ OQueryTableWindow* FindTable(const String& rAliasName);
+ BOOL FindTableFromField(const String& rFieldName, OTableFieldDescRef& rInfo, USHORT& rCnt);
+
+ // Basisklasse ueberschrieben : Connections kreieren und loeschen
+ virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest);
+
+ virtual bool RemoveConnection( OTableConnection* _pConn ,sal_Bool _bDelete);
+
+ // Transfer von Connections von/zu einer UndoAction
+ void GetConnection(OQueryTableConnection* pConn);
+ // Einfuegen einer Connection in meine Struktur
+ void DropConnection(OQueryTableConnection* pConn);
+ // Entfernen einer Connection aus meiner Struktur
+
+ // das resultiert effektiv in einem voelligen Leeren des Abfrageentwurfs, da alle Fenster versteckt werden, und dabei
+ // natuerlich alle Connections an diesen Fenstern und alle Abfrage-Spalten, die auf diesen Tabellen basierten.
+
+ // TabWin anzeigen oder verstecken (NICHT kreieren oder loeschen)
+ BOOL ShowTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction,sal_Bool _bAppend);
+ void HideTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction);
+
+ // Sichbarkeit eines TabWins sicherstellen (+ Invalidieren der Connections)
+ virtual void EnsureVisible(const OTableWindow* _pWin);
+
+ // wieviel Tabellen mit einem bestimmten Namen habe ich schon ?
+ sal_Int32 CountTableAlias(const String& rName, sal_Int32& rMax);
+
+ // ein Feld einfuegen (wird einfach an das Elter weitergereicht
+ void InsertField(const OTableFieldDescRef& rInfo);
+
+ // alles (TabWins, Connections) neu aufbauen (PRECONDITION : vorher wurde ClearAll gerufen)
+ virtual void ReSync();
+ // alles (TabWins, Connections) loeschen, und zwar hart, es erfolgen also keinerlei Notifications
+ virtual void ClearAll();
+
+ // wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen
+ //virtual BOOL IsAddAllowed();
+
+ // eine neu Connection bekanntgeben und einfuegen lassen, wenn nicht schon existent
+ void NotifyTabConnection(const OQueryTableConnection& rNewConn, BOOL _bCreateUndoAction = TRUE);
+
+ Link SetTabWinsChangeHandler(const Link& lnk) { Link lnkRet = m_lnkTabWinsChangeHandler; m_lnkTabWinsChangeHandler = lnk; return lnkRet; }
+ // der Handler bekommt einen Zeiger auf eine TabWinsChangeNotification-Struktur
+
+ BOOL ExistsAVisitedConn(const OQueryTableWindow* pFrom) const;
+
+ virtual OTableWindowData* CreateImpl(const ::rtl::OUString& _rComposedName
+ ,const ::rtl::OUString& _sTableName
+ ,const ::rtl::OUString& _rWinName);
+
+ /** createNewConnection opens the join dialog and allows to create a new join connection
+ */
+ void createNewConnection();
+
+ private:
+ using OJoinTableView::EnsureVisible;
+ };
+}
+#endif // DBAUI_QUERYTABLEVIEW_HXX
+
+
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QueryTextView.hxx b/dbaccess/source/ui/inc/QueryTextView.hxx
new file mode 100644
index 000000000000..b8b4861c08cb
--- /dev/null
+++ b/dbaccess/source/ui/inc/QueryTextView.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_QUERYVIEW_TEXT_HXX
+#define DBAUI_QUERYVIEW_TEXT_HXX
+
+#include "queryview.hxx"
+#include "querycontainerwindow.hxx"
+
+class Splitter;
+namespace dbaui
+{
+ class OSqlEdit;
+ class OQueryTextView : public Window
+ {
+ friend class OQueryViewSwitch;
+ OSqlEdit* m_pEdit;
+ public:
+ OQueryTextView( OQueryContainerWindow* pParent );
+ virtual ~OQueryTextView();
+
+ virtual void GetFocus();
+
+ virtual sal_Bool isCutAllowed();
+ virtual sal_Bool isPasteAllowed();
+ virtual sal_Bool isCopyAllowed();
+ virtual void copy();
+ virtual void cut();
+ virtual void paste();
+ // clears the whole query
+ virtual void clear();
+ // set the view readonly or not
+ virtual void setReadOnly(sal_Bool _bReadOnly);
+ // check if the statement is correct when not returning false
+ virtual sal_Bool checkStatement();
+ // set the statement for representation
+ virtual void setStatement(const ::rtl::OUString& _rsStatement);
+ virtual ::rtl::OUString getStatement();
+ // allow access to our edit
+ OSqlEdit* getSqlEdit() const { return m_pEdit; }
+
+ OQueryContainerWindow* getContainerWindow() { return static_cast< OQueryContainerWindow* >( GetParent() ); }
+ protected:
+ virtual void Resize();
+ };
+}
+#endif // DBAUI_QUERYVIEW_TEXT_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/QueryViewSwitch.hxx b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
new file mode 100644
index 000000000000..a55803a53d1c
--- /dev/null
+++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_QUERYVIEWSWITCH_HXX
+#define DBAUI_QUERYVIEWSWITCH_HXX
+
+#include "queryview.hxx"
+
+namespace dbtools
+{
+ class SQLExceptionInfo;
+}
+
+namespace dbaui
+{
+ class OQueryDesignView;
+ class OQueryTextView;
+ class OAddTableDlg;
+ class OQueryContainerWindow;
+ class OQueryViewSwitch
+ {
+ OQueryDesignView* m_pDesignView;
+ OQueryTextView* m_pTextView;
+ sal_Bool m_bAddTableDialogWasVisible; // true if so
+ public:
+ OQueryViewSwitch(OQueryContainerWindow* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ virtual ~OQueryViewSwitch();
+
+ virtual sal_Bool isCutAllowed();
+ virtual sal_Bool isPasteAllowed();
+ virtual sal_Bool isCopyAllowed();
+ virtual void copy();
+ virtual void cut();
+ virtual void paste();
+ // clears the whole query
+ virtual void clear();
+ // set the view readonly or not
+ virtual void setReadOnly(sal_Bool _bReadOnly);
+ // check if the statement is correct when not returning false
+ virtual sal_Bool checkStatement();
+ // set the statement for representation
+ virtual void setStatement(const ::rtl::OUString& _rsStatement);
+ // returns the current sql statement
+ virtual ::rtl::OUString getStatement();
+ /// late construction
+ virtual void Construct();
+ virtual void initialize();
+ /** show the text or the design view
+ @return
+ <TRUE/> if and only if the view could be successfully, switched, <FALSE/> otherwise
+ (In the latter case, the controller will issue another switchView call to restore the
+ old state)
+ */
+ bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo );
+ void forceInitialView();
+ sal_Bool isSlotEnabled(sal_Int32 _nSlotId);
+ void setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable);
+ void setNoneVisbleRow(sal_Int32 _nRows);
+ void SaveUIConfig();
+ bool reset( ::dbtools::SQLExceptionInfo* _pErrorInfo );
+ void GrabFocus();
+
+ // returs the add table dialog from the design view
+ OAddTableDlg* getAddTableDialog();
+
+ OQueryDesignView* getDesignView() const { return m_pDesignView; }
+ OQueryContainerWindow* getContainer() const;
+
+ void SetPosSizePixel( Point _rPt,Size _rSize);
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const;
+ protected:
+ // return the Rectangle where I can paint myself
+ virtual void resizeDocumentView(Rectangle& rRect);
+
+ private:
+ void impl_forceSQLView();
+ bool impl_postViewSwitch( const bool i_bGraphicalDesign, const bool i_bSuccess );
+ };
+}
+#endif // DBAUI_QUERYVIEWSWITCH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RTableConnectionData.hxx b/dbaccess/source/ui/inc/RTableConnectionData.hxx
new file mode 100644
index 000000000000..19d4f801388b
--- /dev/null
+++ b/dbaccess/source/ui/inc/RTableConnectionData.hxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_RTABLECONNECTIONDATA_HXX
+#define DBAUI_RTABLECONNECTIONDATA_HXX
+
+#include "TableConnectionData.hxx"
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include "QEnumTypes.hxx"
+
+namespace dbaui
+{
+ const UINT16 CARDINAL_UNDEFINED = 0x0000;
+ const UINT16 CARDINAL_ONE_MANY = 0x0001;
+ const UINT16 CARDINAL_MANY_ONE = 0x0002;
+ const UINT16 CARDINAL_ONE_ONE = 0x0004;
+
+ class OConnectionLineData;
+ //==================================================================
+ class ORelationTableConnectionData : public OTableConnectionData
+ {
+ friend bool operator==(const ORelationTableConnectionData& lhs, const ORelationTableConnectionData& rhs);
+ friend bool operator!=(const ORelationTableConnectionData& lhs, const ORelationTableConnectionData& rhs) { return !(lhs == rhs); }
+
+ ::osl::Mutex m_aMutex;
+
+ // @see com.sun.star.sdbc.KeyRule
+ sal_Int32 m_nUpdateRules;
+ sal_Int32 m_nDeleteRules;
+ sal_Int32 m_nCardinality;
+
+ BOOL checkPrimaryKey(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const;
+ BOOL IsSourcePrimKey() const { return checkPrimaryKey(getReferencingTable()->getTable(),JTCS_FROM); }
+ BOOL IsDestPrimKey() const { return checkPrimaryKey(getReferencedTable()->getTable(),JTCS_TO); }
+
+ protected:
+ virtual OConnectionLineDataRef CreateLineDataObj();
+ virtual OConnectionLineDataRef CreateLineDataObj( const OConnectionLineData& rConnLineData );
+
+ ORelationTableConnectionData& operator=( const ORelationTableConnectionData& rConnData );
+ public:
+ ORelationTableConnectionData();
+ ORelationTableConnectionData( const ORelationTableConnectionData& rConnData );
+ ORelationTableConnectionData( const TTableWindowData::value_type& _pReferencingTable,
+ const TTableWindowData::value_type& _pReferencedTable,
+ const ::rtl::OUString& rConnName = ::rtl::OUString() );
+ virtual ~ORelationTableConnectionData();
+
+ virtual void CopyFrom(const OTableConnectionData& rSource);
+ virtual OTableConnectionData* NewInstance() const { return new ORelationTableConnectionData(); }
+
+ /** Update create a new relation
+
+ @return true if successful
+ */
+ virtual BOOL Update();
+
+
+ void SetCardinality();
+ inline void SetUpdateRules( sal_Int32 nAttr ){ m_nUpdateRules = nAttr; }
+ inline void SetDeleteRules( sal_Int32 nAttr ){ m_nDeleteRules = nAttr; }
+
+ inline sal_Int32 GetUpdateRules() const { return m_nUpdateRules; }
+ inline sal_Int32 GetDeleteRules() const { return m_nDeleteRules; }
+ inline sal_Int32 GetCardinality() const { return m_nCardinality; }
+
+ BOOL IsConnectionPossible();
+ void ChangeOrientation();
+ BOOL DropRelation();
+ };
+}
+
+#endif // DBAUI_RTABLECONNECTIONDATA_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RefFunctor.hxx b/dbaccess/source/ui/inc/RefFunctor.hxx
new file mode 100644
index 000000000000..6e33ef2367d9
--- /dev/null
+++ b/dbaccess/source/ui/inc/RefFunctor.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_REFFUNCTOR_HXX
+#define DBAUI_REFFUNCTOR_HXX
+
+#include <rtl/ref.hxx>
+#ifndef INCLUDED_FUNCTIONAL
+#define INCLUDED_FUNCTIONAL
+#include <functional>
+#endif // INCLUDED_FUNCTIONAL
+
+namespace dbaui
+{
+ template <class T> class OUnaryRefFunctor : public ::std::unary_function< ::rtl::Reference<T> ,void>
+ {
+ ::std::mem_fun_t<bool,T> m_aFunction;
+ public:
+ OUnaryRefFunctor(const ::std::mem_fun_t<bool,T>& _aFunc) : m_aFunction(_aFunc)
+ {}
+ inline void operator()(const ::rtl::Reference<T>& _aType) const
+ {
+ m_aFunction(_aType.get());
+ }
+// inline void operator()(const ::rtl::Reference<T>& _aType)
+// {
+// m_aFunction(_aType.get());
+// }
+ };
+// -----------------------------------------------------------------------------
+} // namespace dbaui
+// -----------------------------------------------------------------------------
+#endif //DBAUI_REFFUNCTOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelControliFace.hxx b/dbaccess/source/ui/inc/RelControliFace.hxx
new file mode 100644
index 000000000000..d5a1d5b299e6
--- /dev/null
+++ b/dbaccess/source/ui/inc/RelControliFace.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_RELCONTROLIFACE_HXX
+#define DBAUI_RELCONTROLIFACE_HXX
+
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include "TableConnectionData.hxx"
+
+namespace dbaui
+{
+ class IRelationControlInterface
+ {
+ public:
+ virtual ~IRelationControlInterface(){}
+
+ /** getConnectionData returns the current connection data
+ @return the current connectiondata
+ */
+ virtual TTableConnectionData::value_type getConnectionData() const = 0;
+
+ /** setValid set the valid inside, can be used for OK buttons
+ @param _bValid true when the using control allows an update
+ */
+ virtual void setValid(sal_Bool _bValid) = 0;
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() = 0;
+
+ /** notifyConnectionChange is callback which is called when the table selection has changed and a new connection exists
+ @param _pConnectionData the connection which exists between the new tables
+ */
+ virtual void notifyConnectionChange() = 0;
+ };
+}
+#endif // DBAUI_RELCONTROLIFACE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationControl.hrc b/dbaccess/source/ui/inc/RelationControl.hrc
new file mode 100644
index 000000000000..1f833d9fb922
--- /dev/null
+++ b/dbaccess/source/ui/inc/RelationControl.hrc
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_SOURCE_UI_INC_RELATIONCONTROL_HRC
+#define DBACCESS_SOURCE_UI_INC_RELATIONCONTROL_HRC
+
+
+
+#endif // DBACCESS_SOURCE_UI_INC_RELATIONCONTROL_HRC
+
diff --git a/dbaccess/source/ui/inc/RelationControl.hxx b/dbaccess/source/ui/inc/RelationControl.hxx
new file mode 100644
index 000000000000..ec5108d280a9
--- /dev/null
+++ b/dbaccess/source/ui/inc/RelationControl.hxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_RELATIONCONTROL_HXX
+#define DBAUI_RELATIONCONTROL_HXX
+
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include "JoinTableView.hxx"
+
+namespace dbaui
+{
+ //========================================================================
+ class OTableListBoxControl;
+ class OTableConnectionData;
+ class ORelationTableConnectionData;
+ class IRelationControlInterface;
+ class ORelationControl;
+
+ class OTableListBoxControl : public Window
+ {
+ FixedLine m_aFL_InvolvedTables;
+ ListBox m_lmbLeftTable,
+ m_lmbRightTable;
+ FixedLine m_aFL_InvolvedFields;
+
+ ORelationControl* m_pRC_Tables;
+ const OJoinTableView::OTableWindowMap* m_pTableMap;
+ IRelationControlInterface* m_pParentDialog;
+ String m_strCurrentLeft;
+ String m_strCurrentRight;
+ private:
+ DECL_LINK( OnTableChanged, ListBox* );
+ public:
+ OTableListBoxControl(Window* _pParent,
+ const ResId& _rResId,
+ const OJoinTableView::OTableWindowMap* _pTableMap,
+ IRelationControlInterface* _pParentDialog);
+ virtual ~OTableListBoxControl();
+
+ /** fillListBoxes fills the list boxes with the table windows
+ */
+ void fillListBoxes();
+
+ /** fillAndDisable fill the listboxes only with one entry and then disable them
+ @param _pConnectionData
+ contains the data which should be filled into the listboxes
+ */
+ void fillAndDisable(const TTableConnectionData::value_type& _pConnectionData);
+
+ /** enables the relation control
+ *
+ * \param _bEnable when TRUE enables it, otherwise disable it.
+ */
+ void enableRelation(bool _bEnable);
+
+ /** NotifyCellChange notifies the browse control that the conenction data has changed
+ */
+ void NotifyCellChange();
+
+ /** Init is a call through to the control inside this one
+ @param _pConnData
+ the connection data which is used to init the control
+ */
+ void Init(const TTableConnectionData::value_type& _pConnData);
+ void lateUIInit(Window* _pTableSeparator = NULL);
+ void lateInit();
+
+ BOOL SaveModified();
+
+ TTableWindowData::value_type getReferencingTable() const;
+
+ /** getContainer returns the container interface
+ @return the interface of the container
+ */
+ IRelationControlInterface* getContainer() const { return m_pParentDialog; }
+ };
+}
+#endif // DBAUI_RELATIONCONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx
new file mode 100644
index 000000000000..e16dfa9356da
--- /dev/null
+++ b/dbaccess/source/ui/inc/RelationController.hxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_RELATIONCONTROLLER_HXX
+#define DBAUI_RELATIONCONTROLLER_HXX
+
+#include "JoinController.hxx"
+#include "RelationDesignView.hxx"
+
+class VCLXWindow;
+class WaitObject;
+namespace dbaui
+{
+ class OTableConnectionData;
+ class OTableWindowData;
+ class OAddTableDlg;
+ class OTableFieldDesc;
+ class OTableWindow;
+ class ORelationController : public OJoinController
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xTables;
+ ::std::auto_ptr<WaitObject> m_pWaitObject;
+ ULONG m_nThreadEvent;
+ sal_Bool m_bRelationsPossible;
+ protected:
+ // all the features which should be handled by this class
+ virtual void describeSupportedFeatures();
+ // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
+ virtual FeatureState GetState(sal_uInt16 nId) const;
+ // execute a feature
+ virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
+
+ ORelationDesignView* getRelationView() { return static_cast<ORelationDesignView*>( getView() ); }
+ void loadData();
+ TTableWindowData::value_type existsTable(const ::rtl::OUString& _rComposedTableName,sal_Bool _bCase) const;
+
+ // load the window positions out of the datasource
+ void loadLayoutInformation();
+ void loadTableData(const ::com::sun::star::uno::Any& _aTable);
+ public:
+ ORelationController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
+
+ ~ORelationController();
+ // temp
+ void SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY );
+
+ void mergeData(const TTableConnectionData& _aConnectionData);
+
+ virtual sal_Bool Construct(Window* pParent);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ // need by registration
+ static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+
+ // OJoinController overridables
+ virtual bool allowViews() const;
+ virtual bool allowQueries() const;
+
+ private:
+ // ask the user if the design should be saved when it is modified
+ virtual short saveModified();
+ virtual void reset();
+ virtual void impl_initialize();
+ virtual ::rtl::OUString getPrivateTitle( ) const;
+ DECL_LINK( OnThreadFinished, void* );
+ };
+}
+#endif // DBAUI_RELATIONCONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationDesignView.hxx b/dbaccess/source/ui/inc/RelationDesignView.hxx
new file mode 100644
index 000000000000..dae48967302a
--- /dev/null
+++ b/dbaccess/source/ui/inc/RelationDesignView.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_RELATIONDESIGNVIEW_HXX
+#define DBAUI_RELATIONDESIGNVIEW_HXX
+
+#include "JoinDesignView.hxx"
+#ifndef _VECTOR_
+#include <vector>
+#endif
+#include <tools/string.hxx>
+#include "QEnumTypes.hxx"
+#include "RelationTableView.hxx"
+
+namespace dbaui
+{
+ class OAddTableDlg;
+ class OTableConnection;
+ class ORelationTableConnectionData;
+ class OConnectionLineData;
+ class ORelationController;
+
+ class ORelationDesignView : public OJoinDesignView
+ {
+ public:
+ ORelationDesignView(Window* pParent, ORelationController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ virtual ~ORelationDesignView();
+
+ // set the statement for representation
+ /// late construction
+ virtual void Construct();
+ virtual void initialize();
+
+
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void GetFocus();
+ };
+}
+#endif // DBAUI_RELATIONDESIGNVIEW_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationDlg.hxx b/dbaccess/source/ui/inc/RelationDlg.hxx
new file mode 100644
index 000000000000..044eaa418ed3
--- /dev/null
+++ b/dbaccess/source/ui/inc/RelationDlg.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_RELATIONDIALOG_HXX
+#define DBAUI_RELATIONDIALOG_HXX
+
+#include <vcl/dialog.hxx>
+
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/msgbox.hxx>
+#include "JoinTableView.hxx"
+#include "RelControliFace.hxx"
+#include "moduledbu.hxx"
+
+
+namespace dbaui
+{
+ class OJoinTableView;
+ class OTableListBoxControl;
+ class ORelationTableConnectionData;
+ //========================================================================
+ class ORelationDialog : public ModalDialog
+ ,public IRelationControlInterface
+ {
+ OModuleClient m_aModuleClient;
+ ::std::auto_ptr<OTableListBoxControl> m_pTableControl;
+ OJoinTableView::OTableWindowMap* m_pTableMap;
+
+ FixedLine aFL_CascUpd;
+ RadioButton aRB_NoCascUpd,
+ aRB_CascUpd,
+ aRB_CascUpdNull,
+ aRB_CascUpdDefault;
+ FixedLine aFL_CascDel;
+ RadioButton aRB_NoCascDel,
+ aRB_CascDel,
+ aRB_CascDelNull,
+ aRB_CascDelDefault;
+
+ OKButton aPB_OK;
+ CancelButton aPB_CANCEL;
+ HelpButton aPB_HELP;
+
+
+ TTableConnectionData::value_type m_pConnData;
+ TTableConnectionData::value_type m_pOrigConnData;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
+
+ BOOL m_bTriedOneUpdate;
+
+ public:
+ ORelationDialog(OJoinTableView* pParent,
+ const TTableConnectionData::value_type& pConnectionData,
+ BOOL bAllowTableSelect = FALSE );
+ virtual ~ORelationDialog();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection(){ return m_xConnection; }
+
+ virtual short Execute();
+
+ /** getTableMap gives acces to the table window map
+ @retrun the table window from the join view
+ */
+ OJoinTableView::OTableWindowMap* getTableMap() const { return m_pTableMap; }
+
+ /** getConnectionData returns the current connection data
+ @return the current connectiondata
+ */
+ virtual TTableConnectionData::value_type getConnectionData() const;
+
+ /** setValid set the valid inside, can be used for OK buttons
+ @param _bValid true when the using control allows an update
+ */
+ virtual void setValid(sal_Bool _bValid);
+
+ /** notifyConnectionChange is callback which is called when the table selection has changed and a new connection exists
+ @param _pConnectionData the connection which exists between the new tables
+ */
+ virtual void notifyConnectionChange();
+ protected:
+ void Init(const TTableConnectionData::value_type& _pConnectionData);
+
+ private:
+ DECL_LINK( OKClickHdl, Button* );
+ };
+}
+#endif // DBAUI_RELATIONDIALOG_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationTableView.hxx b/dbaccess/source/ui/inc/RelationTableView.hxx
new file mode 100644
index 000000000000..ab0533164091
--- /dev/null
+++ b/dbaccess/source/ui/inc/RelationTableView.hxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_RELATION_TABLEVIEW_HXX
+#define DBAUI_RELATION_TABLEVIEW_HXX
+
+#include "JoinTableView.hxx"
+#include <comphelper/containermultiplexer.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <rtl/ref.hxx>
+
+namespace dbaui
+{
+ class ORelationDesignView;
+ class ORelationTableView : public ::cppu::BaseMutex
+ , public OJoinTableView
+ , public ::comphelper::OContainerListener
+ {
+ OTableConnection* m_pExistingConnection; // is set when a connection was draged on an existing connection
+ TTableConnectionData::value_type m_pCurrentlyTabConnData; // set when we creating a connection with more than one keycolumn
+ ::rtl::Reference< comphelper::OContainerListenerAdapter>
+ m_pContainerListener;
+ bool m_bInRemove;
+
+ virtual void ConnDoubleClicked( OTableConnection* pConnection );
+ virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE);
+
+ virtual OTableWindow* createWindow(const TTableWindowData::value_type& _pData);
+
+ /** determines whether the classes Init method should accept a query name, or only table names
+ */
+ virtual bool allowQueries() const;
+
+ // OContainerListener
+ virtual void _elementInserted( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void _elementRemoved( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void _elementReplaced( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ public:
+ ORelationTableView( Window* pParent, ORelationDesignView* pView );
+ virtual ~ORelationTableView();
+
+ virtual void RemoveTabWin( OTableWindow* pTabWin );
+ virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest);
+ virtual bool RemoveConnection(OTableConnection* pConn,sal_Bool _bDelete);
+
+ virtual void ReSync();
+
+ void AddNewRelation();
+ // reisst den Dialog fuer eine voellig neue Relation hoch
+ // wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen
+ virtual BOOL IsAddAllowed();
+
+ virtual void lookForUiActivities();
+ };
+}
+#endif // DBAUI_RELATION_TABLEVIEW_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RtfReader.hxx b/dbaccess/source/ui/inc/RtfReader.hxx
new file mode 100644
index 000000000000..457768327088
--- /dev/null
+++ b/dbaccess/source/ui/inc/RtfReader.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_RTFREADER_HXX
+#define DBAUI_RTFREADER_HXX
+
+#ifndef _VECTOR_
+#include <vector>
+#endif
+#include <svtools/parrtf.hxx>
+#include "DExport.hxx"
+#include <tools/stream.hxx>
+
+namespace dbaui
+{
+ class ORTFReader : public SvRTFParser , public ODatabaseExport
+ {
+ ::std::vector<sal_Int32> m_vecColor;
+
+ // void insertValueIntoColumn();
+ protected:
+ virtual sal_Bool CreateTable(int nToken);
+ virtual void NextToken( int nToken ); // Basisklasse
+ virtual TypeSelectionPageFactory
+ getTypeSelectionPageFactory();
+
+ ~ORTFReader();
+ public:
+ ORTFReader( SvStream& rIn,
+ const SharedConnection& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const TColumnVector* rList = 0,
+ const OTypeInfoMap* _pInfoMap = 0);
+ // wird f"ur auto. Typ-Erkennung gebraucht
+ ORTFReader( SvStream& rIn,
+ sal_Int32 nRows,
+ const TPositions &_rColumnPositions,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const TColumnVector* rList,
+ const OTypeInfoMap* _pInfoMap,
+ sal_Bool _bAutoIncrementEnabled);
+
+ virtual SvParserState CallParser();// Basisklasse
+ virtual void release();
+ // birgt nur korrekte Daten, wenn der 2. CTOR benutzt wurde
+ // ansonsten wird die SbaColumnList ohne "Anderung zur"uckgegeben
+ };
+
+ SV_DECL_IMPL_REF( ORTFReader );
+}
+#endif // DBAUI_RTFREADER_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/ScrollHelper.hxx b/dbaccess/source/ui/inc/ScrollHelper.hxx
new file mode 100644
index 000000000000..5eda7f69940a
--- /dev/null
+++ b/dbaccess/source/ui/inc/ScrollHelper.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_SCROLLHELPER_HXX
+#define DBAUI_SCROLLHELPER_HXX
+
+#include <tools/link.hxx>
+#include <tools/gen.hxx>
+#include <vcl/timer.hxx>
+
+namespace dbaui
+{
+ class OScrollHelper
+ {
+ Link m_aUpScroll;
+ Link m_aDownScroll;
+ public:
+ /** default contructor
+ */
+ OScrollHelper();
+
+ ~OScrollHelper();
+
+ /** set the memthod which should be called when scrolling up
+ @param _rUpScroll
+ the method to set
+ */
+ inline void setUpScrollMethod( const Link& _rUpScroll )
+ {
+ m_aUpScroll = _rUpScroll;
+ }
+
+ /** set the memthod which should be called when scrolling down
+ @param _rDownScroll
+ the method to set
+ */
+ inline void setDownScrollMethod( const Link& _rDownScroll )
+ {
+ m_aDownScroll = _rDownScroll;
+ }
+
+ /** check if a scroll method has to be called
+ @param _rPoint
+ the current selection point
+ @param _rOutputSize
+ the output size of the window
+ */
+ void scroll(const Point& _rPoint, const Size& _rOutputSize);
+ };
+}
+#endif // DBAUI_SCROLLHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/SqlNameEdit.hxx b/dbaccess/source/ui/inc/SqlNameEdit.hxx
new file mode 100644
index 000000000000..2356e9d0ed58
--- /dev/null
+++ b/dbaccess/source/ui/inc/SqlNameEdit.hxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_SQLNAMEEDIT_HXX
+#define DBAUI_SQLNAMEEDIT_HXX
+
+#include <vcl/edit.hxx>
+#include <vcl/combobox.hxx>
+
+namespace dbaui
+{
+ class OSQLNameChecker
+ {
+ ::rtl::OUString m_sAllowedChars;
+ sal_Bool m_bOnlyUpperCase;
+ sal_Bool m_bCheck; // true when we should check for invalid chars
+ public:
+ OSQLNameChecker(const ::rtl::OUString& _rAllowedChars)
+ :m_sAllowedChars(_rAllowedChars)
+ ,m_bOnlyUpperCase(sal_False)
+ ,m_bCheck(sal_True)
+ {
+ }
+
+ void setUpperCase(sal_Bool _bUpper=sal_True)
+ {
+ m_bOnlyUpperCase = _bUpper;
+ }
+ void setAllowedChars(const ::rtl::OUString& _rAllowedChars)
+ {
+ m_sAllowedChars = _rAllowedChars;
+ }
+ // default is false because it is initialized with true
+ void setCheck(sal_Bool _bCheck = sal_False)
+ {
+ m_bCheck = _bCheck;
+ }
+ sal_Bool checkString(const ::rtl::OUString& _sOldValue,const ::rtl::OUString& _sToCheck,::rtl::OUString& _rsCorrected);
+ };
+ //==================================================================
+ class OSQLNameEdit : public Edit
+ ,public OSQLNameChecker
+ {
+ public:
+ OSQLNameEdit(Window* _pParent,const ::rtl::OUString& _rAllowedChars, WinBits nStyle = WB_BORDER)
+ : Edit(_pParent,nStyle)
+ ,OSQLNameChecker(_rAllowedChars)
+ {
+ }
+ OSQLNameEdit(Window* _pParent,const ResId& _rRes,const ::rtl::OUString& _rAllowedChars = ::rtl::OUString())
+ : Edit(_pParent,_rRes)
+ ,OSQLNameChecker(_rAllowedChars)
+ {
+ }
+
+ // Window overload
+ // virtual long PreNotify( NotifyEvent& rNEvt );
+ // Edit
+ virtual void Modify();
+ };
+
+ class OSQLNameComboBox : public ComboBox
+ ,public OSQLNameChecker
+ {
+ public:
+ OSQLNameComboBox(Window* _pParent,const ::rtl::OUString& _rAllowedChars, WinBits nStyle = WB_BORDER)
+ : ComboBox(_pParent,nStyle)
+ ,OSQLNameChecker(_rAllowedChars)
+ {
+ }
+ OSQLNameComboBox(Window* _pParent,const ResId& _rRes,const ::rtl::OUString& _rAllowedChars = ::rtl::OUString())
+ : ComboBox(_pParent,_rRes)
+ ,OSQLNameChecker(_rAllowedChars)
+ {
+ }
+
+ // Window overload
+ // Edit
+ virtual void Modify();
+ };
+
+}
+#endif // DBAUI_SQLNAMEEDIT_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx
new file mode 100644
index 000000000000..02519af26207
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableConnection.hxx
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLECONNECTION_HXX
+#define DBAUI_TABLECONNECTION_HXX
+
+#include <vector>
+#include <tools/debug.hxx>
+#include <vcl/window.hxx>
+#include <tools/rtti.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include "TableConnectionData.hxx"
+
+class Point;
+class Rectangle;
+
+namespace dbaui
+{
+ class OTableConnectionData;
+ class OTableWindow;
+ class OJoinTableView;
+ class OConnectionLine;
+
+ DBG_NAMEEX(OTableConnection)
+ class OTableConnection : public Window
+ {
+ ::std::vector<OConnectionLine*> m_vConnLine;
+ TTableConnectionData::value_type
+ m_pData;
+ OJoinTableView* m_pParent;
+
+ BOOL m_bSelected;
+
+ void Init();
+ /** clearLineData loops through the vector and deletes all lines
+ */
+ void clearLineData();
+
+ protected:
+ OConnectionLine* CreateConnLine( const OConnectionLine& rConnLine );
+
+ public:
+ OTableConnection( OJoinTableView* pContainer, const TTableConnectionData::value_type& pTabConnData );
+ OTableConnection( const OTableConnection& rConn );
+ // WICHTIG : normalerweise bekomme ich von aussen einen Zeiger auf OTableConnectionData mitgegeben, hier aber muss ich
+ // mir (ueber OTableConnectionData::NewInstance) selber eine INstanz anlegen, die ich aber - wie in allen anderen Faellen auch -
+ // NIE loesche. Der Aufrufer ist also bei Benutzung dieses Constructors dafuer verantwortlich, meine Daten abzufragen und
+ // sich irgendwo zu merken, um sie dann irgendwann zu loeschen.
+ virtual ~OTableConnection();
+
+ OTableConnection& operator=( const OTableConnection& rConn );
+
+
+ void Select();
+ void Deselect();
+ BOOL IsSelected() const { return m_bSelected; }
+ BOOL CheckHit( const Point& rMousePos ) const;
+ bool InvalidateConnection();
+ void UpdateLineList();
+
+ OTableWindow* GetSourceWin() const;
+ OTableWindow* GetDestWin() const;
+
+ bool RecalcLines();
+ /** isTableConnection
+ @param _pTable the table where we should check if we belongs to it
+
+ @return true when the source or the destination window are equal
+ */
+ bool isTableConnection(const OTableWindow* _pTable)
+ {
+ return (_pTable == GetSourceWin() || _pTable == GetDestWin());
+ }
+
+ Rectangle GetBoundingRect() const;
+
+ inline TTableConnectionData::value_type GetData() const { return m_pData; }
+ const ::std::vector<OConnectionLine*>* GetConnLineList() const { return &m_vConnLine; }
+ inline OJoinTableView* GetParent() const { return m_pParent; }
+ virtual void Draw( const Rectangle& rRect );
+ using Window::Draw;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+ };
+}
+#endif // DBAUI_TABLECONNECTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx
new file mode 100644
index 000000000000..2d558249f1c3
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableConnectionData.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLECONNECTIONDATA_HXX
+#define DBAUI_TABLECONNECTIONDATA_HXX
+
+#include "ConnectionLineData.hxx"
+#include "TableWindowData.hxx"
+#include <vector>
+#include <tools/rtti.hxx>
+#include <tools/string.hxx>
+#include <boost/shared_ptr.hpp>
+
+namespace dbaui
+{
+#define MAX_CONN_COUNT 2
+ //==================================================================
+ // ConnData ---------->* ConnLineData
+ // ^1 ^1
+ // | |
+ // Conn ---------->* ConnLine
+ //==================================================================
+
+
+ //==================================================================
+ /*
+ the class OTableConnectionData contains all connection data which exists between two windows
+ **/
+ class OTableConnectionData
+ {
+
+ protected:
+ TTableWindowData::value_type m_pReferencingTable;
+ TTableWindowData::value_type m_pReferencedTable;
+ String m_aConnName;
+
+ OConnectionLineDataVec m_vConnLineData;
+
+ void Init();
+
+ virtual OConnectionLineDataRef CreateLineDataObj();
+ virtual OConnectionLineDataRef CreateLineDataObj( const OConnectionLineData& rConnLineData );
+
+ OTableConnectionData& operator=( const OTableConnectionData& rConnData );
+ public:
+ OTableConnectionData();
+ OTableConnectionData(const TTableWindowData::value_type& _pReferencingTable,const TTableWindowData::value_type& _pReferencedTable, const String& rConnName = String() );
+ OTableConnectionData( const OTableConnectionData& rConnData );
+ virtual ~OTableConnectionData();
+
+ // sich aus einer Quelle initialisieren (das ist mir irgendwie angenehmer als ein virtueller Zuweisungsoperator)
+ virtual void CopyFrom(const OTableConnectionData& rSource);
+
+ // eine neue Instanz meines eigenen Typs liefern (braucht NICHT initialisiert sein)
+ virtual OTableConnectionData* NewInstance() const;
+ // (von OTableConnectionData abgeleitete Klasse muessen entsprechend eine Instanz ihrer Klasse liefern)
+
+ BOOL SetConnLine( USHORT nIndex, const String& rSourceFieldName, const String& rDestFieldName );
+ BOOL AppendConnLine( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName );
+ void ResetConnLines( BOOL bUseDefaults = TRUE );
+
+ /** normalizeLines moves the empty lines to the back
+ */
+ void normalizeLines();
+ // loescht die Liste der ConnLines, bei bUseDefaults == TRUE werden danach MAX_CONN_COUNT neue Dummy-Linien eingefuegt
+
+ OConnectionLineDataVec* GetConnLineDataList(){ return &m_vConnLineData; }
+
+ inline TTableWindowData::value_type getReferencingTable() const { return m_pReferencingTable; }
+ inline TTableWindowData::value_type getReferencedTable() const { return m_pReferencedTable; }
+
+ inline void setReferencingTable(const TTableWindowData::value_type& _pTable) { m_pReferencingTable = _pTable; }
+ inline void setReferencedTable(const TTableWindowData::value_type& _pTable) { m_pReferencedTable = _pTable; }
+
+ String GetConnName() const { return m_aConnName; }
+
+ virtual void SetConnName( const String& rConnName ){ m_aConnName = rConnName; }
+ /** Update create a new connection
+
+ @return true if successful
+ */
+ virtual BOOL Update(){ return TRUE; }
+ };
+
+ typedef ::std::vector< ::boost::shared_ptr<OTableConnectionData> > TTableConnectionData;
+
+}
+#endif // DBAUI_TABLECONNECTIONDATA_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx
new file mode 100644
index 000000000000..0b07cccd51e0
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -0,0 +1,160 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBUI_TABLECONTROLLER_HXX
+#define DBUI_TABLECONTROLLER_HXX
+
+#include "singledoccontroller.hxx"
+#include "moduledbu.hxx"
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#include "TypeInfo.hxx"
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+
+class FixedText;
+namespace dbaui
+{
+ class OTableRow;
+ class OFieldDescription;
+ typedef OSingleDocumentController OTableController_BASE;
+ class OTableController : public OTableController_BASE
+ {
+ private:
+ OModuleClient m_aModuleClient;
+ ::std::vector< ::boost::shared_ptr<OTableRow> > m_vRowList;
+ OTypeInfoMap m_aTypeInfo;
+ ::std::vector<OTypeInfoMap::iterator> m_aTypeInfoIndex;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTable;
+
+ ::rtl::OUString m_sCatalogName; // catalog for update data
+ ::rtl::OUString m_sSchemaName; // schema for update data
+ ::rtl::OUString m_sName; // table for update data
+ ::rtl::OUString m_sAutoIncrementValue; // the autoincrement value set in the datasource
+ String m_sTypeNames; // these type names are the ones out of the resource file
+ TOTypeInfoSP m_pTypeInfo; // fall back when type is unkown because database driver has a failure
+
+ sal_Bool m_bAllowAutoIncrementValue; // no : 1 NO BIT , is true when the datasource has a AutoIncrementValue property in their info property
+ sal_Bool m_bNew : 1; // is true when we create a new table
+
+
+ void reSyncRows();
+ void assignTable(); // set the table if a name is given
+ void loadData();
+ sal_Bool checkColumns(sal_Bool _bNew) throw(::com::sun::star::sdbc::SQLException); // check if we have double column names
+ String createUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxTables,const String& _rDefault);
+ void appendColumns(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>& _rxColSup,sal_Bool _bNew,sal_Bool _bKeyColumns = sal_False);
+ void appendPrimaryKey(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XKeysSupplier>& _rxSup,sal_Bool _bNew);
+ void alterColumns();
+ void dropPrimaryKey();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getKeyColumns() const;
+ ::rtl::OUString createUniqueName(const ::rtl::OUString& _rName);
+
+ void reload();
+
+ // all the features which should be handled by this class
+ virtual void describeSupportedFeatures();
+ // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
+ virtual FeatureState GetState(sal_uInt16 nId) const;
+ // execute a feature
+ virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
+
+ virtual void losingConnection( );
+
+ virtual ::rtl::OUString getPrivateTitle( ) const;
+
+ void doEditIndexes();
+ sal_Bool doSaveDoc(sal_Bool _bSaveAs);
+
+ virtual ~OTableController();
+ public:
+ OTableController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getTable() { return m_xTable;}
+
+ sal_Bool isAddAllowed() const;
+ sal_Bool isDropAllowed() const;
+ sal_Bool isAlterAllowed() const;
+ bool isAutoIncrementPrimaryKey() const;
+
+ inline sal_Bool isAutoIncrementValueEnabled() const { return m_bAllowAutoIncrementValue; }
+ inline const ::rtl::OUString& getAutoIncrementValue() const { return m_sAutoIncrementValue; }
+
+ virtual void impl_onModifyChanged();
+
+ // const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();}
+ // need for undo's and redo's
+ SfxUndoManager* getUndoMgr();
+ inline ::std::vector< ::boost::shared_ptr<OTableRow> >* getRows() { return &m_vRowList; }
+
+ /// returns the postion of the the first empty row
+ sal_Int32 getFirstEmptyRowPosition();
+
+ inline const OTypeInfoMap* getTypeInfo() const { return &m_aTypeInfo; }
+
+ inline TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) const { return m_aTypeInfoIndex[_nPos]->second; }
+ TOTypeInfoSP getTypeInfoByType(sal_Int32 _nDataType) const;
+
+ inline TOTypeInfoSP getTypeInfoFallBack() const { return m_pTypeInfo; }
+
+ virtual sal_Bool Construct(Window* pParent);
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::frame::XController
+ virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL disposing();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ // need by registration
+ static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+
+ //
+ virtual void Load(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxIn);
+ virtual void Save(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOut);
+
+ protected:
+ void startTableListening();
+ void stopTableListening();
+ virtual void impl_initialize();
+ };
+}
+#endif // DBUI_TABLECONTROLLER_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx
new file mode 100644
index 000000000000..778739896747
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx
@@ -0,0 +1,200 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBUI_TABLECOPYHELPER_HXX
+#define DBUI_TABLECOPYHELPER_HXX
+
+#include "AppElementType.hxx"
+#include "commontypes.hxx"
+#include <svx/dataaccessdescriptor.hxx>
+#include <sot/storage.hxx>
+#include <svtools/transfer.hxx>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#include <functional>
+
+class SvLBoxEntry;
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+ class OGenericUnoController;
+ /// unary_function Functor object for class DataFlavorExVector::value_type returntype is bool
+ struct TAppSupportedSotFunctor : ::std::unary_function<DataFlavorExVector::value_type,bool>
+ {
+ ElementType eEntryType;
+ sal_Bool bQueryDrop;
+ TAppSupportedSotFunctor(const ElementType& _eEntryType,sal_Bool _bQueryDrop)
+ : eEntryType(_eEntryType)
+ , bQueryDrop(_bQueryDrop)
+ {
+ }
+
+ inline bool operator()(const DataFlavorExVector::value_type& _aType)
+ {
+ switch (_aType.mnSotId)
+ {
+ case SOT_FORMAT_RTF: // RTF data descriptions
+ case SOT_FORMATSTR_ID_HTML: // HTML data descriptions
+ case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor
+ return (E_TABLE == eEntryType);
+ case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor
+ case SOT_FORMATSTR_ID_DBACCESS_COMMAND: // SQL command
+ return ((E_QUERY == eEntryType) || ( !bQueryDrop && E_TABLE == eEntryType));
+ }
+ return false;
+ }
+ };
+
+ class OTableCopyHelper
+ {
+ private:
+ OGenericUnoController* m_pController;
+ ::rtl::OUString m_sTableNameForAppend;
+
+ public:
+ // is needed to describe the drop target
+ struct DropDescriptor
+ {
+ ::svx::ODataAccessDescriptor aDroppedData;
+ //dyf add 20070601
+ //for transfor the tablename
+ ::rtl::OUString sDefaultTableName;
+ //dyf add end
+ String aUrl;
+ SotStorageStreamRef aHtmlRtfStorage;
+ ElementType nType;
+ SvLBoxEntry* pDroppedAt;
+ sal_Int8 nAction;
+ sal_Bool bHtml;
+ sal_Bool bError;
+
+ DropDescriptor() : nType(E_TABLE),pDroppedAt(NULL),nAction(DND_ACTION_NONE) { }
+ };
+
+ OTableCopyHelper(OGenericUnoController* _pControler);
+
+ /** pastes a table into the data source
+ @param _rPasteData
+ The data helper.
+ @param _sDestDataSourceName
+ The name of the dest data source.
+ */
+ void pasteTable( const TransferableDataHelper& _rTransData
+ ,const ::rtl::OUString& _sDestDataSourceName
+ ,const SharedConnection& _xConnection);
+
+ /** pastes a table into the data source
+ @param _nFormatId
+ The format which should be copied.
+ @param _rPasteData
+ The data helper.
+ @param _sDestDataSourceName
+ The name of the dest data source.
+ */
+ void pasteTable( SotFormatStringId _nFormatId
+ ,const TransferableDataHelper& _rTransData
+ ,const ::rtl::OUString& _sDestDataSourceName
+ ,const SharedConnection& _xConnection);
+
+ /** copies a table which was constructed by tags like HTML or RTF
+ @param _rDesc
+ The Drop descriptor
+ @param _bCheck
+ If set to <TRUE/> than the controller checks only if a copy is possible.
+ @param _xConnection
+ The connection
+ */
+ sal_Bool copyTagTable( DropDescriptor& _rDesc,
+ sal_Bool _bCheck,
+ const SharedConnection& _xConnection);
+
+ /** copies a table which was constructed by tags like HTML or RTF
+ @param _rDesc
+ The Drop descriptor
+ @param _bCheck
+ If set to <TRUE/> than the controller checks only if a copy is possible.
+ @param _xConnection
+ The connection
+ */
+ void asyncCopyTagTable( DropDescriptor& _rDesc
+ ,const ::rtl::OUString& _sDestDataSourceName
+ ,const SharedConnection& _xConnection);
+
+ /** copies a table which was constructed by tags like HTML or RTF
+ @param _aDroppedData
+ The dropped data
+ @param _rDesc
+ IN/OUT parameter
+ @param _xConnection
+ The connection
+ */
+ sal_Bool copyTagTable(const TransferableDataHelper& _aDroppedData,
+ DropDescriptor& _rAsyncDrop,
+ const SharedConnection& _xConnection);
+
+ /// returns <TRUE/> if the clipboard supports a table format, otherwise <FALSE/>.
+ sal_Bool isTableFormat(const TransferableDataHelper& _rClipboard) const;
+
+ inline void SetTableNameForAppend( const ::rtl::OUString& _rDefaultTableName ) { m_sTableNameForAppend = _rDefaultTableName; }
+ inline void ResetTableNameForAppend() { SetTableNameForAppend( ::rtl::OUString() ); }
+ inline const ::rtl::OUString& GetTableNameForAppend() const { return m_sTableNameForAppend ;}
+
+ private:
+ /** pastes a table into the data source
+ @param _rPasteData
+ The data descriptor.
+ @param _sDestDataSourceName
+ The name of the dest data source.
+ */
+ void pasteTable(
+ const ::svx::ODataAccessDescriptor& _rPasteData,
+ const ::rtl::OUString& _sDestDataSourceName,
+ const SharedConnection& _xDestConnection
+ );
+
+ /** insert a table into the data source. The source can eihter be a table or a query
+ */
+ void insertTable(
+ const ::rtl::OUString& i_rSourceDataSource,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& i_rSourceConnection,
+ const ::rtl::OUString& i_rCommand,
+ const sal_Int32 i_nCommandType,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& i_rSourceRows,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& i_rSelection,
+ const sal_Bool i_bBookmarkSelection,
+ const ::rtl::OUString& i_rDestDataSource,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& i_rDestConnection
+ );
+
+ };
+//........................................................................
+} // namespace dbaui
+//........................................................................
+#endif // DBUI_TABLECOPYHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableDesignControl.hxx b/dbaccess/source/ui/inc/TableDesignControl.hxx
new file mode 100644
index 000000000000..c9468a15b597
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableDesignControl.hxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEDESIGNCONTROL_HXX
+#define DBAUI_TABLEDESIGNCONTROL_HXX
+
+#include <svtools/tabbar.hxx>
+#include <svtools/editbrowsebox.hxx>
+
+#include "IClipBoardTest.hxx"
+#include "TypeInfo.hxx"
+
+#define TABPAGESIZE 70
+namespace dbaui
+{
+ class OTableDesignView;
+ class OTypeInfo;
+ //==================================================================
+ class OTableRowView : public ::svt::EditBrowseBox
+ ,public IClipboardTest
+ {
+ friend class OTableDesignUndoAct;
+
+ protected:
+ long m_nDataPos; // derzeit benoetigte Zeile
+ long m_nCurrentPos; // Aktuelle Position der ausgewaehlten Column
+ private:
+ USHORT m_nCurUndoActId;
+ protected:
+ BOOL m_bCurrentModified;
+ BOOL m_bUpdatable;
+ BOOL m_bClipboardFilled;
+
+ public:
+ OTableRowView(Window* pParent);
+ virtual ~OTableRowView();
+
+ virtual void SetCellData( long nRow, USHORT nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
+ virtual void SetCellData( long nRow, USHORT nColId, const ::com::sun::star::uno::Any& _rNewData ) = 0;
+ virtual ::com::sun::star::uno::Any GetCellData( long nRow, USHORT nColId ) = 0;
+ virtual void SetControlText( long nRow, USHORT nColId, const String& rText ) = 0;
+ virtual String GetControlText( long nRow, USHORT nColId ) = 0;
+
+ virtual OTableDesignView* GetView() const = 0;
+
+ USHORT GetCurUndoActId(){ return m_nCurUndoActId; }
+
+ // IClipboardTest
+ virtual void cut();
+ virtual void copy();
+ virtual void paste();
+
+ protected:
+ void Paste( long nRow );
+
+ virtual void CopyRows() = 0;
+ virtual void DeleteRows() = 0;
+ virtual void InsertRows( long nRow ) = 0;
+ virtual void InsertNewRows( long nRow ) = 0;
+
+ virtual sal_Bool IsPrimaryKeyAllowed( long nRow ) = 0;
+ virtual sal_Bool IsInsertNewAllowed( long nRow ) = 0;
+ virtual sal_Bool IsDeleteAllowed( long nRow ) = 0;
+
+ virtual BOOL IsUpdatable() const {return m_bUpdatable;}
+ virtual void SetUpdatable( BOOL bUpdate=TRUE );
+
+ virtual RowStatus GetRowStatus(long nRow) const;
+ virtual void KeyInput(const KeyEvent& rEvt);
+ virtual void Command( const CommandEvent& rEvt );
+
+ virtual void Init();
+ };
+}
+#endif // DBAUI_TABLEDESIGNCONTROL_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
new file mode 100644
index 000000000000..b3d40d329812
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEDESIGNHELPBAR_HXX
+#define DBAUI_TABLEDESIGNHELPBAR_HXX
+
+#include <tools/string.hxx>
+#include <vcl/tabctrl.hxx>
+#include <vcl/tabpage.hxx>
+#include "IClipBoardTest.hxx"
+
+class MultiLineEdit;
+namespace dbaui
+{
+ //==================================================================
+ // Ableitung von TabPage ist ein Trick von TH,
+ // um Aenderungen der Systemfarben zu bemerken (Bug #53905)
+ class OTableDesignHelpBar : public TabPage
+ ,public IClipboardTest
+ {
+ private:
+ String m_sHelpText;
+ MultiLineEdit* m_pTextWin;
+ USHORT m_nDummy;
+
+ protected:
+ virtual void Resize();
+
+ public:
+ OTableDesignHelpBar( Window* pParent );
+ virtual ~OTableDesignHelpBar();
+
+ void SetHelpText( const String& rText );
+ String GetHelpText() const { return m_sHelpText; }
+
+ virtual long PreNotify( NotifyEvent& rNEvt );
+
+ // IClipboardTest
+ virtual sal_Bool isCutAllowed();
+ virtual sal_Bool isCopyAllowed();
+ virtual sal_Bool isPasteAllowed();
+ virtual sal_Bool hasChildPathFocus() { return HasChildPathFocus(); }
+
+ virtual void copy();
+ virtual void cut();
+ virtual void paste();
+ };
+}
+#endif // DBAUI_TABLEDESIGNHELPBAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx
new file mode 100644
index 000000000000..4608010afa93
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableDesignView.hxx
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEDESIGNVIEW_HXX
+#define DBAUI_TABLEDESIGNVIEW_HXX
+
+#include "dataview.hxx"
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <vcl/split.hxx>
+#include "IClipBoardTest.hxx"
+
+namespace dbaui
+{
+ class OTableController;
+ class OTableFieldDescWin;
+ class OTableEditorCtrl;
+ //==================================================================
+ class OTableBorderWindow : public Window
+ {
+ Splitter m_aHorzSplitter;
+ OTableFieldDescWin* m_pFieldDescWin;
+ OTableEditorCtrl* m_pEditorCtrl;
+
+ void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ArrangeChilds( long nSplitPos ,Rectangle& rRect);
+ DECL_LINK( SplitHdl, Splitter* );
+ protected:
+ virtual void DataChanged(const DataChangedEvent& rDCEvt);
+ public:
+ OTableBorderWindow(Window* pParent);
+ ~OTableBorderWindow();
+ // window overloads
+ virtual void Resize();
+ virtual void GetFocus();
+
+ OTableEditorCtrl* GetEditorCtrl() const { return m_pEditorCtrl; }
+ OTableFieldDescWin* GetDescWin() const { return m_pFieldDescWin; }
+ };
+ //==================================================================
+ class OTableDesignView : public ODataView
+ ,public IClipboardTest
+ {
+ enum ChildFocusState
+ {
+ DESCRIPTION,
+ EDITOR,
+ NONE
+ };
+ private:
+ ::com::sun::star::lang::Locale m_aLocale;
+ OTableBorderWindow* m_pWin;
+ OTableController& m_rController;
+ ChildFocusState m_eChildFocus;
+
+ IClipboardTest* getActiveChild() const;
+ protected:
+
+
+ // return the Rectangle where I can paint myself
+ virtual void resizeDocumentView(Rectangle& rRect);
+
+ public:
+ OTableDesignView( Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&,
+ OTableController& _rController);
+ virtual ~OTableDesignView();
+
+ // window overloads
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void GetFocus();
+
+ OTableEditorCtrl* GetEditorCtrl() const { return m_pWin ? m_pWin->GetEditorCtrl() : NULL; }
+ OTableFieldDescWin* GetDescWin() const { return m_pWin ? m_pWin->GetDescWin() : NULL; }
+ OTableController& getController() const { return m_rController; }
+
+ ::com::sun::star::lang::Locale getLocale() const { return m_aLocale;}
+
+ // IClipboardTest
+ virtual sal_Bool isCutAllowed();
+ virtual sal_Bool isCopyAllowed();
+ virtual sal_Bool isPasteAllowed();
+ virtual sal_Bool hasChildPathFocus() { return HasChildPathFocus(); }
+ virtual void copy();
+ virtual void cut();
+ virtual void paste();
+
+ // set the view readonly or not
+ virtual void setReadOnly(sal_Bool _bReadOnly);
+
+ virtual void initialize();
+ void reSync(); // resync window data with realdata
+
+ DECL_LINK( SwitchHdl, Accelerator* );
+ };
+}
+#endif // DBAUI_TABLEDESIGNVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx b/dbaccess/source/ui/inc/TableFieldDescription.hxx
new file mode 100644
index 000000000000..1438d5bdac73
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx
@@ -0,0 +1,163 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEFIELDDESC_HXX
+#define DBAUI_TABLEFIELDDESC_HXX
+
+#ifndef INCLUDED_VECTOR
+#define INCLUDED_VECTOR
+#include <vector>
+#endif
+#include "QEnumTypes.hxx"
+#include <rtl/ustring.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <rtl/ref.hxx>
+
+#include <salhelper/simplereferenceobject.hxx>
+
+namespace comphelper
+{
+ class NamedValueCollection;
+}
+
+class Window;
+namespace dbaui
+{
+ class OTableFieldDesc : public ::salhelper::SimpleReferenceObject
+ {
+ private:
+ ::std::vector< ::rtl::OUString >
+ m_aCriteria;
+
+ ::rtl::OUString m_aTableName;
+ ::rtl::OUString m_aAliasName; // table range
+ ::rtl::OUString m_aFieldName; // column
+ ::rtl::OUString m_aFieldAlias; // column alias
+ ::rtl::OUString m_aFunctionName; // enth"alt den Funktionsnamen, nur wenn m_eFunctionType != FKT_NONE gesetzt
+
+ Window* m_pTabWindow;
+
+ sal_Int32 m_eDataType;
+ sal_Int32 m_eFunctionType;
+ ETableFieldType m_eFieldType;
+ EOrderDir m_eOrderDir;
+ sal_Int32 m_nIndex;
+ sal_Int32 m_nColWidth;
+ sal_uInt16 m_nColumnId;
+ sal_Bool m_bGroupBy;
+ sal_Bool m_bVisible;
+
+ // !!!! bitte bei Erweiterung um neue Felder auch IsEmpty mitpflegen !!!!
+
+ public:
+ OTableFieldDesc();
+ OTableFieldDesc(const ::rtl::OUString& rTable, const ::rtl::OUString& rField );
+ OTableFieldDesc(const OTableFieldDesc& rRS);
+ ~OTableFieldDesc();
+
+ inline sal_Bool IsEmpty() const;
+
+ OTableFieldDesc& operator=( const OTableFieldDesc& _aField );
+ sal_Bool operator==( const OTableFieldDesc& rDesc );
+
+ sal_Bool IsVisible() const { return m_bVisible;}
+ sal_Bool IsGroupBy() const { return m_bGroupBy;}
+
+ void SetVisible( sal_Bool bVis=sal_True ){ m_bVisible = bVis;}
+ void SetGroupBy( sal_Bool bGb=sal_False ){ m_bGroupBy = bGb;}
+ void SetTabWindow( Window* pWin ){ m_pTabWindow = pWin;}
+ void SetField( const ::rtl::OUString& rF ){ m_aFieldName = rF;}
+ void SetFieldAlias( const ::rtl::OUString& rF ){ m_aFieldAlias = rF;}
+ void SetTable( const ::rtl::OUString& rT ){ m_aTableName = rT;}
+ void SetAlias( const ::rtl::OUString& rT ){ m_aAliasName = rT;}
+ void SetFunction( const ::rtl::OUString& rT ) { m_aFunctionName = rT;}
+ void SetOrderDir( EOrderDir eDir ) { m_eOrderDir = eDir; }
+ void SetDataType( sal_Int32 eTyp ) { m_eDataType = eTyp; }
+ void SetFieldType( ETableFieldType eTyp ) { m_eFieldType = eTyp; }
+ void SetCriteria( sal_uInt16 nIdx, const ::rtl::OUString& rCrit);
+ void SetColWidth( sal_Int32 nWidth ) { m_nColWidth = nWidth; }
+ void SetFieldIndex( sal_Int32 nFieldIndex ) { m_nIndex = nFieldIndex; }
+ void SetFunctionType( sal_Int32 eTyp ) { m_eFunctionType = eTyp; }
+ void SetColumnId(sal_uInt16 _nColumnId) { m_nColumnId = _nColumnId; }
+
+
+ ::rtl::OUString GetField() const { return m_aFieldName;}
+ ::rtl::OUString GetFieldAlias() const { return m_aFieldAlias;}
+ ::rtl::OUString GetTable() const { return m_aTableName;}
+ ::rtl::OUString GetAlias() const { return m_aAliasName;}
+ ::rtl::OUString GetFunction() const { return m_aFunctionName;}
+ sal_Int32 GetDataType() const { return m_eDataType; }
+ ETableFieldType GetFieldType() const { return m_eFieldType; }
+ EOrderDir GetOrderDir() const { return m_eOrderDir; }
+ ::rtl::OUString GetCriteria( sal_uInt16 nIdx ) const;
+ sal_Int32 GetColWidth() const { return m_nColWidth; }
+ sal_Int32 GetFieldIndex() const { return m_nIndex; }
+ Window* GetTabWindow() const { return m_pTabWindow;}
+ sal_Int32 GetFunctionType() const { return m_eFunctionType; }
+ sal_uInt16 GetColumnId() const { return m_nColumnId;}
+
+ inline sal_Bool isAggreateFunction() const { return (m_eFunctionType & FKT_AGGREGATE) == FKT_AGGREGATE; }
+ inline sal_Bool isOtherFunction() const { return (m_eFunctionType & FKT_OTHER) == FKT_OTHER; }
+ inline sal_Bool isNumeric() const { return (m_eFunctionType & FKT_NUMERIC) == FKT_NUMERIC; }
+ inline sal_Bool isNoneFunction() const { return m_eFunctionType == FKT_NONE; }
+ inline sal_Bool isCondition() const { return (m_eFunctionType & FKT_CONDITION) == FKT_CONDITION; }
+ inline sal_Bool isNumericOrAggreateFunction() const { return isNumeric() || isAggreateFunction(); }
+
+ sal_Bool HasCriteria() const
+ {
+ ::std::vector< ::rtl::OUString>::const_iterator aIter = m_aCriteria.begin();
+ ::std::vector< ::rtl::OUString>::const_iterator aEnd = m_aCriteria.end();
+ for(;aIter != aEnd;++aIter)
+ if(aIter->getLength())
+ break;
+ return aIter != aEnd;
+ }
+
+ const ::std::vector< ::rtl::OUString>& GetCriteria() const { return m_aCriteria; }
+
+ void Load( const ::com::sun::star::beans::PropertyValue& i_rSettings, const bool i_bIncludingCriteria );
+ void Save( ::comphelper::NamedValueCollection& o_rSettings, const bool i_bIncludingCriteria );
+ };
+
+ //------------------------------------------------------------------
+ inline sal_Bool OTableFieldDesc::IsEmpty() const
+ {
+ sal_Bool bEmpty = (!m_aTableName.getLength() &&
+ !m_aAliasName.getLength() &&
+ !m_aFieldName.getLength() &&
+ !m_aFieldAlias.getLength() &&
+ !m_aFunctionName.getLength() &&
+ !HasCriteria());
+ return bEmpty;
+ }
+ //------------------------------------------------------------------
+ typedef ::rtl::Reference< OTableFieldDesc> OTableFieldDescRef;
+ typedef ::std::vector<OTableFieldDescRef> OTableFields;
+}
+#endif //
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
new file mode 100644
index 000000000000..247966ff8018
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEGRANTCONTROL_HXX
+#define DBAUI_TABLEGRANTCONTROL_HXX
+
+#include <svtools/editbrowsebox.hxx>
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#include <com/sun/star/sdbcx/XAuthorizable.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/stl_types.hxx>
+#include "moduledbu.hxx"
+
+class Edit;
+namespace dbaui
+{
+
+class OTableGrantControl : public ::svt::EditBrowseBox
+{
+ typedef struct
+ {
+ sal_Int32 nRights;
+ sal_Int32 nWithGrant;
+ } TPrivileges;
+
+ DECLARE_STL_USTRINGACCESS_MAP(TPrivileges,TTablePrivilegeMap);
+
+ OModuleClient m_aModuleClient;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xUsers;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xTables;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XAuthorizable> m_xGrantUser;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString> m_aTableNames;
+
+ mutable TTablePrivilegeMap m_aPrivMap;
+ ::rtl::OUString m_sUserName;
+ ::svt::CheckBoxControl* m_pCheckCell;
+ Edit* m_pEdit;
+ long m_nDataPos;
+ BOOL m_bEnable;
+ ULONG m_nDeactivateEvent;
+
+public:
+ OTableGrantControl( Window* pParent,const ResId& _RsId);
+ virtual ~OTableGrantControl();
+ void UpdateTables();
+ void setUserName(const ::rtl::OUString _sUserName);
+ void setGrantUser(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XAuthorizable>& _xGrantUser);
+
+ void setTablesSupplier(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier >& _xTablesSup);
+ void setORB(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _xORB);
+
+ virtual void Init();
+
+ // IAccessibleTableProvider
+ /** Creates the accessible object of a data table cell.
+ @param nRow The row index of the cell.
+ @param nColumnId The column ID of the cell.
+ @return The XAccessible interface of the specified cell. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId );
+
+protected:
+ virtual void Resize();
+
+ virtual long PreNotify(NotifyEvent& rNEvt );
+
+ virtual BOOL IsTabAllowed(BOOL bForward) const;
+ virtual void InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol );
+ virtual ::svt::CellController* GetController( long nRow, USHORT nCol );
+ virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const;
+ virtual BOOL SeekRow( long nRow );
+ virtual BOOL SaveModified();
+ virtual String GetCellText( long nRow, USHORT nColId ) const;
+
+ virtual void CellModified();
+
+private:
+ DECL_LINK( AsynchActivate, void* );
+ DECL_LINK( AsynchDeactivate, void* );
+
+ sal_Bool isAllowed(USHORT _nColumnId,sal_Int32 _nPrivilege) const;
+ void fillPrivilege(sal_Int32 _nRow) const;
+ TTablePrivilegeMap::const_iterator findPrivilege(sal_Int32 _nRow) const;
+};
+
+}
+
+#endif // DBAUI_TABLEGRANTCONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableRow.hxx b/dbaccess/source/ui/inc/TableRow.hxx
new file mode 100644
index 000000000000..edaab51ae6db
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableRow.hxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEROW_HXX
+#define DBAUI_TABLEROW_HXX
+
+#include <comphelper/stl_types.hxx>
+#include <tools/string.hxx>
+#include <tools/stream.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include "TypeInfo.hxx"
+
+
+namespace dbaui
+{
+// class OTableRow;
+// friend SvStream& operator<<( SvStream& rStr, OTableRow& _rRow );
+
+ class OFieldDescription;
+ class OTypeInfo;
+ class OTableRow
+ {
+ private:
+ OFieldDescription* m_pActFieldDescr;
+ long m_nPos;
+ bool m_bReadOnly;
+ bool m_bOwnsDescriptions;
+
+ protected:
+ public:
+ OTableRow();
+ OTableRow(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xAffectedCol);
+ OTableRow( const OTableRow& rRow, long nPosition = -1 );
+ ~OTableRow();
+
+ inline OFieldDescription* GetActFieldDescr() const { return m_pActFieldDescr; }
+ inline bool isValid() const { return GetActFieldDescr() != NULL; }
+
+ void SetFieldType( const TOTypeInfoSP& _pType, sal_Bool _bForce = sal_False );
+
+ void SetPrimaryKey( BOOL bSet );
+ BOOL IsPrimaryKey() const;
+
+ /** returns the current position in the table.
+ @return
+ the current position in the table
+ */
+ inline long GetPos() const { return m_nPos; }
+ inline void SetPos(sal_Int32 _nPos) { m_nPos = _nPos; }
+
+ /** set the row readonly
+ @param _bRead
+ if <TRUE/> then the row is redonly, otherwise not
+ */
+ inline void SetReadOnly( bool _bRead=true ){ m_bReadOnly = _bRead; }
+
+ /** returns if the row is readonly
+ @return
+ <TRUE/> if readonly, otherwise <FALSE/>
+ */
+ inline bool IsReadOnly() const { return m_bReadOnly; }
+
+ friend SvStream& operator<<( SvStream& rStr,const OTableRow& _rRow );
+ friend SvStream& operator>>( SvStream& rStr, OTableRow& _rRow );
+ };
+}
+#endif // DBAUI_TABLEROW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableRowExchange.hxx b/dbaccess/source/ui/inc/TableRowExchange.hxx
new file mode 100644
index 000000000000..c927dd8ef21b
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableRowExchange.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEROW_EXCHANGE_HXX
+#define DBAUI_TABLEROW_EXCHANGE_HXX
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <svtools/transfer.hxx>
+#include <boost/shared_ptr.hpp>
+
+namespace dbaui
+{
+ class OTableRow;
+ class OTableRowExchange : public TransferableHelper
+ {
+ ::std::vector< ::boost::shared_ptr<OTableRow> > m_vTableRow;
+ public:
+ OTableRowExchange(const ::std::vector< ::boost::shared_ptr<OTableRow> >& _rvTableRow);
+ protected:
+ virtual void AddSupportedFormats();
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual void ObjectReleased();
+ };
+}
+#endif // DBAUI_TABLEROW_EXCHANGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
new file mode 100644
index 000000000000..3f2bb9bfdd33
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -0,0 +1,211 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEWINDOW_HXX
+#define DBAUI_TABLEWINDOW_HXX
+
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include "TableWindowTitle.hxx"
+#include <tools/rtti.hxx>
+#include <rtl/ref.hxx>
+#include "TableWindowData.hxx"
+#include <vector>
+#include <vcl/window.hxx>
+
+#include <comphelper/containermultiplexer.hxx>
+#include "cppuhelper/basemutex.hxx"
+
+class SvLBoxEntry;
+namespace dbaui
+{
+ //////////////////////////////////////////////////////////////////////////
+ // Flags fuer die Groessenanpassung der SbaJoinTabWins
+ const UINT16 SIZING_NONE = 0x0000;
+ const UINT16 SIZING_TOP = 0x0001;
+ const UINT16 SIZING_BOTTOM = 0x0002;
+ const UINT16 SIZING_LEFT = 0x0004;
+ const UINT16 SIZING_RIGHT = 0x0008;
+
+ class OTableWindowListBox;
+ class OJoinDesignView;
+ class OJoinTableView;
+ class OTableWindowAccess;
+
+ class OTableWindow : public ::cppu::BaseMutex
+ ,public ::comphelper::OContainerListener
+ ,public Window
+ {
+ friend class OTableWindowTitle;
+ friend class OTableWindowListBox;
+ protected:
+ // und die Tabelle selber (brauche ich, da ich sie locken will, solange das Fenster lebt)
+ FixedImage m_aTypeImage;
+ OTableWindowTitle m_aTitle;
+ OTableWindowListBox* m_pListBox;
+ OTableWindowAccess* m_pAccessible;
+
+ private:
+ TTableWindowData::value_type
+ m_pData;
+ ::rtl::Reference< comphelper::OContainerListenerAdapter>
+ m_pContainerListener;
+ sal_Int32 m_nMoveCount; // how often the arrow keys was pressed
+ sal_Int32 m_nMoveIncrement; // how many pixel we should move
+ UINT16 m_nSizingFlags;
+ BOOL m_bActive;
+
+ void Draw3DBorder( const Rectangle& rRect );
+ // OContainerListener
+ virtual void _elementInserted( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void _elementRemoved( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void _elementReplaced( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ protected:
+ virtual void Resize();
+ virtual void Paint( const Rectangle& rRect );
+ virtual void MouseMove( const MouseEvent& rEvt );
+ virtual void MouseButtonDown( const MouseEvent& rEvt );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ virtual OTableWindowListBox* CreateListBox();
+ // wird im ERSTEN Init aufgerufen
+ BOOL FillListBox();
+ // wird in JEDEM Init aufgerufen
+
+ virtual void OnEntryDoubleClicked(SvLBoxEntry* /*pEntry*/) { }
+ // wird aus dem DoubleClickHdl der ListBox heraus aufgerufen
+
+ /** HandleKeyInput triues to handle the KeyEvent. Movement or deletion
+ @param rEvt
+ The KEyEvent
+ @return
+ <TRUE/> when the table could handle the keyevent.
+ */
+ BOOL HandleKeyInput( const KeyEvent& rEvt );
+
+ /** delete the user data with the equal type as created within createUserData
+ @param _pUserData
+ The user data store in the listbox entries. Created with a call to createUserData.
+ _pUserData may be <NULL/>. _pUserData will be set to <NULL/> after call.
+ */
+ virtual void deleteUserData(void*& _pUserData);
+
+ /** creates user information that will be append at the ListBoxentry
+ @param _xColumn
+ The corresponding column, can be <NULL/>.
+ @param _bPrimaryKey
+ <TRUE/> when the column belongs to the primary key
+ @return
+ the user data which will be append at the listbox entry, may be <NULL/>
+ */
+ virtual void* createUserData(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet>& _xColumn,
+ bool _bPrimaryKey);
+
+ /** updates m_aTypeImage
+ */
+ void impl_updateImage();
+
+ OTableWindow( Window* pParent, const TTableWindowData::value_type& pTabWinData );
+
+ public:
+ virtual ~OTableWindow();
+
+ // spaeter Constructor, siehe auch CreateListbox und FillListbox
+ virtual BOOL Init();
+
+ OJoinTableView* getTableView();
+ const OJoinTableView* getTableView() const;
+ OJoinDesignView* getDesignView();
+ void SetPosPixel( const Point& rNewPos );
+ void SetSizePixel( const Size& rNewSize );
+ void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize );
+
+ String getTitle() const;
+ void SetBoldTitle( BOOL bBold );
+ void setActive(sal_Bool _bActive = sal_True);
+
+ void Remove();
+ BOOL IsActiveWindow(){ return m_bActive; }
+
+ ::rtl::OUString GetTableName() const { return m_pData->GetTableName(); }
+ ::rtl::OUString GetWinName() const { return m_pData->GetWinName(); }
+ ::rtl::OUString GetComposedName() const { return m_pData->GetComposedName(); }
+ OTableWindowListBox* GetListBox() const { return m_pListBox; }
+ TTableWindowData::value_type GetData() const { return m_pData; }
+ OTableWindowTitle* GetTitleCtrl() { return &m_aTitle; }
+
+ /** returns the name which should be used when displaying join or relations
+ @return
+ The composed name or the window name.
+ */
+ virtual ::rtl::OUString GetName() const = 0;
+
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetOriginalColumns() const { return m_pData->getColumns(); }
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetTable() const { return m_pData->getTable(); }
+
+ UINT16 GetSizingFlags() const { return m_nSizingFlags; }
+ /** set the sizing flag to the direction
+ @param _rPos
+ The EndPosition after resizing.
+ */
+ void setSizingFlag(const Point& _rPos);
+ /** set the rsizing flag to NONE.
+ */
+ void resetSizingFlag() { m_nSizingFlags = SIZING_NONE; }
+
+ /** returns the new sizing
+ */
+ Rectangle getSizingRect(const Point& _rPos,const Size& _rOutputSize) const;
+
+ // window override
+ virtual void StateChanged( StateChangedType nStateChange );
+ virtual void GetFocus();
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void Command(const CommandEvent& rEvt);
+
+ // Accessibility
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ // habe ich Connections nach aussen ?
+ BOOL ExistsAConn() const;
+
+ void EnumValidFields(::std::vector< ::rtl::OUString>& arrstrFields);
+
+ /** clears the listbox inside. Must be called be the dtor is called.
+ */
+ void clearListBox();
+
+ protected:
+ using Window::SetPosSizePixel;
+ };
+}
+#endif //DBAUI_TABLEWINDOW_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindowAccess.hxx b/dbaccess/source/ui/inc/TableWindowAccess.hxx
new file mode 100644
index 000000000000..a1fd78373b4a
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableWindowAccess.hxx
@@ -0,0 +1,121 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBACCESS_TABLEWINDOWACCESS_HXX
+#define DBACCESS_TABLEWINDOWACCESS_HXX
+
+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+
+namespace dbaui
+{
+ typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleRelationSet,
+ ::com::sun::star::accessibility::XAccessible
+ > OTableWindowAccess_BASE;
+ class OTableWindow;
+ /** the class OTableWindowAccess represents the accessible object for table windows
+ like they are used in the QueryDesign and the RelationDesign
+ */
+ class OTableWindowAccess : public VCLXAccessibleComponent
+ , public OTableWindowAccess_BASE
+ {
+ OTableWindow* m_pTable; // the window which I should give accessibility to
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > getParentChild(sal_Int32 _nIndex);
+ protected:
+ /** this function is called upon disposing the component
+ */
+ virtual void SAL_CALL disposing();
+
+ /** isEditable returns the current editable state
+ @return true if it is editable otherwise false
+ */
+ virtual sal_Bool isEditable() const;
+
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+ public:
+ OTableWindowAccess( OTableWindow* _pTable);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw ()
+ { // here inline is allowed because we do not use this class outside this dll
+ VCLXAccessibleComponent::acquire( );
+ }
+ virtual void SAL_CALL release( ) throw ()
+ { // here inline is allowed because we do not use this class outside this dll
+ VCLXAccessibleComponent::release( );
+ }
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo - static methods
+ static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( com::sun::star::uno::RuntimeException );
+ static ::rtl::OUString getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException );
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleExtendedComponent
+ virtual ::rtl::OUString SAL_CALL getTitledBorderText( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleRelationSet
+ virtual sal_Int32 SAL_CALL getRelationCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::AccessibleRelation SAL_CALL getRelation( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL containsRelation( sal_Int16 aRelationType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::AccessibleRelation SAL_CALL getRelationByType( sal_Int16 aRelationType ) throw (::com::sun::star::uno::RuntimeException);
+
+ void notifyAccessibleEvent(
+ const sal_Int16 _nEventId,
+ const ::com::sun::star::uno::Any& _rOldValue,
+ const ::com::sun::star::uno::Any& _rNewValue
+ )
+ {
+ NotifyAccessibleEvent(_nEventId,_rOldValue,_rNewValue);
+ }
+ };
+}
+#endif // DBACCESS_TABLEWINDOWACCESS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindowData.hxx b/dbaccess/source/ui/inc/TableWindowData.hxx
new file mode 100644
index 000000000000..5aaad03a4f40
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableWindowData.hxx
@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEWINDOWDATA_HXX
+#define DBAUI_TABLEWINDOWDATA_HXX
+
+#include <tools/gen.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <unotools/eventlisteneradapter.hxx>
+#include <boost/shared_ptr.hpp>
+#include <vector>
+
+namespace dbaui
+{
+ class OTableWindowData : public ::utl::OEventListenerAdapter
+ {
+ mutable ::osl::Mutex m_aMutex;
+
+ void listen();
+ protected:
+ // the columns of the table
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTable; // can either be a table or a query
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> m_xKeys;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xColumns;
+
+ ::rtl::OUString m_aTableName;
+ ::rtl::OUString m_aWinName;
+ ::rtl::OUString m_sComposedName;
+ Point m_aPosition;
+ Size m_aSize;
+ sal_Bool m_bShowAll;
+ bool m_bIsQuery;
+ bool m_bIsValid;
+
+ public:
+ explicit OTableWindowData( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable
+ ,const ::rtl::OUString& _rComposedName
+ ,const ::rtl::OUString& strTableName
+ ,const ::rtl::OUString& rWinName = ::rtl::OUString() );
+ virtual ~OTableWindowData();
+
+ /** late constructor
+ *
+ * \param _xConnection
+ * \param _bAllowQueries when true, queries are allowed
+ * \return false if the table was unaccessible otherwise true
+ */
+ bool init(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection
+ ,bool _bAllowQueries);
+
+ inline ::rtl::OUString GetComposedName() const { return m_sComposedName; }
+ inline ::rtl::OUString GetTableName() const { return m_aTableName; }
+ inline ::rtl::OUString GetWinName() const { return m_aWinName; }
+ inline Point GetPosition() const { return m_aPosition; }
+ inline Size GetSize() const { return m_aSize; }
+ inline BOOL IsShowAll() const { return m_bShowAll; }
+ inline bool isQuery() const { return m_bIsQuery; }
+ inline bool isValid() const { return m_bIsValid; } // it is either a table or query but it is known
+ BOOL HasPosition() const;
+ BOOL HasSize() const;
+
+ inline void SetWinName( const ::rtl::OUString& rWinName ) { m_aWinName = rWinName; }
+ inline void SetPosition( const Point& rPos ) { m_aPosition=rPos; }
+ inline void SetSize( const Size& rSize ) { m_aSize = rSize; }
+ inline void ShowAll( BOOL bAll ) { m_bShowAll = bAll; }
+
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getTable() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xTable; }
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> getKeys() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xKeys; }
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getColumns() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xColumns; }
+
+ // OEventListenerAdapter
+ virtual void _disposing( const ::com::sun::star::lang::EventObject& _rSource );
+ };
+
+ typedef ::std::vector< ::boost::shared_ptr<OTableWindowData> > TTableWindowData;
+}
+#endif // DBAUI_TABLEWINDOWDATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx
new file mode 100644
index 000000000000..d5b9c250dd3c
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
+#define DBAUI_TABLEWINDOWLISTBOX_HXX
+
+#include <svtools/svtreebx.hxx>
+#include "callbacks.hxx"
+
+struct AcceptDropEvent;
+struct ExecuteDropEvent;
+namespace dbaui
+{
+ class OTableWindowListBox;
+ struct OJoinExchangeData
+ {
+ public:
+ OTableWindowListBox* pListBox; // die ListBox innerhalb desselben (daraus kann man sich das TabWin und daraus den WinName besorgen)
+ SvLBoxEntry* pEntry; // der Eintrag, der gedraggt oder auf den gedroppt wurde
+
+ OJoinExchangeData(OTableWindowListBox* pBox);
+ OJoinExchangeData() : pListBox(NULL), pEntry(NULL) { }
+ };
+ struct OJoinDropData
+ {
+ OJoinExchangeData aSource;
+ OJoinExchangeData aDest;
+ };
+
+ class OTableWindow;
+ class OTableWindowListBox
+ :public SvTreeListBox
+ ,public IDragTransferableListener
+ {
+ DECL_LINK( OnDoubleClick, SvTreeListBox* );
+ DECL_LINK( ScrollUpHdl, SvTreeListBox* );
+ DECL_LINK( ScrollDownHdl, SvTreeListBox* );
+ DECL_LINK( DropHdl, void* );
+ DECL_LINK( LookForUiHdl, void* );
+
+ Timer m_aScrollTimer;
+ Point m_aMousePos;
+
+ OTableWindow* m_pTabWin;
+ ULONG m_nDropEvent;
+ ULONG m_nUiEvent;
+ OJoinDropData m_aDropInfo;
+
+ BOOL m_bReallyScrolled : 1;
+ BOOL m_bDragSource : 1;
+
+ protected:
+ virtual void LoseFocus();
+ virtual void GetFocus();
+ virtual void NotifyScrolled();
+ virtual void NotifyEndScroll();
+
+ virtual long PreNotify(NotifyEvent& rNEvt);
+
+ virtual void dragFinished( );
+
+
+
+ public:
+ OTableWindowListBox(OTableWindow* pParent);
+ virtual ~OTableWindowListBox();
+
+ // DnD stuff
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+
+ // window
+ virtual void Command(const CommandEvent& rEvt);
+
+ OTableWindow* GetTabWin(){ return m_pTabWin; }
+ SvLBoxEntry* GetEntryFromText( const String& rEntryText );
+
+ private:
+ using SvTreeListBox::ExecuteDrop;
+ };
+}
+#endif // DBAUI_TABLEWINDOWLISTBOX_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TableWindowTitle.hxx b/dbaccess/source/ui/inc/TableWindowTitle.hxx
new file mode 100644
index 000000000000..a07e8fda099c
--- /dev/null
+++ b/dbaccess/source/ui/inc/TableWindowTitle.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEWINDOWTITLE_HXX
+#define DBAUI_TABLEWINDOWTITLE_HXX
+
+#include <vcl/fixed.hxx>
+
+namespace dbaui
+{
+ class OTableWindow;
+ class OTableWindowTitle : public FixedText
+ {
+ OTableWindow* m_pTabWin;
+
+ protected:
+ virtual void Command(const CommandEvent& rEvt);
+ // virtual void Paint( const Rectangle& rRect );
+ virtual void MouseButtonDown( const MouseEvent& rEvt );
+ virtual void KeyInput( const KeyEvent& rEvt );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ public:
+ OTableWindowTitle( OTableWindow* pParent );
+ virtual ~OTableWindowTitle();
+ virtual void LoseFocus();
+ virtual void GetFocus();
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ // window override
+ virtual void StateChanged( StateChangedType nStateChange );
+ };
+}
+#endif // DBAUI_TABLEWINDOWTITLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TablesSingleDlg.hxx b/dbaccess/source/ui/inc/TablesSingleDlg.hxx
new file mode 100644
index 000000000000..b861d4e11b07
--- /dev/null
+++ b/dbaccess/source/ui/inc/TablesSingleDlg.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_TABLESSINGLEDLG_HXX_
+#define _DBAUI_TABLESSINGLEDLG_HXX_
+
+#include <sfx2/basedlgs.hxx>
+#include "IItemSetHelper.hxx"
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+#include <memory>
+
+FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
+FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+class ODbDataSourceAdministrationHelper;
+ //========================================================================
+ //= OTableSubscriptionDialog
+ //========================================================================
+ class OTableSubscriptionDialog : public SfxSingleTabDialog, public IItemSetHelper
+ {
+ ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
+ sal_Bool m_bStopExecution; // set when the dialog should not be executed
+
+ DECL_LINK( OKClickHdl, OKButton* );
+ SfxItemSet* m_pOutSet;
+ public:
+
+ OTableSubscriptionDialog(Window* pParent
+ ,SfxItemSet* _pItems
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ ,const ::com::sun::star::uno::Any& _aDataSourceName
+ );
+ virtual ~OTableSubscriptionDialog();
+
+ // forwards from ODbDataSourceAdministrationHelper
+ void successfullyConnected();
+ sal_Bool getCurrentSettings(::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rDriverParams);
+ void clearPassword();
+ String getConnectionURL() const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getCurrentDataSource();
+ inline void endExecution() { m_bStopExecution = sal_True; }
+
+ virtual const SfxItemSet* getOutputSet() const;
+ virtual SfxItemSet* getWriteOutputSet();
+
+ virtual short Execute();
+ };
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_TABLESSINGLEDLG_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx
new file mode 100644
index 000000000000..43952c95fc0d
--- /dev/null
+++ b/dbaccess/source/ui/inc/TokenWriter.hxx
@@ -0,0 +1,259 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TOKENWRITER_HXX
+#define DBAUI_TOKENWRITER_HXX
+
+#include "DExport.hxx"
+#include "moduledbu.hxx"
+#include "commontypes.hxx"
+
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
+#include <com/sun/star/sdbc/XRow.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/sdb/CommandType.hpp>
+#include <com/sun/star/sdbcx/XRowLocate.hpp>
+
+#include <cppuhelper/implbase1.hxx>
+#include <tools/stream.hxx>
+#include <svx/dataaccessdescriptor.hxx>
+
+#include <memory>
+
+namespace com { namespace sun { namespace star {
+ namespace sdbc{
+ class XRowUpdate;
+ }
+}}}
+
+namespace dbaui
+{
+ // =========================================================================
+ // ODatabaseImportExport Basisklasse f"ur Import/Export
+ // =========================================================================
+ class ODatabaseExport;
+ typedef ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener> ODatabaseImportExport_BASE;
+ class ODatabaseImportExport : public ODatabaseImportExport_BASE
+ {
+ private:
+ void impl_initializeRowMember_throw();
+
+ protected:
+ ::com::sun::star::lang::Locale m_aLocale;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> m_aSelection;
+ sal_Bool m_bBookmarkSelection;
+ SvStream* m_pStream;
+ ::com::sun::star::awt::FontDescriptor m_aFont;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xObject; // table/query
+ SharedConnection m_xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > m_xResultSet;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow > m_xRow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate > m_xRowLocate;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xResultSetMetaData;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xRowSetColumns;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xFactory;
+
+ ::rtl::OUString m_sName;
+ //dyf add 20070601
+ //for transfor the tablename
+ ::rtl::OUString m_sDefaultTableName;
+ //dyf add end
+ ::rtl::OUString m_sDataSourceName;
+ sal_Int32 m_nCommandType;
+ bool m_bNeedToReInitialize;
+
+#if defined UNX
+ static const char __FAR_DATA sNewLine;
+#else
+ static const char __FAR_DATA sNewLine[];
+#endif
+
+ ODatabaseExport* m_pReader;
+ sal_Int32* m_pRowMarker; // wenn gesetzt, dann nur diese Rows kopieren
+ rtl_TextEncoding m_eDestEnc;
+ sal_Bool m_bInInitialize;
+ sal_Bool m_bCheckOnly;
+
+ // export data
+ ODatabaseImportExport( const ::svx::ODataAccessDescriptor& _aDataDescriptor,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const String& rExchange = String());
+
+ // import data
+ ODatabaseImportExport( const SharedConnection& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
+
+ virtual ~ODatabaseImportExport();
+
+ virtual void initialize();
+ public:
+ void setStream(SvStream* _pStream){ m_pStream = _pStream; }
+
+ //dyf add 20070601
+ //for set the tablename
+ void setSTableName(const ::rtl::OUString &_sTableName){ m_sDefaultTableName = _sTableName; }
+ //dyf add end
+
+ virtual BOOL Write(); // Export
+ virtual BOOL Read(); // Import
+
+ void initialize(const ::svx::ODataAccessDescriptor& _aDataDescriptor);
+ void dispose();
+
+ void enableCheckOnly() { m_bCheckOnly = sal_True; }
+ sal_Bool isCheckEnabled() const { return m_bCheckOnly; }
+
+
+ private:
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+ void impl_initFromDescriptor( const ::svx::ODataAccessDescriptor& _aDataDescriptor, bool _bPlusDefaultInit );
+ };
+
+ // =========================================================================
+ // RTF Im- und Export
+ // =========================================================================
+
+ class ORTFImportExport : public ODatabaseImportExport
+ {
+ void appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCount,sal_Int32& k,sal_Int32& kk);
+ public:
+ // export data
+ ORTFImportExport( const ::svx::ODataAccessDescriptor& _aDataDescriptor,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const String& rExchange = String())
+ : ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF,rExchange) {};
+
+ // import data
+ ORTFImportExport( const SharedConnection& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM)
+ : ODatabaseImportExport(_rxConnection,_rxNumberF,_rM)
+ {}
+
+ virtual BOOL Write();
+ virtual BOOL Read();
+ };
+ // =========================================================================
+ // HTML Im- und Export
+ // =========================================================================
+ #define SBA_HTML_FONTSIZES 7
+ const sal_Int16 nIndentMax = 23;
+ class OHTMLImportExport : public ODatabaseImportExport
+ {
+ // default HtmlFontSz[1-7]
+ static const sal_Int16 nDefaultFontSize[SBA_HTML_FONTSIZES];
+ // HtmlFontSz[1-7] in s*3.ini [user]
+ static sal_Int16 nFontSize[SBA_HTML_FONTSIZES];
+ static const sal_Int16 nCellSpacing;
+ static const char __FAR_DATA sIndentSource[];
+ char sIndent[nIndentMax+1];
+ sal_Int16 m_nIndent;
+ #ifdef DBG_UTIL
+ BOOL m_bCheckFont;
+ #endif
+
+ void WriteHeader();
+ void WriteBody();
+ void WriteTables();
+ void WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_Int32 nHeightPixel,const char* pChar,const String& rValue,const char* pHtmlTag);
+ void IncIndent( sal_Int16 nVal );
+ const char* GetIndentStr() { return sIndent; }
+ void FontOn();
+ inline void FontOff();
+
+ public:
+ // export data
+ OHTMLImportExport( const ::svx::ODataAccessDescriptor& _aDataDescriptor,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const String& rExchange = String());
+ // import data
+ OHTMLImportExport( const SharedConnection& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM)
+ : ODatabaseImportExport(_rxConnection,_rxNumberF,_rM)
+ {}
+
+ virtual BOOL Write();
+ virtual BOOL Read();
+
+ };
+ // =========================================================================
+ // normal RowSet Im- und Export
+ // =========================================================================
+
+ class ORowSetImportExport : public ODatabaseImportExport
+ {
+ OModuleClient m_aModuleClient;
+ ::std::vector<sal_Int32> m_aColumnMapping;
+ ::std::vector<sal_Int32> m_aColumnTypes;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > m_xTargetResultSetUpdate; //
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > m_xTargetRowUpdate; //
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xTargetResultSetMetaData; //
+ Window* m_pParent;
+ sal_Bool m_bAlreadyAsked;
+
+ sal_Bool insertNewRow();
+ protected:
+ virtual void initialize();
+
+ public:
+ // export data
+ ORowSetImportExport(Window* _pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate >& _xResultSetUpdate,
+ const ::svx::ODataAccessDescriptor& _aDataDescriptor,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM,
+ const String& rExchange = String());
+
+ // import data
+ ORowSetImportExport(const SharedConnection& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM)
+ : ODatabaseImportExport(_rxConnection,NULL,_rM)
+ {}
+
+ virtual BOOL Write();
+ virtual BOOL Read();
+
+ private:
+ using ODatabaseImportExport::initialize;
+ };
+
+}
+#endif // DBAUI_TOKENWRITER_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/TypeInfo.hxx b/dbaccess/source/ui/inc/TypeInfo.hxx
new file mode 100644
index 000000000000..73ffcbde5c50
--- /dev/null
+++ b/dbaccess/source/ui/inc/TypeInfo.hxx
@@ -0,0 +1,146 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TYPEINFO_HXX
+#define DBAUI_TYPEINFO_HXX
+
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/sdbc/DataType.hpp>
+#include <com/sun/star/sdbc/ColumnSearch.hpp>
+#include <com/sun/star/sdbc/ColumnValue.hpp>
+#include <boost/shared_ptr.hpp>
+#include <map>
+
+
+
+namespace dbaui
+{
+//========================================================================
+// Anhand dieser Ids werden die sprachabhaengigen ::rtl::OUString aus der Resource geholt
+const sal_uInt16 TYPE_UNKNOWN = 0;
+const sal_uInt16 TYPE_TEXT = 1;
+const sal_uInt16 TYPE_NUMERIC = 2;
+const sal_uInt16 TYPE_DATETIME = 3;
+const sal_uInt16 TYPE_DATE = 4;
+const sal_uInt16 TYPE_TIME = 5;
+const sal_uInt16 TYPE_BOOL = 6;
+const sal_uInt16 TYPE_CURRENCY = 7;
+const sal_uInt16 TYPE_MEMO = 8;
+const sal_uInt16 TYPE_COUNTER = 9;
+const sal_uInt16 TYPE_IMAGE = 10;
+const sal_uInt16 TYPE_CHAR = 11;
+const sal_uInt16 TYPE_DECIMAL = 12;
+const sal_uInt16 TYPE_BINARY = 13;
+const sal_uInt16 TYPE_VARBINARY = 14;
+const sal_uInt16 TYPE_BIGINT = 15;
+const sal_uInt16 TYPE_DOUBLE = 16;
+const sal_uInt16 TYPE_FLOAT = 17;
+const sal_uInt16 TYPE_REAL = 18;
+const sal_uInt16 TYPE_INTEGER = 19;
+const sal_uInt16 TYPE_SMALLINT = 20;
+const sal_uInt16 TYPE_TINYINT = 21;
+const sal_uInt16 TYPE_SQLNULL = 22;
+const sal_uInt16 TYPE_OBJECT = 23;
+const sal_uInt16 TYPE_DISTINCT = 24;
+const sal_uInt16 TYPE_STRUCT = 25;
+const sal_uInt16 TYPE_ARRAY = 26;
+const sal_uInt16 TYPE_BLOB = 27;
+const sal_uInt16 TYPE_CLOB = 28;
+const sal_uInt16 TYPE_REF = 29;
+const sal_uInt16 TYPE_OTHER = 30;
+const sal_uInt16 TYPE_BIT = 31;
+
+ class OTypeInfo
+ {
+ public:
+ ::rtl::OUString aUIName; // the name which is the user see (a combination of resource text and aTypeName)
+ ::rtl::OUString aTypeName; // Name des Types in der Datenbank
+ ::rtl::OUString aLiteralPrefix; // Prefix zum Quoten
+ ::rtl::OUString aLiteralSuffix; // Suffix zum Quoten
+ ::rtl::OUString aCreateParams; // Parameter zum Erstellen
+ ::rtl::OUString aLocalTypeName;
+
+ sal_Int32 nPrecision; // Laenge des Types
+ sal_Int32 nType; // Datenbanktyp
+
+ sal_Int16 nMaximumScale; // Nachkommastellen
+ sal_Int16 nMinimumScale; // Min Nachkommastellen
+
+ sal_Int16 nSearchType; // kann nach dem Typen gesucht werden
+
+
+ sal_Bool bCurrency : 1, // Waehrung
+ bAutoIncrement : 1, // Ist es ein automatisch incrementierendes Feld
+ bNullable : 1, // Kann das Feld NULL annehmen
+ bCaseSensitive : 1, // Ist der Type Casesensitive
+ bUnsigned : 1; // Ist der Type Unsigned
+
+ OTypeInfo()
+ :nPrecision(0)
+ ,nType(::com::sun::star::sdbc::DataType::OTHER)
+ ,nMaximumScale(0)
+ ,nMinimumScale(0)
+ ,nSearchType(::com::sun::star::sdbc::ColumnSearch::FULL)
+ ,bCurrency(sal_False)
+ ,bAutoIncrement(sal_False)
+ ,bNullable(sal_True)
+ ,bCaseSensitive(sal_False)
+ ,bUnsigned(sal_False)
+ {}
+ sal_Bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; }
+ sal_Bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; }
+ inline ::rtl::OUString getDBName() const { return aTypeName; }
+
+ };
+
+ typedef ::boost::shared_ptr<OTypeInfo> TOTypeInfoSP;
+ typedef ::std::multimap<sal_Int32,TOTypeInfoSP> OTypeInfoMap;
+ /** return the most suitable typeinfo for a requested type
+ @param _rTypeInfo contains a map of type to typeinfo
+ @param _nType the requested type
+ @param _sTypeName the typename
+ @param _sCreateParams the create params
+ @param _nPrecision the precision
+ @param _nScale the scale
+ @param _bAutoIncrement if it is a auto increment
+ @param _brForceToType true when type was found which has some differenes
+ */
+ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
+ sal_Int32 _nType,
+ const ::rtl::OUString& _sTypeName,
+ const ::rtl::OUString& _sCreateParams,
+ sal_Int32 _nPrecision,
+ sal_Int32 _nScale,
+ sal_Bool _bAutoIncrement,
+ sal_Bool& _brForceToType);
+}
+
+#endif // DBAUI_TYPEINFO_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
new file mode 100644
index 000000000000..6ecab0555549
--- /dev/null
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -0,0 +1,464 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TOOLS_HXX
+#define DBAUI_TOOLS_HXX
+
+#include <connectivity/dbexception.hxx>
+#include <comphelper/stl_types.hxx>
+#include "TypeInfo.hxx"
+#include <editeng/svxenum.hxx>
+#include <vcl/taskpanelist.hxx>
+#include <connectivity/dbtools.hxx>
+
+#define RET_ALL 10
+
+// we only need forward decl here
+namespace com { namespace sun { namespace star {
+
+ namespace beans { class XPropertySet;}
+ namespace container
+ {
+ class XNameAccess;
+ class XIndexAccess;
+ class XHierarchicalNameContainer;
+ class XNameContainer;
+ }
+ namespace lang
+ {
+ class XEventListener;
+ class XMultiServiceFactory;
+ }
+ namespace awt
+ {
+ struct FontDescriptor;
+ }
+ namespace sdbc
+ {
+ class XDatabaseMetaData;
+ class XConnection;
+ }
+ namespace util
+ {
+ struct URL;
+ class XNumberFormatter;
+ }
+ namespace frame
+ {
+ class XModel;
+ }
+ namespace ucb { class XContent; }
+
+}}}
+
+namespace svt
+{
+ class EditBrowseBox;
+}
+
+class Window;
+class ToolBox;
+class Font;
+class SvNumberFormatter;
+class SfxFilter;
+class SvLBoxEntry;
+
+// .........................................................................
+namespace dbaui
+{
+// .........................................................................
+ //class ODsnTypeCollection;
+ class DBTreeListBox;
+
+ /** creates a new connection and appends the eventlistener
+ @param _rsDataSourceName name of the datasource
+ @param _xDatabaseContext the database context
+ @param _rMF the multi service factory
+ @param _rEvtLst the eventlistener which will be added to the new created connection
+ @param _rOUTConnection this parameter will be filled with the new created connection
+ @return SQLExceptionInfo contains a SQLException, SQLContext or a SQLWarning when they araised else .isValid() will return false
+ */
+ ::dbtools::SQLExceptionInfo createConnection(
+ const ::rtl::OUString& _rsDataSourceName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xDatabaseContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rMF,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rOUTConnection );
+ /** creates a new connection and appends the eventlistener
+ @param _xDataSource the datasource
+ @param _rMF the multi service factory
+ @param _rEvtLst the eventlistener which will be added to the new created connection
+ @param _rOUTConnection this parameter will be filled with the new created connection
+ @return SQLExceptionInfo contains a SQLException, SQLContext or a SQLWarning when they araised else .isValid() will return false
+ */
+ ::dbtools::SQLExceptionInfo createConnection(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xDataSource,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rMF,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rOUTConnection );
+
+ /** creates a error dialog which displays the SQLExceptionInfo. Also it supports a "more" button where detailed information are available
+ @param _rInfo the error which should be shown, if the info is not valid no error dialog will appear
+ @param _pParent the parent of the error dialog
+ @param _xFactory need to create the dialog
+ */
+ void showError( const ::dbtools::SQLExceptionInfo& _rInfo,
+ Window* _pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xFactory);
+
+ /** return a vector which contains all key columns for the @see com::sun::star::sdbc::KeyType _nKeyType
+ @param _rxTable the table which must be a @see com::sun::star::sdbcx::XColumnsSupplier
+ @param _nKeyType @see com::sun::star::sdbc::KeyType
+ */
+
+ ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> >
+ getKeyColumns( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxKeys,
+ sal_Int32 _nKeyType);
+
+ /** fills a map and a vector with localized type names
+ @param _rxConnection the connection to acces the metadata
+ @param _rsTypeNames a list of localized type names seperated with ';'
+ @param _rTypeInfoMap the filled map with the type names
+ @param _rTypeInfoIters the vector filled with map iterators
+ */
+ void fillTypeInfo( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection,
+ const String& _rsTypeNames,
+ OTypeInfoMap& _rTypeInfoMap,
+ ::std::vector<OTypeInfoMap::iterator>& _rTypeInfoIters);
+
+ /** fill a column with data of a field description
+ @param _rxColumn the column which should be filled
+ @param _pFieldDesc the source of the data
+ */
+ class OFieldDescription;
+ void setColumnProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn,
+ const OFieldDescription* _pFieldDesc);
+
+ ::rtl::OUString createDefaultName( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xTables,
+ const ::rtl::OUString& _sName);
+
+ /** checks if the given name exists in the database context
+ */
+ sal_Bool checkDataSourceAvailable( const ::rtl::OUString& _sDataSourceName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xFactory_xORB);
+
+ /** maps SvxCellHorJustify to com::sun::star::awt::TextAlign
+ @param SvxCellHorJustify& _eAlignment
+ @return the corresponding com::sun::star::awt::TextAlign
+ */
+ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment);
+
+ /** retrieves a data source given by name or URL, and displays an error if this fails
+
+ Any <type scope="com::sun::star::sdbc">SQLException</type>s which occur will be displayed.
+ Additionally, and Exceptions which indicate a data source name pointing to a non-existent database
+ URL will also be denoted. Yet more additionally, and other exceptions will be forwarded to
+ a <type scope="com::sun::star::sdb">InteractionHandler</type>.
+
+ @param _rDataSourceName
+ the URL of the database document, or the name of a registered data source
+ @param _pErrorMessageParent
+ the window to use as parent for error messages
+ @param _rxORB
+ a service factory to use for components to be created
+ @param _pErrorInfo
+ takes the error info in case of failure. If <NULL/>, the error is displayed to the user.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource >
+ getDataSourceByName(
+ const ::rtl::OUString& _rDataSourceName,
+ Window* _pErrorMessageParent,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB,
+ ::dbtools::SQLExceptionInfo* _pErrorInfo
+ );
+
+ /** returns either the model when data source is given as parameter,
+ or returns a data source when a model is given.
+ @param _xObject Either a data source or a model.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDataSourceOrModel(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xObject);
+
+ /** maps com::sun::star::awt::TextAlign to SvxCellHorJustify
+ @param com::sun::star::awt::TextAlign& _nAlignment
+ @return the corresponding SvxCellHorJustify
+ */
+ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment);
+
+ /** convert Font to ::com::sun::star::awt::FontDescriptor
+ @param _rFont Font to be converted
+ @return the new FontDescriptor
+ */
+ ::com::sun::star::awt::FontDescriptor CreateFontDescriptor( const Font& _rFont );
+
+ /** call teh format dialog and set the selected format at the column
+ @param _xAffectedCol Font to be converted
+ @param _xField Font to be converted
+ */
+ void callColumnFormatDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xAffectedCol,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xField,
+ SvNumberFormatter* _pFormatter,
+ Window* _pParent);
+
+ /** second variant of the function before
+ */
+ sal_Bool callColumnFormatDialog(Window* _pParent,
+ SvNumberFormatter* _pFormatter,
+ sal_Int32 _nDataType,
+ sal_Int32& _nFormatKey,
+ SvxCellHorJustify& _eJustify,
+ sal_uInt16& _nFlags,
+ sal_Bool _bHasFormat);
+ /** append a name to tablefilter of a datasource
+ @param _xConnection the connection is need to get the datasource
+ @param _sName the name which should be appended
+ @param _xFactory needed to check if datasource is available
+ @param _pParent needed when an error must be shown
+ @return false when datsource is not available otherwise true
+ */
+ sal_Bool appendToFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
+ const ::rtl::OUString& _sName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xFactory,
+ Window* _pParent);
+
+ /** notifySystemWindow adds or remove the given window _pToRegister at the Systemwindow found when search _pWindow.
+ @param _pWindow
+ The window which is used to search for the SystemWindow.
+ @param _pToRegister
+ The window which should be added or removed on the TaskPaneList.
+ @param _rMemFunc
+ The member function which should be called at the SystemWindow when found.
+ Possible values are:
+ ::comphelper::mem_fun(&TaskPaneList::AddWindow)
+ ::comphelper::mem_fun(&TaskPaneList::RemoveWindow)
+ */
+ void notifySystemWindow(Window* _pWindow,
+ Window* _pToRegister,
+ ::comphelper::mem_fun1_t<TaskPaneList,Window*> _rMemFunc);
+
+ /** adjustToolBoxSize checks if the size of the ToolBox is still valid. If not it will be resized.
+ @param _pToolBox
+ The Toolbox which should be resized.
+ */
+ void adjustToolBoxSize(ToolBox* _pToolBox);
+
+ /** isHiContrast check if we are in hi contrast mode.
+ @param _pWindow
+ The window we have to check on.
+ @return
+ <TRUE/> if so, otherwise <FALSE/>
+ */
+ sal_Bool isHiContrast(Window* _pWindow);
+
+ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId );
+
+ /** check if SQL92 name checking is enabled
+ @param _xConnection
+ Used to get the datasource as parent from the connection.
+ @return
+ <TRUE/> if so otherwise <FALSE/>
+ */
+ sal_Bool isSQL92CheckEnabled(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection);
+
+ /** check if the alias name of the table should be added at select statements
+ @param _xConnection
+ Used to get the datasource as parent from the connection.
+ @return
+ <TRUE/> if so otherwise <FALSE/>
+ */
+ sal_Bool isAppendTableAliasEnabled(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection);
+
+ /** determines whether when generating SQL statements, AS should be placed before a table alias
+ */
+ sal_Bool generateAsBeforeTableAlias( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection );
+
+ /** fills the bool and string value with information out of the datasource info property
+ @param _xDatasource
+ Asked for the properties.
+ @param _rAutoIncrementValueEnabled
+ <OUT/> Set to TRUE when the property was set in the datasource.
+ @param _rsAutoIncrementValue
+ <OUT/> Set to the value when the property was set in the datasource.
+ */
+ void fillAutoIncrementValue(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDatasource
+ ,sal_Bool& _rAutoIncrementValueEnabled
+ ,::rtl::OUString& _rsAutoIncrementValue);
+
+ /** fills the bool and string value with information out of the datasource info property
+ @param _xConnection
+ Used to get the datasource as parent from the connection.
+ @param _rAutoIncrementValueEnabled
+ <OUT/> Set to TRUE when the property was set in the datasource.
+ @param _rsAutoIncrementValue
+ <OUT/> Set to the value when the property was set in the datasource.
+ */
+ void fillAutoIncrementValue(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection
+ ,sal_Bool& _rAutoIncrementValueEnabled
+ ,::rtl::OUString& _rsAutoIncrementValue);
+
+ /** creates the URL or the help agent
+ @param _sModuleName
+ @param _nHelpId
+ @return
+ The URL for the help agent to dispatch.
+ */
+ ::com::sun::star::util::URL createHelpAgentURL(const ::rtl::OUString& _sModuleName,const sal_Int32 _nHelpId);
+
+ /** set the evaluation flag at the number formatter
+ @param _rxFormatter
+ */
+ void setEvalDateFormatForFormatter(::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter);
+
+ /** query for a type info which can be used to create a primary key column
+ @param _rTypeInfo
+ The map which contains all available types.
+ @return
+ The type info which can be used to create a primary key column.
+ */
+ TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap& _rTypeInfo);
+
+ /** query for a specific type.
+ @param _nDataType
+ The type we are searching.
+ @param _rTypeInfo
+ The map which contains all available types.
+ @return
+ The type or <NULL/> if we can't find it.
+ */
+ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rTypeInfo);
+
+ /** returns the configuration node name of user defined drivers.
+ @return
+ the configuration node name of user defined drivers.
+ */
+
+ /** returns the result of the user action when view the query dialog.
+ @param _pParent
+ The parent of the dialog
+ @param _nTitle
+ A string resource id for the text which will be displayed as title.
+ @param _nText
+ A string resource id for the text which will be displayed above the buttons.
+ When the string contains a #1. This will be replaced by the name.
+ @param _bAll
+ When set to <TRUE/>, the all button will be appended.
+ @param _sName
+ The name of the object to ask for.
+ @return
+ RET_YES, RET_NO, RET_ALL
+ */
+ sal_Int32 askForUserAction(Window* _pParent,USHORT _nTitle,USHORT _nText,sal_Bool _bAll,const ::rtl::OUString& _sName);
+
+ /** creates a new view from a query or table
+ @param _sName
+ The name of the view to be created.
+ @param _xConnection
+ The source connection.
+ @param _xSourceObject
+ The object for which a view should be created.
+ @return
+ The created view.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> createView( const ::rtl::OUString& _sName
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xSourceObject);
+
+ /** creates a view with the given command
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> createView(
+ const ::rtl::OUString& _rName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,
+ const ::rtl::OUString& _rCommand
+ );
+
+ /** returns the stripped database name.
+ @param _xDataSource
+ The data source
+ @param _rsDatabaseName
+ Will be filled with the original data source if it is empty.
+ @return
+ The stripped database name either the registered naem or if it is a file url the last segment.
+ */
+ ::rtl::OUString getStrippedDatabaseName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDataSource
+ ,::rtl::OUString& _rsDatabaseName);
+
+ /** returns the standard database filter
+ @retrun
+ the filter
+ */
+ const SfxFilter* getStandardDatabaseFilter();
+
+ /** opens a save dialog to store a form or report folder in the current hierachy.
+ @param _pParent
+ The parent of the dialog.
+ @param _rxORB
+ a multi service factory which can be used to instantiate usual global services
+ @param _xNames
+ Where to insert the new object.
+ @param _sParentFolder
+ The name of the parent folder.
+ @param _bForm
+ <TRUE/> if a form should be inserted
+ @param _bCollection
+ A folder should be inserted
+ @param _xContent
+ The content which should be copied.
+ @param _bMove
+ if <TRUE/> the name of the content must be inserted without any change, otherwise not.
+ @return
+ <TRUE/> if the insert opertions was successfull, otherwise <FALSE/>.
+ */
+ sal_Bool insertHierachyElement(
+ Window* _pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XHierarchicalNameContainer>& _xNames,
+ const String& _sParentFolder,
+ sal_Bool _bForm,
+ sal_Bool _bCollection = sal_True,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent = NULL,
+ sal_Bool _bMove = sal_False
+ );
+
+ /** creates a number formatter
+ @param _rxConnection
+ The connection is needed to create the formatter
+ @param _rMF
+ The multi service factory
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > getNumberFormatter(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rMF );
+
+ // this completes a help url with the system parameters "Language" and "System"
+ // detect installed locale
+ void AppendConfigToken( ::rtl::OUString& _rURL, sal_Bool _bQuestionMark );
+
+// .........................................................................
+}
+// .........................................................................
+#endif // DBAUI_TOOLS_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/UserAdminDlg.hxx b/dbaccess/source/ui/inc/UserAdminDlg.hxx
new file mode 100644
index 000000000000..96df23c0ae71
--- /dev/null
+++ b/dbaccess/source/ui/inc/UserAdminDlg.hxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_USERADMINDLG_HXX
+#define DBAUI_USERADMINDLG_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include "dsntypes.hxx"
+#include "IItemSetHelper.hxx"
+#include <comphelper/uno3.hxx>
+#include "moduledbu.hxx"
+#include <memory>
+
+FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
+FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+ class ODbDataSourceAdministrationHelper;
+ //=========================================================================
+ //= OUserAdminDlg
+ //=========================================================================
+
+ /** implements the user adin dialog
+ */
+ class OUserAdminDlg : public SfxTabDialog, public IItemSetHelper, public IDatabaseSettingsDialog,public dbaui::OModuleClient
+ {
+ OModuleClient m_aModuleClient;
+ ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
+ SfxItemSet* m_pItemSet;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
+ sal_Bool m_bOwnConnection;
+ protected:
+ virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage);
+ public:
+ OUserAdminDlg( Window* _pParent
+ ,SfxItemSet* _pItems
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ ,const ::com::sun::star::uno::Any& _aDataSourceName
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection);
+
+ virtual ~OUserAdminDlg();
+
+ virtual const SfxItemSet* getOutputSet() const;
+ virtual SfxItemSet* getWriteOutputSet();
+
+ virtual short Execute();
+
+ // forwards to ODbDataSourceAdministrationHelper
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const;
+ virtual ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >,sal_Bool> createConnection();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver();
+ virtual ::rtl::OUString getDatasourceType(const SfxItemSet& _rSet) const;
+ virtual void clearPassword();
+ virtual sal_Bool saveDatasource();
+ virtual void setTitle(const ::rtl::OUString& _sTitle);
+ virtual void enableConfirmSettings( bool _bEnable );
+ };
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // DBAUI_USERADMINDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/VertSplitView.hxx b/dbaccess/source/ui/inc/VertSplitView.hxx
new file mode 100644
index 000000000000..3d484f6c9ec4
--- /dev/null
+++ b/dbaccess/source/ui/inc/VertSplitView.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_VERTSPLITVIEW_HXX
+#define DBAUI_VERTSPLITVIEW_HXX
+
+#include <vcl/split.hxx>
+
+namespace dbaui
+{
+ //==================================================================
+ class OSplitterView : public Window
+ {
+ Splitter* m_pSplitter;
+ Window* m_pLeft;
+ Window* m_pRight;
+ sal_Bool m_bVertical;
+
+ void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ DECL_LINK( SplitHdl, Splitter* );
+ protected:
+ virtual void DataChanged(const DataChangedEvent& rDCEvt);
+ public:
+ OSplitterView(Window* _pParent,sal_Bool _bVertical = sal_True);
+ virtual ~OSplitterView();
+ // window overloads
+ virtual void GetFocus();
+
+ void setSplitter(Splitter* _pSplitter);
+ void set(Window* _pRight,Window* _pLeft = NULL);
+ virtual void Resize();
+ };
+}
+#endif // DBAUI_VERTSPLITVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx
new file mode 100644
index 000000000000..c683e6b324d9
--- /dev/null
+++ b/dbaccess/source/ui/inc/WCPage.hxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_WIZARD_CPAGE_HXX
+#define DBAUI_WIZARD_CPAGE_HXX
+
+#include "WTabPage.hxx"
+
+#include "QEnumTypes.hxx"
+#include <vcl/fixed.hxx>
+#include <vcl/group.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/button.hxx>
+
+namespace dbaui
+{
+ class OWizColumnSelect;
+ class OWizNormalExtend;
+ //========================================================================
+ class OCopyTable : public OWizardPage
+ {
+ protected:
+ FixedText m_ftTableName;
+ Edit m_edTableName;
+ FixedLine m_aFL_Options;
+ RadioButton m_aRB_DefData;
+ RadioButton m_aRB_Def;
+ RadioButton m_aRB_View;
+ RadioButton m_aRB_AppendData;
+ CheckBox m_aCB_UseHeaderLine;
+ CheckBox m_aCB_PrimaryColumn;
+ FixedText m_aFT_KeyName;
+ Edit m_edKeyName;
+ sal_Int16 m_nOldOperation;
+
+ OWizColumnSelect* m_pPage2;
+ OWizNormalExtend* m_pPage3;
+
+ BOOL m_bPKeyAllowed;
+ BOOL m_bUseHeaderAllowed;
+
+
+ DECL_LINK( AppendDataClickHdl, Button* );
+ DECL_LINK( RadioChangeHdl, Button* );
+ DECL_LINK( KeyClickHdl, Button* );
+
+ sal_Bool checkAppendData();
+ //--------dyf add
+ void SetAppendDataRadio();
+ //--------add end
+
+ public:
+ virtual void Reset();
+ virtual void ActivatePage();
+ virtual BOOL LeavePage();
+ virtual String GetTitle() const ;
+
+ OCopyTable( Window * pParent );
+ virtual ~OCopyTable();
+
+ inline BOOL IsOptionDefData() const { return m_aRB_DefData.IsChecked(); }
+ inline BOOL IsOptionDef() const { return m_aRB_Def.IsChecked(); }
+ inline BOOL IsOptionAppendData() const { return m_aRB_AppendData.IsChecked(); }
+ inline BOOL IsOptionView() const { return m_aRB_View.IsChecked(); }
+ inline BOOL UseHeaderLine() const { return m_aCB_UseHeaderLine.IsChecked(); }
+ String GetKeyName() const { return m_edKeyName.GetText(); }
+
+ void setCreateStyleAction();
+ inline void disallowViews()
+ {
+ m_aRB_View.Disable();
+ }
+ inline void disallowUseHeaderLine()
+ {
+ m_bUseHeaderAllowed = FALSE;
+ m_aCB_UseHeaderLine.Disable();
+ }
+
+ void setCreatePrimaryKey( bool _bDoCreate, const ::rtl::OUString& _rSuggestedName );
+ };
+}
+#endif // DBAUI_WIZARD_CPAGE_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx
new file mode 100644
index 000000000000..6dd66a547ed5
--- /dev/null
+++ b/dbaccess/source/ui/inc/WColumnSelect.hxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_WIZ_COLUMNSELECT_HXX
+#define DBAUI_WIZ_COLUMNSELECT_HXX
+
+#include "WTabPage.hxx"
+#include "WCopyTable.hxx"
+
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/button.hxx>
+#include <comphelper/stl_types.hxx>
+
+namespace dbaui
+{
+ class OFieldDescription;
+
+ // ========================================================
+ // Wizard Page: OWizColumnSelect
+ // ========================================================
+
+ class OWizColumnSelect : public OWizardPage
+ {
+
+ FixedLine m_flColumns;
+ MultiListBox m_lbOrgColumnNames; // left side
+ ImageButton m_ibColumn_RH;
+ ImageButton m_ibColumns_RH;
+ ImageButton m_ibColumn_LH;
+ ImageButton m_ibColumns_LH;
+ MultiListBox m_lbNewColumnNames; // right side
+
+
+ DECL_LINK( ButtonClickHdl, Button * );
+ DECL_LINK( ListDoubleClickHdl, MultiListBox * );
+
+
+ void clearListBox(MultiListBox& _rListBox);
+ void fillColumns( ListBox* pRight,
+ ::std::vector< ::rtl::OUString> &_rRightColumns);
+
+ void createNewColumn( ListBox* _pListbox,
+ OFieldDescription* _pSrcField,
+ ::std::vector< ::rtl::OUString>& _rRightColumns,
+ const ::rtl::OUString& _sColumnName,
+ const ::rtl::OUString& _sExtraChars,
+ sal_Int32 _nMaxNameLen,
+ const ::comphelper::TStringMixEqualFunctor& _aCase);
+
+ void moveColumn( ListBox* _pRight,
+ ListBox* _pLeft,
+ ::std::vector< ::rtl::OUString>& _rRightColumns,
+ const ::rtl::OUString& _sColumnName,
+ const ::rtl::OUString& _sExtraChars,
+ sal_Int32 _nMaxNameLen,
+ const ::comphelper::TStringMixEqualFunctor& _aCase);
+
+ void enableButtons();
+
+
+ USHORT adjustColumnPosition(ListBox* _pLeft,
+ const ::rtl::OUString& _sColumnName,
+ ODatabaseExport::TColumnVector::size_type nCurrentPos,
+ const ::comphelper::TStringMixEqualFunctor& _aCase);
+
+ public:
+ virtual void Reset ( );
+ virtual void ActivatePage();
+ virtual sal_Bool LeavePage();
+ virtual String GetTitle() const ;
+
+ OWizColumnSelect(Window* pParent);
+ virtual ~OWizColumnSelect();
+ };
+}
+#endif // DBAUI_WIZ_COLUMNSELECT_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
new file mode 100644
index 000000000000..c28630bb18f3
--- /dev/null
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -0,0 +1,423 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_WIZ_COPYTABLEDIALOG_HXX
+#define DBAUI_WIZ_COPYTABLEDIALOG_HXX
+
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
+#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <comphelper/stl_types.hxx>
+#include "TypeInfo.hxx"
+#include <vcl/button.hxx>
+#include <svtools/wizdlg.hxx>
+#include "DExport.hxx"
+#include "WTabPage.hxx"
+#include "FieldDescriptions.hxx"
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <vcl/lstbox.hxx>
+#include <functional>
+
+namespace dbaui
+{
+
+ typedef ::std::unary_function< ::rtl::OUString,bool> TColumnFindFunctorType;
+ class TColumnFindFunctor : public TColumnFindFunctorType
+ {
+ public:
+ virtual bool operator()(const ::rtl::OUString& _sColumnName) const = 0;
+ };
+
+ class TExportColumnFindFunctor : public TColumnFindFunctor
+ {
+ ODatabaseExport::TColumns* m_pColumns;
+ public:
+ TExportColumnFindFunctor(ODatabaseExport::TColumns* _pColumns)
+ {
+ m_pColumns = _pColumns;
+ }
+ inline bool operator()(const ::rtl::OUString& _sColumnName) const
+ {
+ return m_pColumns->find(_sColumnName) != m_pColumns->end();
+ }
+ };
+
+ class TMultiListBoxEntryFindFunctor : public TColumnFindFunctor
+ {
+ ::comphelper::TStringMixEqualFunctor m_aCase;
+ ::std::vector< ::rtl::OUString>* m_pVector;
+ public:
+ TMultiListBoxEntryFindFunctor(::std::vector< ::rtl::OUString>* _pVector,
+ const ::comphelper::TStringMixEqualFunctor& _aCase)
+ :m_aCase(_aCase)
+ ,m_pVector(_pVector)
+ {
+ }
+ inline bool operator()(const ::rtl::OUString& _sColumnName) const
+ {
+ return ::std::find_if(m_pVector->begin(),m_pVector->end(),
+ ::std::bind2nd(m_aCase, _sColumnName)) != m_pVector->end();
+ }
+ };
+
+ // ========================================================
+ // ICopyTableSourceObject
+ // ========================================================
+ /** interface to an object to copy to another DB, using the OCopyTableWizard
+
+ when the wizard is used to copy an object to another DB, it usually requires
+ a sdbcx-level or sdb-level object (a css.sdbcx.Table or css.sdb.Query, that is).
+
+ However, to also support copying tables from sdbc-level connections, we allow to
+ work with the object name only. This implies some less features (like copying the
+ UI settings of a table is not done), but still allows to copy definition and data.
+ */
+ class ICopyTableSourceObject
+ {
+ public:
+ /// retrieves the fully qualified name of the object to copy
+ virtual ::rtl::OUString getQualifiedObjectName() const = 0;
+ /// determines whether the object is a view
+ virtual bool isView() const = 0;
+ /** copies the UI settings of the object to the given target object. Might be
+ ignored by implementations which do not have Ui settings.
+ */
+ virtual void copyUISettingsTo( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ) const = 0;
+ /// retrieves the column names of the to-be-copied object
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getColumnNames() const = 0;
+ /// retrieves the names of the primary keys of the to-be-copied object
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getPrimaryKeyColumnNames() const = 0;
+ /// creates a OFieldDescription for the given column of the to-be-copied object
+ virtual OFieldDescription* createFieldDescription( const ::rtl::OUString& _rColumnName ) const = 0;
+ /// returns the SELECT statement which can be used to retrieve the data of the to-be-copied object
+ virtual ::rtl::OUString getSelectStatement() const = 0;
+
+ /** copies the filter and sorting
+ *
+ * \return
+ */
+ virtual void copyFilterAndSortingTo(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ) const = 0;
+
+ /** returns the prepared statement which can be used to retrieve the data of the to-be-copied object
+
+ The default implementation of this method will simply prepare a statement with the return value
+ of ->getSelectStatement.
+ */
+ virtual ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement >
+ getPreparedSelectStatement() const = 0;
+
+ virtual ~ICopyTableSourceObject();
+ };
+
+ // ========================================================
+ // ObjectCopySource
+ // ========================================================
+ class ObjectCopySource : public ICopyTableSourceObject
+ {
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xObject;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > m_xObjectPSI;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xObjectColumns;
+
+ public:
+ ObjectCopySource(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject
+ );
+
+ // ICopyTableSourceObject overridables
+ virtual ::rtl::OUString getQualifiedObjectName() const;
+ virtual bool isView() const;
+ virtual void copyUISettingsTo( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ) const;
+ virtual void copyFilterAndSortingTo(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ) const;
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getColumnNames() const;
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getPrimaryKeyColumnNames() const;
+ virtual OFieldDescription* createFieldDescription( const ::rtl::OUString& _rColumnName ) const;
+ virtual ::rtl::OUString getSelectStatement() const;
+ virtual ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement >
+ getPreparedSelectStatement() const;
+ };
+
+ // ========================================================
+ // NamedTableCopySource
+ // ========================================================
+ class NamedTableCopySource : public ICopyTableSourceObject
+ {
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
+ ::rtl::OUString m_sTableName;
+ ::rtl::OUString m_sTableCatalog;
+ ::rtl::OUString m_sTableSchema;
+ ::rtl::OUString m_sTableBareName;
+ ::std::vector< OFieldDescription > m_aColumnInfo;
+ ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement > m_xStatement;
+
+ public:
+ NamedTableCopySource(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const ::rtl::OUString& _rTableName
+ );
+
+ // ICopyTableSourceObject overridables
+ virtual ::rtl::OUString getQualifiedObjectName() const;
+ virtual bool isView() const;
+ virtual void copyUISettingsTo( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ) const;
+ virtual void copyFilterAndSortingTo(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ) const;
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getColumnNames() const;
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getPrimaryKeyColumnNames() const;
+ virtual OFieldDescription* createFieldDescription( const ::rtl::OUString& _rColumnName ) const;
+ virtual ::rtl::OUString getSelectStatement() const;
+ virtual ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement >
+ getPreparedSelectStatement() const;
+
+ private:
+ void impl_ensureColumnInfo_throw();
+ ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XPreparedStatement >
+ impl_ensureStatement_throw();
+ };
+
+ // ========================================================
+ // Wizard Dialog
+ // ========================================================
+ class OCopyTableWizard : public WizardDialog
+ {
+ friend class OWizColumnSelect;
+ friend class OWizTypeSelect;
+ friend class OWizTypeSelectControl;
+ friend class OCopyTable;
+ friend class OWizNameMatching;
+
+ public:
+ DECLARE_STL_MAP(::rtl::OUString,::rtl::OUString,::comphelper::UStringMixLess,TNameMapping);
+
+ enum Wizard_Button_Style
+ {
+ WIZARD_NEXT,
+ WIZARD_PREV,
+ WIZARD_FINISH,
+
+ WIZARD_NONE
+ };
+
+ private:
+ ODatabaseExport::TColumns m_vDestColumns; // contains the columns
+ ODatabaseExport::TColumnVector m_aDestVec; // the order to insert the columns
+ ODatabaseExport::TColumns m_vSourceColumns;
+ ODatabaseExport::TColumnVector m_vSourceVec;
+
+ HelpButton m_pbHelp;
+ CancelButton m_pbCancel;
+ PushButton m_pbPrev;
+ PushButton m_pbNext;
+ OKButton m_pbFinish;
+
+ OTypeInfoMap m_aTypeInfo;
+ ::std::vector<OTypeInfoMap::iterator> m_aTypeInfoIndex;
+ OTypeInfoMap m_aDestTypeInfo;
+ ::std::vector<OTypeInfoMap::iterator> m_aDestTypeInfoIndex;
+ TNameMapping m_mNameMapping;
+
+ ODatabaseExport::TPositions m_vColumnPos;
+ ::std::vector<sal_Int32> m_vColumnTypes;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xDestConnection;
+
+ const ICopyTableSourceObject& m_rSourceObject;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xFactory;
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> m_xInteractionHandler;
+
+ String m_sTypeNames; // these type names are the ones out of the resource file
+ sal_uInt32 m_nPageCount;
+ sal_Bool m_bDeleteSourceColumns;
+ bool m_bInterConnectionCopy; // are we copying between different connections?
+
+ ::com::sun::star::lang::Locale m_aLocale;
+ ::rtl::OUString m_sName; // for a table the name is composed
+ ::rtl::OUString m_sSourceName;
+ ::rtl::OUString m_aKeyName;
+ TOTypeInfoSP m_pTypeInfo; // default type
+ sal_Bool m_bAddPKFirstTime;
+ sal_Int16 m_nOperation;
+ Wizard_Button_Style m_ePressed;
+ sal_Bool m_bCreatePrimaryKeyColumn;
+ sal_Bool m_bUseHeaderLine;
+
+ private:
+ DECL_LINK( ImplPrevHdl , PushButton* );
+ DECL_LINK( ImplNextHdl , PushButton* );
+ DECL_LINK( ImplOKHdl , OKButton* );
+ DECL_LINK( ImplActivateHdl, WizardDialog* );
+ sal_Bool CheckColumns(sal_Int32& _rnBreakPos);
+ void loadData( const ICopyTableSourceObject& _rSourceObject,
+ ODatabaseExport::TColumns& _rColumns,
+ ODatabaseExport::TColumnVector& _rColVector );
+ void construct();
+ // need for table creation
+ void appendColumns( ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>& _rxColSup, const ODatabaseExport::TColumnVector* _pVec, sal_Bool _bKeyColumns = sal_False ) const;
+ void appendKey(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XKeysSupplier>& _rxSup,const ODatabaseExport::TColumnVector* _pVec) const;
+ // checks if the type is supported in the destination database
+ sal_Bool supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDataType);
+
+ void impl_loadSourceData();
+
+ public:
+ // used for copy tables or queries
+ OCopyTableWizard(
+ Window * pParent,
+ const ::rtl::OUString& _rDefaultName,
+ sal_Int16 _nOperation,
+ const ICopyTableSourceObject& _rSourceObject,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xSourceConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler>& _xInteractionHandler
+ );
+
+ // used for importing rtf/html sources
+ OCopyTableWizard(
+ Window* pParent,
+ const ::rtl::OUString& _rDefaultName,
+ sal_Int16 _nOperation,
+ const ODatabaseExport::TColumns& _rDestColumns,
+ const ODatabaseExport::TColumnVector& _rSourceColVec,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _xFormatter,
+ TypeSelectionPageFactory _pTypeSelectionPageFactory,
+ SvStream& _rTypeSelectionPageArg,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM
+ );
+
+ virtual ~OCopyTableWizard();
+
+ virtual long DeactivatePage();
+ OKButton& GetOKButton() { return m_pbFinish; }
+ Wizard_Button_Style GetPressedButton() const { return m_ePressed; }
+ void EnableButton(Wizard_Button_Style eStyle,sal_Bool bEnable);
+ void AddWizardPage(OWizardPage* pPage); // Page wird von OCopyTableWizard gelöscht
+ void RemoveWizardPage(OWizardPage* pPage); // Page goes again to user
+ void CheckButtons(); // checks which button can be disabled, enabled
+
+ // returns a vector where the position of a column and if the column is in the selection
+ // when not the value is COLUMN_POSITION_NOT_FOUND == (sal_uInt32)-1
+ ODatabaseExport::TPositions GetColumnPositions() const { return m_vColumnPos; }
+ ::std::vector<sal_Int32> GetColumnTypes() const { return m_vColumnTypes; }
+ sal_Bool UseHeaderLine() const { return m_bUseHeaderLine; }
+ void setUseHeaderLine(sal_Bool _bUseHeaderLine) { m_bUseHeaderLine = _bUseHeaderLine; }
+
+ void insertColumn(sal_Int32 _nPos,OFieldDescription* _pField);
+
+ /** replaces a field description with another one. The name must not be known so far.
+ @param _nPos
+ The pos inside the vector, 0 based.
+ @param _pField
+ The field to set.
+ @param _sOldName
+ The name of column to be replaced.
+ */
+ void replaceColumn(sal_Int32 _nPos,OFieldDescription* _pField,const ::rtl::OUString& _sOldName);
+
+ /** returns whether a primary key should be created in the target database
+ */
+ sal_Bool shouldCreatePrimaryKey() const;
+ void setCreatePrimaryKey( bool _bDoCreate, const ::rtl::OUString& _rSuggestedName );
+
+ static bool supportsPrimaryKey( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection );
+ bool supportsPrimaryKey() const { return supportsPrimaryKey( m_xDestConnection ); }
+
+ static bool supportsViews( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection );
+ bool supportsViews() const { return supportsViews( m_xDestConnection ); }
+
+ /** returns the name of the primary key
+ @return
+ The name of the primary key.
+ */
+ ::rtl::OUString getPrimaryKeyName() const { return m_aKeyName; }
+
+ TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) const { return m_aTypeInfoIndex[_nPos]->second; }
+ const OTypeInfoMap* getTypeInfo() const { return &m_aTypeInfo; }
+
+ TOTypeInfoSP getDestTypeInfo(sal_Int32 _nPos) const { return m_aDestTypeInfoIndex[_nPos]->second; }
+ const OTypeInfoMap* getDestTypeInfo() const { return &m_aDestTypeInfo; }
+
+ ::com::sun::star::lang::Locale GetLocale() const { return m_aLocale; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const { return m_xFormatter; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> GetFactory() const { return m_xFactory; }
+
+ const ODatabaseExport::TColumns* getSourceColumns() const{ return &m_vSourceColumns; }
+ const ODatabaseExport::TColumnVector* getSrcVector() const { return &m_vSourceVec; }
+ ODatabaseExport::TColumns* getDestColumns() { return &m_vDestColumns; }
+ const ODatabaseExport::TColumnVector* getDestVector() const { return &m_aDestVec; }
+ ::rtl::OUString getName() const { return m_sName; }
+
+ /** clears the dest vectors
+ */
+ void clearDestColumns();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createTable();
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createView() const;
+ sal_Int32 getMaxColumnNameLength() const;
+
+ void setOperation( const sal_Int16 _nOperation );
+ sal_Int16 getOperation() const;
+
+ ::rtl::OUString convertColumnName( const TColumnFindFunctor& _rCmpFunctor,
+ const ::rtl::OUString& _sColumnName,
+ const ::rtl::OUString& _sExtraChars,
+ sal_Int32 _nMaxNameLen);
+ TOTypeInfoSP convertType(const TOTypeInfoSP&_pType,sal_Bool& _bNotConvert);
+
+ ::rtl::OUString createUniqueName(const ::rtl::OUString& _sName);
+
+ // displays a error message that a column type is not supported
+ void showColumnTypeNotSupported(const ::rtl::OUString& _rColumnName);
+
+ void removeColumnNameFromNameMap(const ::rtl::OUString& _sName);
+ void showError(const ::rtl::OUString& _sErrorMesage);
+ void showError(const ::com::sun::star::uno::Any& _aError);
+ };
+}
+
+#endif // DBAUI_WIZ_COPYTABLEDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WExtendPages.hxx b/dbaccess/source/ui/inc/WExtendPages.hxx
new file mode 100644
index 000000000000..7e82893041ca
--- /dev/null
+++ b/dbaccess/source/ui/inc/WExtendPages.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_WIZ_EXTENDPAGES_HXX
+#define DBAUI_WIZ_EXTENDPAGES_HXX
+
+#include "WTypeSelect.hxx"
+
+class SvStream;
+namespace dbaui
+{
+ // ========================================================
+ // Wizard Page: OWizHTMLExtend
+ // ========================================================
+ class OWizHTMLExtend : public OWizTypeSelect
+ {
+ protected:
+ virtual SvParser* createReader(sal_Int32 _nRows);
+ public:
+ OWizHTMLExtend(Window* pParent, SvStream& _rStream)
+ : OWizTypeSelect( pParent, &_rStream )
+ {
+ }
+
+ static OWizTypeSelect* Create( Window* _pParent, SvStream& _rInput ) { return new OWizHTMLExtend( _pParent, _rInput ); }
+
+ virtual ~OWizHTMLExtend(){}
+ };
+ // ========================================================
+ // Wizard Page: OWizRTFExtend
+ // ========================================================
+ class OWizRTFExtend : public OWizTypeSelect
+ {
+ protected:
+ virtual SvParser* createReader(sal_Int32 _nRows);
+ public:
+ OWizRTFExtend(Window* pParent,SvStream& _rStream)
+ : OWizTypeSelect( pParent, &_rStream )
+ {
+ }
+
+ static OWizTypeSelect* Create( Window* _pParent, SvStream& _rInput ) { return new OWizRTFExtend( _pParent, _rInput ); }
+
+ virtual ~OWizRTFExtend(){}
+ };
+
+ // ========================================================
+ // Wizard Page: OWizNormalExtend
+ // ========================================================
+ class OWizNormalExtend : public OWizTypeSelect
+ {
+ protected:
+ virtual SvParser* createReader(sal_Int32 _nRows);
+ public:
+ OWizNormalExtend(Window* pParent);
+ };
+}
+#endif // DBAUI_WIZ_EXTENDPAGES_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx b/dbaccess/source/ui/inc/WNameMatch.hxx
new file mode 100644
index 000000000000..e9d056347764
--- /dev/null
+++ b/dbaccess/source/ui/inc/WNameMatch.hxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_WIZ_NAMEMATCHING_HXX
+#define DBAUI_WIZ_NAMEMATCHING_HXX
+
+#include "WTabPage.hxx"
+#include "marktree.hxx"
+#include "DExport.hxx"
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
+#include "WCopyTable.hxx"
+
+namespace dbaui
+{
+ // ========================================================
+ // columns are at root only no children
+ // ========================================================
+ class OColumnTreeBox : public OMarkableTreeListBox
+ {
+ sal_Bool m_bReadOnly;
+ protected:
+ virtual void InitEntry(SvLBoxEntry* pEntry, const String& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind);
+
+ public:
+ OColumnTreeBox( Window* pParent, const ResId& rResId );
+
+ void FillListBox( const ODatabaseExport::TColumnVector& _rList);
+ void SetReadOnly(sal_Bool _bRo=sal_True) { m_bReadOnly = _bRo; }
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+
+ private:
+ using OMarkableTreeListBox::Select;
+ };
+
+ // ========================================================
+ // Wizard Page: OWizNameMatching
+ // Name matching for data appending
+ // ========================================================
+ class OWizNameMatching : public OWizardPage
+ {
+ FixedText m_FT_TABLE_LEFT;
+ FixedText m_FT_TABLE_RIGHT;
+ OColumnTreeBox m_CTRL_LEFT; // left side
+ OColumnTreeBox m_CTRL_RIGHT; // right side
+ ImageButton m_ibColumn_up;
+ ImageButton m_ibColumn_down;
+ ImageButton m_ibColumn_up_right;
+ ImageButton m_ibColumn_down_right;
+ PushButton m_pbAll;
+ PushButton m_pbNone;
+ String m_sSourceText;
+ String m_sDestText;
+
+ sal_Bool m_bAttrsChanged;
+
+ DECL_LINK( ButtonClickHdl, Button * );
+ DECL_LINK( RightButtonClickHdl, Button * );
+ DECL_LINK( AllNoneClickHdl, Button * );
+ DECL_LINK( TableListClickHdl, void* );
+ DECL_LINK( TableListRightSelectHdl, void* );
+
+ public:
+ virtual void Reset ( );
+ virtual void ActivatePage();
+ virtual sal_Bool LeavePage();
+ virtual String GetTitle() const ;
+
+ OWizNameMatching(Window* pParent);
+ virtual ~OWizNameMatching();
+
+ };
+}
+#endif // DBAUI_WIZ_NAMEMATCHING_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WTabPage.hxx b/dbaccess/source/ui/inc/WTabPage.hxx
new file mode 100644
index 000000000000..9b86bd0e5bfe
--- /dev/null
+++ b/dbaccess/source/ui/inc/WTabPage.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_WIZ_TABBPAGE_HXX
+#define DBAUI_WIZ_TABBPAGE_HXX
+
+#include <vcl/tabpage.hxx>
+
+namespace dbaui
+{
+ // ========================================================
+ // Wizard Page
+ // ========================================================
+ class OCopyTableWizard;
+ class OWizardPage : public TabPage
+ {
+ protected:
+ OCopyTableWizard* m_pParent;
+ sal_Bool m_bFirstTime; // Page wird das erste mal gerufen ; should be set in the reset methode
+
+ OWizardPage( Window* pParent, const ResId& rResId );// : TabPage(pParent,rResId),m_pParent((OCopyTableWizard*)pParent),m_bFirstTime(sal_True) {};
+
+ public:
+ virtual void Reset ( ) = 0;
+ virtual sal_Bool LeavePage() = 0;
+ virtual String GetTitle() const = 0;
+
+ sal_Bool IsFirstTime() const { return m_bFirstTime; }
+ };
+}
+#endif // DBAUI_WIZ_TABBPAGE_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx
new file mode 100644
index 000000000000..d5ddf0790bc2
--- /dev/null
+++ b/dbaccess/source/ui/inc/WTypeSelect.hxx
@@ -0,0 +1,144 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_WIZ_TYPESELECT_HXX
+#define DBAUI_WIZ_TYPESELECT_HXX
+
+#include "FieldDescControl.hxx"
+#include "TypeInfo.hxx"
+#include "WTabPage.hxx"
+
+#include <vcl/button.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+
+class SvStream;
+class SvParser;
+namespace dbaui
+{
+ class OTableDesignHelpBar;
+ // =============================================================================================
+ // OWizTypeSelectControl
+ // =============================================================================================
+ class OWizTypeSelectControl : public OFieldDescControl
+ {
+ protected:
+ virtual void ActivateAggregate( EControlType eType );
+ virtual void DeactivateAggregate( EControlType eType );
+
+ virtual void CellModified(long nRow, sal_uInt16 nColId );
+
+ virtual ::com::sun::star::lang::Locale GetLocale() const;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const;
+ virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos);
+ virtual const OTypeInfoMap* getTypeInfo() const;
+ virtual sal_Bool isAutoIncrementValueEnabled() const;
+ virtual ::rtl::OUString getAutoIncrementValue() const;
+
+ public:
+ OWizTypeSelectControl(Window* pParent, const ResId& rResId,OTableDesignHelpBar* pHelpBar=NULL);
+ virtual ~OWizTypeSelectControl();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> getMetaData();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection();
+ };
+
+
+ // ========================================================
+ // Wizard Page: OWizTypeSelectList
+ // definiert nur das ::com::sun::star::ucb::Command f"ur das Contextmenu
+ // ========================================================
+ class OWizTypeSelectList : public MultiListBox
+ {
+ sal_Bool m_bPKey;
+ sal_Bool IsPrimaryKeyAllowed() const;
+ void setPrimaryKey( OFieldDescription* _pFieldDescr,
+ sal_uInt16 _nPos,
+ sal_Bool _bSet=sal_False);
+ protected:
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ public:
+ OWizTypeSelectList( Window* pParent, WinBits nStyle = WB_BORDER ) : MultiListBox(pParent,nStyle) {};
+ OWizTypeSelectList( Window* pParent, const ResId& rResId ) : MultiListBox(pParent,rResId) {};
+ void SetPKey(sal_Bool bPKey) { m_bPKey = bPKey; }
+ };
+
+ // ========================================================
+ // Wizard Page: OWizTypeSelect
+ // Dient als Basis Klasse fuer unterschiedliche Kopiereigenschaften
+ // FillColumnList wird aufgerufen, wenn der Button AUTO ausgeloest wird.
+ // ========================================================
+ class OWizTypeSelect : public OWizardPage
+ {
+ friend class OWizTypeSelectControl;
+ friend class OWizTypeSelectList;
+
+ DECL_LINK( ColumnSelectHdl, MultiListBox* );
+ DECL_LINK( ButtonClickHdl, Button * );
+ protected:
+ OWizTypeSelectList m_lbColumnNames;
+ FixedLine m_flColumns;
+ OWizTypeSelectControl m_aTypeControl;
+ FixedLine m_flAutoType;
+ FixedText m_ftAuto;
+ NumericField m_etAuto;
+ PushButton m_pbAuto;
+
+ Image m_imgPKey;
+ SvStream* m_pParserStream; // stream to read the tokens from or NULL
+ ::rtl::OUString m_sAutoIncrementValue;
+ sal_Int32 m_nDisplayRow;
+ sal_Bool m_bAutoIncrementEnabled;
+ sal_Bool m_bDuplicateName;
+
+ void fillColumnList(sal_uInt32 nRows);
+ virtual SvParser* createReader(sal_Int32 _nRows) = 0;
+
+ void EnableAuto(sal_Bool bEnable);
+ public:
+ virtual void Reset ( );
+ virtual void ActivatePage( );
+ virtual void Resize();
+ virtual sal_Bool LeavePage();
+ virtual String GetTitle() const;
+
+ OWizTypeSelect(Window* pParent, SvStream* _pStream = NULL );
+ virtual ~OWizTypeSelect();
+
+ inline void setDisplayRow(sal_Int32 _nRow) { m_nDisplayRow = _nRow - 1; }
+ inline void setDuplicateName(sal_Bool _bDuplicateName) { m_bDuplicateName = _bDuplicateName; }
+ };
+
+ // ========================================================
+ typedef OWizTypeSelect* (*TypeSelectionPageFactory)( Window*, SvStream& );
+}
+#endif // DBAUI_WIZ_TYPESELECT_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx
new file mode 100644
index 000000000000..b1627f8f81e0
--- /dev/null
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -0,0 +1,127 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_QYDLGTAB_HXX
+#define DBAUI_QYDLGTAB_HXX
+
+#include <vcl/dialog.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <com/sun/star/sdbc/XConnection.hpp>
+
+#include <vcl/lstbox.hxx>
+#include <vcl/dialog.hxx>
+#include <tools/string.hxx>
+
+#include "tabletree.hxx"
+
+#include <memory>
+
+namespace dbaui
+{
+ //========================================================================
+ /** unifies the access to a list of table/query objects
+ */
+ class TableObjectListFacade
+ {
+ public:
+ virtual void updateTableObjectList( bool _bAllowViews ) = 0;
+ virtual String getSelectedName( String& _out_rAliasName ) const = 0;
+ virtual bool isLeafSelected() const = 0;
+
+ virtual ~TableObjectListFacade();
+ };
+
+ //========================================================================
+ class IAddTableDialogContext
+ {
+ public:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >
+ getConnection() const = 0;
+ virtual bool allowViews() const = 0;
+ virtual bool allowQueries() const = 0;
+ virtual bool allowAddition() const = 0;
+ virtual void addTableWindow( const String& _rQualifiedTableName, const String& _rAliasName ) = 0;
+ virtual void onWindowClosing( const Window* _pWindow ) = 0;
+ };
+
+ //========================================================================
+ class OAddTableDlg : public ModelessDialog
+ {
+ RadioButton m_aCaseTables;
+ RadioButton m_aCaseQueries;
+
+ OTableTreeListBox m_aTableList;
+ SvTreeListBox m_aQueryList;
+ ::std::auto_ptr< TableObjectListFacade >
+ m_pCurrentList;
+
+ PushButton aAddButton;
+ CancelButton aCloseButton;
+ HelpButton aHelpButton;
+
+ IAddTableDialogContext&
+ m_rContext;
+
+ DECL_LINK( AddClickHdl, Button* );
+ DECL_LINK( CloseClickHdl, Button* );
+ DECL_LINK( TableListDoubleClickHdl, void* );
+ DECL_LINK( TableListSelectHdl, void* );
+ DECL_LINK( OnTypeSelected, void* );
+
+ public:
+ OAddTableDlg(
+ Window* _pParent,
+ IAddTableDialogContext& _rContext );
+ virtual ~OAddTableDlg();
+
+ void DetermineAddTable() { aAddButton.Enable( impl_isAddAllowed() ); }
+ void Update();
+
+ static String getDialogTitleForContext(
+ IAddTableDialogContext& _rContext );
+
+ private:
+ virtual BOOL Close();
+
+ bool impl_isAddAllowed();
+ void impl_addTable();
+
+ enum ObjectList
+ {
+ Tables,
+ Queries
+ };
+ void impl_switchTo( ObjectList _eList );
+ };
+}
+#endif // DBAUI_QYDLGTAB_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
new file mode 100644
index 000000000000..c4f5a81d00fe
--- /dev/null
+++ b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_ADVANCEDSETTINGSDLG_HXX
+#define DBACCESS_ADVANCEDSETTINGSDLG_HXX
+
+#include "IItemSetHelper.hxx"
+#include "moduledbu.hxx"
+
+ /** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <sfx2/tabdlg.hxx>
+
+#include <memory>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //=========================================================================
+ //= AdvancedSettingsDialog
+ //=========================================================================
+ class ODbDataSourceAdministrationHelper;
+ /** implements the advanced page dlg of the data source properties.
+ */
+ class AdvancedSettingsDialog :public SfxTabDialog
+ ,public IItemSetHelper
+ ,public IDatabaseSettingsDialog
+ {
+ OModuleClient m_aModuleClient;
+ ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
+ SfxItemSet* m_pItemSet;
+
+ protected:
+ virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage);
+
+ public:
+ AdvancedSettingsDialog( Window* _pParent
+ ,SfxItemSet* _pItems
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ ,const ::com::sun::star::uno::Any& _aDataSourceName);
+
+ virtual ~AdvancedSettingsDialog();
+
+ /// determines whether or not the given data source type has any advanced setting
+ static bool doesHaveAnyAdvancedSettings( const ::rtl::OUString& _sURL );
+
+ virtual const SfxItemSet* getOutputSet() const;
+ virtual SfxItemSet* getWriteOutputSet();
+
+ virtual short Execute();
+
+ // forwards to ODbDataSourceAdministrationHelper
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const;
+ virtual ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >,sal_Bool> createConnection();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver();
+ virtual ::rtl::OUString getDatasourceType(const SfxItemSet& _rSet) const;
+ virtual void clearPassword();
+ virtual sal_Bool saveDatasource();
+ virtual void setTitle(const ::rtl::OUString& _sTitle);
+ virtual void enableConfirmSettings( bool _bEnable );
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // DBACCESS_ADVANCEDSETTINGSDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/asyncmodaldialog.hxx b/dbaccess/source/ui/inc/asyncmodaldialog.hxx
new file mode 100644
index 000000000000..9711070bc9a0
--- /dev/null
+++ b/dbaccess/source/ui/inc/asyncmodaldialog.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_ASYNCMODALDIALOG_HXX
+#define DBACCESS_ASYNCMODALDIALOG_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+/** === end UNO includes === **/
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= AsyncDialogExecutor
+ //====================================================================
+ /** helper class for executing (UNO) dialogs modal, but asynchronously
+ */
+ class AsyncDialogExecutor
+ {
+ public:
+ /** executes the given dialog asynchronously, but still modal
+
+ @raises IllegalArgumentException
+ if the given dialog is <NULL/>
+ @todo
+ allow for a callback for the result
+ */
+ static void executeModalDialogAsync(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XExecutableDialog >& _rxDialog
+ );
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // DBACCESS_ASYNCMODALDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/browserids.hxx b/dbaccess/source/ui/inc/browserids.hxx
new file mode 100644
index 000000000000..3bac18ae4fb8
--- /dev/null
+++ b/dbaccess/source/ui/inc/browserids.hxx
@@ -0,0 +1,121 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBACCESS_UI_BROWSER_ID_HXX
+#define DBACCESS_UI_BROWSER_ID_HXX
+
+#include <svx/svxids.hrc>
+#include "dbaccess_slotid.hrc"
+
+#define ID_BROWSER_COPY SID_COPY
+#define ID_BROWSER_CUT SID_CUT
+#define ID_BROWSER_EDITDOC SID_EDITDOC
+#define ID_BROWSER_UNDORECORD SID_FM_RECORD_UNDO
+#define ID_BROWSER_SAVERECORD SID_FM_RECORD_SAVE
+#define ID_BROWSER_PASTE SID_PASTE
+#define ID_BROWSER_CLIPBOARD_FORMAT_ITEMS SID_CLIPBOARD_FORMAT_ITEMS
+#define ID_BROWSER_REDO SID_REDO
+#define ID_BROWSER_SAVEDOC SID_SAVEDOC
+#define ID_BROWSER_SAVEASDOC SID_SAVEASDOC
+#define ID_BROWSER_TITLE SID_DOCINFO_TITLE
+#define ID_BROWSER_UNDO SID_UNDO
+#define ID_BROWSER_INSERTCOLUMNS SID_SBA_BRW_INSERT
+#define ID_BROWSER_FORMLETTER SID_SBA_BRW_MERGE
+#define ID_BROWSER_INSERTCONTENT SID_SBA_BRW_UPDATE
+
+#define ID_BROWSER_SEARCH SID_FM_SEARCH
+#define ID_BROWSER_SORTUP SID_FM_SORTUP
+#define ID_BROWSER_SORTDOWN SID_FM_SORTDOWN
+#define ID_BROWSER_AUTOFILTER SID_FM_AUTOFILTER
+#define ID_BROWSER_FILTERCRIT SID_FM_FILTERCRIT
+#define ID_BROWSER_ORDERCRIT SID_FM_ORDERCRIT
+#define ID_BROWSER_REMOVEFILTER SID_FM_REMOVE_FILTER_SORT
+#define ID_BROWSER_FILTERED SID_FM_FORM_FILTERED
+#define ID_BROWSER_REFRESH SID_FM_REFRESH
+#define ID_BROWSER_EXPL_PREVLEVEL SID_EXPLORER_PREVLEVEL
+#define ID_BROWSER_COLATTRSET 20 // Spaltenformatierung
+#define ID_BROWSER_COLWIDTH 21 // Spaltenbreite
+#define ID_BROWSER_TABLEATTR 22 // table format attributes
+#define ID_BROWSER_ROWHEIGHT 23 // Zeilenhoehe
+#define ID_BROWSER_COLUMNINFO 24 // copies the column description to insert it into the table design
+#define ID_BROWSER_COUNTALL SID_FM_COUNTALL // count all
+#define ID_BROWSER_ADDTABLE SID_FM_ADDTABLE
+#define ID_BROWSER_EXPLORER SID_DSBROWSER_EXPLORER
+#define ID_BROWSER_DOCUMENT_DATASOURCE SID_DOCUMENT_DATA_SOURCE
+
+// The following ids are local to special components (e.g. menus), so they don't need to be unique
+// overall. Please have this in mind when changing anything
+#define ID_TREE_EDIT_DATABASE 1
+#define ID_TREE_CLOSE_CONN 2
+ // FREE
+#define ID_TREE_ADMINISTRATE 4
+#define ID_MIGRATE_SCRIPTS 5
+
+#define ID_REPORT_NEW_TEXT 14
+#define ID_FORM_NEW_TEXT 15
+#define ID_FORM_NEW_CALC 16
+#define ID_FORM_NEW_IMPRESS 17
+#define ID_NEW_QUERY_DESIGN 20
+#define ID_EDIT_QUERY_DESIGN 21
+#define ID_NEW_QUERY_SQL 22
+#define ID_EDIT_QUERY_SQL 23
+#define ID_NEW_TABLE_DESIGN 25
+#define ID_NEW_VIEW_DESIGN 28
+#define ID_DIRECT_SQL 32
+#define ID_BROWSER_REFRESH_REBUILD 34
+#define ID_INDEX_NEW 36
+#define ID_INDEX_DROP 37
+#define ID_INDEX_RENAME 38
+#define ID_INDEX_SAVE 39
+#define ID_INDEX_RESET 40
+#define ID_DOCUMENT_CREATE_REPWIZ 41
+#define ID_BROWSER_SQL 42
+
+#define ID_APP_NEW_QUERY_AUTO_PILOT 44
+#define ID_NEW_TABLE_DESIGN_AUTO_PILOT 45
+#define ID_NEW_VIEW_DESIGN_AUTO_PILOT 46
+
+
+// other
+#define ID_BROWSER_QUERY_EXECUTE SID_FM_EXECUTE
+
+#define ID_BROWSER_CLOSE SID_CLOSEWIN
+#define ID_BROWSER_ESACPEPROCESSING SID_FM_NATIVESQL
+
+#define ID_QUERY_FUNCTION (SID_SBA_START + 41) // Funktionen anzeigen
+#define ID_QUERY_TABLENAME (SID_SBA_START + 42) // Tabellennamen anzeigen
+#define ID_QUERY_ALIASNAME (SID_SBA_START + 43) // Aliasnamen anzeigen
+#define ID_QUERY_DISTINCT (SID_SBA_START + 44) // Distinct anzeigen
+#define ID_QUERY_EDIT_JOINCONNECTION (SID_SBA_START + 45) // show-edit Join
+#define ID_BROWSER_INSERT_ROW (SID_SBA_START + 46) // insert row
+#define ID_QUERY_ZOOM_IN SID_ZOOM_IN
+#define ID_QUERY_ZOOM_OUT SID_ZOOM_OUT
+
+
+#endif // DBACCESS_UI_BROWSER_ID_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
new file mode 100644
index 000000000000..9f2fe801ddce
--- /dev/null
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -0,0 +1,369 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SBA_BWRCTRLR_HXX
+#define _SBA_BWRCTRLR_HXX
+
+#include "genericcontroller.hxx"
+#include "moduledbu.hxx"
+#include "brwview.hxx"
+#include "sbagrid.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/form/XLoadable.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/sdb/XSQLErrorListener.hpp>
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#include <com/sun/star/form/XResetListener.hpp>
+#include <com/sun/star/form/XDatabaseParameterListener.hpp>
+#include <com/sun/star/form/XConfirmDeleteListener.hpp>
+#include <com/sun/star/form/XFormComponent.hpp>
+#include <com/sun/star/awt/XFocusListener.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/frame/XModule.hpp>
+/** === end UNO includes === **/
+
+#include <vcl/timer.hxx>
+#include <svtools/transfer.hxx>
+#include <osl/mutex.hxx>
+#include <osl/thread.hxx>
+#include <cppuhelper/implbase9.hxx>
+#include <svtools/cliplistener.hxx>
+
+class ResMgr;
+struct FmFoundRecordInformation;
+struct FmSearchContext;
+
+namespace dbtools
+{
+ class SQLExceptionInfo;
+}
+
+namespace dbaui
+{
+ // =========================================================================
+
+ typedef ::cppu::ImplInheritanceHelper9 < OGenericUnoController
+ , ::com::sun::star::sdb::XSQLErrorListener
+ , ::com::sun::star::form::XDatabaseParameterListener
+ , ::com::sun::star::form::XConfirmDeleteListener
+ , ::com::sun::star::form::XLoadListener
+ , ::com::sun::star::form::XResetListener
+ , ::com::sun::star::awt::XFocusListener
+ , ::com::sun::star::container::XContainerListener
+ , ::com::sun::star::beans::XPropertyChangeListener
+ , ::com::sun::star::frame::XModule
+ > SbaXDataBrowserController_Base;
+
+ class SbaXDataBrowserController :public SbaXDataBrowserController_Base
+ ,public SbaGridListener
+ {
+ // ==========
+ // attributes
+ private:
+ // for implementing the XFormController
+ class FormControllerImpl;
+ friend class FormControllerImpl;
+ OModuleClient m_aModuleClient;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet; // our rowset
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > m_xColumnsSupplier; // queried from the rowset member
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xLoadable; // queried from the rowset member as well
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > m_xGridModel; // the model of our grid
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > m_xFormControllerImpl;
+ mutable ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >
+ m_xParser; // for sorting 'n filtering
+
+ sal_Int32 m_nRowSetPrivileges; // cached Privileges property of m_xRowSet
+
+ AutoTimer m_aInvalidateClipboard; // for testing the state of the CUT/COPY/PASTE-slots
+
+ TransferableDataHelper m_aSystemClipboard; // content of the clipboard
+ TransferableClipboardListener*
+ m_pClipbordNotifier; // notifier for changes in the clipboard
+
+ ::osl::Mutex m_aAsyncLoadSafety; // for multi-thread access to our members
+
+ OAsyncronousLink m_aAsyncGetCellFocus;
+ OAsyncronousLink m_aAsyncDisplayError;
+ ::dbtools::SQLExceptionInfo m_aCurrentError;
+
+ String m_sStateSaveRecord;
+ String m_sStateUndoRecord;
+ ::rtl::OUString m_sModuleIdentifier;
+
+ // members for asynchronous load operations
+ FormControllerImpl* m_pFormControllerImpl; // implementing the XFormController
+
+ ULONG m_nPendingLoadFinished; // the event used to tell ourself that the load is finished
+ sal_uInt16 m_nFormActionNestingLevel; // see enter-/leaveFormAction
+
+ sal_Bool m_bLoadCanceled : 1; // the load was canceled somehow
+ sal_Bool m_bClosingKillOpen : 1; // are we killing the load thread because we are to be suspended ?
+ bool m_bCannotSelectUnfiltered : 1; // recieved an DATA_CANNOT_SELECT_UNFILTERED error
+
+ protected:
+ class FormErrorHelper
+ {
+ SbaXDataBrowserController* m_pOwner;
+ public:
+ FormErrorHelper(SbaXDataBrowserController* pOwner) : m_pOwner(pOwner) { m_pOwner->enterFormAction(); }
+ virtual ~FormErrorHelper() { m_pOwner->leaveFormAction(); }
+ };
+ friend class FormErrorHelper;
+
+ // ================
+ // attribute access
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > getRowSet() const { return m_xRowSet; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > getColumnsSupplier()const { return m_xColumnsSupplier; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > getLoadable() const { return m_xLoadable; }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > getFormComponent() const { return m_xGridModel; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > getControlModel() const { return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > (m_xGridModel, ::com::sun::star::uno::UNO_QUERY); }
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > getNumberFormatter()const { return m_xFormatter; }
+
+ sal_Bool isValid() const { return m_xRowSet.is() && m_xGridModel.is(); }
+ sal_Bool isValidCursor() const; // checks the ::com::sun::star::data::XDatabaseCursor-interface of m_xRowSet
+ sal_Bool isLoaded() const;
+ sal_Bool loadingCancelled() const { return m_bLoadCanceled; }
+ void onStartLoading( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxLoadable );
+ void setLoadingCancelled() { m_bLoadCanceled = sal_True; }
+
+ const TransferableDataHelper&
+ getViewClipboard() const { return m_aSystemClipboard; }
+
+ public:
+ SbaXDataBrowserController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
+
+ UnoDataBrowserView* getBrowserView() const { return static_cast< UnoDataBrowserView*>(getView()); }
+ // late construction
+ virtual sal_Bool Construct(Window* pParent);
+
+ // UNO
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::util::XModifyListener
+ virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XPropertyChangeListener
+ virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModule
+ virtual void SAL_CALL setIdentifier( const ::rtl::OUString& Identifier ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getIdentifier( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XFocusListener
+ virtual void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::frame::XController
+ virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL disposing();
+
+ // ::com::sun::star::frame::XFrameActionListener
+ virtual void SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::sdb::XSQLErrorListener
+ virtual void SAL_CALL errorOccured(const ::com::sun::star::sdb::SQLErrorEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::form::XDatabaseParameterListener
+ virtual sal_Bool SAL_CALL approveParameter(const ::com::sun::star::form::DatabaseParameterEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::form::XConfirmDeleteListener
+ virtual sal_Bool SAL_CALL confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::form::XLoadListener
+ virtual void SAL_CALL loaded(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL unloaded(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL reloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL reloaded(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::form::XResetListener
+ virtual sal_Bool SAL_CALL approveReset(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL resetted(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // SbaGridListener
+ virtual void RowChanged();
+ virtual void ColumnChanged();
+ virtual void SelectionChanged();
+ virtual void CellActivated();
+ virtual void CellDeactivated();
+ virtual void BeforeDrop();
+ virtual void AfterDrop();
+
+ public:
+
+ protected:
+ virtual ~SbaXDataBrowserController();
+
+ // all the features which should be handled by this class
+ virtual void describeSupportedFeatures();
+ // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
+ virtual FeatureState GetState(sal_uInt16 nId) const;
+ // execute a feature
+ virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
+
+ virtual void startFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
+ virtual void stopFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > CreateForm();
+ // our default implementation simply instantiates a stardiv.one.form.component.Form service
+ // (probably this needs not to be overloaded, but you may return anything you want as long as it
+ // supports the ::com::sun::star::form::DatabaseForm service. For instance you may want to create an adapter here which
+ // is synchronized with a foreign ::com::sun::star::form::DatabaseForm you got elsewhere)
+ virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm) = 0;
+ // called immediately after a successfull CreateForm
+ // do any initialization (data source etc.) here. the form should be fully functional after that.
+ // return sal_False if you didn't succeed (don't throw exceptions, they won't be caught)
+
+ virtual sal_Bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid);
+
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > CreateGridModel();
+ // our default implementation simply instantiates a stardiv.one.form.component.Grid service
+ // you most probably don't want to override this behaviuor
+
+ // the default implementation of disposing distributes the events to the following disposingXXX functions
+ virtual void disposingGridControl(const ::com::sun::star::lang::EventObject& Source); // calls removeControlListeners
+ virtual void disposingGridModel(const ::com::sun::star::lang::EventObject& Source); // calls removeModelListeners
+ virtual void disposingFormModel(const ::com::sun::star::lang::EventObject& Source);
+ virtual void disposingColumnModel(const ::com::sun::star::lang::EventObject& Source);
+
+ // want to be a listener to the grid control ? use this !
+ virtual void addControlListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > & _xGridControl);
+ virtual void removeControlListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > & _xGridControl);
+
+ // want to be a listener to the grid model ? use this !
+ virtual void addModelListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
+ virtual void removeModelListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
+
+ // want to be a listener grid columns ? use this !
+ virtual void AddColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol);
+ virtual void RemoveColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol);
+
+
+ // call after "major changes" (e.g. the completion of the async load).
+ // invalidates all toolbox slots and all supported features.
+
+ virtual sal_Bool LoadForm();
+ // load the form
+ // the default implementation does an direct load or starts a load thread, depending on the multithread capabilities
+ // of the data source.
+ // the default implementation also calls LoadFinished after a syncronous load, so be sure to do the same if you override
+ // this metod and don't call the base class' method
+
+ virtual void LoadFinished(sal_Bool bWasSynch);
+ // called if the loading (the _complete_ loading process) is done (no matter if synchron or asynchron).
+
+ virtual void criticalFail();
+ // called whenever a reload operation on the rowset failed
+ // (a "operation" is not only a simple reload: If the user sets a filter, an reloading the form
+ // after setting this filter fails, the filter is reset and the form is reloaded, again. Only the
+ // whole process (_both_ XLoadable::reload calls _together_) form the "reload operation"
+
+ // --------------------
+
+ // empty the frame where our view resides
+ virtual sal_Bool CommitCurrent();
+ // commit the current column (i.e. cell)
+ virtual sal_Bool SaveModified(sal_Bool bAskFor = sal_True);
+ // save the modified record
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getBoundField(sal_uInt16 nViewPos = (sal_uInt16)-1) const;
+ // a PropertySet corresponding to the cursor field a column is bound to
+ // if nViewPos is (sal_uInt16)-1 (the default) then the field for the current column will be retrieved
+
+ void enterFormAction();
+ void leaveFormAction();
+
+ // init the formatter if form changes
+ void initFormatter();
+
+ /// loads or reloads the form
+ virtual sal_Bool reloadForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxLoadable);
+
+ virtual sal_Bool preReloadForm(){ return sal_False; }
+ virtual void postReloadForm(){}
+
+ private:
+ void setCurrentModified( sal_Bool _bSet );
+
+ // execute the filter or sort slot
+ void ExecuteFilterSortCrit(sal_Bool bFilter);
+
+ // execute the search slot
+ void ExecuteSearch();
+
+ void initializeParser() const; // changes the mutable member m_xParser
+ void applyParserFilter(const ::rtl::OUString& _rOldFilter, sal_Bool _bOldFilterApplied,const ::rtl::OUString& _sOldHaving,const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >& _xParser);
+ void applyParserOrder(const ::rtl::OUString& _rOldOrder,const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >& _xParser);
+
+ sal_Int16 getCurrentColumnPosition();
+ void setCurrentColumnPosition( sal_Int16 _nPos );
+ void addColumnListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
+
+ void impl_checkForCannotSelectUnfiltered( const ::dbtools::SQLExceptionInfo& _rError );
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > createParser_nothrow();
+
+ // time to check the CUT/COPY/PASTE-slot-states
+ DECL_LINK( OnInvalidateClipboard, AutoTimer* );
+ DECL_LINK( OnClipboardChanged, void* );
+
+ // search callbacks
+ DECL_LINK(OnSearchContextRequest, FmSearchContext*);
+ DECL_LINK(OnFoundData, FmFoundRecordInformation*);
+ DECL_LINK(OnCanceledNotFound, FmFoundRecordInformation*);
+
+ DECL_LINK(OnAsyncGetCellFocus, void*);
+
+ DECL_LINK( OnAsyncDisplayError, void* );
+ };
+}
+
+#endif // _SBA_BWRCTRLR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/brwview.hxx b/dbaccess/source/ui/inc/brwview.hxx
new file mode 100644
index 000000000000..b954688867bd
--- /dev/null
+++ b/dbaccess/source/ui/inc/brwview.hxx
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SBX_BRWVIEW_HXX
+#define _SBX_BRWVIEW_HXX
+
+#include <vcl/window.hxx>
+
+#include <tools/resid.hxx>
+
+#include <com/sun/star/awt/PosSize.hpp>
+#include "dataview.hxx"
+#include <unotools/eventlisteneradapter.hxx>
+
+
+namespace com { namespace sun { namespace star { namespace awt {
+ class XControl;
+ class XControlContainer;
+ class XControlModel;
+}}}}
+
+// =========================================================================
+class ResMgr;
+class Splitter;
+
+namespace dbaui
+{
+ class DBTreeView;
+ class SbaGridControl;
+
+ class UnoDataBrowserView : public ODataView, public ::utl::OEventListenerAdapter
+ {
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > m_xGrid; // our grid's UNO representation
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > m_xMe; // our own UNO representation
+ DBTreeView* m_pTreeView;
+ Splitter* m_pSplitter;
+ mutable SbaGridControl* m_pVclControl; // our grid's VCL representation
+ Window* m_pStatus;
+
+ DECL_LINK( SplitHdl, void* );
+ // attribute access
+ public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > getGridControl() const { return m_xGrid; }
+ SbaGridControl* getVclControl() const;
+
+ public:
+ UnoDataBrowserView( Window* pParent,
+ IController& _rController,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ virtual ~UnoDataBrowserView();
+
+ /// late construction
+ virtual void Construct(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xModel);
+
+ /** as columns may be hidden there is a difference between a columns model pos and its view pos
+ so we you may use these translation function
+ */
+ sal_uInt16 View2ModelPos(sal_uInt16 nPos) const;
+ /// for the same reason the view column count isn't the same as the model column count
+
+ void setSplitter(Splitter* _pSplitter);
+ void setTreeView(DBTreeView* _pTreeView);
+
+ void showStatus( const String& _rStatus );
+ void hideStatus();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > getContainer() { return m_xMe; }
+
+ protected:
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void GetFocus();
+ virtual void resizeDocumentView(Rectangle& rRect);
+ virtual void _disposing( const ::com::sun::star::lang::EventObject& _rSource );
+
+ private:
+ using ODataView::Construct;
+ };
+
+ class BrowserViewStatusDisplay
+ {
+ protected:
+ UnoDataBrowserView* m_pView;
+
+ public:
+ BrowserViewStatusDisplay( UnoDataBrowserView* _pView, const String& _rStatus );
+ ~BrowserViewStatusDisplay( );
+ };
+}
+#endif // _SBX_BRWVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/callbacks.hxx b/dbaccess/source/ui/inc/callbacks.hxx
new file mode 100644
index 000000000000..2acd041c6673
--- /dev/null
+++ b/dbaccess/source/ui/inc/callbacks.hxx
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBACCESS_UI_CALLBACKS_HXX_
+#define _DBACCESS_UI_CALLBACKS_HXX_
+
+#include <sot/exchange.hxx>
+#include <sot/formats.hxx>
+#include <com/sun/star/container/XContainer.hpp>
+
+class CommandEvent;
+class SvLBoxEntry;
+class String;
+class Point;
+class PopupMenu;
+class Control;
+struct AcceptDropEvent;
+struct ExecuteDropEvent;
+
+namespace cppu { class OInterfaceContainerHelper; }
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ class IController;
+ //====================================================================
+ //= IControlActionListener
+ //====================================================================
+ class SAL_NO_VTABLE IControlActionListener
+ {
+ public:
+ /** requests a quick help text to display
+ @return <FALSE/> if the default quick help text should be used
+ */
+ virtual sal_Bool requestQuickHelp( const SvLBoxEntry* _pEntry, String& _rText ) const = 0;
+
+ /** handler for StartDrag requests
+ @return <TRUE/> if a drag operation was started
+ */
+ virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) = 0;
+
+ /** check whether or not a drop request should be accepted
+ */
+ virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) = 0;
+
+ /** execute a drop request
+ */
+ virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ) = 0;
+ };
+
+ //====================================================================
+ //= IContextMenuProvider
+ //====================================================================
+ class SAL_NO_VTABLE IContextMenuProvider
+ {
+ public:
+ /** returns the context menu for the control
+
+ Note that the menu does not need to care for the controls selection, or its
+ state in general.
+ The control itself will, using the controller provided by getCommandController,
+ disable menu entries as needed.
+ */
+ virtual PopupMenu* getContextMenu( Control& _rControl ) const = 0;
+
+ /** returns the controller which is responsible for providing states of certain features,
+ and executing them.
+ */
+ virtual IController& getCommandController() = 0;
+
+ /** returns the container of registered context menu interceptors, or NULL if the implementation
+ does not support context menu interception
+ */
+ virtual ::cppu::OInterfaceContainerHelper*
+ getContextMenuInterceptors() = 0;
+
+ /** returns the current selection in the given control
+
+ This selection is used for filling a ContextMenuExecuteEvent event for the given
+ control.
+ */
+ virtual ::com::sun::star::uno::Any
+ getCurrentSelection( Control& _rControl ) const = 0;
+ };
+
+ //====================================================================
+ //= IDragTransferableListener
+ //====================================================================
+ class SAL_NO_VTABLE IDragTransferableListener
+ {
+ public:
+ /// called when a drag operation done with a Transferable has been finished
+ virtual void dragFinished( ) = 0;
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // _DBACCESS_UI_CALLBACKS_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx
new file mode 100644
index 000000000000..e566e8b8a410
--- /dev/null
+++ b/dbaccess/source/ui/inc/charsetlistbox.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CHARSETLISTBOX_HXX
+#define CHARSETLISTBOX_HXX
+
+#include "charsets.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <vcl/lstbox.hxx>
+
+class SfxItemSet;
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= CharSetListBox
+ //====================================================================
+ class CharSetListBox : public ListBox
+ {
+ public:
+ CharSetListBox( Window* _pParent, const ResId& _rResId );
+ ~CharSetListBox();
+
+ void SelectEntryByIanaName( const String& _rIanaName );
+ bool StoreSelectedCharSet( SfxItemSet& _rSet, const USHORT _nItemId );
+
+ private:
+ OCharsetDisplay m_aCharSets;
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // CHARSETLISTBOX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/charsets.hxx b/dbaccess/source/ui/inc/charsets.hxx
new file mode 100644
index 000000000000..00a4a1f83a1f
--- /dev/null
+++ b/dbaccess/source/ui/inc/charsets.hxx
@@ -0,0 +1,144 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_CHARSETS_HXX_
+#define _DBAUI_CHARSETS_HXX_
+
+#include <tools/string.hxx>
+#include <tools/rc.hxx>
+#include <connectivity/dbcharset.hxx>
+#include <svx/txenctab.hxx>
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+ //=========================================================================
+ //= OCharsetDisplay
+ //=========================================================================
+ typedef ::dbtools::OCharsetMap OCharsetDisplay_Base;
+ class OCharsetDisplay
+ :protected OCharsetDisplay_Base
+ ,protected SvxTextEncodingTable
+ {
+ protected:
+ ::rtl::OUString m_aSystemDisplayName;
+
+ public:
+ class ExtendedCharsetIterator;
+ friend class OCharsetDisplay::ExtendedCharsetIterator;
+
+ typedef ExtendedCharsetIterator iterator;
+ typedef ExtendedCharsetIterator const_iterator;
+
+ OCharsetDisplay();
+
+ // various find operations
+ const_iterator findEncoding(const rtl_TextEncoding _eEncoding) const;
+ const_iterator findIanaName(const ::rtl::OUString& _rIanaName) const;
+ const_iterator findDisplayName(const ::rtl::OUString& _rDisplayName) const;
+
+ /// get access to the first element of the charset collection
+ const_iterator begin() const;
+ /// get access to the (last + 1st) element of the charset collection
+ const_iterator end() const;
+ // size of the map
+ sal_Int32 size() const { return OCharsetDisplay_Base::size(); }
+
+ protected:
+ virtual sal_Bool approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const;
+
+ private:
+ using OCharsetDisplay_Base::find;
+ };
+
+ //-------------------------------------------------------------------------
+ //- CharsetDisplayDerefHelper
+ //-------------------------------------------------------------------------
+ typedef ::dbtools::CharsetIteratorDerefHelper CharsetDisplayDerefHelper_Base;
+ class CharsetDisplayDerefHelper : protected CharsetDisplayDerefHelper_Base
+ {
+ friend class OCharsetDisplay::ExtendedCharsetIterator;
+
+ ::rtl::OUString m_sDisplayName;
+
+ public:
+ CharsetDisplayDerefHelper(const CharsetDisplayDerefHelper& _rSource);
+
+ rtl_TextEncoding getEncoding() const { return CharsetDisplayDerefHelper_Base::getEncoding(); }
+ ::rtl::OUString getIanaName() const { return CharsetDisplayDerefHelper_Base::getIanaName(); }
+ ::rtl::OUString getDisplayName() const { return m_sDisplayName; }
+
+ protected:
+ CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, const ::rtl::OUString& _rDisplayName);
+ };
+
+ //-------------------------------------------------------------------------
+ //- OCharsetDisplay::ExtendedCharsetIterator
+ //-------------------------------------------------------------------------
+ class OCharsetDisplay::ExtendedCharsetIterator
+ {
+ friend class OCharsetDisplay;
+
+ friend bool operator==(const ExtendedCharsetIterator& lhs, const ExtendedCharsetIterator& rhs);
+ friend bool operator!=(const ExtendedCharsetIterator& lhs, const ExtendedCharsetIterator& rhs) { return !(lhs == rhs); }
+
+ typedef ::dbtools::OCharsetMap container;
+ typedef container::CharsetIterator base_iterator;
+
+ protected:
+ const OCharsetDisplay* m_pContainer;
+ base_iterator m_aPosition;
+
+ public:
+ ExtendedCharsetIterator(const ExtendedCharsetIterator& _rSource);
+
+ CharsetDisplayDerefHelper operator*() const;
+
+ /// prefix increment
+ const ExtendedCharsetIterator& operator++();
+ /// postfix increment
+ const ExtendedCharsetIterator operator++(int) { ExtendedCharsetIterator hold(*this); ++*this; return hold; }
+
+ /// prefix decrement
+ const ExtendedCharsetIterator& operator--();
+ /// postfix decrement
+ const ExtendedCharsetIterator operator--(int) { ExtendedCharsetIterator hold(*this); --*this; return hold; }
+
+ protected:
+ ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, const base_iterator& _rPosition );
+ };
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_CHARSETS_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/commontypes.hxx b/dbaccess/source/ui/inc/commontypes.hxx
new file mode 100644
index 000000000000..61dede6f134f
--- /dev/null
+++ b/dbaccess/source/ui/inc/commontypes.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_COMMON_TYPES_HXX_
+#define _DBAUI_COMMON_TYPES_HXX_
+
+#include <comphelper/stl_types.hxx>
+#include <unotools/sharedunocomponent.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace sdbc {
+ class XConnection;
+ }
+} } }
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+ DECLARE_STL_STDKEY_SET( ::rtl::OUString, StringBag );
+ DECLARE_STL_VECTOR( sal_Int8, ByteVector );
+ DECLARE_STL_VECTOR( ::rtl::OUString, StringArray );
+
+ typedef ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XConnection > SharedConnection;
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_COMMON_TYPES_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx
new file mode 100644
index 000000000000..3bff8de08eef
--- /dev/null
+++ b/dbaccess/source/ui/inc/curledit.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_CURLEDIT_HXX_
+#define _DBAUI_CURLEDIT_HXX_
+
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include "dsntypes.hxx"
+#include <memory>
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+//=========================================================================
+//= OConnectionURLEdit
+//=========================================================================
+/** an edit control which may be used to edit connection URLs like
+ "sdbc:odbc:" or "jdbc:". It prevents the user from editing this prefix,
+ though it is normally shown.
+*/
+class OConnectionURLEdit : public Edit
+{
+ ::dbaccess::ODsnTypeCollection*
+ m_pTypeCollection;
+ FixedText* m_pForcedPrefix;
+ String m_sSaveValueNoPrefix;
+ BOOL m_bShowPrefix; // when <TRUE> the prefix will be visible, otherwise not
+
+public:
+ OConnectionURLEdit(Window* pParent, const ResId& rResId,BOOL _bShowPrefix = FALSE);
+ ~OConnectionURLEdit();
+
+public:
+ // Edit overridables
+ virtual void SetText(const String& _rStr);
+ virtual void SetText(const String& _rStr, const Selection& _rNewSelection);
+ virtual String GetText() const;
+
+
+ /** Showsthe Prefix
+ @param _bShowPrefix
+ If <TRUE/> than the prefix will be visible, otherwise not.
+ */
+ void ShowPrefix(BOOL _bShowPrefix);
+ /// get the currently set text, excluding the prefix indicating the type
+ virtual String GetTextNoPrefix() const;
+ /// set a new text, leave the current prefix unchanged
+ virtual void SetTextNoPrefix(const String& _rText);
+
+ inline void SaveValueNoPrefix() { m_sSaveValueNoPrefix = GetTextNoPrefix(); }
+ inline String GetSavedValueNoPrefix() const { return m_sSaveValueNoPrefix; }
+ inline void SetTypeCollection(::dbaccess::ODsnTypeCollection* _pTypeCollection) { m_pTypeCollection = _pTypeCollection; }
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_CURLEDIT_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/databaseobjectview.hxx b/dbaccess/source/ui/inc/databaseobjectview.hxx
new file mode 100644
index 000000000000..9ea455557b17
--- /dev/null
+++ b/dbaccess/source/ui/inc/databaseobjectview.hxx
@@ -0,0 +1,264 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_DATABASE_OBJECT_VIEW_HXX
+#define DBACCESS_DATABASE_OBJECT_VIEW_HXX
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+
+#include <boost/shared_ptr.hpp>
+
+
+// .........................................................................
+namespace dbaui
+{
+// .........................................................................
+ /** encapsulates access to the view of a database object.
+
+ @todo
+ this is to be merged with the OLinkedDocumentAccess class
+ */
+ class DatabaseObjectView
+ {
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ m_xParentFrame;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XComponentLoader >
+ m_xFrameLoader;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >
+ m_xApplication;
+ ::rtl::OUString m_sComponentURL;
+
+
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
+ doDispatch(
+ const ::comphelper::NamedValueCollection& i_rDispatchArgs
+ );
+
+ protected:
+ /** creates the desired view
+
+ The default implementation will call <member>fillDispatchArgs</member>, followed
+ by <member>doDispatch</member>.
+
+ @param _rDataSource
+ the data source, as passed to the <member>createNew</member> or <member>openExisting</member> method.
+ @param _rObjectName
+ the name of the object for which the view is to be opened,
+ or an empty string if a view for a new object should be created.
+ @param _rCreationArgs
+ the arguments for the view's creation
+ */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > doCreateView(
+ const ::com::sun::star::uno::Any& _rDataSource,
+ const ::rtl::OUString& _rObjectName,
+ const ::comphelper::NamedValueCollection& i_rCreationArgs
+ );
+
+ virtual void fillDispatchArgs(
+ ::comphelper::NamedValueCollection& i_rDispatchArgs,
+ const ::com::sun::star::uno::Any& _rDataSource,
+ const ::rtl::OUString& _rObjectName
+ );
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >&
+ getApplicationUI() const { return m_xApplication; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >
+ getConnection() const;
+
+ public:
+ DatabaseObjectView(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& _rxApplication,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxParentFrame,
+ const ::rtl::OUString& _rComponentURL
+ );
+ virtual ~DatabaseObjectView(){}
+
+ /** sets the target frame into which the view should be loaded.
+
+ By default, the view is loaded into a top-level frame not being part of the
+ Desktop.
+ */
+ void setTargetFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame )
+ {
+ m_xFrameLoader.set( _rxFrame, ::com::sun::star::uno::UNO_QUERY );
+ }
+
+ /** opens a view for a to-be-created object
+
+ @param _xDataSource
+ the data source for which a new object is to be created
+ @return
+ the controller of the newly created document
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
+ createNew(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource >& _xDataSource,
+ const ::comphelper::NamedValueCollection& i_rDispatchArgs = ::comphelper::NamedValueCollection()
+ );
+
+ /** opens a view for an existent object
+
+ @param _xDataSource
+ the data source for which a new object is to be created
+ @param _rObjectName
+ the name of the object to be edited
+ @param _rArgs
+ Additional settings which should be forwarded to the frame
+ @return
+ the frame into which the view has been loaded
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
+ openExisting(
+ const ::com::sun::star::uno::Any& _aDataSource,
+ const ::rtl::OUString& _rName,
+ const ::comphelper::NamedValueCollection& i_rDispatchArgs
+ );
+ };
+
+ //======================================================================
+ //= QueryDesigner
+ //======================================================================
+ class QueryDesigner : public DatabaseObjectView
+ {
+ protected:
+ sal_Int32 m_nCommandType;
+
+ protected:
+ virtual void fillDispatchArgs(
+ ::comphelper::NamedValueCollection& i_rDispatchArgs,
+ const ::com::sun::star::uno::Any& _aDataSource,
+ const ::rtl::OUString& _rObjectName
+ );
+
+ public:
+ QueryDesigner(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& _rxApplication,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxParentFrame,
+ bool _bCreateView
+ );
+ };
+
+ //======================================================================
+ //= TableDesigner
+ //======================================================================
+ class TableDesigner : public DatabaseObjectView
+ {
+ protected:
+ virtual void fillDispatchArgs(
+ ::comphelper::NamedValueCollection& i_rDispatchArgs,
+ const ::com::sun::star::uno::Any& _aDataSource,
+ const ::rtl::OUString& _rObjectName
+ );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > doCreateView(
+ const ::com::sun::star::uno::Any& _rDataSource,
+ const ::rtl::OUString& _rObjectName,
+ const ::comphelper::NamedValueCollection& i_rCreationArgs
+ );
+
+ public:
+ TableDesigner(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& _rxApplication,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxParentFrame
+ );
+
+ private:
+ /** retrieves the table designer component as provided by the connection, if any
+ @param _rTableName
+ the name of the table for which a designer is to be obtained
+ @return
+ the designer component, as provided by the connection, or <NULL/>, if the connection
+ does not provide a specialized designer.
+ @see com::sun::star::sdb::application::XTableUIProvider
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ impl_getConnectionProvidedDesigner_nothrow( const ::rtl::OUString& _rTableName );
+ };
+
+ //======================================================================
+ //= ResultSetBrowser
+ //======================================================================
+ class ResultSetBrowser : public DatabaseObjectView
+ {
+ private:
+ sal_Bool m_bTable;
+
+ protected:
+ virtual void fillDispatchArgs(
+ ::comphelper::NamedValueCollection& i_rDispatchArgs,
+ const ::com::sun::star::uno::Any& _aDataSource,
+ const ::rtl::OUString& _rQualifiedName
+ );
+
+ public:
+ ResultSetBrowser(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& _rxApplication,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxParentFrame,
+ sal_Bool _bTable
+ );
+
+ };
+ //======================================================================
+ //= RelationDesigner
+ //======================================================================
+ class RelationDesigner : public DatabaseObjectView
+ {
+ public:
+ RelationDesigner(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& _rxApplication,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxParentFrame
+ );
+ };
+// .........................................................................
+} // namespace dbaui
+// .........................................................................
+
+#endif // DBACCESS_DATABASE_OBJECT_VIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/datasourceconnector.hxx b/dbaccess/source/ui/inc/datasourceconnector.hxx
new file mode 100644
index 000000000000..12aba17aed6f
--- /dev/null
+++ b/dbaccess/source/ui/inc/datasourceconnector.hxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_DATASOURCECONNECTOR_HXX_
+#define _DBAUI_DATASOURCECONNECTOR_HXX_
+
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdbc/XDataSource.hpp>
+
+namespace dbtools
+{
+ class SQLExceptionInfo;
+}
+
+class Window;
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+ //=====================================================================
+ //= ODatasourceConnector
+ //=====================================================================
+ class ODatasourceConnector
+ {
+ protected:
+ Window* m_pErrorMessageParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ m_xORB;
+ ::rtl::OUString m_sContextInformation;
+
+ public:
+ ODatasourceConnector(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ Window* _pMessageParent
+ );
+ ODatasourceConnector(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ Window* _pMessageParent,
+ const ::rtl::OUString& _rContextInformation
+ );
+
+ /// returns <TRUE/> if the object is able to create data source connections
+ sal_Bool isValid() const { return m_xORB.is(); }
+
+ /** creates a connection to the data source, displays the possible error to the user, or returns it
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >
+ connect(
+ const ::rtl::OUString& _rDataSourceName,
+ ::dbtools::SQLExceptionInfo* _pErrorInfo
+ ) const;
+
+ /** creates a connection to the data source, displays the possible error to the user, or returns it
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >
+ connect(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>& _xDataSource,
+ ::dbtools::SQLExceptionInfo* _pErrorInfo
+ ) const;
+ };
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_DATASOURCECONNECTOR_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/datasourcemap.hxx b/dbaccess/source/ui/inc/datasourcemap.hxx
new file mode 100644
index 000000000000..4b19d28b36a1
--- /dev/null
+++ b/dbaccess/source/ui/inc/datasourcemap.hxx
@@ -0,0 +1,266 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_DATASOURCEMAP_HXX
+#define DBAUI_DATASOURCEMAP_HXX
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/stl_types.hxx>
+#include <tools/string.hxx>
+
+class SfxItemPool;
+class SfxItemSet;
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+ //=====================================================================
+ //= ODatasourceMap
+ //=====================================================================
+ class ODatasourceMap
+ {
+ struct DatasourceInfo
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ xDatasource;
+ SfxItemSet* pModifications;
+
+ DatasourceInfo() :pModifications (NULL) { }
+ DatasourceInfo(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDS,
+ SfxItemSet* _pMods = NULL)
+ :xDatasource(_rxDS), pModifications(_pMods) { }
+ };
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ m_xORB; /// service factory
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
+ m_xDatabaseContext; /// database context we're working in
+
+ DECLARE_STL_USTRINGACCESS_MAP(DatasourceInfo, DatasourceInfos);
+ DatasourceInfos m_aDatasources; /// known infos about data sources
+
+ // deleted data sources, not necessarily with distinct names, that's why accessed via unique ids
+ DECLARE_STL_MAP(sal_Int32, DatasourceInfo, ::std::less< sal_Int32 >, MapInt2Info);
+ MapInt2Info m_aDeletedDatasources;
+
+ public:
+ /// iterating through all data sources
+ class Iterator;
+ friend class ODatasourceMap::Iterator;
+
+ /// encapsulates the infos about a data source for access from outside the class
+ class ODatasourceInfo;
+ friend class ODatasourceMap::ODatasourceInfo;
+
+ ODatasourceInfo operator[](const ::rtl::OUString _rName);
+
+ ODatasourceMap(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB);
+
+ // get the database context
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
+ getContext() { return m_xDatabaseContext; }
+
+ /// first element for iterating through the datasources
+ Iterator begin();
+ /// last element for iterating through the datasources
+ Iterator end();
+
+ /// first element for iterating through the deleted datasources
+ Iterator beginDeleted();
+ /// last element for iterating through the deleted datasources
+ Iterator endDeleted();
+
+ /// check if the object contains a valid datasource enumeration
+ sal_Bool isValid() const { return m_xDatabaseContext.is(); }
+ /// check if a datasource with the given name exists
+ sal_Bool exists(const ::rtl::OUString& _rName) const;
+ /// return the number of datasources available
+ sal_Int32 size() const { return m_aDatasources.size(); }
+ /// clear the map (non-deleted <em>and</em> deleted items)
+ void clear();
+ /// clear the map (deleted items only)
+ void clearDeleted();
+
+ /// clear the modification items for a datasource
+ void clearModifiedFlag(const ::rtl::OUString& _rName);
+
+ /** tell the map that a data source is scheduled to be deleted.
+ @return id for accessing the deleted data source later. -1 if no free id existed or an error occured
+ */
+ sal_Int32 markDeleted(const ::rtl::OUString& _rName);
+
+ /** restores a datasource which has previously been marked as deleted.<p/>
+ @param _nAccessId the access id as got from <method>markDeleted</method>
+ @param _rName contains, upon return, the name of the datasource the access key refers to
+ @return sal_True if the datasource was successfully restored, sal_False if it could not be restored
+ because of a naming conflict (e.g. because another data source now has the name of the
+ to-be-restored one).
+ @see renamed
+ @see markDeleted
+ */
+ sal_Bool restoreDeleted(sal_Int32 _nAccessId, ::rtl::OUString& _rName);
+
+ /// remove an element from the map
+ void deleted(const ::rtl::OUString& _rName);
+ // (should be an erase(const Iterator&), but this is way to general ...
+
+ /// update the infos for a data source with a given item set
+ void update(const ::rtl::OUString& _rName, SfxItemSet& _rSet);
+ /** Tells the map that an entry has been renamed in a sense that it should be accessible under
+ a new name. This does not necesssarily mean that the data source has been renamed within
+ it's database context
+ */
+ void renamed(const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName);
+
+ /** adjust the registration name if necessary<p/>
+ The real name of the data source (as indicated in the SfxItemSet for this ds) may be another
+ one than the name the ds is registered for. This method corrects this, the ds will become registered
+ under it's real name.
+ @param _rName the name the ds is registered for
+ @return the real name of the data source
+ */
+ ::rtl::OUString adjustRealName(const ::rtl::OUString& _rName);
+
+ protected:
+ /** ensure that the DatabaseInfo for the named object is filled<p/>
+ This method allows us lazy access to the data sources: They're retrieved from the context
+ only if they're accessed by somebody.
+ */
+ void ensureObject(const ::rtl::OUString& _rName);
+ };
+
+ //-------------------------------------------------------------------------
+ //- ODatasourceMap::ODatasourceInfo
+ //-------------------------------------------------------------------------
+ class ODatasourceMap::ODatasourceInfo
+ {
+ friend class ODatasourceMap;
+ friend class ODatasourceMap::Iterator;
+
+ private:
+ ODatasourceMap* m_pOwner;
+ const ODatasourceMap::DatasourceInfo& m_rInfoImpl;
+ ::rtl::OUString m_sName;
+ sal_Int32 m_nAccessKey;
+
+ public:
+ ODatasourceInfo(const ODatasourceInfo& _rSource)
+ :m_pOwner(_rSource.m_pOwner), m_sName(_rSource.m_sName), m_rInfoImpl(_rSource.m_rInfoImpl), m_nAccessKey(_rSource.m_nAccessKey) { }
+
+ /// check if the datasource settings are modified
+ sal_Bool isModified() const;
+ /// get the name the datasource is registered under
+ ::rtl::OUString getName() const { return m_sName; }
+ /// get the original name of a datasource (may habe been renamed)
+ ::rtl::OUString getOriginalName() const;
+ /// get the real name of the datasource, which is the name which is in the item set
+ ::rtl::OUString getRealName() const;
+ /// check if the datasource should is about to be renamed (which means the original name does not equal the real name
+ sal_Bool isRenamed() const { return !getRealName().equals(getOriginalName()); }
+ /// get the key used to acces the object in the data source map
+ sal_Int32 getAccessKey() const { return m_nAccessKey; }
+
+ /// return the datasource the object represents
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ getDatasource() const;
+ /** return the modifications for the data source<p/>
+ The return value is non-NULL if and only if <method>isModified</method> returned sal_True
+ */
+ const SfxItemSet*
+ getModifications() const { return m_rInfoImpl.pModifications; }
+
+ operator ::rtl::OUString() const { return getName(); }
+ operator String() const { return getName().getStr(); }
+
+ const ODatasourceInfo* const operator->() const { return this; }
+
+ protected:
+ ODatasourceInfo(
+ ODatasourceMap* _pOwner, const ::rtl::OUString& _rName,
+ const ODatasourceMap::DatasourceInfo& _rSource, sal_Int32 _nAccessKey)
+ :m_pOwner(_pOwner), m_sName(_rName), m_rInfoImpl(_rSource), m_nAccessKey(_nAccessKey) { }
+ };
+
+ //-------------------------------------------------------------------------
+ //- ODatasourceMap::Iterator
+ //-------------------------------------------------------------------------
+ class ODatasourceMap::Iterator
+ {
+ friend class ODatasourceMap;
+ protected:
+ ODatasourceMap* m_pOwner;
+ ODatasourceMap::ConstDatasourceInfosIterator m_aPos;
+ ODatasourceMap::ConstMapInt2InfoIterator m_aPosDeleted;
+ sal_Bool m_bLoopingDeleted;
+
+ public:
+ Iterator(const Iterator& _rSource);
+
+ ODatasourceInfo operator->() const;
+ ODatasourceInfo operator*() const;
+
+ /// prefix increment
+ const Iterator& operator++();
+ /// postfix increment
+ const Iterator operator++(int) { Iterator hold(*this); ++*this; return hold; }
+
+ /// prefix decrement
+ const Iterator& operator--();
+ /// postfix decrement
+ const Iterator operator--(int) { Iterator hold(*this); --*this; return hold; }
+
+
+ // compare two iterators
+ friend bool operator==(const Iterator& lhs, const Iterator& rhs)
+ {
+ if (lhs.m_bLoopingDeleted)
+ return lhs.m_aPosDeleted == rhs.m_aPosDeleted;
+ else
+ return lhs.m_aPos == rhs.m_aPos;
+ }
+
+ friend bool operator!=(const Iterator& lhs, const Iterator& rhs) { return !(lhs == rhs); }
+
+ protected:
+ Iterator(ODatasourceMap* _pOwner, ODatasourceMap::ConstDatasourceInfosIterator _rPos);
+ Iterator(ODatasourceMap* _pOwner, ODatasourceMap::ConstMapInt2InfoIterator _rPos);
+
+ protected:
+ ::rtl::OUString implGetName(const ODatasourceMap::DatasourceInfo& _rInfo) const;
+ };
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // DBAUI_DATASOURCEMAP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx
new file mode 100644
index 000000000000..0a31ba19f7de
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbadmin.hxx
@@ -0,0 +1,139 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_DBADMIN_HXX_
+#define _DBAUI_DBADMIN_HXX_
+
+#include <sal/macros.h>
+#include <sfx2/tabdlg.hxx>
+#include "dsntypes.hxx"
+#include "IItemSetHelper.hxx"
+#include <comphelper/uno3.hxx>
+#include <memory>
+
+FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
+FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+//=========================================================================
+//= ODbAdminDialog
+//=========================================================================
+class OGeneralPage;
+class ODbDataSourceAdministrationHelper;
+/** tab dialog for administrating the office wide registered data sources
+*/
+class ODbAdminDialog : public SfxTabDialog , public IItemSetHelper, public IDatabaseSettingsDialog
+{
+private:
+ typedef ::std::stack< sal_Int32 > PageStack;
+ PageStack m_aCurrentDetailPages; // ids of all currently enabled (type-dependent) detail pages
+
+ ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
+
+ sal_Bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing
+ sal_Bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/>
+ USHORT m_nMainPageID;
+
+public:
+ /** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed
+ after the dialog has been destroyed
+ */
+ ODbAdminDialog(Window* pParent,
+ SfxItemSet* _pItems,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ );
+ virtual ~ODbAdminDialog();
+
+ /** create and return an item set for use with the dialog.
+ @param _pTypeCollection pointer to an <type>ODatasourceMap</type>. May be NULL, in this case
+ the pool will not contain a typecollection default.
+ */
+ static SfxItemSet* createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults, ::dbaccess::ODsnTypeCollection* _pTypeCollection);
+ /** destroy and item set / item pool / pool defaults previously created by <method>createItemSet</method>
+ */
+ static void destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults);
+
+ /** selects the DataSource
+ @param _rName
+ The name of the data source
+ */
+ void selectDataSource(const ::com::sun::star::uno::Any& _aDataSourceName);
+
+ virtual const SfxItemSet* getOutputSet() const;
+ virtual SfxItemSet* getWriteOutputSet();
+
+ // forwards to ODbDataSourceAdministrationHelper
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const;
+ virtual ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >,sal_Bool> createConnection();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver();
+ virtual ::rtl::OUString getDatasourceType(const SfxItemSet& _rSet) const;
+ virtual void clearPassword();
+ virtual sal_Bool saveDatasource();
+ virtual void setTitle(const ::rtl::OUString& _sTitle);
+ virtual void enableConfirmSettings( bool _bEnable );
+
+protected:
+ // adds a new detail page and remove all the old ones
+ void addDetailPage(USHORT _nPageId,USHORT _nTextId,CreateTabPage pCreateFunc);
+
+ virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage);
+ virtual short Ok();
+
+protected:
+ inline sal_Bool isUIEnabled() const { return m_bUIEnabled; }
+ inline void disabledUI() { m_bUIEnabled = sal_False; }
+
+private:
+ /// select a datasource with a given name, adjust the item set accordingly, and everything like that ..
+ void impl_selectDataSource(const ::com::sun::star::uno::Any& _aDataSourceName);
+ /// reset the tag pages according to m_sCurrentDatasource and <arg>_rxDatasource</arg>
+ void impl_resetPages(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDatasource);
+
+ enum ApplyResult
+ {
+ AR_LEAVE_MODIFIED, // somthing was modified and has successfully been committed
+ AR_LEAVE_UNCHANGED, // no changes were made
+ AR_KEEP // don't leave the page (e.g. because an error occured)
+ };
+ /** apply all changes made
+ */
+ ApplyResult implApplyChanges();
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_DBADMIN_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbexchange.hxx b/dbaccess/source/ui/inc/dbexchange.hxx
new file mode 100644
index 000000000000..f41d5971afd6
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbexchange.hxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_DBEXCHANGE_HXX
+#define DBAUI_DBEXCHANGE_HXX
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <svx/dbaexchange.hxx>
+#include <comphelper/uno3.hxx>
+#include <vector>
+
+#include <rtl/ref.hxx>
+
+namespace dbaui
+{
+
+ class ORTFImportExport;
+ class OHTMLImportExport;
+
+ class ODataClipboard : public ::svx::ODataAccessObjectTransferable
+
+ {
+ ::rtl::Reference< OHTMLImportExport > m_pHtml;
+ ::rtl::Reference< ORTFImportExport > m_pRtf;
+
+ public:
+ ODataClipboard(
+ const ::rtl::OUString& _rDatasource,
+ const sal_Int32 _nCommandType,
+ const ::rtl::OUString& _rCommand,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ );
+
+ ODataClipboard(
+ const ::rtl::OUString& _rDatasource,
+ const sal_Int32 _nCommandType,
+ const ::rtl::OUString& _rCommand,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ );
+
+ ODataClipboard(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_rAliveForm,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& i_rSelectedRows,
+ const sal_Bool i_bBookmarkSelection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_rORB
+ );
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ virtual void AddSupportedFormats();
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual void ObjectReleased();
+ virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ };
+}
+
+#endif // DBAUI_DBEXCHANGE_HXX
+
+
+
+
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx
new file mode 100644
index 000000000000..cb3f00cda447
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx
@@ -0,0 +1,170 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_DBTREELISTBOX_HXX
+#define DBAUI_DBTREELISTBOX_HXX
+
+#include "ScrollHelper.hxx"
+#include "moduledbu.hxx"
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+#include <svtools/svtreebx.hxx>
+#include <vcl/timer.hxx>
+
+#include <set>
+
+
+namespace dbaui
+{
+ struct DBTreeEditedEntry
+ {
+ SvLBoxEntry* pEntry;
+ XubString aNewText;
+ };
+
+ class IEntryFilter
+ {
+ public:
+ virtual bool includeEntry( SvLBoxEntry* _pEntry ) const = 0;
+ };
+
+ //========================================================================
+ class IControlActionListener;
+ class IContextMenuProvider;
+ class DBTreeListBox :public SvTreeListBox
+ {
+ OModuleClient m_aModuleClient;
+ OScrollHelper m_aScrollHelper;
+ Timer m_aTimer; // is needed for table updates
+ Point m_aMousePos;
+ ::std::set< SvListEntry* > m_aSelectedEntries;
+ SvLBoxEntry* m_pDragedEntry;
+ IControlActionListener* m_pActionListener;
+ IContextMenuProvider*
+ m_pContextMenuProvider;
+
+ Link m_aPreExpandHandler; // handler to be called before a node is expanded
+ Link m_aSelChangeHdl; // handlet to be called (asynchronously) when the selection changes in any way
+ Link m_aCutHandler; // called when someone press CTRL+X
+ Link m_aCopyHandler; // called when someone press CTRL+C
+ Link m_aPasteHandler; // called when someone press CTRL+V
+ Link m_aDeleteHandler; // called when someone press DELETE Key
+ Link m_aEditingHandler; // called before someone will edit an entry
+ Link m_aEditedHandler; // called after someone edited an entry
+ Link m_aEnterKeyHdl;
+
+
+ sal_Bool m_bHandleEnterKey;
+
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+
+ private:
+ void init();
+ DECL_LINK( OnTimeOut, void* );
+ DECL_LINK( OnResetEntry, SvLBoxEntry* );
+ DECL_LINK( ScrollUpHdl, SvTreeListBox* );
+ DECL_LINK( ScrollDownHdl, SvTreeListBox* );
+
+ public:
+ DBTreeListBox( Window* pParent
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ ,WinBits nWinStyle=0
+ ,sal_Bool _bHandleEnterKey = sal_False);
+ DBTreeListBox( Window* pParent
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ ,const ResId& rResId
+ ,sal_Bool _bHandleEnterKey = sal_False);
+ ~DBTreeListBox();
+
+ void setControlActionListener( IControlActionListener* _pListener ) { m_pActionListener = _pListener; }
+ void setContextMenuProvider( IContextMenuProvider* _pContextMenuProvider ) { m_pContextMenuProvider = _pContextMenuProvider; }
+
+ inline void setORB(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB) { m_xORB = _xORB; }
+
+
+ void SetPreExpandHandler(const Link& _rHdl) { m_aPreExpandHandler = _rHdl; }
+ void SetSelChangeHdl( const Link& _rHdl ) { m_aSelChangeHdl = _rHdl; }
+ void setCutHandler(const Link& _rHdl) { m_aCutHandler = _rHdl; }
+ void setCopyHandler(const Link& _rHdl) { m_aCopyHandler = _rHdl; }
+ void setPasteHandler(const Link& _rHdl) { m_aPasteHandler = _rHdl; }
+ void setDeleteHandler(const Link& _rHdl) { m_aDeleteHandler = _rHdl; }
+ void setEditingHandler(const Link& _rHdl) { m_aEditingHandler = _rHdl; }
+ void setEditedHandler(const Link& _rHdl) { m_aEditedHandler = _rHdl; }
+
+ // modified the given entry so that the expand handler is called whenever the entry is expanded
+ // (normally, the expand handler is called only once)
+ void EnableExpandHandler(SvLBoxEntry* _pEntry);
+
+ SvLBoxEntry* GetEntryPosByName( const String& aName, SvLBoxEntry* pStart = NULL, const IEntryFilter* _pFilter = NULL ) const;
+ virtual void RequestingChilds( SvLBoxEntry* pParent );
+ virtual void SelectHdl();
+ virtual void DeselectHdl();
+ // Window
+ virtual void KeyInput( const KeyEvent& rKEvt );
+
+ virtual void StateChanged( StateChangedType nStateChange );
+ virtual void InitEntry( SvLBoxEntry* pEntry, const XubString& aStr, const Image& aCollEntryBmp, const Image& aExpEntryBmp, SvLBoxButtonKind eButtonKind);
+
+ // enable editing for tables/views and queries
+ virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+
+ virtual BOOL DoubleClickHdl();
+
+ virtual PopupMenu* CreateContextMenu( void );
+ virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+
+ void SetEnterKeyHdl(const Link& rNewHdl) {m_aEnterKeyHdl = rNewHdl;}
+
+ void clearCurrentSelection() { m_aSelectedEntries.clear(); }
+
+ protected:
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+
+ // DragSourceHelper overridables
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+ // DropTargetHelper overridables
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& _rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& _rEvt );
+
+ virtual void ModelHasRemoved( SvListEntry* pEntry );
+ virtual void ModelHasEntryInvalidated( SvListEntry* pEntry );
+
+ void implStopSelectionTimer();
+ void implStartSelectionTimer();
+
+ protected:
+ using SvTreeListBox::ExecuteDrop;
+ };
+}
+
+#endif // DBAUI_DBTREELISTBOX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbu_brw.hrc b/dbaccess/source/ui/inc/dbu_brw.hrc
new file mode 100644
index 000000000000..8473a0ad81fa
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbu_brw.hrc
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBU_BRW_HRC_
+#define _DBU_BRW_HRC_
+
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+
+ // FREE RID_STR_BRW_START + 0
+#define RID_STR_DATABROWSER_FILTERED RID_STR_BRW_START + 1
+#define SBA_BROWSER_SETTING_ORDER RID_STR_BRW_START + 2
+#define SBA_BROWSER_SETTING_FILTER RID_STR_BRW_START + 3
+#define STR_DATASOURCE_GRIDCONTROL_DESC RID_STR_BRW_START + 4
+#define RID_STR_UNDO_MODIFY_RECORD RID_STR_BRW_START + 5
+#define STR_NO_COLUMNNAME_MATCHING RID_STR_BRW_START + 6
+#define RID_STR_SAVE_CURRENT_RECORD RID_STR_BRW_START + 7
+#define STR_DATASOURCE_GRIDCONTROL_NAME RID_STR_BRW_START + 8
+#define STR_OPENTABLES_WARNINGS RID_STR_BRW_START + 9
+#define STR_OPENTABLES_WARNINGS_DETAILS RID_STR_BRW_START + 10
+#define STR_CONNECTING_DATASOURCE RID_STR_BRW_START + 11
+#define STR_LOADING_QUERY RID_STR_BRW_START + 12
+#define STR_LOADING_TABLE RID_STR_BRW_START + 13
+
+// please adjust checking before insert new strings
+
+#if STR_LOADING_TABLE > RID_STR_BRW_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif // _DBU_BRW_HRC_
diff --git a/dbaccess/source/ui/inc/dbu_control.hrc b/dbaccess/source/ui/inc/dbu_control.hrc
new file mode 100644
index 000000000000..6a2a74e955ae
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbu_control.hrc
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBU_CONTROL_HRC_
+#define _DBU_CONTROL_HRC_
+
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+
+#define STR_TABLE_PRIV_NAME RID_STR_CONTROL_START
+#define STR_TABLE_PRIV_INSERT RID_STR_CONTROL_START + 1
+#define STR_TABLE_PRIV_DELETE RID_STR_CONTROL_START + 2
+#define STR_TABLE_PRIV_UPDATE RID_STR_CONTROL_START + 3
+#define STR_TABLE_PRIV_ALTER RID_STR_CONTROL_START + 4
+#define STR_TABLE_PRIV_REFERENCE RID_STR_CONTROL_START + 5
+#define STR_TABLE_PRIV_DROP RID_STR_CONTROL_START + 6
+#define STR_TABLE_PRIV_SELECT RID_STR_CONTROL_START + 7
+#define STR_ALL_TABLES_AND_VIEWS RID_STR_CONTROL_START + 8
+#define STR_COULDNOTCONNECT RID_STR_CONTROL_START + 9
+#define STR_COULDNOTCONNECT_PLEASECHECK RID_STR_CONTROL_START + 10
+#define STR_NOTABLEINFO RID_STR_CONTROL_START + 11
+#define STR_ALL_TABLES RID_STR_CONTROL_START + 12
+#define STR_ALL_VIEWS RID_STR_CONTROL_START + 13
+
+// please adjust checking before insert new strings
+
+#if STR_ALL_VIEWS > RID_STR_CONTROL_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif //_DBU_CONTROL_HRC_
+
diff --git a/dbaccess/source/ui/inc/dbu_dlg.hrc b/dbaccess/source/ui/inc/dbu_dlg.hrc
new file mode 100644
index 000000000000..f403caafd712
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbu_dlg.hrc
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBU_DLG_HRC_
+#define _DBU_DLG_HRC_
+
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+
+#define PAGE_X 281
+#define PAGE_Y 185
+#define WIZARD_PAGE_X 225
+#define WIZARD_PAGE_Y 210
+#define START_X 6
+#define START_Y 6
+
+
+#define CHECKBOX_HEIGHT 8
+#define LISTBOX_HEIGHT 12
+#define FIXEDTEXT_HEIGHT 8
+#define RELATED_CONTROLS 4
+#define UNRELATED_CONTROLS 7
+#define EDIT_HEIGHT 12
+#define BUTTON_HEIGHT 14
+#define BUTTON_WIDTH 50
+
+//constants for the wizards
+#define INIT_Y 28
+#define INDENTED_X 6
+#define INDENT_BELOW_RADIO 10
+#define INDENT_BELOW_CHECK 10
+
+
+#define STR_ADABAS_HELP_SYSDEVSPACE RID_STR_DLG_START
+#define STR_ADABAS_HELP_TRANSACT RID_STR_DLG_START + 1
+#define STR_ADABAS_HELP_DATADEVSPACES RID_STR_DLG_START + 2
+#define STR_ADABAS_HELP_SIZE RID_STR_DLG_START + 3
+#define STR_ADABAS_HELP_FREESIZE RID_STR_DLG_START + 4
+#define STR_ADABAS_HELP_MEMORYUSING RID_STR_DLG_START + 5
+#define STR_ADABAS_ERROR_SYSTEMTABLES RID_STR_DLG_START + 6
+#define STR_ERROR_PASSWORDS_NOT_IDENTICAL RID_STR_DLG_START + 7
+#define STR_INDEXDESIGN_DOUBLE_COLUMN_NAME RID_STR_DLG_START + 8
+#define STR_DATASOURCE_DEFAULTNAME RID_STR_DLG_START + 9
+#define STR_ERR_EMPTY_DSN_NAME RID_STR_DLG_START + 10
+#define STR_ERR_USE_CONNECT_TO RID_STR_DLG_START + 11
+#define STR_ALREADYEXISTOVERWRITE RID_STR_DLG_START + 12
+#define STR_QUERY_DROP_ALL RID_STR_DLG_START + 13
+#define STR_INDEX_NAME_ALREADY_USED RID_STR_DLG_START + 14
+#define STR_ASK_FOR_DIRECTORY_CREATION RID_STR_DLG_START + 15
+#define STR_COULD_NOT_CREATE_DIRECTORY RID_STR_DLG_START + 16
+#define STR_ADDRESSBOOK_SYSTEM RID_STR_DLG_START + 17
+#define STR_ADDRESSBOOK_MOZILLA RID_STR_DLG_START + 18
+#define STR_ADDRESSBOOK_EVOLUTION RID_STR_DLG_START + 19
+ // FREE
+#define STR_ADDRESSBOOK_LDAP RID_STR_DLG_START + 21
+#define STR_ADDRESSBOOK_OUTLOOK RID_STR_DLG_START + 22
+#define STR_COMMAND_EXECUTED_SUCCESSFULLY RID_STR_DLG_START + 23
+#define STR_DIRECTSQL_CONNECTIONLOST RID_STR_DLG_START + 24
+#define STR_HINT_READONLY_CONNECTION RID_STR_DLG_START + 25
+#define STR_HINT_CONNECTION_NOT_CAPABLE RID_STR_DLG_START + 26
+#define STR_USERADMIN_NOT_AVAILABLE RID_STR_DLG_START + 27
+#define STR_TAB_INDEX_SORTORDER RID_STR_DLG_START + 28
+#define STR_TAB_INDEX_FIELD RID_STR_DLG_START + 29
+#define STR_ORDER_ASCENDING RID_STR_DLG_START + 30
+#define STR_ORDER_DESCENDING RID_STR_DLG_START + 31
+#define STR_CONFIRM_DROP_INDEX RID_STR_DLG_START + 32
+#define STR_LOGICAL_INDEX_NAME RID_STR_DLG_START + 33
+#define STR_CONNECTION_TEST RID_STR_DLG_START + 34
+#define STR_CONNECTION_SUCCESS RID_STR_DLG_START + 35
+ // FREE
+#define STR_JDBCDRIVER_SUCCESS RID_STR_DLG_START + 37
+#define STR_JDBCDRIVER_NO_SUCCESS RID_STR_DLG_START + 38
+#define STR_MSACCESS_FILTERNAME RID_STR_DLG_START + 39
+#define STR_CONNECTION_NO_SUCCESS RID_STR_DLG_START + 40
+#define STR_DBASE_PATH_OR_FILE RID_STR_DLG_START + 41
+#define STR_TEXT_PATH_OR_FILE RID_STR_DLG_START + 45
+#define STR_FLAT_PATH_OR_FILE RID_STR_DLG_START + 46
+#define STR_CALC_PATH_OR_FILE RID_STR_DLG_START + 47
+#define STR_NAME_OF_ODBC_DATASOURCE RID_STR_DLG_START + 48
+#define STR_MYSQL_DATABASE_NAME RID_STR_DLG_START + 49
+#define STR_ORACLE_DATABASE_NAME RID_STR_DLG_START + 50
+#define STR_ADABAS_DATABASE_NAME RID_STR_DLG_START + 51
+#define STR_MSACCESS_MDB_FILE RID_STR_DLG_START + 52
+#define STR_COMMONURL RID_STR_DLG_START + 53
+#define STR_DATABASEDEFAULTNAME RID_STR_DLG_START + 54
+#define STR_NO_ADABASE_DATASOURCES RID_STR_DLG_START + 55
+#define STR_NO_ADDITIONAL_SETTINGS RID_STR_DLG_START + 56
+#define STR_HOSTNAME RID_STR_DLG_START + 57
+#define STR_ADDRESSBOOK_THUNDERBIRD RID_STR_DLG_START + 58
+#define STR_MOZILLA_PROFILE_NAME RID_STR_DLG_START + 59
+#define STR_THUNDERBIRD_PROFILE_NAME RID_STR_DLG_START + 60
+#define STR_EXPLAN_STRINGCONVERSION_ERROR RID_STR_DLG_START + 61
+#define STR_EXCEPTION_ERROR RID_STR_DLG_START + 62
+#define STR_EXCEPTION_WARNING RID_STR_DLG_START + 63
+#define STR_EXCEPTION_INFO RID_STR_DLG_START + 64
+#define STR_EXCEPTION_DETAILS RID_STR_DLG_START + 65
+#define STR_MSACCESS_2007_FILTERNAME RID_STR_DLG_START + 66
+#define STR_MSACCESS_ACCDB_FILE RID_STR_DLG_START + 67
+
+
+// please adjust checking before insert new strings
+
+#define LAST_STR_HERE RID_STR_DLG_START + 67
+
+#if LAST_STR_HERE > RID_STR_DLG_END
+#error Resource-Id Overflow in #file, #line
+#endif
+
+#endif //_DBU_DLG_HRC_
+
+
diff --git a/dbaccess/source/ui/inc/dbu_misc.hrc b/dbaccess/source/ui/inc/dbu_misc.hrc
new file mode 100644
index 000000000000..dcf86cdf04b4
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbu_misc.hrc
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBU_MISC_HRC_
+#define _DBU_MISC_HRC_
+
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+
+// free
+// free
+#define STR_WIZ_COLUMN_SELECT_TITEL RID_STR_MISC_START + 2
+#define STR_WIZ_TYPE_SELECT_TITEL RID_STR_MISC_START + 3
+#define STR_WIZ_PKEY_ALREADY_DEFINED RID_STR_MISC_START + 4
+#define STR_WIZ_NAME_MATCHING_TITEL RID_STR_MISC_START + 5
+#define STR_WIZ_TABLE_COPY RID_STR_MISC_START + 6
+#define STR_COPYTABLE_TITLE_COPY RID_STR_MISC_START + 7
+#define STR_COULDNOTOPEN_LINKEDDOC RID_STR_MISC_START + 8
+#define STR_SUGGEST_APPEND_TABLE_DATA RID_STR_MISC_START + 9
+#define STR_UNDO_COLON RID_STR_MISC_START + 10
+#define STR_REDO_COLON RID_STR_MISC_START + 11
+#define STR_UNKNOWN_TYPE_FOUND RID_STR_MISC_START + 12
+#define STR_FILE_DOES_NOT_EXIST RID_STR_MISC_START + 13
+#define STR_WARNINGS_DURING_CONNECT RID_STR_MISC_START + 14
+#define STR_NAMED_OBJECT_ALREADY_EXISTS RID_STR_MISC_START + 15
+#define STR_INVALID_TABLE_NAME RID_STR_MISC_START + 16
+#define STR_INVALID_TABLE_NAME_LENGTH RID_STR_MISC_START + 17
+
+// please adjust checking before insert new strings
+
+#if STR_INVALID_TABLE_NAME_LENGTH > RID_STR_MISC_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif // _DBU_MISC_HRC_
+
+
+
diff --git a/dbaccess/source/ui/inc/dbu_qry.hrc b/dbaccess/source/ui/inc/dbu_qry.hrc
new file mode 100644
index 000000000000..04b2daa5da66
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbu_qry.hrc
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBU_QRY_HRC_
+#define _DBU_QRY_HRC_
+
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+
+
+#define STR_QRY_FUNCTIONS RID_STR_QRY_START
+#define STR_QRY_SORTTEXT RID_STR_QRY_START + 1
+#define STR_QUERY_UNDO_MOVETABWIN RID_STR_QRY_START + 2
+#define STR_QUERY_UNDO_SIZETABWIN RID_STR_QRY_START + 3
+#define STR_QUERY_UNDO_INSERTCONNECTION RID_STR_QRY_START + 4
+#define STR_QUERY_UNDO_REMOVECONNECTION RID_STR_QRY_START + 5
+#define STR_QUERY_UNDO_TABWINSHOW RID_STR_QRY_START + 6
+#define STR_QUERY_UNDO_TABWINDELETE RID_STR_QRY_START + 7
+#define STR_QUERY_UNDO_MODIFY_CELL RID_STR_QRY_START + 8
+#define STR_QUERY_UNDO_SIZE_COLUMN RID_STR_QRY_START + 9
+#define STR_QUERY_UNDO_TABFIELDDELETE RID_STR_QRY_START + 10
+#define STR_QUERY_UNDO_TABFIELDCREATE RID_STR_QRY_START + 11
+#define STR_QRY_TOOCOMPLEX RID_STR_QRY_START + 12
+#define RID_STR_TABLE_DOESNT_EXIST RID_STR_QRY_START + 13
+#define RID_STR_FIELD_DOESNT_EXIST RID_STR_QRY_START + 14
+#define RID_STR_TOMUCHTABLES RID_STR_QRY_START + 15
+#define STR_QUERY_INNER_JOIN RID_STR_QRY_START + 16
+#define STR_QUERY_LEFTRIGHT_JOIN RID_STR_QRY_START + 17
+#define STR_QUERY_FULL_JOIN RID_STR_QRY_START + 18
+#define STR_QUERY_SORTTEXT RID_STR_QRY_START + 19
+#define STR_QUERY_FUNCTIONS RID_STR_QRY_START + 20
+#define STR_QUERY_NOTABLE RID_STR_QRY_START + 21
+#define STR_QRY_ORDERBY_UNRELATED RID_STR_QRY_START + 22
+#define STR_QUERY_HANDLETEXT RID_STR_QRY_START + 23
+#define STR_QUERY_FALSE RID_STR_QRY_START + 24
+#define STR_QUERY_TRUE RID_STR_QRY_START + 25
+#define STR_QRY_TOO_MANY_COLUMNS RID_STR_QRY_START + 26
+#define STR_SVT_SQL_SYNTAX_ERROR RID_STR_QRY_START + 27
+#define STR_QUERYDESIGN_NO_VIEW_SUPPORT RID_STR_QRY_START + 28
+#define STR_QUERYDESIGN_NO_VIEW_ASK RID_STR_QRY_START + 29
+#define STR_QRY_NOSELECT RID_STR_QRY_START + 30
+#define STR_QRY_COLUMN_NOT_FOUND RID_STR_QRY_START + 31
+#define STR_QRY_JOIN_COLUMN_COMPARE RID_STR_QRY_START + 32
+#define STR_QRY_LIKE_LEFT_NO_COLUMN RID_STR_QRY_START + 33
+#define STR_QRY_CHECK_CASESENSITIVE RID_STR_QRY_START + 34
+#define STR_QUERY_UNDO_TABFIELDMOVED RID_STR_QRY_START + 35
+#define STR_QRY_ILLEGAL_JOIN RID_STR_QRY_START + 36
+#define STR_QRY_TOO_LONG_STATEMENT RID_STR_QRY_START + 37
+#define STR_QRY_SYNTAX RID_STR_QRY_START + 38
+#define STR_QRY_NATIVE RID_STR_QRY_START + 39
+#define STR_QRY_TOO_MANY_TABLES RID_STR_QRY_START + 40
+#define STR_QRY_TOOMANYCOND RID_STR_QRY_START + 41
+#define STR_QUERYDESIGN RID_STR_QRY_START + 42
+#define STR_VIEWDESIGN RID_STR_QRY_START + 43
+#define STR_JOIN_TYPE_HINT RID_STR_QRY_START + 44
+#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
+#define STR_NO_DATASOURCE_OR_CONNECTION RID_STR_QRY_START + 49
+#define STR_NO_ALTER_VIEW_SUPPORT RID_STR_QRY_START + 50
+#define STR_QUERY_CROSS_JOIN RID_STR_QRY_START + 51
+#define STR_QUERY_NATURAL_JOIN RID_STR_QRY_START + 52
+ // please adjust checking when inserting new strings
+
+
+#if STR_QUERY_NATURAL_JOIN > RID_STR_QRY_END
+#error resource id overflow in #file, #line
+#endif
+
+#endif // _DBU_QRY_HRC_
+
diff --git a/dbaccess/source/ui/inc/dbu_rel.hrc b/dbaccess/source/ui/inc/dbu_rel.hrc
new file mode 100644
index 000000000000..b53c752e619e
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbu_rel.hrc
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBU_REL_HRC_
+#define _DBU_REL_HRC_
+
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+
+
+#define STR_QUERY_REL_EDIT_RELATION RID_STR_REL_START
+#define STR_RELATIONDESIGN RID_STR_REL_START + 1
+#define STR_RELATIONDESIGN_NOT_AVAILABLE RID_STR_REL_START + 2
+#define STR_QUERY_REL_DELETE_WINDOW RID_STR_REL_START + 3
+#define STR_QUERY_REL_EDIT RID_STR_REL_START + 4
+#define STR_QUERY_REL_CREATE RID_STR_REL_START + 5
+#define STR_QUERY_REL_COULD_NOT_CREATE RID_STR_REL_START + 6
+// please adjust checking before insert new strings
+
+#if STR_QUERY_REL_COULD_NOT_CREATE > RID_STR_REL_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif //_DBU_REL_HRC_
+
+
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
new file mode 100644
index 000000000000..8228be7bbcbf
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -0,0 +1,420 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBU_RESOURCE_HRC_
+#define _DBU_RESOURCE_HRC_
+
+#ifndef _SOLAR_HRC
+#include <svl/solar.hrc>
+#endif
+
+#define RID_DIALOG_START RID_DBACCESS_START
+#define RID_PAGE_START RID_DBACCESS_START
+#define RID_ERRORBOX_START RID_DBACCESS_START
+#define RID_QUERYBOX_START RID_DBACCESS_START
+#define RID_TOOLBOX_START RID_DBACCESS_START
+#define RID_BITMAP_START RID_DBACCESS_START
+#define RID_IMAGE_START RID_DBACCESS_START
+#define RID_IMAGELIST_START RID_DBACCESS_START
+#define RID_MENU_START RID_DBACCESS_START
+#define RID_STRING_START RID_DBACCESS_START
+#define RID_UNTYPED_START RID_DBACCESS_START
+#define RID_WARN_START RID_DBACCESS_START
+#define RID_CONTROL_START RID_DBACCESS_START
+#define RID_MISC_START RID_DBACCESS_START
+
+// new defines to make the strings folder specific
+#define RID_STR_BRW_START RID_DBACCESS_START
+#define RID_STR_BRW_END RID_STR_BRW_START + 40 // 0 - 39
+
+#define RID_STR_CONTROL_START RID_STR_BRW_END
+#define RID_STR_CONTROL_END RID_STR_CONTROL_START + 30 // 40 - 69
+
+#define RID_STR_DLG_START RID_STR_CONTROL_END
+#define RID_STR_DLG_END RID_STR_DLG_START + 80 // 70 - 149
+
+#define RID_STR_MISC_START RID_STR_DLG_END
+#define RID_STR_MISC_END RID_STR_MISC_START + 20 // 150 - 169
+
+#define RID_STR_QRY_START RID_STR_MISC_END
+#define RID_STR_QRY_END RID_STR_QRY_START + 80 // 170 - 249
+
+#define RID_STR_TBL_START RID_STR_QRY_END
+#define RID_STR_TBL_END RID_STR_TBL_START + 80 // 250 - 329
+
+#define RID_STR_REL_START RID_STR_TBL_END
+#define RID_STR_REL_END RID_STR_REL_START + 10 // 330 - 349
+
+#define RID_STR_UNO_START RID_STR_REL_END
+#define RID_STR_UNO_END RID_STR_UNO_START + 20 // 350 - 369
+
+#define RID_STR_GEN_START RID_STR_UNO_END
+#define RID_STR_GEN_END RID_STR_GEN_START + 55 // 370 - 424
+
+#define RID_STR_APP_START RID_STR_GEN_END
+#define RID_STR_APP_END RID_STR_APP_START + 40 // 425 - 464
+
+
+#if RID_STR_GEN_END > RID_DBACCESS_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+//========================================================================
+// dialog ids
+
+#define DLG_DATABASE_ADMINISTRATION RID_DIALOG_START + 0
+#define DLG_DBASE_INDEXES RID_DIALOG_START + 1
+#define DLG_SQLMESSAGE RID_DIALOG_START + 2
+#define DLG_SQLEXCEPTIONCHAIN RID_DIALOG_START + 3
+#define DLG_DATASOURCE_SELECTION RID_DIALOG_START + 4
+#define DLG_PARAMETERS RID_DIALOG_START + 5
+#define DLG_FILTERCRIT RID_DIALOG_START + 6
+#define DLG_ORDERCRIT RID_DIALOG_START + 7
+#define DLG_ROWHEIGHT RID_DIALOG_START + 8
+#define DLG_COLWIDTH RID_DIALOG_START + 9
+#define DLG_ATTR RID_DIALOG_START + 10
+#define DLG_SAVE_AS RID_DIALOG_START + 11
+#define DLG_ERROR RID_DIALOG_START + 12
+#define DLG_TEXT RID_DIALOG_START + 13
+#define DLG_JOIN_TABADD RID_DIALOG_START + 14
+#define DLG_QRY_JOIN RID_DIALOG_START + 15
+#define WIZ_RTFCOPYTABLE RID_DIALOG_START + 16
+#define DLG_REL_PROPERTIES RID_DIALOG_START + 17
+#define DLG_ADABASSTAT RID_DIALOG_START + 18
+#define DLG_INDEXDESIGN RID_DIALOG_START + 19
+#define DLG_DATABASE_ADABASADMIN RID_DIALOG_START + 20
+#define DLG_DATABASE_USERADMIN RID_DIALOG_START + 21
+#define DLG_DIRECTSQL RID_DIALOG_START + 22
+#define DLG_PASSWORD RID_DIALOG_START + 23
+#define DLG_DOMAINPASSWORD RID_DIALOG_START + 24
+#define DLG_RENAME RID_DIALOG_START + 25
+#define DLG_DATABASE_ADVANCED RID_DIALOG_START + 26
+#define DLG_COLLECTION_VIEW RID_DIALOG_START + 27
+#define DLG_DATABASE_TYPE_CHANGE RID_DIALOG_START + 28
+#define DLG_DATABASE_WIZARD RID_DIALOG_START + 29
+#define RID_EXTENSION_NOT_PRESENT_DLG RID_DIALOG_START + 30
+#define DLG_TEXT_CONNECTION_SETTINGS RID_DIALOG_START + 31
+
+//========================================================================
+// tab pages
+
+#define PAGE_GENERAL RID_PAGE_START + 0
+#define PAGE_DBASE RID_PAGE_START + 1
+#define PAGE_ODBC RID_PAGE_START + 3
+#define PAGE_TEXT RID_PAGE_START + 4
+#define PAGE_ADABAS RID_PAGE_START + 5
+#define PAGE_CONNECTION RID_PAGE_START + 6
+#define PAGE_ADO RID_PAGE_START + 7
+#define PAGE_QUERYADMINISTRATION RID_PAGE_START + 8
+#define TAB_WIZ_COLUMN_SELECT RID_PAGE_START + 9
+#define TAB_WIZ_TYPE_SELECT RID_PAGE_START + 10
+#define TAB_WIZ_NAME_MATCHING RID_PAGE_START + 11
+#define TAB_WIZ_COPYTABLE RID_PAGE_START + 12
+#define TAB_PAG_ADABAS_SETTINGS RID_PAGE_START + 13
+// free
+#define PAGE_LDAP RID_PAGE_START + 15
+#define TAB_PAGE_USERADMIN RID_PAGE_START + 16
+#define PAGE_MYSQL_ODBC RID_PAGE_START + 17
+#define TAB_PAGE_TABLEPRIVILEGES RID_PAGE_START + 18
+#define PAGE_USERDRIVER RID_PAGE_START + 19
+#define PAGE_MYSQL_JDBC RID_PAGE_START + 20
+#define PAGE_GENERATED_VALUES RID_PAGE_START + 22
+#define PAGE_ADVANCED_SETTINGS_SPECIAL RID_PAGE_START + 23
+#define PAGE_MYSQL_NATIVE RID_PAGE_START + 24
+ // FREE
+ // FREE
+#define PAGE_ORACLE_JDBC RID_PAGE_START + 27
+#define PAGE_TABLESUBSCRIPTION RID_PAGE_START + 28
+ // FREE
+ // FREE
+ // FREE
+#define PAGE_MOZILLA RID_PAGE_START + 32
+#define PAGE_DS_ORACLE_ADVANCED_SETTINGS RID_PAGE_START + 33
+
+
+#define PAGE_DBWIZARD_INTRO RID_PAGE_START + 40
+#define PAGE_DBWIZARD_DBASE RID_PAGE_START + 41
+#define PAGE_DBWIZARD_TEXT RID_PAGE_START + 42
+#define PAGE_DBWIZARD_MSACCESS RID_PAGE_START + 43
+#define PAGE_DBWIZARD_LDAP RID_PAGE_START + 44
+#define PAGE_DBWIZARD_ADABAS RID_PAGE_START + 45
+#define PAGE_DBWIZARD_MYSQL_INTRO RID_PAGE_START + 46
+#define PAGE_DBWIZARD_MYSQL_ODBC RID_PAGE_START + 47
+#define PAGE_DBWIZARD_ORACLE RID_PAGE_START + 48
+#define PAGE_DBWIZARD_JDBC RID_PAGE_START + 49
+#define PAGE_DBWIZARD_ADO RID_PAGE_START + 50
+#define PAGE_DBWIZARD_ODBC RID_PAGE_START + 51
+#define PAGE_DBWIZARD_SPREADSHEET RID_PAGE_START + 52
+#define PAGE_DBWIZARD_AUTHENTIFICATION RID_PAGE_START + 53
+#define PAGE_DBWIZARD_MYSQL_JDBC RID_PAGE_START + 54
+#define PAGE_DBWIZARD_FINAL RID_PAGE_START + 55
+#define PAGE_DBWIZARD_USERDEFINED RID_PAGE_START + 56
+#define PAGE_DBWIZARD_MYSQL_NATIVE RID_PAGE_START + 57
+
+//========================================================================
+// error boxes
+
+#define ERR_NOREGISTEREDDATASOURCES RID_ERRORBOX_START + 0
+// free
+#define ERR_QRY_CRITERIA_ON_ASTERISK RID_ERRORBOX_START + 2
+#define ERR_QRY_ORDERBY_ON_ASTERISK RID_ERRORBOX_START + 3
+#define ERR_QRY_AMB_FIELD RID_ERRORBOX_START + 4
+ // FREE
+#define ERR_INVALID_LISTBOX_ENTRY RID_ERRORBOX_START + 6
+// FREE
+#define ERR_NEED_INDEX_FIELDS RID_ERRORBOX_START + 8
+#define ERR_QRY_NOSTATEMENT RID_ERRORBOX_START + 9
+#define ERR_QRY_NOCRITERIA RID_ERRORBOX_START + 10
+#define ERR_CANTDOTABLEACTION RID_ERRORBOX_START + 11
+
+
+
+//========================================================================
+// query boxes
+
+#define QUERY_BRW_DELETE_ROWS RID_QUERYBOX_START + 0
+#define QUERY_BRW_SAVEMODIFIED RID_QUERYBOX_START + 1
+#define QUERY_CONNECTION_LOST RID_QUERYBOX_START + 2
+#define QUERY_BRW_DELETE_QUERY_CONFIRM RID_QUERYBOX_START + 3
+#define APP_SAVEMODIFIED RID_QUERYBOX_START + 4
+#define TABLE_DESIGN_SAVEMODIFIED RID_QUERYBOX_START + 5
+#define TABLE_QUERY_CONNECTION_LOST RID_QUERYBOX_START + 6
+#define QUERY_SAVE_CURRENT_INDEX RID_QUERYBOX_START + 7
+#define QUERY_SAVE_TABLE_EDIT_INDEXES RID_QUERYBOX_START + 8
+#define RELATION_DESIGN_SAVEMODIFIED RID_QUERYBOX_START + 9
+ // FREE
+#define APP_CLOSEDOCUMENTS RID_QUERYBOX_START + 11
+#define QUERY_USERADMIN_DELETE_USER RID_QUERYBOX_START + 12
+#define TABLE_DESIGN_ALL_ROWS_DELETED RID_QUERYBOX_START + 13
+
+
+
+
+//========================================================================
+// warning boxes
+
+
+//========================================================================
+// toolboxes
+
+#define RID_BRW_TAB_TOOLBOX RID_TOOLBOX_START + 0
+#define RID_BRW_QRY_TOOLBOX RID_TOOLBOX_START + 1
+#define RID_QRY_TOOLBOX_SQL RID_TOOLBOX_START + 2
+#define RID_BRW_QUERYDESIGN_TOOLBOX RID_TOOLBOX_START + 3
+#define RID_BRW_REALTIONDESIGN_TOOLBOX RID_TOOLBOX_START + 4
+#define RID_BRW_APPLICATION_TOOLBOX RID_TOOLBOX_START + 5
+
+//========================================================================
+// bitmaps
+
+// start with RID_BITMAP_START
+
+//========================================================================
+// images
+
+#define TABLE_TREE_ICON RID_IMAGE_START + 0
+#define VIEW_TREE_ICON RID_IMAGE_START + 1
+#define TABLEFOLDER_TREE_ICON RID_IMAGE_START + 2
+#define BMP_EXCEPTION_ERROR RID_IMAGE_START + 3
+#define BMP_EXCEPTION_WARNING RID_IMAGE_START + 4
+#define BMP_EXCEPTION_INFO RID_IMAGE_START + 5
+#define QUERYFOLDER_TREE_ICON RID_IMAGE_START + 6
+#define QUERY_TREE_ICON RID_IMAGE_START + 7
+#define DATABASE_TREE_ICON RID_IMAGE_START + 8
+// free
+// free
+// free
+#define IMG_PKEYICON RID_IMAGE_START + 12
+#define REPORTFOLDER_TREE_ICON_SCH RID_IMAGE_START + 13
+#define FORMFOLDER_TREE_ICON_SCH RID_IMAGE_START + 14
+#define IMG_DATABASE_CONNECTED RID_IMAGE_START + 15
+#define QUERYFOLDER_TREE_ICON_SCH RID_IMAGE_START + 16
+#define TABLEFOLDER_TREE_ICON_SCH RID_IMAGE_START + 17
+// free
+#define DATABASE_TREE_ICON_SCH RID_IMAGE_START + 19
+#define IMG_DATABASE_CONNECTED_SCH RID_IMAGE_START + 20
+#define TABLE_TREE_ICON_SCH RID_IMAGE_START + 21
+#define VIEW_TREE_ICON_SCH RID_IMAGE_START + 22
+#define QUERY_TREE_ICON_SCH RID_IMAGE_START + 23
+#define REPORTFOLDER_TREE_ICON RID_IMAGE_START + 24
+// free
+// free
+// free
+#define BMP_EXCEPTION_ERROR_SCH RID_IMAGE_START + 28
+#define BMP_EXCEPTION_WARNING_SCH RID_IMAGE_START + 29
+#define BMP_EXCEPTION_INFO_SCH RID_IMAGE_START + 30
+#define IMG_PKEYICON_SCH RID_IMAGE_START + 31
+#define IMG_JOINS_H RID_IMAGE_START + 32
+#define IMG_ALL_LEFT_H RID_IMAGE_START + 33
+#define IMG_ONE_LEFT_H RID_IMAGE_START + 34
+#define IMG_ONE_RIGHT_H RID_IMAGE_START + 35
+#define IMG_ALL_RIGHT_H RID_IMAGE_START + 36
+#define IMG_SORTUP_H RID_IMAGE_START + 37
+#define IMG_SORTDOWN_H RID_IMAGE_START + 38
+#define IMG_FORMFOLDER_TREE_L RID_IMAGE_START + 39
+#define IMG_REPORTFOLDER_TREE_L RID_IMAGE_START + 40
+#define IMG_QUERYFOLDER_TREE_L RID_IMAGE_START + 41
+#define IMG_TABLEFOLDER_TREE_L RID_IMAGE_START + 42
+#define IMG_FORMFOLDER_TREE_LHC RID_IMAGE_START + 43
+#define IMG_REPORTFOLDER_TREE_LHC RID_IMAGE_START + 44
+#define IMG_QUERYFOLDER_TREE_LHC RID_IMAGE_START + 45
+#define IMG_TABLEFOLDER_TREE_LHC RID_IMAGE_START + 46
+#define IMG_NAVIGATION_BTN_UP_SC RID_IMAGE_START + 47
+#define IMG_NAVIGATION_BTN_UP_SCH RID_IMAGE_START + 48
+#define IMG_NAVIGATION_CREATEFOLDER_SC RID_IMAGE_START + 49
+#define IMG_NAVIGATION_CREATEFOLDER_SCH RID_IMAGE_START + 50
+#define FORM_TREE_ICON RID_IMAGE_START + 51
+#define REPORT_TREE_ICON RID_IMAGE_START + 52
+#define FORM_TREE_ICON_SCH RID_IMAGE_START + 53
+#define REPORT_TREE_ICON_SCH RID_IMAGE_START + 54
+#define FORMFOLDER_TREE_ICON RID_IMAGE_START + 55
+
+
+//========================================================================
+// image lists
+#define IMG_JOINS RID_IMAGELIST_START + 0
+#define IMG_INDEX_DLG_SC RID_IMAGELIST_START + 1
+#define IMG_INDEX_DLG_SCH RID_IMAGELIST_START + 2
+#define IMG_INDEX_DLG_LC RID_IMAGELIST_START + 3
+#define IMG_INDEX_DLG_LCH RID_IMAGELIST_START + 4
+#define IMP_FORM_SC RID_IMAGELIST_START + 5
+#define IMP_FORM_SCH RID_IMAGELIST_START + 6
+#define IMP_FORM_LC RID_IMAGELIST_START + 7
+#define IMP_FORM_LCH RID_IMAGELIST_START + 8
+#define IMP_REPORT_SC RID_IMAGELIST_START + 9
+#define IMP_REPORT_SCH RID_IMAGELIST_START + 10
+#define IMP_REPORT_LC RID_IMAGELIST_START + 11
+#define IMP_REPORT_LCH RID_IMAGELIST_START + 12
+
+//========================================================================
+// menues
+
+#define MENU_TABLETREE_POPUP RID_MENU_START + 0
+#define MENU_DATASOURCELIST_POPUP RID_MENU_START + 1
+#define RID_SBA_GRID_COLCTXMENU RID_MENU_START + 2
+#define RID_SBA_GRID_ROWCTXMENU RID_MENU_START + 3
+#define MENU_BROWSERTREE_CONTEXT RID_MENU_START + 4
+#define RID_QUERYCOLPOPUPMENU RID_MENU_START + 5
+#define RID_QUERYFUNCTION_POPUPMENU RID_MENU_START + 6
+#define RID_TABLEDESIGNROWPOPUPMENU RID_MENU_START + 7
+#define RID_BRW_TABLEDESIGN_TOOLBOX RID_MENU_START + 8
+#define RID_SBA_RTF_PKEYPOPUP RID_MENU_START + 9
+#define RID_MENU_APP_EDIT RID_MENU_START + 10
+#define RID_MENU_APP_NEW RID_MENU_START + 11
+#define RID_MENU_APP_PREVIEW RID_MENU_START + 12
+#define RID_NEW_FORM RID_MENU_START + 13
+#define MENU_BROWSER_DEFAULTCONTEXT RID_MENU_START + 14
+#define RID_MENU_REFRESH_DATA RID_MENU_START + 15
+#define RID_MENU_JOINVIEW_CONNECTION RID_MENU_START + 16
+#define RID_MENU_JOINVIEW_TABLE RID_MENU_START + 17
+
+
+
+//========================================================================
+// controls
+
+#define RID_DB_TAB_EDITOR RID_CONTROL_START + 0
+#define RID_MYSQL_NATIVE_SETTINGS RID_CONTROL_START + 1
+
+//========================================================================
+// strings
+#define STR_TBL_TITLE RID_STR_GEN_START
+#define STR_ERROR_DURING_CREATION RID_STR_GEN_START + 1
+#define RID_STR_CONNECTION_LOST RID_STR_GEN_START + 2
+#define STR_NAME_ALREADY_EXISTS RID_STR_GEN_START + 3
+// free
+#define STR_TITLE_CONFIRM_DELETION RID_STR_GEN_START + 5
+#define STR_STAT_WARNING RID_STR_GEN_START + 6
+#define STR_TABLEDESIGN_DATASOURCE_DELETED RID_STR_GEN_START + 7
+#define STR_TABLEDESIGN_DBFIELDTYPES RID_STR_GEN_START + 8
+#define STR_QRY_CONTINUE RID_STR_GEN_START + 9
+#define STR_COLUMN_NAME RID_STR_GEN_START + 10
+#define STR_ERROR_OCCURED_WHILE_COPYING RID_STR_GEN_START + 11
+#define STR_MISSING_TABLES_XDROP RID_STR_GEN_START + 12
+#define STR_QUERY_DELETE_TABLE RID_STR_GEN_START + 13
+#define STR_BUTTON_TEXT_ALL RID_STR_GEN_START + 14
+#define STR_COULDNOTCREATE_DRIVERMANAGER RID_STR_GEN_START + 15
+#define STR_UNEXPECTED_ERROR RID_STR_GEN_START + 16
+#define STR_REMEMBERPASSWORD_SESSION RID_STR_GEN_START + 17
+#define STR_ENTER_CONNECTION_PASSWORD RID_STR_GEN_START + 18
+#define STR_NOREGISTEREDDRIVER RID_STR_GEN_START + 19
+#define STR_DATASOURCE_DELETED RID_STR_GEN_START + 20
+#define STR_QUERY_UNDO_MODIFYSQLEDIT RID_STR_GEN_START + 21
+#define STR_QRY_TITLE RID_STR_GEN_START + 22
+#define STR_VIEW_TITLE RID_STR_GEN_START + 23
+#define STR_SUB_DOCS_WITH_SCRIPTS RID_STR_GEN_START + 24
+#define STR_SUB_DOCS_WITH_SCRIPTS_DETAIL RID_STR_GEN_START + 25
+#define STR_TABLEDESIGN_DUPLICATE_NAME RID_STR_GEN_START + 26
+#define STR_COULDNOTCONNECT_DATASOURCE RID_STR_GEN_START + 27
+#define STR_NO_TABLE_FORMAT_INSIDE RID_STR_GEN_START + 28
+#define RID_STR_QUERIES_CONTAINER RID_STR_GEN_START + 29
+#define RID_STR_TABLES_CONTAINER RID_STR_GEN_START + 30
+#define STR_NEW_FOLDER RID_STR_GEN_START + 31
+#define RID_STR_FORM RID_STR_GEN_START + 32
+#define RID_STR_REPORT RID_STR_GEN_START + 33
+#define STR_FRM_LABEL RID_STR_GEN_START + 34
+#define STR_RPT_LABEL RID_STR_GEN_START + 35
+#define STR_FOLDER_LABEL RID_STR_GEN_START + 36
+#define STR_TABLEDESIGN_NO_PRIM_KEY_HEAD RID_STR_GEN_START + 37
+#define STR_TABLEDESIGN_NO_PRIM_KEY RID_STR_GEN_START + 38
+ // FREE
+#define RID_STR_EXTENSION_NOT_PRESENT RID_STR_GEN_START + 40
+#define RID_STR_EXTENSION_NAME RID_STR_GEN_START + 41
+
+//========================================================================
+// untyped resources
+
+// free
+#define RSC_CHARSETS RID_UNTYPED_START + 2
+// free
+#define RSC_QUERY_OBJECT_TYPE RID_UNTYPED_START + 4
+#define IMG_TABLESUBCRIPTION_SC RID_UNTYPED_START + 5
+#define IMG_TABLESUBCRIPTION_SCH RID_UNTYPED_START + 6
+#define IMG_TABLESUBCRIPTION_LC RID_UNTYPED_START + 7
+#define IMG_TABLESUBCRIPTION_LCH RID_UNTYPED_START + 8
+#define IMG_QUERYADMINISTRATION_SC RID_UNTYPED_START + 9
+#define IMG_QUERYADMINISTRATION_SCH RID_UNTYPED_START + 10
+#define IMG_QUERYADMINISTRATION_LC RID_UNTYPED_START + 11
+#define IMG_QUERYADMINISTRATION_LCH RID_UNTYPED_START + 12
+#define IMG_DOCUMENTLINKS_SC RID_UNTYPED_START + 13
+#define IMG_DOCUMENTLINKS_SCH RID_UNTYPED_START + 14
+#define IMG_DOCUMENTLINKS_LC RID_UNTYPED_START + 15
+#define IMG_DOCUMENTLINKS_LCH RID_UNTYPED_START + 16
+
+//========================================================================
+// various
+
+#define PB_FORMAT RID_MISC_START + 0
+#define FIXED_NO_CONNECTION RID_MISC_START + 1
+#define LB_LEFT_TABLE RID_MISC_START + 2
+#define LB_RIGHT_TABLE RID_MISC_START + 3
+#define LB_CONTROL RID_MISC_START + 4
+#define FL_INVOLVED_TABLES RID_MISC_START + 5
+#define FL_INVOLVED_FIELDS RID_MISC_START + 6
+
+#endif // _DBU_RESOURCE_HRC_
+
diff --git a/dbaccess/source/ui/inc/dbu_tbl.hrc b/dbaccess/source/ui/inc/dbu_tbl.hrc
new file mode 100644
index 000000000000..310baa5eb512
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbu_tbl.hrc
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBU_TBL_HRC_
+#define _DBU_TBL_HRC_
+
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+
+#define STR_HELP_AUTOINCREMENT_VALUE RID_STR_TBL_START
+#define STR_TABLEDESIGN_UNDO_PRIMKEY RID_STR_TBL_START + 1
+#define STR_VALUE_YES RID_STR_TBL_START + 2
+#define STR_VALUE_NO RID_STR_TBL_START + 3
+#define STR_VALUE_ASC RID_STR_TBL_START + 4
+#define STR_VALUE_DESC RID_STR_TBL_START + 5
+#define STR_VALUE_NONE RID_STR_TBL_START + 6
+#define STR_TAB_FIELD_NAME RID_STR_TBL_START + 7
+#define STR_TAB_FIELD_DATATYPE RID_STR_TBL_START + 8
+#define STR_TAB_FIELD_LENGTH RID_STR_TBL_START + 9
+#define STR_TAB_HELP_TEXT RID_STR_TBL_START + 10
+#define STR_TAB_FIELD_NULLABLE RID_STR_TBL_START + 11
+#define STR_FIELD_AUTOINCREMENT RID_STR_TBL_START + 12
+#define STR_TAB_PROPERTIES RID_STR_TBL_START + 13
+#define STR_TABPAGE_GENERAL RID_STR_TBL_START + 14
+#define STR_TAB_TABLE_DESCRIPTION RID_STR_TBL_START + 15
+#define STR_TAB_TABLE_PROPERTIES RID_STR_TBL_START + 16
+#define STR_TABED_UNDO_TYPE_CHANGED RID_STR_TBL_START + 17
+#define STR_TABED_UNDO_ROWDELETED RID_STR_TBL_START + 18
+#define STR_TABED_UNDO_ROWINSERTED RID_STR_TBL_START + 19
+#define STR_TABED_UNDO_NEWROWINSERTED RID_STR_TBL_START + 20
+#define STR_TABED_UNDO_PRIMKEY RID_STR_TBL_START + 21
+#define STR_HELP_AUTOINCREMENT RID_STR_TBL_START + 22
+#define STR_HELP_FORMAT_CODE RID_STR_TBL_START + 23
+#define STR_HELP_SCALE RID_STR_TBL_START + 24
+#define STR_HELP_LENGTH RID_STR_TBL_START + 25
+#define STR_HELP_NUMERIC_TYPE RID_STR_TBL_START + 26
+#define STR_HELP_TEXT_LENGTH RID_STR_TBL_START + 27
+#define STR_HELP_FIELD_REQUIRED RID_STR_TBL_START + 28
+#define STR_HELP_DEFAULT_VALUE RID_STR_TBL_START + 29
+#define STR_HELP_BOOL_DEFAULT RID_STR_TBL_START + 30
+#define STR_FORMAT RID_STR_TBL_START + 31
+#define STR_SCALE RID_STR_TBL_START + 32
+#define STR_LENGTH RID_STR_TBL_START + 33
+#define STR_NUMERIC_TYPE RID_STR_TBL_START + 34
+#define STR_TEXT_LENGTH RID_STR_TBL_START + 35
+#define STR_FIELD_REQUIRED RID_STR_TBL_START + 36
+#define STR_DEFAULT_VALUE RID_STR_TBL_START + 37
+#define STR_TABED_UNDO_CELLMODIFIED RID_STR_TBL_START + 38
+#define STR_TAB_FIELD_COLUMN_NAME RID_STR_TBL_START + 39
+#define STR_TBL_COLUMN_IS_KEYCOLUMN RID_STR_TBL_START + 40
+#define STR_TBL_COLUMN_IS_KEYCOLUMN_TITLE RID_STR_TBL_START + 41
+#define STR_TABLEDESIGN_ALTER_ERROR RID_STR_TBL_START + 42
+#define STR_AUTOINCREMENT_VALUE RID_STR_TBL_START + 43
+#define STR_HELP_FORMAT_BUTTON RID_STR_TBL_START + 44
+#define STR_TABLEDESIGN_CONNECTION_MISSING RID_STR_TBL_START + 45
+#define STR_TAB_FIELD_COLUMN_DATATYPE RID_STR_TBL_START + 46
+#define STR_TABLEDESIGN_TITLE RID_STR_TBL_START + 47
+#define STR_NO_TYPE_INFO_AVAILABLE RID_STR_TBL_START + 48
+#define STR_CHANGE_COLUMN_NAME RID_STR_TBL_START + 49
+#define STR_CHANGE_COLUMN_TYPE RID_STR_TBL_START + 50
+#define STR_CHANGE_COLUMN_DESCRIPTION RID_STR_TBL_START + 51
+#define STR_CHANGE_COLUMN_ATTRIBUTE RID_STR_TBL_START + 52
+#define STR_TABLEDESIGN_SAVE_ERROR RID_STR_TBL_START + 53
+#define STR_TABLEDESIGN_COULD_NOT_DROP_COL RID_STR_TBL_START + 54
+#define STR_COLUMN_DESCRIPTION RID_STR_TBL_START + 55
+
+// please adjust checking before insert new strings
+
+#if STR_NO_TYPE_INFO_AVAILABLE > RID_STR_TBL_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif // _DBU_TBL_HRC_
+
+
diff --git a/dbaccess/source/ui/inc/dbu_uno.hrc b/dbaccess/source/ui/inc/dbu_uno.hrc
new file mode 100644
index 000000000000..f76c46cfbc7e
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbu_uno.hrc
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBU_UNO_HRC_
+#define _DBU_UNO_HRC_
+
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+
+#define STR_REMEMBERPASSWORD_PERSISTENT ( RID_STR_UNO_START + 0 )
+#define STR_CTW_NO_VIEWS_SUPPORT ( RID_STR_UNO_START + 1 )
+#define STR_CTW_NO_PRIMARY_KEY_SUPPORT ( RID_STR_UNO_START + 2 )
+#define STR_CTW_INVALID_DATA_ACCESS_DESCRIPTOR ( RID_STR_UNO_START + 3 )
+#define STR_CTW_ONLY_TABLES_AND_QUERIES_SUPPORT ( RID_STR_UNO_START + 4 )
+#define STR_CTW_COPY_SOURCE_NEEDS_BOOKMARKS ( RID_STR_UNO_START + 5 )
+#define STR_CTW_UNSUPPORTED_COLUMN_TYPE ( RID_STR_UNO_START + 6 )
+#define STR_CTW_ILLEGAL_PARAMETER_COUNT ( RID_STR_UNO_START + 7 )
+#define STR_CTW_ERROR_DURING_INITIALIZATION ( RID_STR_UNO_START + 8 )
+#define STR_CTW_ERROR_UNSUPPORTED_SETTING ( RID_STR_UNO_START + 9 )
+#define STR_CTW_ERROR_NO_QUERY ( RID_STR_UNO_START + 10 )
+#define STR_CTW_ERROR_INVALID_INTERACTIONHANDLER ( RID_STR_UNO_START + 11 )
+
+// please adjust when inserting new strings:
+#define RID_STR_UNO_LAST_USED STR_CTW_ERROR_INVALID_INTERACTIONHANDLER
+
+#if RID_STR_UNO_LAST_USED >= RID_STR_UNO_END
+#error too many resources in uno ....
+#endif
+
+#endif // _DBU_UNO_HRC_
+
+
diff --git a/dbaccess/source/ui/inc/dbwiz.hxx b/dbaccess/source/ui/inc/dbwiz.hxx
new file mode 100644
index 000000000000..26fe862cd059
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbwiz.hxx
@@ -0,0 +1,135 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_DBWIZ_HXX
+#define DBAUI_DBWIZ_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include "dsntypes.hxx"
+#include "IItemSetHelper.hxx"
+#include <comphelper/uno3.hxx>
+#include <svtools/wizardmachine.hxx>
+#include "moduledbu.hxx"
+#include <memory>
+
+FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
+FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
+
+namespace dbaccess
+{
+ class ODsnTypeCollection;
+}
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+//=========================================================================
+//= ODbTypeWizDialog
+//=========================================================================
+class OGeneralPage;
+class ODbDataSourceAdministrationHelper;
+/** tab dialog for administrating the office wide registered data sources
+*/
+class ODbTypeWizDialog : public svt::OWizardMachine , public IItemSetHelper, public IDatabaseSettingsDialog,public dbaui::OModuleClient
+{
+private:
+ OModuleClient m_aModuleClient;
+ ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
+ SfxItemSet* m_pOutSet;
+ ::dbaccess::ODsnTypeCollection*
+ m_pCollection; /// the DSN type collection instance
+ ::rtl::OUString m_eType;
+
+ sal_Bool m_bResetting : 1; /// sal_True while we're resetting the pages
+ sal_Bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing
+ sal_Bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/>
+
+public:
+ /** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed
+ after the dialog has been destroyed
+ */
+ ODbTypeWizDialog(Window* pParent
+ ,SfxItemSet* _pItems
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ ,const ::com::sun::star::uno::Any& _aDataSourceName
+ );
+ virtual ~ODbTypeWizDialog();
+
+ virtual const SfxItemSet* getOutputSet() const;
+ virtual SfxItemSet* getWriteOutputSet();
+
+ // forwards to ODbDataSourceAdministrationHelper
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const;
+ virtual ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >,sal_Bool> createConnection();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver();
+ virtual ::rtl::OUString getDatasourceType(const SfxItemSet& _rSet) const;
+ virtual void clearPassword();
+ virtual sal_Bool saveDatasource();
+ virtual void setTitle(const ::rtl::OUString& _sTitle);
+ virtual void enableConfirmSettings( bool _bEnable );
+
+protected:
+ /// to override to create new pages
+ virtual TabPage* createPage(WizardState _nState);
+ virtual WizardState determineNextState(WizardState _nCurrentState) const;
+ virtual sal_Bool leaveState(WizardState _nState);
+ virtual ::svt::IWizardPageController*
+ getPageController( TabPage* _pCurrentPage ) const;
+ virtual sal_Bool onFinish();
+
+protected:
+ inline sal_Bool isUIEnabled() const { return m_bUIEnabled; }
+ inline void disabledUI() { m_bUIEnabled = sal_False; }
+
+ /// select a datasource with a given name, adjust the item set accordingly, and everything like that ..
+ void implSelectDatasource(const ::rtl::OUString& _rRegisteredName);
+ void resetPages(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDatasource);
+
+ enum ApplyResult
+ {
+ AR_LEAVE_MODIFIED, // somthing was modified and has successfully been committed
+ AR_LEAVE_UNCHANGED, // no changes were made
+ AR_KEEP // don't leave the page (e.g. because an error occured)
+ };
+ /** apply all changes made
+ */
+ ApplyResult implApplyChanges();
+
+private:
+ DECL_LINK(OnTypeSelected, OGeneralPage*);
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // DBAUI_DBWIZ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
new file mode 100644
index 000000000000..f416cbf6d8e9
--- /dev/null
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -0,0 +1,197 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_DBWIZ2_HXX
+#define DBAUI_DBWIZ2_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include "dsntypes.hxx"
+#include "IItemSetHelper.hxx"
+#include <comphelper/uno3.hxx>
+#include <tools/urlobj.hxx>
+#include <memory>
+#include <svtools/roadmapwizard.hxx>
+#include <connectivity/dbtools.hxx>
+#include "moduledbu.hxx"
+
+FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
+FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+class OGenericAdministrationPage;
+
+//=========================================================================
+//= ODbTypeWizDialogSetup
+//=========================================================================
+class OGeneralPage;
+class ODbDataSourceAdministrationHelper;
+/** tab dialog for administrating the office wide registered data sources
+*/
+class OMySQLIntroPageSetup;
+
+class ODbTypeWizDialogSetup : public svt::RoadmapWizard , public IItemSetHelper, public IDatabaseSettingsDialog,public dbaui::OModuleClient
+{
+
+private:
+ OModuleClient m_aModuleClient;
+ ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
+ SfxItemSet* m_pOutSet;
+ ::rtl::OUString m_sURL;
+ ::rtl::OUString m_sOldURL;
+ sal_Bool m_bResetting : 1; /// sal_True while we're resetting the pages
+ sal_Bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing
+ sal_Bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/>
+ sal_Bool m_bIsConnectable : 1;
+ String m_sRM_IntroText;
+ String m_sRM_dBaseText;
+ String m_sRM_TextText;
+ String m_sRM_MSAccessText;
+ String m_sRM_LDAPText;
+ String m_sRM_ADABASText;
+ String m_sRM_ADOText;
+ String m_sRM_JDBCText;
+ String m_sRM_MySQLNativePageTitle;
+ String m_sRM_OracleText;
+ String m_sRM_MySQLText;
+ String m_sRM_ODBCText;
+ String m_sRM_SpreadSheetText;
+ String m_sRM_AuthentificationText;
+ String m_sRM_FinalText;
+ INetURLObject m_aDocURL;
+ String m_sWorkPath;
+ OGeneralPage* m_pGeneralPage;
+ OMySQLIntroPageSetup* m_pMySQLIntroPage;
+ ::dbaccess::ODsnTypeCollection*
+ m_pCollection; /// the DSN type collection instance
+
+
+
+public:
+ /** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed
+ after the dialog has been destroyed
+ */
+ ODbTypeWizDialogSetup(Window* pParent
+ ,SfxItemSet* _pItems
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ ,const ::com::sun::star::uno::Any& _aDataSourceName
+ );
+ virtual ~ODbTypeWizDialogSetup();
+
+ virtual const SfxItemSet* getOutputSet() const;
+ virtual SfxItemSet* getWriteOutputSet();
+
+ // forwards to ODbDataSourceAdministrationHelper
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const;
+ virtual ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >,sal_Bool> createConnection();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver();
+ virtual ::rtl::OUString getDatasourceType(const SfxItemSet& _rSet) const;
+ virtual void clearPassword();
+ virtual void setTitle(const ::rtl::OUString& _sTitle);
+ virtual void enableConfirmSettings( bool _bEnable );
+ virtual sal_Bool saveDatasource();
+ virtual String getStateDisplayName( WizardState _nState ) const;
+
+ /** returns <TRUE/> if the database should be opened, otherwise <FALSE/>.
+ */
+ sal_Bool IsDatabaseDocumentToBeOpened() const;
+
+ /** returns <TRUE/> if the table wizard should be opened, otherwise <FALSE/>.
+ */
+ sal_Bool IsTableWizardToBeStarted() const;
+
+protected:
+ /// to override to create new pages
+ virtual TabPage* createPage(WizardState _nState);
+ virtual sal_Bool leaveState(WizardState _nState);
+ virtual void enterState(WizardState _nState);
+ virtual ::svt::IWizardPageController* getPageController( TabPage* _pCurrentPage ) const;
+ virtual sal_Bool onFinish();
+
+protected:
+ inline sal_Bool isUIEnabled() const { return m_bUIEnabled; }
+ inline void disabledUI() { m_bUIEnabled = sal_False; }
+
+ /// select a datasource with a given name, adjust the item set accordingly, and everything like that ..
+ void implSelectDatasource(const ::rtl::OUString& _rRegisteredName);
+ void resetPages(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDatasource);
+
+ enum ApplyResult
+ {
+ AR_LEAVE_MODIFIED, // somthing was modified and has successfully been committed
+ AR_LEAVE_UNCHANGED, // no changes were made
+ AR_KEEP // don't leave the page (e.g. because an error occured)
+ };
+
+private:
+ /** declares a path with or without authentication, as indicated by the database type
+
+ @param _sURL
+ the data source type for which the path is declared. If this
+ data source type does not support authentication, the PAGE_DBSETUPWIZARD_AUTHENTIFICATION
+ state will be stripped from the sequence of states.
+ @param _nPathId
+ the ID of the path
+ @path
+ the first state in this path, following by an arbitrary number of others, as in
+ RoadmapWizard::declarePath.
+ */
+ void declareAuthDepPath( const ::rtl::OUString& _sURL, PathId _nPathId, const svt::RoadmapWizardTypes::WizardPath& _rPaths);
+
+ void RegisterDataSourceByLocation(const ::rtl::OUString& sPath);
+ sal_Bool SaveDatabaseDocument();
+ void activateDatabasePath();
+ String createUniqueFileName(const INetURLObject& rURL);
+ void CreateDatabase();
+ void createUniqueFolderName(INetURLObject* pURL);
+ ::dbaccess::DATASOURCE_TYPE VerifyDataSourceType(const ::dbaccess::DATASOURCE_TYPE _DatabaseType) const;
+
+ ::rtl::OUString getDefaultDatabaseType() const;
+
+ void updateTypeDependentStates();
+ sal_Bool callSaveAsDialog();
+ sal_Bool IsConnectionUrlRequired();
+ DECL_LINK(OnTypeSelected, OGeneralPage*);
+ DECL_LINK(OnChangeCreationMode, OGeneralPage*);
+ DECL_LINK(OnRecentDocumentSelected, OGeneralPage*);
+ DECL_LINK(OnSingleDocumentChosen, OGeneralPage*);
+ DECL_LINK(ImplClickHdl, OMySQLIntroPageSetup*);
+ DECL_LINK(ImplModifiedHdl, OGenericAdministrationPage*);
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // DBAUI_DBWIZ2_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
new file mode 100644
index 000000000000..4914cc7a23f8
--- /dev/null
+++ b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
@@ -0,0 +1,146 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX
+#define DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX
+
+#include "objectnamecheck.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+/** === end UNO includes === **/
+
+#include <memory>
+#include <boost/noncopyable.hpp>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= HierarchicalNameCheck
+ //====================================================================
+ struct HierarchicalNameCheck_Impl;
+ /** class implementing the IObjectNameCheck interface, and checking given object names
+ against a hierarchical name container
+ */
+ class HierarchicalNameCheck :public ::boost::noncopyable
+ ,public IObjectNameCheck
+ {
+ private:
+ std::auto_ptr< HierarchicalNameCheck_Impl > m_pImpl;
+
+ public:
+ /** constructs a HierarchicalNameCheck instance
+ @param _rxNames
+ the hierarchic container of named objects, against which given names should be
+ checked
+ @param _rRelativeRoot
+ the root in the hierarchy against which given names should be checked
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given container is <NULL/>
+ */
+ HierarchicalNameCheck(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XHierarchicalNameAccess >& _rxNames,
+ const ::rtl::OUString& _rRelativeRoot
+ );
+
+ ~HierarchicalNameCheck();
+
+ // IObjectNameCheck overridables
+ virtual bool isNameValid(
+ const ::rtl::OUString& _rObjectName,
+ ::dbtools::SQLExceptionInfo& _out_rErrorToDisplay
+ ) const;
+
+ private:
+ HierarchicalNameCheck(); // never implemented
+ };
+
+ //====================================================================
+ //= DynamicTableOrQueryNameCheck
+ //====================================================================
+ struct DynamicTableOrQueryNameCheck_Impl;
+ /** class implementing the IObjectNameCheck interface, and checking a given name
+ for being valid as either a query or a table name.
+
+ The class can be parametrized to act as either table name or query name validator.
+
+ For databases which support queries in queries, the name check is implicitly extended
+ to both queries and tables, no matter which category is checked. This prevents, for
+ such databases, that users can create a query with the name of an existing table,
+ or vice versa.
+
+ @seealso dbtools::DatabaseMetaData::supportsSubqueriesInFrom
+ @seealso com::sun::star::sdb::tools::XObjectNames::checkNameForCreate
+ */
+ class DynamicTableOrQueryNameCheck :public ::boost::noncopyable
+ ,public IObjectNameCheck
+ {
+ private:
+ std::auto_ptr< DynamicTableOrQueryNameCheck_Impl > m_pImpl;
+
+ public:
+ /** constructs a DynamicTableOrQueryNameCheck instance
+ @param _rxSdbLevelConnection
+ a connection supporting the css.sdb.Connection service, in other word, it
+ does expose the XTablesSupplier and XQueriesSupplier interfaces.
+ @param _nCommandType
+ specifies whether table names or query names should be checked. Only valid values
+ are CommandType::TABLE and CommandType::QUERY.
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given connection is <NULL/>, or the given command type is neither
+ CommandType::TABLE nor CommandType::QUERY.
+ */
+ DynamicTableOrQueryNameCheck(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxSdbLevelConnection,
+ sal_Int32 _nCommandType
+ );
+
+ ~DynamicTableOrQueryNameCheck();
+
+ // IObjectNameCheck overridables
+ virtual bool isNameValid(
+ const ::rtl::OUString& _rObjectName,
+ ::dbtools::SQLExceptionInfo& _out_rErrorToDisplay
+ ) const;
+
+ private:
+ DynamicTableOrQueryNameCheck(); // never implemented
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx
new file mode 100644
index 000000000000..fa4463374f01
--- /dev/null
+++ b/dbaccess/source/ui/inc/directsql.hxx
@@ -0,0 +1,141 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBACCESS_UI_DIRECTSQL_HXX_
+#define _DBACCESS_UI_DIRECTSQL_HXX_
+
+#include <vcl/dialog.hxx>
+#include <svtools/editsyntaxhighlighter.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/button.hxx>
+#include <comphelper/stl_types.hxx>
+#include <deque>
+
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <unotools/eventlisteneradapter.hxx>
+#include "moduledbu.hxx"
+#include <osl/mutex.hxx>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= DirectSQLDialog
+ //====================================================================
+ class DirectSQLDialog
+ :public ModalDialog
+ ,public ::utl::OEventListenerAdapter
+ {
+ protected:
+ OModuleClient m_aModuleClient;
+ ::osl::Mutex m_aMutex;
+
+ FixedLine m_aFrame;
+ FixedText m_aSQLLabel;
+ MultiLineEditSyntaxHighlight m_aSQL;
+ PushButton m_aExecute;
+ FixedText m_aHistoryLabel;
+ ListBox* m_pSQLHistory;
+ FixedLine m_aStatusFrame;
+ MultiLineEdit m_aStatus;
+ FixedLine m_aButtonSeparator;
+ HelpButton m_aHelp;
+ PushButton m_aClose;
+
+ typedef ::std::deque< String > StringQueue;
+ StringQueue m_aStatementHistory; // previous statements
+ StringQueue m_aNormalizedHistory; // previous statements, normalized to be used in the list box
+
+ sal_Int32 m_nHistoryLimit;
+ sal_Int32 m_nStatusCount;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >
+ m_xConnection;
+
+ public:
+ DirectSQLDialog(
+ Window* _pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn);
+ ~DirectSQLDialog();
+
+ /// number of history entries
+ sal_Int32 getHistorySize() const;
+
+ protected:
+ void executeCurrent();
+ void switchToHistory(sal_Int32 _nHistoryPos, sal_Bool _bUpdateListBox = sal_True);
+
+ // OEventListenerAdapter
+ virtual void _disposing( const ::com::sun::star::lang::EventObject& _rSource );
+
+ protected:
+ DECL_LINK( OnExecute, void* );
+ DECL_LINK( OnClose, void* );
+ DECL_LINK( OnListEntrySelected, void* );
+ DECL_LINK( OnStatementModified, void* );
+
+ private:
+ /// adds a statement to the statement history
+ void implAddToStatementHistory(const String& _rStatement);
+
+ /// ensures that our history has at most m_nHistoryLimit entries
+ void implEnsureHistoryLimit();
+
+ /// executes the statement given, adds the status to the status list
+ void implExecuteStatement(const String& _rStatement);
+
+ /// adds a status text to the status list
+ void addStatusText(const String& _rMessage);
+
+#ifdef DBG_UTIL
+ const sal_Char* impl_CheckInvariants() const;
+#endif
+ };
+
+ //====================================================================
+#ifdef DBG_UTIL
+#define CHECK_INVARIANTS(methodname) \
+ { \
+ const sal_Char* pError = impl_CheckInvariants(); \
+ if (pError) \
+ OSL_ENSURE(sal_False, (ByteString(methodname) += ByteString(": ") += ByteString(pError)).GetBuffer()); \
+ }
+#else
+#define CHECK_INVARIANTS(methodname)
+#endif
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // _DBACCESS_UI_DIRECTSQL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dlgattr.hrc b/dbaccess/source/ui/inc/dlgattr.hrc
new file mode 100644
index 000000000000..f2649fc3e782
--- /dev/null
+++ b/dbaccess/source/ui/inc/dlgattr.hrc
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_SBATTRDLG_HRC
+#define DBAUI_SBATTRDLG_HRC
+
+#define TP_ATTR_CHAR 1
+#define TP_ATTR_NUMBER 2
+#define TP_ATTR_ALIGN 4
+#define ST_ROW 5
+
+#endif//DBAUI_SBATTRDLG_HRC
+
diff --git a/dbaccess/source/ui/inc/dlgattr.hxx b/dbaccess/source/ui/inc/dlgattr.hxx
new file mode 100644
index 000000000000..1191360415db
--- /dev/null
+++ b/dbaccess/source/ui/inc/dlgattr.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_SBATTRDLG_HXX
+#define DBAUI_SBATTRDLG_HXX
+
+
+#include "dlgattr.hrc"
+
+#include <sfx2/tabdlg.hxx>
+#include <tools/solar.h>
+
+
+
+class SvxNumberInfoItem;
+class SfxItemSet;
+class SvNumberFormatter;
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+ class SbaSbAttrDlg : public SfxTabDialog
+ {
+ String aTitle;
+ SvxNumberInfoItem* pNumberInfoItem;
+
+ public:
+ SbaSbAttrDlg( Window * pParent, const SfxItemSet*, SvNumberFormatter*, USHORT nFlags = TP_ATTR_CHAR , BOOL bRow = FALSE);
+ ~SbaSbAttrDlg();
+
+ virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage );
+ };
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif//DBAUI_SBATTRDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dlgsave.hxx b/dbaccess/source/ui/inc/dlgsave.hxx
new file mode 100644
index 000000000000..2a9f49f32d6b
--- /dev/null
+++ b/dbaccess/source/ui/inc/dlgsave.hxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_DLGSAVE_HXX
+#define DBAUI_DLGSAVE_HXX
+
+#include "apitools.hxx"
+#include <vcl/dialog.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <vcl/msgbox.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace container {
+ class XNameAccess;
+ class XHierarchicalNameAccess;
+ }
+ namespace sdbc {
+ class XDatabaseMetaData;
+ class XConnection;
+ }
+}}}
+
+
+#define SAD_DEFAULT 0x0000
+#define SAD_ADDITIONAL_DESCRIPTION 0x0001
+
+#define SAD_TITLE_STORE_AS 0x0000
+#define SAD_TITLE_PASTE_AS 0x0100
+#define SAD_TITLE_RENAME 0x0200
+
+class Button;
+class Edit;
+namespace dbaui
+{
+ class OSaveAsDlgImpl;
+ class IObjectNameCheck;
+ class OSaveAsDlg : public ModalDialog
+ {
+ private:
+ OSaveAsDlgImpl* m_pImpl;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ public:
+ OSaveAsDlg( Window * pParent,const sal_Int32& _rType,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
+ const String& rDefault,
+ const IObjectNameCheck& _rObjectNameCheck,
+ sal_Int32 _nFlags = SAD_DEFAULT | SAD_TITLE_STORE_AS);
+
+ OSaveAsDlg( Window* _pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const String& _rDefault,
+ const String& _sLabel,
+ const IObjectNameCheck& _rObjectNameCheck,
+ sal_Int32 _nFlags = SAD_DEFAULT | SAD_TITLE_STORE_AS);
+ virtual ~OSaveAsDlg();
+
+ String getName() const;
+ String getCatalog() const;
+ String getSchema() const;
+ private:
+ DECL_LINK(ButtonClickHdl, Button *);
+ DECL_LINK(EditModifyHdl, Edit * );
+
+ void implInitOnlyTitle(const String& _rLabel);
+ void implInit();
+ };
+}
+
+#endif // DBAUI_DLGSAVE_HXX
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dlgsize.hxx b/dbaccess/source/ui/inc/dlgsize.hxx
new file mode 100644
index 000000000000..30b581b83f01
--- /dev/null
+++ b/dbaccess/source/ui/inc/dlgsize.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBAUI_DLGSIZE_HXX
+#define _DBAUI_DLGSIZE_HXX
+
+#include <vcl/dialog.hxx>
+
+#include <vcl/field.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/fixed.hxx>
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+ class DlgSize : public ModalDialog
+ {
+ private:
+ sal_Int32 m_nPrevValue, m_nStandard;
+ void SetValue( sal_Int32 nVal );
+
+ protected:
+ DECL_LINK( CbClickHdl, Button * );
+
+ FixedText aFT_VALUE;
+ MetricField aMF_VALUE;
+ CheckBox aCB_STANDARD;
+ OKButton aPB_OK;
+ CancelButton aPB_CANCEL;
+ HelpButton aPB_HELP;
+
+ public:
+ DlgSize( Window * pParent, sal_Int32 nVal, BOOL bRow, sal_Int32 _nAlternativeStandard = -1 );
+ ~DlgSize();
+
+ sal_Int32 GetValue();
+ };
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_DLGSIZE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dsitems.hxx b/dbaccess/source/ui/inc/dsitems.hxx
new file mode 100644
index 000000000000..40595ac7119f
--- /dev/null
+++ b/dbaccess/source/ui/inc/dsitems.hxx
@@ -0,0 +1,107 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_DATASOURCEITEMS_HXX_
+#define _DBAUI_DATASOURCEITEMS_HXX_
+
+typedef sal_Int32 ItemID;
+
+//========================================================================
+//= item ids for the data source administration dialog
+
+#define DSID_NAME 1 // name of a data source, SfxStringItem
+#define DSID_ORIGINALNAME 2 // orginal name, internal, SfxStringItem
+#define DSID_CONNECTURL 3 // connection URL, SfxStringItem
+#define DSID_TABLEFILTER 4 // table filter, OStringListItem
+#define DSID_TYPECOLLECTION 5 // collection of data source types, ODsnTypeCollection
+#define DSID_INVALID_SELECTION 6 // is the selection (thus the set data) invalid?, SfxBoolItem
+#define DSID_READONLY 7 // is the selection (thus the set data) readonly?, SfxBoolItem
+#define DSID_USER 8 // the user name used for logon, SfxStringItem
+#define DSID_PASSWORD 9 // the password used for logon, SfxStringItem
+#define DSID_ADDITIONALOPTIONS 10 // additional options used for connecting, SfxStringItem
+#define DSID_CHARSET 11 // character set to use, SfxStringItem by now
+#define DSID_PASSWORDREQUIRED 12 // is the password required to connect?, SfxBoolItem
+#define DSID_SHOWDELETEDROWS 13 // show deleted rows?, SfxBoolItem
+#define DSID_ALLOWLONGTABLENAMES 14 // allow tables names longer than 8.3?, SfxBoolItem
+#define DSID_JDBCDRIVERCLASS 15 // JDBC driver class, SfxStringItem
+#define DSID_FIELDDELIMITER 16 // field delimiter, SfxUInt16Item
+#define DSID_TEXTDELIMITER 17 // text delimiter, SfxUInt16Item
+#define DSID_DECIMALDELIMITER 18 // decimal delimiter, SfxUInt16Item
+#define DSID_THOUSANDSDELIMITER 19 // thousands delimiter, SfxUInt16Item
+#define DSID_TEXTFILEEXTENSION 20 // extension for text files, SfxStringItem
+#define DSID_TEXTFILEHEADER 21 // the text file contains a header?, SfxBoolItem
+#define DSID_PARAMETERNAMESUBST 22
+#define DSID_CONN_PORTNUMBER 23
+#define DSID_SUPPRESSVERSIONCL 24 // meta data: sal_True if the data source described by the set is to-be-deleted
+#define DSID_DATASOURCE_UNO 25 // meta data: OPropertySetItem, the data source the set represents
+#define DSID_CONN_SHUTSERVICE 26
+#define DSID_CONN_DATAINC 27
+#define DSID_CONN_CACHESIZE 28
+#define DSID_CONN_CTRLUSER 29
+#define DSID_CONN_CTRLPWD 30
+#define DSID_USECATALOG 31 // should the driver use the catalog name when the database is filebased
+#define DSID_CONN_HOSTNAME 32
+#define DSID_CONN_LDAP_BASEDN 33
+#define DSID_CONN_LDAP_PORTNUMBER 34
+#define DSID_CONN_LDAP_ROWCOUNT 35
+#define DSID_SQL92CHECK 36
+#define DSID_AUTOINCREMENTVALUE 37
+#define DSID_AUTORETRIEVEVALUE 38
+#define DSID_AUTORETRIEVEENABLED 39
+#define DSID_APPEND_TABLE_ALIAS 40
+#define DSID_MYSQL_PORTNUMBER 41
+#define DSID_IGNOREDRIVER_PRIV 42
+#define DSID_BOOLEANCOMPARISON 43
+#define DSID_ORACLE_PORTNUMBER 44
+#define DSID_ENABLEOUTERJOIN 45
+#define DSID_CATALOG 46
+#define DSID_SCHEMA 47
+#define DSID_INDEXAPPENDIX 48
+#define DSID_CONN_LDAP_USESSL 49
+#define DSID_DOCUMENT_URL 50
+#define DSID_DOSLINEENDS 51
+#define DSID_DATABASENAME 52
+#define DSID_AS_BEFORE_CORRNAME 53
+#define DSID_CHECK_REQUIRED_FIELDS 54
+#define DSID_IGNORECURRENCY 55
+#define DSID_CONN_SOCKET 56
+#define DSID_ESCAPE_DATETIME 57
+#define DSID_NAMED_PIPE 58
+#define DSID_PRIMARY_KEY_SUPPORT 59
+ // don't forget to adjust DSID_LAST_ITEM_ID below!
+
+
+//========================================================================
+//= item range. Adjust this if you introduce new items above
+
+#define DSID_FIRST_ITEM_ID DSID_NAME
+#define DSID_LAST_ITEM_ID DSID_PRIMARY_KEY_SUPPORT
+
+#endif // _DBAUI_DATASOURCEITEMS_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx
new file mode 100644
index 000000000000..f354126b8256
--- /dev/null
+++ b/dbaccess/source/ui/inc/dsmeta.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_DSMETA_HXX
+#define DBACCESS_DSMETA_HXX
+
+#include "dsntypes.hxx"
+#include "dsitems.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <boost/shared_ptr.hpp>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= AutheticationMode
+ //====================================================================
+ enum AuthenticationMode
+ {
+ AuthNone,
+ AuthUserPwd,
+ AuthPwd
+ };
+
+ //====================================================================
+ //= DataSourceMetaData
+ //====================================================================
+ class FeatureSet;
+ class DataSourceMetaData_Impl;
+ /** encapsulates meta data for a data source
+
+ On the long run, this class should a) encapsulate *all* meta data which
+ currently is hard coded somewhere in the program logic and b) be initialized
+ from the configuration.
+
+ At the moment, the data a) is still hard coded in the, well, code and b)
+ contains meta data about the advanced settings only.
+ */
+ class DataSourceMetaData
+ {
+ public:
+ DataSourceMetaData( const ::rtl::OUString& _sURL );
+ ~DataSourceMetaData();
+
+ /// returns a struct describing this data source type's support for our known advanced settings
+ const FeatureSet& getFeatureSet() const;
+
+ /// determines whether or not the data source requires authentication
+ static AuthenticationMode getAuthentication( const ::rtl::OUString& _sURL );
+
+ private:
+ ::boost::shared_ptr< DataSourceMetaData_Impl > m_pImpl;
+ };
+
+ //====================================================================
+ //= FeatureSet
+ //====================================================================
+ /** can be used to ask for (UI) support for certain advanced features
+ */
+ class FeatureSet
+ {
+ public:
+ typedef ::std::set< ItemID >::const_iterator const_iterator;
+
+ public:
+ inline FeatureSet() { }
+
+ inline void put( const ItemID _id ) { m_aContent.insert( _id ); }
+ inline bool has( const ItemID _id ) const { return m_aContent.find( _id ) != m_aContent.end(); }
+
+ inline bool supportsAnySpecialSetting() const;
+ inline bool supportsGeneratedValues() const;
+
+ inline const_iterator begin() const { return m_aContent.begin(); }
+ inline const_iterator end() const { return m_aContent.end(); }
+
+ private:
+ ::std::set< ItemID > m_aContent;
+ };
+
+ //--------------------------------------------------------------------
+ inline bool FeatureSet::supportsGeneratedValues() const
+ {
+ return has( DSID_AUTORETRIEVEENABLED );
+ }
+
+ //--------------------------------------------------------------------
+ inline bool FeatureSet::supportsAnySpecialSetting() const
+ {
+ return has( DSID_SQL92CHECK )
+ || has( DSID_APPEND_TABLE_ALIAS )
+ || has( DSID_AS_BEFORE_CORRNAME )
+ || has( DSID_ENABLEOUTERJOIN )
+ || has( DSID_IGNOREDRIVER_PRIV )
+ || has( DSID_PARAMETERNAMESUBST )
+ || has( DSID_SUPPRESSVERSIONCL )
+ || has( DSID_CATALOG )
+ || has( DSID_SCHEMA )
+ || has( DSID_INDEXAPPENDIX )
+ || has( DSID_DOSLINEENDS )
+ || has( DSID_BOOLEANCOMPARISON )
+ || has( DSID_CHECK_REQUIRED_FIELDS )
+ || has( DSID_IGNORECURRENCY )
+ || has( DSID_ESCAPE_DATETIME )
+ || has( DSID_PRIMARY_KEY_SUPPORT )
+ ;
+ }
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // DBACCESS_DSMETA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx
new file mode 100644
index 000000000000..531e7e382db3
--- /dev/null
+++ b/dbaccess/source/ui/inc/exsrcbrw.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SBA_EXTCTRLR_HXX
+#define _SBA_EXTCTRLR_HXX
+
+#include "brwctrlr.hxx"
+
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase2.hxx>
+
+//==============================================================================
+//= SbaExternalSourceBrowser
+//==============================================================================
+
+namespace dbaui
+{
+ class SbaXFormAdapter;
+ class SbaExternalSourceBrowser
+ :public SbaXDataBrowserController
+ ,public ::com::sun::star::util::XModifyBroadcaster
+ {
+ ::cppu::OInterfaceContainerHelper m_aModifyListeners;
+ // for multiplexing the modify events
+ SbaXFormAdapter* m_pDataSourceImpl;
+ sal_Bool m_bInQueryDispatch;
+ // our queryDispatch will ask our frame, which first will ask our queryDispatch, so we need to protect against
+ // recursion
+
+ public:
+ SbaExternalSourceBrowser(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
+
+ static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+
+ // UNO
+ DECLARE_UNO3_DEFAULTS(SbaExternalSourceBrowser, OGenericUnoController);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+ // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void);
+
+ // static ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > getStaticIdlClass();
+
+ // ::com::sun::star::frame::XDispatch
+ virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::frame::XDispatchProvider
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::util::XModifyListener
+ virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::util::XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL disposing();
+
+ // ::com::sun::star::form::XLoadListener
+ virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ protected:
+ ~SbaExternalSourceBrowser();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > CreateForm();
+ virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm);
+
+ virtual sal_Bool LoadForm();
+
+ void Attach(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xMaster);
+
+ void ClearView();
+
+ void startListening();
+ void stopListening();
+ };
+}
+
+#endif // _SBA_EXTCTRLR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/formadapter.hxx b/dbaccess/source/ui/inc/formadapter.hxx
new file mode 100644
index 000000000000..0d4d2f7d4d75
--- /dev/null
+++ b/dbaccess/source/ui/inc/formadapter.hxx
@@ -0,0 +1,449 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SBA_FORMADAPTER_HXX
+#define _SBA_FORMADAPTER_HXX
+
+#include "sbamultiplex.hxx"
+
+#include <com/sun/star/sdbc/XRow.hpp>
+#include <com/sun/star/sdbc/XParameters.hpp>
+#include <com/sun/star/sdbc/XColumnLocate.hpp>
+#include <com/sun/star/sdbc/XCloseable.hpp>
+#include <com/sun/star/sdbcx/XRowLocate.hpp>
+#include <com/sun/star/sdbc/XRowUpdate.hpp>
+#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#include <com/sun/star/sdbcx/XDeleteRows.hpp>
+#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
+#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
+#include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
+#include <com/sun/star/form/XLoadable.hpp>
+#include <com/sun/star/sdb/XResultSetAccess.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/form/XReset.hpp>
+#include <com/sun/star/form/XSubmit.hpp>
+#include <com/sun/star/form/XDatabaseParameterBroadcaster.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/awt/XTabControllerModel.hpp>
+#include <com/sun/star/io/XPersistObject.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/util/XCancellable.hpp>
+#include <comphelper/stl_types.hxx>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase12.hxx>
+#include <cppuhelper/implbase10.hxx>
+#include "moduledbu.hxx"
+
+namespace dbaui
+{
+ //==================================================================
+ // SbaXFormAdapter
+ //==================================================================
+
+ typedef ::cppu::WeakImplHelper12< ::com::sun::star::sdbc::XResultSetMetaDataSupplier
+ , ::com::sun::star::sdb::XResultSetAccess
+ , ::com::sun::star::sdbc::XResultSetUpdate
+ , ::com::sun::star::sdbc::XRowSet
+ , ::com::sun::star::sdb::XRowSetApproveBroadcaster
+ , ::com::sun::star::sdbcx::XRowLocate
+ , ::com::sun::star::sdbc::XRowUpdate
+ , ::com::sun::star::sdbc::XRow
+ , ::com::sun::star::sdbcx::XColumnsSupplier
+ , ::com::sun::star::sdbc::XColumnLocate
+ // --- stardiv::one::form::component::DatabaseForm ---
+ , ::com::sun::star::sdbc::XParameters
+ , ::com::sun::star::sdbcx::XDeleteRows
+ > SbaXFormAdapter_BASE1;
+ typedef ::cppu::ImplHelper12 < ::com::sun::star::sdbc::XWarningsSupplier
+ , ::com::sun::star::sdbc::XCloseable
+ , ::com::sun::star::form::XLoadable
+ , ::com::sun::star::sdb::XSQLErrorBroadcaster
+ , ::com::sun::star::form::XDatabaseParameterBroadcaster
+ // --- stardiv::one::form::component::Form ---
+ , ::com::sun::star::form::XForm
+ , ::com::sun::star::form::XSubmit
+ , ::com::sun::star::awt::XTabControllerModel
+ // --- stardiv::one::form::FormComponent ---
+ , ::com::sun::star::lang::XComponent
+ , ::com::sun::star::beans::XFastPropertySet
+ // already present : ::com::sun::star::form::XFormComponent (base of ::com::sun::star::form::XForm)
+ , ::com::sun::star::beans::XMultiPropertySet
+ , ::com::sun::star::container::XNamed
+ > SbaXFormAdapter_BASE2;
+ typedef ::cppu::ImplHelper10 < ::com::sun::star::io::XPersistObject
+ , ::com::sun::star::beans::XPropertySet
+ // --- stardiv::one::data::DatabaseCursor ---
+ , ::com::sun::star::util::XCancellable
+ // already present : ::com::sun::star::beans::XPropertySet
+ // --- stardiv::one::data::DatabaseComponent ---
+ // already present : ::com::sun::star::lang::XComponent
+ // already present : ::com::sun::star::container::XChild (base of ::com::sun::star::form::XForm)
+ // interfaces I don't know the service which they belong to ;)
+ // (they are supported by FmXDatabaseForm, se we support it, too)
+ , ::com::sun::star::beans::XPropertyState
+ , ::com::sun::star::form::XReset
+ , ::com::sun::star::container::XNameContainer
+ , ::com::sun::star::container::XIndexContainer
+ , ::com::sun::star::container::XContainer
+ , ::com::sun::star::container::XEnumerationAccess
+ // interfaces we need because of other reasons
+ , ::com::sun::star::beans::XPropertyChangeListener
+ > SbaXFormAdapter_BASE3;
+
+ class SbaXFormAdapter
+ :public SbaXFormAdapter_BASE1
+ ,public SbaXFormAdapter_BASE2
+ ,public SbaXFormAdapter_BASE3
+ {
+ private:
+ OModuleClient m_aModuleClient;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xMainForm;
+ ::osl::Mutex m_aMutex;
+
+ SbaXLoadMultiplexer m_aLoadListeners;
+ SbaXRowSetMultiplexer m_aRowSetListeners;
+ SbaXRowSetApproveMultiplexer m_aRowSetApproveListeners;
+ SbaXSQLErrorMultiplexer m_aErrorListeners;
+ SbaXParameterMultiplexer m_aParameterListeners;
+ SbaXSubmitMultiplexer m_aSubmitListeners;
+ SbaXResetMultiplexer m_aResetListeners;
+
+ SbaXPropertyChangeMultiplexer m_aPropertyChangeListeners;
+ SbaXVetoableChangeMultiplexer m_aVetoablePropertyChangeListeners;
+ SbaXPropertiesChangeMultiplexer m_aPropertiesChangeListeners;
+
+ ::cppu::OInterfaceContainerHelper m_aDisposeListeners;
+ ::cppu::OInterfaceContainerHelper m_aContainerListeners;
+
+ // hierarchy administration
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
+ ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > > m_aChildren;
+ ::std::vector< ::rtl::OUString > m_aChildNames;
+
+ // properties
+ ::rtl::OUString m_sName;
+ sal_Int32 m_nNamePropHandle;
+
+ public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > getAttachedForm() const { return m_xMainForm; }
+
+ public:
+ SbaXFormAdapter();
+ ~SbaXFormAdapter();
+
+ // ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > getIdlClass();
+ // ::com::sun::star::uno::Sequence<::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses();
+
+ void AttachForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xNewMaster);
+
+ // UNO
+ DECLARE_UNO3_DEFAULTS(SbaXFormAdapter, SbaXFormAdapter_BASE1);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XCloseable
+ virtual void SAL_CALL close() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XResultSetMetaDataSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL getMetaData() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XColumnLocate
+ virtual sal_Int32 SAL_CALL findColumn(const ::rtl::OUString& columnName) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbcx::XColumnsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getColumns() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XRow
+ virtual sal_Bool SAL_CALL wasNull() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getString(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual float SAL_CALL getFloat(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL getDouble(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::util::Date SAL_CALL getDate(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::util::Time SAL_CALL getTime(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbcx::XRowLocate
+ virtual ::com::sun::star::uno::Any SAL_CALL getBookmark() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL moveToBookmark(const ::com::sun::star::uno::Any& bookmark) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL moveRelativeToBookmark(const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL compareBookmarks(const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasOrderedBookmarks() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL hashBookmark(const ::com::sun::star::uno::Any& bookmark) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XRowUpdate
+ virtual void SAL_CALL updateNull(sal_Int32 columnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateBoolean(sal_Int32 columnIndex, sal_Bool x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateByte(sal_Int32 columnIndex, sal_Int8 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateShort(sal_Int32 columnIndex, sal_Int16 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateInt(sal_Int32 columnIndex, sal_Int32 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateLong(sal_Int32 columnIndex, sal_Int64 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateFloat(sal_Int32 columnIndex, float x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateDouble(sal_Int32 columnIndex, double x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateString(sal_Int32 columnIndex, const ::rtl::OUString& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateBytes(sal_Int32 columnIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const ::com::sun::star::util::Date& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateTime(sal_Int32 columnIndex, const ::com::sun::star::util::Time& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateCharacterStream(sal_Int32 columnIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XResultSet
+ virtual sal_Bool SAL_CALL next() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isBeforeFirst() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAfterLast() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isFirst() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isLast() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL beforeFirst() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL afterLast() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL first() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL last() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getRow() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL absolute(sal_Int32 row) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL relative(sal_Int32 rows) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL previous() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL refreshRow() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL rowUpdated() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL rowInserted() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL rowDeleted() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getStatement() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XResultSetUpdate
+ virtual void SAL_CALL insertRow() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateRow() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deleteRow() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL cancelRowUpdates() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL moveToInsertRow() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL moveToCurrentRow() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XRowSet
+ virtual void SAL_CALL execute() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addRowSetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener >& listener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeRowSetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener >& listener) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbcx::XDeleteRows
+ virtual ::com::sun::star::uno::Sequence<sal_Int32> SAL_CALL deleteRows(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XWarningsSupplier
+ virtual ::com::sun::star::uno::Any SAL_CALL getWarnings() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clearWarnings() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdb::XRowSetApproveBroadcaster
+ virtual void SAL_CALL addRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener >& listener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener >& listener) throw(::com::sun::star::uno::RuntimeException);
+
+ // com::sun::star::sdbc::XSQLErrorBroadcaster
+ virtual void SAL_CALL addSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener >& _rListener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener >& _rListener) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdb::XResultSetAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL createResultSet() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // com::sun::star::form::XLoadable
+ virtual void SAL_CALL load() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL unload() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL reload() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isLoaded() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addLoadListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadListener >& aListener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeLoadListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadListener >& aListener) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::sdbc::XParameters
+ virtual void SAL_CALL setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setBoolean(sal_Int32 parameterIndex, sal_Bool x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setByte(sal_Int32 parameterIndex, sal_Int8 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setShort(sal_Int32 parameterIndex, sal_Int16 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setInt(sal_Int32 parameterIndex, sal_Int32 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLong(sal_Int32 parameterIndex, sal_Int64 x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFloat(sal_Int32 parameterIndex, float x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDouble(sal_Int32 parameterIndex, double x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setString(sal_Int32 parameterIndex, const ::rtl::OUString& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setBytes(sal_Int32 parameterIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDate(sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTime(sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setTimestamp(sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setBinaryStream(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setCharacterStream(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setObject(sal_Int32 parameterIndex, const ::com::sun::star::uno::Any& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setObjectWithInfo(sal_Int32 parameterIndex, const ::com::sun::star::uno::Any& x, sal_Int32 targetSqlType, sal_Int32 scale) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRef(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef >& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setBlob(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob >& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setClob(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob >& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setArray(sal_Int32 parameterIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray >& x) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clearParameters() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::form::XDatabaseParameterBroadcaster
+ virtual void SAL_CALL addParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XChild
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setParent(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::form::XSubmit
+ virtual void SAL_CALL submit(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& aControl, const ::com::sun::star::awt::MouseEvent& aMouseEvt) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addSubmitListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XSubmitListener >& aListener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeSubmitListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XSubmitListener >& aListener) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::awt::XTabControllerModel
+ virtual sal_Bool SAL_CALL getGroupControl() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setGroupControl(sal_Bool GroupControl) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setControlModels(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& Controls) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL getControlModels() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setGroup(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& _rGroup, const ::rtl::OUString& GroupName) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getGroupCount() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL getGroup(sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& _rGroup, ::rtl::OUString& Name) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL getGroupByName(const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > >& _rGroup) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XFastPropertySet
+ virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle, const ::com::sun::star::uno::Any& aValue) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XNamed
+ virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName(const ::rtl::OUString& aName) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::io::XPersistObject
+ virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream >& _rxOutStream) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream >& _rxInStream) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XMultiPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValues(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertiesChangeListener(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertiesChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& Listener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL firePropertiesChangeEvent(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XPropertySet
+ virtual void SAL_CALL setPropertyValue(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::util::XCancellable
+ virtual void SAL_CALL cancel() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(const ::rtl::OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault(const ::rtl::OUString& PropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(const ::rtl::OUString& aPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::form::XReset
+ virtual void SAL_CALL reset() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addResetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XResetListener >& aListener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeResetListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XResetListener >& aListener) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XNameContainer
+ virtual void SAL_CALL insertByName(const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeByName(const ::rtl::OUString& Name) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XNameReplace
+ virtual void SAL_CALL replaceByName(const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const ::rtl::OUString& aName) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& aName) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XIndexContainer
+ virtual void SAL_CALL insertByIndex(sal_Int32 _rIndex, const ::com::sun::star::uno::Any& Element) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeByIndex(sal_Int32 _rIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XIndexReplace
+ virtual void SAL_CALL replaceByIndex(sal_Int32 _rIndex, const ::com::sun::star::uno::Any& Element) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XContainer
+ virtual void SAL_CALL addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XPropertyChangeListener
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
+
+ protected:
+ // container handling
+ void implInsert(const ::com::sun::star::uno::Any& aElement, sal_Int32 nIndex, const ::rtl::OUString* pNewElName = NULL) throw(::com::sun::star::lang::IllegalArgumentException);
+ sal_Int32 implGetPos(const ::rtl::OUString& rName);
+
+ void StopListening();
+ void StartListening();
+ };
+}
+#endif // _SBA_FORMADAPTER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/imageprovider.hxx b/dbaccess/source/ui/inc/imageprovider.hxx
new file mode 100644
index 000000000000..1ad4678d5559
--- /dev/null
+++ b/dbaccess/source/ui/inc/imageprovider.hxx
@@ -0,0 +1,188 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_IMAGEPROVIDER_HXX
+#define DBACCESS_IMAGEPROVIDER_HXX
+
+#include <vcl/image.hxx>
+
+/** === begin UNO includes === **/
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdb/application/DatabaseObject.hpp>
+/** === end UNO includes === **/
+
+#include <boost/shared_ptr.hpp>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ // for convenience of our clients
+ namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
+
+ //====================================================================
+ //= ImageProvider
+ //====================================================================
+ struct ImageProvider_Data;
+ /** provides images for database objects such as tables, queries, forms, reports ...
+
+ At the moment, this class cares for small icons only, that is, icons which can be used
+ in a tree control. On the medium term, we should extend it with support for different-sized
+ icons.
+ */
+ class ImageProvider
+ {
+ private:
+ ::boost::shared_ptr< ImageProvider_Data > m_pData;
+
+ public:
+ /** creates a semi-functional ImageProvider instance
+
+ The resulting instance is not able to provide any concrete object images,
+ but only default images.
+ */
+ ImageProvider();
+
+ /** creates an ImageProvider instance
+
+ @param _rxConnection
+ denotes the connection to work for. Must not be <NULL/>.
+ */
+ ImageProvider(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection
+ );
+
+ /** returns the image to be used for a database object with the given name
+
+ @param _nDatabaseObjectType
+ the type of the object. Must be one of the css.sdb.application.DatabaseObject
+ constants.
+ @param _rName
+ the name of the object
+ @param _out_rImage
+ the normal image to use for the object
+ @param _out_rImageHC
+ the high-contrast version of the image to use for the object
+ @return
+ the image to be used for the object.
+ */
+ void getImages(
+ const String& _rName,
+ const sal_Int32 _nDatabaseObjectType,
+ Image& _out_rImage,
+ Image& _out_rImageHC
+ );
+
+ /** returns the default image to be used for a database object
+
+ In opposite to getImages, this method does not check the concrete object
+ for its image, but returns a default image to be used for all objects of the given
+ type.
+
+ @param _nDatabaseObjectType
+ the type of the object. Must be one of the css.sdb.application.DatabaseObject
+ constants.
+ @param _bHighContrast
+ indicates whether High-Contrast icons should be used.
+ Note that normally, this would be some application-wide setting. However,
+ in current OOo, HC support is decided on a per-control basis, means every
+ control decides itself whether its images must be HC versions or not.
+ Thus callers need to specify this flag.
+ @return
+ the image to be used for the object type.
+ */
+ Image getDefaultImage(
+ sal_Int32 _nDatabaseObjectType,
+ bool _bHighContrast
+ );
+
+ /** returns the resource ID for the default image to be used for a database object
+
+ In opposite to getImages, this method does not check the concrete object
+ for its image, but returns a default image to be used for all objects of the given
+ type.
+
+ @param _nDatabaseObjectType
+ the type of the object. Must be one of the css.sdb.application.DatabaseObject
+ constants.
+ @param _bHighContrast
+ indicates whether High-Contrast icons should be used.
+ Note that normally, this would be some application-wide setting. However,
+ in current OOo, HC support is decided on a per-control basis, means every
+ control decides itself whether its images must be HC versions or not.
+ Thus callers need to specify this flag.
+ @return
+ the resource ID image to be used for the object type. Must be fed into a
+ ModuleRes instance to actually load the image.
+ */
+ USHORT getDefaultImageResourceID(
+ sal_Int32 _nDatabaseObjectType,
+ bool _bHighContrast
+ );
+
+ /** retrieves the image to be used for folders of database objects
+ @param _nDatabaseObjectType
+ the type of the object. Must be one of the css.sdb.application.DatabaseObject
+ constants.
+ @param _rName
+ the name of the object
+ @param _bHighContrast
+ indicates whether High-Contrast icons should be used.
+ Note that normally, this would be some application-wide setting. However,
+ in current OOo, HC support is decided on a per-control basis, means every
+ control decides itself whether its images must be HC versions or not.
+ Thus callers need to specify this flag.
+ @return
+ the image to be used for folders of the given type
+ */
+ Image getFolderImage(
+ sal_Int32 _nDatabaseObjectType,
+ bool _bHighContrast
+ );
+
+ /** retrieves the image to be used for a database as a whole.
+ @param _bHighContrast
+ indicates whether High-Contrast icons should be used.
+ Note that normally, this would be some application-wide setting. However,
+ in current OOo, HC support is decided on a per-control basis, means every
+ control decides itself whether its images must be HC versions or not.
+ Thus callers need to specify this flag.
+ @return
+ the image to be used for folders of this type
+ */
+ Image getDatabaseImage( bool _bHighContrast );
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // DBACCESS_IMAGEPROVIDER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/indexcollection.hxx b/dbaccess/source/ui/inc/indexcollection.hxx
new file mode 100644
index 000000000000..a7a7daaf8b26
--- /dev/null
+++ b/dbaccess/source/ui/inc/indexcollection.hxx
@@ -0,0 +1,119 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_INDEXCOLLECTION_HXX_
+#define _DBAUI_INDEXCOLLECTION_HXX_
+
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/sdbc/SQLException.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include "indexes.hxx"
+
+//......................................................................
+namespace dbaui
+{
+//......................................................................
+
+ //==================================================================
+ //= OIndexCollection
+ //==================================================================
+ class OIndexCollection
+ {
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
+ m_xIndexes;
+
+ // cached information
+ Indexes m_aIndexes;
+
+ public:
+ // construction
+ OIndexCollection();
+ OIndexCollection(const OIndexCollection& _rSource);
+ // OIndexCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxIndexes);
+
+ const OIndexCollection& operator=(const OIndexCollection& _rSource);
+
+ // iterating through the collection
+ typedef OIndex* iterator;
+ typedef OIndex const* const_iterator;
+
+ /// get access to the first element of the index collection
+ Indexes::const_iterator begin() const { return m_aIndexes.begin(); }
+ /// get access to the first element of the index collection
+ Indexes::iterator begin() { return m_aIndexes.begin(); }
+ /// get access to the (last + 1st) element of the index collection
+ Indexes::const_iterator end() const { return m_aIndexes.end(); }
+ /// get access to the (last + 1st) element of the index collection
+ Indexes::iterator end() { return m_aIndexes.end(); }
+
+ // searching
+ Indexes::const_iterator find(const String& _rName) const;
+ Indexes::iterator find(const String& _rName);
+ Indexes::const_iterator findOriginal(const String& _rName) const;
+ Indexes::iterator findOriginal(const String& _rName);
+
+ // inserting without committing
+ // the OriginalName of the newly inserted index will be empty, thus indicating that it's new
+ Indexes::iterator insert(const String& _rName);
+ // commit a new index, which is already part if the collection, but does not have an equivalent in the
+ // data source, yet
+ void commitNewIndex(const Indexes::iterator& _rPos) SAL_THROW((::com::sun::star::sdbc::SQLException));
+
+ // reset the data for the given index
+ void resetIndex(const Indexes::iterator& _rPos) SAL_THROW((::com::sun::star::sdbc::SQLException));
+
+ // attach to a new key container
+ void attach(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxIndexes);
+ // detach from the container
+ void detach();
+
+ // is the object valid?
+ sal_Bool isValid() const { return m_xIndexes.is(); }
+ // number of contained indexes
+ sal_Int32 size() const { return m_aIndexes.size(); }
+
+ /// drop an index, and remove it from the collection
+ sal_Bool drop(const Indexes::iterator& _rPos) SAL_THROW((::com::sun::star::sdbc::SQLException));
+ /// simply drop the index described by the name, but don't remove the descriptor from the collection
+ sal_Bool dropNoRemove(const Indexes::iterator& _rPos) SAL_THROW((::com::sun::star::sdbc::SQLException));
+
+ protected:
+ void implConstructFrom(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxIndexes);
+ void implFillIndexInfo(OIndex& _rIndex, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxDescriptor) SAL_THROW((::com::sun::star::uno::Exception));
+ void implFillIndexInfo(OIndex& _rIndex) SAL_THROW((::com::sun::star::uno::Exception));
+ };
+
+
+//......................................................................
+} // namespace dbaui
+//......................................................................
+
+#endif // _DBAUI_INDEXCOLLECTION_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx
new file mode 100644
index 000000000000..965407e4ed14
--- /dev/null
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -0,0 +1,185 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_INDEXDIALOG_HXX_
+#define _DBAUI_INDEXDIALOG_HXX_
+
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/button.hxx>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <vcl/toolbox.hxx>
+#include <svtools/svtreebx.hxx>
+#include <unotools/viewoptions.hxx>
+#include "indexes.hxx"
+#include "ToolBoxHelper.hxx"
+
+//......................................................................
+namespace dbaui
+{
+//......................................................................
+
+ //==================================================================
+ //= DbaIndexList
+ //==================================================================
+ class DbaIndexList : public SvTreeListBox
+ {
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
+ Link m_aSelectHdl;
+ Link m_aEndEditHdl;
+ sal_Bool m_bSuspendSelectHdl;
+
+ public:
+ DbaIndexList(Window* _pParent, const ResId& _rId);
+
+ void SetSelectHdl(const Link& _rHdl) { m_aSelectHdl = _rHdl; }
+ Link GetSelectHdl() const { return m_aSelectHdl; }
+
+ void SetEndEditHdl(const Link& _rHdl) { m_aEndEditHdl = _rHdl; }
+ Link GetEndEditHdl() const { return m_aEndEditHdl; }
+
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect );
+
+ void enableSelectHandler();
+ void disableSelectHandler();
+
+ void SelectNoHandlerCall( SvLBoxEntry* pEntry );
+
+ inline void setConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection)
+ {
+ m_xConnection = _rxConnection;
+ }
+
+ protected:
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+
+ private:
+ using SvTreeListBox::Select;
+ };
+
+ //==================================================================
+ //= DbaIndexDialog
+ //==================================================================
+ class IndexFieldsControl;
+ class OIndexCollection;
+ class DbaIndexDialog : public ModalDialog,
+ public OToolBoxHelper
+ {
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
+ SvtViewOptions m_aGeometrySettings;
+
+ ToolBox m_aActions;
+ DbaIndexList m_aIndexes;
+ FixedLine m_aIndexDetails;
+ FixedText m_aDescriptionLabel;
+ FixedText m_aDescription;
+ CheckBox m_aUnique;
+ FixedText m_aFieldsLabel;
+ IndexFieldsControl* m_pFields;
+ PushButton m_aClose;
+ HelpButton m_aHelp;
+
+ OIndexCollection* m_pIndexes;
+ SvLBoxEntry* m_pPreviousSelection;
+ sal_Bool m_bEditAgain;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ m_xORB;
+ public:
+ DbaIndexDialog(
+ Window* _pParent,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rFieldNames,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxIndexes,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ sal_Int32 _nMaxColumnsInIndex
+ );
+ virtual ~DbaIndexDialog();
+
+ virtual void StateChanged( StateChangedType nStateChange );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ /** will be called whenthe id of the image list is needed.
+ @param _eBitmapSet
+ <svtools/imgdef.hxx>
+ @param _bHiContast
+ <TRUE/> when in high contrast mode.
+ */
+ virtual ImageList getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const;
+
+ /** will be called when the controls need to be resized.
+ */
+ virtual void resizeControls(const Size& _rDiff);
+
+ protected:
+ void fillIndexList();
+ void updateToolbox();
+ void updateControls(const SvLBoxEntry* _pEntry);
+
+ protected:
+ DECL_LINK( OnIndexSelected, DbaIndexList* );
+ DECL_LINK( OnIndexAction, ToolBox* );
+ DECL_LINK( OnEntryEdited, SvLBoxEntry* );
+ DECL_LINK( OnModified, void* );
+ DECL_LINK( OnCloseDialog, void* );
+
+ DECL_LINK( OnEditIndexAgain, SvLBoxEntry* );
+
+ private:
+ void OnNewIndex();
+ void OnDropIndex(sal_Bool _bConfirm = sal_True);
+ void OnRenameIndex();
+ void OnSaveIndex();
+ void OnResetIndex();
+
+ sal_Bool implCommit(SvLBoxEntry* _pEntry);
+ sal_Bool implSaveModified(sal_Bool _bPlausibility = sal_True);
+ sal_Bool implCommitPreviouslySelected();
+
+ sal_Bool implDropIndex(SvLBoxEntry* _pEntry, sal_Bool _bRemoveFromCollection);
+
+ sal_Bool implCheckPlausibility(const ConstIndexesIterator& _rPos);
+
+ /** checks if the controls have to be replaced and moved.
+ */
+ void checkControls();
+ };
+
+//......................................................................
+} // namespace dbaui
+//......................................................................
+
+#endif // _DBAUI_INDEXDIALOG_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/indexes.hxx b/dbaccess/source/ui/inc/indexes.hxx
new file mode 100644
index 000000000000..5457ec8bd17e
--- /dev/null
+++ b/dbaccess/source/ui/inc/indexes.hxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_INDEXES_HXX_
+#define _DBAUI_INDEXES_HXX_
+
+#include <tools/string.hxx>
+#include <comphelper/stl_types.hxx>
+
+//......................................................................
+namespace dbaui
+{
+//......................................................................
+ //==================================================================
+ //= OIndexField
+ //==================================================================
+ struct OIndexField
+ {
+ String sFieldName;
+ sal_Bool bSortAscending;
+
+ OIndexField() : bSortAscending(sal_True) { }
+ };
+
+ DECLARE_STL_VECTOR( OIndexField, IndexFields );
+
+ //==================================================================
+ //= OIndex
+ //==================================================================
+ struct GrantIndexAccess
+ {
+ friend class OIndexCollection;
+ private:
+ GrantIndexAccess() { }
+ };
+
+ //..................................................................
+ struct OIndex
+ {
+ protected:
+ ::rtl::OUString sOriginalName;
+ sal_Bool bModified;
+
+ public:
+ ::rtl::OUString sName;
+ ::rtl::OUString sDescription;
+ sal_Bool bPrimaryKey;
+ sal_Bool bUnique;
+ IndexFields aFields;
+
+ public:
+ OIndex(const ::rtl::OUString& _rOriginalName)
+ : sOriginalName(_rOriginalName), bModified(sal_False), sName(_rOriginalName), bPrimaryKey(sal_False), bUnique(sal_False)
+ {
+ }
+
+ const ::rtl::OUString& getOriginalName() const { return sOriginalName; }
+
+ sal_Bool isModified() const { return bModified; }
+ void setModified(sal_Bool _bModified) { bModified = _bModified; }
+ void clearModified() { setModified(sal_False); }
+
+ sal_Bool isNew() const { return 0 == getOriginalName().getLength(); }
+ void flagAsNew(const GrantIndexAccess&) { sOriginalName = ::rtl::OUString(); }
+ void flagAsCommitted(const GrantIndexAccess&) { sOriginalName = sName; }
+
+
+ private:
+ OIndex(); // not implemented
+ };
+
+ DECLARE_STL_VECTOR( OIndex, Indexes );
+
+//......................................................................
+} // namespace dbaui
+//......................................................................
+
+#endif // _DBAUI_INDEXES_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
new file mode 100644
index 000000000000..4b622baa92f5
--- /dev/null
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_INDEXFIELDSCONTROL_HXX_
+#define _DBAUI_INDEXFIELDSCONTROL_HXX_
+
+#include "moduledbu.hxx"
+#include <svtools/editbrowsebox.hxx>
+#include "indexcollection.hxx"
+#include <com/sun/star/uno/Sequence.hxx>
+
+//......................................................................
+namespace dbaui
+{
+//......................................................................
+
+ //==================================================================
+ // IndexFieldsControl
+ //==================================================================
+ class IndexFieldsControl : public ::svt::EditBrowseBox
+ {
+ OModuleClient m_aModuleClient;
+ protected:
+ IndexFields m_aSavedValue;
+
+ IndexFields m_aFields; // !! order matters !!
+ ConstIndexFieldsIterator m_aSeekRow; // !!
+
+ Link m_aModifyHdl;
+
+ ::svt::ListBoxControl* m_pSortingCell;
+ ::svt::ListBoxControl* m_pFieldNameCell;
+
+ String m_sAscendingText;
+ String m_sDescendingText;
+
+ sal_Int32 m_nMaxColumnsInIndex;
+ sal_Bool m_bAddIndexAppendix;
+
+ public:
+ IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex,sal_Bool _bAddIndexAppendix);
+ ~IndexFieldsControl();
+
+ void Init(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rAvailableFields);
+
+ void initializeFrom(const IndexFields& _rFields);
+ void commitTo(IndexFields& _rFields);
+
+ sal_Bool SaveModified();
+ sal_Bool IsModified() const;
+
+ const IndexFields& GetSavedValue() const { return m_aSavedValue; }
+ void SaveValue() { m_aSavedValue = m_aFields; }
+
+ void SetModifyHdl(const Link& _rHdl) { m_aModifyHdl = _rHdl; }
+ Link GetModifyHdl() const { return m_aModifyHdl; }
+ virtual String GetCellText(long _nRow,sal_uInt16 nColId) const;
+
+ protected:
+ // EditBrowseBox overridables
+ virtual void PaintCell( OutputDevice& _rDev, const Rectangle& _rRect, sal_uInt16 _nColumnId ) const;
+ virtual sal_Bool SeekRow(long nRow);
+ virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId);
+ virtual sal_Bool IsTabAllowed(sal_Bool bForward) const;
+
+ ::svt::CellController* GetController(long _nRow, sal_uInt16 _nColumnId);
+ void InitController(::svt::CellControllerRef&, long _nRow, sal_uInt16 _nColumnId);
+
+ protected:
+ String GetRowCellText(const ConstIndexFieldsIterator& _rRow,sal_uInt16 nColId) const;
+ sal_Bool implGetFieldDesc(long _nRow, ConstIndexFieldsIterator& _rPos);
+
+ sal_Bool isNewField() const { return GetCurRow() >= (sal_Int32)m_aFields.size(); }
+
+ DECL_LINK( OnListEntrySelected, ListBox* );
+
+ private:
+ using ::svt::EditBrowseBox::Init;
+ };
+
+//......................................................................
+} // namespace dbaui
+//......................................................................
+
+#endif // _DBAUI_INDEXFIELDSCONTROL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx
new file mode 100644
index 000000000000..7439bb7a56b9
--- /dev/null
+++ b/dbaccess/source/ui/inc/linkeddocuments.hxx
@@ -0,0 +1,141 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_LINKEDDOCUMENTS_HXX_
+#define _DBAUI_LINKEDDOCUMENTS_HXX_
+
+#include "AppElementType.hxx"
+
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/ucb/XContent.hpp>
+#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
+#include <tools/link.hxx>
+#include <tools/string.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+
+class Window;
+//......................................................................
+namespace dbaui
+{
+//......................................................................
+
+ //==================================================================
+ //= OLinkedDocumentsAccess
+ //==================================================================
+ class OLinkedDocumentsAccess
+ {
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
+ m_xDocumentContainer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
+ m_xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >
+ m_xDocumentUI;
+ Window* m_pDialogParent;
+ String m_sCurrentlyEditing;
+ ::rtl::OUString
+ m_sDataSourceName;
+
+ public:
+ OLinkedDocumentsAccess(
+ Window* _pDialogParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& i_rDocumentUI,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
+ const ::rtl::OUString& _sDataSourceName
+ );
+ ~OLinkedDocumentsAccess();
+
+ inline sal_Bool isConnected() const { return m_xConnection.is(); }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>
+ open(
+ const ::rtl::OUString& _rLinkName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _xDefinition,
+ ElementOpenMode _eOpenMode,
+ const ::comphelper::NamedValueCollection& _rAdditionalArgs
+ );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
+ newDocument(
+ sal_Int32 i_nActionID,
+ const ::comphelper::NamedValueCollection& i_rCreationArgs,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_rDefinition
+ );
+
+ void newFormWithPilot(
+ const sal_Int32 _nCommandType = -1,
+ const ::rtl::OUString& _rObjectName = ::rtl::OUString()
+ );
+ void newReportWithPilot(
+ const sal_Int32 _nCommandType = -1,
+ const ::rtl::OUString& _rObjectName = ::rtl::OUString()
+ );
+ void newQueryWithPilot();
+ void newTableWithPilot();
+
+ enum RESULT
+ {
+ ERROR,
+ SUCCESS,
+ CANCEL
+ };
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
+ impl_open(
+ const ::rtl::OUString& _rLinkName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDefinition,
+ ElementOpenMode _eOpenMode,
+ const ::comphelper::NamedValueCollection& _rAdditionalArgs
+ );
+
+ void
+ impl_newWithPilot(
+ const char* _pWizardService,
+ const sal_Int32 _nCommandType,
+ const ::rtl::OUString& _rObjectName
+ );
+
+ };
+
+//......................................................................
+} // namespace dbaui
+//......................................................................
+
+#endif // _DBAUI_LINKEDDOCUMENTS_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx
new file mode 100644
index 000000000000..05d5492f9f77
--- /dev/null
+++ b/dbaccess/source/ui/inc/listviewitems.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_LISTVIEWITEMS_HXX_
+#define _DBAUI_LISTVIEWITEMS_HXX_
+
+#include <svtools/svlbitm.hxx>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ #define SV_ITEM_ID_BOLDLBSTRING SV_ITEM_ID_LBOXSTRING
+
+ //====================================================================
+ //= OBoldListboxString
+ //====================================================================
+ class OBoldListboxString : public SvLBoxString
+ {
+ sal_Bool m_bEmphasized;
+
+ public:
+ OBoldListboxString(SvLBoxEntry* _pEntry, sal_uInt16 _nFlags, const XubString& _rStr)
+ :SvLBoxString(_pEntry, _nFlags, _rStr)
+ ,m_bEmphasized(sal_False)
+ {
+ }
+
+ virtual USHORT IsA();
+
+ virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
+ virtual void InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* _pViewData);
+
+ sal_Bool isEmphasized() const { return m_bEmphasized; }
+ void emphasize(sal_Bool _bEmphasize) { m_bEmphasized = _bEmphasize; }
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // _DBAUI_LISTVIEWITEMS_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/localresaccess.hxx b/dbaccess/source/ui/inc/localresaccess.hxx
new file mode 100644
index 000000000000..f288666dc303
--- /dev/null
+++ b/dbaccess/source/ui/inc/localresaccess.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_LOCALRESACCESS_HXX_
+#define _DBAUI_LOCALRESACCESS_HXX_
+
+#include <svtools/localresaccess.hxx>
+#include "moduledbu.hxx"
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+//=========================================================================
+//= LocalResourceAccess
+//=========================================================================
+/** helper class for acessing local resources
+*/
+typedef ::svt::OLocalResourceAccess LRA_Base;
+class LocalResourceAccess : protected LRA_Base
+{
+ OModuleClient m_aModuleClient;
+public:
+ inline LocalResourceAccess( sal_uInt16 _nId, RESOURCE_TYPE _rType )
+ :LRA_Base( ModuleRes( _nId ), _rType )
+ {
+ }
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_LOCALRESACCESS_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/makefile.mk b/dbaccess/source/ui/inc/makefile.mk
new file mode 100644
index 000000000000..5e1454d57f61
--- /dev/null
+++ b/dbaccess/source/ui/inc/makefile.mk
@@ -0,0 +1,43 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org 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 version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=dbaccess
+TARGET=dba_uiinc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+LOCALIZE_ME=toolbox_tmpl.hrc
+
+.INCLUDE : target.mk
+
diff --git a/dbaccess/source/ui/inc/marktree.hxx b/dbaccess/source/ui/inc/marktree.hxx
new file mode 100644
index 000000000000..018e1c5bab45
--- /dev/null
+++ b/dbaccess/source/ui/inc/marktree.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_MARKTREE_HXX_
+#define _DBAUI_MARKTREE_HXX_
+
+#include "dbtreelistbox.hxx"
+
+
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+//========================================================================
+//= OMarkableTreeListBox
+//========================================================================
+/** a tree list box where all entries can be marked (with a checkbox) and
+ unmarked. In addition, inner nodes know a third state which applies
+ if some, but not all of their descendants are marked.
+*/
+class OMarkableTreeListBox : public DBTreeListBox
+{
+ SvLBoxButtonData* m_pCheckButton;
+ Link m_aCheckButtonHandler;
+
+public:
+ OMarkableTreeListBox( Window* pParent
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ , WinBits nWinStyle=0 );
+ OMarkableTreeListBox( Window* pParent
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ , const ResId& rResId );
+ ~OMarkableTreeListBox();
+
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void CheckButtonHdl();
+ void CheckButtons(); // make the button states consistent (bottom-up)
+
+ /// the handler given is called whenever the check state of one or more items changed
+ void SetCheckHandler(const Link& _rHdl) { m_aCheckButtonHandler = _rHdl; }
+
+protected:
+ virtual void Paint(const Rectangle& _rRect);
+ virtual void checkedButton_noBroadcast(SvLBoxEntry* _pEntry);
+
+ SvButtonState implDetermineState(SvLBoxEntry* _pEntry);
+ // determines the check state of the given entry, by analyzing the states of all descendants
+
+private:
+ void InitButtonData();
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_MARKTREE_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/moduledbu.hxx b/dbaccess/source/ui/inc/moduledbu.hxx
new file mode 100644
index 000000000000..2b915f6fb70a
--- /dev/null
+++ b/dbaccess/source/ui/inc/moduledbu.hxx
@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_MODULE_DBU_HXX_
+#define _DBAUI_MODULE_DBU_HXX_
+
+#include <osl/mutex.hxx>
+#include <tools/resid.hxx>
+#include <sal/macros.h>
+
+class ResMgr;
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+//=========================================================================
+//= OModule
+//=========================================================================
+class OModuleImpl;
+class OModule
+{
+ friend class OModuleClient;
+
+private:
+ OModule();
+ // not implemented. OModule is a static class
+
+protected:
+ static ::osl::Mutex s_aMutex; /// access safety
+ static sal_Int32 s_nClients; /// number of registered clients
+ static OModuleImpl* s_pImpl; /// impl class. lives as long as at least one client for the module is registered
+
+public:
+ /// get the vcl res manager of the module
+ static ResMgr* getResManager();
+
+protected:
+ /// register a client for the module
+ static void registerClient();
+ /// revoke a client for the module
+ static void revokeClient();
+
+private:
+ /** ensure that the impl class exists
+ @precond m_aMutex is guarded when this method gets called
+ */
+ static void ensureImpl();
+};
+
+//=========================================================================
+//= OModuleClient
+//=========================================================================
+/** base class for objects which uses any global module-specific ressources
+*/
+class OModuleClient
+{
+public:
+ OModuleClient() { OModule::registerClient(); }
+ ~OModuleClient() { OModule::revokeClient(); }
+};
+
+//=========================================================================
+//= ModuleRes
+//=========================================================================
+/** specialized ResId, using the ressource manager provided by the global module
+*/
+class ModuleRes : public ::ResId
+{
+public:
+ ModuleRes(USHORT _nId) : ResId(_nId, *OModule::getResManager()) { }
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_MODULE_DBU_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/objectnamecheck.hxx b/dbaccess/source/ui/inc/objectnamecheck.hxx
new file mode 100644
index 000000000000..55c490a465cd
--- /dev/null
+++ b/dbaccess/source/ui/inc/objectnamecheck.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_SOURCE_UI_INC_OBJECTNAMECHECK_HXX
+#define DBACCESS_SOURCE_UI_INC_OBJECTNAMECHECK_HXX
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+namespace rtl { class OUString; }
+namespace dbtools { class SQLExceptionInfo; }
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= IObjectNameCheck
+ //====================================================================
+ /** interface encapsulating the check for the validity of an object name
+ */
+ class IObjectNameCheck
+ {
+ public:
+ /** determines whether a given object name is valid
+
+ @param _rObjectName
+ the name to check
+ @param _out_rErrorToDisplay
+ output parameter taking an error message describing why the name is not
+ valid, if applicable.
+
+ @return
+ <TRUE/> if and only if the given name is valid.
+ */
+ virtual bool isNameValid(
+ const ::rtl::OUString& _rObjectName,
+ ::dbtools::SQLExceptionInfo& _out_rErrorToDisplay
+ ) const = 0;
+
+ public:
+ virtual ~IObjectNameCheck() { }
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // DBACCESS_SOURCE_UI_INC_OBJECTNAMECHECK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx
new file mode 100644
index 000000000000..72900b49cfb8
--- /dev/null
+++ b/dbaccess/source/ui/inc/opendoccontrols.hxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX
+#define DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX
+
+#include <vcl/button.hxx>
+#include <vcl/lstbox.hxx>
+#include <rtl/ustring.hxx>
+#include <map>
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= OpenDocumentButton
+ //====================================================================
+ /** a button which can be used to open a document
+
+ The text of the button is the same as for the "Open" command in the application
+ UI. Additionally, the icon for this command is also displayed on the button.
+ */
+ class OpenDocumentButton : public PushButton
+ {
+ private:
+ ::rtl::OUString m_sModule;
+
+ public:
+ OpenDocumentButton( Window* _pParent, const sal_Char* _pAsciiModuleName, const ResId& _rResId );
+
+ protected:
+ void impl_init( const sal_Char* _pAsciiModuleName );
+ };
+
+ //====================================================================
+ //= OpenDocumentListBox
+ //====================================================================
+ class OpenDocumentListBox : public ListBox
+ {
+ private:
+ typedef ::std::pair< String, String > StringPair;
+ typedef ::std::map< USHORT, StringPair > MapIndexToStringPair;
+
+ ::rtl::OUString m_sModule;
+ MapIndexToStringPair m_aURLs;
+
+ public:
+ OpenDocumentListBox( Window* _pParent, const sal_Char* _pAsciiModuleName, const ResId& _rResId );
+
+ String GetSelectedDocumentURL() const;
+ String GetSelectedDocumentFilter() const;
+
+ protected:
+ virtual void RequestHelp( const HelpEvent& _rHEvt );
+
+ StringPair impl_getDocumentAtIndex( USHORT _nListIndex, bool _bSystemNotation = false ) const;
+
+ private:
+ void impl_init( const sal_Char* _pAsciiModuleName );
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/paramdialog.hxx b/dbaccess/source/ui/inc/paramdialog.hxx
new file mode 100644
index 000000000000..fb9b9df2d5e6
--- /dev/null
+++ b/dbaccess/source/ui/inc/paramdialog.hxx
@@ -0,0 +1,126 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_PARAMDIALOG_HXX_
+#define _DBAUI_PARAMDIALOG_HXX_
+
+#include "commontypes.hxx"
+
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/group.hxx>
+#include <vcl/lstbox.hxx>
+
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <connectivity/predicateinput.hxx>
+#include "svx/ParseContext.hxx"
+
+namespace connectivity
+{
+ class OSQLParseNode;
+}
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+ //==================================================================
+ //= OParameterDialog
+ //==================================================================
+ class OParameterDialog
+ :public ModalDialog
+ ,public ::svxform::OParseContextClient
+ {
+ protected:
+ // the controls
+ FixedLine m_aNamesFrame;
+ ListBox m_aAllParams;
+ FixedText m_aValueFrame;
+ Edit m_aParam;
+ PushButton m_aTravelNext;
+ OKButton m_aOKBtn;
+ CancelButton m_aCancelBtn;
+
+ sal_uInt16 m_nCurrentlySelected;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >
+ m_xParams;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >
+ m_xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >
+ m_xFormatter;
+ ::dbtools::OPredicateInputController
+ m_aPredicateInput;
+
+ ByteVector m_aVisitedParams;
+ Timer m_aResetVisitFlag;
+ // we reset the "visited flag" 1 second after and entry has been selected
+
+ sal_Bool m_bNeedErrorOnCurrent;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ m_aFinalValues; /// the final values as entered by the user
+
+ public:
+ OParameterDialog(Window* _pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & _rParamContainer,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > & _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ ~OParameterDialog();
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ getValues() const { return m_aFinalValues; }
+
+
+ protected:
+ void Construct();
+
+ ::connectivity::OSQLParseNode* implPredicateTree(::rtl::OUString& _rErrorMessage, const UniString& _rStatement, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _rxField);
+
+ private:
+ DECL_LINK(OnVisitedTimeout, Timer*);
+ DECL_LINK(OnValueModified, Control*);
+ DECL_LINK(OnEntrySelected, ListBox*);
+ DECL_LINK(OnButtonClicked, PushButton*);
+ DECL_LINK(OnValueLoseFocus, Control*);
+ };
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_PARAMDIALOG_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/propertysetitem.hxx b/dbaccess/source/ui/inc/propertysetitem.hxx
new file mode 100644
index 000000000000..463d1449ae96
--- /dev/null
+++ b/dbaccess/source/ui/inc/propertysetitem.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_PROPERTYSETITEM_HXX_
+#define _DBAUI_PROPERTYSETITEM_HXX_
+
+#include <svl/poolitem.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+ //=========================================================================
+ //= OPropertySetItem
+ //=========================================================================
+ /** <type>SfxPoolItem</type> which transports a XPropertySet
+ */
+ class OPropertySetItem : public SfxPoolItem
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSet;
+
+ public:
+ TYPEINFO();
+ OPropertySetItem(sal_Int16 nWhich);
+ OPropertySetItem(sal_Int16 nWhich,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxSet);
+ OPropertySetItem(const OPropertySetItem& _rSource);
+
+ virtual int operator==(const SfxPoolItem& _rItem) const;
+ virtual SfxPoolItem* Clone(SfxItemPool* _pPool = NULL) const;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ getPropertySet() const { return m_xSet; }
+ };
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_PROPERTYSETITEM_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/propertystorage.hxx b/dbaccess/source/ui/inc/propertystorage.hxx
new file mode 100644
index 000000000000..ec2d6122b180
--- /dev/null
+++ b/dbaccess/source/ui/inc/propertystorage.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef PROPERTYSTORAGE_HXX
+#define PROPERTYSTORAGE_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/uno/Any.hxx>
+/** === end UNO includes === **/
+
+#include <tools/solar.h>
+
+#include <boost/shared_ptr.hpp>
+#include <map>
+
+class SfxItemSet;
+
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ //====================================================================
+ //= PropertyStorage
+ //====================================================================
+ class SAL_NO_VTABLE PropertyStorage
+ {
+ public:
+ virtual void getPropertyValue( ::com::sun::star::uno::Any& _out_rValue ) const = 0;
+ virtual void setPropertyValue( const ::com::sun::star::uno::Any& _rValue ) = 0;
+
+ virtual ~PropertyStorage();
+ };
+
+ typedef ::boost::shared_ptr< PropertyStorage > PPropertyStorage;
+ typedef ::std::map< sal_Int32, PPropertyStorage > PropertyValues;
+
+ //====================================================================
+ //= SetItemPropertyStorage
+ //====================================================================
+ typedef USHORT ItemId;
+
+ /** a PropertyStorage implementation which stores the value in an item set
+ */
+ class SetItemPropertyStorage : public PropertyStorage
+ {
+ public:
+ SetItemPropertyStorage( SfxItemSet& _rItemSet, const ItemId _nItemID )
+ :m_rItemSet( _rItemSet )
+ ,m_nItemID( _nItemID )
+ {
+ }
+
+ virtual ~SetItemPropertyStorage()
+ {
+ }
+
+ virtual void getPropertyValue( ::com::sun::star::uno::Any& _out_rValue ) const;
+ virtual void setPropertyValue( const ::com::sun::star::uno::Any& _rValue );
+
+ private:
+ SfxItemSet& m_rItemSet;
+ const ItemId m_nItemID;
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // PROPERTYSTORAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx
new file mode 100644
index 000000000000..f439b40306bc
--- /dev/null
+++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx
@@ -0,0 +1,126 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
+#define DBAUI_QUERYCONTAINERWINDOW_HXX
+
+#include <vcl/window.hxx>
+#include <vcl/split.hxx>
+#include "dataview.hxx"
+#include <com/sun/star/frame/XFrame.hpp>
+#include "QueryViewSwitch.hxx"
+#include <vcl/dockwin.hxx>
+
+class FixedLine;
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+ //=====================================================================
+ //= OBeamer
+ //=====================================================================
+ // tempoaray class until the beamer is implemented
+ class OBeamer : public DockingWindow
+ {
+ public:
+ OBeamer(Window* _pParent) : DockingWindow(_pParent,0){}
+ };
+
+ //=====================================================================
+ //= OQueryContainerWindow
+ //=====================================================================
+ class OQueryContainerWindow : public ODataView
+ {
+ OQueryViewSwitch* m_pViewSwitch;
+ OBeamer* m_pBeamer;
+ Splitter* m_pSplitter;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xBeamer;
+
+ DECL_LINK( SplitHdl, void* );
+ public:
+ OQueryContainerWindow(Window* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+ ~OQueryContainerWindow();
+
+ virtual void Construct();
+
+ virtual long PreNotify( NotifyEvent& rNEvt );
+
+ // show the beamer
+ void showPreview(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame);
+ // called when the beamer has been disposed
+ void disposingPreview();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ getPreviewFrame() const { return m_xBeamer; }
+
+ OQueryDesignView* getDesignView() { return m_pViewSwitch->getDesignView(); }
+
+ sal_Bool isCutAllowed() { return m_pViewSwitch->isCutAllowed(); }
+ sal_Bool isPasteAllowed() { return m_pViewSwitch->isPasteAllowed(); }
+ sal_Bool isCopyAllowed() { return m_pViewSwitch->isCopyAllowed(); }
+ void copy() { m_pViewSwitch->copy(); }
+ void cut() { m_pViewSwitch->cut(); }
+ void paste() { m_pViewSwitch->paste(); }
+
+ void clear() { m_pViewSwitch->clear(); }
+ sal_Bool isSlotEnabled( sal_Int32 _nSlotId ) { return m_pViewSwitch->isSlotEnabled( _nSlotId ); }
+ void setSlotEnabled( sal_Int32 _nSlotId, sal_Bool _bEnable ) { m_pViewSwitch->setSlotEnabled( _nSlotId, _bEnable ); }
+ void setNoneVisbleRow(sal_Int32 _nRows) { m_pViewSwitch->setNoneVisbleRow( _nRows); }
+
+ void setReadOnly( sal_Bool _bReadOnly ) { m_pViewSwitch->setReadOnly( _bReadOnly ); }
+
+ sal_Bool checkStatement() { return m_pViewSwitch->checkStatement( ); }
+ ::rtl::OUString getStatement() { return m_pViewSwitch->getStatement( ); }
+ void setStatement( const ::rtl::OUString& _rsStatement ) { m_pViewSwitch->setStatement( _rsStatement ); }
+
+ void initialize() { m_pViewSwitch->initialize(); }
+ void SaveUIConfig() { m_pViewSwitch->SaveUIConfig(); }
+ bool reset( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { return m_pViewSwitch->reset( _pErrorInfo ); }
+
+ bool switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo );
+ void forceInitialView();
+
+ virtual void GetFocus();
+
+ protected:
+ // re-arrange the controls belonging to the document itself
+ virtual void resizeAll( const Rectangle& _rPlayground );
+
+ // arrange dericed classes controls in the rectangle given
+ virtual void resizeDocumentView(Rectangle& _rPlayground);
+ };
+ // end of temp classes
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // DBAUI_QUERYCONTAINERWINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx
new file mode 100644
index 000000000000..522dd44cfdbd
--- /dev/null
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -0,0 +1,261 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_QUERYCONTROLLER_HXX
+#define DBAUI_QUERYCONTROLLER_HXX
+
+#include "JoinController.hxx"
+#include "JoinTableView.hxx"
+#include "querycontainerwindow.hxx"
+#include "queryview.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>
+#include <comphelper/propertycontainer.hxx>
+#include <comphelper/uno3.hxx>
+#include <comphelper/uno3.hxx>
+#include <connectivity/sqliterator.hxx>
+#include <connectivity/sqlnode.hxx>
+#include <connectivity/sqlparse.hxx>
+#include <svl/undo.hxx>
+
+namespace comphelper
+{
+ class NamedValueCollection;
+}
+
+class VCLXWindow;
+namespace dbaui
+{
+ class OQueryView;
+ class OQueryContainerWindow;
+ class OTableConnectionData;
+ class OTableWindowData;
+ class OAddTableDlg;
+ class OTableFieldDesc;
+ class OQueryTableWindow;
+
+ class OQueryController;
+ typedef ::comphelper::OPropertyContainer OQueryController_PBase;
+ typedef ::comphelper::OPropertyArrayUsageHelper< OQueryController > OQueryController_PABase;
+ class OQueryController :public OJoinController
+ ,public OQueryController_PBase
+ ,public OQueryController_PABase
+ {
+ OTableFields m_vTableFieldDesc;
+ OTableFields m_vUnUsedFieldsDesc; // contains fields which aren't visible and don't have any criteria
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aFieldInformation;
+
+ ::svxform::OSystemParseContext* m_pParseContext;
+ ::connectivity::OSQLParser m_aSqlParser;
+ ::connectivity::OSQLParseTreeIterator* m_pSqlIterator;
+
+ ::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 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
+ mutable ::rtl::OUString
+ m_sName; // name of the query
+
+ 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
+
+
+ /** 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; }
+
+ 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();
+ bool doSaveAsDoc(sal_Bool _bSaveAs);
+
+ void saveViewSettings( ::comphelper::NamedValueCollection& o_rViewSettings, const bool i_includingCriteria ) const;
+ void loadViewSettings( const ::comphelper::NamedValueCollection& o_rViewSettings );
+ ::rtl::OUString translateStatement( bool _bFireStatementChange = true );
+
+ ::rtl::OUString getDefaultName() const;
+
+ protected:
+ // all the features which should be handled by this class
+ virtual void describeSupportedFeatures();
+ // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
+ virtual FeatureState GetState(sal_uInt16 nId) const;
+ // execute a feature
+ virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
+
+ virtual void reconnect( sal_Bool _bUI );
+ virtual ::rtl::OUString getPrivateTitle( ) const;
+
+ OQueryContainerWindow* getContainer() const { return static_cast< OQueryContainerWindow* >( getView() ); }
+
+ public:
+ OQueryController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
+
+ virtual ~OQueryController();
+ OTableFields& getTableFieldDesc() { return m_vTableFieldDesc; }
+ OTableFields& getUnUsedFields() { return m_vUnUsedFieldsDesc; }
+
+ void clearFields();
+
+ virtual void impl_onModifyChanged();
+
+ // should the statement be parsed by our own sql parser
+ 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; }
+ sal_Int32 getSplitPos() const { return m_nSplitPos;}
+ sal_Int32 getVisibleRows() const { return m_nVisibleRows; }
+
+ void setDistinct(sal_Bool _bDistinct) { m_bDistinct = _bDistinct;}
+ void setSplitPos(sal_Int32 _nSplitPos) { m_nSplitPos = _nSplitPos;}
+ void setVisibleRows(sal_Int32 _nVisibleRows) { m_nVisibleRows = _nVisibleRows;}
+
+ sal_Int32 getColWidth(sal_uInt16 _nColPos) const;
+
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >&
+ getFieldInformation() const { return m_aFieldInformation; }
+
+ ::connectivity::OSQLParser& getParser() { return m_aSqlParser; }
+ ::connectivity::OSQLParseTreeIterator& getParseIterator() { return *m_pSqlIterator; }
+
+ virtual sal_Bool Construct(Window* pParent);
+
+ DECLARE_XINTERFACE( )
+ DECLARE_XTYPEPROVIDER( )
+ // XPropertySet
+ virtual com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(com::sun::star::uno::RuntimeException);
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL disposing();
+
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ // need by registration
+ static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+
+ // XController
+ virtual ::com::sun::star::uno::Any SAL_CALL getViewData(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL restoreViewData(const ::com::sun::star::uno::Any& Data) throw( ::com::sun::star::uno::RuntimeException );
+
+ private:
+ virtual void onLoadedMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager);
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
+
+ // OPropertySetHelper
+ virtual sal_Bool SAL_CALL convertFastPropertyValue(
+ ::com::sun::star::uno::Any& rConvertedValue,
+ ::com::sun::star::uno::Any& rOldValue,
+ sal_Int32 nHandle,
+ const ::com::sun::star::uno::Any& rValue
+ ) throw (::com::sun::star::lang::IllegalArgumentException);
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
+ sal_Int32 nHandle,
+ const ::com::sun::star::uno::Any& rValue
+ ) throw (::com::sun::star::uno::Exception );
+ virtual void SAL_CALL getFastPropertyValue(
+ ::com::sun::star::uno::Any& rValue,
+ sal_Int32 nHandle
+ ) const;
+
+ virtual OJoinDesignView* getJoinView();
+ // ask the user if the design should be saved when it is modified
+ virtual short saveModified();
+ virtual void reset();
+ virtual void impl_initialize();
+
+ void impl_reset( const bool i_bIgnoreQuerySettings = false );
+ /// tells the user that we needed to switch to SQL view automatically
+ void impl_showAutoSQLViewError( const ::com::sun::star::uno::Any& _rErrorDetails );
+
+ /** switches to the graphical or SQL view mode, as determined by m_bGraphicalDesign
+ */
+ bool impl_setViewMode( ::dbtools::SQLExceptionInfo* _pErrorInfo );
+
+ /// 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;
+ virtual bool allowQueries() const;
+
+ private:
+ DECL_LINK( OnExecuteAddTable, void* );
+
+ private:
+ using OQueryController_PBase::getFastPropertyValue;
+ };
+}
+#endif // DBAUI_QUERYCONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx
new file mode 100644
index 000000000000..0a72392ae920
--- /dev/null
+++ b/dbaccess/source/ui/inc/queryfilter.hxx
@@ -0,0 +1,149 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_QUERYFILTER_HXX
+#define DBAUI_QUERYFILTER_HXX
+
+#include <vcl/dialog.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/edit.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/button.hxx>
+#include <connectivity/sqliterator.hxx>
+
+#include <connectivity/predicateinput.hxx>
+#include "svx/ParseContext.hxx"
+
+namespace rtl
+{
+ class OUString;
+}
+namespace com
+{
+ namespace sun
+ {
+ namespace star
+ {
+ namespace sdb
+ {
+ class XSingleSelectQueryComposer;
+ }
+ namespace sdbc
+ {
+ class XConnection;
+ class XDatabaseMetaData;
+ }
+ namespace container
+ {
+ class XNameAccess;
+ }
+ namespace beans
+ {
+ struct PropertyValue;
+ }
+ }
+ }
+}
+//==================================================================
+// DlgFilterCrit
+//==================================================================
+namespace dbaui
+{
+ class DlgFilterCrit :public ModalDialog
+ ,public ::svxform::OParseContextClient
+ {
+ private:
+ ListBox aLB_WHEREFIELD1;
+ ListBox aLB_WHERECOMP1;
+ Edit aET_WHEREVALUE1;
+ ListBox aLB_WHERECOND2;
+ ListBox aLB_WHEREFIELD2;
+ ListBox aLB_WHERECOMP2;
+ Edit aET_WHEREVALUE2;
+ ListBox aLB_WHERECOND3;
+ ListBox aLB_WHEREFIELD3;
+ ListBox aLB_WHERECOMP3;
+ Edit aET_WHEREVALUE3;
+ FixedText aFT_WHEREFIELD;
+ FixedText aFT_WHERECOMP;
+ FixedText aFT_WHEREVALUE;
+ FixedText aFT_WHEREOPER;
+ FixedLine aFL_FIELDS;
+ OKButton aBT_OK;
+ CancelButton aBT_CANCEL;
+ HelpButton aBT_HELP;
+ String aSTR_NOENTRY;
+ String aSTR_COMPARE_OPERATORS;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer> m_xQueryComposer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xColumns;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> m_xMetaData;
+
+ ::dbtools::OPredicateInputController m_aPredicateInput;
+
+ void SelectField( ListBox& rBox, const String& rField );
+ DECL_LINK( ListSelectHdl, ListBox * );
+ DECL_LINK( ListSelectCompHdl, ListBox * );
+
+ void SetLine( USHORT nIdx,const ::com::sun::star::beans::PropertyValue& _rItem,sal_Bool _bOr );
+ void EnableLines();
+ sal_Int32 GetOSQLPredicateType( const String& _rSelectedPredicate ) const;
+ USHORT GetSelectionPos(sal_Int32 eType,const ListBox& rListBox) const;
+ sal_Bool getCondition(const ListBox& _rField,const ListBox& _rComp,const Edit& _rValue,::com::sun::star::beans::PropertyValue& _rFilter) const;
+ void fillLines(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& _aValues);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getMatchingColumn( const Edit& _rValueInput ) const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getColumn( const ::rtl::OUString& _rFieldName ) const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getQueryColumn( const ::rtl::OUString& _rFieldName ) const;
+
+ public:
+ DlgFilterCrit( Window * pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer>& _rxComposer,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxCols
+ );
+ ~DlgFilterCrit();
+
+ void BuildWherePart();
+
+ protected:
+ DECL_LINK( PredicateLoseFocus, Edit* );
+ };
+
+}
+
+#endif // DBAUI_QUERYFILTER_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/queryorder.hxx b/dbaccess/source/ui/inc/queryorder.hxx
new file mode 100644
index 000000000000..7c2bab9caa40
--- /dev/null
+++ b/dbaccess/source/ui/inc/queryorder.hxx
@@ -0,0 +1,130 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_QUERYORDER_HXX
+#define DBAUI_QUERYORDER_HXX
+
+#include <vcl/dialog.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/edit.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/button.hxx>
+
+#define DOG_ROWS 3
+
+namespace rtl
+{
+ class OUString;
+}
+namespace com
+{
+ namespace sun
+ {
+ namespace star
+ {
+ namespace sdb
+ {
+ class XSingleSelectQueryComposer;
+ }
+ namespace sdbc
+ {
+ class XConnection;
+ }
+ namespace container
+ {
+ class XNameAccess;
+ }
+ namespace beans
+ {
+ struct PropertyValue;
+ class XPropertySet;
+ }
+ }
+ }
+}
+
+//==================================================================
+// DlgOrderCrit
+//==================================================================
+namespace dbaui
+{
+ class DlgOrderCrit : public ModalDialog
+ {
+ protected:
+ ListBox aLB_ORDERFIELD1;
+ ListBox aLB_ORDERVALUE1;
+ ListBox aLB_ORDERFIELD2;
+ ListBox aLB_ORDERVALUE2;
+ ListBox aLB_ORDERFIELD3;
+ ListBox aLB_ORDERVALUE3;
+ FixedText aFT_ORDERFIELD;
+ FixedText aFT_ORDERAFTER1;
+ FixedText aFT_ORDERAFTER2;
+ FixedText aFT_ORDEROPER;
+ FixedText aFT_ORDERDIR;
+ OKButton aBT_OK;
+ CancelButton aBT_CANCEL;
+ HelpButton aBT_HELP;
+ FixedLine aFL_ORDER;
+ String aSTR_NOENTRY;
+ ::rtl::OUString m_sOrgOrder;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer> m_xQueryComposer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xColumns;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
+
+
+ ListBox* m_aColumnList[DOG_ROWS];
+ ListBox* m_aValueList[DOG_ROWS];
+
+ DECL_LINK( FieldListSelectHdl, ListBox * );
+ void EnableLines();
+
+ public:
+ DlgOrderCrit( Window * pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer>& _rxComposer,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxCols);
+
+ ~DlgOrderCrit();
+ void BuildOrderPart();
+
+ ::rtl::OUString GetOrderList( ) const;
+ ::rtl::OUString GetOrignalOrder() const { return m_sOrgOrder; }
+
+ private:
+ void impl_initializeOrderList_nothrow();
+ };
+}
+#endif // DBAUI_QUERYORDER_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/queryview.hxx b/dbaccess/source/ui/inc/queryview.hxx
new file mode 100644
index 000000000000..d7e5f728f036
--- /dev/null
+++ b/dbaccess/source/ui/inc/queryview.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_QUERYVIEW_HXX
+#define DBAUI_QUERYVIEW_HXX
+
+#include "JoinDesignView.hxx"
+
+namespace dbaui
+{
+ class OQueryController;
+ class OQueryView : public OJoinDesignView
+ {
+ public:
+ OQueryView(Window* pParent, OQueryController& _rController,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
+ virtual ~OQueryView();
+
+ virtual sal_Bool isCutAllowed() = 0;
+ virtual sal_Bool isPasteAllowed() = 0;
+ virtual sal_Bool isCopyAllowed() = 0;
+ virtual void copy() = 0;
+ virtual void cut() = 0;
+ virtual void paste() = 0;
+ // clears the whole query
+ virtual void clear() = 0;
+ // set the view readonly or not
+ virtual void setReadOnly(sal_Bool _bReadOnly) = 0;
+ // set the statement for representation
+ virtual void setStatement(const ::rtl::OUString& _rsStatement) = 0;
+ // returns the current sql statement
+ virtual ::rtl::OUString getStatement() = 0;
+ };
+}
+#endif // DBAUI_QUERYVIEW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/sbagrid.hrc b/dbaccess/source/ui/inc/sbagrid.hrc
new file mode 100644
index 000000000000..52b1d1a65029
--- /dev/null
+++ b/dbaccess/source/ui/inc/sbagrid.hrc
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DBACCESS_SBA_GRID_HRC
+#define DBACCESS_SBA_GRID_HRC
+
+//----------------Menueitems-------------------------------------------------
+// Tabelle
+#define SBA_WHICHID_START 100
+// Zeilenhoehe
+#define SBA_DEF_ROWHEIGHT (SBA_WHICHID_START+131) // SbaColRowSizeItem
+
+#define SBA_DEF_RANGEFONT (SBA_WHICHID_START+132) // RangeItem
+#define SBA_DEF_FONT (SBA_WHICHID_START+133) // SvxFontItem
+#define SBA_DEF_FONTHEIGHT (SBA_WHICHID_START+134) // SvxFontHeightItem
+#define SBA_DEF_FONTCOLOR (SBA_WHICHID_START+135) // SvxColorItem
+#define SBA_DEF_FONTWEIGHT (SBA_WHICHID_START+136) // SvxWeightItem
+#define SBA_DEF_POSTURE (SBA_WHICHID_START+137) // SvxPostureItem
+#define SBA_DEF_SHADOWED (SBA_WHICHID_START+138) // SvxShadowedItem
+#define SBA_DEF_CONTOUR (SBA_WHICHID_START+139) // SvxContourItem
+#define SBA_DEF_CROSSEDOUT (SBA_WHICHID_START+140) // SvxCrossedOutItem
+#define SBA_DEF_UNDERLINE (SBA_WHICHID_START+141) // SvxUnderlineItem
+#define SBA_DEF_LANGUAGE (SBA_WHICHID_START+142) // SvxLanguageItem
+
+// Spalten
+// Formatierung
+#define SBA_DEF_RANGEFORMAT (SBA_WHICHID_START+143) // RangeItem
+#define SBA_DEF_FMTVALUE (SBA_WHICHID_START+144) // SfxULONG, Format
+
+// Ausrichtung
+#define SBA_ATTR_ALIGN_HOR_JUSTIFY (SBA_WHICHID_START + 145) // SvxHorJustifyItem
+
+// Spaltenbreite
+#define SBA_DEF_FLTCOLWIDTH (SBA_WHICHID_START + 146) // SbaColRowSizeItem
+// Feldtyp
+#define SBA_DEF_FLTTYPE (SBA_WHICHID_START + 147) // DataFieldTypeItem
+// Feldlänge
+#define SBA_DEF_FLTLENGTH (SBA_WHICHID_START + 148) // SfxUInt32Item
+// Eingabe erforderlich
+#define SBA_DEF_FLTREQUIRED (SBA_WHICHID_START + 149) // SfxBoolItem
+// Position in der Tabelle, Abfrage
+#define SBA_DEF_FLTPOS (SBA_WHICHID_START + 150) // SfxUInt16Item
+// Name der zugehoerigen Tabelle
+#define SBA_DEF_FLTTABLE (SBA_WHICHID_START + 151) // SfxStringItem
+// Spalte ausblenden
+#define SBA_DEF_FLTHIDE (SBA_WHICHID_START + 152) // SfxBoolItem
+
+// Ausrichtung
+#define SBA_ATTR_ALIGN_HOR_JUSTIFY (SBA_WHICHID_START + 145) // SvxHorJustifyItem
+
+// Spaltenbreite
+#define SBA_DEF_FLTCOLWIDTH (SBA_WHICHID_START + 146) // SbaColRowSizeItem
+// Feldtyp
+#define SBA_DEF_FLTTYPE (SBA_WHICHID_START + 147) // DataFieldTypeItem
+// Feldlänge
+#define SBA_DEF_FLTLENGTH (SBA_WHICHID_START + 148) // SfxUInt32Item
+// Eingabe erforderlich
+#define SBA_DEF_FLTREQUIRED (SBA_WHICHID_START + 149) // SfxBoolItem
+// Position in der Tabelle, Abfrage
+#define SBA_DEF_FLTPOS (SBA_WHICHID_START + 150) // SfxUInt16Item
+// Name der zugehoerigen Tabelle
+#define SBA_DEF_FLTTABLE (SBA_WHICHID_START + 151) // SfxStringItem
+// Spalte ausblenden
+#define SBA_DEF_FLTHIDE (SBA_WHICHID_START + 152) // SfxBoolItem
+// Kommentar zum Feld
+#define SBA_DEF_FLTCOMMENT (SBA_WHICHID_START + 153) // SfxStringItem
+// default wert
+#define SBA_DEF_FLTDEFAULT (SBA_WHICHID_START + 154) // SfxStringItem
+// Primärschluessel
+#define SBA_DEF_FLTPRIMARY (SBA_WHICHID_START + 155) // SfxBoolItem
+// table properties
+#define SBA_DEF_TABLEPROP (SBA_WHICHID_START + 156) // SfxString
+#define SBA_DEF_SORT (SBA_WHICHID_START + 157) // SfxString
+#define SBA_DEF_FILTER (SBA_WHICHID_START + 158) // SfxString
+#define SBA_DEF_FILTERAPPLIED (SBA_WHICHID_START + 159) // SfxBool
+#define SBA_DEF_ROWHEIGHT_DEFAULT (SBA_WHICHID_START + 160) // SfxBool
+// the col has a default width ?
+#define SBA_DEF_FLTCOLWIDTH_DEFAULT (SBA_WHICHID_START + 161) // SfxBool
+#define SBA_DEF_WORDLINEMODE (SBA_WHICHID_START + 162) // SfxBool
+
+
+
+#endif // DBACCESS_SBA_GRID_HRC
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
new file mode 100644
index 000000000000..5e8a7c4470c6
--- /dev/null
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -0,0 +1,347 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SBA_GRID_HXX
+#define _SBA_GRID_HXX
+
+// #include <sdb/tools.hxx>
+
+#include <svx/fmgridcl.hxx>
+
+#include <svx/fmgridif.hxx>
+
+#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/util/URL.hpp>
+#include <comphelper/uno3.hxx>
+#include <comphelper/stl_types.hxx>
+#include "sbamultiplex.hxx"
+#include <svx/dataaccessdescriptor.hxx>
+#include <queue>
+
+class SvNumberFormatter;
+
+namespace dbaui
+{
+ //------------------------------------------------------------------
+ struct SbaURLCompare : public ::std::binary_function< ::com::sun::star::util::URL, ::com::sun::star::util::URL, bool>
+ {
+ bool operator() (const ::com::sun::star::util::URL& x, const ::com::sun::star::util::URL& y) const {return x.Complete == y.Complete ? true : false;}
+ };
+
+ struct SbaURLHash
+ {
+ sal_Int32 operator() (const ::com::sun::star::util::URL& x) const {return x.Complete.hashCode();}
+ };
+ //==================================================================
+ // SbaXGridControl
+ //==================================================================
+
+ // class ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > ;
+ FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
+
+ class SbaXStatusMultiplexer;
+ class SbaXGridControl
+ :public FmXGridControl
+ ,public ::com::sun::star::frame::XDispatch
+ {
+ DECLARE_STL_MAP(::com::sun::star::util::URL, SbaXStatusMultiplexer*, SbaURLCompare,StatusMultiplexerArray);
+ StatusMultiplexerArray m_aStatusMultiplexer;
+
+ public:
+ SbaXGridControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+ virtual ~SbaXGridControl();
+
+ // UNO
+ DECLARE_UNO3_DEFAULTS(SbaXGridControl, FmXGridControl);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ ::rtl::OUString SAL_CALL getImplementationName() throw();
+ virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw();
+ // need by registration
+ static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+
+ // ::com::sun::star::frame::XDispatch
+ virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL createPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > & rToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > & rParentPeer) throw( ::com::sun::star::uno::RuntimeException );
+
+ protected:
+ virtual FmXGridPeer* imp_CreatePeer(Window* pParent);
+ };
+
+ //==================================================================
+ // SbaXGridPeer
+ //==================================================================
+
+ class SbaXGridPeer
+ :public FmXGridPeer
+ ,public ::com::sun::star::frame::XDispatch
+ {
+ ::cppu::OMultiTypeInterfaceContainerHelperVar< ::com::sun::star::util::URL,SbaURLHash , SbaURLCompare> m_aStatusListeners;
+
+ public:
+ SbaXGridPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+ virtual ~SbaXGridPeer();
+
+ // UNO
+ virtual void SAL_CALL acquire() throw() { FmXGridPeer::acquire(); }
+ virtual void SAL_CALL release() throw() { FmXGridPeer::release(); }
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+ sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 > & rId ) throw (::com::sun::star::uno::RuntimeException);
+ static SbaXGridPeer* getImplementation(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxIFace);
+
+ // ::com::sun::star::frame::XDispatch
+ virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::frame::XDispatchProvider
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ protected:
+ virtual FmGridControl* imp_CreateControl(Window* pParent, WinBits nStyle);
+#if defined(_MSC_VER) && (_MSC_VER >= 1310 )
+ typedef ::com::sun::star::frame::XStatusListener xstlist_type;
+ typedef ::com::sun::star::uno::Reference< xstlist_type > xlistener_type;
+ void NotifyStatusChanged(const ::com::sun::star::util::URL& aUrl, const xlistener_type & xControl = xlistener_type() );
+#else
+ void NotifyStatusChanged(const ::com::sun::star::util::URL& aUrl, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > ());
+#endif // # _MSC_VER>=1310
+
+ private:
+ // for asny execution of XDispatch::dispatch
+ struct DispatchArgs
+ {
+ ::com::sun::star::util::URL aURL;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
+ };
+ ::std::queue< DispatchArgs > m_aDispatchArgs;
+ DECL_LINK( OnDispatchEvent, void* );
+
+ // for dynamic states of our 4 dispatchable URLs
+ enum DispatchType
+ {
+ dtBrowserAttribs,
+ dtRowHeight,
+ dtColumnAttribs,
+ dtColumnWidth,
+
+ dtUnknown
+ };
+ DispatchType classifyDispatchURL( const ::com::sun::star::util::URL& _rURL );
+
+ DECLARE_STL_STDKEY_MAP( DispatchType, sal_Bool, MapDispatchToBool );
+ MapDispatchToBool m_aDispatchStates;
+ };
+
+ //==================================================================
+ // SbaGridHeader
+ //==================================================================
+
+ class SbaGridHeader
+ :public FmGridHeader
+ ,public DragSourceHelper
+ {
+ public:
+ SbaGridHeader(BrowseBox* pParent, WinBits nWinBits = WB_STDHEADERBAR | WB_DRAG);
+
+ protected:
+
+ // FmGridHeader overridables
+ virtual void PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu);
+ virtual void PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMenu& rMenu, sal_uInt16 nExecutionResult);
+
+ private:
+ // DragSourceHelper overridables
+ virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel );
+
+ // Window overridables
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+
+ sal_Bool ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos);
+
+ private:
+ using FmGridHeader::StartDrag;
+ };
+
+ // =========================================================================
+ // interfaces for communication between the vcl grid control and a controller
+ // -------------------------------------------------------------------------
+ class SbaGridListener
+ {
+ public:
+ virtual void RowChanged() = 0;
+ virtual void ColumnChanged() = 0;
+ virtual void SelectionChanged() = 0;
+ virtual void CellActivated() = 0;
+ virtual void CellDeactivated() = 0;
+ virtual void BeforeDrop() = 0;
+ virtual void AfterDrop() = 0;
+ };
+
+ //==================================================================
+ // SbaGridControl
+ //==================================================================
+ //------------------------------------------------------------------
+ class UnoDataBrowserController;
+ class SbaGridControl : public FmGridControl
+ {
+ friend class SbaGridHeader;
+ friend class SbaXGridPeer;
+
+ // Attributes
+ protected:
+ ::svx::ODataAccessDescriptor m_aDataDescriptor;
+ SbaGridListener* m_pMasterListener;
+
+ sal_Int32 m_nAsyncDropEvent;
+
+ USHORT m_nCurrentActionColId;
+ // ui actions (e.g. a context menu) may be performed on columns which aren't the current one
+ // and aren't selected, so we have to track this column id
+
+ sal_Bool m_bActivatingForDrop;
+ // Attribute Access
+ public:
+ sal_uInt16 GetCurrentActionColumn() const { return m_nCurrentActionColId; }
+
+ public:
+ SbaGridControl(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >,Window* pParent, FmXGridPeer* _pPeer, WinBits nBits = WB_TABSTOP);
+ virtual ~SbaGridControl();
+
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void Select();
+
+ void SetMasterListener(SbaGridListener* pListener) { m_pMasterListener = pListener; }
+
+ virtual void ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus = sal_True);
+ virtual void DeactivateCell(sal_Bool bUpdate = sal_True);
+ void ActivateCell() { FmGridControl::ActivateCell(); }
+
+ sal_Bool IsAllSelected() const { return (GetSelectRowCount() == GetRowCount()) && (GetRowCount() > 0); }
+
+ HeaderBar* GetHeaderBar() const { return FmGridControl::GetHeaderBar(); }
+
+ /** return the description of the specified object.
+ @param eObjType
+ The type to ask for
+ @param _nPosition
+ The position of a tablecell (index position), header bar colum/row cell
+ @return
+ The description of the specified object.
+ */
+ virtual ::rtl::OUString GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition = -1) const;
+
+ virtual void DeleteSelectedRows();
+ /** copies the currently selected rows to the clipboard
+ @precond
+ at least one row is selected
+ */
+ void CopySelectedRowsToClipboard();
+
+
+ protected:
+ // DragSourceHelper overridables
+ virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel );
+
+ // BrowseBox overridables
+ virtual void CursorMoved();
+ virtual sal_Int8 AcceptDrop( const BrowserAcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const BrowserExecuteDropEvent& rEvt );
+ virtual void MouseButtonDown( const BrowserMouseEvent& rMEvt);
+
+ // EditBrowseBox overridables
+ virtual BrowserHeader* imp_CreateHeaderBar(BrowseBox* pParent);
+ virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol);
+
+ // DbGridControl overridables
+ virtual void PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu);
+ virtual void PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult);
+
+ // DbGridControl overridables
+ virtual void onRowChange();
+ virtual void onColumnChange();
+
+ // my own overridables
+ virtual void BeforeDrop();
+ virtual void AfterDrop();
+
+ // get a fields property set from a model pos
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getField(sal_uInt16 nModelPos);
+
+ // get my data source
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getDataSource() const;
+
+ // drag events
+ virtual void DoColumnDrag(sal_uInt16 nColumnPos);
+ virtual void DoRowDrag(sal_Int16 nRowPos);
+ virtual void DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos);
+
+ void SetBrowserAttrs();
+ void SetColWidth(sal_uInt16 nColId);
+ void SetRowHeight();
+ void SetColAttrs(sal_uInt16 nColId);
+
+ SvNumberFormatter* GetDatasourceFormatter();
+
+ DECL_LINK(AsynchDropEvent, void*);
+
+ private:
+ sal_Bool IsReadOnlyDB() const;
+ void implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag );
+
+ private:
+ using FmGridControl::AcceptDrop;
+ using FmGridControl::ExecuteDrop;
+ using FmGridControl::MouseButtonDown;
+ };
+}
+#endif // _SBA_GRID_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx
new file mode 100644
index 000000000000..23d5035f0594
--- /dev/null
+++ b/dbaccess/source/ui/inc/sbamultiplex.hxx
@@ -0,0 +1,438 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SBA_MULTIPLEX_HXX
+#define _SBA_MULTIPLEX_HXX
+
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#include <com/sun/star/form/XUpdateListener.hpp>
+#include <com/sun/star/form/XErrorListener.hpp>
+#include <com/sun/star/form/XRestoreListener.hpp>
+#include <com/sun/star/form/XInsertListener.hpp>
+#include <com/sun/star/form/XDeleteListener.hpp>
+#include <com/sun/star/form/XPositioningListener.hpp>
+#include <com/sun/star/form/XDatabaseParameterListener.hpp>
+#include <com/sun/star/form/XLoadListener.hpp>
+#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/form/XSubmitListener.hpp>
+#include <com/sun/star/form/XResetListener.hpp>
+#include <com/sun/star/util/XRefreshListener.hpp>
+#include <com/sun/star/sdb/XSQLErrorListener.hpp>
+#include <com/sun/star/sdb/XRowSetApproveListener.hpp>
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
+#include <comphelper/stl_types.hxx>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/queryinterface.hxx>
+#include <cppuhelper/weak.hxx>
+
+namespace dbaui
+{
+ //------------------------------------------------------------------
+ // TODO : replace this class if MM provides an WeakSubObject in cppu
+ class OSbaWeakSubObject : public ::cppu::OWeakObject
+ {
+ protected:
+ ::cppu::OWeakObject& m_rParent;
+
+ public:
+ OSbaWeakSubObject(::cppu::OWeakObject& rParent) : m_rParent(rParent) { }
+
+ virtual void SAL_CALL acquire() throw() { m_rParent.acquire(); }
+ virtual void SAL_CALL release() throw() { m_rParent.release(); }
+ };
+
+ //------------------------------------------------------------------
+ // declaration of a listener multiplexer class
+ #define BEGIN_DECLARE_LISTENER_MULTIPLEXER(classname, listenerclass) \
+ class classname \
+ :public OSbaWeakSubObject \
+ ,public listenerclass \
+ ,public ::cppu::OInterfaceContainerHelper \
+ { \
+ public: \
+ classname( ::cppu::OWeakObject& rSource, \
+ ::osl::Mutex& rMutex); \
+ DECLARE_UNO3_DEFAULTS(classname, OSbaWeakSubObject); \
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( \
+ const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); \
+ \
+ /* ::com::sun::star::lang::XEventListener */ \
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); \
+
+
+ #define DECLARE_MULTIPLEXER_VOID_METHOD(methodname, eventtype) \
+ virtual void SAL_CALL methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException); \
+
+ #define DECLARE_MULTIPLEXER_BOOL_METHOD(methodname, eventtype) \
+ virtual sal_Bool SAL_CALL methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException); \
+
+
+ #define END_DECLARE_LISTENER_MULTIPLEXER() \
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators */ \
+ void * SAL_CALL operator new( size_t size ) throw() { return OSbaWeakSubObject::operator new(size); } \
+ void SAL_CALL operator delete( void * p ) throw() { OSbaWeakSubObject::operator delete(p); } \
+ }; \
+
+ //------------------------------------------------------------------
+ // implementation of a listener multiplexer class
+
+ #define IMPLEMENT_LISTENER_MULTIPLEXER_CORE(classname, listenerclass) \
+ \
+ /*................................................................*/ \
+ classname::classname(::cppu::OWeakObject& rSource, ::osl::Mutex& _rMutex) \
+ :OSbaWeakSubObject(rSource) \
+ ,OInterfaceContainerHelper(_rMutex) \
+ { \
+ } \
+ \
+ ::com::sun::star::uno::Any SAL_CALL classname::queryInterface( \
+ const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException) \
+ { \
+ ::com::sun::star::uno::Any aReturn = \
+ OSbaWeakSubObject::queryInterface(_rType); \
+ if (!aReturn.hasValue()) \
+ aReturn = ::cppu::queryInterface(_rType, \
+ static_cast< listenerclass* >(this), \
+ static_cast< ::com::sun::star::lang::XEventListener* >(static_cast< listenerclass* >(this)) \
+ ); \
+ \
+ return aReturn; \
+ } \
+ /*................................................................*/ \
+ void SAL_CALL classname::disposing(const ::com::sun::star::lang::EventObject& ) throw(::com::sun::star::uno::RuntimeException)\
+ { \
+ } \
+
+
+ #define IMPLEMENT_LISTENER_MULTIPLEXER_VOID_METHOD(classname, listenerclass, methodname, eventtype) \
+ void SAL_CALL classname::methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException) \
+ { \
+ eventtype aMulti(e); \
+ aMulti.Source = &m_rParent; \
+ ::cppu::OInterfaceIteratorHelper aIt(*this); \
+ while (aIt.hasMoreElements()) \
+ static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \
+ } \
+
+ #define IMPLEMENT_LISTENER_MULTIPLEXER_BOOL_METHOD(classname, listenerclass, methodname, eventtype) \
+ /*................................................................*/ \
+ sal_Bool SAL_CALL classname::methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException) \
+ { \
+ eventtype aMulti(e); \
+ aMulti.Source = &m_rParent; \
+ ::cppu::OInterfaceIteratorHelper aIt(*this); \
+ sal_Bool bResult = sal_True; \
+ while (bResult && aIt.hasMoreElements()) \
+ bResult = static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \
+ return bResult; \
+ } \
+
+ //------------------------------------------------------------------
+ // helper for classes which do event multiplexing
+ #define IMPLEMENT_LISTENER_ADMINISTRATION(classname, listenernamespace, listenerdesc, multiplexer, braodcasterclass, broadcaster) \
+ /*................................................................*/ \
+ void SAL_CALL classname::add##listenerdesc(const ::com::sun::star::uno::Reference< ::com::sun::star::listenernamespace::X##listenerdesc >& l) throw(::com::sun::star::uno::RuntimeException)\
+ { \
+ multiplexer.addInterface(l); \
+ if (multiplexer.getLength() == 1) \
+ { \
+ ::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY); \
+ if (xBroadcaster.is()) \
+ xBroadcaster->add##listenerdesc(&multiplexer); \
+ } \
+ } \
+ /*................................................................*/ \
+ void SAL_CALL classname::remove##listenerdesc(const ::com::sun::star::uno::Reference< ::com::sun::star::listenernamespace::X##listenerdesc >& l) throw(::com::sun::star::uno::RuntimeException)\
+ { \
+ if (multiplexer.getLength() == 1) \
+ { \
+ ::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY); \
+ if (xBroadcaster.is()) \
+ xBroadcaster->remove##listenerdesc(&multiplexer); \
+ } \
+ multiplexer.removeInterface(l); \
+ } \
+
+
+ #define STOP_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, braodcasterclass, broadcaster) \
+ if (multiplexer.getLength()) \
+ { \
+ ::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY); \
+ if (xBroadcaster.is()) \
+ xBroadcaster->remove##listenerdesc(&multiplexer); \
+ } \
+
+ #define START_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, braodcasterclass, broadcaster) \
+ if (multiplexer.getLength()) \
+ { \
+ ::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY); \
+ if (xBroadcaster.is()) \
+ xBroadcaster->add##listenerdesc(&multiplexer); \
+ } \
+
+
+
+ //------------------------------------------------------------------
+ // declaration of property listener multiplexers
+ // (with support for specialized and unspecialized property listeners)
+
+ #define DECLARE_PROPERTY_MULTIPLEXER(classname, listenerclass, methodname, eventtype, exceptions) \
+ class classname \
+ :public OSbaWeakSubObject \
+ ,public listenerclass \
+ { \
+ typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< \
+ ::rtl::OUString, ::comphelper::UStringHash, ::comphelper::UStringEqual > ListenerContainerMap; \
+ ListenerContainerMap m_aListeners; \
+ \
+ public: \
+ classname( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex ); \
+ DECLARE_UNO3_DEFAULTS(classname, OSbaWeakSubObject); \
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( \
+ const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); \
+ \
+ /* ::com::sun::star::lang::XEventListener */ \
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); \
+ \
+ virtual void SAL_CALL methodname(const eventtype& e) throw exceptions; \
+ \
+ public: \
+ void addInterface(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rListener); \
+ void removeInterface(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rListener); \
+ \
+ void disposeAndClear(); \
+ \
+ sal_Int32 getOverallLen() const; \
+ \
+ ::cppu::OInterfaceContainerHelper* getContainer(const ::rtl::OUString& rName) \
+ { return m_aListeners.getContainer(rName); } \
+ \
+ protected: \
+ void Notify(::cppu::OInterfaceContainerHelper& rListeners, const eventtype& e); \
+ }; \
+
+
+ //------------------------------------------------------------------
+ // implementation of property listener multiplexers
+ #define IMPLEMENT_PROPERTY_MULTIPLEXER(classname, listenerclass, methodname, eventtype, exceptions) \
+ /*................................................................*/ \
+ classname::classname(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex) \
+ :OSbaWeakSubObject(rSource) \
+ ,m_aListeners(rMutex) \
+ { \
+ } \
+ \
+ ::com::sun::star::uno::Any SAL_CALL classname::queryInterface( \
+ const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException) \
+ { \
+ ::com::sun::star::uno::Any aReturn = \
+ OSbaWeakSubObject::queryInterface(_rType); \
+ if (!aReturn.hasValue()) \
+ aReturn = ::cppu::queryInterface(_rType, \
+ static_cast< listenerclass* >(this), \
+ static_cast< ::com::sun::star::lang::XEventListener* >(static_cast< listenerclass* >(this)) \
+ ); \
+ \
+ return aReturn; \
+ } \
+ /*................................................................*/ \
+ void SAL_CALL classname::disposing(const ::com::sun::star::lang::EventObject& ) throw(::com::sun::star::uno::RuntimeException)\
+ { \
+ } \
+ \
+ void SAL_CALL classname::methodname(const eventtype& e) throw exceptions \
+ { \
+ ::cppu::OInterfaceContainerHelper* pListeners = m_aListeners.getContainer(e.PropertyName); \
+ if (pListeners) \
+ Notify(*pListeners, e); \
+ \
+ /* do the notification for the unspecialized listeners, too */ \
+ pListeners = m_aListeners.getContainer(::rtl::OUString()); \
+ if (pListeners) \
+ Notify(*pListeners, e); \
+ } \
+ \
+ void classname::addInterface(const ::rtl::OUString& rName, \
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener) \
+ { \
+ m_aListeners.addInterface(rName, rListener); \
+ } \
+ \
+ void classname::removeInterface(const ::rtl::OUString& rName, \
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener) \
+ { \
+ m_aListeners.removeInterface(rName, rListener); \
+ } \
+ \
+ void classname::disposeAndClear() \
+ { \
+ ::com::sun::star::lang::EventObject aEvt(m_rParent); \
+ m_aListeners.disposeAndClear(aEvt); \
+ } \
+ \
+ sal_Int32 classname::getOverallLen() const \
+ { \
+ sal_Int32 nLen = 0; \
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aContained = m_aListeners.getContainedTypes(); \
+ const ::rtl::OUString* pContained = aContained.getConstArray(); \
+ for ( sal_Int32 i=0; i<aContained.getLength(); ++i, ++pContained) \
+ nLen += m_aListeners.getContainer(*pContained)->getLength(); \
+ return nLen; \
+ } \
+ \
+ void classname::Notify(::cppu::OInterfaceContainerHelper& rListeners, const eventtype& e) \
+ { \
+ eventtype aMulti(e); \
+ aMulti.Source = &m_rParent; \
+ ::cppu::OInterfaceIteratorHelper aIt(rListeners); \
+ while (aIt.hasMoreElements()) \
+ static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \
+ } \
+
+ //------------------------------------------------------------------
+ // helper for classes which do property event multiplexing
+ #define IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION(classname, listenerdesc, multiplexer, braodcasterclass, broadcaster) \
+ /*................................................................*/ \
+ void SAL_CALL classname::add##listenerdesc(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::X##listenerdesc >& l ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)\
+ { \
+ multiplexer.addInterface(rName, l); \
+ if (multiplexer.getOverallLen() == 1) \
+ { \
+ ::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY); \
+ if (xBroadcaster.is()) \
+ xBroadcaster->add##listenerdesc(::rtl::OUString(), &multiplexer); \
+ } \
+ } \
+ /*................................................................*/ \
+ void SAL_CALL classname::remove##listenerdesc(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::X##listenerdesc >& l ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)\
+ { \
+ if (multiplexer.getOverallLen() == 1) \
+ { \
+ ::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY); \
+ if (xBroadcaster.is()) \
+ xBroadcaster->remove##listenerdesc(::rtl::OUString(), &multiplexer); \
+ } \
+ multiplexer.removeInterface(rName, l); \
+ } \
+
+ #define STOP_PROPERTY_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, braodcasterclass, broadcaster) \
+ if (multiplexer.getOverallLen()) \
+ { \
+ ::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY); \
+ if (xBroadcaster.is()) \
+ xBroadcaster->remove##listenerdesc(::rtl::OUString(), &multiplexer); \
+ } \
+
+ #define START_PROPERTY_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, braodcasterclass, broadcaster) \
+ if (multiplexer.getOverallLen()) \
+ { \
+ ::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY); \
+ if (xBroadcaster.is()) \
+ xBroadcaster->add##listenerdesc(::rtl::OUString(), &multiplexer); \
+ } \
+
+
+
+ //==================================================================
+ // some listener multiplexers
+ //==================================================================
+ // ::com::sun::star::frame::XStatusListener
+ BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXStatusMultiplexer, ::com::sun::star::frame::XStatusListener)
+ DECLARE_MULTIPLEXER_VOID_METHOD(statusChanged, ::com::sun::star::frame::FeatureStateEvent)
+
+ private:
+ ::com::sun::star::frame::FeatureStateEvent m_aLastKnownStatus;
+ public: \
+ inline ::com::sun::star::frame::FeatureStateEvent getLastEvent( ) const { return m_aLastKnownStatus; }
+ END_DECLARE_LISTENER_MULTIPLEXER()
+
+ // ::com::sun::star::form::XLoadListener
+ BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXLoadMultiplexer, ::com::sun::star::form::XLoadListener)
+ DECLARE_MULTIPLEXER_VOID_METHOD(loaded, ::com::sun::star::lang::EventObject)
+ DECLARE_MULTIPLEXER_VOID_METHOD(unloaded, ::com::sun::star::lang::EventObject)
+ DECLARE_MULTIPLEXER_VOID_METHOD(unloading, ::com::sun::star::lang::EventObject)
+ DECLARE_MULTIPLEXER_VOID_METHOD(reloading, ::com::sun::star::lang::EventObject)
+ DECLARE_MULTIPLEXER_VOID_METHOD(reloaded, ::com::sun::star::lang::EventObject)
+ END_DECLARE_LISTENER_MULTIPLEXER()
+
+ // ::com::sun::star::form::XDatabaseParameterListener
+ BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXParameterMultiplexer, ::com::sun::star::form::XDatabaseParameterListener)
+ DECLARE_MULTIPLEXER_BOOL_METHOD(approveParameter, ::com::sun::star::form::DatabaseParameterEvent)
+ END_DECLARE_LISTENER_MULTIPLEXER()
+
+ // ::com::sun::star::form::XSubmitListener
+ BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXSubmitMultiplexer, ::com::sun::star::form::XSubmitListener)
+ DECLARE_MULTIPLEXER_BOOL_METHOD(approveSubmit, ::com::sun::star::lang::EventObject)
+ END_DECLARE_LISTENER_MULTIPLEXER()
+
+ // ::com::sun::star::form::XResetListener
+ BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXResetMultiplexer, ::com::sun::star::form::XResetListener)
+ DECLARE_MULTIPLEXER_BOOL_METHOD(approveReset, ::com::sun::star::lang::EventObject)
+ DECLARE_MULTIPLEXER_VOID_METHOD(resetted, ::com::sun::star::lang::EventObject)
+ END_DECLARE_LISTENER_MULTIPLEXER()
+
+ // ::com::sun::star::sdbc::XRowSetListener
+ BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXRowSetMultiplexer, ::com::sun::star::sdbc::XRowSetListener)
+ DECLARE_MULTIPLEXER_VOID_METHOD(cursorMoved, ::com::sun::star::lang::EventObject)
+ DECLARE_MULTIPLEXER_VOID_METHOD(rowChanged, ::com::sun::star::lang::EventObject)
+ DECLARE_MULTIPLEXER_VOID_METHOD(rowSetChanged, ::com::sun::star::lang::EventObject)
+ END_DECLARE_LISTENER_MULTIPLEXER()
+
+ // ::com::sun::star::sdb::XRowSetApproveListener
+ BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXRowSetApproveMultiplexer, ::com::sun::star::sdb::XRowSetApproveListener)
+ DECLARE_MULTIPLEXER_BOOL_METHOD(approveCursorMove, ::com::sun::star::lang::EventObject)
+ DECLARE_MULTIPLEXER_BOOL_METHOD(approveRowChange, ::com::sun::star::sdb::RowChangeEvent)
+ DECLARE_MULTIPLEXER_BOOL_METHOD(approveRowSetChange, ::com::sun::star::lang::EventObject)
+ END_DECLARE_LISTENER_MULTIPLEXER()
+
+ // ::com::sun::star::sdb::XSQLErrorListener
+ BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXSQLErrorMultiplexer, ::com::sun::star::sdb::XSQLErrorListener)
+ DECLARE_MULTIPLEXER_VOID_METHOD(errorOccured, ::com::sun::star::sdb::SQLErrorEvent)
+ END_DECLARE_LISTENER_MULTIPLEXER()
+
+ // ::com::sun::star::beans::XPropertyChangeListener
+ DECLARE_PROPERTY_MULTIPLEXER(SbaXPropertyChangeMultiplexer, ::com::sun::star::beans::XPropertyChangeListener, propertyChange, ::com::sun::star::beans::PropertyChangeEvent, (::com::sun::star::uno::RuntimeException))
+
+ // ::com::sun::star::beans::XVetoableChangeListener
+ DECLARE_PROPERTY_MULTIPLEXER(SbaXVetoableChangeMultiplexer, ::com::sun::star::beans::XVetoableChangeListener, vetoableChange, ::com::sun::star::beans::PropertyChangeEvent, (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException))
+
+ // ::com::sun::star::beans::XPropertiesChangeListener
+ BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXPropertiesChangeMultiplexer, ::com::sun::star::beans::XPropertiesChangeListener)
+ DECLARE_MULTIPLEXER_VOID_METHOD(propertiesChange, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >)
+ END_DECLARE_LISTENER_MULTIPLEXER()
+ // the SbaXPropertiesChangeMultiplexer doesn't care about the property names a listener logs on for, it simply
+ // forwards _all_ changes to _all_ listeners
+}
+
+#endif // _SBA_MULTIPLEXER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx
new file mode 100644
index 000000000000..99ac2dbf1769
--- /dev/null
+++ b/dbaccess/source/ui/inc/sqledit.hxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_SQLEDIT_HXX
+#define DBAUI_SQLEDIT_HXX
+
+#include <svtools/editsyntaxhighlighter.hxx>
+#include <svl/lstner.hxx>
+#include <svtools/colorcfg.hxx>
+#include <unotools/sourceviewconfig.hxx>
+
+namespace dbaui
+{
+ class OQueryTextView;
+ class OSqlEdit : public MultiLineEditSyntaxHighlight, utl::ConfigurationListener
+ {
+ private:
+ Timer m_timerInvalidate;
+ Timer m_timerUndoActionCreation;
+ Link m_lnkTextModifyHdl;
+ String m_strOrigText; // wird beim Undo wiederhergestellt
+ OQueryTextView* m_pView;
+ BOOL m_bAccelAction; // Wird bei Cut, Copy, Paste gesetzt
+ BOOL m_bStopTimer;
+ utl::SourceViewConfig m_SourceViewConfig;
+ svtools::ColorConfig m_ColorConfig;
+
+ DECL_LINK(OnUndoActionTimer, void*);
+ DECL_LINK(OnInvalidateTimer, void*);
+
+ private:
+ void ImplSetFont();
+
+ protected:
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void GetFocus();
+
+ DECL_LINK(ModifyHdl, void*);
+
+ public:
+ OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle = WB_LEFT | WB_VSCROLL |WB_BORDER);
+ virtual ~OSqlEdit();
+
+ // Edit overridables
+ virtual void SetText(const String& rNewText);
+ using MultiLineEditSyntaxHighlight::SetText;
+
+ // own functionality
+ BOOL IsInAccelAct();
+
+ void SetTextModifyHdl(const Link& lnk) { m_lnkTextModifyHdl = lnk; }
+ // bitte nicht SetModifyHdl benutzen, den brauche ich selber, der hier wird von dem damit gesetzten Handler
+ // gerufen
+ // der Link bekommt einen Pointer-to-string, der nach dem Link nicht mehr gueltig ist
+
+ void stopTimer();
+ void startTimer();
+
+ virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
+ using MultiLineEditSyntaxHighlight::Notify;
+ };
+}
+
+#endif // DBAUI_SQLEDIT_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/sqlmessage.hxx b/dbaccess/source/ui/inc/sqlmessage.hxx
new file mode 100644
index 000000000000..e7aaa6f8912f
--- /dev/null
+++ b/dbaccess/source/ui/inc/sqlmessage.hxx
@@ -0,0 +1,137 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_SQLMESSAGE_HXX_
+#define _DBAUI_SQLMESSAGE_HXX_
+
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/btndlg.hxx>
+
+#include <connectivity/dbexception.hxx>
+
+#include <memory>
+
+// some forwards
+namespace com { namespace sun { namespace star {
+ namespace sdb {
+ class SQLContext;
+ }
+ namespace sdbc {
+ class SQLException;
+ }
+} } }
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+//==================================================================
+// OSQLMessageBox
+//==================================================================
+struct SQLMessageBox_Impl;
+class OSQLMessageBox : public ButtonDialog
+{
+ FixedImage m_aInfoImage;
+ FixedText m_aTitle;
+ FixedText m_aMessage;
+ ::rtl::OUString m_sHelpURL;
+
+ ::std::auto_ptr< SQLMessageBox_Impl > m_pImpl;
+
+public:
+ enum MessageType
+ {
+ Info,
+ Error,
+ Warning,
+ Query,
+
+ AUTO
+ };
+
+public:
+ /** display an SQLException with auto-recognizing a main and a detailed message
+
+ The first two messages from the exception chain are used as main and detailed message (recognizing the
+ detailed field of an <type scope="com::sun::star::sdb">SQLContext</type>).
+ */
+ OSQLMessageBox(
+ Window* _pParent,
+ const dbtools::SQLExceptionInfo& _rException,
+ WinBits _nStyle = WB_OK | WB_DEF_OK,
+ const ::rtl::OUString& _rHelpURL = ::rtl::OUString()
+ );
+
+ /** display a database related error message
+
+ @param rTitle the title to display
+ @param rMessage the detailed message to display
+ @param _eType determines the image to use. AUTO is disallowed in this constructor version
+ */
+ OSQLMessageBox(Window* pParent,
+ const UniString& rTitle,
+ const UniString& rMessage,
+ WinBits nStyle = WB_OK | WB_DEF_OK,
+ MessageType _eType = Info,
+ const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = NULL );
+
+ ~OSQLMessageBox();
+
+private:
+ void Construct( WinBits nStyle, MessageType eImage );
+
+ DECL_LINK(ButtonClickHdl, Button* );
+
+private:
+ void impl_positionControls();
+ void impl_initImage( MessageType _eImage );
+ void impl_createStandardButtons( WinBits _nStyle );
+ void impl_addDetailsButton();
+};
+
+//==================================================================
+// OSQLWarningBox
+//==================================================================
+class OSQLWarningBox : public OSQLMessageBox
+{
+public:
+ OSQLWarningBox( Window* _pParent,
+ const UniString& _rMessage,
+ WinBits _nStyle = WB_OK | WB_DEF_OK,
+ const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = NULL );
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_SQLMESSAGE_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/statusbarontroller.hxx b/dbaccess/source/ui/inc/statusbarontroller.hxx
new file mode 100644
index 000000000000..e96616066898
--- /dev/null
+++ b/dbaccess/source/ui/inc/statusbarontroller.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_STATUSBARCONTROLLER_HXX
+#define DBAUI_STATUSBARCONTROLLER_HXX
+
+#include <svtools/statusbarcontroller.hxx>
+#include <comphelper/uno3.hxx>
+#include "apitools.hxx"
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+namespace dbaui
+{
+ typedef ::cppu::ImplHelper1 < ::com::sun::star::lang::XServiceInfo> OStatusbarController_BASE;
+ class OStatusbarController : public ::svt::StatusbarController,
+ public OStatusbarController_BASE
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ public:
+ OStatusbarController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB):m_xORB(_rxORB){}
+
+ DECLARE_XINTERFACE()
+ // ::com::sun::star::lang::XServiceInfo
+ DECLARE_SERVICE_INFO_STATIC();
+ };
+}
+#endif // DBAUI_STATUSBARCONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/stringlistitem.hxx b/dbaccess/source/ui/inc/stringlistitem.hxx
new file mode 100644
index 000000000000..88d02acde2f9
--- /dev/null
+++ b/dbaccess/source/ui/inc/stringlistitem.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_STRINGLISTITEM_HXX_
+#define _DBAUI_STRINGLISTITEM_HXX_
+
+#include <svl/poolitem.hxx>
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ustring.hxx>
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+//=========================================================================
+//= OStringListItem
+//=========================================================================
+/** <type>SfxPoolItem</type> which transports a sequence of <type scope="rtl">OUString</type>'s
+*/
+class OStringListItem : public SfxPoolItem
+{
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aList;
+
+public:
+ TYPEINFO();
+ OStringListItem(sal_Int16 nWhich, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rList);
+ OStringListItem(const OStringListItem& _rSource);
+
+ virtual int operator==(const SfxPoolItem& _rItem) const;
+ virtual SfxPoolItem* Clone(SfxItemPool* _pPool = NULL) const;
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > getList() const { return m_aList; }
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_STRINGLISTITEM_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx
new file mode 100644
index 000000000000..6efcee71b872
--- /dev/null
+++ b/dbaccess/source/ui/inc/tabletree.hxx
@@ -0,0 +1,200 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_TABLETREE_HXX_
+#define _DBAUI_TABLETREE_HXX_
+
+#include "marktree.hxx"
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdbc/XDriver.hpp>
+#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
+
+#include <memory>
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+class ImageProvider;
+
+//========================================================================
+//= OTableTreeListBox
+//========================================================================
+class OTableTreeListBox : public OMarkableTreeListBox
+{
+protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >
+ m_xConnection; // the connection we're working for, set in implOnNewConnection, called by UpdateTableList
+ ::std::auto_ptr< ImageProvider >
+ m_pImageProvider; // provider for our images
+ sal_Bool m_bVirtualRoot; // should the first entry be visible
+ bool m_bNoEmptyFolders; // should empty catalogs/schematas be prevented from being displayed?
+
+public:
+ OTableTreeListBox(
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ WinBits nWinStyle,
+ sal_Bool _bVirtualRoot );
+
+ OTableTreeListBox(
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
+ const ResId& rResId,
+ sal_Bool _bVirtualRoot );
+
+ ~OTableTreeListBox();
+
+ typedef ::std::pair< ::rtl::OUString,sal_Bool> TTableViewName;
+ typedef ::std::vector< TTableViewName > TNames;
+
+ void suppressEmptyFolders() { m_bNoEmptyFolders = true; }
+
+ /** call when HiContrast change.
+ */
+ void notifyHiContrastChanged();
+
+ /** determines whether the given entry denotes a tables folder
+ */
+ bool isFolderEntry( const SvLBoxEntry* _pEntry ) const;
+
+ /** determines whether the given entry denotes a table or view
+ */
+ bool isTableOrViewEntry( const SvLBoxEntry* _pEntry ) const
+ {
+ return !isFolderEntry( _pEntry );
+ }
+
+ /** fill the table list with the tables belonging to the connection described by the parameters
+ @param _rxConnection
+ the connection, which must support the service com.sun.star.sdb.Connection
+ @throws
+ <type scope="com::sun::star::sdbc">SQLException</type> if no connection could be created
+ */
+ void UpdateTableList(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection
+ ) throw(::com::sun::star::sdbc::SQLException);
+
+ /** fill the table list with the tables and views determined by the two given containers.
+ The views sequence is used to determine which table is of type view.
+ @param _rxConnection the connection where you got the object names from. Must not be NULL.
+ Used to split the full qualified names into it's parts.
+ @param _rTables table/view sequence
+ @param _rViews view sequence
+ */
+ void UpdateTableList(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString>& _rTables,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString>& _rViews
+ );
+
+ /** returns a NamedDatabaseObject record which describes the given entry
+ */
+ ::com::sun::star::sdb::application::NamedDatabaseObject
+ describeObject( SvLBoxEntry* _pEntry );
+
+ /** to be used if a foreign instance added a table
+ */
+ SvLBoxEntry* addedTable( const ::rtl::OUString& _rName );
+
+ /** to be used if a foreign instance removed a table
+ */
+ void removedTable( const ::rtl::OUString& _rName );
+
+ /** returns the fully qualified name of a table entry
+ @param _pEntry
+ the entry whose name is to be obtained. Must not denote a folder entry.
+ */
+ String getQualifiedTableName( SvLBoxEntry* _pEntry ) const;
+
+ SvLBoxEntry* getEntryByQualifiedName( const ::rtl::OUString& _rName );
+
+ SvLBoxEntry* getAllObjectsEntry() const;
+
+ /** does a wildcard check of the given entry
+ <p>There are two different 'checked' states: If the user checks all children of an entry, this is different
+ from checking the entry itself. The second is called 'wildcard' checking, 'cause in the resulting
+ table filter it's represented by a wildcard.</p>
+ */
+ void checkWildcard(SvLBoxEntry* _pEntry);
+
+ /** determine if the given entry is 'wildcard checked'
+ @see checkWildcard
+ */
+ sal_Bool isWildcardChecked(SvLBoxEntry* _pEntry) const;
+
+protected:
+ virtual void InitEntry(SvLBoxEntry* _pEntry, const XubString& _rString, const Image& _rCollapsedBitmap, const Image& _rExpandedBitmap, SvLBoxButtonKind _eButtonKind);
+
+ virtual void checkedButton_noBroadcast(SvLBoxEntry* _pEntry);
+
+ void implEmphasize(SvLBoxEntry* _pEntry, sal_Bool _bChecked, sal_Bool _bUpdateDescendants = sal_True, sal_Bool _bUpdateAncestors = sal_True);
+
+ /** adds the given entry to our list
+ @precond
+ our image provider must already have been reset to the connection to which the meta data
+ belong.
+ */
+ SvLBoxEntry* implAddEntry(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxMeta,
+ const ::rtl::OUString& _rTableName,
+ sal_Bool _bCheckName = sal_True
+ );
+
+ void implSetDefaultImages();
+
+ void implOnNewConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection );
+
+ bool impl_getAndAssertMetaData( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _out_rMetaData ) const;
+
+ sal_Bool haveVirtualRoot() const { return m_bVirtualRoot; }
+
+ /** fill the table list with the tables and views determined by the two given containers
+ @param _rxConnection the connection where you got the object names from. Must not be NULL.
+ Used to split the full qualified names into it's parts.
+ @param _rTables table/view sequence, the second argument is <TRUE/> if it is a table, otherwise it is a view.
+ */
+ void UpdateTableList(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const TNames& _rTables
+ );
+
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_TABLETREE_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/textconnectionsettings.hxx b/dbaccess/source/ui/inc/textconnectionsettings.hxx
new file mode 100644
index 000000000000..08af3e9d5809
--- /dev/null
+++ b/dbaccess/source/ui/inc/textconnectionsettings.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef TEXTCONNECTIONSETTINGS_HXX
+#define TEXTCONNECTIONSETTINGS_HXX
+
+#include "propertystorage.hxx"
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+
+#include <memory>
+
+class SfxItemSet;
+//........................................................................
+namespace dbaui
+{
+//........................................................................
+
+ class OTextConnectionHelper;
+
+ //====================================================================
+ //= TextConnectionSettingsDialog
+ //====================================================================
+ class TextConnectionSettingsDialog : public ModalDialog
+ {
+ public:
+ TextConnectionSettingsDialog( Window* _pParent, SfxItemSet& _rItems );
+ ~TextConnectionSettingsDialog();
+
+ /** initializes a set of PropertyStorage instaces, which are bound to
+ the text-connection relevant items in our item sets
+ */
+ static void bindItemStorages( SfxItemSet& _rSet, PropertyValues& _rValues );
+
+ virtual short Execute();
+
+ private:
+ ::std::auto_ptr< OTextConnectionHelper > m_pTextConnectionHelper;
+ OKButton m_aOK;
+ CancelButton m_aCancel;
+ SfxItemSet& m_rItems;
+
+ private:
+ DECL_LINK( OnOK, PushButton* );
+ };
+
+//........................................................................
+} // namespace dbaui
+//........................................................................
+
+#endif // TEXTCONNECTIONSETTINGS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/toolbox_tmpl.hrc b/dbaccess/source/ui/inc/toolbox_tmpl.hrc
new file mode 100644
index 000000000000..1706cdbffa6a
--- /dev/null
+++ b/dbaccess/source/ui/inc/toolbox_tmpl.hrc
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_TOOLBOX_HXX
+#define DBAUI_TOOLBOX_HXX
+
+#define CUR_ITEM ToolBoxItem
+#define CUR_SEPARATOR CUR_ITEM {Type = TOOLBOXITEM_SEPARATOR;}
+
+#define MID_SBA_QRY_REFRESH \
+ Identifier = ID_BROWSER_REFRESH ; \
+ Text [ en-US ] = "Refresh"; \
+ Text [ x-comment ] = " "; \
+
+
+#define MID_NEW_VIEW_DESIGN \
+ Identifier = ID_NEW_VIEW_DESIGN; \
+ HelpId = HID_BROWSER_VIEW_CREATE_DESIGN ; \
+ Text [ en-US ] = "New ~View Design" ; \
+
+
+#define MID_NEW_TABLE_DESIGN \
+ Identifier = ID_NEW_TABLE_DESIGN; \
+ HelpId = HID_BROWSER_TABLE_CREATE_DESIGN ; \
+ Text [ en-US ] = "New ~Table Design" ;\
+
+
+#define MID_QUERY_WIZARD \
+ Identifier = ID_NEW_QUERY_WIZARD; \
+ HelpId = HID_BROWSER_QUERY_WIZARD ; \
+ Text[ en-US ] = "Query AutoPilot..."; \
+
+
+#define MID_QUERY_NEW_DESIGN \
+ Identifier = ID_NEW_QUERY_DESIGN; \
+ HelpId = HID_BROWSER_QUERY_CREATE_DESIGN ; \
+ Text [ en-US ] = "New ~Query (Design View)" ; \
+
+
+#define MID_QUERY_EDIT_DESIGN \
+ Identifier = ID_EDIT_QUERY_DESIGN; \
+ HelpId = HID_BROWSER_QUERY_EDIT ; \
+ Text [ en-US ] = "~Edit Query" ; \
+
+
+#define MID_QUERY_NEW_SQL \
+ Identifier = ID_NEW_QUERY_SQL; \
+ HelpId = HID_BROWSER_QUERY_CREATE_TEXT ; \
+ Text [ en-US ] = "New Query (~SQL View)" ; \
+
+
+#define MID_DBUI_QUERY_EDIT_JOINCONNECTION \
+ Identifier = ID_QUERY_EDIT_JOINCONNECTION; \
+ HelpId = HID_QUERY_EDIT_JOINCONNECTION ; \
+ Text [ en-US ] = "Edit..."; \
+
+
+#define MID_COLUMN_WIDTH\
+ Identifier = ID_BROWSER_COLWIDTH ;\
+ HelpID = HID_BROWSER_COLUMNWIDTH ;\
+ Text [ en-US ] = "Column ~Width..." ;\
+
+
+#define MID_DOCUMENT_CREATE_REPWIZ\
+ Identifier = ID_DOCUMENT_CREATE_REPWIZ ;\
+ HelpID = HID_DOCUMENT_CREATE_REPWIZ ;\
+ Text [ en-US ] = "Report Wizard..."; \
+
+
+#define MID_DOCUMENT_NEW_AUTOPILOT \
+ Identifier = SID_DB_FORM_NEW_PILOT; \
+ HelpID = SID_DB_FORM_NEW_PILOT ;\
+ Text [ en-US ] = "Form AutoPilot..."; \
+
+
+#endif // DBAUI_TOOLBOX_HXX
+
diff --git a/dbaccess/source/ui/inc/toolboxcontroller.hxx b/dbaccess/source/ui/inc/toolboxcontroller.hxx
new file mode 100644
index 000000000000..8779c351c34e
--- /dev/null
+++ b/dbaccess/source/ui/inc/toolboxcontroller.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBACCESS_TOOLBOXCONTROLLER_HXX
+#define DBACCESS_TOOLBOXCONTROLLER_HXX
+
+#include <svtools/toolboxcontroller.hxx>
+#include <comphelper/stl_types.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include "apitools.hxx"
+#include "moduledbu.hxx"
+#include <memory>
+
+class PopupMenu;
+namespace dbaui
+{
+ typedef ::cppu::ImplHelper1 < ::com::sun::star::lang::XServiceInfo> TToolboxController_BASE;
+
+ class OToolboxController : public ::svt::ToolboxController
+ ,public TToolboxController_BASE
+ {
+ DECLARE_STL_USTRINGACCESS_MAP(sal_Bool,TCommandState);
+ OModuleClient m_aModuleClient;
+ TCommandState m_aStates;
+ sal_uInt16 m_nToolBoxId;
+
+ ::std::auto_ptr<PopupMenu> getMenu();
+ public:
+ OToolboxController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+ // XServiceInfo
+ DECLARE_SERVICE_INFO_STATIC();
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+ // XToolbarController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
+ };
+//..........................................................................
+} // dbaui
+//..........................................................................
+#endif //DBACCESS_TOOLBOXCONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/undosqledit.hxx b/dbaccess/source/ui/inc/undosqledit.hxx
new file mode 100644
index 000000000000..f8bb1541d02f
--- /dev/null
+++ b/dbaccess/source/ui/inc/undosqledit.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef DBAUI_UNDOSQLEDIT_HXX
+#define DBAUI_UNDOSQLEDIT_HXX
+
+#include "GeneralUndo.hxx"
+#include "dbu_control.hrc"
+
+namespace dbaui
+{
+ class OSqlEdit;
+ // ================================================================================================
+ // OSqlEditUndoAct - Undo-class for changing sql text
+ //------------------------------------------------------------------------
+ class OSqlEditUndoAct : public OCommentUndoAction
+ {
+ protected:
+ OSqlEdit* m_pOwner;
+ String m_strNextText;
+
+ virtual void Undo() { ToggleText(); }
+ virtual void Redo() { ToggleText(); }
+
+ void ToggleText();
+ public:
+ OSqlEditUndoAct(OSqlEdit* pEdit) : OCommentUndoAction(STR_QUERY_UNDO_MODIFYSQLEDIT), m_pOwner(pEdit) { }
+
+ void SetOriginalText(const String& strText) { m_strNextText =strText; }
+ };
+}
+#endif // DBAUI_UNDOSQLEDIT_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/unoadmin.hxx b/dbaccess/source/ui/inc/unoadmin.hxx
new file mode 100644
index 000000000000..2d2ab40bfdba
--- /dev/null
+++ b/dbaccess/source/ui/inc/unoadmin.hxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_UNOADMIN_
+#define _DBAUI_UNOADMIN_
+
+#include <svtools/genericunodialog.hxx>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include "dsntypes.hxx"
+#include "moduledbu.hxx"
+
+class SfxItemSet;
+class SfxItemPool;
+class SfxPoolItem;
+
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+class IDatabaseSettingsDialog;
+
+//=========================================================================
+//= ODatabaseAdministrationDialog
+//=========================================================================
+typedef ::svt::OGenericUnoDialog ODatabaseAdministrationDialogBase;
+class ODatabaseAdministrationDialog
+ :public ODatabaseAdministrationDialogBase
+{
+ OModuleClient m_aModuleClient;
+protected:
+ SfxItemSet* m_pDatasourceItems; // item set for the dialog
+ SfxItemPool* m_pItemPool; // item pool for the item set for the dialog
+ SfxPoolItem** m_pItemPoolDefaults; // pool defaults
+ ::dbaccess::ODsnTypeCollection*
+ m_pCollection; // datasource type collection
+
+ ::com::sun::star::uno::Any m_aInitialSelection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xActiveConnection;
+
+protected:
+ ODatabaseAdministrationDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ virtual ~ODatabaseAdministrationDialog();
+protected:
+// OGenericUnoDialog overridables
+ virtual void destroyDialog();
+ virtual void implInitialize(const com::sun::star::uno::Any& _rValue);
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_UNOADMIN_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
new file mode 100644
index 000000000000..0d6ef5da40c5
--- /dev/null
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -0,0 +1,499 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SBA_UNODATBR_HXX_
+#define _SBA_UNODATBR_HXX_
+
+#include "brwctrlr.hxx"
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <comphelper/stl_types.hxx>
+#include <com/sun/star/frame/XStatusListener.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/i18n/XCollator.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/document/XScriptInvocationContext.hpp>
+#include <com/sun/star/ui/XContextMenuInterception.hpp>
+#include <com/sun/star/sdb/application/DatabaseObject.hpp>
+#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
+#include <com/sun/star/sdb/XDatabaseRegistrationsListener.hpp>
+#include <cppuhelper/implbase5.hxx>
+#include "callbacks.hxx"
+#include <vcl/timer.hxx>
+#include <svtools/transfer.hxx>
+#include <svx/dataaccessdescriptor.hxx>
+#include <sot/storage.hxx>
+#include "TableCopyHelper.hxx"
+#include "commontypes.hxx"
+
+// =========================================================================
+class SvLBoxEntry;
+class Splitter;
+struct SvSortData;
+
+namespace com { namespace sun{ namespace star { namespace container { class XNameContainer; } } } }
+
+class SvLBoxTreeList;
+// .........................................................................
+namespace dbaui
+{
+// .........................................................................
+
+ class DBTreeView;
+ struct DBTreeEditedEntry;
+ class ImageProvider;
+
+ // =====================================================================
+ typedef ::cppu::ImplHelper5 < ::com::sun::star::frame::XStatusListener
+ , ::com::sun::star::view::XSelectionSupplier
+ , ::com::sun::star::document::XScriptInvocationContext
+ , ::com::sun::star::ui::XContextMenuInterception
+ , ::com::sun::star::sdb::XDatabaseRegistrationsListener
+ > SbaTableQueryBrowser_Base;
+ class SbaTableQueryBrowser
+ :public SbaXDataBrowserController
+ ,public SbaTableQueryBrowser_Base
+ ,public IControlActionListener
+ ,public IContextMenuProvider
+ {
+ protected:
+
+ // ---------------------------
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > m_xCollator;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xCurrentFrameParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xMainToolbar;
+
+ // ---------------------------
+ struct ExternalFeature
+ {
+ ::com::sun::star::util::URL aURL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
+ xDispatcher;
+ sal_Bool bEnabled;
+
+ ExternalFeature() : bEnabled( sal_False ) { }
+ ExternalFeature( const ::com::sun::star::util::URL& _rURL ) : aURL( _rURL ), bEnabled( sal_False ) { }
+ };
+
+ typedef ::std::map< sal_uInt16, ExternalFeature, ::std::less< sal_uInt16 > > ExternalFeaturesMap;
+ ExternalFeaturesMap m_aExternalFeatures;
+
+ ::svx::ODataAccessDescriptor m_aDocumentDataSource;
+ // if we're part of a document, this is the state of the DocumentDataSource slot
+
+ ::cppu::OInterfaceContainerHelper m_aSelectionListeners;
+ ::cppu::OInterfaceContainerHelper m_aContextMenuInterceptors;
+
+ OTableCopyHelper::DropDescriptor m_aAsyncDrop;
+ OTableCopyHelper m_aTableCopyHelper;
+
+ ::rtl::OUString m_sQueryCommand; // the command of the query currently loaded (if any)
+ //::rtl::OUString m_sToBeLoaded; // contains the element name which should be loaded if any
+
+ DBTreeView* m_pTreeView;
+ Splitter* m_pSplitter;
+ SvLBoxTreeList* m_pTreeModel; // contains the datasources of the registry
+ SvLBoxEntry* m_pCurrentlyDisplayed;
+ ULONG m_nAsyncDrop;
+
+ sal_Int16 m_nBorder; // TRUE when border should be shown
+
+ sal_Bool m_bQueryEscapeProcessing : 1; // the escape processing flag of the query currently loaded (if any)
+ sal_Bool m_bShowMenu; // if TRUE the menu should be visible otherwise not
+ sal_Bool m_bInSuspend;
+ sal_Bool m_bEnableBrowser;
+ ::boost::optional< bool >
+ m_aDocScriptSupport; // relevant if and only if we are associated with exactly one DBDoc
+
+
+ virtual ::rtl::OUString getPrivateTitle( ) const;
+ // attribute access
+ public:
+ SbaTableQueryBrowser(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
+ ~SbaTableQueryBrowser();
+
+ enum EntryType
+ {
+ // don't change the above definitions! There are places (in particular SbaTableQueryBrowser::getCurrentSelection)
+ // which rely on the fact that the EntryType values really equal the DatabaseObject(Container) values!
+ etDatasource = ::com::sun::star::sdb::application::DatabaseObjectContainer::DATA_SOURCE,
+ etQueryContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer::QUERIES,
+ etTableContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer::TABLES,
+ etQuery = ::com::sun::star::sdb::application::DatabaseObject::QUERY,
+ etTableOrView = ::com::sun::star::sdb::application::DatabaseObject::TABLE,
+ etUnknown = -1
+ };
+
+ /** returns a DatabaseObject value corresponding to the given EntryType
+ @param _eType
+ the entry type. Must not be etUnknown.
+ */
+ static sal_Int32 getDatabaseObjectType( EntryType _eType );
+
+ // need by registration
+ static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+
+ DECLARE_UNO3_DEFAULTS(SbaTableQueryBrowser,SbaXDataBrowserController);
+ // late construction
+ virtual sal_Bool Construct(Window* pParent);
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XPropertyChangeListener
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::frame::XController
+ virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL disposing();
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XSelectionSupplier
+ virtual sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& aSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::frame::XFrameActionListener
+ virtual void SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ //IController
+ virtual void notifyHiContrastChanged();
+
+ // XScriptInvocationContext
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > SAL_CALL getScriptContainer() throw (::com::sun::star::uno::RuntimeException);
+
+ // XContextMenuInterception
+ virtual void SAL_CALL registerContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XDatabaseRegistrationsListener
+ virtual void SAL_CALL registeredDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL revokedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL changedDatabaseLocation( const ::com::sun::star::sdb::DatabaseRegistrationEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ // SbaXDataBrowserController overridables
+ virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm);
+ virtual sal_Bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid);
+
+ virtual sal_Bool preReloadForm();
+ virtual void postReloadForm();
+
+ virtual void addModelListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
+ virtual void removeModelListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel);
+
+ virtual void AddColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol);
+ virtual void RemoveColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol);
+
+ virtual void LoadFinished(sal_Bool _bWasSynch);
+
+ virtual void criticalFail();
+
+ virtual void describeSupportedFeatures();
+ virtual FeatureState GetState(sal_uInt16 nId) const;
+ virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
+
+ // IControlActionListener overridables
+ virtual sal_Bool requestQuickHelp( const SvLBoxEntry* _pEntry, String& _rText ) const;
+ virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel );
+ virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors );
+ virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt );
+
+ // IContextMenuProvider
+ virtual PopupMenu* getContextMenu( Control& _rControl ) const;
+ virtual IController& getCommandController();
+ virtual ::cppu::OInterfaceContainerHelper*
+ getContextMenuInterceptors();
+ virtual ::com::sun::star::uno::Any
+ getCurrentSelection( Control& _rControl ) const;
+
+ virtual void impl_initialize();
+
+ // SbaGridListener overridables
+ virtual void RowChanged();
+ virtual void ColumnChanged();
+ virtual void SelectionChanged();
+
+ // methods for showing/hiding the explorer part
+ sal_Bool haveExplorer() const;
+ void hideExplorer();
+ void showExplorer();
+ void toggleExplorer() { if (haveExplorer()) hideExplorer(); else showExplorer(); }
+
+ // methods for handling the 'selection' (paintin them bold) of SvLBoxEntries
+ // returns <TRUE/> if the entry is selected (which means it's part of the selected path)
+ sal_Bool isSelected(SvLBoxEntry* _pEntry) const;
+ // select the entry (and only the entry, not the whole path)
+ void select(SvLBoxEntry* _pEntry, sal_Bool _bSelect = sal_True);
+ // select the path of the entry (which must be an entry without children)
+ void selectPath(SvLBoxEntry* _pEntry, sal_Bool _bSelect = sal_True);
+
+ virtual void loadMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame);
+
+ private:
+ // check the state of the external slot given, update any UI elements if necessary
+ void implCheckExternalSlot( sal_uInt16 _nId );
+
+ // connect to the external dispatchers (if any)
+ void connectExternalDispatches();
+
+ /** get the state of an external slot
+ <p>The slot is available if an external dispatcher is responsible for it, _and_ if this dispatcher
+ told us the slot is available.</p>
+ */
+ sal_Bool getExternalSlotState( sal_uInt16 _nId ) const;
+
+ /** add an entry (including the subentries for queries/tables) to the list model
+
+ <p>The given names and images may be empty, in this case they're filled with the correct
+ values. This way they may be reused for the next call, which saves some resource manager calls.</p>
+ */
+ void implAddDatasource(const String& _rDbName, Image& _rDbImage,
+ String& _rQueryName, Image& _rQueryImage,
+ String& _rTableName, Image& _rTableImage,
+ const SharedConnection& _rxConnection
+ );
+
+ void implAddDatasource( const String& _rDataSourceName, const SharedConnection& _rxConnection );
+
+ /// removes (and cleans up) the entry for the given data source
+ void impl_cleanupDataSourceEntry( const String& _rDataSourceName );
+
+ /// clears the tree list box
+ void clearTreeModel();
+
+ /** unloads the form, empties the grid model, cleans up anything related to the currently displayed object
+ @param _bDisposeConnection
+ <TRUE/> if the connection should be disposed
+ @param _bFlushData
+ <TRUE/> if the currently displayed object (if any) should be flushed
+ */
+ void unloadAndCleanup( sal_Bool _bDisposeConnection = sal_True );
+
+ // disposes the connection associated with the given entry (which must represent a data source)
+ void disposeConnection( SvLBoxEntry* _pDSEntry );
+
+ /// flushs and disposes the given connection, and de-registers as listener
+ void impl_releaseConnection( SharedConnection& _rxConnection );
+
+ /** close the connection (and collapse the list entries) of the given list entries
+ */
+ void closeConnection(SvLBoxEntry* _pEntry,sal_Bool _bDisposeConnection = sal_True);
+
+ void populateTree(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xNameAccess, SvLBoxEntry* _pParent, EntryType _eEntryType);
+ void initializeTreeModel();
+
+ /** search in the tree for query- or tablecontainer equal to this interface and return
+ this container entry
+ */
+ SvLBoxEntry* getEntryFromContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxNameAccess);
+ // return true when there is connection available
+ sal_Bool ensureConnection(SvLBoxEntry* _pDSEntry, void * pDSData, SharedConnection& _rConnection );
+ sal_Bool ensureConnection(SvLBoxEntry* _pAnyEntry, SharedConnection& _rConnection );
+
+ sal_Bool getExistentConnectionFor( SvLBoxEntry* _pDSEntry, SharedConnection& _rConnection );
+ /** returns an image provider which works with the connection belonging to the given entry
+ */
+ ::std::auto_ptr< ImageProvider >
+ getImageProviderFor( SvLBoxEntry* _pAnyEntry );
+
+ void implAdministrate( SvLBoxEntry* _pApplyTo );
+
+ TransferableHelper*
+ implCopyObject( SvLBoxEntry* _pApplyTo, sal_Int32 _nCommandType, sal_Bool _bAllowConnection = sal_True );
+
+ EntryType getEntryType( SvLBoxEntry* _pEntry ) const;
+ EntryType getChildType( SvLBoxEntry* _pEntry ) const;
+ sal_Bool isObject( EntryType _eType ) const { return ( etTableOrView== _eType ) || ( etQuery == _eType ); }
+ sal_Bool isContainer( EntryType _eType ) const { return (etTableContainer == _eType) || (etQueryContainer == _eType); }
+ sal_Bool isContainer( SvLBoxEntry* _pEntry ) const { return isContainer( getEntryType( _pEntry ) ); }
+
+ // ensure that the xObject for the given entry is set on the user data
+ sal_Bool ensureEntryObject( SvLBoxEntry* _pEntry );
+
+ // get the display text of the entry given
+ String GetEntryText( SvLBoxEntry* _pEntry ) const;
+
+ // is called when a table or a query was selected
+ DECL_LINK( OnSelectionChange, void* );
+ DECL_LINK( OnExpandEntry, SvLBoxEntry* );
+
+ DECL_LINK( OnCopyEntry, void* );
+
+ DECL_LINK( OnTreeEntryCompare, const SvSortData* );
+
+ DECL_LINK( OnAsyncDrop, void* );
+
+ void implRemoveStatusListeners();
+
+ sal_Bool implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect = sal_False);
+ bool implSelect( SvLBoxEntry* _pEntry );
+
+ /// selects the entry given and loads the grid control with the object's data
+ sal_Bool implSelect(
+ const ::rtl::OUString& _rDataSourceName,
+ const ::rtl::OUString& _rCommand,
+ const sal_Int32 _nCommandType,
+ const sal_Bool _bEscapeProcessing,
+ const SharedConnection& _rxConnection,
+ sal_Bool _bSelectDirect = sal_False
+ );
+
+ SvLBoxEntry* implGetConnectionEntry(SvLBoxEntry* _pEntry) const;
+ /// inserts an entry into the tree
+ SvLBoxEntry* implAppendEntry(
+ SvLBoxEntry* _pParent,
+ const String& _rName,
+ void* _pUserData,
+ EntryType _eEntryType
+ );
+
+ /// loads the grid control with the data object specified (which may be a table, a query or a command)
+ sal_Bool implLoadAnything(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rCommand,
+ const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection = SharedConnection() );
+
+ /** retrieves the tree entry for the object described by <arg>_rDescriptor</arg>
+ @param _rDescriptor
+ the object descriptor
+ @param _ppDataSourceEntry
+ If not <NULL/>, the data source tree entry will be returned here
+ @param _ppContainerEntry
+ If not <NULL/>, the object container tree entry will be returned here
+ @param _bExpandAncestors
+ If <TRUE/>, all ancestor on the way to the entry will be expanded
+ */
+ SvLBoxEntry* getObjectEntry(const ::svx::ODataAccessDescriptor& _rDescriptor,
+ SvLBoxEntry** _ppDataSourceEntry = NULL, SvLBoxEntry** _ppContainerEntry = NULL,
+ sal_Bool _bExpandAncestors = sal_True
+ );
+ /** retrieves the tree entry for the object described by data source name, command and command type
+ @param _rDataSource
+ the data source name
+ @param _rCommand
+ the command
+ @param _nCommandType
+ the command type
+ @param _rDescriptor
+ the object descriptor
+ @param _ppDataSourceEntry
+ If not <NULL/>, the data source tree entry will be returned here
+ @param _ppContainerEntry
+ If not <NULL/>, the object container tree entry will be returned here
+ @param _bExpandAncestors
+ If <TRUE/>, all ancestor on the way to the entry will be expanded
+ */
+ SvLBoxEntry* getObjectEntry(
+ const ::rtl::OUString& _rDataSource, const ::rtl::OUString& _rCommand, sal_Int32 _nCommandType,
+ SvLBoxEntry** _ppDataSourceEntry = NULL, SvLBoxEntry** _ppContainerEntry = NULL,
+ sal_Bool _bExpandAncestors = sal_True,
+ const SharedConnection& _rxConnection = SharedConnection()
+ );
+
+ /// checks if m_aDocumentDataSource describes a known object
+ void checkDocumentDataSource();
+
+ void extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor,
+ ::rtl::OUString& _rDataSource, ::rtl::OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing);
+
+ void transferChangedControlProperty(const ::rtl::OUString& _rProperty, const ::com::sun::star::uno::Any& _rNewValue);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connectWithStatus(
+ const ::rtl::OUString& _rDataSourceName,
+ void* _pTreeListUserData // in rela a DBTreeListUserData*, but we do not know this class here ....
+ );
+
+#ifdef DBG_UTIL
+ // checks whether the given tree entry denotes a data source
+ bool impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const;
+#endif
+
+ /// retrieves the data source URL/name for the given entry representing a data source
+ String getDataSourceAcessor( SvLBoxEntry* _pDataSourceEntry ) const;
+
+ /** get the signature (command/escape processing) of the query the form is based on
+ <p>If the for is not based on a query or not even loaded, nothing happens and <FALSE/> is returned.</p>
+ */
+ sal_Bool implGetQuerySignature( ::rtl::OUString& _rCommand, sal_Bool& _bEscapeProcessing );
+
+ sal_Bool isEntryCopyAllowed(SvLBoxEntry* _pEntry) const;
+
+ void copyEntry(SvLBoxEntry* _pEntry);
+
+ // remove all grid columns and dispose them
+ void clearGridColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _xColContainer);
+
+ sal_Bool isHiContrast() const;
+
+
+ /** checks if the currently displayed entry changed
+ @param _sName
+ Name of the changed entry
+ @param _pContainer
+ The container of the displayed entry
+ @return
+ <TRUE/> if it is the currently displayed otherwise <FALSE/>
+ */
+ sal_Bool isCurrentlyDisplayedChanged(const String& _sName,SvLBoxEntry* _pContainer);
+
+ /** called whenever the content of the browser is used for preview, as the very last action
+ of the load process
+ */
+ void initializePreviewMode();
+ };
+
+// .........................................................................
+} // namespace dbaui
+// .........................................................................
+
+#endif // _SBA_UNODATBR_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/unosqlmessage.hxx b/dbaccess/source/ui/inc/unosqlmessage.hxx
new file mode 100644
index 000000000000..c5c7078d599d
--- /dev/null
+++ b/dbaccess/source/ui/inc/unosqlmessage.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DBAUI_UNOSQLMESSAGE_HXX_
+#define _DBAUI_UNOSQLMESSAGE_HXX_
+
+#include <svtools/genericunodialog.hxx>
+#include "moduledbu.hxx"
+//.........................................................................
+namespace dbaui
+{
+//.........................................................................
+
+typedef ::svt::OGenericUnoDialog OSQLMessageDialogBase;
+class OSQLMessageDialog
+ :public OSQLMessageDialogBase
+ ,public ::comphelper::OPropertyArrayUsageHelper< OSQLMessageDialog >
+{
+ OModuleClient m_aModuleClient;
+protected:
+ // <properties>
+ ::com::sun::star::uno::Any m_aException;
+ ::rtl::OUString m_sHelpURL;
+ // </properties>
+
+protected:
+ OSQLMessageDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+
+public:
+ // XTypeProvider
+ virtual com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
+ virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo - static methods
+ static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( com::sun::star::uno::RuntimeException );
+ static ::rtl::OUString getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException );
+ static com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
+ SAL_CALL Create(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&);
+
+ // XPropertySet
+ virtual com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(com::sun::star::uno::RuntimeException);
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
+
+protected:
+// OPropertySetHelper overridables
+ // (overwrittin these three, because we have some special handling for our property)
+ virtual sal_Bool SAL_CALL convertFastPropertyValue( com::sun::star::uno::Any& _rConvertedValue, com::sun::star::uno::Any& _rOldValue, sal_Int32 _nHandle, const com::sun::star::uno::Any& _rValue) throw(com::sun::star::lang::IllegalArgumentException);
+
+// OGenericUnoDialog overridables
+ virtual Dialog* createDialog(Window* _pParent);
+};
+
+//.........................................................................
+} // namespace dbaui
+//.........................................................................
+
+#endif // _DBAUI_UNOSQLMESSAGE_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */