Kaydet (Commit) 32acb98b authored tarafından Luc Castermans's avatar Luc Castermans Kaydeden (comit) Michael Meeks

translated German comments; all cleaned up.

Conflicts:

	dbaccess/source/ui/querydesign/QueryTableView.cxx

Change-Id: I761b190361bbcca2f9655a7a028799586c2d8656
üst 3eff5bae
...@@ -24,13 +24,12 @@ ...@@ -24,13 +24,12 @@
namespace dbaui namespace dbaui
{ {
// ================================================================================================ // ================================================================================================
// OQueryDesignUndoAction - Undo-Basisklasse fuer Aktionen im graphischen Abfrageentwurf (ohne Feldliste) // OQueryDesignUndoAction - undo base class for actions in graphical query design (without field list)
class OJoinTableView; class OJoinTableView;
class OQueryDesignUndoAction : public OCommentUndoAction class OQueryDesignUndoAction : public OCommentUndoAction
{ {
protected: protected:
OJoinTableView* m_pOwner; // in diesem Container spielt sich alles ab OJoinTableView* m_pOwner; // in this container it all happens
public: public:
OQueryDesignUndoAction(OJoinTableView* pOwner, sal_uInt16 nCommentID) : OCommentUndoAction(nCommentID), m_pOwner(pOwner) { } OQueryDesignUndoAction(OJoinTableView* pOwner, sal_uInt16 nCommentID) : OCommentUndoAction(nCommentID), m_pOwner(pOwner) { }
......
...@@ -29,9 +29,10 @@ void OJoinMoveTabWinUndoAct::TogglePosition() ...@@ -29,9 +29,10 @@ void OJoinMoveTabWinUndoAct::TogglePosition()
Point ptNext = m_pTabWin->GetPosPixel() + ptFrameScrollPos; Point ptNext = m_pTabWin->GetPosPixel() + ptFrameScrollPos;
m_pTabWin->SetPosPixel(m_ptNextPosition - ptFrameScrollPos); m_pTabWin->SetPosPixel(m_ptNextPosition - ptFrameScrollPos);
// sieht so aus, als wenn das ptFrameScrollPos sinnlos ist, da ich es hier abziehe und auf das ptNext aufaddiere, wo
// ich es das naechste Mal ja wieder abziehe ... Aber ptFrameScrollPos kann sich natuerlich beim naechsten Mal schon wieder // it looks like ptFrameScrollPos is meaningless, then I it substract here and add it to ptNext, and
// geaendert haben ... // next time I substract again ...
// AbetptFrameScrollPos could have changed next time ...
m_pOwner->EnsureVisible(m_pTabWin); m_pOwner->EnsureVisible(m_pTabWin);
m_ptNextPosition = ptNext; m_ptNextPosition = ptNext;
......
...@@ -26,7 +26,7 @@ namespace dbaui ...@@ -26,7 +26,7 @@ namespace dbaui
{ {
// ================================================================================================ // ================================================================================================
// OQuerySizeTabWinUndoAct - Undo-Klasse fuer Groessenveraenderung eines TabWins // OQuerySizeTabWinUndoAct - undo class to change size of TabWins
class OTableWindow; class OTableWindow;
class OJoinSizeTabWinUndoAct : public OQueryDesignUndoAction class OJoinSizeTabWinUndoAct : public OQueryDesignUndoAction
{ {
...@@ -39,9 +39,9 @@ namespace dbaui ...@@ -39,9 +39,9 @@ namespace dbaui
public: public:
OJoinSizeTabWinUndoAct(OJoinTableView* pOwner, const Point& ptOriginalPos, const Size& szOriginalSize, OTableWindow* pTabWin); OJoinSizeTabWinUndoAct(OJoinTableView* pOwner, const Point& ptOriginalPos, const Size& szOriginalSize, OTableWindow* pTabWin);
// Nebenbedingung : es darf nicht gescrollt worden sein, waehrend die neue Groesse/Position ermittelt wurde, das heisst, die Position // Boundary condition: while retrieving size/position scrolling is not allowed, meaning the position
// hier sind physische, nicht logische Koordinaten // here returns physical and not logical coordinates
// (im Gegensatz zur QueryMoveTabWinUndoAct) // (in contrary to QueryMoveTabWinUndoAct)
virtual void Undo() { ToggleSizePosition(); } virtual void Undo() { ToggleSizePosition(); }
virtual void Redo() { ToggleSizePosition(); } virtual void Redo() { ToggleSizePosition(); }
......
...@@ -33,7 +33,7 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction() ...@@ -33,7 +33,7 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction()
{ {
DBG_DTOR(OQueryTabConnUndoAction,NULL); DBG_DTOR(OQueryTabConnUndoAction,NULL);
if (m_bOwnerOfConn) if (m_bOwnerOfConn)
{ // ich besitze die Connection -> loeschen { // I have the connection -> delete
m_pOwner->DeselectConn(m_pConnection); m_pOwner->DeselectConn(m_pConnection);
delete m_pConnection; delete m_pConnection;
} }
......
...@@ -30,7 +30,7 @@ namespace dbaui ...@@ -30,7 +30,7 @@ namespace dbaui
protected: protected:
OQueryTableConnection* m_pConnection; OQueryTableConnection* m_pConnection;
sal_Bool m_bOwnerOfConn; sal_Bool m_bOwnerOfConn;
// bin ich alleiniger Eigentuemer der Connection ? (aendert sich mit jedem Redo oder Undo) // am I the only owner of the connection? (changes with every redo and undo)
public: public:
OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID); OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID);
...@@ -40,7 +40,7 @@ namespace dbaui ...@@ -40,7 +40,7 @@ namespace dbaui
virtual void Redo() = 0; virtual void Redo() = 0;
void SetConnection(OQueryTableConnection* pConn) { m_pConnection = pConn; } void SetConnection(OQueryTableConnection* pConn) { m_pConnection = pConn; }
// anschliessend bitte SetOwnership // now SetOwnership please
void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfConn = bTakeIt; } void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfConn = bTakeIt; }
}; };
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
namespace dbaui namespace dbaui
{ {
// ================================================================================================ // ================================================================================================
// OQueryTabWinShowUndoAct - Undo-Klasse fuer Anzeigen eines TabWins // OQueryTabWinShowUndoAct - undo class to show a TabWins
class OQueryTabWinShowUndoAct : public OQueryTabWinUndoAct class OQueryTabWinShowUndoAct : public OQueryTabWinUndoAct
{ {
...@@ -38,7 +38,7 @@ namespace dbaui ...@@ -38,7 +38,7 @@ namespace dbaui
}; };
// ================================================================================================ // ================================================================================================
// OQueryTabWinDelUndoAct - Undo-Klasse fuer Loeschen eines TabWins // OQueryTabWinDelUndoAct - undo class to delete a TabWins
class OQueryTabWinDelUndoAct : public OQueryTabWinUndoAct class OQueryTabWinDelUndoAct : public OQueryTabWinUndoAct
{ {
......
...@@ -57,7 +57,8 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct() ...@@ -57,7 +57,8 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct()
{ {
DBG_DTOR(OQueryTabWinUndoAct ,NULL); DBG_DTOR(OQueryTabWinUndoAct ,NULL);
if (m_bOwnerOfObjects) if (m_bOwnerOfObjects)
{ // wenn ich der alleinige Owner des Fenster bin, muss ich dafuer sorgen, dass es geloescht wird {
// I should take care to delete the window if I am the only owner
OSL_ENSURE(m_pTabWin != NULL, "OQueryTabWinUndoAct::~OQueryTabWinUndoAct() : m_pTabWin sollte nicht NULL sein"); OSL_ENSURE(m_pTabWin != NULL, "OQueryTabWinUndoAct::~OQueryTabWinUndoAct() : m_pTabWin sollte nicht NULL sein");
OSL_ENSURE(!m_pTabWin->IsVisible(), "OQueryTabWinUndoAct::~OQueryTabWinUndoAct() : *m_pTabWin sollte nicht sichtbar sein"); OSL_ENSURE(!m_pTabWin->IsVisible(), "OQueryTabWinUndoAct::~OQueryTabWinUndoAct() : *m_pTabWin sollte nicht sichtbar sein");
...@@ -65,7 +66,7 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct() ...@@ -65,7 +66,7 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct()
m_pTabWin->clearListBox(); m_pTabWin->clearListBox();
delete m_pTabWin; delete m_pTabWin;
// und natuerlich auch die entsprechenden Connections // and of course the corresponding connections
::std::vector<OTableConnection*>::iterator aIter = m_vTableConnection.begin(); ::std::vector<OTableConnection*>::iterator aIter = m_vTableConnection.begin();
::std::vector<OTableConnection*>::iterator aEnd = m_vTableConnection.end(); ::std::vector<OTableConnection*>::iterator aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter) for(;aIter != aEnd;++aIter)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
namespace dbaui namespace dbaui
{ {
// ================================================================================================ // ================================================================================================
// OQueryTabWinUndoAct - Undo-Basisklasse fuer alles, was mit Einfuegen/Entfernen von TabWIns zu tun hat zu tun hat // OQueryTabWinUndoAct - undo base class for all which is concerned with insert/remove TabWins
class OQueryTableWindow; class OQueryTableWindow;
class OTableConnection; class OTableConnection;
...@@ -37,7 +37,7 @@ namespace dbaui ...@@ -37,7 +37,7 @@ namespace dbaui
::std::vector<OTableConnection*> m_vTableConnection; ::std::vector<OTableConnection*> m_vTableConnection;
OQueryTableWindow* m_pTabWin; OQueryTableWindow* m_pTabWin;
sal_Bool m_bOwnerOfObjects; sal_Bool m_bOwnerOfObjects;
// bin ich alleiniger Eigentuemer der verwalteten Objekte ? (aendert sich mit jedem Redo oder Undo) // am I the only owner of the managed objects? (changes with every redo or undo)
public: public:
OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID); OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID);
...@@ -49,11 +49,11 @@ namespace dbaui ...@@ -49,11 +49,11 @@ namespace dbaui
virtual void Undo() = 0; virtual void Undo() = 0;
virtual void Redo() = 0; virtual void Redo() = 0;
// Zugriff auf das TabWin // access to the TabWin
void SetTabWin(OQueryTableWindow* pTW) { m_pTabWin = pTW; } void SetTabWin(OQueryTableWindow* pTW) { m_pTabWin = pTW; }
// anschliessend sollte das SetOwnership aufgerufen werden // now SetOwnership should be invoked
// Zugriff auf die verwalteten Connections // access to the managed connections
sal_uInt16 ConnCount() { return (sal_uInt16)m_vTableConnection.size(); } sal_uInt16 ConnCount() { return (sal_uInt16)m_vTableConnection.size(); }
::std::vector<OTableConnection*>* GetTabConnList() { return &m_vTableConnection; } ::std::vector<OTableConnection*>* GetTabConnList() { return &m_vTableConnection; }
......
...@@ -215,10 +215,10 @@ namespace ...@@ -215,10 +215,10 @@ namespace
} }
pNewConnData->AppendConnLine(*pIter,sRelatedColumn); pNewConnData->AppendConnLine(*pIter,sRelatedColumn);
// dann die Conn selber dazu // now add the Conn itself
OQueryTableConnection aNewConn(_pView, aNewConnData); OQueryTableConnection aNewConn(_pView, aNewConnData);
// der Verweis auf die lokale Variable ist unkritisch, da NotifyQueryTabConn eine neue Kopie anlegt // refering to the local variable is not important, as NotifyQueryTabConn creates a new copy
// und mir hinzufuegen (wenn nicht schon existent) // to add me (if not existent)
_pView->NotifyTabConnection(aNewConn, sal_False); _pView->NotifyTabConnection(aNewConn, sal_False);
// don't create an Undo-Action for the new connection : the connection is // don't create an Undo-Action for the new connection : the connection is
// covered by the Undo-Action for the tabwin, as the "Undo the insert" will // covered by the Undo-Action for the tabwin, as the "Undo the insert" will
...@@ -273,7 +273,6 @@ void OQueryTableView::ReSync() ...@@ -273,7 +273,6 @@ void OQueryTableView::ReSync()
// I need a collection of all window names that cannot be created so that I do not initialize connections for them. // I need a collection of all window names that cannot be created so that I do not initialize connections for them.
::std::vector<String> arrInvalidTables; ::std::vector<String> arrInvalidTables;
TTableWindowData::reverse_iterator aIter = pTabWinDataList->rbegin(); TTableWindowData::reverse_iterator aIter = pTabWinDataList->rbegin();
...@@ -315,14 +314,15 @@ void OQueryTableView::ReSync() ...@@ -315,14 +314,15 @@ void OQueryTableView::ReSync()
{ {
OQueryTableConnectionData* pTabConnData = static_cast<OQueryTableConnectionData*>(aConIter->get()); OQueryTableConnectionData* pTabConnData = static_cast<OQueryTableConnectionData*>(aConIter->get());
// gibt es die beiden Tabellen zur Connection ? // do both tables for the connection exist ?
String strTabExistenceTest = pTabConnData->getReferencingTable()->GetWinName(); String strTabExistenceTest = pTabConnData->getReferencingTable()->GetWinName();
sal_Bool bInvalid = ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); sal_Bool bInvalid = ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end();
strTabExistenceTest = pTabConnData->getReferencedTable()->GetWinName(); strTabExistenceTest = pTabConnData->getReferencedTable()->GetWinName();
bInvalid = bInvalid && ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); bInvalid = bInvalid && ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end();
if (bInvalid) if (bInvalid)
{ // nein -> Pech gehabt, die Connection faellt weg {
// no -> bad luck, no connection
pTabConnDataList->erase( ::std::remove(pTabConnDataList->begin(),pTabConnDataList->end(),*aConIter) ,pTabConnDataList->end()); pTabConnDataList->erase( ::std::remove(pTabConnDataList->begin(),pTabConnDataList->end(),*aConIter) ,pTabConnDataList->end());
continue; continue;
} }
...@@ -352,7 +352,7 @@ OTableWindow* OQueryTableView::createWindow(const TTableWindowData::value_type& ...@@ -352,7 +352,7 @@ OTableWindow* OQueryTableView::createWindow(const TTableWindowData::value_type&
void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction) void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction)
{ {
DBG_CHKTHIS(OQueryTableView,NULL); DBG_CHKTHIS(OQueryTableView,NULL);
// erst mal schauen, ob ich diese Connection schon habe // let's first check if I have the connection already
OQueryTableConnection* pTabConn = NULL; OQueryTableConnection* pTabConn = NULL;
const ::std::vector<OTableConnection*>* pConnections = getTableConnections(); const ::std::vector<OTableConnection*>* pConnections = getTableConnections();
::std::vector<OTableConnection*>::const_iterator aEnd = pConnections->end(); ::std::vector<OTableConnection*>::const_iterator aEnd = pConnections->end();
...@@ -374,10 +374,11 @@ void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, ...@@ -374,10 +374,11 @@ void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn,
} }
else else
pTabConn = static_cast<OQueryTableConnection*>(*aIter); pTabConn = static_cast<OQueryTableConnection*>(*aIter);
// nein -> einfuegen
// no -> insert
if (pTabConn == NULL) if (pTabConn == NULL)
{ {
// die neuen Daten ... // the new data ...
OQueryTableConnectionData* pNewData = static_cast< OQueryTableConnectionData*>(rNewConn.GetData()->NewInstance()); OQueryTableConnectionData* pNewData = static_cast< OQueryTableConnectionData*>(rNewConn.GetData()->NewInstance());
pNewData->CopyFrom(*rNewConn.GetData()); pNewData->CopyFrom(*rNewConn.GetData());
TTableConnectionData::value_type aData(pNewData); TTableConnectionData::value_type aData(pNewData);
...@@ -398,11 +399,11 @@ OTableWindowData* OQueryTableView::CreateImpl(const ::rtl::OUString& _rComposedN ...@@ -398,11 +399,11 @@ OTableWindowData* OQueryTableView::CreateImpl(const ::rtl::OUString& _rComposedN
void OQueryTableView::AddTabWin(const ::rtl::OUString& _rTableName, const ::rtl::OUString& _rAliasName, sal_Bool bNewTable) void OQueryTableView::AddTabWin(const ::rtl::OUString& _rTableName, const ::rtl::OUString& _rAliasName, sal_Bool bNewTable)
{ {
DBG_CHKTHIS(OQueryTableView,NULL); DBG_CHKTHIS(OQueryTableView,NULL);
// This is the method inherited from the base class. I send it back to my parent class and my parent // this method has been inherited from the base class, linking back to the parent and which constructs
// may build an Alias and send it on to AddTabWin. // an Alias and which passes on to my other AddTabWin
// Unfortunately _rTableName is fully qualified, but OQueryDesignView expects a String consisting // pity _rTableName is fully qualified, OQueryDesignView expects a string which only
// of the Schema and Table only and not containing a Catalog. // contains schema and tables but no catalog.
Reference< XConnection> xConnection = m_pView->getController().getConnection(); Reference< XConnection> xConnection = m_pView->getController().getConnection();
if(!xConnection.is()) if(!xConnection.is())
return; return;
...@@ -466,7 +467,7 @@ void OQueryTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::r ...@@ -466,7 +467,7 @@ void OQueryTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::r
// If the table is not set, then it is a dummy window, but at least the alias must be set // If the table is not set, then it is a dummy window, but at least the alias must be set
// build a new data structure // build a new data structure
// first check if this already hav it's data // first check if this already has its data
sal_Bool bAppend = bNewTable; sal_Bool bAppend = bNewTable;
TTableWindowData::value_type pNewTabWinData; TTableWindowData::value_type pNewTabWinData;
TTableWindowData* pWindowData = getDesignView()->getController().getTableWindowData(); TTableWindowData* pWindowData = getDesignView()->getController().getTableWindowData();
...@@ -625,14 +626,14 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ ...@@ -625,14 +626,14 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ
OTableConnection* pConn = GetTabConn(pSourceWin,pDestWin,true); OTableConnection* pConn = GetTabConn(pSourceWin,pDestWin,true);
if ( !pConn ) if ( !pConn )
{ {
// new Data object // new data object
OQueryTableConnectionData* pNewConnectionData = new OQueryTableConnectionData(pSourceWin->GetData(), pDestWin->GetData()); OQueryTableConnectionData* pNewConnectionData = new OQueryTableConnectionData(pSourceWin->GetData(), pDestWin->GetData());
TTableConnectionData::value_type aNewConnectionData(pNewConnectionData); TTableConnectionData::value_type aNewConnectionData(pNewConnectionData);
sal_uInt32 nSourceFieldIndex, nDestFieldIndex; sal_uInt32 nSourceFieldIndex, nDestFieldIndex;
ETableFieldType eSourceFieldType, eDestFieldType; ETableFieldType eSourceFieldType, eDestFieldType;
// Get the name/position/type of both the effected fields... // Get name/position/type of both affected fields ...
// Source // Source
nSourceFieldIndex = jxdSource.pListBox->GetModel()->GetAbsPos(jxdSource.pEntry); nSourceFieldIndex = jxdSource.pListBox->GetModel()->GetAbsPos(jxdSource.pEntry);
...@@ -644,7 +645,6 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ ...@@ -644,7 +645,6 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ
eDestFieldType = static_cast< OTableFieldInfo*>(jxdDest.pEntry->GetUserData())->GetKeyType(); eDestFieldType = static_cast< OTableFieldInfo*>(jxdDest.pEntry->GetUserData())->GetKeyType();
// ... and set them // ... and set them
pNewConnectionData->SetFieldIndex(JTCS_FROM, nSourceFieldIndex); pNewConnectionData->SetFieldIndex(JTCS_FROM, nSourceFieldIndex);
pNewConnectionData->SetFieldIndex(JTCS_TO, nDestFieldIndex); pNewConnectionData->SetFieldIndex(JTCS_TO, nDestFieldIndex);
...@@ -655,7 +655,7 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ ...@@ -655,7 +655,7 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ
OQueryTableConnection aNewConnection(this, aNewConnectionData); OQueryTableConnection aNewConnection(this, aNewConnectionData);
NotifyTabConnection(aNewConnection); NotifyTabConnection(aNewConnection);
// As usual with NotifyTabConnection, using a local variable is fine because a copy is made // As usual with NotifyTabConnection, using a local variable is fine because a copy is made
} }
else else
{ {
...@@ -864,7 +864,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc ...@@ -864,7 +864,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
if (m_pLastFocusTabWin == pTabWin) if (m_pLastFocusTabWin == pTabWin)
m_pLastFocusTabWin = NULL; m_pLastFocusTabWin = NULL;
// Collect the connections which belong to the window and pass them to the UndoAction // collect connections belonging to the window and pass to UndoAction
sal_Int16 nCnt = 0; sal_Int16 nCnt = 0;
const ::std::vector<OTableConnection*>* pTabConList = getTableConnections(); const ::std::vector<OTableConnection*>* pTabConList = getTableConnections();
::std::vector<OTableConnection*>::const_iterator aIter2 = pTabConList->begin(); ::std::vector<OTableConnection*>::const_iterator aIter2 = pTabConList->begin();
...@@ -961,7 +961,6 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn ...@@ -961,7 +961,6 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn
} }
else else
{ {
//////////////////////////////////////////////////////////////////
// Initiaisation failed // Initiaisation failed
// (for example when the Connection to the database is not available at the moment) // (for example when the Connection to the database is not available at the moment)
pTabWin->clearListBox(); pTabWin->clearListBox();
......
...@@ -53,11 +53,11 @@ namespace dbaui ...@@ -53,11 +53,11 @@ namespace dbaui
class OSelectionBrowseBox : public ::svt::EditBrowseBox class OSelectionBrowseBox : public ::svt::EditBrowseBox
{ {
friend class OQueryDesignView; friend class OQueryDesignView;
::std::vector<bool> m_bVisibleRow; // an Pos steht die RowId ::std::vector<bool> m_bVisibleRow; // at pos we find the RowId
Timer m_timerInvalidate; Timer m_timerInvalidate;
long m_nSeekRow; long m_nSeekRow;
BrowserMode m_nMode; // Merken des BrowseModes BrowserMode m_nMode; // remember the BrowseModes
Edit* m_pTextCell; Edit* m_pTextCell;
::svt::CheckBoxControl* m_pVisibleCell; ::svt::CheckBoxControl* m_pVisibleCell;
::svt::ComboBoxControl* m_pFieldCell; ::svt::ComboBoxControl* m_pFieldCell;
...@@ -65,13 +65,13 @@ namespace dbaui ...@@ -65,13 +65,13 @@ namespace dbaui
::svt::ListBoxControl* m_pTableCell; ::svt::ListBoxControl* m_pTableCell;
::svt::ListBoxControl* m_pOrderCell; ::svt::ListBoxControl* m_pOrderCell;
OTableFieldDescRef m_pEmptyEntry; // default entry in the list may reference more than once OTableFieldDescRef m_pEmptyEntry; // default entry in the list may reference more than once
sal_Int32 m_nMaxColumns; // maximale Anzahl der Spalten in einem Select-Statement sal_Int32 m_nMaxColumns; // maximum number of columns in a Select-Statement
String m_aFunctionStrings; String m_aFunctionStrings;
sal_uInt16 m_nVisibleCount; // Anzahl der max sichtbaren Zeilen sal_uInt16 m_nVisibleCount; // maximum number of visible rows
sal_uInt32 m_nLastSortColumn; // index of last (highest) sort column sal_uInt32 m_nLastSortColumn; // index of last (highest) sort column
sal_Bool m_bOrderByUnRelated; sal_Bool m_bOrderByUnRelated;
sal_Bool m_bGroupByUnRelated; sal_Bool m_bGroupByUnRelated;
sal_Bool m_bStopTimer; sal_Bool m_bStopTimer;
...@@ -91,8 +91,9 @@ namespace dbaui ...@@ -91,8 +91,9 @@ namespace dbaui
void DeleteFields( const String& rAliasName ); void DeleteFields( const String& rAliasName );
bool HasFieldByAliasName(const ::rtl::OUString& rFieldName, OTableFieldDescRef& rInfo) const; bool HasFieldByAliasName(const ::rtl::OUString& rFieldName, OTableFieldDescRef& rInfo) const;
// AddGroupBy:: F"ugt ein Feld mit Funktion == Grupierung. Falls das Feld schon vorhanden ist und ein Aggregate Funktion
// benutzt, wird das Flag nicht gesetzt // AddGroupBy:: inserts a field with function == grouping. If the fields already exists and uses an aggregate function,
// the flag is not set
void AddGroupBy( const OTableFieldDescRef& rInfo,sal_uInt32 _nCurrentPos); void AddGroupBy( const OTableFieldDescRef& rInfo,sal_uInt32 _nCurrentPos);
void AddCondition( const OTableFieldDescRef& rInfo, void AddCondition( const OTableFieldDescRef& rInfo,
const String& rValue, const String& rValue,
...@@ -108,11 +109,11 @@ namespace dbaui ...@@ -108,11 +109,11 @@ namespace dbaui
sal_uInt16 FieldsCount(); sal_uInt16 FieldsCount();
void SetColWidth(sal_uInt16 nColId, long lNewWidth); void SetColWidth(sal_uInt16 nColId, long lNewWidth);
// beachtet im Gegensatz zum SetColumnWidth der Basisklasse auch eine eventuell aktive Zelle in dieser Spalte // unlike SetColumnWidth of the base class it checks an active cell in this column
String GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId); String GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId);
void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const String& strNewText); void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const String& strNewText);
// Zelleninhalt (als String formatiert) setzen/liefern // cell content (formatted as string) set/return
sal_Int32 GetNoneVisibleRows() const; sal_Int32 GetNoneVisibleRows() const;
void SetNoneVisbleRow(long nRows); void SetNoneVisbleRow(long nRows);
sal_Bool IsRowVisible(sal_uInt16 _nWhich) const; sal_Bool IsRowVisible(sal_uInt16 _nWhich) const;
...@@ -215,11 +216,13 @@ namespace dbaui ...@@ -215,11 +216,13 @@ namespace dbaui
private: private:
OTableFieldDescRef FindFirstFreeCol(sal_uInt16& _rColumnPosition); OTableFieldDescRef FindFirstFreeCol(sal_uInt16& _rColumnPosition);
// rCol enthaelt die Nummer (in pOTableFieldDescList) der ersten Spalte, die von sich sagt, dass sie leer ist
// wenn es keine solche gibt, ist rCol undefiniert und der Rueckgabewert NULL // rCol contains the Nummer (in pOTableFieldDescList) of the first column, which itself tells it is empty
// if there are none, rCol is undefined and the returnvalue NULL
void CheckFreeColumns(sal_uInt16& _rColumnPosition); void CheckFreeColumns(sal_uInt16& _rColumnPosition);
// testet, ob es noch freie Spalten gibt, wenn nicht, wird ein neuer Packen angefuegt
// rCol enthaelt die Nummer der ersten freien Spalte (in pOTableFieldDescList) // check if empty columns are available, if not, a new Packen is appended
// rCol contains the Nummer of the first empty column (in pOTableFieldDescList)
void RemoveField( sal_uInt16 nId ); void RemoveField( sal_uInt16 nId );
Rectangle GetInvalidRect( sal_uInt16 nColId ); Rectangle GetInvalidRect( sal_uInt16 nColId );
......
...@@ -61,7 +61,7 @@ namespace dbaui ...@@ -61,7 +61,7 @@ namespace dbaui
void OTableConnection::Init() void OTableConnection::Init()
{ {
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Linienliste mit Defaults initialisieren // initialise linelist with defaults
OConnectionLineDataVec* pLineData = GetData()->GetConnLineDataList(); OConnectionLineDataVec* pLineData = GetData()->GetConnLineDataList();
OConnectionLineDataVec::const_iterator aIter = pLineData->begin(); OConnectionLineDataVec::const_iterator aIter = pLineData->begin();
OConnectionLineDataVec::const_iterator aEnd = pLineData->end(); OConnectionLineDataVec::const_iterator aEnd = pLineData->end();
...@@ -87,7 +87,7 @@ namespace dbaui ...@@ -87,7 +87,7 @@ namespace dbaui
void OTableConnection::UpdateLineList() void OTableConnection::UpdateLineList()
{ {
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Linienliste loeschen // delete linelist
clearLineData(); clearLineData();
Init(); Init();
...@@ -99,10 +99,10 @@ namespace dbaui ...@@ -99,10 +99,10 @@ namespace dbaui
if( &rConn == this ) if( &rConn == this )
return *this; return *this;
// Linienliste loeschen // delete linelist
clearLineData(); clearLineData();
// Linienliste kopieren // copy linelist
if(! rConn.GetConnLineList()->empty() ) if(! rConn.GetConnLineList()->empty() )
{ {
const ::std::vector<OConnectionLine*>* pLine = rConn.GetConnLineList(); const ::std::vector<OConnectionLine*>* pLine = rConn.GetConnLineList();
...@@ -113,9 +113,10 @@ namespace dbaui ...@@ -113,9 +113,10 @@ namespace dbaui
m_vConnLine.push_back( CreateConnLine( **aIter )); m_vConnLine.push_back( CreateConnLine( **aIter ));
} }
// da mir die Daten nicht gehoeren, loesche ich die alten nicht
// as the data are not mine, I also do not delete the old
m_pData->CopyFrom(*rConn.GetData()); m_pData->CopyFrom(*rConn.GetData());
// CopyFrom ist virtuell, damit ist es kein Problem, wenn m_pData von einem von OTableConnectionData abgeleiteten Typ ist // CopyFrom is virtual, therefore it is not a problem if m_pData is a derived type of OTableConnectionData
m_bSelected = rConn.m_bSelected; m_bSelected = rConn.m_bSelected;
m_pParent = rConn.m_pParent; m_pParent = rConn.m_pParent;
...@@ -185,10 +186,10 @@ namespace dbaui ...@@ -185,10 +186,10 @@ namespace dbaui
Rectangle rcBounding = GetBoundingRect(); Rectangle rcBounding = GetBoundingRect();
rcBounding.Bottom() += 1; rcBounding.Bottom() += 1;
rcBounding.Right() += 1; rcBounding.Right() += 1;
// ich glaube, dass sich Invalidate und Draw(Rectangle) nicht konsistent verhalten : jedenfalls waere dadurch zu // I believe Invalidate and Draw(Rectangle) do not behave consistent: in any case it
// erklaeren, warum ohne diesen Fake hier beim Loeschen einer Connection ein Strich an ihrem unteren Ende stehen bleibt : // could explain, why without the fake here when deleting a connection a dash remains at the lower end:
// Invalidate erfasst dabei offensichtlich eine Pixelzeile weniger als Draw. // Invalidate records obviously one pixel line less as Draw.
// Oder alles haengt ganz anders zusammen ... jedenfalls klappt es so ... // Or everything works differently ..... in any case it works ....
m_pParent->Invalidate( rcBounding, INVALIDATE_NOCHILDREN ); m_pParent->Invalidate( rcBounding, INVALIDATE_NOCHILDREN );
return true; return true;
...@@ -198,7 +199,7 @@ namespace dbaui ...@@ -198,7 +199,7 @@ namespace dbaui
Rectangle OTableConnection::GetBoundingRect() const Rectangle OTableConnection::GetBoundingRect() const
{ {
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Aus allen Linien das umgebende Rechteck bestimmen // determine all lines of the surrounding rectangle
Rectangle aBoundingRect( Point(0,0), Point(0,0) ); Rectangle aBoundingRect( Point(0,0), Point(0,0) );
Rectangle aTempRect; Rectangle aTempRect;
::std::vector<OConnectionLine*>::const_iterator aEnd = m_vConnLine.end(); ::std::vector<OConnectionLine*>::const_iterator aEnd = m_vConnLine.end();
...@@ -207,7 +208,7 @@ namespace dbaui ...@@ -207,7 +208,7 @@ namespace dbaui
aTempRect = (*aIter)->GetBoundingRect(); aTempRect = (*aIter)->GetBoundingRect();
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Ist das BoundingRect dieser Linie gueltig? // is the BoundingRect of this line valid?
if( (aTempRect.GetWidth()!=1) && (aTempRect.GetHeight()!=1) ) if( (aTempRect.GetWidth()!=1) && (aTempRect.GetHeight()!=1) )
{ {
if( (aBoundingRect.GetWidth()==1) && (aBoundingRect.GetHeight()==1) ) if( (aBoundingRect.GetWidth()==1) && (aBoundingRect.GetHeight()==1) )
...@@ -224,7 +225,7 @@ namespace dbaui ...@@ -224,7 +225,7 @@ namespace dbaui
void OTableConnection::Draw( const Rectangle& /*rRect*/ ) void OTableConnection::Draw( const Rectangle& /*rRect*/ )
{ {
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Linien zeichnen // Draw line
::std::for_each(m_vConnLine.begin(),m_vConnLine.end(),TConnectionLineDrawFunctor(m_pParent)); ::std::for_each(m_vConnLine.begin(),m_vConnLine.end(),TConnectionLineDrawFunctor(m_pParent));
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
...@@ -49,10 +49,10 @@ OTableConnectionData::OTableConnectionData(const TTableWindowData::value_type& _ ...@@ -49,10 +49,10 @@ OTableConnectionData::OTableConnectionData(const TTableWindowData::value_type& _
void OTableConnectionData::Init() void OTableConnectionData::Init()
{ {
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// LineDataList mit Defaults initialisieren // initialise linedatalist with defaults
OSL_ENSURE(m_vConnLineData.empty(), "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !"); OSL_ENSURE(m_vConnLineData.empty(), "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !");
ResetConnLines(); ResetConnLines();
// das legt Defaults an // this creates the defaults
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
OTableConnectionData::OTableConnectionData( const OTableConnectionData& rConnData ) OTableConnectionData::OTableConnectionData( const OTableConnectionData& rConnData )
...@@ -64,14 +64,14 @@ OTableConnectionData::OTableConnectionData( const OTableConnectionData& rConnDat ...@@ -64,14 +64,14 @@ OTableConnectionData::OTableConnectionData( const OTableConnectionData& rConnDat
void OTableConnectionData::CopyFrom(const OTableConnectionData& rSource) void OTableConnectionData::CopyFrom(const OTableConnectionData& rSource)
{ {
*this = rSource; *this = rSource;
// hier ziehe ich mich auf das (nicht-virtuelle) operator= zurueck, das nur meine Members kopiert // here I revert to the (non-virtual) operator =, which only copies my members
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
OTableConnectionData::~OTableConnectionData() OTableConnectionData::~OTableConnectionData()
{ {
DBG_DTOR(OTableConnectionData,NULL); DBG_DTOR(OTableConnectionData,NULL);
// LineDataList loeschen // delete LineDataList
OConnectionLineDataVec().swap(m_vConnLineData); OConnectionLineDataVec().swap(m_vConnLineData);
} }
...@@ -88,7 +88,7 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat ...@@ -88,7 +88,7 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat
// clear line list // clear line list
ResetConnLines(); ResetConnLines();
// und kopieren // and copy
OConnectionLineDataVec* pLineData = const_cast<OTableConnectionData*>(&rConnData)->GetConnLineDataList(); OConnectionLineDataVec* pLineData = const_cast<OTableConnectionData*>(&rConnData)->GetConnLineDataList();
OConnectionLineDataVec::const_iterator aIter = pLineData->begin(); OConnectionLineDataVec::const_iterator aIter = pLineData->begin();
...@@ -104,7 +104,8 @@ sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSo ...@@ -104,7 +104,8 @@ sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSo
{ {
if (sal_uInt16(m_vConnLineData.size()) < nIndex) if (sal_uInt16(m_vConnLineData.size()) < nIndex)
return sal_False; return sal_False;
// == ist noch erlaubt, das entspricht einem Append
// == still allowed, this correponds to a Append
if (m_vConnLineData.size() == nIndex) if (m_vConnLineData.size() == nIndex)
return AppendConnLine(rSourceFieldName, rDestFieldName); return AppendConnLine(rSourceFieldName, rDestFieldName);
......
...@@ -89,7 +89,7 @@ OTableWindowListBox::~OTableWindowListBox() ...@@ -89,7 +89,7 @@ OTableWindowListBox::~OTableWindowListBox()
SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText ) SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText )
{ {
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Liste durchiterieren // iterate through the list
SvTreeList* pTreeList = GetModel(); SvTreeList* pTreeList = GetModel();
SvTreeListEntry* pEntry = pTreeList->First(); SvTreeListEntry* pEntry = pTreeList->First();
OJoinDesignView* pView = m_pTabWin->getDesignView(); OJoinDesignView* pView = m_pTabWin->getDesignView();
...@@ -131,10 +131,11 @@ void OTableWindowListBox::NotifyScrolled() ...@@ -131,10 +131,11 @@ void OTableWindowListBox::NotifyScrolled()
void OTableWindowListBox::NotifyEndScroll() void OTableWindowListBox::NotifyEndScroll()
{ {
if (m_bReallyScrolled) if (m_bReallyScrolled)
// die Verbindungen, die diese Tabelle eventuell hat, muessen neu gezeichnet werden // connections of this table, if any, should be redrawn
m_pTabWin->getTableView()->Invalidate(INVALIDATE_NOCHILDREN); m_pTabWin->getTableView()->Invalidate(INVALIDATE_NOCHILDREN);
// ohne das INVALIDATE_NOCHILDREN wuerden auch alle Tabellen neu gezeichnet werden,
// sprich : es flackert // without INVALIDATE_NOCHILDREN all tables would be redrawn,
// so: flickering
m_bReallyScrolled = sal_False; m_bReallyScrolled = sal_False;
} }
...@@ -249,7 +250,7 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) ...@@ -249,7 +250,7 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt )
Size(aOutputSize.Width(), LISTBOX_SCROLLING_AREA) ); Size(aOutputSize.Width(), LISTBOX_SCROLLING_AREA) );
Rectangle aTopScrollArea( Point(0,0), Size(aOutputSize.Width(), LISTBOX_SCROLLING_AREA) ); Rectangle aTopScrollArea( Point(0,0), Size(aOutputSize.Width(), LISTBOX_SCROLLING_AREA) );
// Wenn Zeiger auf der oberen ScrollingArea steht, nach oben scrollen // scroll up if the pointer is on the upper scroll area
if( aBottomScrollArea.IsInside(m_aMousePos) ) if( aBottomScrollArea.IsInside(m_aMousePos) )
{ {
if( !m_aScrollTimer.IsActive() ) if( !m_aScrollTimer.IsActive() )
...@@ -259,8 +260,8 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) ...@@ -259,8 +260,8 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt )
} }
} }
// Wenn Zeiger auf der oberen ScrollingArea steht, nach unten scrollen // scroll down if the pointer is on the lower scroll area
else if( aTopScrollArea.IsInside(m_aMousePos) ) else if( aTopScrollArea.IsInside(m_aMousePos) )
{ {
if( !m_aScrollTimer.IsActive() ) if( !m_aScrollTimer.IsActive() )
{ {
...@@ -274,12 +275,12 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) ...@@ -274,12 +275,12 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt )
m_aScrollTimer.Stop(); m_aScrollTimer.Stop();
} }
// Beim Drag automatisch den richtigen Eintrag selektieren // automatically select right entry when dragging
if ((FirstSelected() != pEntry) || (FirstSelected() && NextSelected(FirstSelected()))) if ((FirstSelected() != pEntry) || (FirstSelected() && NextSelected(FirstSelected())))
SelectAll(sal_False); SelectAll(sal_False);
Select(pEntry, sal_True); Select(pEntry, sal_True);
// Auf den ersten Eintrag (*) kann nicht gedroppt werden // one cannot drop on the first (*) entry
if(!( m_pTabWin->GetData()->IsShowAll() && (pEntry==First()) )) if(!( m_pTabWin->GetData()->IsShowAll() && (pEntry==First()) ))
nDND_Action = DND_ACTION_LINK; nDND_Action = DND_ACTION_LINK;
} }
...@@ -363,7 +364,7 @@ void OTableWindowListBox::GetFocus() ...@@ -363,7 +364,7 @@ void OTableWindowListBox::GetFocus()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ ) IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ )
{ {
// meinem Elter Bescheid sagen // tell my parent
Window* pParent = Window::GetParent(); Window* pParent = Window::GetParent();
OSL_ENSURE(pParent != NULL, "OTableWindowListBox::OnDoubleClick : habe kein Parent !"); OSL_ENSURE(pParent != NULL, "OTableWindowListBox::OnDoubleClick : habe kein Parent !");
......
...@@ -47,7 +47,7 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) : ...@@ -47,7 +47,7 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) :
,m_pTabWin( pParent ) ,m_pTabWin( pParent )
{ {
DBG_CTOR(OTableWindowTitle,NULL); DBG_CTOR(OTableWindowTitle,NULL);
// Hintergrund- und Textfarbe setzen // set background- and text colour
StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings();
SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor()))); SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor())));
SetTextColor(aSystemStyle.GetButtonTextColor()); SetTextColor(aSystemStyle.GetButtonTextColor());
...@@ -84,7 +84,7 @@ void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt ) ...@@ -84,7 +84,7 @@ void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt )
String aHelpText = m_pTabWin->GetComposedName(); String aHelpText = m_pTabWin->GetComposedName();
if( aHelpText.Len()) if( aHelpText.Len())
{ {
// Hilfe anzeigen // show help
Rectangle aItemRect(Point(0,0),GetSizePixel()); Rectangle aItemRect(Point(0,0),GetSizePixel());
aItemRect = LogicToPixel( aItemRect ); aItemRect = LogicToPixel( aItemRect );
Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
...@@ -171,8 +171,7 @@ void OTableWindowTitle::DataChanged(const DataChangedEvent& rDCEvt) ...@@ -171,8 +171,7 @@ void OTableWindowTitle::DataChanged(const DataChangedEvent& rDCEvt)
{ {
if (rDCEvt.GetType() == DATACHANGED_SETTINGS) if (rDCEvt.GetType() == DATACHANGED_SETTINGS)
{ {
// nehmen wir den worst-case an : die Farben haben sich geaendert, also // assume worst-case: colours have changed, therefore I have to adept
// mich anpassen
StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings();
SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor()))); SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor())));
SetTextColor(aSystemStyle.GetButtonTextColor()); SetTextColor(aSystemStyle.GetButtonTextColor());
......
...@@ -147,23 +147,23 @@ namespace dbaui ...@@ -147,23 +147,23 @@ namespace dbaui
OUString rString; OUString rString;
if (!_pNode->isToken()) if (!_pNode->isToken())
{ {
// Regelnamen als rule: ... // rule name as rule: ...
rString = "RULE_ID: " + OUString::valueOf( (sal_Int32)_pNode->getRuleID() ) + rString = "RULE_ID: " + OUString::valueOf( (sal_Int32)_pNode->getRuleID() ) +
"(" + OSQLParser::RuleIDToStr(_pNode->getRuleID()) + ")"; "(" + OSQLParser::RuleIDToStr(_pNode->getRuleID()) + ")";
_pParent = _pBox->InsertEntry(rString,_pParent); _pParent = _pBox->InsertEntry(rString,_pParent);
// einmal auswerten wieviel Subtrees dieser Knoten besitzt // determine how much subtrees this node has
sal_uInt32 nStop = _pNode->count(); sal_uInt32 nStop = _pNode->count();
// hol dir den ersten Subtree // fetch first subtree
for(sal_uInt32 i=0;i<nStop;++i) for(sal_uInt32 i=0;i<nStop;++i)
insertParseTree(_pBox,_pNode->getChild(i),_pParent); insertParseTree(_pBox,_pNode->getChild(i),_pParent);
} }
else else
{ {
// ein Token gefunden // token found
// tabs fuer das Einruecken entsprechend nLevel // tabs to insert according to nLevel
switch (_pNode->getNodeType()) switch (_pNode->getNodeType())
{ {
...@@ -177,8 +177,8 @@ namespace dbaui ...@@ -177,8 +177,8 @@ namespace dbaui
case SQL_NODE_COMPARISON: case SQL_NODE_COMPARISON:
{ {
rString += "SQL_COMPARISON:" + _pNode->getTokenValue(); // haenge Nodevalue an rString += "SQL_COMPARISON:" + _pNode->getTokenValue(); // append Nodevalue
// und beginne neu Zeile // and start new line
break;} break;}
case SQL_NODE_NAME: case SQL_NODE_NAME:
...@@ -203,12 +203,12 @@ namespace dbaui ...@@ -203,12 +203,12 @@ namespace dbaui
case SQL_NODE_PUNCTUATION: case SQL_NODE_PUNCTUATION:
{ {
rString += "SQL_PUNCTUATION:" + _pNode->getTokenValue(); // haenge Nodevalue an rString += "SQL_PUNCTUATION:" + _pNode->getTokenValue(); // append Nodevalue
break;} break;}
case SQL_NODE_AMMSC: case SQL_NODE_AMMSC:
{ {
rString += "SQL_AMMSC:" + _pNode->getTokenValue(); // haenge Nodevalue an rString += "SQL_AMMSC:" + _pNode->getTokenValue(); // append Nodevalue
break;} break;}
default: default:
......
...@@ -51,7 +51,7 @@ namespace dbaui ...@@ -51,7 +51,7 @@ namespace dbaui
OQueryTableView* m_pTableView; OQueryTableView* m_pTableView;
EJoinType eJoinType; EJoinType eJoinType;
TTableConnectionData::value_type m_pConnData; // enth"alt linke und rechte Tabelle TTableConnectionData::value_type m_pConnData; // contains left and right table
TTableConnectionData::value_type m_pOrigConnData; TTableConnectionData::value_type m_pOrigConnData;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
......
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