This translated the german code comments of dbinsdlg.cxx to english. This is contributed under the terms of the MPL 1.1 / GPLv3+ / LGPLv3+ triple license. --- sw/source/ui/dbui/dbinsdlg.cxx | 98 +++++++++++++++++++-------------------- 1 files changed, 48 insertions(+), 50 deletions(-)
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 313194d..91d3687 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -128,7 +128,7 @@ SV_IMPL_PTRARR( _SwTableAutoFmtTbl, SwTableAutoFmt* ) const char cDBFldStart = '<'; const char cDBFldEnd = '>'; -// Hilfsstruktur fuers einfuegen von Datenbankspalten als Felder oder Text +// Helper structure for adding database rows as fields or text struct _DB_Column { enum ColType { DB_FILLTEXT, DB_COL_FIELD, DB_COL_TEXT, DB_SPLITPARA } eColType; @@ -375,7 +375,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, } } - // Absatzvorlagen-ListBox fuellen + // fill paragraphtemplates-ListBox { SfxStyleSheetBasePool* pPool = pView->GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL ); @@ -390,7 +390,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, aLbDbParaColl.SelectEntryPos( 0 ); } - // steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein + // when the cursor is inside of a table, table must NEVER be selectable if( pView->GetWrtShell().GetTableFmt() ) { aRbAsTable.Enable( FALSE ); @@ -446,7 +446,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, // read configuration Load(); - // Controls initialisieren: + // initialise Controls: PageHdl( aRbAsTable.IsChecked() ? &aRbAsTable : &aRbAsField ); } @@ -559,7 +559,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) nDelPos = aLbTableCol.GetSelectEntryPos(), nTopPos = aLbTableCol.GetTopEntry(); - // die richtige InsertPos suchen!! + // look for the right InsertPos!! SwInsDBColumn aSrch( aLbTableCol.GetEntry( nDelPos ), 0 ); aDBColumns.Seek_Entry( &aSrch, &nFndPos ); if( !nFndPos || nFndPos == aDBColumns.Count()-1 ) @@ -603,7 +603,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) else if( pButton == &aIbDbcolToEdit ) { bChgEnable = FALSE; - // Daten ins Edit moven: + // move data to Edit: String aFld( aLbTxtDbColumn.GetSelectEntry() ); if( aFld.Len() ) { @@ -611,20 +611,20 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) USHORT nPos = (USHORT)aEdDbText.GetSelection().Min(); USHORT nSel = USHORT(aEdDbText.GetSelection().Max()) - nPos; if( nSel ) - // dann loesche erstmal die bestehende Selektion + // then delete the existing selection at first aStr.Erase( nPos, nSel ); aFld.Insert( cDBFldStart, 0 ); aFld += cDBFldEnd; if( aStr.Len() ) { - if( nPos ) // ein Space davor + if( nPos ) // one Space before { sal_Unicode c = aStr.GetChar( nPos-1 ); if( '\n' != c && '\r' != c ) aFld.Insert( ' ', 0 ); } - if( nPos < aStr.Len() ) // ein Space dahinter + if( nPos < aStr.Len() ) // one Space behind { sal_Unicode c = aStr.GetChar( nPos ); if( '\n' != c && '\r' != c ) @@ -683,7 +683,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) bNewSet = TRUE; pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() ); - //Ersteinmal die einfachen Attribute besorgen. + // At first aquire the simple attributes pTblSet->Put( SfxStringItem( FN_PARAM_TABLE_NAME, rSh.GetUniqueTblName() )); pTblSet->Put( SfxUInt16Item( FN_PARAM_TABLE_HEADLINE, 1 ) ); @@ -696,15 +696,15 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) pTblSet->Put( aBrush, SID_ATTR_BRUSH_TABLE ); SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); - // Tabellenvariante, wenn mehrere Tabellenzellen selektiert + // table variant, when multiple table cells are selected aBoxInfo.SetTable( TRUE ); - // Abstandsfeld immer anzeigen + // always show gap field aBoxInfo.SetDist( TRUE); - // Minimalgroesse in Tabellen und Absaetzen setzen + // set minimum size in tables and paragraphs aBoxInfo.SetMinDist( FALSE ); - // Default-Abstand immer setzen + // always set default-gap aBoxInfo.SetDefDist( MIN_BORDER_DIST ); - // Einzelne Linien koennen nur in Tabellen DontCare-Status haben + // Single lines can have DontCare-status only in tables aBoxInfo.SetValid( VALID_DISABLE, TRUE ); pTblSet->Put( aBoxInfo ); @@ -718,7 +718,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) const SwFmtCol& rCol = aPara.pFrmFmt->GetCol(); const SwColumns& rCols = rCol.GetColumns(); - //nStart und nEnd initialisieren fuer nNum == 0 + // initialise nStart und nEnd for nNum == 0 long nWidth1 = 0, nStart1 = 0, nEnd1 = nWidth; @@ -754,8 +754,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) if( aLbTableCol.GetEntryCount() != pRep->GetAllColCount() ) { - // Anzahl der Spalten hat sich geaendert: dann muessen die - // TabCols angepasst werden + // Number of columns has changed: then the TabCols have to be adjusted long nWidth = pRep->GetWidth(); USHORT nCols = aLbTableCol.GetEntryCount() - 1; SwTabCols aTabCols( nCols ); @@ -830,8 +829,8 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) } else { - // an der FormatGroupBox den ausgewaehlten FeldNamen setzen, damit - // klar ist, welches Feld ueber das Format eingestellt wird! + // set the selected FieldName at the FormatGroupBox, so that + // it's clear what field is configured by the format! String sTxt( aFlFormat.GetText().Copy( 0, nGBFmtLen )); if( !aSrch.sColumn.getLength() ) { @@ -860,8 +859,8 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) aFlFormat.SetText( sTxt ); - // um spaeter zu wissen, welche ListBox die "aktive" war, wird sich - // im 1. Eintrag ein Flag gemerkt, + // to know later on, what ListBox was the "active", a Flag + // is remembered in the 1st entry void* pPtr = pBox == &aLbTableCol ? &aLbTableCol : 0; aLbTableCol.SetEntryData( 0, pPtr ); } @@ -906,10 +905,9 @@ BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, BOOL bInsField ) { - // aus dem Text wieder die einzelnen Datenbank - Spalten erzeugen - // und dann in einem Array speichern - // Die Datenbankspalten stehen in <> und muessen im Array der Spalten - // vorhanden sein: + // create each of the database rows out of the text again + // and then save in an array + // database columns are in <> and must be present in the columns' array: String sTxt( rTxt ); USHORT nFndPos, nEndPos, nSttPos = 0; @@ -918,12 +916,12 @@ BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt, nSttPos = nFndPos + 1; if( STRING_NOTFOUND != ( nEndPos = sTxt.Search( cDBFldEnd, nSttPos+1 ))) { - // Text in <> geklammert gefunden: was ist es denn: + // Text in <> brackets found: what is it: SwInsDBColumn aSrch( sTxt.Copy( nSttPos, nEndPos - nSttPos ), 0); if( aDBColumns.Seek_Entry( &aSrch, &nFndPos ) ) { - // das ist ein gueltiges Feld - // also sicher den Text "davor": + // that is a valid field + // so surely the text "before": const SwInsDBColumn& rFndCol = *aDBColumns[ nFndPos ]; _DB_Column* pNew; @@ -971,7 +969,7 @@ BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt, } } - // den letzten Text nicht vergessen + // don't forget the last text if( sTxt.Len() ) ::lcl_InsTextInArr( sTxt, rColArr ); @@ -1029,7 +1027,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, else ++nRows; - // bereite das Array fuer die ausgewaehlten Spalten auf + // prepare the array for the selected columns SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (BYTE)nCols : 255, 5 ); for( n = 0; n < nCols; ++n ) { @@ -1108,9 +1106,9 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, for( n = 0; n < nCols; ++n ) { - // beim aller erstenmal KEIN GoNextCell, weil wir schon - // drin stehen. Auch nicht nach dem Insert das GoNextCell, - // weil am Ende eine leere Zeile einfuegt wird. + // at the very first time, NO GoNextCell, because we're + // already in it. Also no GoNextCell after the Insert, + // because an empty line is added at the end. if( i || n ) rSh.GoNextCell(); @@ -1214,13 +1212,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } rSh.SetAutoUpdateCells( bIsAutoUpdateCells ); } - else // Daten als Felder/Text einfuegen + else // add data as fields/text { _DB_Columns aColArr; if( SplitTextToColArr( aEdDbText.GetText(), aColArr, aRbAsField.IsChecked() ) ) { - // jetzt kann bei jedem Datensatz einfach ueber das Array iteriert - // und die Daten eingefuegt werden + // now with every data set, we can iterate over the array + // and add the data if( !rSh.IsSttPara() ) rSh.SwEditShell::SplitNode(); @@ -1250,8 +1248,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } } - // fuers Einfuegen als Felder -> nach jedem Datensatz ein - // "NextField" einfuegen + // for adding as fields -> insert a "NextField" after + // every data set SwDBFormatData aDBFormatData; Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); if( xMgr.is() ) @@ -1322,8 +1320,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, case _DB_Column::DB_SPLITPARA: rSh.SplitNode(); - // wenn nicht die gleiche Vorlage die Follow Vorlage - // ist, dann muss die ausgewaehlte neu gesetzt werden + // when the same template is not the follow template, + // the selected has to be set newly if( pColl && &pColl->GetNextTxtFmtColl() != pColl ) rSh.SetTxtFmtColl( pColl ); break; @@ -1398,9 +1396,9 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, if( bSetCrsr && sIns.Len() ) { - // zum Anfang und eine Mark setzen, damit der - // Cursor am Ende wieder auf Anfangsposition - // gesetzt werden kann. + // to the beginning and set a mark, so that + // the cursor can be set to the initial position + // at the end. rSh.SwCrsrShell::MovePara( GetfnParaCurr(), GetfnParaStart() ); @@ -1468,7 +1466,7 @@ void SwInsertDBColAutoPilot::SetTabSet() { if( pTAutoFmt->IsFrame() ) { - // Umrandung kommt vom AutoFormat + // border is from AutoFormat pTblSet->ClearItem( RES_BOX ); pTblSet->ClearItem( SID_ATTR_BORDER_INNER ); } @@ -1481,7 +1479,7 @@ void SwInsertDBColAutoPilot::SetTabSet() } else { - // die Defaults wieder entfernen, es macht keinen Sinn sie zu setzen + // remove the defaults again, it makes no sense to set them SvxBrushItem aBrush( RES_BACKGROUND ); static USHORT const aIds[3] = { RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE }; @@ -1841,7 +1839,7 @@ void SwInsertDBColAutoPilot::Load() sTmp = pNewData->sTAutoFmtNm; if( sTmp.Len() ) { - // dann erstmal die AutoFmt-Datei laden und das Autoformat suchen + // then load the AutoFmt file and look for Autoformat first SwTableAutoFmtTbl aAutoFmtTbl; aAutoFmtTbl.Load(); for( USHORT nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; ) @@ -1861,8 +1859,8 @@ void SwInsertDBColAutoPilot::Load() aRbHeadlEmpty.Check( pNewData->bIsEmptyHeadln ); HeaderHdl(&aCbTableHeadon); - // jetzt noch die benutzerdefinierten Numberformat Strings in die - // Shell kopieren. Nur diese sind dann als ID verfuegbar + // now copy the user defined Numberformat strings to the + // Shell. Then only these are available as ID for( n = 0; n < aDBColumns.Count() ; ++n ) { SwInsDBColumn& rSet = *aDBColumns[ n ]; @@ -1891,7 +1889,7 @@ void SwInsertDBColAutoPilot::Load() } } - // steht der Cursor in einer Tabelle, darf NIE Tabelle auswaehlbar sein + // when the cursor is inside of a table, table must NEVER be selectable if( !aRbAsTable.IsEnabled() && aRbAsTable.IsChecked() ) aRbAsField.Check( TRUE ); delete pNewData; -- 1.7.1 _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice