summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx325
-rw-r--r--dbaccess/source/ui/relationdesign/relation.src231
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx5
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx88
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx30
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx63
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignView.cxx43
-rw-r--r--dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx12
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx6
-rw-r--r--dbaccess/source/ui/tabledesign/table.src233
10 files changed, 614 insertions, 422 deletions
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 21991a088e89..1ab4a5c2174c 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RelationController.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: fs $ $Date: 2001-04-03 14:14:29 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:30:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -151,9 +151,6 @@
#ifndef _COM_SUN_STAR_IO_XACTIVEDATASINK_HPP_
#include <com/sun/star/io/XActiveDataSink.hpp>
#endif
-#ifndef _COM_SUN_STAR_FRAME_XTASK_HPP_
-#include <com/sun/star/frame/XTask.hpp>
-#endif
#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
#endif
@@ -355,15 +352,13 @@ void SAL_CALL ORelationController::initialize( const Sequence< Any >& aArguments
m_bEditable = sal_False;
m_bRelationsPossible = sal_False;
{
- String aMessage(ModuleRes(RID_STR_CONNECTION_LOST));
- ODataView* pWindow = getView();
- InfoBox(pWindow, aMessage).Execute();
- Reference<XTask> xTask(m_xCurrentFrame,UNO_QUERY);
- if(xTask.is())
{
- xTask->close();
- throw SQLException();
+ String aMessage(ModuleRes(RID_STR_CONNECTION_LOST));
+ ODataView* pWindow = getView();
+ InfoBox(pWindow, aMessage).Execute();
}
+ closeTask();
+ throw SQLException();
}
}
else if(!m_xConnection->getMetaData()->supportsIntegrityEnhancementFacility())
@@ -375,12 +370,8 @@ void SAL_CALL ORelationController::initialize( const Sequence< Any >& aArguments
OSQLMessageBox aDlg(getView(),ModuleRes(STR_RELATIONDESIGN),ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE));
aDlg.Execute();
}
- Reference<XTask> xTask(m_xCurrentFrame,UNO_QUERY);
- if(xTask.is())
- {
- xTask->close();
- throw SQLException();
- }
+ closeTask();
+ throw SQLException();
}
if(!m_bRelationsPossible)
InvalidateAll();
@@ -490,17 +481,8 @@ sal_Bool SAL_CALL ORelationController::suspend(sal_Bool bSuspend) throw( Runtime
// -----------------------------------------------------------------------------
void ORelationController::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;
-
+ OJoinController::AddSupportedFeatures();
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/AddRelation")] = ID_REALTION_ADD_RELATION;
}
// -----------------------------------------------------------------------------
ToolBox* ORelationController::CreateToolBox(Window* _pParent)
@@ -624,287 +606,10 @@ OTableWindowData* ORelationController::createTableWindowData()
{
return new OTableWindowData();
}
-
-// -----------------------------------------------------------------------------
-//void ORelationController::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_ENSURE(sal_False, 0);
-// }
-//
-// }
-// }
-// }
-// catch(SQLException& e)
-// {
-// showError(SQLExceptionInfo(e));
-// }
-// catch(Exception&)
-// {
-// OSL_ENSURE(sal_False, 0);
-// }
-//}
// -----------------------------------------------------------------------------
+String ORelationController::getMenu() const
+{
+ return String::CreateFromInt32(RID_RELATION_DESIGN_MAIN_MENU);
+}
// -----------------------------------------------------------------------------
-//void ORelationController::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_ENSURE(sal_False, 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 ORelationController::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/relationdesign/relation.src b/dbaccess/source/ui/relationdesign/relation.src
index 3d04fcc20033..3e897daa2dc9 100644
--- a/dbaccess/source/ui/relationdesign/relation.src
+++ b/dbaccess/source/ui/relationdesign/relation.src
@@ -2,9 +2,9 @@
*
* $RCSfile: relation.src,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: kz $ $Date: 2001-04-10 20:31:25 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:30:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,6 +77,13 @@
#include "toolbox.hrc"
#endif
+#define MN_EDIT 20
+#define MN_VIEW 21
+#define MN_EXTRA 22
+#define MN_INDEX 23
+#define MN_WIN 30
+#define MN_HELP 31
+
ToolBox RID_BRW_REALTIONDESIGN_TOOLBOX
{
@@ -261,28 +268,7 @@ ToolBox RID_BRW_REALTIONDESIGN_TOOLBOX
};
ToolboxItem
{
- Identifier = ID_REALTION_ADD_RELATION ;
- HelpId = SID_SBA_ADD_RELATION ;
- Text = "neue Relation ..." ;
- Text [ ENGLISH ] = "new relation ..." ;
- Text[ english_us ] = "New Relation...";
- Text[ portuguese ] = "nova relao...";
- Text[ russian ] = " ...";
- Text[ greek ] = " ...";
- Text[ dutch ] = "nieuwe relatie...";
- Text[ french ] = "Nouvelle relation ...";
- Text[ spanish ] = "nueva relacin ...";
- Text[ italian ] = "Nuova relazione...";
- Text[ danish ] = "new relation ...";
- Text[ swedish ] = "ny relation ...";
- Text[ polish ] = "nowa relacja ...";
- Text[ portuguese_brazilian ] = "new relation ...";
- Text[ japanese ] = "Vڰ...";
- Text[ korean ] = "new relation ...";
- Text[ chinese_simplified ] = "µĹϵ...";
- Text[ chinese_traditional ] = "sY...";
- Text[ turkish ] = "new relation ...";
- Text[ arabic ] = " ...";
+ MID_DBUI_REALTION_ADD_RELATION
};
/* ToolBoxItem
{
@@ -393,6 +379,203 @@ QueryBox RELATION_DESIGN_SAVEMODIFIED
Message[ arabic ] = " .\n ʿ";
};
+Menu RID_RELATION_DESIGN_MAIN_MENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_FILE_PICKLIST
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_FILE_NEWDOC
+ };
+ MenuItem
+ {
+ ITEM_FILE_OPENDOC
+ };
+ ITEM_FILE_AUTOPILOT
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_FILE_CLOSEDOC
+ Command = ".uno:DB/Close";
+ };
+ MenuItem
+ {
+ ITEM_FILE_SAVEDOCS //!!muss fuer andere geoeffnete Tasks drinbleiben
+ };
+ MenuItem
+ {
+ ITEM_FILE_SAVEDOC
+ Command = ".uno:Save";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_FILE_QUITAPP
+ };
+ };
+ };
+ };
+ MenuItem
+ {
+ Identifier = MN_EDIT ;
+ HelpID = MN_EDIT ;
+ Text = "~Bearbeiten" ;
+ Text [ English ] = "~Edit" ;
+ Text [ norwegian ] = "~Rediger" ;
+ Text [ italian ] = "~Modifica" ;
+ Text [ portuguese_brazilian ] = "~Editar" ;
+ Text [ portuguese ] = "~Editar" ;
+ Text [ finnish ] = "~Muokkaa" ;
+ Text [ danish ] = "~Rediger" ;
+ Text [ french ] = "~dition" ;
+ Text [ swedish ] = "R~edigera" ;
+ Text [ dutch ] = "Be~werken" ;
+ Text [ spanish ] = "~Editar" ;
+ Text [ english_us ] = "~Edit" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = ID_BROWSER_UNDO ;
+ HelpId = SID_UNDO ;
+ Command = ".uno:Undo";
+ Text = "Rckgngig" ;
+ Text [ ENGLISH ] = "Undo" ;
+ Text[ english_us ] = "Undo";
+ Text[ portuguese ] = "Anular";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Ongedaan";
+ Text[ french ] = "Annuler";
+ Text[ spanish ] = "Deshacer";
+ Text[ italian ] = "Annulla";
+ Text[ danish ] = "Undo";
+ Text[ swedish ] = "ngra";
+ Text[ polish ] = "Cofnij";
+ Text[ portuguese_brazilian ] = "Undo";
+ Text[ japanese ] = "ɖ߂";
+ Text[ korean ] = "Undo";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "_";
+ Text[ turkish ] = "Undo";
+ Text[ arabic ] = "";
+ };
+ MenuItem
+ {
+ Identifier = ID_BROWSER_REDO ;
+ HelpId = SID_REDO ;
+ Command = ".uno:Redo";
+
+ Text = "Wiederherstellen" ;
+ Text [ ENGLISH ] = "Redo" ;
+
+ Text[ english_us ] = "Redo";
+ Text[ portuguese ] = "Restaurar";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Herstellen";
+ Text[ french ] = "Restaurer";
+ Text[ spanish ] = "Restaurar";
+ Text[ italian ] = "Ripristina";
+ Text[ danish ] = "Redo";
+ Text[ swedish ] = "terstll";
+ Text[ polish ] = "Przywr";
+ Text[ portuguese_brazilian ] = "Redo";
+ Text[ japanese ] = "蒼";
+ Text[ korean ] = "Redo";
+ Text[ chinese_simplified ] = "ָ";
+ Text[ chinese_traditional ] = "_MO";
+ Text[ turkish ] = "Redo";
+ Text[ arabic ] = "";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ };
+ };
+ Text[ russian ] = "~";
+ Text[ polish ] = "~Edytuj";
+ Text[ japanese ] = "ҏW(~E)";
+ Text[ chinese_simplified ] = "༭(~E)";
+ Text[ chinese_traditional ] = "s(~E)";
+ Text[ arabic ] = "~";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "~Dzenle";
+ Text[ language_user1 ] = " ";
+ };
+
+ MenuItem
+ {
+ Identifier = MN_EXTRA ;
+ HelpID = MN_EXTRA ;
+ Text = "E~xtras" ;
+ Text [ English ] = "T~ools" ;
+ Text [ norwegian ] = "Verk~ty" ;
+ Text [ italian ] = "~Strumenti" ;
+ Text [ portuguese_brazilian ] = "F~erramentas" ;
+ Text [ portuguese ] = "~Ferramentas" ;
+ Text [ finnish ] = "~Tykalut" ;
+ Text [ danish ] = "Fun~ktioner" ;
+ Text [ french ] = "~Outils" ;
+ Text [ swedish ] = "~Verktyg" ;
+ Text [ dutch ] = "E~xtra" ;
+ Text [ spanish ] = "~Herramientas" ;
+ Text [ english_us ] = "~Tools" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ ITEM_DATASOURCE_ADMINISTRATION
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_TOOLS_BASICCHOOSER
+ };
+ ITEM_MN_OPTIONS
+ MenuItem
+ {
+ MID_DBUI_REALTION_ADD_RELATION
+ Command = ".uno:DB/AddRelation";
+ };
+ };
+ };
+ Text[ russian ] = "~";
+ Text[ greek ] = "~";
+ Text[ polish ] = "~Narzdzia";
+ Text[ japanese ] = "°(~T)";
+ Text[ korean ] = "(~T)";
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ chinese_traditional ] = "u(~T)";
+ Text[ arabic ] = "~";
+ Text[ turkish ] = "~Aralar";
+ Text[ language_user1 ] = " ";
+ };
+ ITEM_WINDOW_MENU
+ ITEM_HELP_MENU
+ };
+};
+
+
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
index 4728a1048652..4cb6c99c5e3e 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FieldDescGenWin.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2001-04-19 13:20:23 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:32:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -222,3 +222,4 @@ void OFieldDescGenWin::paste()
+
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 9e9b88e0b51e..dc3be795450d 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TEditControl.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: fs $ $Date: 2001-04-12 15:49:04 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:32:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -270,6 +270,7 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow)
,bReadOnly(sal_True)
,pActRow(NULL)
,pDescrWin(NULL)
+ ,m_eChildFocus(NONE)
{
DBG_CTOR(OTableEditorCtrl,NULL);
@@ -408,7 +409,7 @@ sal_Bool OTableEditorCtrl::SetDataPtr( long nRow )
return sal_False;
OSL_ENSURE((xub_StrLen)nRow < m_pRowList->size(),"Row is greater than size!");
- if(nRow >= m_pRowList->size())
+ if(nRow >= (long)m_pRowList->size())
return NULL;
pActRow = (*m_pRowList)[nRow];
return pActRow != NULL;
@@ -652,6 +653,7 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId)
// Wenn FieldDescr existiert, wurde Feld geloescht und alter Inhalt wird wiederhergestellt
if (pActFieldDescr)
{
+ GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo()));
SwitchType(NULL);
pActFieldDescr = pActRow->GetActFieldDescr();
}
@@ -807,11 +809,17 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId )
else
{
GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo()));
- SwitchType( GetView()->getController()->getTypeInfo(pTypeCell->GetSelectEntryPos()) );
+ USHORT nPos = pTypeCell->GetSelectEntryPos();
+ if(nPos != LISTBOX_ENTRY_NOTFOUND)
+ SwitchType( GetView()->getController()->getTypeInfo(nPos) );
+ else
+ SwitchType(NULL);
+
}
- GetUndoManager()->LeaveListAction();
SaveData(nRow,nColId);
+ // SaveData could create a undo action as well
+ GetUndoManager()->LeaveListAction();
RowModified(nRow);
DbCellControllerRef xController(Controller());
if(xController.Is())
@@ -1096,8 +1104,6 @@ void OTableEditorCtrl::SetData( long nRow, sal_uInt16 nColId, const OTypeInfo* _
if( !pFieldDescr && nColId != FIELD_TYPE)
return;
- String strYes(ModuleRes(STR_VALUE_YES));
- String strNo(ModuleRes(STR_VALUE_NO));
//////////////////////////////////////////////////////////////////////
// Einzelne Felder setzen
switch( nColId )
@@ -1121,9 +1127,17 @@ void OTableEditorCtrl::SetData( long nRow, sal_uInt16 nColId, const String& _rNe
OFieldDescription* pFieldDescr = GetFieldDescr( nRow );
if( !pFieldDescr && nColId != FIELD_TYPE)
return;
+// {
+// OTypeInfoMap::const_iterator aTypeIter = GetView()->getController()->getTypeInfo()->find(DataType::VARCHAR);
+// if(aTypeIter == GetView()->getController()->getTypeInfo()->end())
+// aTypeIter = GetView()->getController()->getTypeInfo()->begin();
+//
+// OTableRow* pRow = (*m_pRowList)[nRow];
+// pRow->SetFieldType( aTypeIter->second );
+// pFieldDescr = pRow->GetActFieldDescr();
+// }
+
- String strYes(ModuleRes(STR_VALUE_YES));
- String strNo(ModuleRes(STR_VALUE_NO));
//////////////////////////////////////////////////////////////////////
// Einzelne Felder setzen
switch( nColId )
@@ -1159,7 +1173,11 @@ void OTableEditorCtrl::SetData( long nRow, sal_uInt16 nColId, const String& _rNe
break;
case FIELD_PROPERTY_AUTOINC:
- pFieldDescr->SetAutoIncrement(_rNewData.Equals(strYes));
+ {
+ String strYes(ModuleRes(STR_VALUE_YES));
+ String strNo(ModuleRes(STR_VALUE_NO));
+ pFieldDescr->SetAutoIncrement(_rNewData.Equals(strYes));
+ }
break;
case FIELD_PROPERTY_SCALE:
pFieldDescr->SetScale(_rNewData.ToInt32());
@@ -1277,14 +1295,16 @@ sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow )
if(bIsCutAllowed)
{
- if(pDescrCell->HasChildPathFocus())
+ if(m_eChildFocus == DESCRIPTION)
bIsCutAllowed = pDescrCell->GetSelected().Len() != 0;
- else if(pNameCell->HasChildPathFocus())
+ else if(m_eChildFocus == NAME)
bIsCutAllowed = pNameCell->GetSelected().Len() != 0;
- else
- // only rows are slected for cutting so we look if all rows are valid
+ else if(m_eChildFocus == ROW)
+ // only rows are selected for cutting so we look if all rows are valid
// wwe don't waant to copy empty rows here
bIsCutAllowed = IsCopyAllowed(nRow);
+ else
+ bIsCutAllowed = sal_False;
}
// Reference<XPropertySet> xTable = GetView()->getController()->getTable();
@@ -1329,17 +1349,25 @@ sal_Bool OTableEditorCtrl::IsPasteAllowed( long nRow )
//------------------------------------------------------------------------------
void OTableEditorCtrl::Cut()
{
- if(pNameCell->HasChildPathFocus())
+ if(m_eChildFocus == NAME)
{
if(GetView()->getController()->isAlterAllowed())
+ {
+ SaveData(-1,FIELD_NAME);
pNameCell->Cut();
+ CellModified(-1,FIELD_NAME);
+ }
}
- else if(pDescrCell->HasChildPathFocus())
+ else if(m_eChildFocus == DESCRIPTION)
{
if(GetView()->getController()->isAlterAllowed())
+ {
+ SaveData(-1,FIELD_DESCR);
pDescrCell->Cut();
+ CellModified(-1,FIELD_DESCR);
+ }
}
- else
+ else if(m_eChildFocus == ROW)
{
if (nCutEvent)
Application::RemoveUserEvent(nCutEvent);
@@ -1352,9 +1380,9 @@ void OTableEditorCtrl::Copy()
{
if(GetSelectRowCount())
OTableRowView::Copy();
- else if(pNameCell->HasChildPathFocus())
+ else if(m_eChildFocus == NAME)
pNameCell->Copy();
- else if(pDescrCell->HasChildPathFocus())
+ else if(m_eChildFocus == DESCRIPTION)
pDescrCell->Copy();
}
@@ -1368,12 +1396,12 @@ void OTableEditorCtrl::Paste()
Application::RemoveUserEvent( nPasteEvent );
nPasteEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedPaste) );
}
- else if(pNameCell->HasChildPathFocus())
+ else if(m_eChildFocus == NAME)
{
if(GetView()->getController()->isAlterAllowed())
pNameCell->Paste();
}
- else if(pDescrCell->HasChildPathFocus())
+ else if(m_eChildFocus == DESCRIPTION)
{
if(GetView()->getController()->isAlterAllowed())
pDescrCell->Paste();
@@ -1753,10 +1781,7 @@ void OTableEditorCtrl::SwitchType( const OTypeInfo* _pType )
break;
}
if (nEntryPos < pTypeCell->GetEntryCount())
- {
pTypeCell->SelectEntryPos( nEntryPos );
- OSL_ENSURE(pController->getTypeInfo(pTypeCell->GetSelectEntryPos()) != _pType,"EntryPos wasn't correct!");
- }
}
}
@@ -1789,6 +1814,21 @@ void OTableEditorCtrl::DeactivateCell(sal_Bool bUpdate)
if (pDescrWin)
pDescrWin->SetReadOnly(bReadOnly || !SetDataPtr(nRow) || GetActRow()->IsReadOnly());
}
+//------------------------------------------------------------------------------
+long OTableEditorCtrl::PreNotify( NotifyEvent& rNEvt )
+{
+ if (rNEvt.GetType() == EVENT_GETFOCUS)
+ {
+ if( pDescrCell && pDescrCell->HasChildPathFocus() )
+ m_eChildFocus = DESCRIPTION;
+ else if(pNameCell && pNameCell->HasChildPathFocus() )
+ m_eChildFocus = NAME;
+ else
+ m_eChildFocus = ROW;
+ }
+
+ return OTableRowView::PreNotify(rNEvt);
+}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index 986ee80c2099..c7a925358416 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TEditControl.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: fs $ $Date: 2001-04-12 15:49:05 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:32:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -85,6 +85,14 @@ namespace dbaui
class OTableEditorCtrl : public OTableRowView
{
+ enum ChildFocusState
+ {
+ DESCRIPTION,
+ NAME,
+ ROW,
+ NONE
+ };
+
::std::vector<OTableRow*> m_aUndoList;
::std::vector<OTableRow*>* m_pRowList;
@@ -97,13 +105,14 @@ namespace dbaui
OTableRow* pActRow;
- ULONG nIndexEvent;
- ULONG nCutEvent;
- ULONG nPasteEvent;
- ULONG nDeleteEvent;
- ULONG nInsNewRowsEvent;
- ULONG nInvalidateTypeEvent;
- ULONG nEntryNotFoundEvent;
+ ULONG nIndexEvent;
+ ULONG nCutEvent;
+ ULONG nPasteEvent;
+ ULONG nDeleteEvent;
+ ULONG nInsNewRowsEvent;
+ ULONG nInvalidateTypeEvent;
+ ULONG nEntryNotFoundEvent;
+ ChildFocusState m_eChildFocus;
long nOldDataPos;
@@ -198,6 +207,9 @@ namespace dbaui
BOOL IsPasteAllowed( long nRow = -1 );
BOOL IsReadOnly();
+ // window overloads
+ virtual long PreNotify( NotifyEvent& rNEvt );
+
virtual void Cut();
virtual void Copy();
virtual void Paste();
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 45759d66be3a..fd1f28c99882 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableController.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: oj $ $Date: 2001-04-17 09:15:33 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:32:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -308,10 +308,13 @@ void OTableController::disposing()
FeatureState OTableController::GetState(sal_uInt16 _nId)
{
FeatureState aReturn;
- // (disabled automatically)
+ // (disabled automatically)
switch (_nId)
{
+ case SID_CLOSEDOC:
+ aReturn.bEnabled = sal_True;
+ break;
case ID_TABLE_DESIGN_NO_CONNECTION:
aReturn.aState = ::cppu::bool2any(m_xConnection.is());
break;
@@ -326,13 +329,13 @@ FeatureState OTableController::GetState(sal_uInt16 _nId)
aReturn.bEnabled = m_bModified;
break;
case ID_BROWSER_CUT:
- aReturn.bEnabled = m_bEditable && static_cast<OTableDesignView*>(getView())->isCutAllowed();
+ aReturn.bEnabled = m_bEditable && m_bFrameUiActive && getView() && static_cast<OTableDesignView*>(getView())->isCutAllowed();
break;
case ID_BROWSER_COPY:
- aReturn.bEnabled = sal_True;
+ aReturn.bEnabled = sal_True && m_bFrameUiActive;
break;
case ID_BROWSER_PASTE:
- aReturn.bEnabled = m_bEditable;
+ aReturn.bEnabled = m_bEditable && m_bFrameUiActive;
break;
case ID_BROWSER_UNDO:
aReturn.bEnabled = m_bEditable && m_aUndoManager.GetUndoActionCount() != 0;
@@ -342,7 +345,7 @@ FeatureState OTableController::GetState(sal_uInt16 _nId)
break;
case SID_INDEXDESIGN:
aReturn.bEnabled =
- ( ( (m_bNew || m_bModified)
+ ( ( ((!m_bNew && m_bModified) || m_bModified)
|| Reference< XIndexesSupplier >(m_xTable, UNO_QUERY).is()
)
&& m_xConnection.is()
@@ -357,6 +360,10 @@ void OTableController::Execute(sal_uInt16 _nId)
{
switch(_nId)
{
+ case SID_CLOSEDOC:
+ closeTask();
+ return;
+ break;
case ID_TABLE_DESIGN_NO_CONNECTION:
if(!m_xConnection.is())
createNewConnection(sal_False); // ask the user for a new connection
@@ -575,14 +582,6 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
m_xTable = NULL;
aInfo = SQLExceptionInfo(e);
}
- catch(const ElementExistException& e)
- {
- m_sName = ::rtl::OUString();
- stopTableListening();
- m_xTable = NULL;
- // aInfo = SQLExceptionInfo(e);
- return sal_False;
- }
catch(Exception&)
{
m_sName = ::rtl::OUString();
@@ -784,16 +783,24 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool _bSuspend) throw( RuntimeEx
// -----------------------------------------------------------------------------
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:Redo")] = ID_BROWSER_REDO;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Save")] = ID_BROWSER_SAVEDOC;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno: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:Copy")] = ID_BROWSER_COPY;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Cut")] = ID_BROWSER_CUT;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Paste")] = ID_BROWSER_PASTE;
+
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/IndexDesign")] = SID_INDEXDESIGN;
- 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;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/Close")] = SID_CLOSEDOC;
+// m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:ExplorerContentOpen")] = SID_EXPLORERCONTENT_OPEN;
+// m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:ExplorerContentOpenDocument")] = SID_EXPLORERCONTENT_OPEN_DOCUMENT;
}
// -----------------------------------------------------------------------------
@@ -1404,7 +1411,7 @@ void OTableController::alterColumns()
// contains all columns names which are already handled those which are not in the list will be deleted
Reference< XDatabaseMetaData> xMetaData = m_xConnection.is() ? m_xConnection->getMetaData() : Reference< XDatabaseMetaData>();
- ::std::map< ::rtl::OUString,sal_Bool,::comphelper::UStringMixLess> aColumns(xMetaData.is() ? xMetaData->storesMixedCaseQuotedIdentifiers() : sal_True);
+ ::std::map< ::rtl::OUString,sal_Bool,::comphelper::UStringMixLess> aColumns(xMetaData.is() ? (xMetaData->storesMixedCaseQuotedIdentifiers() ? true : false): sal_True);
::std::vector<OTableRow*>::iterator aIter = m_vRowList.begin();
for(sal_Int32 nPos = 0;aIter != m_vRowList.end();++aIter,++nPos)
{
@@ -1756,7 +1763,11 @@ void OTableController::reSyncRows()
return sName;
}
// -----------------------------------------------------------------------------
-
+String OTableController::getMenu() const
+{
+ return String::CreateFromInt32(RID_TABLE_DESIGN_MAIN_MENU);
+}
+// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index 1d068f90b5de..ae257a8fb860 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableDesignView.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: oj $ $Date: 2001-03-22 07:54:07 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:32:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -249,6 +249,7 @@ OTableDesignView::OTableDesignView( Window* pParent,
) :
ODataView( pParent ,_rxOrb )
,m_pController(_pController)
+ ,m_eChildFocus(NONE)
{
DBG_CTOR(OTableDesignView,NULL);
@@ -324,28 +325,42 @@ IMPL_LINK( OTableDesignView, SwitchHdl, Accelerator*, pAcc )
return 0;
}
+//------------------------------------------------------------------------------
+long OTableDesignView::PreNotify( NotifyEvent& rNEvt )
+{
+ if (rNEvt.GetType() == EVENT_GETFOCUS)
+ {
+ if( GetDescWin()->HasChildPathFocus() )
+ m_eChildFocus = DESCRIPTION;
+ else
+ m_eChildFocus = EDITOR;
+ }
+
+ return ODataView::PreNotify(rNEvt);
+}
// -----------------------------------------------------------------------------
sal_Bool OTableDesignView::isCutAllowed()
{
sal_Bool bAllowed = sal_False;
- if( GetDescWin()->HasChildPathFocus() )
+ switch(m_eChildFocus)
{
- bAllowed = GetDescWin()->isCutAllowed();
- }
- else
- {
- bAllowed = GetEditorCtrl()->IsCutAllowed();
+ case DESCRIPTION:
+ bAllowed = GetDescWin()->isCutAllowed();
+ break;
+ case EDITOR:
+ bAllowed = GetEditorCtrl()->IsCutAllowed();
+ break;
}
return bAllowed;
}
// -----------------------------------------------------------------------------
void OTableDesignView::copy()
{
- if( GetDescWin()->HasChildPathFocus() )
+ if( m_eChildFocus == DESCRIPTION)
{
GetDescWin()->copy();
}
- else
+ else if( m_eChildFocus == EDITOR)
{
GetEditorCtrl()->Copy();
}
@@ -353,11 +368,11 @@ void OTableDesignView::copy()
// -----------------------------------------------------------------------------
void OTableDesignView::cut()
{
- if( GetDescWin()->HasChildPathFocus() )
+ if( m_eChildFocus == DESCRIPTION)
{
GetDescWin()->cut();
}
- else
+ else if( m_eChildFocus == EDITOR)
{
GetEditorCtrl()->Cut();
}
@@ -365,11 +380,11 @@ void OTableDesignView::cut()
// -----------------------------------------------------------------------------
void OTableDesignView::paste()
{
- if( GetDescWin()->HasChildPathFocus() )
+ if( m_eChildFocus == DESCRIPTION)
{
GetDescWin()->paste();
}
- else
+ else if( m_eChildFocus == EDITOR)
{
GetEditorCtrl()->Paste();
}
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
index 98a3dedce82a..e63a3d96fe9f 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableFieldDescWin.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: oj $ $Date: 2001-03-22 07:54:07 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:32:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -281,24 +281,24 @@ void OTableFieldDescWin::Resize()
// -----------------------------------------------------------------------------
sal_Bool OTableFieldDescWin::isCutAllowed()
{
- return (m_pGenPage && m_pGenPage->HasChildPathFocus() && m_pGenPage->isCutAllowed());
+ return (m_pGenPage && m_pGenPage->isCutAllowed());
}
// -----------------------------------------------------------------------------
void OTableFieldDescWin::cut()
{
- if(m_pGenPage && m_pGenPage->HasChildPathFocus())
+ if(m_pGenPage)
m_pGenPage->cut();
}
// -----------------------------------------------------------------------------
void OTableFieldDescWin::copy()
{
- if(m_pGenPage && m_pGenPage->HasChildPathFocus())
+ if(m_pGenPage)
m_pGenPage->copy();
}
// -----------------------------------------------------------------------------
void OTableFieldDescWin::paste()
{
- if(m_pGenPage && m_pGenPage->HasChildPathFocus())
+ if(m_pGenPage)
m_pGenPage->paste();
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 887ab3919259..44674198383f 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableUndo.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: oj $ $Date: 2001-03-22 07:54:07 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:32:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -219,6 +219,8 @@ void OTableEditorTypeSelUndoAct::Undo()
OFieldDescription* pFieldDesc = pTabEdCtrl->GetActRow()->GetActFieldDescr();
if(pFieldDesc)
m_pNewType = pFieldDesc->getTypeInfo();
+ else
+ m_pNewType = NULL;
pTabEdCtrl->SetData(m_nRow,m_nCol,m_pOldType);
pTabEdCtrl->SwitchType( m_pOldType );
diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src
index 1a2590eb3513..40393a5863e2 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -2,9 +2,9 @@
*
* $RCSfile: table.src,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: oj $ $Date: 2001-04-11 11:34:35 $
+ * last change: $Author: oj $ $Date: 2001-04-24 14:32:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,11 +78,19 @@
#include "toolbox.hrc"
#endif
+#define MN_EDIT 20
+#define MN_VIEW 21
+#define MN_EXTRA 22
+#define MN_INDEX 23
+#define MN_WIN 30
+#define MN_HELP 31
+
+
#define MID_INDEXDESIGN \
Identifier = SID_INDEXDESIGN ; \
- Text = "Indexentwurf" ; \
- Text [ english ] = "Index Desgin" ; \
- Text [ english_us ] = "Index Desgin"; \
+ Text = "I~ndexentwurf" ; \
+ Text [ english ] = "I~ndex Desgin" ; \
+ Text [ english_us ] = "I~ndex Desgin"; \
Text[ portuguese ] = "Index Desgin";\
Text[ russian ] = " ";\
Text[ greek ] = "Index Desgin";\
@@ -1788,3 +1796,218 @@ String STR_TABLEDESIGN_TITLE
Text [ ENGLISH ] = "table design";
};
+Menu RID_TABLE_DESIGN_MAIN_MENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_FILE_PICKLIST
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_FILE_NEWDOC
+ };
+ MenuItem
+ {
+ ITEM_FILE_OPENDOC
+ };
+ ITEM_FILE_AUTOPILOT
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_FILE_CLOSEDOC
+ Command = ".uno:DB/Close";
+ };
+ MenuItem
+ {
+ ITEM_FILE_SAVEDOCS //!!muss fuer andere geoeffnete Tasks drinbleiben
+ };
+ MenuItem
+ {
+ ITEM_FILE_SAVEDOC
+ Command = ".uno:Save";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_FILE_QUITAPP
+ };
+ };
+ };
+ };
+ MenuItem
+ {
+ Identifier = MN_EDIT ;
+ HelpID = MN_EDIT ;
+ Text = "~Bearbeiten" ;
+ Text [ English ] = "~Edit" ;
+ Text [ norwegian ] = "~Rediger" ;
+ Text [ italian ] = "~Modifica" ;
+ Text [ portuguese_brazilian ] = "~Editar" ;
+ Text [ portuguese ] = "~Editar" ;
+ Text [ finnish ] = "~Muokkaa" ;
+ Text [ danish ] = "~Rediger" ;
+ Text [ french ] = "~dition" ;
+ Text [ swedish ] = "R~edigera" ;
+ Text [ dutch ] = "Be~werken" ;
+ Text [ spanish ] = "~Editar" ;
+ Text [ english_us ] = "~Edit" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_UNDO ;
+ HelpId = SID_UNDO ;
+ Command = ".uno:Undo";
+ Text = "Rckgngig" ;
+ Text [ ENGLISH ] = "Undo" ;
+ Text[ english_us ] = "Undo";
+ Text[ portuguese ] = "Anular";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Ongedaan";
+ Text[ french ] = "Annuler";
+ Text[ spanish ] = "Deshacer";
+ Text[ italian ] = "Annulla";
+ Text[ danish ] = "Undo";
+ Text[ swedish ] = "ngra";
+ Text[ polish ] = "Cofnij";
+ Text[ portuguese_brazilian ] = "Undo";
+ Text[ japanese ] = "ɖ߂";
+ Text[ korean ] = "Undo";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "_";
+ Text[ turkish ] = "Undo";
+ Text[ arabic ] = "";
+ };
+ MenuItem
+ {
+ Identifier = SID_REDO ;
+ HelpId = SID_REDO ;
+ Command = ".uno:Redo";
+ Text = "Wiederherstellen" ;
+ Text [ ENGLISH ] = "Redo" ;
+
+ Text[ english_us ] = "Redo";
+ Text[ portuguese ] = "Restaurar";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Herstellen";
+ Text[ french ] = "Restaurer";
+ Text[ spanish ] = "Restaurar";
+ Text[ italian ] = "Ripristina";
+ Text[ danish ] = "Redo";
+ Text[ swedish ] = "terstll";
+ Text[ polish ] = "Przywr";
+ Text[ portuguese_brazilian ] = "Redo";
+ Text[ japanese ] = "蒼";
+ Text[ korean ] = "Redo";
+ Text[ chinese_simplified ] = "ָ";
+ Text[ chinese_traditional ] = "_MO";
+ Text[ turkish ] = "Redo";
+ Text[ arabic ] = "";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_EDIT_CUT
+ Command = ".uno:Cut";
+ };
+ MenuItem
+ {
+ ITEM_EDIT_COPY
+ Command = ".uno:Copy";
+ };
+ MenuItem
+ {
+ ITEM_EDIT_PASTE
+ Command = ".uno:Paste";
+ };
+ };
+ };
+ Text[ russian ] = "~";
+ Text[ polish ] = "~Edytuj";
+ Text[ japanese ] = "ҏW(~E)";
+ Text[ chinese_simplified ] = "༭(~E)";
+ Text[ chinese_traditional ] = "s(~E)";
+ Text[ arabic ] = "~";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "~Dzenle";
+ Text[ language_user1 ] = " ";
+ };
+
+ MenuItem
+ {
+ Identifier = MN_EXTRA ;
+ HelpID = MN_EXTRA ;
+ Text = "E~xtras" ;
+ Text [ English ] = "T~ools" ;
+ Text [ norwegian ] = "Verk~ty" ;
+ Text [ italian ] = "~Strumenti" ;
+ Text [ portuguese_brazilian ] = "F~erramentas" ;
+ Text [ portuguese ] = "~Ferramentas" ;
+ Text [ finnish ] = "~Tykalut" ;
+ Text [ danish ] = "Fun~ktioner" ;
+ Text [ french ] = "~Outils" ;
+ Text [ swedish ] = "~Verktyg" ;
+ Text [ dutch ] = "E~xtra" ;
+ Text [ spanish ] = "~Herramientas" ;
+ Text [ english_us ] = "~Tools" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ ITEM_DATASOURCE_ADMINISTRATION
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ ITEM_TOOLS_BASICCHOOSER
+ };
+ ITEM_MN_OPTIONS
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ MID_INDEXDESIGN
+ Command = ".uno:DB/IndexDesign";
+ };
+ };
+ };
+ Text[ russian ] = "~";
+ Text[ greek ] = "~";
+ Text[ polish ] = "~Narzdzia";
+ Text[ japanese ] = "°(~T)";
+ Text[ korean ] = "(~T)";
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ chinese_traditional ] = "u(~T)";
+ Text[ arabic ] = "~";
+ Text[ turkish ] = "~Aralar";
+ Text[ language_user1 ] = " ";
+ };
+ ITEM_WINDOW_MENU
+ ITEM_HELP_MENU
+ };
+};
+
+