Kaydet (Commit) 5dfb6381 authored tarafından Philipp Weissenbacher's avatar Philipp Weissenbacher

Translate German comments

üst cb5299e5
...@@ -1014,7 +1014,7 @@ void SbaGridControl::PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& ...@@ -1014,7 +1014,7 @@ void SbaGridControl::PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu&
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
void SbaGridControl::Select() void SbaGridControl::Select()
{ {
// irgendeine Selektion hat sich geaendert .... // Some selection has changed ...
FmGridControl::Select(); FmGridControl::Select();
if (m_pMasterListener) if (m_pMasterListener)
......
...@@ -74,7 +74,7 @@ using namespace ::com::sun::star::util; ...@@ -74,7 +74,7 @@ using namespace ::com::sun::star::util;
//================================================================== //==================================================================
// fuer die Controls auf der OFieldDescGenPage // For the Controls on the OFieldDescGenPage
#define CONTROL_SPACING_X 18 // 6 #define CONTROL_SPACING_X 18 // 6
#define CONTROL_SPACING_Y 4 #define CONTROL_SPACING_Y 4
#define CONTROL_WIDTH_1 160 // 100 #define CONTROL_WIDTH_1 160 // 100
...@@ -254,7 +254,7 @@ OFieldDescControl::~OFieldDescControl() ...@@ -254,7 +254,7 @@ OFieldDescControl::~OFieldDescControl()
pLastFocusWindow = NULL; pLastFocusWindow = NULL;
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Children zerstoeren // Destroy children
DeactivateAggregate( tpDefault ); DeactivateAggregate( tpDefault );
DeactivateAggregate( tpRequired ); DeactivateAggregate( tpRequired );
DeactivateAggregate( tpTextLen ); DeactivateAggregate( tpTextLen );
...@@ -289,7 +289,7 @@ String OFieldDescControl::BoolStringUI(const String& rPersistentString) const ...@@ -289,7 +289,7 @@ String OFieldDescControl::BoolStringUI(const String& rPersistentString) const
static String aOne('1'); static String aOne('1');
static String aNone(ModuleRes(STR_VALUE_NONE)); static String aNone(ModuleRes(STR_VALUE_NONE));
// aeltere Versionen haben eventuell einen sprachabhaengigen String als Default gespeichert // Older versions may store a language dependend string as a default
if (rPersistentString.Equals(aYes) || rPersistentString.Equals(aNo)) if (rPersistentString.Equals(aYes) || rPersistentString.Equals(aNo))
return rPersistentString; return rPersistentString;
...@@ -329,7 +329,7 @@ namespace ...@@ -329,7 +329,7 @@ namespace
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void OFieldDescControl::CheckScrollBars() void OFieldDescControl::CheckScrollBars()
{ {
// ein paar Berechnungen zur neuen Position der ScrollBars // Calculate the ScrollBars' new position
Size szOverallSize = GetSizePixel(); Size szOverallSize = GetSizePixel();
long nHScrollHeight = m_pHorzScroll->GetSizePixel().Height(); long nHScrollHeight = m_pHorzScroll->GetSizePixel().Height();
long nVScrollWidth = m_pVertScroll->GetSizePixel().Width(); long nVScrollWidth = m_pVertScroll->GetSizePixel().Width();
...@@ -339,8 +339,8 @@ void OFieldDescControl::CheckScrollBars() ...@@ -339,8 +339,8 @@ void OFieldDescControl::CheckScrollBars()
sal_Bool bNeedHScrollBar(sal_False), bNeedVScrollBar(sal_False); sal_Bool bNeedHScrollBar(sal_False), bNeedVScrollBar(sal_False);
// die Bereiche anpassen // Adjust the areas
// brauche ich ScrollBars eigentlich ? // Do I actually need ScrollBars?
// horizontal : // horizontal :
long lMaxXPosition = 0; long lMaxXPosition = 0;
Control* ppAggregates[] = { pRequired, pNumType, pAutoIncrement, pDefault, pTextLen, pLength, pScale, pFormat, m_pColumnName, m_pType,m_pAutoIncrementValue}; Control* ppAggregates[] = { pRequired, pNumType, pAutoIncrement, pDefault, pTextLen, pLength, pScale, pFormat, m_pColumnName, m_pType,m_pAutoIncrementValue};
...@@ -352,12 +352,12 @@ void OFieldDescControl::CheckScrollBars() ...@@ -352,12 +352,12 @@ void OFieldDescControl::CheckScrollBars()
long lMaxXAvailable = szOverallSize.Width(); long lMaxXAvailable = szOverallSize.Width();
bNeedHScrollBar = lMaxXPosition > lMaxXAvailable; bNeedHScrollBar = lMaxXPosition > lMaxXAvailable;
// aendert sich vielleicht noch // Might change
// vertikal // Vertical
// wieviel Controls habe ich // How many Controls do I have?
sal_uInt16 nActive = CountActiveAggregates(); sal_uInt16 nActive = CountActiveAggregates();
// welches ist das letzte, was ganz drauf passt ? // Which one is the last one that fits?
sal_uInt16 nLastVisible; sal_uInt16 nLastVisible;
const sal_Int32 nControlHeight = GetMaxControlHeight(); const sal_Int32 nControlHeight = GetMaxControlHeight();
const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MAP_APPFONT).Height(); const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y),MAP_APPFONT).Height();
...@@ -369,20 +369,19 @@ void OFieldDescControl::CheckScrollBars() ...@@ -369,20 +369,19 @@ void OFieldDescControl::CheckScrollBars()
if (bNeedVScrollBar) if (bNeedVScrollBar)
{ {
// in die urspruengliche Berechnung von lMaxXAvailable ist nicht mit eingegangen, dass ich eine VScrollBar habe, also muss ich // When originally calculating lMaxXAvailable we did not take into account that we have a VScrollBar, so we need to do that now
// das nachholen
lMaxXAvailable -= nVScrollWidth; lMaxXAvailable -= nVScrollWidth;
if (!bNeedHScrollBar && (lMaxXPosition > lMaxXAvailable)) if (!bNeedHScrollBar && (lMaxXPosition > lMaxXAvailable))
{ {
// durch die vertikale brauche ich jetzt ploetzlich doch eine horizontale // The vertical one now necessitates a horizontal one
bNeedHScrollBar = sal_True; bNeedHScrollBar = sal_True;
// nLastVisible anpassen // Adjust nLastVisible
nLastVisible = static_cast<sal_uInt16>((szOverallSize.Height() - nControl_Spacing_y - nHScrollHeight) / (nControl_Spacing_y + nControlHeight)); nLastVisible = static_cast<sal_uInt16>((szOverallSize.Height() - nControl_Spacing_y - nHScrollHeight) / (nControl_Spacing_y + nControlHeight));
// bNeedVScrollBar aendert sich nicht : es ist schon auf sal_True und nLastVisible wird hoechstens kleiner // bNeedVScrollBar does NOT change: it's already set to sal_True and nLastVisible will only decrease
} }
} }
// jetzt kann ich sie wirklich positionieren und ihre Parameter setzen // Now we can really position them and set their parameters
if (bNeedVScrollBar) if (bNeedVScrollBar)
{ {
m_pVertScroll->Show(); m_pVertScroll->Show();
...@@ -501,7 +500,7 @@ void OFieldDescControl::SetReadOnly( sal_Bool bReadOnly ) ...@@ -501,7 +500,7 @@ void OFieldDescControl::SetReadOnly( sal_Bool bReadOnly )
{ {
DBG_CHKTHIS(OFieldDescControl,NULL); DBG_CHKTHIS(OFieldDescControl,NULL);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Controls enablen/disablen // Enable/disable Controls
Control* ppAggregates[] = { pRequired, pNumType Control* ppAggregates[] = { pRequired, pNumType
, pAutoIncrement, pDefault , pAutoIncrement, pDefault
, pTextLen, pLength , pTextLen, pLength
...@@ -531,7 +530,7 @@ String OFieldDescControl::GetControlText( sal_uInt16 nControlId ) ...@@ -531,7 +530,7 @@ String OFieldDescControl::GetControlText( sal_uInt16 nControlId )
{ {
DBG_CHKTHIS(OFieldDescControl,NULL); DBG_CHKTHIS(OFieldDescControl,NULL);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Texte der Controls auslesen // Read out the Controls' texts
switch( nControlId ) switch( nControlId )
{ {
case FIELD_PROPERTY_BOOL_DEFAULT: case FIELD_PROPERTY_BOOL_DEFAULT:
...@@ -589,7 +588,7 @@ void OFieldDescControl::SetControlText( sal_uInt16 nControlId, const String& rTe ...@@ -589,7 +588,7 @@ void OFieldDescControl::SetControlText( sal_uInt16 nControlId, const String& rTe
{ {
DBG_CHKTHIS(OFieldDescControl,NULL); DBG_CHKTHIS(OFieldDescControl,NULL);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Texte der Controls setzen // Set the Controls' texts
switch( nControlId ) switch( nControlId )
{ {
case FIELD_PROPERTY_BOOL_DEFAULT: case FIELD_PROPERTY_BOOL_DEFAULT:
...@@ -669,7 +668,7 @@ IMPL_LINK( OFieldDescControl, FormatClickHdl, Button *, /*pButton*/ ) ...@@ -669,7 +668,7 @@ IMPL_LINK( OFieldDescControl, FormatClickHdl, Button *, /*pButton*/ )
{ {
DBG_CHKTHIS(OFieldDescControl,NULL); DBG_CHKTHIS(OFieldDescControl,NULL);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Temporaere Column erzeugen, mit der Datenaustausch mit Dialog erfolgt // Create temporary Column, which is used for data exchange with Dialog
if( !pActFieldDescr ) if( !pActFieldDescr )
return 0; return 0;
...@@ -717,17 +716,17 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) ...@@ -717,17 +716,17 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox )
if ( pListBox->GetSavedValue() != pListBox->GetSelectEntryPos() ) if ( pListBox->GetSavedValue() != pListBox->GetSelectEntryPos() )
SetModified(sal_True); SetModified(sal_True);
// Sonderbehandlund f"ur Bool Felder // Special treatment for Boold fields
if(pListBox == pRequired && pBoolDefault ) if(pListBox == pRequired && pBoolDefault )
{ {
// wenn pRequired auf sal_True gesetzt ist, dann darf das sal_Bool Feld nicht den Eintrag <<keiner>> besitzen // If pRequired = sal_True then the sal_Bool field must NOT contain <<none>>
String sDef = BoolStringUI(::comphelper::getString(pActFieldDescr->GetControlDefault())); String sDef = BoolStringUI(::comphelper::getString(pActFieldDescr->GetControlDefault()));
if(pRequired->GetSelectEntryPos() == 0) // JA if(pRequired->GetSelectEntryPos() == 0) // Yes
{ {
pBoolDefault->RemoveEntry(String(ModuleRes(STR_VALUE_NONE))); pBoolDefault->RemoveEntry(String(ModuleRes(STR_VALUE_NONE)));
if (!sDef.Equals(aYes) && !sDef.Equals(aNo)) if (!sDef.Equals(aYes) && !sDef.Equals(aNo))
pBoolDefault->SelectEntryPos(1); // nein als Default pBoolDefault->SelectEntryPos(1); // No as a default
else else
pBoolDefault->SelectEntry(sDef); pBoolDefault->SelectEntry(sDef);
} }
...@@ -738,7 +737,7 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) ...@@ -738,7 +737,7 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox )
} }
} }
// nur fuer AutoIncrement eine Sonderbehandlung // A special treatment only for AutoIncrement
if (pListBox == pAutoIncrement) if (pListBox == pAutoIncrement)
{ {
if(pListBox->GetSelectEntryPos() == 1) if(pListBox->GetSelectEntryPos() == 1)
...@@ -765,7 +764,7 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) ...@@ -765,7 +764,7 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox )
DeactivateAggregate( tpDefault ); DeactivateAggregate( tpDefault );
ActivateAggregate( tpAutoIncrementValue ); ActivateAggregate( tpAutoIncrementValue );
} }
// und jetzt alle nach oben schieben // Move all up
ArrangeAggregates(); ArrangeAggregates();
} }
...@@ -781,17 +780,17 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) ...@@ -781,17 +780,17 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox )
return 0; return 0;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// alle Control neu anordnen, so dass sie in fester Reihenfolge und wirklich // Rearrange all Controls, such that they are in fixed order and really on top
// OBEN auf der DescriptionPage stehen // of the DescriptionPage
void OFieldDescControl::ArrangeAggregates() void OFieldDescControl::ArrangeAggregates()
{ {
DBG_CHKTHIS(OFieldDescControl,NULL); DBG_CHKTHIS(OFieldDescControl,NULL);
// die Beschreibung eines Controls // A Control's description
struct AGGREGATE_DESCRIPTION struct AGGREGATE_DESCRIPTION
{ {
Control* pctrlInputControl; // das eigentliche Control zur Eingabe Control* pctrlInputControl; // The actual Control for input
Control* pctrlTextControl; // das Label dazu Control* pctrlTextControl; // The corresponding Label
sal_uInt16 nPosSizeArgument; // das zweite Argument fuer SetPosSize sal_uInt16 nPosSizeArgument; // The second argument for SetPosSize
}; };
AGGREGATE_DESCRIPTION adAggregates[] = { AGGREGATE_DESCRIPTION adAggregates[] = {
{ m_pColumnName, m_pColumnNameText, 1}, { m_pColumnName, m_pColumnNameText, 1},
...@@ -819,7 +818,7 @@ void OFieldDescControl::ArrangeAggregates() ...@@ -819,7 +818,7 @@ void OFieldDescControl::ArrangeAggregates()
OSL_ENSURE(nMaxWidth != 0,"Invalid width!"); OSL_ENSURE(nMaxWidth != 0,"Invalid width!");
// und los ... // And go ...
int nCurrentControlPos = 0; int nCurrentControlPos = 0;
Control* pZOrderPredecessor = NULL; Control* pZOrderPredecessor = NULL;
for (size_t i=0; i < SAL_N_ELEMENTS(adAggregates); i++) for (size_t i=0; i < SAL_N_ELEMENTS(adAggregates); i++)
...@@ -829,8 +828,7 @@ void OFieldDescControl::ArrangeAggregates() ...@@ -829,8 +828,7 @@ void OFieldDescControl::ArrangeAggregates()
SetPosSize(&adAggregates[i].pctrlTextControl, nCurrentControlPos, 0); SetPosSize(&adAggregates[i].pctrlTextControl, nCurrentControlPos, 0);
SetPosSize(&adAggregates[i].pctrlInputControl, nCurrentControlPos, adAggregates[i].nPosSizeArgument); SetPosSize(&adAggregates[i].pctrlInputControl, nCurrentControlPos, adAggregates[i].nPosSizeArgument);
// die Z-Order so, dass die Controls auch wirklich in derselben Reihenfolge durchwandert werden koennen, in der sie // Set the z-order in a way such that the Controls can be traversed in the same sequence in which they have been arranged here
// hier angeordnet wurden
adAggregates[i].pctrlTextControl->SetZOrder(pZOrderPredecessor, pZOrderPredecessor ? WINDOW_ZORDER_BEHIND : WINDOW_ZORDER_FIRST); adAggregates[i].pctrlTextControl->SetZOrder(pZOrderPredecessor, pZOrderPredecessor ? WINDOW_ZORDER_BEHIND : WINDOW_ZORDER_FIRST);
adAggregates[i].pctrlInputControl->SetZOrder(adAggregates[i].pctrlTextControl, WINDOW_ZORDER_BEHIND ); adAggregates[i].pctrlInputControl->SetZOrder(adAggregates[i].pctrlTextControl, WINDOW_ZORDER_BEHIND );
pZOrderPredecessor = adAggregates[i].pctrlInputControl; pZOrderPredecessor = adAggregates[i].pctrlInputControl;
...@@ -845,7 +843,7 @@ void OFieldDescControl::ArrangeAggregates() ...@@ -845,7 +843,7 @@ void OFieldDescControl::ArrangeAggregates()
} }
} }
// eine Sonderbehandlung fuer die Format-Controls // Special treatment for the Format Controls
if (pFormat) if (pFormat)
{ {
Point ptSamplePos(pFormatSample->GetPosPixel()); Point ptSamplePos(pFormatSample->GetPosPixel());
...@@ -853,7 +851,7 @@ void OFieldDescControl::ArrangeAggregates() ...@@ -853,7 +851,7 @@ void OFieldDescControl::ArrangeAggregates()
pFormat->SetPosPixel(Point(ptSamplePos.X() + szSampleSize.Width() + 5, ptSamplePos.Y())); pFormat->SetPosPixel(Point(ptSamplePos.X() + szSampleSize.Width() + 5, ptSamplePos.Y()));
} }
// als letztes noch die ScrollBars in der ZOrder ganz nach oben // Finally, put the ScrollBars at the top of the z-order
m_pVertScroll->SetZOrder(NULL, WINDOW_ZORDER_FIRST); m_pVertScroll->SetZOrder(NULL, WINDOW_ZORDER_FIRST);
m_pHorzScroll->SetZOrder(NULL, WINDOW_ZORDER_FIRST); m_pHorzScroll->SetZOrder(NULL, WINDOW_ZORDER_FIRST);
} }
...@@ -863,7 +861,7 @@ void OFieldDescControl::ActivateAggregate( EControlType eType ) ...@@ -863,7 +861,7 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
{ {
DBG_CHKTHIS(OFieldDescControl,NULL); DBG_CHKTHIS(OFieldDescControl,NULL);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Controls erzeugen // Create Controls
switch( eType ) switch( eType )
{ {
case tpDefault: case tpDefault:
...@@ -1069,7 +1067,7 @@ OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(sal_uInt16 _nHelpS ...@@ -1069,7 +1067,7 @@ OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(sal_uInt16 _nHelpS
OPropNumericEditCtrl* pControl = new OPropNumericEditCtrl( this, _nHelpStr, _nProperty, WB_BORDER ); OPropNumericEditCtrl* pControl = new OPropNumericEditCtrl( this, _nHelpStr, _nProperty, WB_BORDER );
pControl->SetDecimalDigits(0); pControl->SetDecimalDigits(0);
pControl->SetMin(0); pControl->SetMin(0);
pControl->SetMax(0x7FFFFFFF); // soll draussen geaendert werden, wenn noetig pControl->SetMax(0x7FFFFFFF); // Should be changed outside, if needed
pControl->SetStrictFormat(sal_True); pControl->SetStrictFormat(sal_True);
InitializeControl(pControl,_sHelpId,false); InitializeControl(pControl,_sHelpId,false);
...@@ -1082,7 +1080,7 @@ void OFieldDescControl::DeactivateAggregate( EControlType eType ) ...@@ -1082,7 +1080,7 @@ void OFieldDescControl::DeactivateAggregate( EControlType eType )
DBG_CHKTHIS(OFieldDescControl,NULL); DBG_CHKTHIS(OFieldDescControl,NULL);
pLastFocusWindow = NULL; pLastFocusWindow = NULL;
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Controls zerstoeren // Destroy Controls
switch( eType ) switch( eType )
{ {
case tpDefault: case tpDefault:
...@@ -1147,7 +1145,7 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n ...@@ -1147,7 +1145,7 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n
DBG_CHKTHIS(OFieldDescControl,NULL); DBG_CHKTHIS(OFieldDescControl,NULL);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Groesse ermitteln // Calculate size
const sal_Int32 nControlHeight = GetMaxControlHeight(); const sal_Int32 nControlHeight = GetMaxControlHeight();
Size aSize(0,nControlHeight); Size aSize(0,nControlHeight);
if ( isRightAligned() && nCol ) if ( isRightAligned() && nCol )
...@@ -1174,7 +1172,7 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n ...@@ -1174,7 +1172,7 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Position ermitteln // Calculate Position
Point aPosition; Point aPosition;
switch( nCol ) switch( nCol )
{ {
...@@ -1205,7 +1203,7 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n ...@@ -1205,7 +1203,7 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n
(nRow*nControlHeight); (nRow*nControlHeight);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Control anzeigen // Display Control
(*ppControl)->SetPosSizePixel( aPosition, aSize ); (*ppControl)->SetPosSizePixel( aPosition, aSize );
aSize = (*ppControl)->GetSizePixel(); aSize = (*ppControl)->GetSizePixel();
...@@ -1232,7 +1230,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) ...@@ -1232,7 +1230,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
DeactivateAggregate( tpAutoIncrementValue ); DeactivateAggregate( tpAutoIncrementValue );
m_pPreviousType = TOTypeInfoSP(); m_pPreviousType = TOTypeInfoSP();
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Zeiger des gespeicherten Focus zuruecksetzen // Reset the saved focus' pointer
pLastFocusWindow = NULL; pLastFocusWindow = NULL;
if ( m_bAdded ) if ( m_bAdded )
{ {
...@@ -1257,15 +1255,15 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) ...@@ -1257,15 +1255,15 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
OSL_ENSURE(pFieldType.get(),"We need a type information here!"); OSL_ENSURE(pFieldType.get(),"We need a type information here!");
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Wenn sich der Typ geaendert hat, Controls austauschen // If the type has changed, subsitute Controls
if( m_pPreviousType != pFieldType ) if( m_pPreviousType != pFieldType )
{ {
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Zeiger des gespeicherten Focus zuruecksetzen // Reset the saved focus' pointer
pLastFocusWindow = NULL; pLastFocusWindow = NULL;
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Controls, die nicht mehr angezeigt werden duerfen // Controls, which must NOT be displayed again
DeactivateAggregate( tpNumType ); DeactivateAggregate( tpNumType );
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
...@@ -1420,7 +1418,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) ...@@ -1420,7 +1418,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
} }
} }
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Controls initialisieren // Initialize Controls
if( pAutoIncrement ) if( pAutoIncrement )
{ {
if ( pFieldDescr->IsAutoIncrement() ) if ( pFieldDescr->IsAutoIncrement() )
...@@ -1438,7 +1436,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) ...@@ -1438,7 +1436,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
DeactivateAggregate( tpAutoIncrementValue ); DeactivateAggregate( tpAutoIncrementValue );
pAutoIncrement->SelectEntryPos( 1 ); // no pAutoIncrement->SelectEntryPos( 1 ); // no
ActivateAggregate( tpDefault ); ActivateAggregate( tpDefault );
// hat Auswirkungen auf pRequired // Affects pRequired
if(!pFieldDescr->IsPrimaryKey()) if(!pFieldDescr->IsPrimaryKey())
ActivateAggregate( tpRequired ); ActivateAggregate( tpRequired );
} }
...@@ -1452,19 +1450,19 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) ...@@ -1452,19 +1450,19 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
if( pBoolDefault ) if( pBoolDefault )
{ {
// wenn pRequired auf sal_True gesetzt ist, dann darf das sal_Bool Feld nicht den Eintrag <<keiner>> besitzen // If pRequired = sal_True then the sal_Bool field must NOT contain <<none>>
::rtl::OUString sValue; ::rtl::OUString sValue;
pFieldDescr->GetControlDefault() >>= sValue; pFieldDescr->GetControlDefault() >>= sValue;
String sDef = BoolStringUI(sValue); String sDef = BoolStringUI(sValue);
// sicher stellen das <<keiner>> nur vorhanden ist, wenn das Feld NULL sein darf // Make sure that <<none>> is only present if the field can be NULL
if ( ( pFieldType.get() && !pFieldType->bNullable ) || !pFieldDescr->IsNullable() ) if ( ( pFieldType.get() && !pFieldType->bNullable ) || !pFieldDescr->IsNullable() )
{ {
pFieldDescr->SetIsNullable(ColumnValue::NO_NULLS); // der Typ sagt das pFieldDescr->SetIsNullable(ColumnValue::NO_NULLS); // The type says so
pBoolDefault->RemoveEntry(String(ModuleRes(STR_VALUE_NONE))); pBoolDefault->RemoveEntry(String(ModuleRes(STR_VALUE_NONE)));
if ( !sDef.Equals(aYes) && !sDef.Equals(aNo) ) if ( !sDef.Equals(aYes) && !sDef.Equals(aNo) )
pBoolDefault->SelectEntryPos(1); // nein als Default pBoolDefault->SelectEntryPos(1); // No as a default
else else
pBoolDefault->SelectEntry(sDef); pBoolDefault->SelectEntry(sDef);
...@@ -1539,7 +1537,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) ...@@ -1539,7 +1537,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Controls Enablen/Disablen // Enable/disable Controls
sal_Bool bRead(IsReadOnly()); sal_Bool bRead(IsReadOnly());
...@@ -1636,7 +1634,7 @@ void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr ) ...@@ -1636,7 +1634,7 @@ void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr )
return; return;
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Controls auslesen // Read out Controls
::rtl::OUString sDefault; ::rtl::OUString sDefault;
if (pDefault) if (pDefault)
{ {
...@@ -1686,7 +1684,7 @@ void OFieldDescControl::GetFocus() ...@@ -1686,7 +1684,7 @@ void OFieldDescControl::GetFocus()
{ {
DBG_CHKTHIS(OFieldDescControl,NULL); DBG_CHKTHIS(OFieldDescControl,NULL);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Setzt den Focus auf das zuletzt aktive Control // Set the Focus to the Control that has been active last
TabPage::GetFocus(); TabPage::GetFocus();
if( pLastFocusWindow ) if( pLastFocusWindow )
{ {
...@@ -1702,12 +1700,12 @@ void OFieldDescControl::implFocusLost(Window* _pWhich) ...@@ -1702,12 +1700,12 @@ void OFieldDescControl::implFocusLost(Window* _pWhich)
OSL_ENSURE(!_pWhich || IsChild(_pWhich), "OFieldDescControl::implFocusLost : invalid window !"); OSL_ENSURE(!_pWhich || IsChild(_pWhich), "OFieldDescControl::implFocusLost : invalid window !");
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Das aktive Control merken // Remember the active Control
if (!pLastFocusWindow) if (!pLastFocusWindow)
pLastFocusWindow = _pWhich; pLastFocusWindow = _pWhich;
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// HelpText zuruecksetzen // Reset HelpText
if (pHelp && !pHelp->HasChildPathFocus()) if (pHelp && !pHelp->HasChildPathFocus())
pHelp->SetHelpText( String() ); pHelp->SetHelpText( String() );
} }
......
...@@ -168,7 +168,7 @@ namespace dbaui ...@@ -168,7 +168,7 @@ namespace dbaui
{ {
InsertDataColumn( SOURCE_COLUMN, m_pConnData->getReferencingTable()->GetWinName(), 100); InsertDataColumn( SOURCE_COLUMN, m_pConnData->getReferencingTable()->GetWinName(), 100);
InsertDataColumn( DEST_COLUMN, m_pConnData->getReferencedTable()->GetWinName(), 100); InsertDataColumn( DEST_COLUMN, m_pConnData->getReferencedTable()->GetWinName(), 100);
// wenn es die Defs noch nicht gibt, dann muessen sie noch mit SetSource-/-DestDef gesetzt werden ! // If the Defs do not yet exits, we need to set them with SetSource-/-DestDef
m_pListCell.reset( new ListBoxControl( &GetDataWindow() ) ); m_pListCell.reset( new ListBoxControl( &GetDataWindow() ) );
...@@ -397,7 +397,7 @@ namespace dbaui ...@@ -397,7 +397,7 @@ namespace dbaui
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void ORelationControl::setWindowTables(const OTableWindow* _pSource,const OTableWindow* _pDest) void ORelationControl::setWindowTables(const OTableWindow* _pSource,const OTableWindow* _pDest)
{ {
// wenn ich hier gerade editiere, ausblenden // If I edit here, hide
sal_Bool bWasEditing = IsEditing(); sal_Bool bWasEditing = IsEditing();
if ( bWasEditing ) if ( bWasEditing )
DeactivateCell(); DeactivateCell();
...@@ -433,7 +433,7 @@ namespace dbaui ...@@ -433,7 +433,7 @@ namespace dbaui
m_pConnData->normalizeLines(); m_pConnData->normalizeLines();
} }
// neu zeichnen // Repaint
Invalidate(); Invalidate();
if ( bWasEditing ) if ( bWasEditing )
...@@ -497,7 +497,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent ...@@ -497,7 +497,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
OTableWindow* pInitialLeft = NULL; OTableWindow* pInitialLeft = NULL;
OTableWindow* pInitialRight = NULL; OTableWindow* pInitialRight = NULL;
// die Namen aller TabWins einsammeln // Collect the names of all TabWins
OJoinTableView::OTableWindowMap::const_iterator aIter = m_pTableMap->begin(); OJoinTableView::OTableWindowMap::const_iterator aIter = m_pTableMap->begin();
OJoinTableView::OTableWindowMap::const_iterator aEnd = m_pTableMap->end(); OJoinTableView::OTableWindowMap::const_iterator aEnd = m_pTableMap->end();
for(;aIter != aEnd;++aIter) for(;aIter != aEnd;++aIter)
...@@ -523,10 +523,10 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent ...@@ -523,10 +523,10 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
m_strCurrentRight = m_strCurrentLeft; m_strCurrentRight = m_strCurrentLeft;
} }
// die entsprechenden Defs an mein Controls // The corresponding Defs for my Controls
m_pRC_Tables->setWindowTables(pInitialLeft,pInitialRight); m_pRC_Tables->setWindowTables(pInitialLeft,pInitialRight);
// die in einer ComboBox ausgewaehlte Tabelle darf nicht in der anderen zur Verfuegung stehen // The table selected in a ComboBox must not be available in the other
if ( m_pTableMap->size() > 2 ) if ( m_pTableMap->size() > 2 )
{ {
...@@ -534,7 +534,8 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent ...@@ -534,7 +534,8 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
m_lmbRightTable.RemoveEntry(m_strCurrentLeft); m_lmbRightTable.RemoveEntry(m_strCurrentLeft);
} }
// links das erste, rechts das zweite selektieren // Select the first one on the left side and on the right side,
// select the second one
m_lmbLeftTable.SelectEntry(m_strCurrentLeft); m_lmbLeftTable.SelectEntry(m_strCurrentLeft);
m_lmbRightTable.SelectEntry(m_strCurrentRight); m_lmbRightTable.SelectEntry(m_strCurrentRight);
...@@ -547,7 +548,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent ...@@ -547,7 +548,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
OTableWindow* pLeft = NULL; OTableWindow* pLeft = NULL;
OTableWindow* pRight = NULL; OTableWindow* pRight = NULL;
// eine Sonderbehandlung : wenn es nur zwei Tabellen gibt, muss ich bei Wechsel in einer LB auch in der anderen umschalten // Special treatment: If there are only two tables, we need to switch the other one too when changing in a LB
if ( m_pTableMap->size() == 2 ) if ( m_pTableMap->size() == 2 )
{ {
ListBox* pOther; ListBox* pOther;
...@@ -575,19 +576,18 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent ...@@ -575,19 +576,18 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
} }
else else
{ {
// zuerst brauche ich die TableDef zur Tabelle, dazu das TabWin // First we need the TableDef to the Table and with it the TabWin
OJoinTableView::OTableWindowMap::const_iterator aFind = m_pTableMap->find(strSelected); OJoinTableView::OTableWindowMap::const_iterator aFind = m_pTableMap->find(strSelected);
OTableWindow* pLoop = NULL; OTableWindow* pLoop = NULL;
if( aFind != m_pTableMap->end() ) if( aFind != m_pTableMap->end() )
pLoop = aFind->second; pLoop = aFind->second;
OSL_ENSURE(pLoop != NULL, "ORelationDialog::OnTableChanged : ungueltiger Eintrag in ListBox !"); OSL_ENSURE(pLoop != NULL, "ORelationDialog::OnTableChanged: invalid ListBox entry!");
// da ich die ListBoxen selber mit eben diesen Tabellennamen, mit denen ich sie jetzt vergleiche, gefuellt habe, // We need to find strSelect, because we filled the ListBoxes with the table names with which we compare now
// MUSS ich strSelected finden
if (pListBox == &m_lmbLeftTable) if (pListBox == &m_lmbLeftTable)
{ {
// den vorher links selektierten Eintrag wieder rein rechts // Insert the previously selected Entry on the left side on the right side
m_lmbRightTable.InsertEntry(m_strCurrentLeft); m_lmbRightTable.InsertEntry(m_strCurrentLeft);
// und den jetzt selektierten raus // Remove the currently selected Entry
m_lmbRightTable.RemoveEntry(strSelected); m_lmbRightTable.RemoveEntry(strSelected);
m_strCurrentLeft = strSelected; m_strCurrentLeft = strSelected;
...@@ -602,9 +602,9 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent ...@@ -602,9 +602,9 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
} }
else else
{ {
// den vorher rechts selektierten Eintrag wieder rein links // Insert the previously selected Entry on the right side on the left side
m_lmbLeftTable.InsertEntry(m_strCurrentRight); m_lmbLeftTable.InsertEntry(m_strCurrentRight);
// und den jetzt selektierten raus // Remove the currently selected Entry
m_lmbLeftTable.RemoveEntry(strSelected); m_lmbLeftTable.RemoveEntry(strSelected);
m_strCurrentRight = strSelected; m_strCurrentRight = strSelected;
...@@ -626,7 +626,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent ...@@ -626,7 +626,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void OTableListBoxControl::NotifyCellChange() void OTableListBoxControl::NotifyCellChange()
{ {
// den Ok-Button en- oder disablen, je nachdem, ob ich eine gueltige Situation habe // Enable/disable the OK button, depending on having a valid situation
TTableConnectionData::value_type pConnData = m_pRC_Tables->getData(); TTableConnectionData::value_type pConnData = m_pRC_Tables->getData();
const OConnectionLineDataVec* pLines = pConnData->GetConnLineDataList(); const OConnectionLineDataVec* pLines = pConnData->GetConnLineDataList();
m_pParentDialog->setValid(!pLines->empty()); m_pParentDialog->setValid(!pLines->empty());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment