Hi, I have submitted a patch for review:
https://gerrit.libreoffice.org/2556 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/56/2556/1 fdo#39468: Translate German comments in dbaccess/source/ui Change-Id: I9eb3c97ffe2dd122960bb4c5f5b0594767ea0fb9 --- M dbaccess/source/ui/querydesign/QueryDesignView.cxx M dbaccess/source/ui/tabledesign/TEditControl.cxx 2 files changed, 101 insertions(+), 102 deletions(-) diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 6fdc8ba..d257769 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -585,7 +585,7 @@ else if (SQL_ISRULE(pNode,comparison_predicate)) { // only the comparison of columns is allowed - OSL_ENSURE(pNode->count() == 3,"OQueryDesignView::InsertJoinConnection: Fehler im Parse Tree"); + OSL_ENSURE(pNode->count() == 3,"OQueryDesignView::InsertJoinConnection: Error in Parse Tree"); if (!(SQL_ISRULE(pNode->getChild(0),column_ref) && SQL_ISRULE(pNode->getChild(2),column_ref) && pNode->getChild(1)->getNodeType() == SQL_NODE_EQUAL)) @@ -703,7 +703,7 @@ if ( pEntryField->isAggreateFunction() ) { - OSL_ENSURE(!pEntryField->GetFunction().isEmpty(),"Functionname darf hier nicht leer sein! ;-("); + OSL_ENSURE(!pEntryField->GetFunction().isEmpty(),"Function name must not be empty! ;-("); OUStringBuffer aTmpStr2( pEntryField->GetFunction()); aTmpStr2.appendAscii("("); aTmpStr2.append(aTmpStr.makeStringAndClear()); @@ -1187,7 +1187,7 @@ OTableFieldDescRef pEntryField = *aIter; if ( pEntryField->IsGroupBy() ) { - OSL_ENSURE(!pEntryField->GetField().isEmpty(),"Kein FieldName vorhanden!;-("); + OSL_ENSURE(!pEntryField->GetField().isEmpty(),"No Field Name available!;-("); OUString sGroupByPart = quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote); // only quote the field name when it isn't calculated @@ -1265,7 +1265,7 @@ ::connectivity::OSQLParseNode * pCondition = pNode->getChild(1); if ( pCondition ) // no where clause { - // now we have to chech the other conditions + // now we have to check the other conditions // first make the logical easier ::connectivity::OSQLParseNode::negateSearchCondition(pCondition); ::connectivity::OSQLParseNode *pNodeTmp = pNode->getChild(1); @@ -1817,7 +1817,7 @@ rParseIter.getColumnRange( pColumnRef, aColumnName, aTableRange ); sal_Bool bFound(sal_False); - OSL_ENSURE(!aColumnName.isEmpty(),"Columnname darf nicht leer sein"); + OSL_ENSURE(!aColumnName.isEmpty(),"Column name must not be empty"); if (aTableRange.isEmpty()) { // SELECT column, ... @@ -1871,7 +1871,7 @@ const ::connectivity::OSQLParseNode *pNode) { OSL_ENSURE( SQL_ISRULE( pNode, qualified_join ) || SQL_ISRULE( pNode, joined_table ) || SQL_ISRULE( pNode, cross_union ), - "OQueryDesignView::InsertJoin: Fehler im Parse Tree"); + "OQueryDesignView::InsertJoin: Error in the Parse Tree"); if (SQL_ISRULE(pNode,joined_table)) return InsertJoin(_pView,pNode->getChild(1)); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index be35644..24d1983 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -74,12 +74,12 @@ #define HANDLE_ID 0 -// default Spaltenbreiten +// default field widths #define FIELDNAME_WIDTH 100 #define FIELDTYPE_WIDTH 150 #define FIELDDESCR_WIDTH 300 -// Maximale Eingabelaenge im Beschreibungsfeld +// Maximum length in deescription field #define MAX_DESCR_LEN 256 @@ -129,13 +129,13 @@ OTableRowView::Init(); ////////////////////////////////////////////////////////////////////// - // Soll der Entwurf ReadOnly geoeffnet werden ? + // Should it be opened ReadOnly ? sal_Bool bRead(GetView()->getController().isReadOnly()); SetReadOnly( bRead ); ////////////////////////////////////////////////////////////////////// - // Spalten einfuegen + // Insert the columns String aColumnName( ModuleRes(STR_TAB_FIELD_COLUMN_NAME) ); InsertDataColumn( FIELD_NAME, aColumnName, FIELDNAME_WIDTH ); @@ -156,7 +156,7 @@ InitCellController(); ////////////////////////////////////////////////////////////////////// - // Zeilen einfuegen + // Insert the rows RowInserted(0, m_pRowList->size(), sal_True); } @@ -215,23 +215,23 @@ //------------------------------------------------------------------------------ void OTableEditorCtrl::SetReadOnly( sal_Bool bRead ) { - // nix zu tun ? + // nothing to do? 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) + // This check is important,as the underlying Def may be unnecessarily locked or unlocked + // or worse, this action may not be reversed afterwards return; DBG_CHKTHIS(OTableEditorCtrl,NULL); bReadOnly = bRead; ////////////////////////////////////////////////////////////////////// - // Aktive Zelle disablen + // Disable active cells long nRow(GetCurRow()); sal_uInt16 nCol(GetCurColumnId()); DeactivateCell(); ////////////////////////////////////////////////////////////////////// - // Cursor des Browsers anpassen + // Select the correct Browsers cursor BrowserMode nMode(BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL|BROWSER_AUTOSIZE_LASTCOL); if( !bReadOnly ) @@ -247,7 +247,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Zelle Feldname + // Cell Field name xub_StrLen nMaxTextLen = EDIT_NOLIMIT; ::rtl::OUString sExtraNameChars; Reference<XConnection> xCon; @@ -274,12 +274,12 @@ ////////////////////////////////////////////////////////////////////// - // Zelle Typ + // Cell type pTypeCell = new ListBoxControl( &GetDataWindow() ); pTypeCell->SetDropDownLineCount( 15 ); ////////////////////////////////////////////////////////////////////// - // Zelle Beschreibung + // Cell description pDescrCell = new Edit( &GetDataWindow(), WB_LEFT ); pDescrCell->SetMaxTextLen( MAX_DESCR_LEN ); @@ -319,11 +319,11 @@ { DBG_DTOR(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Undo-Manager zuruecksetzen + // Reset the Undo-Manager GetUndoManager().Clear(); ////////////////////////////////////////////////////////////////////// - // Moegliche Events aus Queue entfernen + // Take possible Events from the queue if( nCutEvent ) Application::RemoveUserEvent( nCutEvent ); if( nPasteEvent ) @@ -336,7 +336,7 @@ Application::RemoveUserEvent( nInvalidateTypeEvent ); ////////////////////////////////////////////////////////////////////// - // Controltypen zerstoeren + // Delete the control types delete pNameCell; delete pTypeCell; delete pDescrCell; @@ -360,7 +360,7 @@ //------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::SeekRow(long _nRow) { - // die Basisklasse braucht den Aufruf, da sie sich dort merkt, welche Zeile gepainted wird + // Call the Base class to know which row must be repainted EditBrowseBox::SeekRow(_nRow); DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -386,7 +386,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Wenn EditorCtrl ReadOnly ist, darf nicht editiert werden + // If EditorCtrl is ReadOnly it cannot edit! Reference<XPropertySet> xTable = GetView()->getController().getTable(); if (IsReadOnly() || ( xTable.is() && xTable->getPropertySetInfo()->hasPropertyByName(PROPERTY_TYPE) && @@ -394,7 +394,7 @@ return NULL; ////////////////////////////////////////////////////////////////////// - // Wenn Zeile ReadOnly ist, darf sie nicht editiert werden + // If the row is ReadOnly, itcannot be edited SetDataPtr( nRow ); if( pActRow->IsReadOnly() ) return NULL; @@ -445,7 +445,7 @@ aInitString = pActFieldDescr->getTypeInfo()->aUIName; ////////////////////////////////////////////////////////////// - // Anpassen des ComboBoxInhalts + // Set the ComboBox contents pTypeCell->Clear(); if( !pActFieldDescr ) break; @@ -501,7 +501,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); if (GetFieldDescr(GetCurRow()) == NULL) - // in der Zeile, in der ich mich i.A. befinde, stehen keine Daten + // there is no data in the current row return sal_True; if (!SaveModified()) return sal_False; @@ -514,10 +514,10 @@ //------------------------------------------------------------------------------ void OTableEditorCtrl::DisplayData(long nRow, sal_Bool bGrabFocus) { - // zur richtigen Zelle fahren + // go to the correct cell SetDataPtr(nRow); - // Editier-Modus temporaer aus + // Disable Edit-Mode temporarily sal_Bool bWasEditing = IsEditing(); if (bWasEditing) DeactivateCell(); @@ -529,12 +529,12 @@ InitController(aTemp, nRow, HELP_TEXT); GoToRow(nRow); - // das Description-Window aktualisieren + // Update the Description-Window GetView()->GetDescWin()->DisplayData(GetFieldDescr(nRow)); - // neu zeichnen + // redraw the row RowModified(nRow); - // wieder an + // and move on if (bWasEditing || bGrabFocus) ActivateCell(nRow, GetCurColumnId(), bGrabFocus); } @@ -544,7 +544,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Zeilenwechsel ? + // New line ? m_nDataPos = GetCurRow(); if( m_nDataPos != nOldDataPos && m_nDataPos != -1) { @@ -585,24 +585,24 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////// - // Zellinhalte in Datenstruktur speichern + // Store the cell content SetDataPtr( nRow == -1 ? GetCurRow() : nRow); OFieldDescription* pActFieldDescr = pActRow->GetActFieldDescr(); switch( nColId) { ////////////////////////////////////////////////////////////// - // Speichern Inhalt NameCell + // Store NameCell case FIELD_NAME: { ////////////////////////////////////////////////////////////// - // Wenn kein Name, nichts machen + // If there is no name, do nothing String aName(pNameCell->GetText()); if( !aName.Len() ) { ////////////////////////////////////////////////////////////// - // Wenn FieldDescr existiert, wurde Feld geloescht und alter Inhalt wird wiederhergestellt + // If FieldDescr exists, the field is deleted and the old content restored if (pActFieldDescr) { GetUndoManager().AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo())); @@ -620,12 +620,12 @@ } ////////////////////////////////////////////////////////////// - // Speichern Inhalt TypeCell + // Store the field type case FIELD_TYPE: break; ////////////////////////////////////////////////////////////// - // Speichern Inhalt DescrCell + // Store DescrCell case HELP_TEXT: { ////////////////////////////////////////////////////////////// @@ -642,7 +642,7 @@ case COLUMN_DESCRIPTION: { ////////////////////////////////////////////////////////////// - // Wenn aktuelle Feldbeschreibung NULL, Default setzen + // Set the default if the field description is null if( !pActFieldDescr ) { pDescrCell->SetText(String()); @@ -686,11 +686,11 @@ switch( nColId ) { ////////////////////////////////////////////////////////////// - // TypeCell + // Filed type case FIELD_TYPE: { ////////////////////////////////////////////////////////////////////// - // Type umstellen + // Rest the type resetType(); } break; } @@ -707,22 +707,22 @@ return sal_False; ////////////////////////////////////////////////////////////////////// - // Wird nach SaveModified() gerufen, aktuelle Zeile ist noch die alte + // Called after SaveModified(), current row is still the old one m_nDataPos = nNewRow; nOldDataPos = GetCurRow(); ////////////////////////////////////////////////////////////////////// - // Marker umsetzen + // Reset the markers InvalidateStatusCell( nOldDataPos ); InvalidateStatusCell( m_nDataPos ); ////////////////////////////////////////////////////////////////////// - // Daten des Propertyfensters speichern + // Store the data from the Property window if( SetDataPtr(nOldDataPos) && pDescrWin) pDescrWin->SaveData( pActRow->GetActFieldDescr() ); ////////////////////////////////////////////////////////////////////// - // Neue Daten im Propertyfenster anzeigen + // Show new data in the Property window if( SetDataPtr(m_nDataPos) && pDescrWin) pDescrWin->DisplayData( pActRow->GetActFieldDescr() ); @@ -745,7 +745,7 @@ DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////// - // Wenn aktuelle Feldbeschreibung NULL, Default setzen + // If the description is null, use the default if(nRow == -1) nRow = GetCurRow(); SetDataPtr( nRow ); @@ -798,7 +798,7 @@ xController->SetModified(); ////////////////////////////////////////////////////////////////////// - // Das ModifyFlag setzen + // Set the Modify flag GetView()->getController().setModified( sal_True ); InvalidateFeatures(); } @@ -848,7 +848,7 @@ pDescrWin->SaveData( pActRow->GetActFieldDescr() ); ////////////////////////////////////////////////////////////////////// - // Selektierte Zeilen in die ClipboardListe kopieren + // Copy selected rows to the ClipboardList ::boost::shared_ptr<OTableRow> pClipboardRow; ::boost::shared_ptr<OTableRow> pRow; ::std::vector< ::boost::shared_ptr<OTableRow> > vClipboardList; @@ -877,7 +877,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Basisnamen zum Anhaengen einer Numerierung erstellen + // Create a base name for appending numbers to String aBaseName; Reference<XConnection> xCon = GetView()->getController().getConnection(); Reference< XDatabaseMetaData> xMetaData = xCon.is() ? xCon->getMetaData() : Reference< XDatabaseMetaData>(); @@ -890,7 +890,7 @@ aBaseName = rName; ////////////////////////////////////////////////////////////////////// - // Namen durchnumerieren (bis 99) + // Runumber (up to 99) String aFieldName( rName); sal_Int32 i=1; while( HasFieldName(aFieldName) ) @@ -934,7 +934,7 @@ if ( pRow->GetActFieldDescr() ) pRow->GetActFieldDescr()->SetType(GetView()->getController().getTypeInfoByType(nType)); ////////////////////////////////////////////////////////////////////// - // Anpassen des Feldnamens + // Adjust the field names aFieldName = GenerateName( pRow->GetActFieldDescr()->GetName() ); pRow->GetActFieldDescr()->SetName( aFieldName ); pRow->SetPos(nInsertRow); @@ -945,14 +945,14 @@ } } ////////////////////////////////////////////////////////////////////// - // Beim RowInserted wird CursorMoved gerufen. - // Die UI-Daten duerfen hier beim CursorMoved nicht gespeichert werden. + // RowInserted calls CursorMoved. + // The UI data should not be stored here. bSaveOnMove = sal_False; RowInserted( nRow,vInsertedUndoRedoRows.size(),sal_True ); bSaveOnMove = sal_True; ////////////////////////////////////////////////////////////////////// - // Undo-Action erzeugen + // Create the Undo-Action GetUndoManager().AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); GetView()->getController().setModified( sal_True ); InvalidateFeatures(); @@ -964,12 +964,12 @@ DBG_CHKTHIS(OTableEditorCtrl,NULL); OSL_ENSURE(GetView()->getController().isDropAllowed(),"Call of DeleteRows not valid here. Please check isDropAllowed!"); ////////////////////////////////////////////////////////////////////// - // Undo-Action erzeugen + // Create the Undo-Action GetUndoManager().AddUndoAction( new OTableEditorDelUndoAct(this) ); ////////////////////////////////////////////////////////////////////// - // Alle markierten Zeilen loeschen + // Delete all marked rows long nIndex = FirstSelectedRow(); nOldDataPos = nIndex; bSaveOnMove = sal_False; @@ -977,12 +977,12 @@ while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) ) { ////////////////////////////////////////////////////////////////////// - // Zeile entfernen + // Remove rows m_pRowList->erase( m_pRowList->begin()+nIndex ); RowRemoved( nIndex, 1, sal_True ); ////////////////////////////////////////////////////////////////////// - // Leerzeile am Ende wieder einfuegen + // Insert the empty row at the end m_pRowList->push_back( ::boost::shared_ptr<OTableRow>(new OTableRow())); RowInserted( GetRowCount()-1, 1, sal_True ); @@ -992,7 +992,7 @@ bSaveOnMove = sal_True; ////////////////////////////////////////////////////////////////////// - // Erzwingen, dass der aktuelle Datensatz angezeigt wird + // Force the current record to be displayed m_nDataPos = GetCurRow(); InvalidateStatusCell( nOldDataPos ); InvalidateStatusCell( m_nDataPos ); @@ -1009,13 +1009,13 @@ DBG_CHKTHIS(OTableEditorCtrl,NULL); OSL_ENSURE(GetView()->getController().isAddAllowed(),"Call of InsertNewRows not valid here. Please check isAppendAllowed!"); ////////////////////////////////////////////////////////////////////// - // Undo-Action erzeugen + // Create Undo-Action long nInsertRows = GetSelectRowCount(); if( !nInsertRows ) nInsertRows = 1; GetUndoManager().AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) ); ////////////////////////////////////////////////////////////////////// - // Zahl der selektierten Zeilen werden neu eingefuegt + // Insert the number of of selected rows for( long i=nRow; i<(nRow+nInsertRows); i++ ) m_pRowList->insert( m_pRowList->begin()+i ,::boost::shared_ptr<OTableRow>(new OTableRow())); RowInserted( nRow, nInsertRows, sal_True ); @@ -1029,7 +1029,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Controls des Browsers auslesen + // Read the Browser Controls if( nColId < FIELD_FIRST_VIRTUAL_COLUMN ) { GoToRow( nRow ); @@ -1042,7 +1042,7 @@ } ////////////////////////////////////////////////////////////////////// - // Controls der Tabpage Auslesen + // Read the Controls on the Tabpage else return pDescrWin->GetControlText( nColId ); } @@ -1052,7 +1052,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Controls des Browsers setzen + // Set the Browser Controls if( nColId < FIELD_FIRST_VIRTUAL_COLUMN ) { GoToRow( nRow ); @@ -1065,7 +1065,7 @@ } ////////////////////////////////////////////////////////////////////// - // Controls der Tabpage setzen + // Set the Tabpage controls else { pDescrWin->SetControlText( nColId, rText ); @@ -1076,7 +1076,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Aktuellen Datenzeiger umsetzen + // Set the current pointer if( nRow == -1 ) nRow = GetCurRow(); OFieldDescription* pFieldDescr = GetFieldDescr( nRow ); @@ -1084,7 +1084,7 @@ return; ////////////////////////////////////////////////////////////////////// - // Einzelne Felder setzen + // Set individual fields switch( nColId ) { case FIELD_TYPE: @@ -1100,7 +1100,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Aktuellen Datenzeiger umsetzen + // Set the current pointer if( nRow == -1 ) nRow = GetCurRow(); OFieldDescription* pFieldDescr = GetFieldDescr( nRow ); @@ -1109,7 +1109,7 @@ String sValue; ////////////////////////////////////////////////////////////////////// - // Einzelne Felder setzen + // Set indvidual fields switch( nColId ) { case FIELD_NAME: @@ -1188,7 +1188,7 @@ return Any(); ////////////////////////////////////////////////////////////////////// - // Aktuellen Datenzeiger umsetzen + // Set the current pointer if( nRow==-1 ) nRow = GetCurRow(); SetDataPtr( nRow ); @@ -1197,7 +1197,7 @@ static const String strNo(ModuleRes(STR_VALUE_NO)); ::rtl::OUString sValue; ////////////////////////////////////////////////////////////////////// - // Einzelne Felder auslesen + // Read out the fields switch( nColId ) { case FIELD_NAME: @@ -1335,7 +1335,7 @@ return sal_False; ////////////////////////////////////////////////////////////////////// - // Wenn eine der markierten Zeilen leer ist, kein Copy moeglich + // If one of the selected rows is empty, Copy is not possible ::boost::shared_ptr<OTableRow> pRow; long nIndex = FirstSelectedRow(); while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) ) @@ -1473,7 +1473,7 @@ sal_Bool bInsertNewAllowed = GetView()->getController().isAddAllowed(); ////////////////////////////////////////////////////////////// - // Wenn nur Felder hinzugefuegt werden duerfen, Paste nur in neue Felder + // If fields can be added, Paste in the new fields if (bInsertNewAllowed && !GetView()->getController().isDropAllowed()) { SetDataPtr(nRow); @@ -1497,17 +1497,17 @@ Reference<XPropertySet> xTable = rController.getTable(); ////////////////////////////////////////////////////////////// - // 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 ausgefuehrt + // Key cannot be changed + // This applies only if the table is not new and not a ::com::sun::star::sdbcx::View. Otherwise no DROP is executed if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW") return sal_False; ////////////////////////////////////////////////////////////// - // 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. + // If there is an empty field, no primary key + // The entry is only permitted if + // - there are no empty entries in the selection + // - No Memo or Image entries + // - DROP is not permitted (see above) and the column is not Required (not null flag is not set). long nIndex = FirstSelectedRow(); ::boost::shared_ptr<OTableRow> pRow; while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) ) @@ -1519,9 +1519,9 @@ else { ////////////////////////////////////////////////////////////// - // Wenn Feldtyp Memo oder Image, kein PrimKey - // oder wenn Spalten nicht gedroped werden k�nnen und das Required Flag ist nicht gesetzt - // oder wenn eine ::com::sun::star::sdbcx::View vorhanden ist und das Required Flag nicht gesetzt ist + // Memo and Image fields cannot be primary keys + // or if the columne cannot be dropped and the Required flag is not set + // or if a ::com::sun::star::sdbcx::View is avalable and the Required flag is not set TOTypeInfoSP pTypeInfo = pFieldDescr->getTypeInfo(); if( pTypeInfo->nSearchType == ColumnSearch::NONE || (pFieldDescr->IsNullable() && pRow->IsReadOnly()) @@ -1569,7 +1569,7 @@ } ////////////////////////////////////////////////////////////// - // Kontextmenu einblenden + // Show the Context menu if( !IsReadOnly() ) { sal_uInt16 nColId = GetColumnAtXPosPixel(aMenuPos.X()); @@ -1608,15 +1608,15 @@ aContextMenu.EnableItem( SID_TABLEDESIGN_INSERTROWS, IsInsertNewAllowed(nRow) ); aContextMenu.CheckItem( SID_TABLEDESIGN_TABED_PRIMARYKEY, IsRowSelected(GetCurRow()) && IsPrimaryKey() ); - // jetzt alles, was disabled wurde, wech + // remove all the disable entries aContextMenu.RemoveDisabledEntries(sal_True, sal_True); if( SetDataPtr(m_nDataPos) ) pDescrWin->SaveData( pActRow->GetActFieldDescr() ); ////////////////////////////////////////////////////////////// - // Alle Aktionen, die die Zeilenzahl veraendern, muessen asynchron - // ausgefuehrt werden->sonst Probleme zwischen Kontextmenu u. Browser + // All actions which change the nu,ber of rows must be run asynchronously + // otherwise there may be problems between the Context menu and the Browser m_nDataPos = GetCurRow(); switch (aContextMenu.Execute(this, aMenuPos)) { @@ -1673,16 +1673,15 @@ nPastePosition = GetSelectRowCount() ? FirstSelectedRow() : GetCurRow(); if (!IsInsertNewAllowed(nPastePosition)) - { // kein Einfuegen erlaubt, sondern nur anhaengen, also testen, ob hinter der PastePosition noch - // belegte Zeilen erscheinen + { // Insertion is not allowed, only appending, so test if there are full cells after the PastePosition - sal_Int32 nFreeFromPos; // ab da nur freie Zeilen + sal_Int32 nFreeFromPos; // from here on there are only empty rows ::std::vector< ::boost::shared_ptr<OTableRow> >::reverse_iterator aIter = m_pRowList->rbegin(); for(nFreeFromPos = m_pRowList->size(); aIter != m_pRowList->rend() && (!(*aIter) || !(*aIter)->GetActFieldDescr() || (*aIter)->GetActFieldDescr()->GetName().isEmpty()); --nFreeFromPos, ++aIter) ; - if (nPastePosition < nFreeFromPos) // es gibt mindestens eine belegte hinter PastePosition -> ganz nach hinten + if (nPastePosition < nFreeFromPos) // at least one PastePosition is full -> right to the end nPastePosition = nFreeFromPos; } @@ -1749,7 +1748,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Evtl. vorhandene Primary Keys loeschen + // Clear any Primary Keys MultiSelection aDeletedPrimKeys; aDeletedPrimKeys.SetTotalRange( Range(0,GetRowCount()) ); @@ -1765,7 +1764,7 @@ } ////////////////////////////////////////////////////////////////////// - // Die Primary Keys der markierten Zeilen setzen + // Set the primary keys of the marked rows MultiSelection aInsertedPrimKeys; aInsertedPrimKeys.SetTotalRange( Range(0,GetRowCount()) ); if( bSet ) @@ -1774,7 +1773,7 @@ while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) ) { ////////////////////////////////////////////////////////////////////// - // Key setzen + // Set the key ::boost::shared_ptr<OTableRow> pRow = (*m_pRowList)[nIndex]; OFieldDescription* pFieldDescr = pRow->GetActFieldDescr(); if(pFieldDescr) @@ -1787,12 +1786,12 @@ GetUndoManager().AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) ); ////////////////////////////////////////////////////////////////////// - // Handle-Spalte invalidieren + // Invalidate columns InvalidateHandleColumn(); ////////////////////////////////////////////////////////////////////// - // Das ModifyFlag der TableDocSh setzen + // Set the TableDocSh's ModifyFlag GetView()->getController().setModified( sal_True ); InvalidateFeatures(); } @@ -1802,7 +1801,7 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Gehoeren alle markierten Felder zu einem Primary Key ? + // Are all marked fields part of the Primary Key ? long nPrimaryKeys = 0; ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = m_pRowList->begin(); ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = m_pRowList->end(); @@ -1815,7 +1814,7 @@ } ////////////////////////////////////////////////////////////////////// - // Gibt es unselektierte Felder, die noch zu dem Key gehoeren ? + // Are there any unselected fields that are part of the Key ? return GetSelectRowCount() == nPrimaryKeys; } @@ -1824,18 +1823,18 @@ { DBG_CHKTHIS(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// - // Wenn noch kein Feldname vergeben wurde + // if there is no field name long nRow(GetCurRow()); OFieldDescription* pActFieldDescr = GetFieldDescr( nRow ); if( pActFieldDescr ) ////////////////////////////////////////////////////////////////////// - // Alte Beschreibung speichern + // Store the old description pDescrWin->SaveData( pActFieldDescr ); if ( nRow < 0 || nRow > static_cast<long>(m_pRowList->size()) ) return; ////////////////////////////////////////////////////////////////////// - // Neue Beschreibung darstellen + // Show the new description ::boost::shared_ptr<OTableRow> pRow = (*m_pRowList)[nRow]; pRow->SetFieldType( _pType, sal_True ); if ( _pType.get() ) -- To view, visit https://gerrit.libreoffice.org/2556 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9eb3c97ffe2dd122960bb4c5f5b0594767ea0fb9 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: David Verrier <dverr...@gmail.com> _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice