summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-02-14 13:28:01 +0000
committerOcke Janssen <oj@openoffice.org>2001-02-14 13:28:01 +0000
commit0ec7545d268100380e1544d5d6fa5f83b07ac907 (patch)
treeff6a489526e06ec5875abaade93351f170e82060 /dbaccess/source/ui
parent1c87080a66220a6fb0dbf47d252b8e888e65cbf3 (diff)
reanimation of tabledesign
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx205
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx109
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescriptions.cxx127
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx1692
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx232
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx1361
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignControl.cxx270
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx149
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignView.cxx346
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldControl.cxx181
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldControl.hxx104
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx280
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx124
-rw-r--r--dbaccess/source/ui/tabledesign/TableRow.cxx166
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx513
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.hxx196
-rw-r--r--dbaccess/source/ui/tabledesign/makefile.mk99
-rw-r--r--dbaccess/source/ui/tabledesign/table.src1352
18 files changed, 7506 insertions, 0 deletions
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
new file mode 100644
index 000000000000..59881c64008e
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
@@ -0,0 +1,205 @@
+/*************************************************************************
+ *
+ * $RCSfile: FieldDescGenWin.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:28:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX
+#include "FieldDescGenWin.hxx"
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include "dbaccess_helpid.hrc"
+#endif
+#ifndef DBAUI_TABLEDESIGNHELPBAR_HXX
+#include "TableDesignHelpBar.hxx"
+#endif
+#ifndef DBAUI_TABLEFIELDCONTROL_HXX
+#include "TableFieldControl.hxx"
+#endif
+#ifndef DBAUI_TABLEDESIGNVIEW_HXX
+#include "TableDesignView.hxx"
+#endif
+#ifndef DBAUI_TABLEEDITORCONTROL_HXX
+#include "TEditControl.hxx"
+#endif
+using namespace dbaui;
+
+//==================================================================
+// class OFieldDescGenWin
+//==================================================================
+
+DBG_NAME(OFieldDescGenWin);
+//==================================================================
+//------------------------------------------------------------------------------
+OFieldDescGenWin::OFieldDescGenWin( Window* pParent, OTableDesignHelpBar* pHelp ) :
+ TabPage( pParent, WB_3DLOOK | WB_DIALOGCONTROL )
+{
+ DBG_CTOR(OFieldDescGenWin,NULL);
+ m_pFieldControl = new OTableFieldControl(this,pHelp);
+ m_pFieldControl->SetHelpId(HID_TAB_DESIGN_FIELDCONTROL);
+ m_pFieldControl->Show();
+}
+//------------------------------------------------------------------------------
+OFieldDescGenWin::~OFieldDescGenWin()
+{
+ DBG_DTOR(OFieldDescGenWin,NULL);
+ delete m_pFieldControl;
+}
+//------------------------------------------------------------------------------
+void OFieldDescGenWin::Init()
+{
+ DBG_ASSERT(GetEditorCtrl() != NULL, "OFieldDescGenWin::Init : have no editor control !");
+
+ m_pFieldControl->Init();
+}
+//------------------------------------------------------------------------------
+void OFieldDescGenWin::Resize()
+{
+ m_pFieldControl->SetPosSizePixel(Point(0,0),GetSizePixel());
+ m_pFieldControl->Resize();
+}
+//------------------------------------------------------------------------------
+void OFieldDescGenWin::SetReadOnly( sal_Bool bReadOnly )
+{
+ DBG_CHKTHIS(OFieldDescGenWin,NULL);
+
+ m_pFieldControl->SetReadOnly(bReadOnly);
+}
+//------------------------------------------------------------------------------
+String OFieldDescGenWin::GetControlText( sal_uInt16 nControlId )
+{
+ DBG_CHKTHIS(OFieldDescGenWin,NULL);
+ return m_pFieldControl->GetControlText(nControlId);
+}
+//------------------------------------------------------------------------------
+void OFieldDescGenWin::SetControlText( sal_uInt16 nControlId, const String& rText )
+{
+ DBG_CHKTHIS(OFieldDescGenWin,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Texte der Controls setzen
+ m_pFieldControl->SetControlText(nControlId,rText);
+}
+//------------------------------------------------------------------------------
+void OFieldDescGenWin::DisplayData( OFieldDescription* pFieldDescr )
+{
+ DBG_CHKTHIS(OFieldDescGenWin,NULL);
+
+ m_pFieldControl->DisplayData(pFieldDescr);
+}
+//------------------------------------------------------------------------------
+OTableEditorCtrl* OFieldDescGenWin::GetEditorCtrl()
+{
+ DBG_CHKTHIS(OFieldDescGenWin,NULL);
+ OTableDesignView* pDesignWin = static_cast<OTableDesignView*>(GetParent()->GetParent());
+ return pDesignWin->GetEditorCtrl();
+}
+//------------------------------------------------------------------------------
+//short OFieldDescGenWin::GetFormatCategory(OFieldDescription* pFieldDescr)
+//{
+// return m_pFieldControl->GetFormatCategory(pFieldDescr);
+//}
+//------------------------------------------------------------------------------
+void OFieldDescGenWin::ActivatePropertyField(sal_uInt16 nVirtualField)
+{
+ m_pFieldControl->ActivatePropertyField(nVirtualField);
+}
+//------------------------------------------------------------------------------
+void OFieldDescGenWin::SaveData( OFieldDescription* pFieldDescr )
+{
+ DBG_CHKTHIS(OFieldDescGenWin,NULL);
+ m_pFieldControl->SaveData(pFieldDescr);
+}
+//------------------------------------------------------------------------------
+sal_Bool OFieldDescGenWin::ChildHasFocus()
+{
+ DBG_CHKTHIS(OFieldDescGenWin,NULL);
+
+ return m_pFieldControl->ChildHasFocus();
+}
+//------------------------------------------------------------------------------
+void OFieldDescGenWin::GetFocus()
+{
+ DBG_CHKTHIS(OFieldDescGenWin,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Setzt den Focus auf das zuletzt aktive Control
+ TabPage::GetFocus();
+ m_pFieldControl->GetFocus();
+
+}
+//------------------------------------------------------------------------------
+void OFieldDescGenWin::LoseFocus()
+{
+ DBG_CHKTHIS(OFieldDescGenWin,NULL);
+ m_pFieldControl->LoseFocus();
+ TabPage::LoseFocus();
+}
+//------------------------------------------------------------------
+String OFieldDescGenWin::BoolStringPersistent(const String& rUIString) const
+{
+ return m_pFieldControl->BoolStringPersistent(rUIString);
+}
+
+//------------------------------------------------------------------
+String OFieldDescGenWin::BoolStringUI(const String& rPersistentString) const
+{
+ return m_pFieldControl->BoolStringUI(rPersistentString);
+}
+// -----------------------------------------------------------------------------
+
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
new file mode 100644
index 000000000000..dd2384396f64
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * $RCSfile: FieldDescGenWin.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:24:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX
+#define DBAUI_TABLEFIELDDESCGENPAGE_HXX
+
+#ifndef _SV_TABPAGE_HXX
+#include <vcl/tabpage.hxx>
+#endif
+
+
+namespace dbaui
+{
+ class OTableDesignHelpBar;
+ class OFieldDescription;
+ class OTableFieldControl;
+ class OTableEditorCtrl;
+ //==================================================================
+ class OFieldDescGenWin : public TabPage
+ {
+
+ OTableFieldControl *m_pFieldControl;
+ protected:
+ virtual void Resize();
+
+ public:
+ OFieldDescGenWin( Window* pParent, OTableDesignHelpBar* pHelpBar );
+ virtual ~OFieldDescGenWin();
+
+ virtual void GetFocus();
+ virtual void LoseFocus();
+ virtual void Init();
+
+ void DisplayData( OFieldDescription* pFieldDescr );
+ void SaveData( OFieldDescription* pFieldDescr );
+ BOOL ChildHasFocus();
+ void SetControlText( USHORT nControlId, const String& rText );
+ String GetControlText( USHORT nControlId );
+ void SetReadOnly( BOOL bReadOnly );
+ OTableEditorCtrl* GetEditorCtrl();
+
+ // short GetFormatCategory(OFieldDescription* pFieldDescr);
+ // liefert zum am Feld eingestellten Format einen der CAT_xxx-Werte (CAT_NUMBER, CAT_DATE ...)
+ void ActivatePropertyField(USHORT nVirtualField);
+ // Parameter ist einer der FIELD_PROPERTY_xxx-Werte, das entsprechende Control wird aktiviert, wenn vorhanden
+
+ String BoolStringPersistent(const String& rUIString) const;
+ String BoolStringUI(const String& rPersistentString) const;
+ };
+}
+#endif // DBAUI_TABLEFIELDDESCGENPAGE_HXX
+
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
new file mode 100644
index 000000000000..2eb3cce26225
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * $RCSfile: FieldDescriptions.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:26:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include "FieldDescriptions.hxx"
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+#ifndef _DBAUI_MODULE_DBU_HXX_
+#include "moduledbu.hxx"
+#endif
+#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
+#include <com/sun/star/sdbc/ColumnValue.hpp>
+#endif
+
+using namespace dbaui;
+using namespace ::com::sun::star::sdbc;
+
+//========================================================================
+// class OFieldDescription
+//========================================================================
+DBG_NAME(OFieldDescription);
+//------------------------------------------------------------------------------
+OFieldDescription::OFieldDescription() :
+ m_bIsPrimaryKey(sal_False)
+ ,m_nFormatKey(0)
+ ,m_bIsAutoIncrement(sal_False)
+ ,m_eHorJustify(SVX_HOR_JUSTIFY_STANDARD)
+ ,m_nScale(0)
+ ,m_nPrecision(0)
+ ,m_pType(NULL)
+ ,m_nIsNullable(ColumnValue::NULLABLE)
+{
+ DBG_CTOR(OFieldDescription,NULL);
+}
+
+//------------------------------------------------------------------------------
+OFieldDescription::OFieldDescription( const OFieldDescription& rDescr ) :
+ m_sName(rDescr.m_sName)
+ ,m_sTypeName(rDescr.m_sTypeName)
+ ,m_sDescription(rDescr.m_sDescription)
+ ,m_sDefaultValue(rDescr.m_sDefaultValue)
+ ,m_pType(rDescr.m_pType)
+ ,m_nPrecision(rDescr.m_nPrecision)
+ ,m_nScale(rDescr.m_nScale)
+ ,m_nIsNullable(rDescr.m_nIsNullable)
+ ,m_nFormatKey(rDescr.m_nFormatKey)
+ ,m_eHorJustify(rDescr.m_eHorJustify)
+ ,m_bIsAutoIncrement(rDescr.m_bIsAutoIncrement)
+ ,m_bIsPrimaryKey(rDescr.m_bIsPrimaryKey)
+{
+ DBG_CTOR(OFieldDescription,NULL);
+}
+
+//------------------------------------------------------------------------------
+OFieldDescription::~OFieldDescription()
+{
+ DBG_DTOR(OFieldDescription,NULL);
+}
+//------------------------------------------------------------------------------
+
+
+
+
+
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
new file mode 100644
index 000000000000..da5e8d8862db
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -0,0 +1,1692 @@
+/*************************************************************************
+ *
+ * $RCSfile: TEditControl.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:25:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEEDITORCONTROL_HXX
+#include "TEditControl.hxx"
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
+#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTYPES_HPP_
+#include <com/sun/star/util/XNumberFormatTypes.hpp>
+#endif
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
+#include "dbustrings.hrc"
+#endif
+#ifndef _SV_CLIP_HXX
+#include <vcl/clip.hxx>
+#endif
+#ifndef DBACCESS_UI_BROWSER_ID_HXX
+#include "browserids.hxx"
+#endif
+#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include "dbaccess_helpid.hrc"
+#endif
+#ifndef DBAUI_TABLEDESCRIPTIONWINDOW_HXX
+#include "TableDescWin.hxx"
+#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+#ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
+#include "FieldDescControl.hxx"
+#endif
+#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include "FieldDescriptions.hxx"
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef DBAUI_TABLEUNDO_HXX
+#include "TableUndo.hxx"
+#endif
+#ifndef _CONNECTIVITY_DBTOOLS_HXX_
+#include <connectivity/dbtools.hxx>
+#endif
+
+using namespace dbaui;
+using namespace comphelper;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::sdb;
+
+namespace dbaui
+{
+ extern String GetTypeString( sal_uInt16 nType );
+}
+//==============================================================================
+
+// TYPEINIT1(OTableEditorCtrl, DBView);
+DBG_NAME(OTableEditorCtrl);
+
+//==============================================================================
+
+#define HANDLE_ID 0
+
+// Anzahl Spalten beim Neuanlegen
+#define NEWCOLS 128
+
+// default Spaltenbreiten
+#define FIELDNAME_WIDTH 100
+#define FIELDTYPE_WIDTH 150
+#define FIELDDESCR_WIDTH 300
+
+// Maximale Eingabelaenge im Beschreibungsfeld
+#define MAX_DESCR_LEN 256
+
+
+#define CONTROL_SPACING_X 18 // 6
+#define CONTROL_SPACING_Y 5
+#define CONTROL_HEIGHT 20
+#define CONTROL_WIDTH_1 140 // 100
+#define CONTROL_WIDTH_2 100 // 60
+#define CONTROL_WIDTH_3 250
+#define CONTROL_WIDTH_4 (CONTROL_WIDTH_3 - CONTROL_HEIGHT - 5)
+
+//==================================================================
+//------------------------------------------------------------------
+OTableEditorCtrl::ClipboardInvalidator::ClipboardInvalidator(sal_uInt32 nTimeout,OTableEditorCtrl* _pOwner)
+: m_pOwner(_pOwner)
+{
+ m_aInvalidateTimer.SetTimeout(nTimeout);
+ m_aInvalidateTimer.SetTimeoutHdl(LINK(this, OTableEditorCtrl::ClipboardInvalidator, OnInvalidate));
+ m_aInvalidateTimer.Start();
+}
+
+//------------------------------------------------------------------
+OTableEditorCtrl::ClipboardInvalidator::~ClipboardInvalidator()
+{
+ m_aInvalidateTimer.Stop();
+}
+
+//------------------------------------------------------------------
+IMPL_LINK(OTableEditorCtrl::ClipboardInvalidator, OnInvalidate, void*, EMPTYARG)
+{
+ m_pOwner->GetView()->getController()->InvalidateFeature(SID_CUT);
+ m_pOwner->GetView()->getController()->InvalidateFeature(SID_COPY);
+ m_pOwner->GetView()->getController()->InvalidateFeature(SID_PASTE);
+ return 0L;
+}
+
+//==================================================================
+void OTableEditorCtrl::Init()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ OTableRowView::Init();
+
+ //////////////////////////////////////////////////////////////////////
+ // Soll der Entwurf ReadOnly geoeffnet werden ?
+ sal_Bool bRead(GetView()->getController()->isReadOnly());
+ Reference<XPropertySet> xTable = GetView()->getController()->getTable();
+ if(xTable.is() && !(xTable->getPropertySetInfo()->getPropertyByName(PROPERTY_NAME).Attributes & PropertyAttribute::READONLY))
+ {
+ Reference< XDatabaseMetaData> xMetaData = GetView()->getController()->getConnection()->getMetaData();
+ bRead = xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn();
+ }
+
+
+ SetReadOnly( bRead );
+
+ //////////////////////////////////////////////////////////////////////
+ // Spalten einfuegen
+ String aColumnName( ModuleRes(STR_TAB_FIELD_NAME) );
+ InsertDataColumn( 1, aColumnName, FIELDNAME_WIDTH );
+
+ aColumnName = String( ModuleRes(STR_TAB_FIELD_DATATYPE) );
+ InsertDataColumn( 2, aColumnName, FIELDTYPE_WIDTH );
+
+ aColumnName = String( ModuleRes(STR_TAB_FIELD_DESCR) );
+ InsertDataColumn( 3, aColumnName, FIELDDESCR_WIDTH );
+
+ InitCellController();
+
+ //////////////////////////////////////////////////////////////////////
+ // Zeilen einfuegen
+ RowInserted(0, m_pRowList->size(), sal_True);
+}
+
+//==================================================================
+void OTableEditorCtrl::UpdateAll()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ RowRemoved(0, GetRowCount(), sal_False);
+ m_nDataPos = 0;
+
+ GetView()->getController()->InvalidateFeature(SID_UNDO);
+ GetView()->getController()->InvalidateFeature(SID_REDO);
+ GetView()->getController()->InvalidateFeature(SID_SAVEDOC);
+ Invalidate();
+}
+//==================================================================
+OTableEditorCtrl::OTableEditorCtrl(Window* pWindow)
+ :OTableRowView(pWindow)
+ ,m_aInvalidate(500,this)
+ ,pNameCell(NULL)
+ ,pTypeCell(NULL)
+ ,pDescrCell(NULL)
+ ,nIndexEvent(0)
+ ,nOldDataPos(-1)
+ ,bSaveOnMove(sal_True)
+ ,nCutEvent(0)
+ ,nPasteEvent(0)
+ ,nDeleteEvent(0)
+ ,nInsNewRowsEvent(0)
+ ,nInvalidateTypeEvent(0)
+ ,nEntryNotFoundEvent(0)
+ ,bReadOnly(sal_True)
+ ,pActRow(NULL)
+ ,pDescrWin(NULL)
+{
+ DBG_CTOR(OTableEditorCtrl,NULL);
+
+ SetHelpId(HID_TABDESIGN_BACKGROUND);
+ GetDataWindow().SetHelpId(HID_CTL_TABLEEDIT);
+
+ //////////////////////////////////////////////////////////////////////
+ // Clipboard Format registrieren
+ Clipboard::Clear();
+ m_nClipboardFormat = Clipboard::RegisterFormatName( String::CreateFromAscii("Tabed") );
+ m_pRowList = GetView()->getController()->getRows();
+ m_nDataPos = 0;
+}
+
+//------------------------------------------------------------------------------
+BOOL OTableEditorCtrl::IsReadOnly()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ return bReadOnly;
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::SetReadOnly( sal_Bool bRead )
+{
+ // nix zu tun ?
+ if (bRead == IsReadOnly())
+ // diese Abfrage ist wichtig, da die zugrundeliegende Def sonst im folgenden gelockt oder ge-unlocked wird, obwohl es
+ // nicht notwendig waere (und was schlimmer ist, das wuerde dann auch nicht wieder rueckgaengig gemacht)
+ return;
+
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ bReadOnly = bRead;
+
+ //////////////////////////////////////////////////////////////////////
+ // Aktive Zelle disablen
+ long nRow(GetCurRow());
+ sal_uInt16 nCol(GetCurColumnId());
+ DeactivateCell();
+
+ //////////////////////////////////////////////////////////////////////
+ // ::com::sun::star::beans::Property Controls disablen
+ if (pDescrWin)
+ pDescrWin->SetReadOnly(bReadOnly || !SetDataPtr(nRow) || GetActRow()->IsReadOnly());
+
+ //////////////////////////////////////////////////////////////////////
+ // Cursor des Browsers anpassen
+ BrowserMode nMode(BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION |
+ BROWSER_HLINESFULL | BROWSER_VLINESFULL|BROWSER_AUTOSIZE_LASTCOL);
+ if( !bReadOnly )
+ nMode |= BROWSER_HIDECURSOR;
+ SetMode(nMode);
+
+ if( !bReadOnly )
+ ActivateCell( nRow, nCol );
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::InitCellController()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Zelle Feldname
+ pNameCell = new Edit( &GetDataWindow(), WB_LEFT );
+ Reference< XDatabaseMetaData> xMetaData = GetView()->getController()->getConnection()->getMetaData();
+
+ xub_StrLen nMaxTextLen((xub_StrLen)xMetaData->getMaxColumnNameLength());
+
+ if( nMaxTextLen == 0 )
+ nMaxTextLen = USHRT_MAX; // TODO : need xub_MaxStrLen or something like that
+ pNameCell->SetMaxTextLen( nMaxTextLen );
+
+ //////////////////////////////////////////////////////////////////////
+ // Zelle Typ
+ pTypeCell = new DbListBoxCtrl( &GetDataWindow() );
+
+ //////////////////////////////////////////////////////////////////////
+ // Zelle Beschreibung
+ pDescrCell = new Edit( &GetDataWindow(), WB_LEFT );
+ pDescrCell->SetMaxTextLen( MAX_DESCR_LEN );
+
+ pNameCell->SetHelpId(HID_TABDESIGN_NAMECELL);
+ pTypeCell->SetHelpId(HID_TABDESIGN_TYPECELL);
+ pDescrCell->SetHelpId(HID_TABDESIGN_COMMENTCELL);
+
+ ClearModified();
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::ClearModified()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ pNameCell->ClearModifyFlag();
+ pDescrCell->ClearModifyFlag();
+ pTypeCell->SaveValue();
+}
+
+//------------------------------------------------------------------------------
+OTableEditorCtrl::~OTableEditorCtrl()
+{
+ DBG_DTOR(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Undo-Manager zuruecksetzen
+ GetUndoManager()->Clear();
+
+ //////////////////////////////////////////////////////////////////////
+ // Moegliche Events aus Queue entfernen
+ if( nCutEvent )
+ Application::RemoveUserEvent( nCutEvent );
+ if( nPasteEvent )
+ Application::RemoveUserEvent( nPasteEvent );
+ if( nDeleteEvent )
+ Application::RemoveUserEvent( nDeleteEvent );
+ if( nInsNewRowsEvent )
+ Application::RemoveUserEvent( nInsNewRowsEvent );
+ if( nInvalidateTypeEvent )
+ Application::RemoveUserEvent( nInvalidateTypeEvent );
+ if( nEntryNotFoundEvent )
+ Application::RemoveUserEvent( nEntryNotFoundEvent );
+
+ //////////////////////////////////////////////////////////////////////
+ // Controltypen zerstoeren
+ delete pNameCell;
+ delete pTypeCell;
+ delete pDescrCell;
+ ::std::vector<OTableRow*>::iterator aIter = m_aClipboardList.begin();
+ for(;aIter != m_aClipboardList.end();++aIter)
+ delete *aIter;
+
+ m_aClipboardList.clear();
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::SetDataPtr( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ if(nRow == -1)
+ return sal_False;
+
+ OSL_ENSURE((xub_StrLen)nRow < m_pRowList->size(),"Row is greater than size!");
+ pActRow = (*m_pRowList)[nRow];
+ return pActRow != NULL;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::SeekRow(long _nRow)
+{
+ // die Basisklasse braucht den Aufruf, da sie sich dort merkt, welche Zeile gepainted wird
+ DbBrowseBox::SeekRow(_nRow);
+
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ m_nCurrentPos = _nRow;
+ return SetDataPtr(_nRow);
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
+ sal_uInt16 nColumnId ) const
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ String aText( GetCellText( m_nCurrentPos, nColumnId ));
+ Point aPos(rRect.TopLeft());
+ Size TxtSize(GetDataWindow().GetTextWidth(aText), GetDataWindow().GetTextHeight());
+
+ if (aPos.X() < rRect.Right() || aPos.X() + TxtSize.Width() > rRect.Right() ||
+ aPos.Y() < rRect.Top() || aPos.Y() + TxtSize.Height() > rRect.Bottom())
+ rDev.SetClipRegion( rRect );
+
+ rDev.DrawText(aPos, aText);
+
+ if (rDev.IsClipRegion())
+ rDev.SetClipRegion();
+// rDev.DrawText(rRect.TopLeft(), aText);
+// rDev.SetClipRegion( );
+}
+
+//------------------------------------------------------------------------------
+DbCellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId)
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Wenn EditorCtrl ReadOnly ist, darf nicht editiert werden
+ Reference<XPropertySet> xTable = GetView()->getController()->getTable();
+ if (IsReadOnly() || ( xTable.is() &&
+ xTable->getPropertySetInfo()->hasPropertyByName(PROPERTY_TYPE) &&
+ ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW")))
+ return NULL;
+
+ //////////////////////////////////////////////////////////////////////
+ // Wenn Zeile ReadOnly ist, darf sie nicht editiert werden
+ SetDataPtr( nRow );
+ if( pActRow->IsReadOnly() )
+ return NULL;
+
+ OFieldDescription* pActFieldDescr = pActRow->GetActFieldDescr();
+ switch (nColumnId)
+ {
+ case FIELD_NAME:
+ return new DbEditCellController( pNameCell );
+ case FIELD_TYPE:
+ if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0))
+ return new DbListBoxCellController( pTypeCell );
+ else return NULL;
+ case FIELD_DESCR:
+ if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0))
+ return new DbEditCellController( pDescrCell );
+ else return NULL;
+ default:
+ return NULL;
+ }
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::InitController(DbCellControllerRef&, long nRow, sal_uInt16 nColumnId)
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ SeekRow( nRow == -1 ? GetCurRow() : nRow);
+ OFieldDescription* pActFieldDescr = pActRow->GetActFieldDescr();
+ String aInitString;
+
+ switch (nColumnId)
+ {
+ case FIELD_NAME:
+ if( pActFieldDescr )
+ aInitString = pActFieldDescr->GetName();
+ pNameCell->SetText( aInitString );
+ break;
+ case FIELD_TYPE:
+ {
+ if( pActFieldDescr )
+ aInitString = pActFieldDescr->getTypeInfo()->aUIName;
+
+ //////////////////////////////////////////////////////////////
+ // Anpassen des ComboBoxInhalts
+ pTypeCell->Clear();
+ if( !pActFieldDescr )
+ break;
+
+ const OTypeInfoMap* pTypeInfo = GetView()->getController()->getTypeInfo();
+ OTypeInfoMap::const_iterator aIter = pTypeInfo->begin();
+ for(;aIter != pTypeInfo->end();++aIter)
+ pTypeCell->InsertEntry( aIter->second->aUIName );
+ pTypeCell->SelectEntry( aInitString );
+ }
+
+ break;
+ case FIELD_DESCR:
+ if( pActFieldDescr )
+ aInitString = pActFieldDescr->GetDescription();
+ pDescrCell->SetText( aInitString );
+ break;
+
+ }
+}
+
+//------------------------------------------------------------------------------
+DbBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(long nRow) const
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ ( (OTableEditorCtrl*)this )->SetDataPtr( nRow );
+ if( !pActRow )
+ return DbBrowseBox::CLEAN;
+ if (nRow >= 0 && nRow == m_nDataPos)
+ {
+ if( pActRow->IsPrimaryKey() )
+ return DbBrowseBox::CURRENT_PRIMARYKEY;
+ return DbBrowseBox::CURRENT;
+ }
+ else
+ {
+ if( pActRow->IsPrimaryKey() )
+ return DbBrowseBox::PRIMARYKEY;
+ return DbBrowseBox::CLEAN;
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::SaveCurRow()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ if (GetFieldDescr(GetCurRow()) == NULL)
+ // in der Zeile, in der ich mich i.A. befinde, stehen keine Daten
+ return sal_True;
+ if (!SaveModified())
+ return sal_False;
+
+ SetDataPtr(GetCurRow());
+ pDescrWin->SaveData( pActRow->GetActFieldDescr() );
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::DisplayData(long nRow, sal_Bool bGrabFocus)
+{
+ // zur richtigen Zelle fahren
+ SetDataPtr(nRow);
+
+ // Editier-Modus temporaer aus
+ sal_Bool bWasEditing = IsEditing();
+ if (bWasEditing)
+ DeactivateCell();
+
+ DbCellControllerRef aTemp;
+ InitController(aTemp, nRow, FIELD_NAME);
+ InitController(aTemp, nRow, FIELD_TYPE);
+ InitController(aTemp, nRow, FIELD_DESCR);
+
+ GoToRow(nRow);
+ // das Description-Window aktualisieren
+ GetView()->GetDescWin()->DisplayData(GetFieldDescr(nRow));
+ // neu zeichnen
+ RowModified(nRow);
+
+ // wieder an
+ if (bWasEditing || bGrabFocus)
+ ActivateCell(nRow, GetCurColumnId(), bGrabFocus);
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::CursorMoved()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Zeilenwechsel ?
+ m_nDataPos = GetCurRow();
+ if( m_nDataPos != nOldDataPos && m_nDataPos != -1)
+ {
+ DbCellControllerRef aTemp;
+ InitController(aTemp,m_nDataPos,FIELD_NAME);
+ InitController(aTemp,m_nDataPos,FIELD_TYPE);
+ InitController(aTemp,m_nDataPos,FIELD_DESCR);
+ }
+
+ OTableRowView::CursorMoved();
+}
+
+//------------------------------------------------------------------------------
+sal_Int32 OTableEditorCtrl::HasFieldName( const String& rFieldName )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+
+ Reference< XDatabaseMetaData> xMetaData = GetView()->getController()->getConnection()->getMetaData();
+
+ ::comphelper::UStringMixEqual bCase(xMetaData->storesMixedCaseQuotedIdentifiers());
+
+ ::std::vector<OTableRow*>::iterator aIter = m_pRowList->begin();
+ OFieldDescription* pFieldDescr;
+ sal_Int32 nCount(0);
+ for(;aIter != m_pRowList->end();++aIter)
+ {
+ pFieldDescr = (*aIter)->GetActFieldDescr();
+ if( pFieldDescr && bCase(rFieldName,pFieldDescr->GetName()))
+ nCount++;
+ }
+ return nCount;
+}
+// --------------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId)
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////
+ // Zellinhalte in Datenstruktur speichern
+ SetDataPtr( nRow == -1 ? GetCurRow() : nRow);
+ OFieldDescription* pActFieldDescr = pActRow->GetActFieldDescr();
+
+ switch( nColId)
+ {
+ //////////////////////////////////////////////////////////////
+ // Speichern Inhalt NameCell
+ case FIELD_NAME:
+ {
+ //////////////////////////////////////////////////////////////
+ // Wenn kein Name, nichts machen
+ String aName(pNameCell->GetText());
+
+ if( !aName.Len() )
+ {
+ //////////////////////////////////////////////////////////////
+ // Wenn FieldDescr existiert, wurde Feld geloescht und alter Inhalt wird wiederhergestellt
+ if (pActFieldDescr)
+ {
+ SwitchType(NULL);
+ pActFieldDescr = pActRow->GetActFieldDescr();
+ }
+ else
+ return sal_True;
+ }
+ if(pActFieldDescr)
+ pActFieldDescr->SetName( aName );
+ pNameCell->ClearModifyFlag();
+
+ break;
+ }
+
+ //////////////////////////////////////////////////////////////
+ // Speichern Inhalt TypeCell
+ case FIELD_TYPE:
+ break;
+
+ //////////////////////////////////////////////////////////////
+ // Speichern Inhalt DescrCell
+ case FIELD_DESCR:
+ {
+ //////////////////////////////////////////////////////////////
+ // Wenn aktuelle Feldbeschreibung NULL, Default setzen
+ if( !pActFieldDescr )
+ pDescrCell->SetText(String());
+ else
+ pActFieldDescr->SetDescription( pDescrCell->GetText() );
+ break;
+ }
+ case FIELD_PROPERTY_DEFAULT:
+ case FIELD_PROPERTY_REQUIRED:
+ case FIELD_PROPERTY_TEXTLEN:
+ case FIELD_PROPERTY_NUMTYPE:
+ case FIELD_PROPERTY_AUTOINC:
+ case FIELD_PROPERTY_LENGTH:
+ case FIELD_PROPERTY_SCALE:
+ case FIELD_PROPERTY_BOOL_DEFAULT:
+ pDescrWin->SaveData(pActFieldDescr);
+ break;
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::SaveModified()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ sal_uInt16 nColId = GetCurColumnId();
+
+ switch( nColId )
+ {
+ //////////////////////////////////////////////////////////////
+ // NameCell
+ case FIELD_NAME:
+ {
+ // removed the former duplicate-check. this is done in OTableDocShell::CheckDefConsistency now.
+ // FS - 07.12.99 - 69575
+
+ } break;
+
+ //////////////////////////////////////////////////////////////
+ // TypeCell
+ case FIELD_TYPE:
+ {
+ //////////////////////////////////////////////////////////////////////
+ // Type umstellen
+ SwitchType(GetView()->getController()->getTypeInfo(pTypeCell->GetSelectEntryPos()));
+ } break;
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::CursorMoving(long nNewRow, sal_uInt16 nNewCol)
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+
+ if (!DbBrowseBox::CursorMoving(nNewRow, nNewCol))
+ return sal_False;
+
+ //////////////////////////////////////////////////////////////////////
+ // Wird nach SaveModified() gerufen, aktuelle Zeile ist noch die alte
+ m_nDataPos = nNewRow;
+ nOldDataPos = GetCurRow();
+
+ //////////////////////////////////////////////////////////////////////
+ // Marker umsetzen
+ InvalidateStatusCell( nOldDataPos );
+ InvalidateStatusCell( m_nDataPos );
+
+ //////////////////////////////////////////////////////////////////////
+ // Daten des Propertyfensters speichern
+ if( SetDataPtr(nOldDataPos) && pDescrWin)
+ pDescrWin->SaveData( pActRow->GetActFieldDescr() );
+
+ //////////////////////////////////////////////////////////////////////
+ // Neue Daten im Propertyfenster anzeigen
+ if( SetDataPtr(m_nDataPos) && pDescrWin)
+ pDescrWin->DisplayData( pActRow->GetActFieldDescr() );
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK( OTableEditorCtrl, InvalidateFieldType, void*, EMPTYTAG )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ nInvalidateTypeEvent = 0;
+ Invalidate( GetFieldRectPixel(nOldDataPos, FIELD_TYPE) );
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK( OTableEditorCtrl, EntryNotFound, void*, EMPTYTAG )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ nEntryNotFoundEvent = 0;
+ ErrorBox( this, ModuleRes(ERR_INVALID_LISTBOX_ENTRY) ).Execute();
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+
+ //////////////////////////////////////////////////////////////
+ // Wenn aktuelle Feldbeschreibung NULL, Default setzen
+ if(nRow == -1)
+ nRow = GetCurRow();
+ SetDataPtr( nRow );
+ OFieldDescription* pActFieldDescr = pActRow->GetActFieldDescr();
+ if (!pActFieldDescr)
+ {
+ pActRow->SetFieldType( GetView()->getController()->getTypeInfoByType(DataType::VARCHAR) );
+ nInvalidateTypeEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, InvalidateFieldType) );
+ pActFieldDescr = pActRow->GetActFieldDescr();
+ pDescrWin->DisplayData( pActFieldDescr );
+ GetUndoManager()->AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, NULL) );
+ }
+
+ if( nColId != FIELD_TYPE )
+ GetUndoManager()->AddUndoAction( new OTableDesignCellUndoAct(this, nRow, nColId) );
+ else
+ {
+ GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo()));
+ SwitchType( GetView()->getController()->getTypeInfo(pTypeCell->GetSelectEntryPos()) );
+ }
+
+ SaveData(nRow,nColId);
+ RowModified(nRow);
+ DbCellControllerRef xController(Controller());
+ if(xController.Is())
+ xController->SetModified();
+
+ //////////////////////////////////////////////////////////////////////
+ // Das ModifyFlag setzen
+ GetView()->getController()->setModified( sal_True );
+ GetView()->getController()->InvalidateFeature(SID_SAVEDOC);
+ GetView()->getController()->InvalidateFeature(SID_UNDO);
+ GetView()->getController()->InvalidateFeature(SID_REDO);
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::CellModified()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ CellModified( GetCurRow(), GetCurColumnId() );
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::Undo()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+
+ GetView()->getController()->InvalidateFeature(SID_UNDO);
+ GetView()->getController()->InvalidateFeature(SID_REDO);
+ GetView()->getController()->InvalidateFeature(SID_SAVEDOC);
+}
+
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::Redo()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+
+ GetView()->getController()->InvalidateFeature(SID_UNDO);
+ GetView()->getController()->InvalidateFeature(SID_REDO);
+ GetView()->getController()->InvalidateFeature(SID_SAVEDOC);
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::CopyRows()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Alte ClipboardListe loeschen
+ ::std::vector<OTableRow*>::iterator aIter = m_aClipboardList.begin();
+ for(;aIter != m_aClipboardList.end();++aIter)
+ delete *aIter;
+
+ m_aClipboardList.clear();
+
+ //////////////////////////////////////////////////////////////////////
+ // Sichergehen, dass Daten aus dem PropertyWin schon gespeichert sind.
+ if( SetDataPtr(m_nDataPos) )
+ pDescrWin->SaveData( pActRow->GetActFieldDescr() );
+
+ //////////////////////////////////////////////////////////////////////
+ // Selektierte Zeilen in die ClipboardListe kopieren
+ OTableRow* pClipboardRow;
+ OTableRow* pRow;
+
+ for( long nIndex=FirstSelectedRow(); nIndex>=0; nIndex=NextSelectedRow() )
+ {
+ pRow = (*m_pRowList)[nIndex];
+ pClipboardRow = new OTableRow( *pRow );
+ m_aClipboardList.push_back( pClipboardRow);
+ }
+
+ if( m_aClipboardList.size() )
+ m_bClipboardFilled = sal_True;
+}
+
+//------------------------------------------------------------------------------
+String OTableEditorCtrl::GenerateName( const String& rName )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Basisnamen zum Anhaengen einer Numerierung erstellen
+ String aBaseName;
+ Reference< XDatabaseMetaData> xMetaData = GetView()->getController()->getConnection()->getMetaData();
+ xub_StrLen nMaxTextLen((xub_StrLen)xMetaData->getMaxColumnNameLength());
+
+ if( (rName.Len()+2) >nMaxTextLen )
+ aBaseName = rName.Copy( 0, nMaxTextLen-2 );
+ else
+ aBaseName = rName;
+
+ //////////////////////////////////////////////////////////////////////
+ // Namen durchnumerieren (bis 99)
+ String aFieldName( rName);
+ sal_Int32 i=1;
+ while( HasFieldName(aFieldName) )
+ {
+ aFieldName = aBaseName;
+ aFieldName += String::CreateFromInt32(i);
+ i++;
+ }
+
+ return aFieldName;
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::InsertRows( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Zeilen aus der Clipboardliste in die Datenstruktur einfgen
+ long nInsertRow = nRow;
+ String aFieldName;
+ OTableRow* pRow;
+ ::std::vector<OTableRow*>::const_iterator aIter = m_aClipboardList.begin();
+ for(;aIter != m_aClipboardList.end();++aIter)
+ {
+ pRow = new OTableRow( **aIter );
+ pRow->SetReadOnly( sal_False );
+
+ //////////////////////////////////////////////////////////////////////
+ // Anpassen des Feldnamens
+ aFieldName = GenerateName( pRow->GetActFieldDescr()->GetName() );
+ pRow->GetActFieldDescr()->SetName( aFieldName );
+
+ m_pRowList->insert( m_pRowList->begin()+nInsertRow,pRow );
+ nInsertRow++;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Beim RowInserted wird CursorMoved gerufen.
+ // Die UI-Daten duerfen hier beim CursorMoved nicht gespeichert werden.
+ bSaveOnMove = sal_False;
+ RowInserted( nRow,m_aClipboardList.size() ,sal_True );
+ bSaveOnMove = sal_True;
+
+ //////////////////////////////////////////////////////////////////////
+ // Undo-Action erzeugen
+ GetUndoManager()->AddUndoAction( new OTableEditorInsUndoAct(this, nRow) );
+ GetView()->getController()->setModified( sal_True );
+ GetView()->getController()->InvalidateFeature(SID_UNDO);
+ GetView()->getController()->InvalidateFeature(SID_REDO);
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::DeleteRows()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Undo-Action erzeugen
+ GetUndoManager()->AddUndoAction( new OTableEditorDelUndoAct(this) );
+
+
+ //////////////////////////////////////////////////////////////////////
+ // Alle markierten Zeilen loeschen
+ long nIndex = FirstSelectedRow();
+ nOldDataPos = nIndex;
+ bSaveOnMove = sal_False;
+
+ while( nIndex >= 0 )
+ {
+ //////////////////////////////////////////////////////////////////////
+ // Zeile entfernen
+ delete (*m_pRowList)[nIndex];
+ m_pRowList->erase( m_pRowList->begin()+nIndex );
+ RowRemoved( nIndex, 1, sal_True );
+
+ //////////////////////////////////////////////////////////////////////
+ // Leerzeile am Ende wieder einfuegen
+ m_pRowList->push_back( new OTableRow());
+ RowInserted( GetRowCount()-1, 1, sal_True );
+
+ nIndex = FirstSelectedRow();
+ }
+
+ bSaveOnMove = sal_True;
+
+ //////////////////////////////////////////////////////////////////////
+ // Erzwingen, dass der aktuelle Datensatz angezeigt wird
+ m_nDataPos = GetCurRow();
+ InvalidateStatusCell( nOldDataPos );
+ InvalidateStatusCell( m_nDataPos );
+ SetDataPtr( m_nDataPos );
+ ActivateCell();
+ pDescrWin->DisplayData( pActRow->GetActFieldDescr() );
+ GetView()->getController()->setModified( sal_True );
+ GetView()->getController()->InvalidateFeature(SID_UNDO);
+ GetView()->getController()->InvalidateFeature(SID_REDO);
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::InsertNewRows( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Undo-Action erzeugen
+ long nInsertRows = GetSelectRowCount();
+ if( !nInsertRows )
+ nInsertRows = 1;
+ GetUndoManager()->AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) );
+ //////////////////////////////////////////////////////////////////////
+ // Zahl der selektierten Zeilen werden neu eingefuegt
+ for( long i=nRow; i<(nRow+nInsertRows); i++ )
+ m_pRowList->insert( m_pRowList->begin()+i ,new OTableRow());
+ RowInserted( nRow, nInsertRows, sal_True );
+
+ GetView()->getController()->setModified( sal_True );
+ GetView()->getController()->InvalidateFeature(SID_UNDO);
+ GetView()->getController()->InvalidateFeature(SID_REDO);
+}
+
+//------------------------------------------------------------------------------
+String OTableEditorCtrl::GetControlText( long nRow, sal_uInt16 nColId )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Controls des Browsers auslesen
+ if( nColId < FIELD_FIRST_VIRTUAL_COLUMN )
+ {
+ GoToRow( nRow );
+ GoToColumnId( nColId );
+ DbCellControllerRef xController = Controller();
+ if(xController.Is())
+ return xController->GetWindow().GetText();
+ else
+ return GetCellText(nRow,nColId);
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Controls der Tabpage Auslesen
+ else
+ return pDescrWin->GetControlText( nColId );
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::SetControlText( long nRow, sal_uInt16 nColId, const String& rText )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Controls des Browsers setzen
+ if( nColId < FIELD_FIRST_VIRTUAL_COLUMN )
+ {
+ GoToRow( nRow );
+ GoToColumnId( nColId );
+ DbCellControllerRef xController = Controller();
+ if(xController.Is())
+ xController->GetWindow().SetText( rText );
+ else
+ RowModified(nRow,nColId);
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Controls der Tabpage setzen
+ else
+ {
+ pDescrWin->SetControlText( nColId, rText );
+ }
+}
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::SetData( long nRow, sal_uInt16 nColId, const OTypeInfo* _pTypeInfo )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Aktuellen Datenzeiger umsetzen
+ if( nRow == -1 )
+ nRow = GetCurRow();
+ OFieldDescription* pFieldDescr = GetFieldDescr( nRow );
+ if( !pFieldDescr && nColId != FIELD_TYPE)
+ return;
+
+ String strYes(ModuleRes(STR_VALUE_YES));
+ String strNo(ModuleRes(STR_VALUE_NO));
+ //////////////////////////////////////////////////////////////////////
+ // Einzelne Felder setzen
+ switch( nColId )
+ {
+ case FIELD_TYPE:
+ SwitchType( _pTypeInfo );
+ break;
+ default:
+ OSL_ASSERT(0);
+ }
+ SetControlText(nRow,nColId,_pTypeInfo ? _pTypeInfo->aUIName : String());
+}
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::SetData( long nRow, sal_uInt16 nColId, const String& _rNewData )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Aktuellen Datenzeiger umsetzen
+ if( nRow == -1 )
+ nRow = GetCurRow();
+ OFieldDescription* pFieldDescr = GetFieldDescr( nRow );
+ if( !pFieldDescr && nColId != FIELD_TYPE)
+ return;
+
+ String strYes(ModuleRes(STR_VALUE_YES));
+ String strNo(ModuleRes(STR_VALUE_NO));
+ //////////////////////////////////////////////////////////////////////
+ // Einzelne Felder setzen
+ switch( nColId )
+ {
+ case FIELD_NAME:
+ pFieldDescr->SetName( _rNewData );
+ break;
+
+ case FIELD_TYPE:
+ OSL_ASSERT(0);
+ break;
+
+ case FIELD_DESCR:
+ pFieldDescr->SetDescription( _rNewData );
+ break;
+
+ case FIELD_PROPERTY_DEFAULT:
+ pFieldDescr->SetDefaultValue( _rNewData );
+ break;
+
+ case FIELD_PROPERTY_REQUIRED:
+ pFieldDescr->SetIsNullable( _rNewData.ToInt32() );
+ break;
+
+ case FIELD_PROPERTY_TEXTLEN:
+ case FIELD_PROPERTY_LENGTH:
+ pFieldDescr->SetPrecision( _rNewData.ToInt32() );
+ break;
+
+ case FIELD_PROPERTY_NUMTYPE:
+ // pFieldDescr->SetNumType( _rNewData );
+ OSL_ASSERT(0);
+ break;
+
+ case FIELD_PROPERTY_AUTOINC:
+ pFieldDescr->SetAutoIncrement(_rNewData.Equals(strYes));
+ break;
+ case FIELD_PROPERTY_SCALE:
+ pFieldDescr->SetScale(_rNewData.ToInt32());
+ break;
+
+ case FIELD_PROPERTY_BOOL_DEFAULT:
+ pFieldDescr->SetDefaultValue(GetView()->GetDescWin()->BoolStringPersistent(_rNewData));
+ break;
+
+ case FIELD_PROPERTY_FORMAT:
+ pFieldDescr->SetFormatKey(_rNewData.ToInt32());
+ break;
+ }
+
+ SetControlText(nRow,nColId,_rNewData);
+}
+
+//------------------------------------------------------------------------------
+String OTableEditorCtrl::GetData( long nRow, sal_uInt16 nColId )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ OFieldDescription* pFieldDescr = GetFieldDescr( nRow );
+ if( !pFieldDescr )
+ return String();
+
+ //////////////////////////////////////////////////////////////////////
+ // Aktuellen Datenzeiger umsetzen
+ if( nRow==-1 )
+ nRow = GetCurRow();
+ SetDataPtr( nRow );
+
+ static const String strYes(ModuleRes(STR_VALUE_YES));
+ static const String strNo(ModuleRes(STR_VALUE_NO));
+ //////////////////////////////////////////////////////////////////////
+ // Einzelne Felder auslesen
+ switch( nColId )
+ {
+ case FIELD_NAME:
+ return pFieldDescr->GetName();
+
+ case FIELD_TYPE:
+ return pFieldDescr->getTypeInfo()->aUIName;
+
+ case FIELD_DESCR:
+ return pFieldDescr->GetDescription();
+
+ case FIELD_PROPERTY_DEFAULT:
+ return pFieldDescr->GetDefaultValue();
+
+ case FIELD_PROPERTY_REQUIRED:
+ return pFieldDescr->GetIsNullable() == ColumnValue::NULLABLE ? strYes : strNo;
+
+ case FIELD_PROPERTY_TEXTLEN:
+ case FIELD_PROPERTY_LENGTH:
+ return String::CreateFromInt32(pFieldDescr->GetPrecision());
+
+ case FIELD_PROPERTY_NUMTYPE:
+ OSL_ASSERT(0);
+ // return pFieldDescr->GetNumType();
+
+ case FIELD_PROPERTY_AUTOINC:
+ return pFieldDescr->IsAutoIncrement() ? strYes : strNo;
+
+ case FIELD_PROPERTY_SCALE:
+ return String::CreateFromInt32(pFieldDescr->GetScale());
+
+ case FIELD_PROPERTY_BOOL_DEFAULT:
+ return GetView()->GetDescWin()->BoolStringUI(pFieldDescr->GetDefaultValue());
+
+ case FIELD_PROPERTY_FORMAT:
+ return String::CreateFromInt32(pFieldDescr->GetFormatKey());
+ }
+
+ return String();
+}
+
+//------------------------------------------------------------------------------
+String OTableEditorCtrl::GetCellText( long nRow, sal_uInt16 nColId ) const
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Text aus Dokumentdaten holen
+ return const_cast<OTableEditorCtrl*>(this)->GetData( nRow, nColId );
+}
+
+//------------------------------------------------------------------------------
+sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(long nRow, sal_uInt16 nColId) const
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ return GetDataWindow().GetTextWidth(GetCellText(nRow, nColId));
+}
+
+//------------------------------------------------------------------------------
+OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ sal_uInt16 nListCount(m_pRowList->size());
+ if( (nRow<0) || (nRow>=nListCount) )
+ {
+ OSL_ENSURE(0,"(nRow<0) || (nRow>=nListCount)");
+ return NULL;
+ }
+ OTableRow* pRow = (*m_pRowList)[ nRow ];
+ if( !pRow )
+ return NULL;
+ return pRow->GetActFieldDescr();
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ Reference<XPropertySet> xTable = GetView()->getController()->getTable();
+ if( !IsCopyAllowed(nRow) || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW")))
+ return sal_False;
+
+ return IsDeleteAllowed( nRow );
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::IsCopyAllowed( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ Reference<XPropertySet> xTable = GetView()->getController()->getTable();
+ if( !GetSelectRowCount() || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW")))
+ return sal_False;
+
+ //////////////////////////////////////////////////////////////////////
+ // Wenn eine der markierten Zeilen leer ist, kein Copy moeglich
+ OTableRow* pRow;
+ long nIndex = FirstSelectedRow();
+ while( nIndex >= 0 )
+ {
+ pRow = (*m_pRowList)[nIndex];
+ if( !pRow->GetActFieldDescr() )
+ return sal_False;
+
+ nIndex = NextSelectedRow();
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::IsPasteAllowed( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ Reference<XPropertySet> xTable = GetView()->getController()->getTable();
+ if( !m_bClipboardFilled || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW")))
+ return sal_False;
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::Cut()
+{
+ if (nCutEvent)
+ Application::RemoveUserEvent(nCutEvent);
+ nCutEvent = Application::PostUserEvent(LINK(this, OTableEditorCtrl, DelayedCut));
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::Copy()
+{
+ OTableRowView::Copy();
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::Paste()
+{
+ if( nPasteEvent )
+ Application::RemoveUserEvent( nPasteEvent );
+ nPasteEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedPaste) );
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::IsDeleteAllowed( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ Reference<XPropertySet> xTable = GetView()->getController()->getTable();
+ if( !GetSelectRowCount() || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW")))
+ return sal_False;
+
+ // Wenn nur Felder hinzugefuegt werden duerfen, Delete nur auf neuen Feldern
+ Reference< XDatabaseMetaData> xMetaData = GetView()->getController()->getConnection()->getMetaData();
+
+ return !(xTable.is() && xTable->getPropertySetInfo()->getPropertyByName(PROPERTY_NAME).Attributes & PropertyAttribute::READONLY) ||
+ ( xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn());
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::IsInsertNewAllowed( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ Reference<XPropertySet> xTable = GetView()->getController()->getTable();
+ if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW"))
+ return sal_False;
+ // table is new
+ if(!(xTable.is() && xTable->getPropertySetInfo()->getPropertyByName(PROPERTY_NAME).Attributes & PropertyAttribute::READONLY))
+ return sal_True;
+
+ Reference< XDatabaseMetaData> xMetaData = GetView()->getController()->getConnection()->getMetaData();
+ //////////////////////////////////////////////////////////////
+ // Wenn nur Felder geloescht werden duerfen, Paste disablen
+
+ if ( !xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn())
+ return sal_False;
+
+ //////////////////////////////////////////////////////////////
+ // Wenn nur Felder hinzugefuegt werden duerfen, Paste nur in neue Felder
+ if (xMetaData->supportsAlterTableWithAddColumn() && !xMetaData->supportsAlterTableWithDropColumn())
+ {
+ SetDataPtr(nRow);
+ if( GetActRow()->IsReadOnly() )
+ return sal_False;
+ }
+
+ return xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn();
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long nRow )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ if( !GetSelectRowCount() )
+ return sal_False;
+
+ //////////////////////////////////////////////////////////////
+ // Datenbank kann keine PrimKeys verarbeiten oder keine Zeilenselektion
+ Reference< XDatabaseMetaData> xMetaData = GetView()->getController()->getConnection()->getMetaData();
+ if(!xMetaData->supportsCoreSQLGrammar())
+ return sal_False;
+
+ //////////////////////////////////////////////////////////////
+ // Key darf nicht veraendert werden
+ // Dies gilt jedoch nur, wenn die Tabelle nicht neu ist und keine ::com::sun::star::sdbcx::View. Ansonsten wird kein DROP ausgefhrt
+ Reference<XPropertySet> xTable = GetView()->getController()->getTable();
+
+ sal_Bool bDropNotAllowed = sal_False;
+ if (!( xMetaData->supportsAlterTableWithDropColumn() ||
+ !(xTable.is() && xTable->getPropertySetInfo()->getPropertyByName(PROPERTY_NAME).Attributes & PropertyAttribute::READONLY)) &&
+ xMetaData->supportsAlterTableWithAddColumn() &&
+ (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) != ::rtl::OUString::createFromAscii("VIEW")))
+ bDropNotAllowed = sal_True;
+
+ //////////////////////////////////////////////////////////////
+ // Wenn leeres Feld, kein PrimKey
+ // Eintrag wird nur erlaubt, wenn
+ // - kein leerer Eintrag in der Selection ist
+ // - kein Eintrag vom Typ Memo oder Image ist
+ // - kein DROP erlaubt ist (s.o.) und die Spalte noch kein Required (not null) gesetzt hatte.
+ long nIndex = FirstSelectedRow();
+ OTableRow* pRow;
+ while( nIndex >= 0 )
+ {
+ pRow = (*m_pRowList)[nIndex];
+ OFieldDescription *pFieldDescr = pRow->GetActFieldDescr();
+ if(!pFieldDescr)
+ return sal_False;
+ else
+ {
+ //////////////////////////////////////////////////////////////
+ // Wenn Feldtyp Memo oder Image, kein PrimKey
+ // oder wenn Spalten nicht gedroped werden knnen und das Required Flag ist nicht gesetzt
+ // oder wenn eine ::com::sun::star::sdbcx::View vorhanden ist und das Required Flag nicht gesetzt ist
+ const OTypeInfo* pTypeInfo = pFieldDescr->getTypeInfo();
+ if( pTypeInfo->nSearchType == ColumnSearch::NONE ||
+ (bDropNotAllowed && pFieldDescr->IsNullable()) ||
+ (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW") &&
+ !(!pFieldDescr->IsNullable() || pFieldDescr->IsAutoIncrement())))
+ return sal_False;
+ }
+
+ nIndex = NextSelectedRow();
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::Command(const CommandEvent& rEvt)
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ switch (rEvt.GetCommand())
+ {
+ case COMMAND_CONTEXTMENU:
+ {
+ //////////////////////////////////////////////////////////////
+ // Falls kein MouseEvent, an Basisklasse weiterleiten
+ if (!rEvt.IsMouseEvent())
+ {
+ OTableRowView::Command(rEvt);
+ return;
+ }
+
+ //////////////////////////////////////////////////////////////
+ // Kontextmenu einblenden
+ if( !IsReadOnly() )
+ {
+ sal_uInt16 nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
+ long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
+
+ if ( nColId == HANDLE_ID )
+ {
+ PopupMenu aContextMenu(ModuleRes(RID_TABLEDESIGNROWPOPUPMENU));
+ long nSelectRowCount = GetSelectRowCount();
+ sal_Bool bRowsSelected(nSelectRowCount ? sal_True : sal_False);
+
+ aContextMenu.EnableItem( SID_CUT, IsCutAllowed(nRow) );
+ aContextMenu.EnableItem( SID_COPY, IsCopyAllowed(nRow) );
+ aContextMenu.EnableItem( SID_PASTE, IsPasteAllowed(nRow) );
+ aContextMenu.EnableItem( SID_DELETE, IsDeleteAllowed(nRow) );
+ aContextMenu.EnableItem( SID_TABLEDESIGN_TABED_PRIMARYKEY, IsPrimaryKeyAllowed(nRow) );
+ aContextMenu.EnableItem( SID_TABLEDESIGN_INSERTROWS, IsInsertNewAllowed(nRow) );
+ aContextMenu.CheckItem( SID_TABLEDESIGN_TABED_PRIMARYKEY, IsRowSelected(GetCurRow()) && IsPrimaryKey() );
+
+ // jetzt alles, was disabled wurde, wech
+ aContextMenu.RemoveDisabledEntries(sal_True, sal_True);
+
+ //////////////////////////////////////////////////////////////
+ // Alle Aktionen, die die Zeilenzahl veraendern, muessen asynchron
+ // ausgefuehrt werden->sonst Probleme zwischen Kontextmenu u. Browser
+ m_nDataPos = GetCurRow();
+ switch (aContextMenu.Execute(this, rEvt.GetMousePosPixel()))
+ {
+ case SID_CUT:
+ Cut();
+ break;
+ case SID_COPY:
+ Copy();
+ break;
+ case SID_PASTE:
+ Paste();
+ break;
+ case SID_DELETE:
+ if( nDeleteEvent )
+ Application::RemoveUserEvent( nDeleteEvent );
+ nDeleteEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedDelete) );
+ break;
+ case SID_TABLEDESIGN_INSERTROWS:
+ if( nInsNewRowsEvent )
+ Application::RemoveUserEvent( nInsNewRowsEvent );
+ nInsNewRowsEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedInsNewRows) );
+ break;
+ case SID_TABLEDESIGN_TABED_PRIMARYKEY:
+ SetPrimaryKey( !IsPrimaryKey() );
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ break;
+ default:
+ OTableRowView::Command(rEvt);
+ }
+
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK( OTableEditorCtrl, DelayedCut, void*, EMPTYTAG )
+{
+ nCutEvent = 0;
+ OTableRowView::Cut();
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK( OTableEditorCtrl, DelayedPaste, void*, EMPTYTAG )
+{
+ nPasteEvent = 0;
+
+ // die Zeile, bei der eigefuegt werden wuerde
+ sal_Int32 nPastePosition = GetSelectRowCount() ? FirstSelectedRow() : GetCurRow();
+
+ if (!IsInsertNewAllowed(nPastePosition))
+ { // kein Einfuegen erlaubt, sondern nur anhaengen, also testen, ob hinter der PastePosition noch
+ // belegte Zeilen erscheinen
+
+ sal_Int32 nFreeFromPos; // ab da nur freie Zeilen
+ ::std::vector<OTableRow*>::reverse_iterator aIter = m_pRowList->rbegin();
+ for(nFreeFromPos = m_pRowList->size();
+ aIter != m_pRowList->rend() && (!(*aIter) || !(*aIter)->GetActFieldDescr() || !(*aIter)->GetActFieldDescr()->GetName().getLength());
+ --nFreeFromPos, ++aIter)
+ ;
+ if (nPastePosition < nFreeFromPos) // es gibt mindestens eine belegte hinter PastePosition -> ganz nach hinten
+ nPastePosition = nFreeFromPos;
+ }
+
+ OTableRowView::Paste( nPastePosition );
+ SetNoSelection();
+ GoToRow( nPastePosition );
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK( OTableEditorCtrl, DelayedDelete, void*, EMPTYTAG )
+{
+ nDeleteEvent = 0;
+ DeleteRows();
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK( OTableEditorCtrl, DelayedInsNewRows, void*, EMPTYTAG )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ nInsNewRowsEvent = 0;
+ InsertNewRows( GetSelectRowCount() ? FirstSelectedRow() : m_nDataPos );
+ SetNoSelection();
+ GoToRow( m_nDataPos );
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Evtl. vorhandene Primary Keys loeschen
+ MultiSelection aDeletedPrimKeys;
+ aDeletedPrimKeys.SetTotalRange( Range(0,GetRowCount()) );
+ long nIndex = 0;
+
+ ::std::vector<OTableRow*>::const_iterator aIter = m_pRowList->begin();
+ for(;aIter != m_pRowList->end();++aIter)
+ {
+ OFieldDescription *pFieldDescr = (*aIter)->GetActFieldDescr();
+ if( pFieldDescr && (*aIter)->IsPrimaryKey() )
+ {
+ (*aIter)->SetPrimaryKey( sal_False );
+ if(!bSet && pFieldDescr->getTypeInfo()->bNullable)
+ {
+ pFieldDescr->SetIsNullable(ColumnValue::NO_NULLS);
+ pFieldDescr->SetDefaultValue(String());
+ //////////////////////////////////////////////////////////////////////
+ // Die Fielddesription updaten
+ pDescrWin->DisplayData(pFieldDescr);
+ }
+
+ nIndex = m_pRowList->end() - aIter;
+ aDeletedPrimKeys.Insert( nIndex );
+ aDeletedPrimKeys.Select( nIndex );
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Die Primary Keys der markierten Zeilen setzen
+ MultiSelection aInsertedPrimKeys;
+ aInsertedPrimKeys.SetTotalRange( Range(0,GetRowCount()) );
+ if( bSet )
+ {
+ nIndex = FirstSelectedRow();
+ while( nIndex >= 0 )
+ {
+ //////////////////////////////////////////////////////////////////////
+ // Key setzen
+ OTableRow* pRow = (*m_pRowList)[nIndex];
+ OFieldDescription *pFieldDescr = pRow->GetActFieldDescr();
+ if(pFieldDescr)
+ {
+ pRow->SetPrimaryKey( sal_True );
+
+ if(pFieldDescr->getTypeInfo()->bNullable)
+ {
+ pFieldDescr->SetIsNullable(ColumnValue::NO_NULLS);
+ pFieldDescr->SetDefaultValue(String());
+ //////////////////////////////////////////////////////////////////////
+ // Die Fielddesription updateten
+ pDescrWin->DisplayData(pFieldDescr);
+ }
+
+ aInsertedPrimKeys.Insert( nIndex );
+ aInsertedPrimKeys.Select( nIndex );
+ }
+
+ nIndex = NextSelectedRow();
+ }
+ }
+
+ GetUndoManager()->AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) );
+
+ //////////////////////////////////////////////////////////////////////
+ // Handle-Spalte invalidieren
+ InvalidateHandleColumn();
+
+
+ //////////////////////////////////////////////////////////////////////
+ // Das ModifyFlag der TableDocSh setzen
+ GetView()->getController()->setModified( sal_True );
+ GetView()->getController()->InvalidateFeature(SID_SAVEDOC);
+ GetView()->getController()->InvalidateFeature(SID_UNDO);
+ GetView()->getController()->InvalidateFeature(SID_REDO);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool OTableEditorCtrl::IsPrimaryKey()
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Gehoeren alle markierten Felder zu einem Primary Key ?
+ long nPrimaryKeys = 0;
+ ::std::vector<OTableRow*>::const_iterator aIter = m_pRowList->begin();
+ for(sal_Int32 nRow=0;aIter != m_pRowList->end();++aIter,++nRow)
+ {
+ if( IsRowSelected(nRow) && !(*aIter)->IsPrimaryKey() )
+ return sal_False;
+ if( (*aIter)->IsPrimaryKey() )
+ nPrimaryKeys++;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Gibt es unselektierte Felder, die noch zu dem Key gehoeren ?
+ return GetSelectRowCount() == nPrimaryKeys;
+}
+
+//------------------------------------------------------------------------------
+void OTableEditorCtrl::SwitchType( const OTypeInfo* _pType )
+{
+ DBG_CHKTHIS(OTableEditorCtrl,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Wenn noch kein Feldname vergeben wurde
+ long nRow(GetCurRow());
+ OFieldDescription* pActFieldDescr = GetFieldDescr( nRow );
+ if( pActFieldDescr )
+ //////////////////////////////////////////////////////////////////////
+ // Alte Beschreibung speichern
+ pDescrWin->SaveData( pActFieldDescr );
+
+ //////////////////////////////////////////////////////////////////////
+ // Neue Beschreibung darstellen
+ OTableRow* pRow = (*m_pRowList)[nRow];
+ pRow->SetFieldType( _pType );
+ if(_pType)
+ {
+ if(GetView()->getController()->getTypeInfo(pTypeCell->GetSelectEntryPos()) != _pType)
+ {
+ USHORT nEntryPos = 0;
+ const OTypeInfoMap* pTypeInfo = GetView()->getController()->getTypeInfo();
+ OTypeInfoMap::const_iterator aIter = pTypeInfo->begin();
+ for(;aIter != pTypeInfo->end();++aIter,++nEntryPos)
+ {
+ if(aIter->second == _pType)
+ break;
+ }
+ pTypeCell->SelectEntryPos( nEntryPos );
+ OSL_ENSURE(GetView()->getController()->getTypeInfo(pTypeCell->GetSelectEntryPos()) != _pType,"EntryPos wasn't correct!");
+ }
+ }
+
+ pActFieldDescr = pRow->GetActFieldDescr();
+ if (pActFieldDescr != NULL && !pActFieldDescr->GetFormatKey())
+ {
+ sal_Int32 nFormatKey = ::dbtools::getDefaultNumberFormat( pActFieldDescr->GetType(),
+ pActFieldDescr->GetScale(),
+ pActFieldDescr->IsCurrency(),
+ Reference< XNumberFormatTypes>(GetView()->getController()->getNumberFormatter()->getNumberFormatsSupplier()->getNumberFormats(),UNO_QUERY),
+ GetView()->getLocale());
+
+ pActFieldDescr->SetFormatKey(nFormatKey);
+ }
+
+ pDescrWin->DisplayData( pActFieldDescr );
+}
+// -----------------------------------------------------------------------------
+OTableDesignView* OTableEditorCtrl::GetView() const
+{
+ return static_cast<OTableDesignView*>(GetParent()->GetParent());
+}
+// -----------------------------------------------------------------------------
+
+
+
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
new file mode 100644
index 000000000000..dbf7d3354a4f
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -0,0 +1,232 @@
+/*************************************************************************
+ *
+ * $RCSfile: TEditControl.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:27:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEEDITORCONTROL_HXX
+#define DBAUI_TABLEEDITORCONTROL_HXX
+
+#ifndef DBAUI_TABLEDESIGNCONTROL_HXX
+#include "TableDesignControl.hxx"
+#endif
+#ifndef DBAUI_TABLEDESIGNVIEW_HXX
+#include "TableDesignView.hxx"
+#endif
+#ifndef DBAUI_TABLEFIELDDESCRIPTION_HXX
+#include "TableFieldDescWin.hxx"
+#endif
+#ifndef DBAUI_TABLEROW_HXX
+#include "TableRow.hxx"
+#endif
+#ifndef DBAUI_ENUMTYPES_HXX
+#include "QEnumTypes.hxx"
+#endif
+#ifndef DBUI_TABLECONTROLLER_HXX
+#include "TableController.hxx"
+#endif
+
+class Edit;
+namespace dbaui
+{
+ class OTableDescWin;
+
+ class OTableEditorCtrl : public OTableRowView
+ {
+ ::std::vector<OTableRow*> m_aClipboardList;
+ ::std::vector<OTableRow*> m_aUndoList;
+ ::std::vector<OTableRow*>* m_pRowList;
+
+ EEditMode eEditMode;
+
+ Edit* pNameCell;
+ DbListBoxCtrl* pTypeCell;
+ Edit* pDescrCell;
+ OTableFieldDescWin* pDescrWin; // properties of one column
+
+ OTableRow* pActRow;
+
+ ULONG nIndexEvent;
+ ULONG nCutEvent;
+ ULONG nPasteEvent;
+ ULONG nDeleteEvent;
+ ULONG nInsNewRowsEvent;
+ ULONG nInvalidateTypeEvent;
+ ULONG nEntryNotFoundEvent;
+
+ long nOldDataPos;
+
+ BOOL bSaveOnMove;
+ BOOL bSaveFormatter;
+ BOOL bReadOnly;
+ //------------------------------------------------------------------
+ // Hilfsklasse
+ class ClipboardInvalidator
+ {
+ private:
+ AutoTimer m_aInvalidateTimer;
+ OTableEditorCtrl* m_pOwner;
+
+ public:
+ ClipboardInvalidator(ULONG nTimeout,OTableEditorCtrl*);
+ ~ClipboardInvalidator();
+
+ protected:
+ DECL_LINK(OnInvalidate, void*);
+ };
+ friend class OTableEditorCtrl::ClipboardInvalidator;
+
+ ClipboardInvalidator m_aInvalidate;
+
+ protected:
+ virtual void Command( const CommandEvent& rEvt );
+ virtual BOOL SeekRow(long nRow);
+ virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect,
+ USHORT nColumnId ) const;
+
+ virtual void CursorMoved();
+ virtual RowStatus GetRowStatus(long nRow) const;
+
+ virtual DbCellController* GetController(long nRow, USHORT nCol);
+ virtual void InitController(DbCellControllerRef& rController, long nRow, USHORT nCol);
+
+ virtual void CellModified();
+ virtual BOOL SaveModified(); // wird aufgerufen vor einem Zellenwechsel
+ // return FALSE, verhindert Zellenwechsel
+ virtual void Undo();
+ virtual void Redo();
+ virtual String GetCellText(long nRow, USHORT nColId) const;
+ virtual ULONG GetTotalCellWidth(long nRow, USHORT nColId) const;
+
+ virtual void CopyRows();
+ virtual void InsertRows( long nRow );
+ virtual void DeleteRows();
+ virtual void InsertNewRows( long nRow );
+
+ void ClearModified();
+
+ void SetPrimaryKey( BOOL bSet );
+ BOOL IsPrimaryKey();
+
+ DECL_LINK(ControlPreNotifyHdl, NotifyEvent*);
+
+ public:
+ // TYPEINFO();
+ OTableEditorCtrl(Window* pParentWin);
+ virtual ~OTableEditorCtrl();
+ virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol);
+ virtual void UpdateAll();
+ SfxUndoManager* GetUndoManager() const { return GetView()->getController()->getUndoMgr(); }
+
+ void SetDescrWin( OTableFieldDescWin* pWin ){ pDescrWin = pWin; if (pDescrWin && pActRow) pDescrWin->DisplayData(pActRow->GetActFieldDescr()); }
+ BOOL SaveCurRow();
+ void SwitchType( const OTypeInfo* _pType );
+
+ void DisplayData( long nRow, BOOL bGrabFocus = TRUE );
+ // erzwingt das Anzeigen der genannten Zeile (selbst wenn es eigentlich schon die aktuelle ist)
+
+ virtual void SetData( long nRow, USHORT nColId, const OTypeInfo* _pTypeInfo );
+ virtual void SetData( long nRow, USHORT nColId, const String& _rSaveData );
+ virtual String GetData( long nRow, USHORT nColId );
+ virtual void SetControlText( long nRow, USHORT nColId, const String& rText );
+ virtual String GetControlText( long nRow, USHORT nColId );
+
+ virtual OTableDesignView* GetView() const;
+
+ ::std::vector<OTableRow*>* GetRowList(){ return m_pRowList; }
+ ::std::vector<OTableRow*>* GetClipboardRowList(){ return &m_aClipboardList; }
+
+ OTableRow* GetActRow(){ return pActRow; }
+ void CellModified( long nRow, USHORT nColId );
+ void SetReadOnly( BOOL bRead=TRUE );
+
+ virtual void Init();
+
+ BOOL IsCutAllowed( long nRow = -1 );
+ BOOL IsCopyAllowed( long nRow = -1 );
+ BOOL IsPasteAllowed( long nRow = -1 );
+ BOOL IsReadOnly();
+
+ virtual void Cut();
+ virtual void Copy();
+ virtual void Paste();
+ private:
+ DECL_LINK( StartIndexing, void* );
+ DECL_LINK( DelayedCut, void* );
+ DECL_LINK( DelayedPaste, void* );
+ DECL_LINK( DelayedDelete, void* );
+ DECL_LINK( DelayedInsNewRows, void* );
+ DECL_LINK( InvalidateFieldType, void* );
+ DECL_LINK( EntryNotFound, void* );
+
+ void InitCellController();
+ INT32 HasFieldName( const String& rFieldName );
+ String GenerateName( const String& rName );
+ BOOL SetDataPtr( long nRow );
+ OFieldDescription* GetFieldDescr( long nRow );
+ BOOL IsPrimaryKeyAllowed( long nRow );
+ BOOL IsInsertNewAllowed( long nRow );
+ BOOL IsDeleteAllowed( long nRow );
+ void SetEditMode( EEditMode eMode ){ eEditMode = eMode; }
+ EEditMode GetEditMode(){ return eEditMode; }
+ BOOL SaveData(long nRow, USHORT nColumnId);
+ };
+}
+#endif // DBAUI_TABLEEDITORCONTROL_HXX
+
+
+
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
new file mode 100644
index 000000000000..6c9725eaab61
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -0,0 +1,1361 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableController.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:26:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBUI_TABLECONTROLLER_HXX
+#include "TableController.hxx"
+#endif
+
+#ifndef _DBAU_REGHELPER_HXX_
+#include "dbu_reghelper.hxx"
+#endif
+#ifndef _SFXSIDS_HRC
+#include <sfx2/sfxsids.hrc>
+#endif
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+#ifndef _SV_TOOLBOX_HXX
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef DBACCESS_UI_BROWSER_ID_HXX
+#include "browserids.hxx"
+#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
+#include "dbustrings.hrc"
+#endif
+#ifndef _CONNECTIVITY_DBTOOLS_HXX_
+#include <connectivity/dbtools.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+#ifndef DBAUI_DLGSAVE_HXX
+#include "dlgsave.hxx"
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
+#include <com/sun/star/container/XChild.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
+#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
+#include <com/sun/star/sdbcx/KeyType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
+#include <com/sun/star/sdbcx/XDrop.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XALTERTABLE_HPP_
+#include <com/sun/star/sdbcx/XAlterTable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
+#include <com/sun/star/sdbcx/XAppend.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
+#include <com/sun/star/sdb/SQLContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_
+#include <com/sun/star/sdbc/SQLWarning.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
+#include <com/sun/star/sdbc/ColumnValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
+#include <com/sun/star/sdbc/XRow.hpp>
+#endif
+#ifndef _DBHELPER_DBEXCEPTION_HXX_
+#include <connectivity/dbexception.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UI_XEXECUTABLEDIALOG_HPP_
+#include <com/sun/star/ui/XExecutableDialog.hpp>
+#endif
+#ifndef _COMPHELPER_STREAMSECTION_HXX_
+#include <comphelper/streamsection.hxx>
+#endif
+//#ifndef _COMPHELPER_BASIC_IO_HXX_
+//#include <comphelper/basicio.hxx>
+//#endif
+//#ifndef _COMPHELPER_SEQSTREAM_HXX
+//#include <comphelper/seqstream.hxx>
+//#endif
+#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP_
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XACTIVEDATASINK_HPP_
+#include <com/sun/star/io/XActiveDataSink.hpp>
+#endif
+#ifndef DBAUI_TABLEDESIGNVIEW_HXX
+#include "TableDesignView.hxx"
+#endif
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
+#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include "FieldDescriptions.hxx"
+#endif
+#ifndef DBAUI_TABLEROW_HXX
+#include "TableRow.hxx"
+#endif
+#ifndef DBAUI_TYPEINFO_HXX
+#include "TypeInfo.hxx"
+#endif
+#ifndef DBAUI_TABLEEDITORCONTROL_HXX
+#include "TEditControl.hxx"
+#endif
+#ifndef DBAUI_TABLEDESCRIPTIONWINDOW_HXX
+#include "TableDescWin.hxx"
+#endif
+#ifndef _DBAUI_SQLMESSAGE_HXX_
+#include "sqlmessage.hxx"
+#endif
+
+extern "C" void SAL_CALL createRegistryInfo_OTableControl()
+{
+ static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OTableController > aAutoRegistration;
+}
+
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::sdbcx;
+using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::sdb;
+using namespace ::com::sun::star::ui;
+// using namespace ::com::sun::star::sdbcx;
+// using namespace ::connectivity;
+using namespace ::dbtools;
+using namespace ::dbaui;
+using namespace ::comphelper;
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL OTableController::getImplementationName() throw( RuntimeException )
+{
+ return getImplementationName_Static();
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString OTableController::getImplementationName_Static() throw( RuntimeException )
+{
+ return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.OTableDesign");
+}
+//------------------------------------------------------------------------------
+Sequence< ::rtl::OUString> OTableController::getSupportedServiceNames_Static(void) throw( RuntimeException )
+{
+ Sequence< ::rtl::OUString> aSupported(1);
+ aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.TableDesign");
+ return aSupported;
+}
+//-------------------------------------------------------------------------
+Sequence< ::rtl::OUString> SAL_CALL OTableController::getSupportedServiceNames() throw(RuntimeException)
+{
+ return getSupportedServiceNames_Static();
+}
+// -------------------------------------------------------------------------
+Reference< XInterface > SAL_CALL OTableController::Create(const Reference<XMultiServiceFactory >& _rxFactory)
+{
+ return *(new OTableController(_rxFactory));
+}
+// -----------------------------------------------------------------------------
+OTableController::OTableController(const Reference< XMultiServiceFactory >& _rM) : OGenericUnoController(_rM)
+ ,m_bEditable(sal_True)
+ ,m_bModified(sal_False)
+ ,m_bOwnConnection(sal_False)
+ ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES))
+{
+ InvalidateAll();
+}
+// -----------------------------------------------------------------------------
+OTableController::~OTableController()
+{
+ OTypeInfoMap::iterator aIter = m_aTypeInfo.begin();
+ for(;aIter != m_aTypeInfo.end();++aIter)
+ delete aIter->second;
+
+ m_aTypeInfo.clear();
+}
+// -----------------------------------------------------------------------------
+void OTableController::dispose()
+{
+ if(isModified())
+ {
+ QueryBox aQry(getView(), ModuleRes(QUERY_DESIGN_SAVEMODIFIED));
+ switch (aQry.Execute())
+ {
+ case RET_YES:
+ Execute(ID_BROWSER_SAVEDOC);
+ break;
+ default:
+ break;
+ }
+ }
+
+ OGenericUnoController::dispose();
+ delete m_pView;
+ m_pView = NULL;
+
+ if(m_bOwnConnection)
+ {
+ // we have to remove ourself before dispoing the connection
+ Reference< XComponent > xComponent(m_xConnection, UNO_QUERY);
+ if (xComponent.is())
+ {
+ Reference< ::com::sun::star::lang::XEventListener> xEvtL((::cppu::OWeakObject*)this,UNO_QUERY);
+ xComponent->removeEventListener(xEvtL);
+ }
+ ::comphelper::disposeComponent(m_xConnection);
+ }
+ m_xConnection = NULL;
+}
+// -----------------------------------------------------------------------------
+FeatureState OTableController::GetState(sal_uInt16 _nId)
+{
+ FeatureState aReturn;
+ // (disabled automatically)
+ aReturn.bEnabled = sal_True;
+
+ switch (_nId)
+ {
+ case ID_BROWSER_EDITDOC:
+ aReturn.aState = ::cppu::bool2any(m_bEditable);
+ break;
+ case ID_BROWSER_SAVEASDOC:
+ aReturn.bEnabled = m_xConnection.is();
+ break;
+ case ID_BROWSER_SAVEDOC:
+ aReturn.bEnabled = m_xConnection.is() && m_bModified;
+ break;
+ case ID_BROWSER_CUT:
+ aReturn.bEnabled = m_bEditable && static_cast<OTableDesignView*>(getView())->isCutAllowed();
+ break;
+ case ID_BROWSER_COPY:
+ break;
+ case ID_BROWSER_PASTE:
+ aReturn.bEnabled = m_bEditable;
+ break;
+ case ID_BROWSER_UNDO:
+ aReturn.bEnabled = m_bEditable && m_aUndoManager.GetUndoActionCount() != 0;
+ break;
+ case ID_BROWSER_REDO:
+ aReturn.bEnabled = m_bEditable && m_aUndoManager.GetRedoActionCount() != 0;
+ break;
+ }
+ return aReturn;
+}
+// -----------------------------------------------------------------------------
+void OTableController::Execute(sal_uInt16 _nId)
+{
+ switch(_nId)
+ {
+ case ID_BROWSER_EDITDOC:
+ m_bEditable = !m_bEditable;
+ static_cast<OTableDesignView*>(getView())->setReadOnly(!m_bEditable);
+ InvalidateFeature(ID_BROWSER_PASTE);
+ InvalidateFeature(ID_BROWSER_CLEAR_QUERY);
+ break;
+ case ID_BROWSER_SAVEASDOC:
+ case ID_BROWSER_SAVEDOC:
+ {
+ OSL_ENSURE(m_bEditable,"Slot ID_BROWSER_SAVEDOC should not be enabled!");
+
+ Reference<XTablesSupplier> xTablesSup(m_xConnection,UNO_QUERY);
+ if(xTablesSup.is())
+ {
+ Reference<XNameAccess> xTables(xTablesSup->getTables(),UNO_QUERY);
+ OSL_ENSURE(xTables.is(),"The queries can't be null!");
+
+ // first we need a name for our query so ask the user
+ ::rtl::OUString sCatalog,sSchema;
+ sal_Bool bNew = 0 == m_sName.getLength();
+ bNew = bNew || (ID_BROWSER_SAVEASDOC == _nId);
+ if(bNew)
+ {
+ String aDefaultName = (ID_BROWSER_SAVEASDOC == _nId && !bNew) ? String(m_sName.getStr()) : createUniqueName(xTables,String(ModuleRes(STR_TBL_TITLE)));
+ OSaveAsDlg aDlg(getView(),CommandType::TABLE,xTables,m_xConnection->getMetaData(),aDefaultName);
+ if(aDlg.Execute() == RET_OK)
+ {
+ m_sName = aDlg.getName();
+ sCatalog = aDlg.getCatalog();
+ sSchema = aDlg.getSchema();
+ }
+ }
+ // did we get a name
+ if(m_sName.getLength())
+ {
+ SQLExceptionInfo aInfo;
+ try
+ {
+ // check the columns for double names
+ checkColumns();
+
+ Reference<XPropertySet> xTable;
+ if(bNew || !xTables->hasByName(m_sName)) // just to make sure the table already exists
+ {
+ if(xTables->hasByName(m_sName))
+ {
+ Reference<XDrop> xNameCont(xTable,UNO_QUERY);
+ xNameCont->dropByName(m_sName);
+ }
+
+ Reference<XDataDescriptorFactory> xFact(xTables,UNO_QUERY);
+ OSL_ENSURE(xFact.is(),"No XDataDescriptorFactory available!");
+ xTable = xFact->createDataDescriptor();
+ OSL_ENSURE(xTable.is(),"OTableController::Execute ID_BROWSER_SAVEDOC: Create query failed!");
+ // to set the name is only allowed when the wuery is new
+ xTable->setPropertyValue(PROPERTY_CATALOGNAME,makeAny(sCatalog));
+ xTable->setPropertyValue(PROPERTY_SCHEMANAME,makeAny(sSchema));
+ xTable->setPropertyValue(PROPERTY_NAME,makeAny(m_sName));
+
+ // now append the columns
+ Reference<XColumnsSupplier> xColSup(xTable,UNO_QUERY);
+ appendColumns(xColSup);
+ // now append the primary key
+ Reference<XKeysSupplier> xKeySup(xTable,UNO_QUERY);
+ appendKey(xKeySup);
+ }
+// else
+// {
+// xTables->getByName(m_sName) >>= xTable;
+// }
+ // now set the properties
+ if(bNew)
+ {
+ Reference<XAppend> xAppend(xTables,UNO_QUERY);
+ OSL_ENSURE(xAppend.is(),"No XAppend Interface!");
+ xAppend->appendByDescriptor(xTable);
+
+ if(xTables->hasByName(m_sName))
+ xTables->getByName(m_sName) >>= m_xTable;
+ else
+ {
+ // it can be that someone inserted new data for us
+ ::rtl::OUString sCatalog,sSchema,sTable,sComposedName;
+ xTable->getPropertyValue(PROPERTY_CATALOGNAME) >>= sCatalog;
+ xTable->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema;
+ xTable->getPropertyValue(PROPERTY_NAME) >>= sTable;
+
+ ::dbtools::composeTableName(m_xConnection->getMetaData(),sCatalog,sSchema,sTable,sComposedName,sal_False);
+ if(xTables->hasByName(sComposedName))
+ xTables->getByName(sComposedName) >>= m_xTable;
+ else
+ m_xTable = NULL;
+ }
+ }
+ else if(m_xTable.is())
+ {
+ alterColumns();
+ }
+ setModified(sal_False);
+ }
+ catch(SQLContext& e)
+ {
+ m_sName = ::rtl::OUString();
+ m_xTable = NULL;
+ aInfo = SQLExceptionInfo(e);
+ }
+ catch(SQLWarning& e)
+ {
+ m_sName = ::rtl::OUString();
+ m_xTable = NULL;
+ aInfo = SQLExceptionInfo(e);
+ }
+ catch(SQLException& e)
+ {
+ m_sName = ::rtl::OUString();
+ m_xTable = NULL;
+ aInfo = SQLExceptionInfo(e);
+ }
+ catch(Exception&)
+ {
+ m_sName = ::rtl::OUString();
+ m_xTable = NULL;
+ OSL_ENSURE(0,"table could not be inserted!");
+ }
+ showError(aInfo);
+ }
+ }
+ }
+ break;
+ case ID_BROWSER_CUT:
+ static_cast<OTableDesignView*>(getView())->cut();
+ break;
+ case ID_BROWSER_COPY:
+ static_cast<OTableDesignView*>(getView())->copy();
+ break;
+ case ID_BROWSER_PASTE:
+ static_cast<OTableDesignView*>(getView())->paste();
+ break;
+ case ID_BROWSER_UNDO:
+ m_aUndoManager.Undo();
+ InvalidateFeature(ID_BROWSER_REDO);
+ break;
+ case ID_BROWSER_REDO:
+ m_aUndoManager.Redo();
+ InvalidateFeature(ID_BROWSER_UNDO);
+ break;
+ }
+ InvalidateFeature(_nId);
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL OTableController::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException)
+{
+ try
+ {
+ OGenericUnoController::initialize(aArguments);
+
+ // m_pWindow->initialize(m_xCurrentFrame);
+
+ PropertyValue aValue;
+ const Any* pBegin = aArguments.getConstArray();
+ const Any* pEnd = pBegin + aArguments.getLength();
+
+ for(;pBegin != pEnd;++pBegin)
+ {
+ if((*pBegin >>= aValue) && aValue.Name == PROPERTY_ACTIVECONNECTION)
+ {
+ aValue.Value >>= m_xConnection;
+ OSL_ENSURE(m_xConnection.is(),"We need at least a connection!");
+ // be notified when connection is in disposing
+ Reference< XComponent > xComponent(m_xConnection, UNO_QUERY);
+ if (xComponent.is())
+ {
+ Reference< ::com::sun::star::lang::XEventListener> xEvtL((::cppu::OWeakObject*)this,UNO_QUERY);
+ xComponent->addEventListener(xEvtL);
+ }
+ }
+ else if(aValue.Name == PROPERTY_DATASOURCENAME)
+ {
+ aValue.Value >>= m_sDataSourceName;
+ }
+ else if(aValue.Name == PROPERTY_CURRENTTABLE)
+ {
+ aValue.Value >>= m_sName;
+ }
+ }
+
+ if (!m_xConnection.is())
+ { // whoever instantiated us did not give us a connection to share. Okay, create an own one
+ createNewConnection(sal_False);
+ }
+ if(!m_xConnection.is()) // so what should otherwise
+ {
+ String aMessage(ModuleRes(RID_STR_CONNECTION_LOST));
+ InfoBox(getView(), aMessage).Execute();
+ dispose();
+ }
+
+ // get command from the query if a query name was supplied
+ if(m_sName.getLength())
+ {
+ Reference<XNameAccess> xNameAccess;
+ Reference<XTablesSupplier> xSup(m_xConnection,UNO_QUERY);
+ if(xSup.is())
+ {
+ xNameAccess = xSup->getTables();
+ OSL_ENSURE(xNameAccess.is(),"no nameaccess for the queries!");
+
+ Reference<XPropertySet> xProp;
+ if(xNameAccess->hasByName(m_sName) && ::cppu::extractInterface(xProp,xNameAccess->getByName(m_sName)) && xProp.is())
+ {
+ m_xTable = xProp;
+ }
+ }
+ }
+ if(!m_xFormatter.is())
+ {
+ Reference< XChild> xChild(m_xConnection,UNO_QUERY);
+ if(xChild.is())
+ {
+ Reference< XPropertySet> xProp(xChild->getParent(),UNO_QUERY);
+ if(xProp.is())
+ {
+ Reference< XNumberFormatsSupplier> xSupplier;
+ xProp->getPropertyValue(PROPERTY_NUMBERFORMATSSUPPLIER) >>= xSupplier;
+ if(xSupplier.is())
+ {
+ m_xFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(getORB()
+ ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ m_xFormatter->attachNumberFormatsSupplier(xSupplier);
+ }
+ }
+ }
+ OSL_ENSURE(m_xFormatter.is(),"No NumberFormatter!");
+ }
+ fillTypeInfo(); // fill the needed type information
+ loadData(); // fill the column information form the table
+ getView()->initialize(); // show the windows and fill with our informations
+ getUndoMgr()->Clear(); // clear all undo redo things
+ setModified(sal_False); // and we are not modified yet
+ }
+ catch(SQLException&)
+ {
+ OSL_ASSERT(0);
+ }
+
+}
+// -----------------------------------------------------------------------------
+sal_Bool OTableController::Construct(Window* pParent)
+{
+ m_pView = new OTableDesignView(pParent,m_xMultiServiceFacatory,this);
+ OGenericUnoController::Construct(pParent);
+ m_pView->Construct(NULL);
+ m_pView->Show();
+ return sal_True;
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL OTableController::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt)
+{
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL OTableController::elementInserted(const ::com::sun::star::container::ContainerEvent& Event) throw( RuntimeException )
+{
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL OTableController::elementRemoved(const ::com::sun::star::container::ContainerEvent& Event) throw( RuntimeException )
+{
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL OTableController::elementReplaced(const ::com::sun::star::container::ContainerEvent& Event) throw( RuntimeException )
+{
+}
+// -----------------------------------------------------------------------------
+sal_Bool SAL_CALL OTableController::suspend(sal_Bool bSuspend) throw( RuntimeException )
+{
+ return sal_True;
+}
+// -----------------------------------------------------------------------------
+void OTableController::AddSupportedFeatures()
+{
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DBSlots/Redo")] = ID_BROWSER_REDO;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DBSlots/Save")] = ID_BROWSER_SAVEDOC;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DBSlots/Undo")] = ID_BROWSER_UNDO;
+
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:BrowserMode")] = SID_BROWSER_MODE;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:HelpMenu")] = SID_HELPMENU;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:NewDoc")] = SID_NEWDOC;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:SaveAsDoc")] = SID_SAVEASDOC;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:ExplorerContentOpen")] = SID_EXPLORERCONTENT_OPEN;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:ExplorerContentOpenDocument")] = SID_EXPLORERCONTENT_OPEN_DOCUMENT;
+
+}
+// -----------------------------------------------------------------------------
+ToolBox* OTableController::CreateToolBox(Window* _pParent)
+{
+ return new ToolBox(_pParent, ModuleRes(RID_BRW_TABLEDESIGN_TOOLBOX));
+}
+// -----------------------------------------------------------------------------
+SfxUndoManager* OTableController::getUndoMgr()
+{
+ return &m_aUndoManager;
+}
+// -----------------------------------------------------------------------------
+void OTableController::setModified(sal_Bool _bModified)
+{
+ m_bModified = _bModified;
+ InvalidateFeature(ID_BROWSER_CLEAR_QUERY);
+ InvalidateFeature(ID_BROWSER_SAVEDOC);
+ InvalidateFeature(ID_BROWSER_SAVEASDOC);
+ InvalidateFeature(ID_BROWSER_QUERY_EXECUTE);
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL OTableController::disposing( const EventObject& Source ) throw(RuntimeException)
+{
+ if(Reference<XConnection>(Source.Source,UNO_QUERY) == m_xConnection)
+ {
+ // our connection was disposed so we need a new one
+ createNewConnection(sal_True);
+ }
+}
+// -----------------------------------------------------------------------------
+void OTableController::Save(const Reference< XObjectOutputStream>& _rxOut)
+{
+ OStreamSection aSection(_rxOut.get());
+
+}
+// -----------------------------------------------------------------------------
+void OTableController::Load(const Reference< XObjectInputStream>& _rxIn)
+{
+ OStreamSection aSection(_rxIn.get());
+}
+// -----------------------------------------------------------------------------
+void OTableController::createNewConnection(sal_Bool _bUI)
+{
+ m_xConnection = NULL;
+ m_bOwnConnection = sal_False;
+
+ if (!_bUI || (RET_YES == QueryBox(getView(),ModuleRes(QUERY_CONNECTION_LOST)).Execute()))
+ {
+ m_xConnection = connect(m_sDataSourceName);
+ m_bOwnConnection = m_xConnection.is();
+ }
+}
+// -----------------------------------------------------------------------------
+void OTableController::fillTypeInfo()
+{
+ if(!getConnection().is())
+ return;
+ Reference< XResultSet> xRs = getConnection()->getMetaData ()->getTypeInfo ();
+ Reference< XRow> xRow(xRs,UNO_QUERY);
+ // Information for a single SQL type
+
+ ::rtl::OUString aB1 = ::rtl::OUString::createFromAscii(" [ ");
+ ::rtl::OUString aB2 = ::rtl::OUString::createFromAscii(" ]");
+ // Loop on the result set until we reach end of file
+ while (xRs->next())
+ {
+ OTypeInfo* pInfo = new OTypeInfo();
+ pInfo->aTypeName = xRow->getString (1);
+ pInfo->nType = xRow->getShort (2);
+ pInfo->nPrecision = xRow->getInt (3);
+ pInfo->aLiteralPrefix = xRow->getString (4);
+ pInfo->aLiteralSuffix = xRow->getString (5);
+ pInfo->aCreateParams = xRow->getString (6);
+ pInfo->bNullable = xRow->getInt (7) == ColumnValue::NULLABLE;
+ pInfo->bCaseSensitive = xRow->getBoolean (8);
+ pInfo->nSearchType = xRow->getShort (9);
+ pInfo->bUnsigned = xRow->getBoolean (10);
+ pInfo->bCurrency = xRow->getBoolean (11);
+ pInfo->bAutoIncrement = xRow->getBoolean (12);
+ pInfo->aLocalTypeName = xRow->getString (13);
+ pInfo->nMinimumScale = xRow->getShort (14);
+ pInfo->nMaximumScale = xRow->getShort (15);
+ pInfo->nNumPrecRadix = xRow->getInt (18);
+
+ String aName;
+ switch(pInfo->nType)
+ {
+ case DataType::CHAR:
+ aName = m_sTypeNames.GetToken(TYPE_CHAR);
+ break;
+ case DataType::VARCHAR:
+ aName = m_sTypeNames.GetToken(TYPE_TEXT);
+ break;
+ case DataType::DECIMAL:
+ aName = m_sTypeNames.GetToken(TYPE_DECIMAL);
+ break;
+ case DataType::NUMERIC:
+ aName = m_sTypeNames.GetToken(TYPE_NUMERIC);
+ break;
+ case DataType::BIGINT:
+ aName = m_sTypeNames.GetToken(TYPE_BIGINT);
+ break;
+ case DataType::FLOAT:
+ aName = m_sTypeNames.GetToken(TYPE_FLOAT);
+ break;
+ case DataType::DOUBLE:
+ aName = m_sTypeNames.GetToken(TYPE_DOUBLE);
+ break;
+ case DataType::LONGVARCHAR:
+ aName = m_sTypeNames.GetToken(TYPE_MEMO);
+ break;
+ case DataType::LONGVARBINARY:
+ aName = m_sTypeNames.GetToken(TYPE_IMAGE);
+ break;
+ case DataType::DATE:
+ aName = m_sTypeNames.GetToken(TYPE_DATE);
+ break;
+ case DataType::TIME:
+ aName = m_sTypeNames.GetToken(TYPE_TIME);
+ break;
+ case DataType::TIMESTAMP:
+ aName = m_sTypeNames.GetToken(TYPE_DATETIME);
+ break;
+ case DataType::BIT:
+ aName = m_sTypeNames.GetToken(TYPE_BOOL);
+ break;
+ case DataType::TINYINT:
+ aName = m_sTypeNames.GetToken(TYPE_TINYINT);
+ break;
+ case DataType::SMALLINT:
+ aName = m_sTypeNames.GetToken(TYPE_SMALLINT);
+ break;
+ case DataType::INTEGER:
+ aName = m_sTypeNames.GetToken(TYPE_INTEGER);
+ break;
+ case DataType::REAL:
+ aName = m_sTypeNames.GetToken(TYPE_REAL);
+ break;
+ case DataType::BINARY:
+ aName = m_sTypeNames.GetToken(TYPE_BINARY);
+ break;
+ case DataType::VARBINARY:
+ aName = m_sTypeNames.GetToken(TYPE_VARBINARY);
+ break;
+ case DataType::SQLNULL:
+ aName = m_sTypeNames.GetToken(TYPE_SQLNULL);
+ break;
+ case DataType::OBJECT:
+ aName = m_sTypeNames.GetToken(TYPE_OBJECT);
+ break;
+ case DataType::DISTINCT:
+ aName = m_sTypeNames.GetToken(TYPE_DISTINCT);
+ break;
+ case DataType::STRUCT:
+ aName = m_sTypeNames.GetToken(TYPE_STRUCT);
+ break;
+ case DataType::ARRAY:
+ aName = m_sTypeNames.GetToken(TYPE_ARRAY);
+ break;
+ case DataType::BLOB:
+ aName = m_sTypeNames.GetToken(TYPE_BLOB);
+ break;
+ case DataType::CLOB:
+ aName = m_sTypeNames.GetToken(TYPE_CLOB);
+ break;
+ case DataType::REF:
+ aName = m_sTypeNames.GetToken(TYPE_REF);
+ break;
+ default:
+ OSL_ENSURE(0,"Unknown type");
+ }
+ pInfo->aUIName = aName.GetBuffer();
+ pInfo->aUIName += aB1;
+ pInfo->aUIName += pInfo->aTypeName;
+ pInfo->aUIName += aB2;
+ // Now that we have the type info, save it in the multimap
+ m_aTypeInfo.insert(OTypeInfoMap::value_type(pInfo->nType,pInfo));
+ }
+ // for a faster index access
+ OTypeInfoMap::iterator aIter = m_aTypeInfo.begin();
+ for(;aIter != m_aTypeInfo.end();++aIter)
+ m_aTypeInfoIndex.push_back(aIter);
+
+ // Close the result set/statement.
+
+ ::comphelper::disposeComponent(xRs);
+}
+// -----------------------------------------------------------------------------
+const OTypeInfo* OTableController::getTypeInfoByType(sal_Int32 _nDataType) const
+{
+ OTypeInfoMap::const_iterator aIter = m_aTypeInfo.find(_nDataType);
+ if(aIter != m_aTypeInfo.end())
+ return aIter->second;
+ OSL_ENSURE(0,"Wrong DataType supplied!");
+ return NULL;
+}
+// -----------------------------------------------------------------------------
+void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_Bool _bKeyColumns)
+{
+ try
+ {
+ // now append the columns
+ OSL_ENSURE(_rxColSup.is(),"No columns supplier");
+ if(!_rxColSup.is())
+ return;
+ Reference<XNameAccess> xColumns = _rxColSup->getColumns();
+ OSL_ENSURE(xColumns.is(),"No columns");
+ Reference<XDataDescriptorFactory> xColumnFactory(xColumns,UNO_QUERY);
+
+ Reference<XAppend> xAppend(xColumns,UNO_QUERY);
+ OSL_ENSURE(xAppend.is(),"No XAppend Interface!");
+
+ ::std::vector<OTableRow*>::iterator aIter = m_vRowList.begin();
+ for(;aIter != m_vRowList.end();++aIter)
+ {
+ OSL_ENSURE(*aIter,"OTableRow is null!");
+ OFieldDescription* pField = (*aIter)->GetActFieldDescr();
+ if(!pField)
+ continue;
+
+ Reference<XPropertySet> xColumn;
+ if(pField->IsPrimaryKey() || !_bKeyColumns)
+ xColumn = xColumnFactory->createDataDescriptor();
+ if(xColumn.is())
+ {
+ if(!_bKeyColumns)
+ setColumnProperties(xColumn,pField);
+ else
+ xColumn->setPropertyValue(PROPERTY_NAME,makeAny(pField->GetName()));
+
+ xAppend->appendByDescriptor(xColumn);
+ xColumn = NULL;
+ // now only the settings are missing
+ if(xColumns->hasByName(pField->GetName()))
+ {
+ xColumns->getByName(pField->GetName()) >>= xColumn;
+ if(xColumn.is())
+ {
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
+ xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
+ xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny((sal_Int32)pField->GetHorJustify()));
+ }
+ }
+ else
+ {
+ OSL_ASSERT(0);
+ }
+
+ }
+ }
+ }
+ catch(SQLException& e)
+ {
+ showError(SQLExceptionInfo(e));
+ }
+ catch(Exception&)
+ {
+ OSL_ASSERT(0);
+ }
+}
+// -----------------------------------------------------------------------------
+void OTableController::appendKey(Reference<XKeysSupplier>& _rxSup)
+{
+ if(!_rxSup.is())
+ return; // the database doesn't support keys
+ try
+ {
+ OSL_ENSURE(_rxSup.is(),"No XKeysSupplier!");
+ Reference<XDataDescriptorFactory> xKeyFactory(_rxSup->getKeys(),UNO_QUERY);
+ OSL_ENSURE(xKeyFactory.is(),"No XDataDescriptorFactory Interface!");
+ Reference<XAppend> xAppend(xKeyFactory,UNO_QUERY);
+ OSL_ENSURE(xAppend.is(),"No XAppend Interface!");
+
+ Reference<XPropertySet> xKey = xKeyFactory->createDataDescriptor();
+ OSL_ENSURE(xKey.is(),"Key is null!");
+ xKey->setPropertyValue(PROPERTY_TYPE,makeAny(KeyType::PRIMARY));
+
+ Reference<XColumnsSupplier> xColSup(xKey,UNO_QUERY);
+ if(xColSup.is())
+ {
+ appendColumns(xColSup,sal_True);
+ Reference<XNameAccess> xColumns = xColSup->getColumns();
+ if(xColumns->getElementNames().getLength())
+ xAppend->appendByDescriptor(xKey);
+ }
+
+ }
+ catch(SQLException& e)
+ {
+ showError(SQLExceptionInfo(e));
+ }
+ catch(Exception&)
+ {
+ OSL_ASSERT(0);
+ }
+}
+// -----------------------------------------------------------------------------
+void OTableController::loadData()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Wenn Datenstruktur bereits vorhanden, Struktur leeren
+ ::std::vector<OTableRow*>::iterator aIter = m_vRowList.begin();
+ for(;aIter != m_vRowList.begin();++aIter)
+ delete *aIter;
+ m_vRowList.clear();
+
+ OTableRow* pTabEdRow = NULL;
+ Reference< XDatabaseMetaData> xMetaData = getConnection()->getMetaData();
+ //////////////////////////////////////////////////////////////////////
+ // Datenstruktur mit Daten aus DatenDefinitionsObjekt fuellen
+ if(m_xTable.is())
+ {
+ Reference<XColumnsSupplier> xColSup(m_xTable,UNO_QUERY);
+ OSL_ENSURE(xColSup.is(),"No XColumnsSupplier!");
+ Reference<XNameAccess> xColumns = xColSup->getColumns();
+ OFieldDescription* pActFieldDescr = NULL;
+ String aType;
+ //////////////////////////////////////////////////////////////////////
+ // ReadOnly-Flag
+ // Bei Drop darf keine Zeile editierbar sein.
+ // Bei Add duerfen nur die leeren Zeilen editierbar sein.
+ // Bei Add und Drop koennen alle Zeilen editiert werden.
+ Reference< XDatabaseMetaData> xMetaData = getConnection()->getMetaData();
+ sal_Bool bReadOldRow = xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn();
+ Sequence< ::rtl::OUString> aColumns = xColumns->getElementNames();
+ const ::rtl::OUString* pBegin = aColumns.getConstArray();
+ const ::rtl::OUString* pEnd = pBegin + aColumns.getLength();
+
+ for(;pBegin != pEnd;++pBegin)
+ {
+ Reference<XPropertySet> xColumn;
+ xColumns->getByName(*pBegin) >>= xColumn;
+ sal_Int32 nType = 0;
+ sal_Int32 nScale = 0;
+ sal_Int32 nPrecision = 0;
+ sal_Int32 nNullable = 0;
+ sal_Int32 nFormatKey = 0;
+ sal_Int32 nAlign = 0;
+
+ sal_Bool bIsAutoIncrement,bIsCurrency;
+ ::rtl::OUString sName,sDefaultValue,sDescription,sTypeName;
+
+ // get the properties from the column
+ xColumn->getPropertyValue(PROPERTY_NAME) >>= sName;
+ xColumn->getPropertyValue(PROPERTY_TYPENAME) >>= sTypeName;
+ xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable;
+ bIsAutoIncrement = ::cppu::any2bool(xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT));
+ bIsCurrency = ::cppu::any2bool(xColumn->getPropertyValue(PROPERTY_ISCURRENCY));
+ xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType;
+ xColumn->getPropertyValue(PROPERTY_SCALE) >>= nScale;
+ xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision;
+
+
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DESCRIPTION))
+ xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription;
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DEFAULTVALUE))
+ xColumn->getPropertyValue(PROPERTY_DEFAULTVALUE)>>= sDefaultValue;
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
+ xColumn->getPropertyValue(PROPERTY_FORMATKEY) >>= nFormatKey;
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
+ xColumn->getPropertyValue(PROPERTY_ALIGN) >>= nAlign;
+
+
+ pTabEdRow = new OTableRow();
+ pTabEdRow->SetReadOnly(bReadOldRow);
+ // search for type
+ ::std::pair<OTypeInfoMap::iterator, OTypeInfoMap::iterator> aPair = m_aTypeInfo.equal_range(nType);
+ OTypeInfoMap::iterator aIter = aPair.first;
+ if(aIter == m_aTypeInfo.end())
+ continue;
+ for(;aIter != aPair.second;++aIter)
+ {
+ // search the best matching type
+ if( aIter->second->aTypeName == sTypeName &&
+ aIter->second->nPrecision >= nPrecision &&
+ aIter->second->nMaximumScale >= nScale)
+ break;
+ }
+
+ pTabEdRow->SetFieldType( aIter->second );
+ pActFieldDescr = pTabEdRow->GetActFieldDescr();
+ pActFieldDescr->SetName(sName);
+ pActFieldDescr->SetFormatKey(nFormatKey);
+ // pActFieldDescr->SetPrimaryKey(pPrimary->GetValue());
+ pActFieldDescr->SetDescription(sDescription);
+ pActFieldDescr->SetAutoIncrement(bIsAutoIncrement);
+ pActFieldDescr->SetHorJustify((SvxCellHorJustify)nAlign);
+ pActFieldDescr->SetCurrency(bIsCurrency);
+
+ //////////////////////////////////////////////////////////////////////
+ // Spezielle Daten
+ pActFieldDescr->SetIsNullable(nNullable);
+ pActFieldDescr->SetDefaultValue(sDefaultValue);
+ pActFieldDescr->SetPrecision(nPrecision);
+ pActFieldDescr->SetScale(nScale);
+
+ m_vRowList.push_back( pTabEdRow);
+ }
+ // fill the primary key information
+ Reference<XNameAccess> xKeyColumns = getKeyColumns();
+ if(xKeyColumns.is())
+ {
+ Sequence< ::rtl::OUString> aKeyColumns = xKeyColumns->getElementNames();
+ const ::rtl::OUString* pKeyBegin = aKeyColumns.getConstArray();
+ const ::rtl::OUString* pKeyEnd = pKeyBegin + aKeyColumns.getLength();
+
+ for(;pKeyBegin != pKeyEnd;++pKeyBegin)
+ {
+ ::std::vector<OTableRow*>::iterator aIter = m_vRowList.begin();
+ for(;aIter != m_vRowList.end();++aIter)
+ {
+ if((*aIter)->GetActFieldDescr()->GetName() == *pKeyBegin)
+ {
+ (*aIter)->SetPrimaryKey(sal_True);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Leere Zeilen fuellen
+
+ OTypeInfoMap::iterator aTypeIter = m_aTypeInfo.find(DataType::VARCHAR);
+ if(aTypeIter == m_aTypeInfo.end())
+ aTypeIter = m_aTypeInfo.begin();
+
+ OSL_ENSURE(aTypeIter != m_aTypeInfo.end(),"We have no type infomation!");
+
+ sal_Bool bReadRow = m_xTable.is() && xMetaData->supportsAlterTableWithAddColumn();
+ for(sal_Int32 i=m_vRowList.size(); i<128; i++ )
+ {
+ pTabEdRow = new OTableRow();
+ pTabEdRow->SetReadOnly(bReadRow);
+ // pTabEdRow->SetFieldType( aTypeIter->second );
+ m_vRowList.push_back( pTabEdRow);
+ }
+
+ // da sich die FieldDescriptions geaendert haben und meine UI eventuell noch Referenzen darauf hat ...
+ // static_cast<OTableDesignView*>(getView())->GetEditorCtrl()->DisplayData(0);
+ // static_cast<OTableDesignView*>(getView())->GetTabDescWin()->Init();
+}
+// -----------------------------------------------------------------------------
+Reference<XNameAccess> OTableController::getKeyColumns() const
+{
+ // use keys and indexes for excat postioning
+ // first the keys
+ Reference<XKeysSupplier> xKeySup(m_xTable,UNO_QUERY);
+ Reference<XIndexAccess> xKeys;
+ if(xKeySup.is())
+ xKeys = xKeySup->getKeys();
+
+ Reference<XColumnsSupplier> xKeyColsSup;
+ Reference<XNameAccess> xKeyColumns;
+ if(xKeys.is())
+ {
+ Reference<XPropertySet> xProp;
+ for(sal_Int32 i=0;i< xKeys->getCount();++i)
+ {
+ xKeys->getByIndex(i) >>= xProp;
+ sal_Int32 nKeyType = 0;
+ xProp->getPropertyValue(PROPERTY_TYPE) >>= nKeyType;
+ if(KeyType::PRIMARY == nKeyType)
+ {
+ xKeyColsSup = Reference<XColumnsSupplier>(xProp,UNO_QUERY);
+ OSL_ENSURE(xKeyColsSup.is(),"Columnsupplier is null!");
+ xKeyColumns = xKeyColsSup->getColumns();
+ break;
+ }
+ }
+ }
+
+ return xKeyColumns;
+}
+// -----------------------------------------------------------------------------
+void OTableController::checkColumns()
+{
+ ::comphelper::UStringMixEqual bCase(m_xConnection->getMetaData()->storesMixedCaseQuotedIdentifiers());
+ ::std::vector<OTableRow*>::const_iterator aIter = m_vRowList.begin();
+ for(;aIter != m_vRowList.end();++aIter)
+ {
+ OFieldDescription* pFieldDesc = (*aIter)->GetActFieldDescr();
+ if (pFieldDesc && pFieldDesc->GetName().getLength())
+ {
+ sal_uInt16 nErrorRes = sal_uInt16(-1);
+ sal_uInt16 nFieldPos = sal_uInt16(-1);
+ // first check for duplicate names
+ ::std::vector<OTableRow*>::const_iterator aIter2 = aIter+1;
+ for(;aIter2 != m_vRowList.end();++aIter2)
+ {
+ OFieldDescription* pCompareDesc = (*aIter2)->GetActFieldDescr();
+ if (pCompareDesc && bCase(pCompareDesc->GetName(),pFieldDesc->GetName()))
+ {
+ String strMessage = String(ModuleRes(STR_TABLEDESIGN_DUPLICATE_NAME));
+ strMessage.SearchAndReplaceAscii("$column$", pFieldDesc->GetName());
+ throw SQLException(strMessage,*this,::rtl::OUString::createFromAscii("HY0000"),1000,Any());
+ }
+ }
+ }
+ }
+}
+// -----------------------------------------------------------------------------
+String OTableController::createUniqueName(const Reference<XNameAccess>& _rxTables,const String& _rDefault)
+{
+ String aName(_rDefault);
+ aName.SearchAndReplace(String::CreateFromAscii(" #"),String::CreateFromAscii("1"));
+
+ sal_Int32 nPos = 2;
+ while(_rxTables->hasByName(aName))
+ {
+ aName = _rDefault;
+ aName.SearchAndReplace(String::CreateFromAscii(" #"),String::CreateFromInt32(nPos++));
+ }
+ return aName;
+}
+// -----------------------------------------------------------------------------
+void OTableController::alterColumns()
+{
+ Reference<XColumnsSupplier> xColSup(m_xTable,UNO_QUERY);
+ OSL_ENSURE(xColSup.is(),"What happen here?!");
+
+ Reference<XNameAccess> xColumns = xColSup->getColumns();
+ OSL_ENSURE(xColumns.is(),"No columns");
+ Reference<XAlterTable> xAlter(m_xTable,UNO_QUERY);
+ Reference<XDrop> xDrop(xColumns,UNO_QUERY);
+ Reference<XAppend> xAppend(xColumns,UNO_QUERY);
+ Reference<XDataDescriptorFactory> xColumnFactory(xColumns,UNO_QUERY);
+
+ sal_Bool bReload = sal_False; // refresh the data
+
+ ::std::map< ::rtl::OUString,sal_Bool,::comphelper::UStringMixLess> aColumns(m_xConnection->getMetaData()->storesMixedCaseQuotedIdentifiers());
+ ::std::vector<OTableRow*>::iterator aIter = m_vRowList.begin();
+ for(;aIter != m_vRowList.end();++aIter)
+ {
+ OSL_ENSURE(*aIter,"OTableRow is null!");
+ OFieldDescription* pField = (*aIter)->GetActFieldDescr();
+ if(!pField)
+ continue;
+
+ Reference<XPropertySet> xColumn;
+ if(xColumns->hasByName(pField->GetName()))
+ {
+ aColumns[pField->GetName()] = sal_True;
+ xColumns->getByName(pField->GetName()) >>= xColumn;
+ OSL_ENSURE(xColumn.is(),"Column is null!");
+
+ sal_Int32 nType,nPrecision,nScale,nNullable,nFormatKey,nAlignment;
+ sal_Bool bAutoIncrement;
+ ::rtl::OUString sDescription,sDefaultValue;
+
+ xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType;
+ xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision;
+ xColumn->getPropertyValue(PROPERTY_SCALE) >>= nScale;
+ xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable;
+ bAutoIncrement = ::cppu::any2bool(xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT));
+ // xColumn->getPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(pField->IsCurrency()));
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DESCRIPTION))
+ xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription;
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DEFAULTVALUE))
+ xColumn->getPropertyValue(PROPERTY_DEFAULTVALUE) >>= sDefaultValue;
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
+ xColumn->getPropertyValue(PROPERTY_FORMATKEY) >>= nFormatKey;
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
+ xColumn->getPropertyValue(PROPERTY_ALIGN) >>= nAlignment;
+
+ // check if something changed
+ if((nType != pField->GetType() ||
+ nPrecision != pField->GetPrecision() ||
+ nScale != pField->GetScale() ||
+ nNullable != pField->GetIsNullable() ||
+ bAutoIncrement != pField->IsAutoIncrement() ||
+ sDescription != pField->GetDescription() ||
+ sDefaultValue != pField->GetDefaultValue()) &&
+ xColumnFactory.is())
+ {
+ Reference<XPropertySet> xNewColumn;
+ xNewColumn = xColumnFactory->createDataDescriptor();
+ setColumnProperties(xNewColumn,pField);
+ // first try to alter the column
+ sal_Bool bNotOk = sal_False;
+ try
+ {
+ if(xAlter.is())
+ xAlter->alterColumnByName(pField->GetName(),xNewColumn);
+ }
+ catch(SQLException&)
+ {
+ bNotOk = sal_True;
+ }
+ if((!xAlter.is() || bNotOk) && xDrop.is() && xAppend.is())
+ {
+ xDrop->dropByName(pField->GetName());
+ xAppend->appendByDescriptor(xNewColumn);
+ }
+ xNewColumn = NULL;
+ xColumns->getByName(pField->GetName()) >>= xColumn;
+ bReload = sal_True;
+ }
+
+ if(nFormatKey != pField->GetFormatKey())
+ {
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
+ xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
+ }
+ if(nAlignment != (sal_Int32)pField->GetHorJustify())
+ {
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
+ xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(nAlignment));
+ }
+ }
+ else if(xColumnFactory.is())
+ {
+ // Column is new
+ xColumn = xColumnFactory->createDataDescriptor();
+ setColumnProperties(xColumn,pField);
+ xAppend->appendByDescriptor(xColumn);
+ if(xColumns->hasByName(pField->GetName()))
+ {
+ xColumns->getByName(pField->GetName()) >>= xColumn;
+ if(xColumn.is())
+ {
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
+ xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
+ xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny((sal_Int32)pField->GetHorJustify()));
+ }
+ }
+ else
+ {
+ OSL_ASSERT(0);
+ }
+ }
+ }
+
+ Reference<XNameAccess> xKeyColumns = getKeyColumns();
+ // now we have to look for the columns who where deleted
+ if(xDrop.is())
+ {
+ Sequence< ::rtl::OUString> aColumnNames = xColumns->getElementNames();
+ const ::rtl::OUString* pBegin = aColumnNames.getConstArray();
+ const ::rtl::OUString* pEnd = pBegin + aColumnNames.getLength();
+ for(;pBegin != pEnd;++pBegin)
+ {
+ if(aColumns.find(*pBegin) == aColumns.end()) // found a column to delete
+ {
+ if(xKeyColumns.is() && xKeyColumns->hasByName(*pBegin)) // check if this column is a memeber of the primary key
+ {
+ String aMsgT(ModuleRes(STR_TBL_COLUMN_IS_KEYCOLUMN));
+ aMsgT.SearchAndReplace(String::CreateFromAscii("\"$column$\""),*pBegin);
+ String aTitle(ModuleRes(STR_TBL_COLUMN_IS_KEYCOLUMN_TITLE));
+ OSQLMessageBox aMsg(getView(),aTitle,aMsgT,WB_YES_NO| WB_DEF_YES);
+ if(aMsg.Execute() == RET_YES)
+ {
+ xKeyColumns = NULL;
+ dropKey();
+ }
+ else
+ {
+ bReload = sal_True;
+ continue;
+ }
+ }
+ Reference<XDrop> xDrop(xColumns,UNO_QUERY);
+ xDrop->dropByName(*pBegin);
+ }
+ }
+ }
+ // check if we have to do something with the primary key
+ if(xKeyColumns.is())
+ {
+ aIter = m_vRowList.begin();
+ for(;aIter != m_vRowList.end();++aIter)
+ {
+ OSL_ENSURE(*aIter,"OTableRow is null!");
+ OFieldDescription* pField = (*aIter)->GetActFieldDescr();
+ if(!pField)
+ continue;
+ if(pField->IsPrimaryKey() && !xKeyColumns->hasByName(pField->GetName()))
+ {
+ dropKey();
+ Reference<XKeysSupplier> xKeySup(m_xTable,UNO_QUERY);
+ appendKey(xKeySup);
+ break;
+ }
+ }
+ }
+ else
+ {
+ Reference<XKeysSupplier> xKeySup(m_xTable,UNO_QUERY);
+ appendKey(xKeySup);
+ }
+
+ if(bReload)
+ {
+ loadData(); // fill the column information form the table
+ getView()->initialize(); // show the windows and fill with our informations
+ getUndoMgr()->Clear(); // clear all undo redo things
+ setModified(sal_False); // and we are not modified yet
+ }
+}
+// -----------------------------------------------------------------------------
+void OTableController::setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDescription* _pFieldDesc)
+{
+ _rxColumn->setPropertyValue(PROPERTY_NAME,makeAny(_pFieldDesc->GetName()));
+ _rxColumn->setPropertyValue(PROPERTY_TYPE,makeAny(_pFieldDesc->GetType()));
+ _rxColumn->setPropertyValue(PROPERTY_TYPENAME,makeAny(_pFieldDesc->getTypeInfo()->aTypeName));
+ _rxColumn->setPropertyValue(PROPERTY_PRECISION,makeAny(_pFieldDesc->GetPrecision()));
+ _rxColumn->setPropertyValue(PROPERTY_SCALE,makeAny(_pFieldDesc->GetScale()));
+ _rxColumn->setPropertyValue(PROPERTY_ISNULLABLE, makeAny(_pFieldDesc->GetIsNullable()));
+ _rxColumn->setPropertyValue(PROPERTY_ISAUTOINCREMENT,::cppu::bool2any(_pFieldDesc->IsAutoIncrement()));
+ // _rxColumn->setPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(_pFieldDesc->IsCurrency()));
+ if(_rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DESCRIPTION))
+ _rxColumn->setPropertyValue(PROPERTY_DESCRIPTION,makeAny(_pFieldDesc->GetDescription()));
+ if(_rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DEFAULTVALUE))
+ _rxColumn->setPropertyValue(PROPERTY_DEFAULTVALUE,makeAny(_pFieldDesc->GetDefaultValue()));
+}
+// -----------------------------------------------------------------------------
+void OTableController::dropKey()
+{
+ Reference<XKeysSupplier> xKeySup(m_xTable,UNO_QUERY);
+ Reference<XIndexAccess> xKeys;
+ if(xKeySup.is())
+ xKeys = xKeySup->getKeys();
+
+ if(xKeys.is())
+ {
+ Reference<XPropertySet> xProp;
+ for(sal_Int32 i=0;i< xKeys->getCount();++i)
+ {
+ xKeys->getByIndex(i) >>= xProp;
+ sal_Int32 nKeyType = 0;
+ xProp->getPropertyValue(PROPERTY_TYPE) >>= nKeyType;
+ if(KeyType::PRIMARY == nKeyType)
+ {
+ Reference<XDrop> xDrop(xKeys,UNO_QUERY);
+ xDrop->dropByIndex(i); // delete the key
+ break;
+ }
+ }
+ }
+}
+// -----------------------------------------------------------------------------
+
+
+
+
+
+
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
new file mode 100644
index 000000000000..e6553928eaf4
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableDesignControl.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:26:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_TABLEDESIGNCONTROL_HXX
+#include "TableDesignControl.hxx"
+#endif
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+#ifndef _DBAUI_MODULE_DBU_HXX_
+#include "moduledbu.hxx"
+#endif
+#ifndef DBAUI_TABLEDESIGNVIEW_HXX
+#include "TableDesignView.hxx"
+#endif
+#ifndef DBUI_TABLECONTROLLER_HXX
+#include "TableController.hxx"
+#endif
+#ifndef DBACCESS_UI_BROWSER_ID_HXX
+#include "browserids.hxx"
+#endif
+#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
+#include <com/sun/star/util/URL.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include "dbaccess_helpid.hrc"
+#endif
+
+using namespace dbaui;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::util;
+//--- Defines
+#define HANDLE_ID 0
+
+//------------------------------------------------------------------------
+OTableRowView::OTableRowView(Window* pParent)
+ :DbBrowseBox(pParent, ModuleRes(RID_DB_TAB_EDITOR),DBBF_NONE,
+ BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_AUTOSIZE_LASTCOL |
+ BROWSER_KEEPSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL)
+ ,m_nDataPos(-1)
+ ,m_nCurrentPos(-1)
+ ,m_bUpdatable(FALSE)
+ ,m_bCurrentModified(FALSE)
+ ,m_bClipboardFilled(FALSE)
+ ,m_nCurUndoActId(0)
+{
+}
+
+//------------------------------------------------------------------------
+OTableRowView::~OTableRowView()
+{
+}
+
+//------------------------------------------------------------------------
+void OTableRowView::Init()
+{
+ DbBrowseBox::Init();
+
+// SetMapMode( MapMode(MAP_TWIP) );
+// GetDataWindow().SetMapMode( GetMapMode() );
+
+ Font aFont( GetDataWindow().GetFont() );
+ aFont.SetWeight( WEIGHT_NORMAL );
+ GetDataWindow().SetFont( aFont );
+
+ // Font fuer die Ueberschriften auf Light setzen
+ aFont = GetFont();
+ aFont.SetWeight( WEIGHT_LIGHT );
+ SetFont(aFont);
+
+ // HandleColumn, fuer maximal fuenf Ziffern einrichten
+ InsertHandleColumn(GetTextWidth('0') * 4/*, TRUE */);
+
+ BrowserMode nMode = BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION |
+ BROWSER_HLINESFULL | BROWSER_VLINESFULL | BROWSER_AUTOSIZE_LASTCOL;
+ if (IsUpdatable())
+ nMode |= BROWSER_HIDECURSOR;
+
+ SetMode(nMode);
+}
+
+//------------------------------------------------------------------------
+void OTableRowView::KeyInput( const KeyEvent& rEvt )
+{
+ if (IsUpdatable() && GetSelectRowCount())
+ {
+ if (rEvt.GetKeyCode().GetCode() == KEY_DELETE && // Delete rows
+ !rEvt.GetKeyCode().IsShift() &&
+ !rEvt.GetKeyCode().IsMod1())
+ {
+ DeleteRows();
+ return;
+ }
+ if( rEvt.GetKeyCode().GetCode() == KEY_F2 )
+ {
+ ::com::sun::star::util::URL aUrl;
+ aUrl.Complete =::rtl::OUString::createFromAscii(".uno:DBSlots/EditDoc");
+ GetView()->getController()->dispatch( aUrl,Sequence< PropertyValue >() );
+ }
+ }
+ DbBrowseBox::KeyInput(rEvt);
+}
+
+//------------------------------------------------------------------------
+void OTableRowView::SetUpdatable( BOOL bUpdate )
+{
+ m_bUpdatable = bUpdate;
+
+}
+
+//------------------------------------------------------------------------
+void OTableRowView::Command(const CommandEvent& rEvt)
+{
+
+ switch (rEvt.GetCommand())
+ {
+ case COMMAND_CONTEXTMENU:
+ {
+ if (!rEvt.IsMouseEvent())
+ {
+ DbBrowseBox::Command(rEvt);
+ return;
+ }
+
+ USHORT nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
+ long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
+ long nOldRow = GetCurRow();
+
+ if ( nColId == HANDLE_ID )
+ {
+ PopupMenu aContextMenu(ModuleRes(RID_TABLEDESIGNROWPOPUPMENU));
+ long nSelectRowCount = GetSelectRowCount();
+ aContextMenu.EnableItem( SID_CUT, nSelectRowCount != 0);
+ aContextMenu.EnableItem( SID_COPY, nSelectRowCount != 0);
+ aContextMenu.EnableItem( SID_PASTE, m_bClipboardFilled );
+ aContextMenu.EnableItem( SID_DELETE, IsUpdatable() && nSelectRowCount != 0 );
+ switch (aContextMenu.Execute(this, rEvt.GetMousePosPixel()))
+ {
+ case SID_CUT:
+ Cut();
+ break;
+ case SID_COPY:
+ Copy();
+ break;
+ case SID_PASTE:
+ Paste( nRow );
+ SetNoSelection();
+ GoToRow( nRow );
+ SeekRow( nRow );
+ break;
+
+ case SID_DELETE:
+ DeleteRows();
+ break;
+ case SID_TABLEDESIGN_INSERTROWS:
+ InsertNewRows( nRow );
+ SetNoSelection();
+ GoToRow( nRow );
+ SeekRow( nRow );
+ break;
+ default:
+ break;
+ }
+ }
+
+ }
+ default:
+ DbBrowseBox::Command(rEvt);
+ }
+
+}
+
+//------------------------------------------------------------------------------
+void OTableRowView::Cut()
+{
+ CopyRows();
+ DeleteRows();
+}
+
+//------------------------------------------------------------------------------
+void OTableRowView::Copy()
+{
+ CopyRows();
+}
+
+//------------------------------------------------------------------------------
+void OTableRowView::Paste()
+{
+ OSL_ENSURE(0,"OTableRowView::Paste : (pseudo-) abstract method called !");
+}
+
+//------------------------------------------------------------------------------
+void OTableRowView::Paste( long nRow )
+{
+ InsertRows( nRow );
+}
+
+//------------------------------------------------------------------------------
+DbBrowseBox::RowStatus OTableRowView::GetRowStatus(long nRow) const
+{
+ if (m_nCurrentPos >= 0 && m_nDataPos == m_nCurrentPos)
+ return CURRENT;
+ else
+ return CLEAN;
+}
+
+
+
diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
new file mode 100644
index 000000000000..ff0bd5e81750
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableDesignHelpBar.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:24:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEDESIGNHELPBAR_HXX
+#include "TableDesignHelpBar.hxx"
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SVEDIT_HXX
+#include <svtools/svmedit.hxx>
+#endif
+#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include "dbaccess_helpid.hrc"
+#endif
+
+using namespace dbaui;
+#define STANDARD_MARGIN 6
+//==================================================================
+// class OTableDesignHelpBar
+//==================================================================
+DBG_NAME(OTableDesignHelpBar);
+//------------------------------------------------------------------------------
+OTableDesignHelpBar::OTableDesignHelpBar( Window* pParent ) :
+ TabPage( pParent, WB_3DLOOK )
+{
+ DBG_CTOR(OTableDesignHelpBar,NULL);
+ m_pTextWin = new MultiLineEdit( this, WB_VSCROLL | WB_LEFT | WB_BORDER | WB_NOTABSTOP | WB_READONLY);
+ m_pTextWin->SetHelpId(HID_TABLE_DESIGN_HELP_WINDOW);
+ m_pTextWin->SetReadOnly();
+ m_pTextWin->SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() );
+ m_pTextWin->Show();
+}
+
+//------------------------------------------------------------------------------
+OTableDesignHelpBar::~OTableDesignHelpBar()
+{
+ DBG_DTOR(OTableDesignHelpBar,NULL);
+ delete m_pTextWin;
+}
+
+//------------------------------------------------------------------------------
+void OTableDesignHelpBar::SetHelpText( const String& rText )
+{
+ DBG_CHKTHIS(OTableDesignHelpBar,NULL);
+ m_pTextWin->SetText( rText );
+ Invalidate();
+}
+
+//------------------------------------------------------------------------------
+void OTableDesignHelpBar::Resize()
+{
+ DBG_CHKTHIS(OTableDesignHelpBar,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Abmessungen parent window
+ Size aOutputSize( GetOutputSizePixel() );
+
+ //////////////////////////////////////////////////////////////////////
+ // TextWin anpassen
+ m_pTextWin->SetPosSizePixel( Point(STANDARD_MARGIN+1, STANDARD_MARGIN+1),
+ Size(aOutputSize.Width()-(2*STANDARD_MARGIN)-2,
+ aOutputSize.Height()-(2*STANDARD_MARGIN)-2) );
+
+}
+
+//------------------------------------------------------------------------------
+long OTableDesignHelpBar::PreNotify( NotifyEvent& rNEvt )
+{
+ if (rNEvt.GetType() == EVENT_LOSEFOCUS)
+ SetHelpText(String());
+ return TabPage::PreNotify(rNEvt);
+}
+
+//==================================================================
+// class OFieldPropTabCtrl
+//==================================================================
+DBG_NAME(OFieldPropTabCtrl);
+//==================================================================
+OFieldPropTabCtrl::OFieldPropTabCtrl( Window* pParent, WinBits nWinStyle ) :
+ TabControl( pParent, nWinStyle )
+{
+ DBG_CTOR(OFieldPropTabCtrl,NULL);
+}
+
+//------------------------------------------------------------------------------
+OFieldPropTabCtrl::~OFieldPropTabCtrl()
+{
+ DBG_DTOR(OFieldPropTabCtrl,NULL);
+}
+
+
+
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
new file mode 100644
index 000000000000..8174eae7d4d6
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -0,0 +1,346 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableDesignView.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:25:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEDESIGNVIEW_HXX
+#include "TableDesignView.hxx"
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef DBUI_TABLECONTROLLER_HXX
+#include "TableController.hxx"
+#endif
+#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include "dbaccess_helpid.hrc"
+#endif
+#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include "FieldDescriptions.hxx"
+#endif
+#ifndef DBAUI_TABLEEDITORCONTROL_HXX
+#include "TEditControl.hxx"
+#endif
+#ifndef DBAUI_TABLEDESCRIPTIONWINDOW_HXX
+#include "TableDescWin.hxx"
+#endif
+#ifndef DBAUI_TABLEFIELDDESCRIPTION_HXX
+#include "TableFieldDescWin.hxx"
+#endif
+#ifndef _SV_TOOLBOX_HXX
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef DBAUI_TABLEROW_HXX
+#include "TableRow.hxx"
+#endif
+#ifndef _UTL_CONFIGMGR_HXX_
+#include <unotools/configmgr.hxx>
+#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+
+
+using namespace ::dbaui;
+using namespace ::utl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+
+//==================================================================
+// class OTableBorderWindow
+//==================================================================
+OTableBorderWindow::OTableBorderWindow(Window* pParent) : Window(pParent,WB_BORDER)
+ ,m_aHorzSplitter( this )
+{
+ ImplInitSettings( sal_True, sal_True, sal_True );
+ //////////////////////////////////////////////////////////////////////
+ // Childs erzeugen
+ m_pEditorCtrl = new OTableEditorCtrl( this);
+ m_pFieldDescWin = new OTableFieldDescWin( this );
+
+ m_pFieldDescWin->SetHelpId(HID_TAB_DESIGN_DESCWIN);
+
+ // set depending windows and controls
+ m_pEditorCtrl->SetDescrWin(m_pFieldDescWin);
+
+ //////////////////////////////////////////////////////////////////////
+ // Splitter einrichten
+ m_aHorzSplitter.SetSplitHdl( LINK(this, OTableBorderWindow, SplitHdl) );
+ m_aHorzSplitter.Show();
+}
+// -----------------------------------------------------------------------------
+OTableBorderWindow::~OTableBorderWindow()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Childs zerstoeren
+ m_pEditorCtrl->Hide();
+ m_pFieldDescWin->Hide();
+
+ delete m_pEditorCtrl;
+ delete m_pFieldDescWin;
+}
+// -----------------------------------------------------------------------------
+void OTableBorderWindow::Resize()
+{
+ const long nSplitterHeight(3);
+
+ //////////////////////////////////////////////////////////////////////
+ // Abmessungen parent window
+ Size aOutputSize( GetOutputSize() );
+ long nOutputWidth = aOutputSize.Width();
+ long nOutputHeight = aOutputSize.Height();
+ long nSplitPos = m_aHorzSplitter.GetSplitPosPixel();
+
+ //////////////////////////////////////////////////////////////////////
+ // Verschiebebereich Splitter mittleres Drittel des Outputs
+ long nDragPosY = nOutputHeight/3;
+ long nDragSizeHeight = nOutputHeight/3;
+ m_aHorzSplitter.SetDragRectPixel( Rectangle(Point(0,nDragPosY), Size(nOutputWidth,nDragSizeHeight) ), this );
+ if( (nSplitPos < nDragPosY) || (nSplitPos > (nDragPosY+nDragSizeHeight)) )
+ nSplitPos = nDragPosY+nDragSizeHeight-5;
+
+ //////////////////////////////////////////////////////////////////////
+ // Splitter setzen
+ m_aHorzSplitter.SetPosSizePixel( Point( 0, nSplitPos ), Size(nOutputWidth, nSplitterHeight));
+ m_aHorzSplitter.SetSplitPosPixel( nSplitPos );
+
+ //////////////////////////////////////////////////////////////////////
+ // Fenster setzen
+ long nEditCrtl_X = long(0.3 * nOutputWidth);
+
+ m_pEditorCtrl->SetPosSizePixel( Point(0, 0), Size(nOutputWidth , nSplitPos) );
+
+ m_pFieldDescWin->SetPosSizePixel( Point(0, nSplitPos+nSplitterHeight),
+ Size(nOutputWidth, nOutputHeight-nSplitPos-nSplitterHeight) );
+}
+//------------------------------------------------------------------------------
+IMPL_LINK( OTableBorderWindow, SplitHdl, Splitter*, pSplit )
+{
+ long nSplitPos = pSplit->GetSplitPosPixel();
+
+ if(pSplit == &m_aHorzSplitter)
+ {
+ long nTest = m_aHorzSplitter.GetPosPixel().Y();
+ m_aHorzSplitter.SetPosPixel( Point( m_aHorzSplitter.GetPosPixel().X(),m_aHorzSplitter.GetSplitPosPixel() ) );
+ Resize();
+ }
+ return 0;
+}
+// -----------------------------------------------------------------------------
+void OTableBorderWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
+{
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+
+ if ( bFont )
+ {
+ Font aFont = rStyleSettings.GetAppFont();
+ if ( IsControlFont() )
+ aFont.Merge( GetControlFont() );
+ SetPointFont( aFont );
+// Set/*Zoomed*/PointFont( aFont );
+ }
+
+ if ( bFont || bForeground )
+ {
+ Color aTextColor = rStyleSettings.GetButtonTextColor();
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
+ }
+
+ if ( bBackground )
+ {
+ if( IsControlBackground() )
+ SetBackground( GetControlBackground() );
+ else
+ SetBackground( rStyleSettings.GetFaceColor() );
+ }
+}
+// -----------------------------------------------------------------------
+void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
+ (rDCEvt.GetFlags() & SETTINGS_STYLE) )
+ {
+ ImplInitSettings( sal_True, sal_True, sal_True );
+ Invalidate();
+ }
+ else
+ Window::DataChanged( rDCEvt );
+}
+// -----------------------------------------------------------------------------
+void OTableBorderWindow::GetFocus()
+{
+ Window::GetFocus();
+
+ // forward the focus to the current cell of the editor control
+ if (m_pEditorCtrl)
+ m_pEditorCtrl->GrabFocus();
+}
+
+//==================================================================
+// class OTableDesignView
+//==================================================================
+DBG_NAME(OTableDesignView);
+//------------------------------------------------------------------------------
+OTableDesignView::OTableDesignView( Window* pParent,
+ const Reference< XMultiServiceFactory >& _rxOrb,
+ OTableController* _pController
+ ) :
+ ODataView( pParent ,_rxOrb )
+ ,m_pController(_pController)
+{
+ DBG_CTOR(OTableDesignView,NULL);
+
+ try
+ {
+ Any aValue = ConfigManager::GetDirectConfigProperty(ConfigManager::LOCALE);
+ m_aLocale.Language = ::comphelper::getString(aValue);
+ }
+ catch(Exception&)
+ {
+ }
+
+ m_pWin = new OTableBorderWindow(this);
+ m_pWin->Show();
+}
+
+//------------------------------------------------------------------------------
+OTableDesignView::~OTableDesignView()
+{
+ DBG_DTOR(OTableDesignView,NULL);
+ m_pWin->Hide();
+ delete m_pWin;
+}
+// -----------------------------------------------------------------------------
+void OTableDesignView::initialize()
+{
+ GetEditorCtrl()->Init();
+ GetDescWin()->Init();
+ // first call after the editctrl has been set
+
+ GetEditorCtrl()->Show();
+ GetDescWin()->Show();
+
+ GetEditorCtrl()->DisplayData(0);
+}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+void OTableDesignView::resizeControl(Rectangle& _rRect)
+{
+ Size aToolBoxSize;
+ ToolBox* pToolBox = getToolBox();
+ if(pToolBox)
+ aToolBoxSize = pToolBox->GetOutputSizePixel();
+ Size aSize = GetOutputSizePixel();
+
+ m_pWin->SetPosSizePixel(Point(0,aToolBoxSize.Height()),Size(aSize.Width(),aSize.Height() - aToolBoxSize.Height()));
+
+ aToolBoxSize.Width() = _rRect.getWidth();
+ _rRect.SetPos(Point(0,0));
+ _rRect.SetSize(aToolBoxSize);
+}
+//------------------------------------------------------------------------------
+IMPL_LINK( OTableDesignView, SwitchHdl, Accelerator*, pAcc )
+{
+ if( getController()->isReadOnly() )
+ return 0;
+
+ if( GetDescWin()->HasChildPathFocus() )
+ {
+ GetDescWin()->LoseFocus();
+ GetEditorCtrl()->GrabFocus();
+ }
+ else
+ {
+ OTableRow* pRow = (*GetEditorCtrl()->GetRowList())[GetEditorCtrl()->GetCurRow()];
+ OFieldDescription* pFieldDescr = pRow ? pRow->GetActFieldDescr() : NULL;
+ if (pFieldDescr)
+ GetDescWin()->GrabFocus();
+ else
+ GetEditorCtrl()->GrabFocus();
+ }
+
+ return 0;
+}
+// -----------------------------------------------------------------------------
+sal_Bool OTableDesignView::isCutAllowed()
+{
+ return sal_True;
+}
+// -----------------------------------------------------------------------------
+void OTableDesignView::copy()
+{
+}
+// -----------------------------------------------------------------------------
+void OTableDesignView::cut()
+{
+}
+// -----------------------------------------------------------------------------
+void OTableDesignView::paste()
+{
+}
+// set the view readonly or not
+void OTableDesignView::setReadOnly(sal_Bool _bReadOnly)
+{
+ GetDescWin()->SetReadOnly(_bReadOnly);
+ GetEditorCtrl()->SetReadOnly(_bReadOnly);
+}
+// ----------------------------------------------------------------------------- \ No newline at end of file
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
new file mode 100644
index 000000000000..2935c8f02bbc
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx
@@ -0,0 +1,181 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableFieldControl.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:26:39 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEFIELDCONTROL_HXX
+#include "TableFieldControl.hxx"
+#endif
+#ifndef DBAUI_TABLEDESIGNVIEW_HXX
+#include "TableDesignView.hxx"
+#endif
+#ifndef DBAUI_TABLEEDITORCONTROL_HXX
+#include "TEditControl.hxx"
+#endif
+#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
+#include "dbustrings.hrc"
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
+#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _COMPHELPER_TYPES_HXX_
+#include <comphelper/types.hxx>
+#endif
+#ifndef DBAUI_TYPEINFO_HXX
+#include "TypeInfo.hxx"
+#endif
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::lang;
+using namespace dbaui;
+
+//------------------------------------------------------------------
+void OTableFieldControl::CellModified(long nRow, sal_uInt16 nColId )
+{
+ GetCtrl()->CellModified(nRow,nColId);
+}
+//------------------------------------------------------------------
+OTableEditorCtrl* OTableFieldControl::GetCtrl()
+{
+ OTableDesignView* pDesignWin = static_cast<OTableDesignView*>(GetParent()->GetParent()->GetParent()->GetParent());
+ OSL_ENSURE(pDesignWin,"no view!");
+ return pDesignWin->GetEditorCtrl();
+}
+//------------------------------------------------------------------
+sal_Bool OTableFieldControl::IsReadOnly()
+{
+ sal_Bool bRead(GetCtrl()->IsReadOnly());
+ if( !bRead )
+ {
+ // Die Spalten einer ::com::sun::star::sdbcx::View knnen nicht verndert werden
+ Reference<XPropertySet> xTable = GetCtrl()->GetView()->getController()->getTable();
+ if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW"))
+ bRead = sal_True;
+ else
+ {
+ OTableRow* pCurRow = GetCtrl()->GetActRow();
+ if( pCurRow )
+ bRead = pCurRow->IsReadOnly();
+ }
+ }
+ return bRead;
+}
+//------------------------------------------------------------------
+void OTableFieldControl::ActivateAggregate( EControlType eType )
+{
+ switch(eType)
+ {
+ case tpColumnName:
+ case tpType:
+ break;
+ default:
+ OFieldDescControl::ActivateAggregate(eType);
+ }
+}
+//------------------------------------------------------------------
+void OTableFieldControl::DeactivateAggregate( EControlType eType )
+{
+ switch(eType)
+ {
+ case tpColumnName:
+ case tpType:
+ break;
+ default:
+ OFieldDescControl::DeactivateAggregate(eType);
+ }
+}
+// -----------------------------------------------------------------------------
+void OTableFieldControl::SetModified(BOOL bModified)
+{
+ GetCtrl()->GetView()->getController()->setModified(bModified);
+}
+// -----------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> OTableFieldControl::getMetaData()
+{
+ return GetCtrl()->GetView()->getController()->getConnection()->getMetaData();
+}
+// -----------------------------------------------------------------------------
+Reference< XNumberFormatter > OTableFieldControl::GetFormatter()
+{
+ return GetCtrl()->GetView()->getController()->getNumberFormatter();
+}
+// -----------------------------------------------------------------------------
+const OTypeInfo* OTableFieldControl::getTypeInfo(sal_Int32 _nPos)
+{
+ return GetCtrl()->GetView()->getController()->getTypeInfo(_nPos);
+}
+// -----------------------------------------------------------------------------
+const OTypeInfoMap* OTableFieldControl::getTypeInfo() const
+{
+ return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getController()->getTypeInfo();
+}
+// -----------------------------------------------------------------------------
+Locale OTableFieldControl::GetLocale() const
+{
+ return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getLocale();
+}
+// -----------------------------------------------------------------------------
+
+
+
+
diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
new file mode 100644
index 000000000000..5cdbdbce3738
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableFieldControl.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:24:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEFIELDCONTROL_HXX
+#define DBAUI_TABLEFIELDCONTROL_HXX
+
+#ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
+#include "FieldDescControl.hxx"
+#endif
+
+namespace dbaui
+{
+ class OTableEditorCtrl;
+ class OTableDesignHelpBar;
+ //==================================================================
+ // OTableFieldControl
+ //==================================================================
+ class OTableFieldControl : public OFieldDescControl
+ {
+ OTableEditorCtrl* GetCtrl();
+ protected:
+ virtual void ActivateAggregate( EControlType eType );
+ virtual void DeactivateAggregate( EControlType eType );
+ // Sind von den abgeleiteten Klassen zu impl.
+ virtual void CellModified(long nRow, USHORT nColId );
+ virtual BOOL IsReadOnly();
+ virtual void SetModified(BOOL bModified);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter();
+
+ virtual ::com::sun::star::lang::Locale GetLocale() const;
+
+ virtual const OTypeInfo* getTypeInfo(sal_Int32 _nPos);
+ virtual const OTypeInfoMap* getTypeInfo() const;
+
+ public:
+ OTableFieldControl( Window* pParent, OTableDesignHelpBar* pHelpBar) :OFieldDescControl(pParent,pHelpBar) {};
+
+
+ String BoolStringPersistent(const String& rUIString) const { return OFieldDescControl::BoolStringPersistent(rUIString); }
+ String BoolStringUI(const String& rPersistentString) const { return OFieldDescControl::BoolStringUI(rPersistentString); }
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> getMetaData();
+ };
+}
+#endif // DBAUI_TABLEFIELDCONTROL_HXX
+
+
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
new file mode 100644
index 000000000000..8d36b1354d6b
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableFieldDescWin.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:25:40 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_TABLEFIELDDESCRIPTION_HXX
+#include "TableFieldDescWin.hxx"
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include "FieldDescriptions.hxx"
+#endif
+#ifndef _DBAUI_MODULE_DBU_HXX_
+#include "moduledbu.hxx"
+#endif
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include "FieldDescriptions.hxx"
+#endif
+#ifndef DBAUI_TABLEDESIGNHELPBAR_HXX
+#include "TableDesignHelpBar.hxx"
+#endif
+#ifndef _SV_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include "dbaccess_helpid.hrc"
+#endif
+
+#define STANDARD_MARGIN 6
+#define DETAILS_HEADER_HEIGHT 25
+#define CONTROL_SPACING_X 18 // 6
+#define CONTROL_SPACING_Y 5
+#define CONTROL_HEIGHT 20
+#define CONTROL_WIDTH_1 140 // 100
+#define CONTROL_WIDTH_2 100 // 60
+#define CONTROL_WIDTH_3 250
+#define CONTROL_WIDTH_4 (CONTROL_WIDTH_3 - CONTROL_HEIGHT - 5)
+#define DETAILS_OPT_PAGE_WIDTH (CONTROL_WIDTH_1 + CONTROL_SPACING_X + CONTROL_WIDTH_4 + 50)
+#define DETAILS_OPT_PAGE_HEIGHT ((CONTROL_HEIGHT + CONTROL_SPACING_Y) * 5)
+#define DETAILS_MIN_HELP_WIDTH 100
+#define DETAILS_OPT_HELP_WIDTH 200
+#define DETAILS_MIN_HELP_HEIGHT 50
+#define DETAILS_OPT_HELP_HEIGHT 100
+
+
+using namespace dbaui;
+//==================================================================
+// class OTableFieldDescWin
+//==================================================================
+DBG_NAME(OTableFieldDescWin);
+//------------------------------------------------------------------------------
+OTableFieldDescWin::OTableFieldDescWin( Window* pParent)
+ :TabPage(pParent, WB_3DLOOK)
+{
+ DBG_CTOR(OTableFieldDescWin,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Header
+ m_pHeader = new FixedText( this, WB_CENTER | WB_INFO ); // | WB_3DLOOK
+ m_pHeader->SetText( String(ModuleRes(STR_TAB_PROPERTIES)) );
+ m_pHeader->Show();
+
+ //////////////////////////////////////////////////////////////////////
+ // HelpBar
+ m_pHelpBar = new OTableDesignHelpBar( this );
+ m_pHelpBar->SetHelpId(HID_TAB_DESIGN_HELP_TEXT_FRAME);
+ m_pHelpBar->Show();
+
+ m_pGenPage = new OFieldDescGenWin( this, m_pHelpBar );
+ m_pGenPage->SetHelpId( HID_TABLE_DESIGN_TABPAGE_GENERAL );
+ m_pGenPage->Show();
+}
+
+//------------------------------------------------------------------------------
+OTableFieldDescWin::~OTableFieldDescWin()
+{
+ DBG_DTOR(OTableFieldDescWin,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Childs zerstoeren
+ m_pHelpBar->Hide();
+ m_pGenPage->Hide();
+ m_pHeader->Hide();
+
+ delete m_pHelpBar;
+ delete m_pGenPage;
+ delete m_pHeader;
+}
+
+//------------------------------------------------------------------------------
+void OTableFieldDescWin::Init()
+{
+ DBG_ASSERT(m_pGenPage != NULL, "OTableFieldDescWin::Init : ups ... no GenericPage ... this will crash ...");
+ m_pGenPage->Init();
+}
+
+//------------------------------------------------------------------------------
+void OTableFieldDescWin::SetReadOnly( sal_Bool bRead )
+{
+ DBG_CHKTHIS(OTableFieldDescWin,NULL);
+ m_pGenPage->SetReadOnly( bRead );
+}
+
+//------------------------------------------------------------------------------
+void OTableFieldDescWin::DisplayData( OFieldDescription* pFieldDescr )
+{
+ DBG_CHKTHIS(OTableFieldDescWin,NULL);
+ m_pGenPage->DisplayData( pFieldDescr );
+}
+
+//------------------------------------------------------------------------------
+void OTableFieldDescWin::SaveData( OFieldDescription* pFieldDescr )
+{
+ DBG_CHKTHIS(OTableFieldDescWin,NULL);
+ m_pGenPage->SaveData( pFieldDescr );
+}
+
+//------------------------------------------------------------------------------
+void OTableFieldDescWin::Paint( const Rectangle& rRect )
+{
+ DBG_CHKTHIS(OTableFieldDescWin,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // 3D-Linie am oberen Fensterrand
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+
+ SetLineColor( rStyleSettings.GetLightColor() );
+ DrawLine( Point(0,0), Point(GetSizePixel().Width(),0) );
+
+ //////////////////////////////////////////////////////////////////////
+ // 3D-Linie zum Abtrennen des Headers
+ DrawLine( Point(3, DETAILS_HEADER_HEIGHT), Point(GetSizePixel().Width()-6, DETAILS_HEADER_HEIGHT) );
+ SetLineColor( rStyleSettings.GetShadowColor() );
+ DrawLine( Point(3, DETAILS_HEADER_HEIGHT-1), Point(GetSizePixel().Width()-6, DETAILS_HEADER_HEIGHT-1) );
+}
+
+//------------------------------------------------------------------------------
+void OTableFieldDescWin::Resize()
+{
+ DBG_CHKTHIS(OTableFieldDescWin,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Abmessungen parent window
+ Size aOutputSize( GetOutputSizePixel() );
+ long nOutputWidth = aOutputSize.Width();
+ long nOutputHeight = aOutputSize.Height();
+
+ // da die GenPage scrollen kann, ich selber aber nicht, positioniere ich das HelpFenster, wenn ich zu schmal werde,
+ // _unter_ der Genpage, nicht rechts daneben. Zuvor versuche ich aber noch, es etwas schmaler zu machen
+
+ long nHelpX, nHelpY;
+ long nHelpWidth, nHelpHeight;
+ long nPageWidth, nPageHeight;
+
+ // passen beide nebeneinander (Rand + Page + Rand + Help) ?
+ if (STANDARD_MARGIN + DETAILS_OPT_PAGE_WIDTH + STANDARD_MARGIN + DETAILS_MIN_HELP_WIDTH <= nOutputWidth)
+ { // ja -> dann ist die Frage, ob man der Hilfe ihre Optimal-Breite geben kann
+ nHelpWidth = DETAILS_OPT_HELP_WIDTH;
+ nPageWidth = nOutputWidth - nHelpWidth - STANDARD_MARGIN - STANDARD_MARGIN;
+ if (nPageWidth < DETAILS_OPT_PAGE_WIDTH)
+ { // dann doch lieber die Hilfe von ihrer optimalen in Richtung auf die minimale Groesse
+ long nTransfer = DETAILS_OPT_PAGE_WIDTH - nPageWidth;
+ nPageWidth += nTransfer;
+ nHelpWidth -= nTransfer;
+ }
+ nHelpX = nOutputWidth - nHelpWidth;
+ // die Hoehen sind dann einfach ...
+ nHelpY = DETAILS_HEADER_HEIGHT + 1;
+ nHelpHeight = nOutputHeight - nHelpY;
+ nPageHeight = nOutputHeight - STANDARD_MARGIN - DETAILS_HEADER_HEIGHT - STANDARD_MARGIN;
+ }
+ else
+ { // nebeneinander geht nicht, also untereinander (Rand + Header + Page + Help)
+ if (STANDARD_MARGIN + DETAILS_HEADER_HEIGHT + DETAILS_OPT_PAGE_HEIGHT + DETAILS_MIN_HELP_HEIGHT <= nOutputHeight)
+ { // es reicht zumindest, um beide untereinander (Page optimal, Help minimal) unterzubringen
+ nHelpHeight = DETAILS_OPT_HELP_HEIGHT;
+ nPageHeight = nOutputHeight - nHelpHeight - DETAILS_HEADER_HEIGHT - STANDARD_MARGIN;
+ if (nPageHeight < DETAILS_OPT_PAGE_HEIGHT)
+ { // wie oben : Page optimal, Hilfe soviel wie eben bleibt (das ist groesser/gleich ihrem Minimum)
+ long nTransfer = DETAILS_OPT_PAGE_HEIGHT - nPageHeight;
+ nPageHeight += nTransfer;
+ nHelpHeight -= nTransfer;
+ }
+ nHelpY = nOutputHeight - nHelpHeight;
+ // und ueber die ganze Breite
+ nHelpX = 0; // ohne Margin, da das HelpCtrl einen eigenen hat
+ nHelpWidth = nOutputWidth; // dito
+ nPageWidth = nOutputWidth - STANDARD_MARGIN - STANDARD_MARGIN;
+ }
+ else
+ { // dummerweise reicht es nicht mal, um Page optimal und Help minimal zu zeigen
+ nHelpX = nHelpY = nHelpWidth = nHelpHeight = 0; // -> kein Help-Fenster
+ nPageWidth = nOutputWidth - STANDARD_MARGIN - STANDARD_MARGIN;
+ nPageHeight = nOutputHeight - STANDARD_MARGIN - DETAILS_HEADER_HEIGHT - STANDARD_MARGIN;
+ }
+ }
+
+ m_pHeader->SetPosSizePixel( Point(0, STANDARD_MARGIN), Size(nOutputWidth, 15) );
+
+ m_pGenPage->SetPosSizePixel(Point ( STANDARD_MARGIN,
+ STANDARD_MARGIN + DETAILS_HEADER_HEIGHT
+ ),
+ Size ( nPageWidth,
+ nPageHeight
+ )
+ );
+ if (nHelpHeight)
+ {
+ m_pHelpBar->Show();
+ m_pHelpBar->SetPosSizePixel(Point ( nHelpX,
+ nHelpY
+ ),
+ Size ( nHelpWidth,
+ nHelpHeight
+ )
+ );
+ }
+ else
+ {
+ m_pHelpBar->Hide();
+ }
+ Invalidate();
+}
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
new file mode 100644
index 000000000000..03b8610b1f6d
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableFieldDescWin.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:26:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEFIELDDESCRIPTION_HXX
+#define DBAUI_TABLEFIELDDESCRIPTION_HXX
+
+#ifndef _SV_TABPAGE_HXX
+#include <vcl/tabpage.hxx>
+#endif
+#ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX
+#include "FieldDescGenWin.hxx"
+#endif
+
+class FixedText;
+namespace dbaui
+{
+ class OFieldDescGenWin;
+ class OTableDesignHelpBar;
+ class OFieldPropTabCtrl;
+ class OFieldDescription;
+ //==================================================================
+ // Ableitung von TabPage ist ein Trick von TH,
+ // um Aenderungen der Systemfarben zu bemerken (Bug #53905)
+ class OTableFieldDescWin : public TabPage
+ {
+ private:
+ OTableDesignHelpBar* m_pHelpBar;
+ OFieldDescGenWin* m_pGenPage;
+ OFieldPropTabCtrl* m_pTabControl;
+ FixedText* m_pHeader;
+
+ protected:
+ virtual void Resize();
+ virtual void Paint( const Rectangle& rRect );
+
+ public:
+ OTableFieldDescWin( Window* pParent);
+ virtual ~OTableFieldDescWin();
+
+ virtual void Init();
+
+ void DisplayData( OFieldDescription* pFieldDescr );
+ void SaveData( OFieldDescription* pFieldDescr );
+ void SetReadOnly( BOOL bReadOnly );
+
+ BOOL ChildHasFocus(){ return m_pGenPage->HasChildPathFocus(); }
+ virtual void GetFocus(){ m_pGenPage->GetFocus(); }
+ virtual void LoseFocus(){ m_pGenPage->LoseFocus(); }
+ void SetControlText( USHORT nControlId, const String& rText )
+ { m_pGenPage->SetControlText(nControlId,rText); }
+ String GetControlText( USHORT nControlId )
+ { return m_pGenPage->GetControlText(nControlId); }
+
+ // short GetFormatCategory(OFieldDescription* pFieldDescr) { return m_pGenPage ? m_pGenPage->GetFormatCategory(pFieldDescr) : -1; }
+ // liefert zum am Feld eingestellten Format einen der CAT_xxx-Werte (CAT_NUMBER, CAT_DATE ...)
+ void ActivatePropertyField(USHORT nVirtualField) { if (m_pGenPage) m_pGenPage->ActivatePropertyField(nVirtualField); }
+ // Parameter ist einer der FIELD_PROPERTY_xxx-Werte, das entsprechende Control wird aktiviert, wenn vorhanden
+
+ String BoolStringPersistent(const String& rUIString) const { return m_pGenPage->BoolStringPersistent(rUIString); }
+ String BoolStringUI(const String& rPersistentString) const { return m_pGenPage->BoolStringUI(rPersistentString); }
+ };
+}
+#endif // DBAUI_TABLEFIELDDESCRIPTION_HXX
+
+
+
+
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
new file mode 100644
index 000000000000..c97a29526d17
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableRow.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:24:43 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEROW_HXX
+#include "TableRow.hxx"
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include "FieldDescriptions.hxx"
+#endif
+#include <algorithm>
+
+using namespace dbaui;
+using namespace ::com::sun::star::sdbc;
+//========================================================================
+// class OTableRow
+//========================================================================
+DBG_NAME(OTableRow);
+//------------------------------------------------------------------------------
+OTableRow::OTableRow()
+ :m_pActFieldDescr( NULL )
+ ,m_nPos( -1 )
+ ,m_bReadOnly( sal_False )
+ ,m_bFirstNameModify( sal_True )
+ ,m_bFirstDescrModify( sal_True )
+{
+ DBG_CTOR(OTableRow,NULL);
+}
+
+//------------------------------------------------------------------------------
+OTableRow::OTableRow( const OTableRow& rRow, long nPosition ) :
+ m_nPos( nPosition )
+ ,m_bReadOnly(rRow.IsReadOnly())
+ ,m_bFirstNameModify(rRow.IsFirstNameModify())
+ ,m_bFirstDescrModify(rRow.IsFirstDescrModify())
+{
+ DBG_CTOR(OTableRow,NULL);
+
+ m_pActFieldDescr = new OFieldDescription(*rRow.GetActFieldDescr());
+}
+
+//------------------------------------------------------------------------------
+OTableRow::~OTableRow()
+{
+ DBG_DTOR(OTableRow,NULL);
+}
+
+//------------------------------------------------------------------------------
+void OTableRow::SetPrimaryKey( sal_Bool bSet )
+{
+ DBG_CHKTHIS(OTableRow,NULL);
+ if(m_pActFieldDescr)
+ m_pActFieldDescr->SetPrimaryKey(bSet);
+}
+// -----------------------------------------------------------------------------
+sal_Bool OTableRow::IsPrimaryKey() const
+{
+ DBG_CHKTHIS(OTableRow,NULL);
+ return m_pActFieldDescr && m_pActFieldDescr->IsPrimaryKey();
+}
+// -----------------------------------------------------------------------------
+void OTableRow::SetFieldType( const OTypeInfo* _pType )
+{
+ DBG_CHKTHIS(OTableRow,NULL);
+ if(_pType)
+ {
+ if( !m_pActFieldDescr )
+ {
+ m_pActFieldDescr = new OFieldDescription();
+ switch(_pType->nType)
+ {
+ case DataType::CHAR:
+ case DataType::VARCHAR:
+ m_pActFieldDescr->SetPrecision(::std::min(sal_Int32(50),_pType->nPrecision));
+ break;
+ default:
+ if(_pType->nPrecision && _pType->nMaximumScale)
+ {
+ m_pActFieldDescr->SetPrecision(5);
+ m_pActFieldDescr->SetScale(0);
+ }
+ else if(_pType->nPrecision)
+ m_pActFieldDescr->SetPrecision(::std::min(sal_Int32(16),_pType->nPrecision));
+ }
+ }
+ // type checking
+ if(m_pActFieldDescr->GetPrecision() > _pType->nPrecision)
+ m_pActFieldDescr->SetPrecision(_pType->nPrecision);
+ if(m_pActFieldDescr->GetScale() > _pType->nMaximumScale)
+ m_pActFieldDescr->SetScale(0);
+ if(!_pType->bNullable && m_pActFieldDescr->IsNullable())
+ m_pActFieldDescr->SetIsNullable(ColumnValue::NO_NULLS);
+ if(!_pType->bAutoIncrement && m_pActFieldDescr->IsAutoIncrement())
+ m_pActFieldDescr->SetAutoIncrement(sal_False);
+
+
+ m_pActFieldDescr->SetType(_pType);
+ }
+ else
+ {
+ delete m_pActFieldDescr;
+ m_pActFieldDescr = NULL;
+ }
+}
+// -----------------------------------------------------------------------------
+
+
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
new file mode 100644
index 000000000000..c1c82138c16f
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -0,0 +1,513 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableUndo.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:26:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEUNDO_HXX
+#include "TableUndo.hxx"
+#endif
+#ifndef _DBAUI_MODULE_DBU_HXX_
+#include "moduledbu.hxx"
+#endif
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+#ifndef DBAUI_TABLEEDITORCONTROL_HXX
+#include "TEditControl.hxx"
+#endif
+#ifndef DBAUI_TABLEROW_HXX
+#include "TableRow.hxx"
+#endif
+#ifndef DBACCESS_UI_BROWSER_ID_HXX
+#include "browserids.hxx"
+#endif
+#ifndef DBUI_TABLECONTROLLER_HXX
+#include "TableController.hxx"
+#endif
+#ifndef DBAUI_TABLEDESIGNVIEW_HXX
+#include "TableDesignView.hxx"
+#endif
+#ifndef DBAUI_FIELDDESCRIPTIONS_HXX
+#include "FieldDescriptions.hxx"
+#endif
+using namespace dbaui;
+
+//==============================================================================
+// class OTableDesignUndoAct
+//==============================================================================
+OTableDesignUndoAct::OTableDesignUndoAct( OTableRowView* pOwner,USHORT nCommentID ) : OCommentUndoAction(nCommentID)
+ ,m_pTabDgnCtrl( pOwner )
+{
+ m_pTabDgnCtrl->m_nCurUndoActId++;
+}
+
+//-------------------------------------------------------------------------
+OTableDesignUndoAct::~OTableDesignUndoAct()
+{
+}
+
+//-------------------------------------------------------------------------
+void OTableDesignUndoAct::Undo()
+{
+ m_pTabDgnCtrl->m_nCurUndoActId--;
+
+ //////////////////////////////////////////////////////////////////////
+ // Wenn erstes Undo zurueckgenommen wurde, ist Doc nicht modifiziert worden
+ if( m_pTabDgnCtrl->m_nCurUndoActId == 0 )
+ {
+ m_pTabDgnCtrl->GetView()->getController()->setModified(sal_False);
+ m_pTabDgnCtrl->GetView()->getController()->InvalidateFeature(SID_SAVEDOC);
+ }
+}
+
+//-------------------------------------------------------------------------
+void OTableDesignUndoAct::Redo()
+{
+ m_pTabDgnCtrl->m_nCurUndoActId++;
+
+ //////////////////////////////////////////////////////////////////////
+ // Wenn Redo fuer erste Undo-Action, muss Modified-Flag wieder gesetzt werden
+ if( m_pTabDgnCtrl->m_nCurUndoActId > 0 )
+ {
+ m_pTabDgnCtrl->GetView()->getController()->setModified(sal_True);
+ m_pTabDgnCtrl->GetView()->getController()->InvalidateFeature(SID_SAVEDOC);
+ }
+}
+//==============================================================================
+// class OTableDesignCellUndoAct
+//==============================================================================
+OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, USHORT nColumn ) :
+ OTableDesignUndoAct( pOwner ,STR_TABED_UNDO_CELLMODIFIED)
+ ,m_nRow( nRowID )
+ ,m_nCol( nColumn )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Text an der Position (m_nRow, m_nCol) auslesen
+ m_sOldText = m_pTabDgnCtrl->GetData( m_nRow, m_nCol );
+}
+
+//-------------------------------------------------------------------------
+OTableDesignCellUndoAct::~OTableDesignCellUndoAct()
+{
+}
+
+//-------------------------------------------------------------------------
+void OTableDesignCellUndoAct::Undo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Neuen Text der alten Zelle speichern und alten wieder einsetzen
+ m_pTabDgnCtrl->ActivateCell( m_nRow, m_nCol );
+ m_sNewText = m_pTabDgnCtrl->GetData( m_nRow, m_nCol );
+ m_pTabDgnCtrl->SetData( m_nRow, m_nCol, m_sOldText );
+ //////////////////////////////////////////////////////////////////////
+ // Wenn erstes Undo zurueckgenommen wurde, ist Zelle nicht mehr modifiziert
+ if (m_pTabDgnCtrl->GetCurUndoActId() == 1)
+ {
+ DbCellControllerRef xController = m_pTabDgnCtrl->Controller();
+ if(xController.Is())
+ xController->ClearModified();
+ m_pTabDgnCtrl->GetView()->getController()->setModified(sal_False);
+
+ }
+
+ OTableDesignUndoAct::Undo();
+}
+
+//-------------------------------------------------------------------------
+void OTableDesignCellUndoAct::Redo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Neuen Text wieder einseten
+ m_pTabDgnCtrl->ActivateCell( m_nRow, m_nCol );
+ m_pTabDgnCtrl->SetData( m_nRow, m_nCol, m_sNewText );
+
+ OTableDesignUndoAct::Redo();
+}
+
+//==============================================================================
+// class OTableEditorUndoAct
+//==============================================================================
+OTableEditorUndoAct::OTableEditorUndoAct( OTableEditorCtrl* pOwner,USHORT _nCommentID ) :
+ OTableDesignUndoAct( pOwner ,_nCommentID)
+ ,pTabEdCtrl(pOwner)
+{
+}
+
+//-------------------------------------------------------------------------
+OTableEditorUndoAct::~OTableEditorUndoAct()
+{
+}
+
+//==============================================================================
+// class OTableEditorTypeSelUndoAct
+//==============================================================================
+OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, USHORT nColumn, const OTypeInfo* _pOldType ) :
+ OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED)
+ ,m_nRow( nRowID )
+ ,m_nCol( nColumn )
+ ,m_pOldType( _pOldType )
+{
+}
+
+//-------------------------------------------------------------------------
+OTableEditorTypeSelUndoAct::~OTableEditorTypeSelUndoAct()
+{
+}
+
+//-------------------------------------------------------------------------
+void OTableEditorTypeSelUndoAct::Undo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Typ zuruecksetzen
+ pTabEdCtrl->GoToRow( m_nRow );
+ pTabEdCtrl->GoToColumnId( m_nCol );
+ OFieldDescription* pFieldDesc = pTabEdCtrl->GetActRow()->GetActFieldDescr();
+ if(pFieldDesc)
+ m_pNewType = pFieldDesc->getTypeInfo();
+ pTabEdCtrl->SetData(m_nRow,m_nCol,m_pOldType);
+ pTabEdCtrl->SwitchType( m_pOldType );
+
+ OTableEditorUndoAct::Undo();
+}
+
+//-------------------------------------------------------------------------
+void OTableEditorTypeSelUndoAct::Redo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Neuen Typ
+ pTabEdCtrl->GoToRow( m_nRow );
+ pTabEdCtrl->GoToColumnId( m_nCol );
+ pTabEdCtrl->SetData(m_nRow,m_nCol,m_pNewType);
+
+ OTableEditorUndoAct::Redo();
+}
+
+//==============================================================================
+// class OTableEditorDelUndoAct
+//==============================================================================
+OTableEditorDelUndoAct::OTableEditorDelUndoAct( OTableEditorCtrl* pOwner) :
+ OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_ROWDELETED)
+{
+ //////////////////////////////////////////////////////////////////////
+ // DeletedRowList fuellen
+ ::std::vector<OTableRow*>* pOriginalRows = pOwner->GetRowList();
+ long nIndex = pOwner->FirstSelectedRow();
+ OTableRow* pOriginalRow;
+ OTableRow* pNewRow;
+
+ while( nIndex >= 0 )
+ {
+ pOriginalRow = (*pOriginalRows)[nIndex];
+ pNewRow = new OTableRow( *pOriginalRow, nIndex );
+ m_aDeletedRows.push_back( pNewRow);
+
+ nIndex = pOwner->NextSelectedRow();
+ }
+}
+
+//-------------------------------------------------------------------------
+OTableEditorDelUndoAct::~OTableEditorDelUndoAct()
+{
+ //////////////////////////////////////////////////////////////////////
+ // DeletedRowList loeschen
+ ::std::vector<OTableRow*>::iterator aIter = m_aDeletedRows.begin();
+ for(;aIter != m_aDeletedRows.end();++aIter)
+ delete *aIter;
+
+ m_aDeletedRows.clear();
+}
+
+//-------------------------------------------------------------------------
+void OTableEditorDelUndoAct::Undo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Geloeschte Zeilen wieder einfuegen
+ ULONG nPos;
+ ::std::vector<OTableRow*>::iterator aIter = m_aDeletedRows.begin();
+
+ OTableRow* pNewOrigRow;
+ ::std::vector<OTableRow*>* pOriginalRows = pTabEdCtrl->GetRowList();
+
+ for(;aIter != m_aDeletedRows.end();++aIter)
+ {
+ pNewOrigRow = new OTableRow( **aIter );
+ nPos = (*aIter)->GetPos();
+ pOriginalRows->insert( pOriginalRows->begin()+nPos,pNewOrigRow);
+ }
+
+ pTabEdCtrl->Invalidate();
+ OTableEditorUndoAct::Undo();
+}
+
+//-------------------------------------------------------------------------
+void OTableEditorDelUndoAct::Redo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Zeilen wieder loeschen
+ ULONG nPos;
+ ::std::vector<OTableRow*>::iterator aIter = m_aDeletedRows.begin();
+ ::std::vector<OTableRow*>* pOriginalRows = pTabEdCtrl->GetRowList();
+
+ for(;aIter != m_aDeletedRows.end();++aIter)
+ {
+ nPos = (*aIter)->GetPos();
+ delete (*pOriginalRows)[ nPos];
+ pOriginalRows->erase( pOriginalRows->begin()+nPos );
+ }
+
+ pTabEdCtrl->Invalidate();
+ OTableEditorUndoAct::Redo();
+}
+
+//-------------------------------------------------------------------------
+//==============================================================================
+// class OTableEditorInsUndoAct
+//==============================================================================
+OTableEditorInsUndoAct::OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition ) :
+ OTableEditorUndoAct( pOwner,STR_TABED_UNDO_ROWINSERTED )
+ ,m_nInsPos( nInsertPosition )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Clipboard-Inhalt in InsertedRowList kopieren
+ ::std::vector<OTableRow*>* pClipboardList = pOwner->GetClipboardRowList();
+ ::std::vector<OTableRow*>::iterator aIter = pClipboardList->begin();
+
+ OTableRow* pNewRow;
+ for(;aIter != pClipboardList->end();++aIter)
+ {
+ pNewRow = new OTableRow( **aIter );
+ m_aInsertedRows.push_back( pNewRow);
+ }
+}
+
+//-------------------------------------------------------------------------
+OTableEditorInsUndoAct::~OTableEditorInsUndoAct()
+{
+ //////////////////////////////////////////////////////////////////////
+ // InsertedRowList loeschen
+ ::std::vector<OTableRow*>::iterator aIter = m_aInsertedRows.begin();
+ for(;aIter != m_aInsertedRows.end();++aIter)
+ delete *aIter;
+
+ m_aInsertedRows.clear();
+}
+
+//-------------------------------------------------------------------------
+void OTableEditorInsUndoAct::Undo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Eingefuegte Zeilen wieder loeschen
+ ::std::vector<OTableRow*>* pOriginalRows = pTabEdCtrl->GetRowList();
+ for( long i=(m_nInsPos+m_aInsertedRows.size()-1); i>(m_nInsPos-1); i-- )
+ {
+ delete (*pOriginalRows)[i];
+ pOriginalRows->erase(pOriginalRows->begin()+i);
+ }
+
+ pTabEdCtrl->RowRemoved( m_nInsPos, m_aInsertedRows.size(), TRUE );
+ pTabEdCtrl->InvalidateHandleColumn();
+
+ OTableEditorUndoAct::Undo();
+}
+
+//-------------------------------------------------------------------------
+void OTableEditorInsUndoAct::Redo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Zeilen wieder einfuegen
+ long nInsertRow = m_nInsPos;
+ OTableRow* pRow;
+ ::std::vector<OTableRow*>::iterator aIter = m_aInsertedRows.begin();
+ ::std::vector<OTableRow*>* pRowList = pTabEdCtrl->GetRowList();
+ for(;aIter != m_aInsertedRows.end();++aIter)
+ {
+ pRow = new OTableRow( **aIter );
+ pRowList->insert( pRowList->begin()+nInsertRow ,pRow );
+ nInsertRow++;
+ }
+
+ pTabEdCtrl->RowInserted( m_nInsPos, m_aInsertedRows.size(), TRUE );
+ pTabEdCtrl->InvalidateHandleColumn();
+
+ OTableEditorUndoAct::Redo();
+}
+
+//==============================================================================
+// class OTableEditorInsNewUndoAct
+//==============================================================================
+OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition, long nInsertedRows ) :
+ OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_NEWROWINSERTED)
+ ,m_nInsPos( nInsertPosition )
+ ,m_nInsRows( nInsertedRows )
+{
+}
+
+//-------------------------------------------------------------------------
+OTableEditorInsNewUndoAct::~OTableEditorInsNewUndoAct()
+{
+}
+
+//-------------------------------------------------------------------------
+void OTableEditorInsNewUndoAct::Undo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Eingefuegte Zeilen wieder loeschen
+ ::std::vector<OTableRow*>* pOriginalRows = pTabEdCtrl->GetRowList();
+
+ for( long i=(m_nInsPos+m_nInsRows-1); i>(m_nInsPos-1); i-- )
+ {
+ delete (*pOriginalRows)[i];
+ pOriginalRows->erase(pOriginalRows->begin()+i);
+ }
+
+ pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, TRUE );
+ pTabEdCtrl->InvalidateHandleColumn();
+
+ OTableEditorUndoAct::Undo();
+}
+
+//-------------------------------------------------------------------------
+void OTableEditorInsNewUndoAct::Redo()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Zeilen wieder einfuegen
+ ::std::vector<OTableRow*>* pRowList = pTabEdCtrl->GetRowList();
+
+ for( long i=m_nInsPos; i<(m_nInsPos+m_nInsRows); i++ )
+ pRowList->insert( pRowList->begin()+i,new OTableRow() );
+
+ pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows, TRUE );
+ pTabEdCtrl->InvalidateHandleColumn();
+
+ OTableEditorUndoAct::Redo();
+}
+
+//-------------------------------------------------------------------------
+//========================================================================
+// class OPrimKeyUndoAct
+//========================================================================
+
+//-------------------------------------------------------------------------
+OPrimKeyUndoAct::OPrimKeyUndoAct( OTableEditorCtrl* pOwner, MultiSelection aDeletedKeys, MultiSelection aInsertedKeys) :
+ OTableEditorUndoAct( pOwner ,STR_TABLEDESIGN_UNDO_PRIMKEY)
+ ,m_aDelKeys( aDeletedKeys )
+ ,m_aInsKeys( aInsertedKeys )
+ ,m_pEditorCtrl( pOwner )
+{
+}
+
+//-------------------------------------------------------------------------
+OPrimKeyUndoAct::~OPrimKeyUndoAct()
+{
+}
+
+//-------------------------------------------------------------------------
+void OPrimKeyUndoAct::Undo()
+{
+ ::std::vector<OTableRow*>* pRowList = pTabEdCtrl->GetRowList();
+ OTableRow* pRow = NULL;
+
+ //////////////////////////////////////////////////////////////////////
+ // Die eingefuegten Keys loeschen
+ for( long nIndex = m_aInsKeys.FirstSelected(); nIndex != SFX_ENDOFSELECTION; nIndex=m_aInsKeys.NextSelected() )
+ {
+ pRow = (*pRowList)[nIndex];
+ pRow->SetPrimaryKey( FALSE );
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Die geloeschten Keys herstellen
+ for( nIndex = m_aDelKeys.FirstSelected(); nIndex != SFX_ENDOFSELECTION; nIndex=m_aDelKeys.NextSelected() )
+ {
+ pRow = (*pRowList)[nIndex];
+ pRow->SetPrimaryKey( TRUE );
+ }
+
+ m_pEditorCtrl->InvalidateHandleColumn();
+ OTableEditorUndoAct::Undo();
+}
+
+//-------------------------------------------------------------------------
+void OPrimKeyUndoAct::Redo()
+{
+ ::std::vector<OTableRow*>* pRowList = pTabEdCtrl->GetRowList();
+ OTableRow* pRow = NULL;
+
+ //////////////////////////////////////////////////////////////////////
+ // Die geloeschten Keys loeschen
+ for( long nIndex = m_aDelKeys.FirstSelected(); nIndex != SFX_ENDOFSELECTION; nIndex=m_aDelKeys.NextSelected() )
+ {
+ pRow = (*pRowList)[nIndex];
+ pRow->SetPrimaryKey( FALSE );
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Die eingefuegten Keys herstellen
+ for( nIndex = m_aInsKeys.FirstSelected(); nIndex != SFX_ENDOFSELECTION; nIndex=m_aInsKeys.NextSelected() )
+ {
+ pRow = (*pRowList)[nIndex];
+ pRow->SetPrimaryKey( TRUE );
+ }
+
+ m_pEditorCtrl->InvalidateHandleColumn();
+ OTableEditorUndoAct::Redo();
+}
+
+
+
+
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx
new file mode 100644
index 000000000000..36c81c27fc65
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * $RCSfile: TableUndo.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:24:50 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef DBAUI_TABLEUNDO_HXX
+#define DBAUI_TABLEUNDO_HXX
+
+#ifndef DBAUI_GENERALUNDO_HXX
+#include "GeneralUndo.hxx"
+#endif
+#ifndef _SV_MULTISEL_HXX
+#include <tools/multisel.hxx>
+#endif
+#ifndef _VECTOR_
+#include <vector>
+#endif
+
+namespace dbaui
+{
+ //========================================================================
+ class OTableRowView;
+ class OTableRow;
+ class OTableDesignUndoAct : public OCommentUndoAction
+ {
+ protected:
+ OTableRowView* m_pTabDgnCtrl;
+
+ virtual void Undo();
+ virtual void Redo();
+ public:
+ OTableDesignUndoAct( OTableRowView* pOwner ,USHORT nCommentID);
+ virtual ~OTableDesignUndoAct();
+ };
+
+ //========================================================================
+ class OTableEditorCtrl;
+ class OTableEditorUndoAct : public OTableDesignUndoAct
+ {
+ protected:
+ OTableEditorCtrl* pTabEdCtrl;
+
+ public:
+ OTableEditorUndoAct( OTableEditorCtrl* pOwner,USHORT nCommentID );
+ virtual ~OTableEditorUndoAct();
+ };
+
+
+ //========================================================================
+ class OTableDesignCellUndoAct : public OTableDesignUndoAct
+ {
+ protected:
+ USHORT m_nCol;
+ long m_nRow;
+ ::rtl::OUString m_sOldText;
+ ::rtl::OUString m_sNewText;
+
+ virtual void Undo();
+ virtual void Redo();
+ public:
+ OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, USHORT nColumn );
+ virtual ~OTableDesignCellUndoAct();
+ };
+
+ class OTypeInfo;
+ //========================================================================
+ class OTableEditorTypeSelUndoAct : public OTableEditorUndoAct
+ {
+ protected:
+ USHORT m_nCol;
+ long m_nRow;
+ const OTypeInfo* m_pOldType;
+ const OTypeInfo* m_pNewType;
+
+ virtual void Undo();
+ virtual void Redo();
+ public:
+ OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, USHORT nColumn, const OTypeInfo* _pOldType );
+ virtual ~OTableEditorTypeSelUndoAct();
+ };
+
+ //========================================================================
+ class OTableEditorDelUndoAct : public OTableEditorUndoAct
+ {
+ protected:
+ ::std::vector<OTableRow*> m_aDeletedRows;
+
+ virtual void Undo();
+ virtual void Redo();
+ public:
+ OTableEditorDelUndoAct( OTableEditorCtrl* pOwner );
+ virtual ~OTableEditorDelUndoAct();
+ };
+
+ //========================================================================
+ class OTableEditorInsUndoAct : public OTableEditorUndoAct
+ {
+ protected:
+ ::std::vector<OTableRow*> m_aInsertedRows;
+ long m_nInsPos;
+
+ virtual void Undo();
+ virtual void Redo();
+ public:
+ OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition );
+ virtual ~OTableEditorInsUndoAct();
+ };
+
+ //========================================================================
+ class OTableEditorInsNewUndoAct : public OTableEditorUndoAct
+ {
+ protected:
+ long m_nInsPos;
+ long m_nInsRows;
+
+ virtual void Undo();
+ virtual void Redo();
+ public:
+ OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition, long nInsertedRows );
+ virtual ~OTableEditorInsNewUndoAct();
+ };
+
+ //========================================================================
+ class OPrimKeyUndoAct : public OTableEditorUndoAct
+ {
+ protected:
+ MultiSelection m_aDelKeys,
+ m_aInsKeys;
+ BOOL m_bActPrimKeySet;
+ OTableEditorCtrl* m_pEditorCtrl;
+
+ virtual void Undo();
+ virtual void Redo();
+ public:
+ OPrimKeyUndoAct( OTableEditorCtrl* pOwner, MultiSelection aDeletedKeys, MultiSelection aInsertedKeys );
+ virtual ~OPrimKeyUndoAct();
+ };
+}
+#endif // DBAUI_TABLEUNDO_HXX
+
+
diff --git a/dbaccess/source/ui/tabledesign/makefile.mk b/dbaccess/source/ui/tabledesign/makefile.mk
new file mode 100644
index 000000000000..ab43118ea707
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/makefile.mk
@@ -0,0 +1,99 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1 $
+#
+# last change: $Author: oj $ $Date: 2001-02-14 14:24:18 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+PRJINC=$(PRJ)$/source
+PRJNAME=dbaccess
+TARGET=tabledesign
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+# IMGLST_SRS=$(SRS)$/$(TARGET).srs
+# --- Files --------------------------------------------------------
+
+SLOFILES =\
+ $(SLO)$/TableDesignControl.obj \
+ $(SLO)$/TableFieldDescWin.obj \
+ $(SLO)$/TableController.obj \
+ $(SLO)$/TableDesignView.obj \
+ $(SLO)$/TEditControl.obj \
+ $(SLO)$/TableFieldControl.obj \
+ $(SLO)$/TableDesignHelpBar.obj \
+ $(SLO)$/FieldDescGenWin.obj \
+ $(SLO)$/FieldDescriptions.obj \
+ $(SLO)$/TableRow.obj \
+ $(SLO)$/TableUndo.obj
+
+
+SRCFILES = table.src
+
+# --- Targets -------------------------------------------------------
+
+
+.INCLUDE : target.mk
+
+$(SRS)$/$(TARGET).srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
+
+
diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src
new file mode 100644
index 000000000000..5f85d4349c6c
--- /dev/null
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -0,0 +1,1352 @@
+/*************************************************************************
+ *
+ * $RCSfile: table.src,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-02-14 14:25:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include "dbaccess_helpid.hrc"
+#endif
+#ifndef DBACCESS_UI_BROWSER_ID_HXX
+#include "browserids.hxx"
+#endif
+#ifndef _GLOBLMN_HRC
+#include <svx/globlmn.hrc>
+#endif
+#ifndef DBAUI_TOOLBOX_HXX
+#include "toolbox.hrc"
+#endif
+
+String STR_TABLEDESIGN_DBFIELDTYPES
+{
+ //Text = "Unbekannt;Text;Zahl;Datum/Zeit;Datum;Zeit;Ja/Nein;Whrung;Memo;Zhler;Bild;Text (fix);Dezimal;Binrfeld (fix);Binrfeld;BigInt;Double;Float;Real;Integer;Small Integer;Tiny Integer;SQL Null;Objekt;Distinct;Struktur;Feld;BLOB;CLOB;REF" ;
+
+ Text [ language_user1 ] = "the sorting of the text doesn't be changed and every type must be translated";
+
+ Text = "Unbekannt;Text;Zahl;Datum/Zeit;Datum;Zeit;Ja/Nein;Whrung;Memo;Zhler;Bild;Text (fix);Dezimal;Binrfeld (fix);Binrfeld;BigInt;Double;Float;Real;Integer;Small Integer;Tiny Integer;SQL Null;Objekt;Distinct;Struktur;Feld;BLOB;CLOB;REF" ;
+ Text [ ENGLISH ] = "Unknown;Text;Number;Date/Time;Date;Time;Boolean;Currency;Memo;Counter;Image;Text (fix);Decimal;Binary (fix);Binary;BigInt;Double;Float;Real;Integer;Small Integer;Tiny Integer;SQL Null;Object;Distinct;Struct;Feld;BLOB;CLOB;REF" ;
+};
+
+String STR_TABLEDESIGN_UNDO_PRIMKEY
+{
+ Text = "Primrschlssel einfgen/entfernen" ;
+ Text [ english_us ] = "Insert/remove primary key" ;
+ Text [ portuguese_brazilian ] = "Primrschlssel einfgen/entfernen" ;
+ Text [ swedish ] = "Infoga/ta bort primrnyckel" ;
+ Text [ danish ] = "Indst/fjern primrngle" ;
+ Text [ italian ] = "Inserisci/elimina la chiave primaria" ;
+ Text [ spanish ] = "Insertar/eliminar llave primaria" ;
+ Text [ french ] = "Insrer/supprimer une cl primaire" ;
+ Text [ dutch ] = "Primaire sleutel invoegen/verwijderen" ;
+ Text [ portuguese ] = "Inserir/remover chave primria" ;
+ Text[ chinese_simplified ] = "/ɾؼ";
+ Text[ russian ] = "/ ";
+ Text[ polish ] = "Wstaw /Usu gwny klucz";
+ Text[ japanese ] = "ײذ̑}/폜";
+ Text[ chinese_traditional ] = "J/RDr";
+ Text[ arabic ] = "/ ";
+ Text[ dutch ] = "Primaire sleutel invoegen/verwijderen";
+ Text[ chinese_simplified ] = "/ɾؼ";
+ Text[ greek ] = "/ ";
+ Text[ korean ] = "⺻Ű /";
+ Text[ turkish ] = "Birinci anahtar ekle/kaldr";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_VALUE_YES
+{
+ Text = "Ja" ;
+ Text [ ENGLISH ] = "Yes" ;
+ Text [ dutch ] = "Ja" ;
+ Text [ english_us ] = "Yes" ;
+ Text [ italian ] = "S" ;
+ Text [ spanish ] = "S" ;
+ Text [ french ] = "Oui" ;
+ Text [ swedish ] = "Ja" ;
+ Text [ danish ] = "Ja" ;
+ Text [ portuguese_brazilian ] = "Ja" ;
+ Text [ portuguese ] = "Sim" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Tak";
+ Text[ japanese ] = "͂";
+ Text[ chinese_traditional ] = "O";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Ja";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Evet";
+ Text[ language_user1 ] = " ";
+};
+String STR_VALUE_NO
+{
+ Text = "Nein" ;
+ Text [ ENGLISH ] = "No" ;
+ Text [ dutch ] = "Nee" ;
+ Text [ english_us ] = "No" ;
+ Text [ italian ] = "No" ;
+ Text [ spanish ] = "No" ;
+ Text [ french ] = "Non" ;
+ Text [ swedish ] = "Nej" ;
+ Text [ danish ] = "Nej" ;
+ Text [ portuguese_brazilian ] = "Nein" ;
+ Text [ portuguese ] = "No" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Nie";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "_";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Nee";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ƴϿ";
+ Text[ turkish ] = "Hayr";
+ Text[ language_user1 ] = " ";
+};
+String STR_VALUE_ASC
+{
+ Text = "Aufsteigend" ;
+ Text [ ENGLISH ] = "Ascending" ;
+ Text [ dutch ] = "Oplopend" ;
+ Text [ english_us ] = "Ascending" ;
+ Text [ italian ] = "Crescente" ;
+ Text [ spanish ] = "Ascendente" ;
+ Text [ french ] = "Croissant" ;
+ Text [ swedish ] = "Stigande" ;
+ Text [ danish ] = "Stigende" ;
+ Text [ portuguese_brazilian ] = "Aufsteigend" ;
+ Text [ portuguese ] = "Ascendente" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Rosnco";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "VW";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Oplopend";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Artan";
+ Text[ language_user1 ] = " ";
+};
+String STR_VALUE_DESC
+{
+ Text = "Absteigend" ;
+ Text [ ENGLISH ] = "Descending" ;
+ Text [ english_us ] = "Descending" ;
+ Text [ italian ] = "Decrescente" ;
+ Text [ spanish ] = "Descendente" ;
+ Text [ french ] = "Dcroissant" ;
+ Text [ dutch ] = "Aflopend" ;
+ Text [ swedish ] = "Fallande" ;
+ Text [ danish ] = "Faldende" ;
+ Text [ portuguese_brazilian ] = "Absteigend" ;
+ Text [ portuguese ] = "Descendente" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Malejco";
+ Text[ japanese ] = "~";
+ Text[ chinese_traditional ] = "VU";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Aflopend";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Azalan";
+ Text[ language_user1 ] = " ";
+};
+String STR_VALUE_NONE
+{
+ // Bemerkung : sollte auch in anderen Sprachen irgendwie zum Wort 'Wert' passen : Wert - keiner ....
+ Text = "<keiner>" ;
+ Text [ ENGLISH ] = "<keiner>" ;
+ Text[ italian ] = "<senza>";
+ Text[ portuguese_brazilian ] = "<keiner>";
+ Text[ portuguese ] = "<nenhum>";
+ Text[ danish ] = "<ingen>";
+ Text[ french ] = "<aucun(e)>";
+ Text[ swedish ] = "<ingen>";
+ Text[ dutch ] = "<geen>";
+ Text[ spanish ] = "<ninguno>";
+ Text[ english_us ] = "<none>";
+ Text[ chinese_simplified ] = "<>";
+ Text[ russian ] = "<>";
+ Text[ polish ] = "<brak>";
+ Text[ japanese ] = "<Ȃ>";
+ Text[ chinese_traditional ] = "<L>";
+ Text[ arabic ] = "<>";
+ Text[ dutch ] = "<geen>";
+ Text[ chinese_simplified ] = "<>";
+ Text[ greek ] = "<>";
+ Text[ korean ] = "<>";
+ Text[ turkish ] = "<yok>";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_TAB_FIELD_NAME
+{
+ Text = "Feldname" ;
+ Text [ ENGLISH ] = "Field name" ;
+ Text [ english_us ] = "Field name" ;
+ Text [ italian ] = "Nome di campo" ;
+ Text [ spanish ] = "Nombre del campo" ;
+ Text [ french ] = "Nom de champ" ;
+ Text [ dutch ] = "Veldnaam" ;
+ Text [ swedish ] = "Fltnamn" ;
+ Text [ danish ] = "Feltnavn" ;
+ Text [ portuguese_brazilian ] = "Feldname" ;
+ Text [ portuguese ] = "Nome do campo" ;
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nazwa pola";
+ Text[ japanese ] = "̨ޖ";
+ Text[ chinese_traditional ] = "W";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Veldnaam";
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ʵ";
+ Text[ turkish ] = "Alan ad";
+ Text[ language_user1 ] = " ";
+};
+String STR_TAB_FIELD_DATATYPE
+{
+ Text = "Feldtyp" ;
+ Text [ ENGLISH ] = "Field type" ;
+ Text [ english_us ] = "Field type" ;
+ Text [ italian ] = "Tipo di campo" ;
+ Text [ spanish ] = "Tipo de campo" ;
+ Text [ french ] = "Type de champ" ;
+ Text [ dutch ] = "Veldtype" ;
+ Text [ swedish ] = "Flttyp" ;
+ Text [ danish ] = "Felttype" ;
+ Text [ portuguese_brazilian ] = "Feldtyp" ;
+ Text [ portuguese ] = "Tipo de campo" ;
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Typ pola";
+ Text[ japanese ] = "̨ނ̎";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Veldtype";
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ʵ ";
+ Text[ turkish ] = "Alan tr";
+ Text[ language_user1 ] = " ";
+};
+String STR_TAB_FIELD_LENGTH
+{
+ Text = "Feldlnge" ;
+ Text [ ENGLISH ] = "Field length" ;
+ Text [ english_us ] = "Field length" ;
+ Text [ italian ] = "Lunghezza di campo" ;
+ Text [ spanish ] = "Longitud de campo" ;
+ Text [ french ] = "Longueur de champ" ;
+ Text [ dutch ] = "Veldlengte" ;
+ Text [ swedish ] = "Fltlngd" ;
+ Text [ danish ] = "Feltlngde" ;
+ Text [ portuguese_brazilian ] = "Feldlnge" ;
+ Text [ portuguese ] = "Comprimento do campo" ;
+ Text[ chinese_simplified ] = "ֶγ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Dugo pola";
+ Text[ japanese ] = "̨ނ̒";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Veldlengte";
+ Text[ chinese_simplified ] = "ֶγ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ʵ ";
+ Text[ turkish ] = "Alan uzunluu";
+ Text[ language_user1 ] = " ";
+};
+String STR_TAB_FIELD_DESCR
+{
+ Text = "Beschreibung" ;
+ Text [ ENGLISH ] = "Description" ;
+ Text [ english_us ] = "Description" ;
+ Text [ portuguese_brazilian ] = "Beschreibung" ;
+ Text [ swedish ] = "Beskrivning" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ italian ] = "Descrizione" ;
+ Text [ spanish ] = "Descripcin" ;
+ Text [ french ] = "Description" ;
+ Text [ dutch ] = "Beschrijving" ;
+ Text [ portuguese ] = "Descrio" ;
+ Text[ chinese_simplified ] = "˵";
+ Text[ russian ] = "";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "Tv";
+ Text[ chinese_traditional ] = "yz";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Beschrijving";
+ Text[ chinese_simplified ] = "˵";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Tanm";
+ Text[ language_user1 ] = " ";
+};
+String STR_TAB_FIELD_NULLABLE
+{
+ Text = "Eingabe erforderlich" ;
+ Text [ ENGLISH ] = "Input required" ;
+ Text [ dutch ] = "Invoer vereist" ;
+ Text [ english_us ] = "Input required" ;
+ Text [ italian ] = "Digitazione necessaria" ;
+ Text [ spanish ] = "Se requiere entrada" ;
+ Text [ french ] = "Saisie requise" ;
+ Text [ swedish ] = "Indata erfordras" ;
+ Text [ danish ] = "Input krves" ;
+ Text [ portuguese_brazilian ] = "Eingabe erforderlich" ;
+ Text [ portuguese ] = "Entrada necessria" ;
+ Text[ chinese_simplified ] = "Ҫ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wymagany wpis";
+ Text[ japanese ] = "͂Kvł";
+ Text[ chinese_traditional ] = "nDJ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Invoer vereist";
+ Text[ chinese_simplified ] = "Ҫ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Է 䱸";
+ Text[ turkish ] = "Veri girii gerekiyor";
+ Text[ language_user1 ] = " ";
+};
+String STR_FIELD_AUTOINCREMENT
+{
+ Text = "~Auto-Wert" ;
+ Text [ ENGLISH ] = "Auto value" ;
+ Text[ italian ] = "Valore automatico";
+ Text[ portuguese_brazilian ] = "Auto value";
+ Text[ portuguese ] = "~Valor automtico";
+ Text[ danish ] = "AutoVrdi";
+ Text[ french ] = "A~utoValeur";
+ Text[ swedish ] = "~AutoVrde";
+ Text[ dutch ] = "~AutoWaarde";
+ Text[ spanish ] = "~Valor automtico";
+ Text[ english_us ] = "AutoValue";
+ Text[ chinese_simplified ] = "Զֵ";
+ Text[ russian ] = "~";
+ Text[ polish ] = "Warto automatyczna";
+ Text[ japanese ] = "l";
+ Text[ chinese_traditional ] = "۰ʼƭ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "~AutoWaarde";
+ Text[ chinese_simplified ] = "Զֵ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ڵ";
+ Text[ turkish ] = "~Otomatik deer";
+ Text[ language_user1 ] = " ";
+};
+String STR_TAB_PROPERTIES
+{
+ Text = "Feldeigenschaften" ;
+ Text [ ENGLISH ] = "Field properties" ;
+ Text [ english_us ] = "Field properties" ;
+ Text [ portuguese_brazilian ] = "Feldeigenschaften" ;
+ Text [ swedish ] = "Fltegenskaper" ;
+ Text [ danish ] = "Feltegenskaber" ;
+ Text [ italian ] = "Propriet di campo" ;
+ Text [ spanish ] = "Propiedades del campo" ;
+ Text [ french ] = "Proprits du champ" ;
+ Text [ dutch ] = "Veldeigenschappen" ;
+ Text [ portuguese ] = "Propriedades do campo" ;
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Waciwoci pola";
+ Text[ japanese ] = "̨ނè";
+ Text[ chinese_traditional ] = "ݩ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Veldeigenschappen";
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ʵ Ӽ";
+ Text[ turkish ] = "Alan zellikleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_TABPAGE_GENERAL
+{
+ Text = "Allgemein" ;
+ Text [ ENGLISH ] = "General" ;
+ Text [ english_us ] = "General" ;
+ Text [ portuguese_brazilian ] = "Allgemein" ;
+ Text [ swedish ] = "Allmnt" ;
+ Text [ danish ] = "Generelt" ;
+ Text [ italian ] = "Generale" ;
+ Text [ spanish ] = "General" ;
+ Text [ french ] = "Gnral" ;
+ Text [ dutch ] = "Algemeen" ;
+ Text [ portuguese ] = "Geral" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Oglne";
+ Text[ japanese ] = "S";
+ Text[ chinese_traditional ] = "@";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Algemeen";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ϲ";
+ Text[ turkish ] = "Genel";
+ Text[ language_user1 ] = " ";
+};
+String STR_TAB_TABLE_DESCRIPTION
+{
+ Text = "Beschreibung :" ;
+ Text [ ENGLISH ] = "Description :" ;
+ Text[ english_us ] = "Description :";
+ Text[ portuguese ] = "Descrio:";
+ Text[ greek ] = " :";
+ Text[ dutch ] = "Omschrijving :";
+ Text[ french ] = "Description :";
+ Text[ spanish ] = "Descripcin :";
+ Text[ swedish ] = "Beskrivning :";
+ Text[ russian ] = " :";
+ Text[ italian ] = "Descrizione :";
+ Text[ danish ] = "Beskrivelse :";
+ Text[ polish ] = "Opis :";
+ Text[ portuguese_brazilian ] = "Description :";
+ Text[ japanese ] = ":";
+ Text[ korean ] = " :";
+ Text[ chinese_simplified ] = "˵";
+ Text[ chinese_traditional ] = "yzG";
+ Text[ arabic ] = " :";
+ Text[ turkish ] = "Tanm :";
+};
+
+String STR_TAB_TABLE_PROPERTIES
+{
+ Text = "Tabelleneigenschaften" ;
+ Text [ ENGLISH ] = "Table properties" ;
+ Text[ english_us ] = "Table properties";
+ Text[ portuguese ] = "Propriedades da tabela";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Tabeleigenschappen";
+ Text[ french ] = "Proprits de la table";
+ Text[ spanish ] = "Propiedades de la tabla";
+ Text[ swedish ] = "Tabellegenskaper";
+ Text[ russian ] = " ";
+ Text[ italian ] = "Propriet tabella";
+ Text[ danish ] = "Tabelegenskaber";
+ Text[ polish ] = "Waciwoci tabeli";
+ Text[ portuguese_brazilian ] = "Table properties";
+ Text[ japanese ] = "ðقè";
+ Text[ korean ] = "̺ Ӽ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "u@ݩ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Tablo zellikleri";
+ Text[ language_user1 ] = " ";
+};
+
+Control RID_DB_TAB_EDITOR
+{
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ SvLook = TRUE ;
+ Hide = TRUE ;
+ HelpId = HID_TABDESIGN_BACKGROUND ;
+};
+
+ErrorBox ERR_INVALID_LISTBOX_ENTRY
+{
+ Message = "Der eingegebenen Text ist kein Element der Liste." ;
+ Message [ English ] = "The text entry does not belong to the list" ;
+ Message [ english_us ] = "The text entry is not an element of the list." ;
+ Message [ italian ] = "Il testo digitato non un elemento della lista." ;
+ Message [ spanish ] = "Este texto no pertenece a la lista." ;
+ Message [ french ] = "Le texte saisi n'est pas un lment de la liste." ;
+ Message [ dutch ] = "De tekstinvoer is geen element van de lijst." ;
+ Message [ swedish ] = "Den inmatade texten r inget element i listan." ;
+ Message [ danish ] = "Den indtastede tekst er ikke et element i listen." ;
+ Message [ portuguese_brazilian ] = "Der eingegebenen Text ist kein Element der Liste." ;
+ Message [ portuguese ] = "O texto digitado no faz parte da lista." ;
+ Message[ chinese_simplified ] = "ֲеԪ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Wprowadzony tekst nie jest elementem listy.";
+ Message[ japanese ] = "͂ꂽ÷ĂؽĂ̗vfł͂܂B";
+ Message[ chinese_traditional ] = "JrOM椸C";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "De tekstinvoer is geen element van de lijst.";
+ Message[ chinese_simplified ] = "ֲеԪ";
+ Message[ greek ] = " .";
+ Message[ korean ] = "Էµ ؽƮ ׸ ƴմϴ.";
+ Message[ turkish ] = "Girilen metin, liste esi deil.";
+ Message[ language_user1 ] = " ";
+};
+
+Menu RID_TABLEDESIGNROWPOPUPMENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_EDIT_CUT
+ };
+ MenuItem
+ {
+ ITEM_EDIT_COPY
+ };
+ MenuItem
+ {
+ ITEM_EDIT_PASTE
+ };
+ MenuItem
+ {
+ ITEM_EDIT_DELETE
+ };
+ MenuItem
+ {
+ Identifier = SID_TABLEDESIGN_INSERTROWS ;
+ HelpID = SID_TABLEDESIGN_INSERTROWS ;
+ Text = "Zeilen einfgen" ;
+ Text [ ENGLISH ] = "Insert rows" ;
+ Text [ english_us ] = "Insert Rows" ;
+ Text [ portuguese_brazilian ] = "Zeilen einfgen" ;
+ Text [ swedish ] = "Infoga rader" ;
+ Text [ danish ] = "Indst rkker" ;
+ Text [ italian ] = "Inserisci righe" ;
+ Text [ spanish ] = "Insertar filas" ;
+ Text [ french ] = "Insrer des lignes" ;
+ Text [ dutch ] = "Rijen invoegen" ;
+ Text [ portuguese ] = "Inserir linhas" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wstaw wiersze";
+ Text[ japanese ] = "s̑}";
+ Text[ chinese_traditional ] = "J";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Rijen invoegen";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Satr ekle";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ;
+ HelpID = SID_TABLEDESIGN_TABED_PRIMARYKEY ;
+ Checkable = TRUE ;
+ Text = "Primrschlssel" ;
+ Text [ ENGLISH ] = "Primary key" ;
+ Text [ english_us ] = "Primary Key" ;
+ Text [ portuguese_brazilian ] = "Primrschlssel" ;
+ Text [ swedish ] = "Primrnyckel" ;
+ Text [ danish ] = "Primrngle" ;
+ Text [ italian ] = "Chiave primaria" ;
+ Text [ spanish ] = "Llave primaria" ;
+ Text [ french ] = "Cl primaire" ;
+ Text [ dutch ] = "Primaire sleutel" ;
+ Text [ portuguese ] = "Chave primria" ;
+ Text[ chinese_simplified ] = "ؼ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Klucz gwny";
+ Text[ japanese ] = "ײذ";
+ Text[ chinese_traditional ] = "Dr";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Primaire sleutel";
+ Text[ chinese_simplified ] = "ؼ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "⺻Ű";
+ Text[ turkish ] = "Birinci anahtar";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+String STR_TABED_UNDO_CELLMODIFIED
+{
+ Text = "Zelle ndern" ;
+ Text [ english_us ] = "Modify cell" ;
+ Text [ portuguese ] = "Modificar clula" ;
+ Text [ portuguese_brazilian ] = "Zelle ndern" ;
+ Text [ swedish ] = "ndra cell" ;
+ Text [ danish ] = "Modificer celle" ;
+ Text [ italian ] = "Modifica cella" ;
+ Text [ spanish ] = "Modificar celda" ;
+ Text [ french ] = "Modifier une cellule" ;
+ Text [ dutch ] = "Cel veranderen" ;
+ Text[ chinese_simplified ] = "ĵԪ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Modyfikuj komrki";
+ Text[ japanese ] = "ق̕ύX";
+ Text[ chinese_traditional ] = "קxs";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Cel veranderen";
+ Text[ chinese_simplified ] = "ĵԪ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Hcreyi deitir";
+ Text[ language_user1 ] = " ";
+};
+String STR_TABED_UNDO_ROWDELETED
+{
+ Text = "Zeile lschen" ;
+ Text [ english_us ] = "Delete row" ;
+ Text [ portuguese_brazilian ] = "Zeile lschen" ;
+ Text [ swedish ] = "Radera rad" ;
+ Text [ danish ] = "Slet rkke" ;
+ Text [ italian ] = "Elimina riga" ;
+ Text [ spanish ] = "Eliminar fila" ;
+ Text [ french ] = "Supprimer la ligne" ;
+ Text [ dutch ] = "Rij wissen" ;
+ Text [ portuguese ] = "Eliminar linha" ;
+ Text[ chinese_simplified ] = "ɾ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Usu wiersz";
+ Text[ japanese ] = "s̍폜";
+ Text[ chinese_traditional ] = "R";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Rij wissen";
+ Text[ chinese_simplified ] = "ɾ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Satr sil";
+ Text[ language_user1 ] = " ";
+};
+String STR_TABED_UNDO_TYPE_CHANGED
+{
+ Text = "Feldtype ndern" ;
+ Text [ ENGLISH ] = "Feldtype ndern" ;
+ Text[ italian ] = "Cambia tipi di campo";
+ Text[ portuguese_brazilian ] = "Feldtype ndern";
+ Text[ portuguese ] = "Modificar tipo de campo";
+ Text[ danish ] = "Modificer felttype";
+ Text[ french ] = "Modifier le type de champ";
+ Text[ swedish ] = "ndra flttyp";
+ Text[ dutch ] = "Veldtype veranderen";
+ Text[ spanish ] = "Modificar tipo de campo";
+ Text[ english_us ] = "Modify Field Type";
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zmie typ pola";
+ Text[ japanese ] = "̨߂̕ύX";
+ Text[ chinese_traditional ] = "ܧ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Veldtype veranderen";
+ Text[ chinese_simplified ] = "ֶ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ʵ ";
+ Text[ turkish ] = "Alan trn deitir";
+ Text[ language_user1 ] = " ";
+};
+String STR_TABED_UNDO_ROWINSERTED
+{
+ Text = "Zeile einfgen" ;
+ Text [ english_us ] = "Insert row" ;
+ Text [ portuguese_brazilian ] = "Zeile einfgen" ;
+ Text [ swedish ] = "Infoga rad" ;
+ Text [ danish ] = "Indst rkke" ;
+ Text [ italian ] = "Inserisci riga" ;
+ Text [ spanish ] = "Insertar fila" ;
+ Text [ french ] = "Insrer une ligne" ;
+ Text [ dutch ] = "Rij invoegen" ;
+ Text [ portuguese ] = "Inserir linha" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wstaw wiersz";
+ Text[ japanese ] = "s̑}";
+ Text[ chinese_traditional ] = "J";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Rij invoegen";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Satr ekle";
+ Text[ language_user1 ] = " ";
+};
+String STR_TABED_UNDO_NEWROWINSERTED
+{
+ Text = "Neue Zeile einfgen" ;
+ Text [ english_us ] = "Insert new row" ;
+ Text [ portuguese_brazilian ] = "Neue Zeile einfgen" ;
+ Text [ swedish ] = "Infoga ny rad" ;
+ Text [ danish ] = "Indst ny rkke" ;
+ Text [ italian ] = "Inserisci riga nuova" ;
+ Text [ spanish ] = "Insertar nueva fila" ;
+ Text [ french ] = "Insrer une nouvelle ligne" ;
+ Text [ dutch ] = "Nieuwe cel invoegen" ;
+ Text [ portuguese ] = "Inserir nova clula" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wstaw nowy wiersz";
+ Text[ japanese ] = "Vs̑}";
+ Text[ chinese_traditional ] = "J";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Nieuwe cel invoegen";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Yeni satr ekle";
+ Text[ language_user1 ] = " ";
+};
+String STR_TABED_UNDO_PRIMKEY
+{
+ Text = "Primrschlssel einfgen/entfernen" ;
+ Text [ english_us ] = "Insert/remove primary key" ;
+ Text [ portuguese_brazilian ] = "Primrschlssel einfgen/entfernen" ;
+ Text [ swedish ] = "Infoga/ta bort primrnyckel" ;
+ Text [ danish ] = "Indst/fjern primrngle" ;
+ Text [ italian ] = "Inserisci/elimina la chiave primaria" ;
+ Text [ spanish ] = "Insertar/eliminar llave primaria" ;
+ Text [ french ] = "Insrer/supprimer une cl primaire" ;
+ Text [ dutch ] = "Primaire sleutel invoegen/verwijderen" ;
+ Text [ portuguese ] = "Inserir/remover chave primria" ;
+ Text[ chinese_simplified ] = "/ɾؼ";
+ Text[ russian ] = "/ ";
+ Text[ polish ] = "Wstaw /Usu gwny klucz";
+ Text[ japanese ] = "ײذ̑}/폜";
+ Text[ chinese_traditional ] = "J/RDr";
+ Text[ arabic ] = "/ ";
+ Text[ dutch ] = "Primaire sleutel invoegen/verwijderen";
+ Text[ chinese_simplified ] = "/ɾؼ";
+ Text[ greek ] = "/ ";
+ Text[ korean ] = "⺻Ű /";
+ Text[ turkish ] = "Birinci anahtar ekle/kaldr";
+ Text[ language_user1 ] = " ";
+};
+
+ToolBox RID_BRW_TABLEDESIGN_TOOLBOX
+{
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 1 ) ;
+ Size = MAP_APPFONT ( 200 , 14 ) ;
+ OutputSize = TRUE ;
+ Align = BOXALIGN_TOP ;
+ ItemImageList = RID_DEFAULTIMAGELIST_SC ;
+ HideWhenDeactivate = TRUE ;
+ HelpId = HID_TLB_TABLEDESIGN ;
+
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = ID_BROWSER_EDITDOC ;
+ HelpId = ID_BROWSER_EDITDOC ;
+ Text = "Bearbeiten" ;
+ Text [ ENGLISH ] = "Bearbeiten" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = ID_BROWSER_SAVEDOC ;
+ HelpId = ID_BROWSER_SAVEDOC ;
+ Text = "Speichern" ;
+ Text [ ENGLISH ] = "Save" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = ID_BROWSER_CUT ;
+ HelpId = ID_BROWSER_CUT ;
+ MID_SBA_QRY_CUT
+ };
+ ToolBoxItem
+ {
+ Identifier = ID_BROWSER_COPY ;
+ HelpId = ID_BROWSER_COPY ;
+ MID_SBA_QRY_COPY
+ };
+ ToolBoxItem
+ {
+ Identifier = ID_BROWSER_PASTE ;
+ HelpId = ID_BROWSER_PASTE ;
+ MID_SBA_QRY_PASTE
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = ID_BROWSER_UNDO ;
+ HelpId = ID_BROWSER_UNDO ;
+ Text = "Rckgngig" ;
+ Text [ ENGLISH ] = "Undo" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = ID_BROWSER_REDO ;
+ HelpId = ID_BROWSER_REDO ;
+ Text = "Wiederherstellen" ;
+ Text [ ENGLISH ] = "Redo" ;
+
+ };
+ };
+};
+String STR_DEFAULT_VALUE
+{
+ Text = "~Defaultwert" ;
+ Text [ ENGLISH ] = "Default" ;
+ Text [ english_us ] = "Default" ;
+ Text [ portuguese_brazilian ] = "Defaultwert" ;
+ Text [ swedish ] = "Standardvrde" ;
+ Text [ danish ] = "Standardvrdi" ;
+ Text [ italian ] = "~Valore predefinito" ;
+ Text [ spanish ] = "Valor pre~determinado" ;
+ Text [ french ] = "Valeur par dfaut" ;
+ Text [ dutch ] = "~Standaardwaarde" ;
+ Text [ portuguese ] = "~Valor padro" ;
+ Text[ chinese_simplified ] = "Ĭֵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Warto domylna";
+ Text[ japanese ] = "Wl";
+ Text[ chinese_traditional ] = "q{";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "~Standaardwaarde";
+ Text[ chinese_simplified ] = "Ĭֵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "⺻";
+ Text[ turkish ] = "~Standart deer";
+ Text[ language_user1 ] = " ";
+};
+String STR_FIELD_REQUIRED
+{
+ Text = "~Eingabe erforderlich" ;
+ Text [ ENGLISH ] = "Field required." ;
+ Text [ english_us ] = "Entry required" ;
+ Text [ portuguese_brazilian ] = "Eingabe erforderlich" ;
+ Text [ swedish ] = "Inmatning krvs" ;
+ Text [ danish ] = "Input krves" ;
+ Text [ italian ] = "Di~gitazione necessaria" ;
+ Text [ spanish ] = "~Entrada requerida" ;
+ Text [ french ] = "Saisie requise" ;
+ Text [ dutch ] = "~Invoer verlangd" ;
+ Text [ portuguese ] = "~Entrada necessria" ;
+ Text[ chinese_simplified ] = "Ҫ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wymagany wpis";
+ Text[ japanese ] = "͂Kvł";
+ Text[ chinese_traditional ] = "Ju";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "~Invoer verlangd";
+ Text[ chinese_simplified ] = "Ҫ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Է 䱸";
+ Text[ turkish ] = "~Giri gerekiyor";
+ Text[ language_user1 ] = " ";
+};
+String STR_TEXT_LENGTH
+{
+ Text = "~Lnge" ;
+ Text [ ENGLISH ] = "Length" ;
+ Text [ english_us ] = "Length" ;
+ Text [ portuguese_brazilian ] = "Lnge" ;
+ Text [ swedish ] = "Lngd" ;
+ Text [ danish ] = "Lngde" ;
+ Text [ italian ] = "~Lunghezza" ;
+ Text [ spanish ] = "~Longitud" ;
+ Text [ french ] = "Longueur" ;
+ Text [ dutch ] = "~Lengte" ;
+ Text [ portuguese ] = "~Comprimento" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Dugo";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Lengte";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "~Uzunluk";
+ Text[ language_user1 ] = " ";
+};
+String STR_NUMERIC_TYPE
+{
+ Text = "~Typ" ;
+ Text [ ENGLISH ] = "Type" ;
+ Text [ english_us ] = "Type" ;
+ Text [ portuguese_brazilian ] = "Typ" ;
+ Text [ swedish ] = "Typ" ;
+ Text [ danish ] = "Type" ;
+ Text [ italian ] = "~Tipo" ;
+ Text [ spanish ] = "Tip~o" ;
+ Text [ french ] = "Type" ;
+ Text [ dutch ] = "~Type" ;
+ Text [ portuguese ] = "~Tipo" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Type";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "";
+ Text[ turkish ] = "~Tip";
+ Text[ language_user1 ] = " ";
+};
+String STR_LENGTH
+{
+ Text = "~Lnge" ;
+ Text [ ENGLISH ] = "Length" ;
+ Text [ english_us ] = "Length" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ swedish ] = "Lngd" ;
+ Text [ danish ] = "Lngde" ;
+ Text [ italian ] = "Lun~ghezza" ;
+ Text [ spanish ] = "Ta~mao" ;
+ Text [ french ] = "Longueur" ;
+ Text [ dutch ] = "~Lengte" ;
+ Text [ portuguese ] = "~Comprimento" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Dugo";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Lengte";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "~Uzunluk";
+ Text[ language_user1 ] = " ";
+};
+String STR_SCALE
+{
+ Text = "~Nachkommastellen" ;
+ Text [ ENGLISH ] = "Scale" ;
+ Text [ english_us ] = "Decimal places" ;
+ Text [ portuguese_brazilian ] = "Nachkommastellen" ;
+ Text [ swedish ] = "Decimalpositio~ner" ;
+ Text [ danish ] = "Antal decimaler" ;
+ Text [ italian ] = "Posizio~ni decimali" ;
+ Text [ spanish ] = "~Decimales" ;
+ Text [ french ] = "Dcimales" ;
+ Text [ dutch ] = "~Cijfers achter de komma" ;
+ Text [ portuguese ] = "Casas ~decimais" ;
+ Text[ chinese_simplified ] = "Сλ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Miejsca po przecinku";
+ Text[ japanese ] = "_ȉ̌";
+ Text[ chinese_traditional ] = "pI";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "~Cijfers achter de komma";
+ Text[ chinese_simplified ] = "Сλ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ҽ ڸ";
+ Text[ turkish ] = "~Ondalk basamaklar";
+ Text[ language_user1 ] = " ";
+};
+String STR_FORMAT
+{
+ Text = "Format-Beispiel" ;
+ Text [ ENGLISH ] = "Format sample" ;
+ Text[ italian ] = "Esempio di formato";
+ Text[ portuguese_brazilian ] = "Format-Code";
+ Text[ portuguese ] = "Exemplo de formato";
+ Text[ danish ] = "Format eksempel";
+ Text[ french ] = "Exemple de format";
+ Text[ swedish ] = "Format-exempel";
+ Text[ dutch ] = "Opmaakvoorbeeld";
+ Text[ spanish ] = "Ejemplo de formato";
+ Text[ english_us ] = "Format Example";
+ Text[ chinese_simplified ] = "ʽ-ʾ";
+ Text[ language_user1 ] = " ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przykad formatu";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "榡-ܽd";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Opmaakvoorbeeld";
+ Text[ chinese_simplified ] = "ʽ-ʾ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Format rnei";
+};
+String STR_HELP_BOOL_DEFAULT
+{
+ Text = "Whlen Sie einen Wert, der in jedem neu eingefgten Datensatz als Standard erscheinen soll.\nWhlen Sie den leeren String, wenn das Feld keinen solchen Standardwert haben soll." ;
+ Text [ ENGLISH ] = "Whlen Sie einen Wert, der in jedem neu eingefgten Datensatz als Standard erscheinen soll.\nWhlen Sie den leeren String, wenn das Feld keinen solchen Standardwert haben soll." ;
+ Text[ italian ] = "Selezionate un valore da inserire come valore standard in ogni nuovo record di dati.\nSelezionate la sequenza vuota per non impostare nessun valore standard.";
+ Text[ portuguese_brazilian ] = "Whlen Sie einen Wert, der in jedem neu eingefgten Datensatz als Standard erscheinen soll.\nWhlen Sie den leeren String, wenn das Feld keinen solchen Standardwert haben soll.";
+ Text[ portuguese ] = "Seleccione o valor a aparecer como padro em cada registo de dados introduzido de novo.\nSeleccione a sequncia de caracteres vazia, se o campo no tiver que apresentar nenhum valor padro.";
+ Text[ danish ] = "Vlg en vrdi, som skal vises som standard i hver ny datapost.\nVlg den tomme streng, hvis feltet ikke skal have en standardvrdi.";
+ Text[ french ] = "Dfinissez la valeur saisir comme valeur par dfaut dans tout nouvel enregistrement.\\Si un champ ne doit pas adopter cette valeur par dfaut, vous y saisirez la chane (String) vide.";
+ Text[ swedish ] = "Vlj ett vrde som skall vara standard i varje ny infogad datapost.\nVlj den tomma stringen ifall om att fltet inte skall ha ngot standardvrde.";
+ Text[ dutch ] = "Kies een waarde die in iedere nieuw ingevoegd record als standaard moet verschijnen.\nKies een lege string als u niet wilt dat het veld de standaardwaarde krijgt toegewezen.";
+ Text[ spanish ] = "Elija el valor que deba aparecer como estndar en cada registro de datos que se\ninserte de nuevo. Elija el string vaco si el campo no ha de contener tal valor estndar.";
+ Text[ english_us ] = "Select a value that is to appear in all new records as default.\nIf the field is not to have a default value leave it empty.";
+ Text[ chinese_simplified ] = "ѡһÿĿı׼ֵ\nֶβӦ׼ֵôѡһհ׵ִ";
+ Text[ russian ] = " , .\n , .";
+ Text[ polish ] = "Wybierz warto, ktra w kadym nowo wstawionym rekordzie bdzie wartoci standardow.\nWybierz pusty cig, jeli pole nie powinno mie standardowej wartoci.";
+ Text[ japanese ] = "VںނɕWlƂĎ鐔lIĉB\n̨ނɕWlݒ肵Ȃꍇ͋󔒂ɂĉB";
+ Text[ chinese_traditional ] = "бzܤ@ӥΩCsWƶتзǼƭȡC\nY줣ӧtoӼзǼƭȡANܤ@ӪŪrC";
+ Text[ arabic ] = " .\n ɡ .";
+ Text[ dutch ] = "Kies een waarde die in iedere nieuw ingevoegd record als standaard moet verschijnen.\nKies een lege string als u niet wilt dat het veld de standaardwaarde krijgt toegewezen.";
+ Text[ chinese_simplified ] = "ѡһÿĿı׼ֵ\nֶβӦ׼ֵôѡһհ׵ִ";
+ Text[ greek ] = " , .\n , .";
+ Text[ korean ] = " ڵ带 ʱⰪ Ͻʽÿ.\nʵ尡 ׷ ʱⰪ ƾ 쿡 ڿ Ͻʽÿ.";
+ Text[ turkish ] = "Yeni eklenen her kaytta standart olarak bulunacak bir deer sein.\nAlan iin bu tr bir standart deer belirlenmeyecekse bo dizilim sein.";
+ Text[ language_user1 ] = " ";
+};
+String STR_HELP_DEFAULT_VALUE
+{
+ Text = "Geben Sie hier einen Standardwert fr das Feld an.\n\nWenn Sie spter Daten in die Tabelle eingeben, wird in jedem neuen Datensatz diese Zeichenkette fr das aktuelle Feld verwendet. Sie sollte deshalb der weiter unten einzugebenden Zellenformatierung gengen." ;
+ Text [ ENGLISH ] = "Enter a default value for this field." ;
+ Text [ english_us ] = "Enter a default value for this field.\n\nThis character chain, for the field currently selected is entered into each new record when data is entered into the table. It should, therefore, correspond to the cell format that needs to be entered below." ;
+ Text [ portuguese_brazilian ] = "Geben Sie hier einen Standardwert fuer das Feld an." ;
+ Text [ swedish ] = "Ange hr ett standardvrde fr fltet.\n\nNr Du matar in data i tabellen senare anvnds den hr teckenstrngen fr det aktuella fltet i varje datapost. Den br drfr motsvara cellformateringen som skall matas in nedan." ;
+ Text [ danish ] = "Angiv her en standardvrdi for dette felt.\n\nNr du senere indtaster data i denne tabel, bliver denne streng brugt i det aktuelle felt i hver ny datapost. Du br derfor tage hensyn til den celleformatering der indtastes nedenfor." ;
+ Text [ italian ] = "Specificate qui un valore standard per il campo.\n\nDigitando in seguito dei dati nella tabella, in ogni record di dati nuovo verr utilizzata questa stringa per il campo attuale. Per questo motivo necessario che corrisponda al formato della cella da specificare qui di seguito." ;
+ Text [ spanish ] = "Especifique aqu un valor predeterminado para el campo.\n\nSi posteriormente introduce datos en la tabla, en cada registro nuevo se usar esta cadena de carecteres para el campo actual. Por esta razn debe corresponder al formato de celda a introducir ms abajo." ;
+ Text [ french ] = "Saisissez une valeur par dfaut pour le champ.\n\nIl s'agit de la chane de caractres qui sera utilise dans chaque nouvel enregistrement pour le champ actif lorsque vous saisirez des donnes dans la table. Elle doit donc correspondre au format de cellule que vous devrez saisir plus bas." ;
+ Text [ dutch ] = "Geef hier een standaardwaarde voor het veld aan.\n\nAls u dan later gegevens invoert in de tabel dan wordt deze tekenreeks in iedere nieuwe record gebruikt voor het actuele veld en moet corresponderen met de hierna te definiren celopmaak." ;
+ Text [ portuguese ] = "Indique um valor padro para este campo.\n\nEsta cadeia de caracteres ser utilizada para todos os novos registos de dados que introduzir no campo activo da tabela." ;
+ Text[ chinese_simplified ] = "ڴΪֶһĬֵ\n\nԺݣÿµĿݸʽݱ߱ĵԪʽ";
+ Text[ russian ] = " .\n\n , . .";
+ Text[ polish ] = "Prosz poda warto domyln dla pola.\n\nGdy bdziesz pniej wpisywa dane do tabeli, w kadym nowym rekordzie ten cig znakw zostanie uyty dla aktualnego pola. Powinien on dlatego odpowiada formatowi komrek, ktry trzeba wpisa niej.";
+ Text[ japanese ] = "̨ނ̊l͂ĉB\n\nðقް͂ہAeX̐Vںނɂ́Ą݂ޗp̕񂪎gp܂Bł炻́̕AȉŐݒ肷ق̏ƈvȂ΂Ȃ܂B";
+ Text[ chinese_traditional ] = "бzoJ@q{ȡC\n\nbo줧UJLuN|ĥγoӼu榡C";
+ Text[ arabic ] = " .\n\n ޡ . .";
+ Text[ dutch ] = "Geef hier een standaardwaarde voor het veld aan.\n\nAls u dan later gegevens invoert in de tabel dan wordt deze tekenreeks in iedere nieuwe record gebruikt voor het actuele veld en moet corresponderen met de hierna te definiren celopmaak.";
+ Text[ chinese_simplified ] = "ڴΪֶһĬֵ\n\nԺݣÿµĿݸʽݱ߱ĵԪʽ";
+ Text[ greek ] = " .\n\n . .";
+ Text[ korean ] = " ʵ带 ǥذ ԷϽʽÿ. \n\n߿ ̺ ͸ Է ڵ忡 ڿ Դϴ. ׷Ƿ ڿ Ʒ Է° ˿ ؾ մϴ.";
+ Text[ turkish ] = "Alan iin bir standart deer girin.\n\nDaha sonra tabloya veri girii yaptnzda, her yeni veri kmesinde, yrrlkteki alan iin bu dize kullanlr. Dize bu nedenle aada girilmesi gereken hcre formatna uygun olmaldr.";
+ Text[ language_user1 ] = " ";
+};
+String STR_HELP_FIELD_REQUIRED
+{
+ Text = "Aktivieren Sie diese Option, wenn in diesem Feld keine NULL-Werte erlaubt sind, der Benutzer also immer Daten eingeben muss." ;
+ Text [ ENGLISH ] = "Must this field not contain any entries that are empty?" ;
+ Text [ english_us ] = "Activate this option if this field cannot contain NULL values, i.e. the user must always key in data." ;
+ Text [ portuguese_brazilian ] = "Geben Sie an, ob der Benutzer fuer dieses Feld immer Daten eingeben mu." ;
+ Text [ swedish ] = "Aktivera det hr alternativet om inga NULL-vrden r tilltna och anvndaren allts alltid mste mata in data." ;
+ Text [ danish ] = "Aktiver denne indstilling nr NULL-vrdier ikke er tilladt i dette felt, dvs. brugeren altid skal indtaste data." ;
+ Text [ italian ] = "Attivate questa opzione se nel campo non sono ammessi valori ZERO, ossia se l'utente deve sempre inserire dei dati." ;
+ Text [ spanish ] = "Active esta opcin si no estn permitidos valores null en este campo, es decir, si el usuario debe introducir los datos siempre." ;
+ Text [ french ] = "Activez cette option si ce champ n'accepte aucune valeur NULL et si l'utilisateur doit donc toujours y saisir des donnes." ;
+ Text [ dutch ] = "Activeer deze optie als in dit veld geen NUL-waarde is toegestaan, d.w.z. dat de gebruiker hier altijd iets moet invullen." ;
+ Text [ portuguese ] = "Active esta opo se no forem permitidos valores ZERO neste campo, tendo o utilizador que introduzir sempre dados." ;
+ Text[ chinese_simplified ] = "ûֶڲʹֵݣѡ";
+ Text[ russian ] = " , , .. .";
+ Text[ polish ] = "Uaktywnij t opcj, jeli niedozwolone s w tym polu wartoci ZEROWE, jeli uytkownik musi zawsze wpisywa dane ";
+ Text[ japanese ] = "̨ނɾےlF߂ȂA‚܂հްް͂Kvꍇ́A̵߼݂èނɂĉB";
+ Text[ chinese_traditional ] = "]wϥΪ̦bo줺iHJsȦӥJĸơAzEoӿﶵC";
+ Text[ arabic ] = " ѡ .";
+ Text[ dutch ] = "Activeer deze optie als in dit veld geen NUL-waarde is toegestaan, d.w.z. dat de gebruiker hier altijd iets moet invullen.";
+ Text[ chinese_simplified ] = "ûֶڲʹֵݣѡ";
+ Text[ greek ] = " , . .";
+ Text[ korean ] = " ʵ忡 ΰ Ǿ ʾ ڰ ׻ ͸ Էؾ , ɼ Ͻʽÿ.";
+ Text[ turkish ] = "Bu seenei, bu alana BO deer girilememesi, yani kullancnn daima vergi girmek zorunda olmas halinde etkinletiriniz.";
+ Text[ language_user1 ] = " ";
+};
+String STR_HELP_TEXT_LENGTH
+{
+ Text = "Geben Sie die maximal zulssige Textlnge an." ;
+ Text [ ENGLISH ] = "Enter the maximum of characters in a textfield." ;
+ Text [ english_us ] = "Enter the maximum text length permittted." ;
+ Text [ portuguese_brazilian ] = "Geben Sie die maximal zulaessige Textlnge an." ;
+ Text [ swedish ] = "Ange den maximalt tilltna textlngden." ;
+ Text [ danish ] = "Angiv den maksimal tilladte tekstlngde." ;
+ Text [ italian ] = "Digitare la lunghezza massima ammessa per il testo." ;
+ Text [ spanish ] = "Especifique la longitud mxima permitida de texto." ;
+ Text [ french ] = "Indiquez la longueur maximum autorise pour le texte." ;
+ Text [ dutch ] = "Geef de maximaal toelaatbare tekstlengte aan." ;
+ Text [ portuguese ] = "Defina o comprimento mximo permitido para o texto." ;
+ Text[ chinese_simplified ] = "趨ĵȡ";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Prosz poda maksymaln dopuszczaln dugo tekstu.";
+ Text[ japanese ] = "‚镶̍ō̒͂ĉB";
+ Text[ chinese_traditional ] = "г]wJ媺̪סC";
+ Text[ arabic ] = " .";
+ Text[ dutch ] = "Geef de maximaal toelaatbare tekstlengte aan.";
+ Text[ chinese_simplified ] = "趨ĵȡ";
+ Text[ greek ] = " .";
+ Text[ korean ] = "ִ ؽƮ̸ ԷϽʽÿ.";
+ Text[ turkish ] = "zin verilen azami metin uzunluunu giriniz.";
+ Text[ language_user1 ] = " ";
+};
+String STR_HELP_NUMERIC_TYPE
+{
+ Text = "Legen Sie hier fest, welchen Typ die Zahl haben soll." ;
+ Text [ ENGLISH ] = "Enter the number format." ;
+ Text [ english_us ] = "Enter the number format." ;
+ Text [ portuguese_brazilian ] = "Geben Sie den Zahlentyp an." ;
+ Text [ swedish ] = "Definiera typ fr talet hr." ;
+ Text [ danish ] = "Definer her tallets type." ;
+ Text [ italian ] = "Digitate il tipo di numero." ;
+ Text [ spanish ] = "Especifique aqu el formato numrico." ;
+ Text [ french ] = "Spcifiez le type de nombre." ;
+ Text [ dutch ] = "Geef de getalnotatie aan." ;
+ Text [ portuguese ] = "Defina o formato numrico." ;
+ Text[ chinese_simplified ] = "ڴ趨͡";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Tutaj ustal typ liczby.";
+ Text[ japanese ] = "߂͂ĉB";
+ Text[ chinese_traditional ] = "г]wƦrC";
+ Text[ arabic ] = " .";
+ Text[ dutch ] = "Geef de getalnotatie aan.";
+ Text[ chinese_simplified ] = "ڴ趨͡";
+ Text[ greek ] = " .";
+ Text[ korean ] = " ԷϽʽÿ.";
+ Text[ turkish ] = "Rakam tipini belirleyiniz.";
+ Text[ language_user1 ] = " ";
+};
+String STR_HELP_LENGTH
+{
+ Text = "Geben Sie die Lnge fr Daten in diesem Feld an.\n\nFr Dezimal-Felder ist das die maximale Lnge der eingegebenen Zahl, fr Binrfelder die Lnge des Datenblockes.\nWenn der Wert grer ist als der maximal fr diese Datenbank zulssige, wird er entsprechend korrigiert." ;
+ Text [ english_us ] = "Determine the length data can have in this field.\n\nIf decimal fields then the maximum length of the number to be entered, if binary then the length of the data block.\nThe value will be corrected accordingly if it exceeds the maximum for this database." ;
+ Text [ portuguese_brazilian ] = "Geben Sie die Lnge dieses Feldtyps an." ;
+ Text [ swedish ] = "Ange lngden fr data i det hr fltet.\n\nFr decimalflt r det den maximala lngden p det inmatade talet, fr binrflt lngden p datablocket.\nOm vrdet r strre n vad som maximalt r tilltet fr den hr databasen, korrigeras det." ;
+ Text [ danish ] = "Angiv lngden for data i dette felt.\n\nFor decimalfelter er det tallets maksimale lngde, for binrfelter er det datablokkens lngde.\nHvis vrdien er strre en den maksimal tilladte for denne database, bliver den rettet tilsvarende." ;
+ Text [ italian ] = "Digitate la lunghezza di questo tipo di campo.\n\nPer i campi decimali la lunghezza massima ammessa il numero dato, per i campi binari la lunghezza del blocco dati.\nSe il valore maggiore di quello ammesso dal database attuale verr corretto automaticamente." ;
+ Text [ spanish ] = "Especifique la longitud de los datos en este tipo de campo.\n\nPara campos decimales ser la longitud mxima del nmero introducido; para campos binarios, la longitud del bloque de datos.\nSi el valor fuera mayor que el mximo permitido para esta base de datos, se corregir correspondientemente." ;
+ Text [ french ] = "Indiquez la longueur pour les donnes de ce champ.\n\n savoir : pour les champs de type Dcimal, la longueur maximale du nombre saisir et pour les champs de type Binaire la longueur du bloc de donnes.\nLa valeur sera corrige automatiquement si elle devait tre suprieure au maximum autoris pour cette base de donnes." ;
+ Text [ dutch ] = "Geef de lengte van dit veldtype aan.\n\nVoor decimale velden is dit de maximale lengte van het in te vullen getal, voor binaire velden de lengte van het gegevensblok.\nAls het veld langer idan voor deze database maximaal is toegestaan dan wordt de lengte gecorrigeerd." ;
+ Text [ portuguese ] = "Defina o comprimento para os dados deste campo.\n\nPara campos decimais este o comprimento mximo do nmero indicado; para campos binrios o comprimento do bloco de dados.\nEste valor ser devidamente corrigido se for superior ao mximo permitido para esta base de dados," ;
+ Text[ chinese_simplified ] = "ֶеݳȡ\n\nʮֶиݵ󳤶ȣڶֶиݿijȡ\nֵݿֵôֵᱻӦظ";
+ Text[ russian ] = " .\n\n - , - .\n , .";
+ Text[ polish ] = "Podaj dugo danych w tym polu.\n\nDla pl dziesitnych oznacza ona maksymaln dugo dla wpisanych liczb, w przypadku pl birarnych okrela ona dugo bloku danych.\nJeeli warto bdzie przekracza dopuszczaln dla tego pola warto maksymaln, zostanie ona odpowiednio skorygowana.";
+ Text[ japanese ] = "̨ނɓް̒͂ĉB\n\n\\i@̨ނɂ͓͂鐔̍ő̒Ai@̨ނɂްۯ̒͂ĉB\nlްް̍ő𒴂ꍇ́AɂďC܂B";
+ Text[ chinese_traditional ] = "г]woסC\n\nQiswJƦr̪סAGwu̪סC\npGJuWL]wSA{ǴN|۰ʭץC";
+ Text[ arabic ] = " .\n\n .\n .";
+ Text[ dutch ] = "Geef de lengte van dit veldtype aan.\n\nVoor decimale velden is dit de maximale lengte van het in te vullen getal, voor binaire velden de lengte van het gegevensblok.\nAls het veld langer idan voor deze database maximaal is toegestaan dan wordt de lengte gecorrigeerd.";
+ Text[ chinese_simplified ] = "ֶеݳȡ\n\nʮֶиݵ󳤶ȣڶֶиݿijȡ\nֵݿֵôֵᱻӦظ";
+ Text[ greek ] = " .\n\n , \n , .";
+ Text[ korean ] = " ʵ ̸ Ͻʽÿ.\n\n10 ʵ 쿡 Էµ ִ , ̳ʸ ʵ 쿡 ̸ Էմϴ. \n ͺ̽ ִ ũ ˴ϴ.";
+ Text[ turkish ] = "Bu alandaki veri uzunluunu giriniz.\n\nBu uzunluk, ondalk alanlar iin girilen saynn azami uzunluu, ikili alanlar iin ise veri blou uzunluudur.\nSz konusu deer, bu veritaban iin azami olarak izin verilenden daha byk olmas halinde uygun bir ekilde dzeltilecektir.";
+ Text[ language_user1 ] = " ";
+};
+String STR_HELP_SCALE
+{
+ Text = "Geben Sie an, wie viel Nachkommastellen die Zahlen in diesem Feld enthalten sollen." ;
+ Text [ ENGLISH ] = "Enter the number of decimals." ;
+ Text [ english_us ] = "Specify the number of decimal places permitted in this field." ;
+ Text [ portuguese_brazilian ] = "Geben Sie die Zahl der Nachkommastellen an." ;
+ Text [ swedish ] = "Ange hur mnga decimaler talen skall innehlla i det hr fltet." ;
+ Text [ danish ] = "Angiv her, hvormange decimaler dette felt skal indeholde." ;
+ Text [ italian ] = "Digitate il numero di cifre dopo la virgola." ;
+ Text [ spanish ] = "Especifique el nmero de decimales que deban contener los nmeros en este campo." ;
+ Text [ french ] = "Veuillez indiquer le nombre de dcimales souhait pour les nombres de ce champ." ;
+ Text [ dutch ] = "Geef het aantal plaatsen achter de komma aan." ;
+ Text [ portuguese ] = "Defina o nmero de casas decimais para este campo." ;
+ Text[ chinese_simplified ] = "Ϊֶڵ趨Сλ";
+ Text[ russian ] = " , .";
+ Text[ polish ] = "Prosz poda liczb miejsc po przecinku, ktre dane pole ma zawiera.";
+ Text[ japanese ] = "̨ނň_ȉ̌͂ĉB";
+ Text[ chinese_traditional ] = "г]wJ쪺pIƦC";
+ Text[ arabic ] = " .";
+ Text[ dutch ] = "Geef het aantal plaatsen achter de komma aan.";
+ Text[ chinese_simplified ] = "Ϊֶڵ趨Сλ";
+ Text[ greek ] = " .";
+ Text[ korean ] = " ʵ ڰ Ҽ ڸ ؾ Ͻʽÿ.";
+ Text[ turkish ] = "Bu alandaki saylarn sahip olmas gereken ondalk basamak saysn belirleyiniz.";
+ Text[ language_user1 ] = " ";
+};
+String STR_HELP_FORMAT_CODE
+{
+ Text = "Hier sehen Sie, wie die Daten der aktuellen Spalte mit dem aktuell eingestellten Format - das Sie mittels des nebenstehenden Buttons ndern knnen - formatiert werden wrden.";
+ Text[ ENGLISH ] = "Hier sehen Sie, wie die Daten der aktuellen Spalte mit dem aktuell eingestellten Format - das Sie mittels des nebenstehenden Buttons ndern knnen - formatiert werden wrden.";
+ Text[ italian ] = "Qui vedete come possibile formattare i dati dell'attuale colonna con il formato corrente che potete cambiare con il bottone che si trova qui a fianco.";
+ Text[ portuguese_brazilian ] = "Der Format-Code der aktuellen Spalte. Diese Einstellung knnen Sie nicht direkt, sondern nur mittels des nebenstehenden Buttons ndern.";
+ Text[ portuguese ] = "Aqui pode ver como os dados da coluna actual seriam formatados se utilizasse o formato definido. Para modificar este parmetro, clique no boto ao lado.";
+ Text[ danish ] = "Her vises, hvorledes den aktuelle kolonnes data vil komme til at se ud med det aktuelt indstillede format (brug knapperne til at ndre formatet).";
+ Text[ french ] = "Vous montre comment les donnes de la colonne concerne seront formates si vous utilisez le format slectionn. Pour modifier ce paramtre, cliquez sur le bouton Modifier situ ct.";
+ Text[ swedish ] = "Hr kan Du se hur data i den aktuella kolumnen skulle formateras med det nu instllda formatet, som Du kan ndra med hjlp av knapparna hr bredvid.";
+ Text[ dutch ] = "Hier ziet u hoe de gegevens in de actuele kolom eruit zouden zien met de actueel ingestelde opmaak. Deze instelling kunt u veranderen met de nevenstaande buttons.";
+ Text[ spanish ] = "Aqu puede ver como seran formateados los datos de la columna actual con el formato definido actualmente - que puede modificar con el botn que se encuentra al lado.";
+ Text[ english_us ] = "Here you can see how the data will be displayed with the current format settings (use the buttons nearby to modify the format).";
+ Text[ chinese_simplified ] = "ܹԱߵİťĵǰеݵĸʽ";
+ Text[ russian ] = " , , , , .";
+ Text[ polish ] = "Tutaj wida, w jaki sposb dane aktualnej kolumny formatowane bd w ustawionym formacie, kry moesz zmieni za pomoc przycisku znajdujcego si obok.";
+ Text[ japanese ] = "łͤƒ̗ްݒ蒆̏(݂ŕύX”\\)ɂĂǂ̂悤ɕς邩邱Ƃł܂B";
+ Text[ chinese_traditional ] = "zݨ@䪺sܧe椺Ʈ榡C";
+ Text[ arabic ] = " ( ).";
+ Text[ dutch ] = "Hier ziet u hoe de gegevens in de actuele kolom eruit zouden zien met de actueel ingestelde opmaak. Deze instelling kunt u veranderen met de nevenstaande buttons.";
+ Text[ chinese_simplified ] = "ܹԱߵİťĵǰеݵĸʽ";
+ Text[ greek ] = " ( ).";
+ Text[ korean ] = "⿡ Ͱ ( ִ ߸ ̿Ͽ ٲ ) ˵Ǵ ֽϴ.";
+ Text[ turkish ] = "Burada, seili stundaki verilerin - yandaki dme ile deitirebileceiniz - yrrlkteki ayarlar ile nasl formatlanacan grebilirsiniz.";
+ Text[ language_user1 ] = " ";
+};
+String STR_HELP_FORMAT_BUTTON
+{
+ Text = "Hiermit knnen Sie festlegen, wie die Daten der Tabelle bei der Ausgabe formatiert werden sollen.";
+ Text [ ENGLISH ] = "Hiermit knnen Sie festlegen, wie die Daten der Tabelle bei der Ausgabe formatiert werden sollen.";
+ Text[ italian ] = "In questo modo potete determinare la formattazione dei dati della tabella all'uscita.";
+ Text[ portuguese_brazilian ] = "Hiermit knnen Sie festlegen, wie die Daten der Tabelle bei der Ausgabe formatiert werden sollen.";
+ Text[ portuguese ] = "Permite-lhe definir o formato para a impresso dos dados da tabela.";
+ Text[ danish ] = "Her kan du definere et outputformat for tabellens data.";
+ Text[ french ] = "Permet de dterminer le format de sortie des donnes de la table.";
+ Text[ swedish ] = "Hr kan Du bestmma hur tabellernas data skall formateras.";
+ Text[ dutch ] = "Hiermee kunt u instellen hoe u de gegevens wilt opmaken.";
+ Text[ spanish ] = "Aqu puede determinar el tipo de formateado para la salida de los datos de la tabla.";
+ Text[ english_us ] = "Here you can determine the output format of the data.";
+ Text[ chinese_simplified ] = "ܹڴ趨Ĵӡʽ";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Tutaj moesz ustawi wyjciowy format tabeli.";
+ Text[ japanese ] = "ðقްo͂̍ۂɂǂ̂悤ȏɂ邩w肵ĉB";
+ Text[ chinese_traditional ] = "zb]wuCL榡C";
+ Text[ arabic ] = " .";
+ Text[ dutch ] = "Hiermee kunt u instellen hoe u de gegevens wilt opmaken.";
+ Text[ chinese_simplified ] = "ܹڴ趨Ĵӡʽ";
+ Text[ greek ] = " .";
+ Text[ korean ] = "̷ν ½ ̺ Ͱ  ˵Ǿ ֽϴ.";
+ Text[ turkish ] = "Burada tablo verilerinin kt formatn belirleyebilirsiniz.";
+ Text[ language_user1 ] = " ";
+};
+String STR_HELP_AUTOINCREMENT
+{
+ Text = "Whlen Sie, ob dieses Feld Auto-Inkrement-Werte enthalten soll.\n\nSie knnen in ihm dann keine Daten direkt eingeben, sondern jeder neue Datensatz bekommt automatisch einen eigenen Wert (der sich durch Inkrementieren aus dem des vorigen Datensatzes ergibt) zugewiesen." ;
+ Text [ english_us ] = "Choose if this field should contain AutoIncrement values.\n\nYou can not enter data in fields of this type. An intrinsic value will be assigned to each new record automatically (resulting from the increment of the previous record)." ;
+ Text[ italian ] = "Scegliete se questo campo deve contenere valori automatici d'incremento.\n\nIn questo campo non sar possibile digitare alcun dato direttamente. Ogni nuovo record di dati riceve automaticamente un valore proprio (che risulta dall'incremento del precedente).";
+ Text[ portuguese_brazilian ] = "Whlen Sie, ob dieses Feld ein Auto-Inkrement-Wert sein soll.\n\nSie knnen in diese Spalte dann keine Daten direkt eingeben, sondern jeder neue Datensatz bekommt automatisch einen eigenen Wert (der sich aus dem Inkrementieren des vorigen ergibt) zugewiesen.";
+ Text[ portuguese ] = "Indique se este campo dever conter valores de incremento automtico ou no.\n\nNo poder ento introduzir dados directamente nesse campo. Cada novo registo de dados obter automaticamente um valor prprio (valor este que resulta por incremento do valor anterior).";
+ Text[ danish ] = "Vlg her, om dette felt skal indeholde AutoInkrement-vrdier.\n\nDet er da ikke muligt at indtaste data direkte. Hver ny datapost fr automatisk tildelt en egen vrdi, som genereres ved inkrementering af den forrige datapost.";
+ Text[ french ] = "Dcidez si le champ devra recevoir une valeur d'AutoIncrment (ou non).\n\nSi oui, vous ne pourrez pas saisir directement des donnes dans cette colonne : la valeur de tout nouvel enregistrement lui sera attribue automatiquement ( savoir la valeur incrmente partir du champ de l'enregistrement prcdent).";
+ Text[ swedish ] = "Vlj om det hr fltet skall innehlla Auto-Inkrementvrden.\n\nDu kan i s fall inte mata in ngra data direkt i fltet, utan varje ny datapost tilldelas automatiskt ett eget vrde (vilket bestms av inkrement frn den frra dataposten).";
+ Text[ dutch ] = "U kunt dit veld een auto increment-waarde toewijzen.\n\nIn dat geval kunt u hierin geen gegevens typen, maar iedere nieuwe record krijgt automatisch een eigen waarde toegewezen, die het resultaat is van het incrementeren van de vorige.";
+ Text[ spanish ] = "Defina si este campo ha de ser uno de incremento automtico.\n\nEn esta columna no podr entonces escribir ms datos directamente, sino que a cada nuevo registro de datos se le asignar automticamente un valor propio (el cual resultar de la incrementacin del anterior).";
+ Text[ chinese_simplified ] = "ѡֶǷӦúԶӵֵ\n\nֱݣΪÿԶõһԼֵ(֮ǰֵͨó)";
+ Text[ russian ] = ", .\n\n , ( ).";
+ Text[ polish ] = "Tutaj moesz okreli, czy to pole ma zawiera warto autoinkrementu.\n\nDo tego pola nie moesz wprowadzi danych bezporednio, ale kademu rekordowi zostanie przypisana automatycznie wasna warto (ktra wyniknie z inkrementacji poprzedniego rekordu).";
+ Text[ japanese ] = "̨ނIJݸĒlɎgp邩ǂIĂB\n\n̨ނɂ͒ް͂邱Ƃ͂łAVںނɂ͂ꂼ̒l(OiKںނݸĂꂽʒl)Iɓ͂܂B";
+ Text[ chinese_traditional ] = "бzܳoO_ӧt۰ʼW[ƭȡC\n\nzઽJơM]CӷsƲշ|۰ʱo@Ӧۤvƭ(qeƲդqLWȱoX)C";
+ Text[ arabic ] = " .\n\n ѡ ( ).";
+ Text[ dutch ] = "U kunt dit veld een auto increment-waarde toewijzen.\n\nIn dat geval kunt u hierin geen gegevens typen, maar iedere nieuwe record krijgt automatisch een eigen waarde toegewezen, die het resultaat is van het incrementeren van de vorige.";
+ Text[ chinese_simplified ] = "ѡֶǷӦúԶӵֵ\n\nֱݣΪÿԶõһԼֵ(֮ǰֵͨó)";
+ Text[ greek ] = " .\n\n , ( ).";
+ Text[ korean ] = " ʵ尡 ڵ ؾ Ͻʽÿ.\n\n׷ ʵ忡 ͸ Է ڵ ڵ ( ڵ带 Ŵν ) ް ˴ϴ.";
+ Text[ turkish ] = "Bu alana, otomatik art deerleri konulup konulmayacan seiniz.\n\nBu alana artk dorudan veri girii yapamazsnz. Bunun yerine her yeni kayt iin otomatik olarak (bir nceki kaydn artndan oluan) zel bir deer atanr.";
+ Text[ language_user1 ] = " ";
+};
+PushButton PB_FORMAT
+{
+ TabStop = TRUE ;
+ Text = "..." ;
+ Text [ ENGLISH ] = "..." ;
+ Text[ italian ] = "...";
+ Text[ portuguese_brazilian ] = "Format...";
+ Text[ portuguese ] = "...";
+ Text[ danish ] = "...";
+ Text[ french ] = "...";
+ Text[ swedish ] = "...";
+ Text[ dutch ] = "...";
+ Text[ spanish ] = "...";
+ Text[ english_us ] = "...";
+ Text[ chinese_simplified ] = "...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "...";
+ Text[ japanese ] = "...";
+ Text[ chinese_traditional ] = "...";
+ Text[ arabic ] = "...";
+ Text[ dutch ] = "...";
+ Text[ chinese_simplified ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "...";
+ Text[ turkish ] = "...";
+ Text[ language_user1 ] = " ";
+};
+String STR_TABLEDESIGN_DUPLICATE_NAME
+{
+ Text = "Die Tabelle kann nicht gespeichert werden, da der Spaltenname \"$column$\" doppelt vergeben wurde.";
+ Text [ english_us ] = "The table can't be saved due to duplicate column name \"$column$\".";
+ Text[ portuguese ] = "Impossvel guardar a tabela. O nome da coluna \"$column$\" foi atribudo duas vezes.";
+ Text[ russian ] = " , .. \"$column$\" .";
+ Text[ greek ] = " , \"$column$\".";
+ Text[ dutch ] = "De tabel kan niet worden opgeslagen daar de kolomnaam \"$column$\" reeds bestaat.";
+ Text[ french ] = "Impossible d'enregistrer la table : le nom de colonne \"$column$\" a t attribu deux fois.";
+ Text[ spanish ] = "No se puede guardar la tabla porque el nombre de columna \"$column$\" est usado dos veces.";
+ Text[ italian ] = "Non stato possibile memorizzare la tabella in quanto il nome della colonna \"$column$\" stato gi assegnato.";
+ Text[ danish ] = "Det er ikke muligt at gemme tabellen, fordi kolonnenavnet \"$column$\" er blevet tildelt to gange.";
+ Text[ swedish ] = "Tabellen kan inte sparas eftersom kolumnnamnet \"$column$\" har tilldelats dubbelt.";
+ Text[ polish ] = "Tabeli nie mona zapisa, poniew nazwa kolumny \"$column$\" zostaa ju raz nadana.";
+ Text[ portuguese_brazilian ] = "The table can't be saved as the column name \"$column$\" is used twice.";
+ Text[ japanese ] = "\"$column$\"dĂ̂ðقۑł܂B";
+ Text[ korean ] = " ̸\"$column$\" ߺǾ Ǿ ̺ ϴ.";
+ Text[ chinese_simplified ] = "Ϊظʹ\"$column$\"޷";
+ Text[ chinese_traditional ] = "LkxsoӪA]W\"$column$\" wgsbC";
+ Text[ arabic ] = " \"$column$\" .";
+ Text[ turkish ] = "\"$column$\" stun ad daha nce kullanld iin tablo kaydedilemiyor.";
+};
+String STR_TBL_COLUMN_IS_KEYCOLUMN
+{
+ Text = "Die Spalten \"$column$\" gehrt zum Primrschlssel. Falls sie gelscht wird, wird auch der Pirmrschlssel gelscht.Wollen Sie sie wirklich lschen?";
+ Text [ english_us ] = "The column \"$column$\" belongs to the primary key. If the column will be deleted the primary key will be deleted as well. Do you really want to delete the column?";
+};
+String STR_TBL_COLUMN_IS_KEYCOLUMN_TITLE
+{
+ Text = "Primrschlssel betroffen";
+ Text [ english_us ] = "primary key related";
+};
+
+
+
+
+