diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-10-05 11:55:58 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-10-05 11:55:58 +0000 |
commit | 0e2424bb1640c26ecd0c5d129ee7b329a1fdfc5d (patch) | |
tree | 6fb86aa07bfafc4e43f8d3fdc089ed02c142ce24 | |
parent | 974bbbe7b8d3f387f97a969f500c1dfafa04dd68 (diff) |
INTEGRATION: CWS hsqlcsvstage1 (1.1.4); FILE ADDED
2006/09/20 10:31:04 fs 1.1.4.1: #i69696#, being stage 1 of issue #i69526#: merging changes from CWS hsqlcsv herein
3 files changed, 310 insertions, 0 deletions
diff --git a/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl b/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl new file mode 100644 index 000000000000..3fcb013f3b6c --- /dev/null +++ b/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl @@ -0,0 +1,122 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XDatabaseDocumentUI.idl,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: kz $ $Date: 2006-10-05 12:55:36 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef __com_sun_star_sdb_application_XDatabaseDocumentUI_idl__ +#define __com_sun_star_sdb_application_XDatabaseDocumentUI_idl__ + +#ifndef __com_sun_star_sdbc_XDataSource_idl__ +#include <com/sun/star/sdbc/XDataSource.idl> +#endif +#ifndef __com_sun_star_sdbc_SQLException_idl__ +#include <com/sun/star/sdbc/SQLException.idl> +#endif +#ifndef __com_sun_star_sdbc_XConnection_idl__ +#include <com/sun/star/sdbc/XConnection.idl> +#endif +#ifndef __com_sun_star_awt_XWindow_idl__ +#include <com/sun/star/awt/XWindow.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module sdb { module application { + +//============================================================================= + +/** provides access to the user interface of a database document + + <p>This interface is available when a database document has been loaded into + a frame, at the controller of this frame.</p> + + @see com::sun::star::frame::Controller + @see com::sun::star::sdb::DatabaseDocument + */ +interface XDatabaseDocumentUI +{ + /** provides access to the data source belong to the database document + */ + [attribute, readonly] com::sun::star::sdbc::XDataSource DataSource; + + /** provides access to the applicatio's main window + + <p>Note that reading this atttribute is equivalent to querying the component + for the <type scope="com::sun::star::frame">XController</type> interface, + asking the controller for its frame, and asking this frame for its + container window. + + @see ::com::sun::star::frame::XController + @see ::com::sun::star::frame::XFrame + */ + [attribute, readonly] com::sun::star::awt::XWindow ApplicationMainWindow; + + /** provides access to the current connection of the application + + <p>Note that the connection returned here is really the working connection + of the application. Clients should not misuse it, in particular, closing + the connection can yield unexpected results and should definately be + avoided.</p> + */ + [attribute, readonly] com::sun::star::sdbc::XConnection ActiveConnection; + + /** determines whether the application is currently connected to the database + */ + boolean isConnected(); + + /** lets the application connect to the database + + <p>If the application is already connected, nothing happens. If it is not + connected, the application will try to establish a connection by using + <member scope="com::sun::star::sdbc">XDataSource::getConnection</member> + with the current settings, as specified in the + <member scope="com::sun::star::sdb">DataSource::Settings</member> member.</p> + + <p>If the connection cannot be established, the respective error message is shown + in the application window.</p> + + @return + whether or not the connection attempt was successful, i.e. whether or not + a subsequent call to <member>isConnected</member> would return <TRUE/>. + */ + boolean connect(); +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif + diff --git a/offapi/com/sun/star/sdb/application/XTableUIProvider.idl b/offapi/com/sun/star/sdb/application/XTableUIProvider.idl new file mode 100644 index 000000000000..8daaf2db7e04 --- /dev/null +++ b/offapi/com/sun/star/sdb/application/XTableUIProvider.idl @@ -0,0 +1,129 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XTableUIProvider.idl,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: kz $ $Date: 2006-10-05 12:55:47 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef __com_sun_star_sdb_ui_XTableUIProvider_idl__ +#define __com_sun_star_sdb_ui_XTableUIProvider_idl__ + +#include <com/sun/star/graphic/XGraphic.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/lang/WrappedTargetException.idl> + +//============================================================================= + +module com { module sun { module star { module sdb { module application { + +interface XDatabaseDocumentUI; + +//============================================================================= + +/** is used by the database application to obtain non-default user + interface information and/or components for database tables. + + @see com::sun::star::sdb::Connection + */ +interface XTableUIProvider +{ + /** provides the icon which should be used to represent the table in the + database application window. + + <p>The icon will usually be requested once per table, and cached. It + might be requested again if the application settings change, for instance, + if another desktop theme has been activated.</p> + + @param TableName + denotes the fully qualified name of the database table. + + @param ColorMode + denotes the color mode of the graphic to retrieve, being one of the + <type scope="com::sun::star::graphic">GraphicColorMode</type> constants. + @return + the icon which should be used to represent the table in the + database application window, or <NULL/> if the default icon + should be used. + */ + com::sun::star::graphic::XGraphic getTableIcon( + [in] string TableName, [in] long ColorMode ); + + /** returns a component which can be used to edit the definition of an + existing table. + + @param DocumentUI + provides access to the UI in which the database document is + currently displayed.<br/> + In particular, this paramter provides access to the application's main + window, which is needed in case the table editor should be a dialog. + + @param TableName + denotes the fully qualified name of an existing table. + + @return + a component which can be used to edit the definition of an + existing table, or <NULL/> if the default component should + be used.<br/> + Two component types are supported so far + <ul><li>modal dialogs<br/> + If the returned component supports the + <type scope="com::sun::star::ui::dialogs">XExecutableDialog</type> + interface, the dialog will be executed modally.</li> + <li>modeless frames<br/> + If the returned component supports the + <type scope="com::sun::star::frame">XController</type> + interface, it is assumed that it represents a controller, + loaded into a new frame, which is a modeless and, in its lifetime, + depends on the application main window.</li> + </ul> + If the returned component does not support any of the above-mentioned + interfaces, it's discarded. + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given <arg>TableName</arg> does not denote an existing table + + @throws ::com::sun::star::lang::WrappedTargetException + if an error occures while creating the table editor component. + */ + com::sun::star::uno::XInterface getTableEditor( + [in] XDatabaseDocumentUI DocumentUI, + [in] string TableName ) + raises (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException); +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif + diff --git a/offapi/com/sun/star/sdb/application/makefile.mk b/offapi/com/sun/star/sdb/application/makefile.mk new file mode 100644 index 000000000000..a31315d8e11c --- /dev/null +++ b/offapi/com/sun/star/sdb/application/makefile.mk @@ -0,0 +1,59 @@ +#************************************************************************* +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.2 $ +# +# last change: $Author: kz $ $Date: 2006-10-05 12:55:58 $ +# +# The Contents of this file are made available subject to +# the terms of GNU Lesser General Public License Version 2.1. +# +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2005 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +#************************************************************************* + +PRJ=..$/..$/..$/..$/.. + +PRJNAME=api + +TARGET=csssdbapp +PACKAGE=com$/sun$/star$/sdb$/application + +# --- Settings ----------------------------------------------------- +.INCLUDE : $(PRJ)$/util$/makefile.pmk + + +UNOIDLDEFS += -w + +# ------------------------------------------------------------------------ +IDLFILES=\ + DatabaseObject.idl \ + XDatabaseDocumentUI.idl \ + XTableUIProvider.idl + +# ------------------------------------------------------------------ +.INCLUDE : target.mk +.INCLUDE : $(PRJ)$/util$/target.pmk + + |