diff options
Diffstat (limited to 'dbaccess/source/ui')
16 files changed, 104 insertions, 99 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx index d4528a1d44c8..e114f6e0ba6a 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx +++ b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx @@ -24,13 +24,12 @@ 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 OQueryDesignUndoAction : public OCommentUndoAction { protected: - OJoinTableView* m_pOwner; // in diesem Container spielt sich alles ab + OJoinTableView* m_pOwner; // in this container it all happens public: OQueryDesignUndoAction(OJoinTableView* pOwner, sal_uInt16 nCommentID) : OCommentUndoAction(nCommentID), m_pOwner(pOwner) { } diff --git a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx index 0256953e816c..e1063449794e 100644 --- a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx +++ b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx @@ -29,9 +29,10 @@ void OJoinMoveTabWinUndoAct::TogglePosition() Point ptNext = m_pTabWin->GetPosPixel() + 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 - // geaendert haben ... + + // it looks like ptFrameScrollPos is meaningless, then I it substract here and add it to ptNext, and + // next time I substract again ... + // AbetptFrameScrollPos could have changed next time ... m_pOwner->EnsureVisible(m_pTabWin); m_ptNextPosition = ptNext; diff --git a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx index 853e24cff272..e21ebf02716a 100644 --- a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx @@ -26,7 +26,7 @@ namespace dbaui { // ================================================================================================ - // OQuerySizeTabWinUndoAct - Undo-Klasse fuer Groessenveraenderung eines TabWins + // OQuerySizeTabWinUndoAct - undo class to change size of TabWins class OTableWindow; class OJoinSizeTabWinUndoAct : public OQueryDesignUndoAction { @@ -39,9 +39,9 @@ namespace dbaui public: 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 - // hier sind physische, nicht logische Koordinaten - // (im Gegensatz zur QueryMoveTabWinUndoAct) + // Boundary condition: while retrieving size/position scrolling is not allowed, meaning the position + // here returns physical and not logical coordinates + // (in contrary to QueryMoveTabWinUndoAct) virtual void Undo() { ToggleSizePosition(); } virtual void Redo() { ToggleSizePosition(); } diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx index 59913946a3af..d09f60dd4400 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx @@ -33,7 +33,7 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction() { DBG_DTOR(OQueryTabConnUndoAction,NULL); if (m_bOwnerOfConn) - { // ich besitze die Connection -> loeschen + { // I have the connection -> delete m_pOwner->DeselectConn(m_pConnection); delete m_pConnection; } diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx index 6d8624c0e266..cdb1c197b8ea 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx @@ -30,7 +30,7 @@ namespace dbaui protected: OQueryTableConnection* m_pConnection; 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: OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID); @@ -40,7 +40,7 @@ namespace dbaui virtual void Redo() = 0; void SetConnection(OQueryTableConnection* pConn) { m_pConnection = pConn; } - // anschliessend bitte SetOwnership + // now SetOwnership please void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfConn = bTakeIt; } }; } diff --git a/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx index b8833feb5468..8bf401416e7f 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx @@ -25,7 +25,7 @@ namespace dbaui { // ================================================================================================ - // OQueryTabWinShowUndoAct - Undo-Klasse fuer Anzeigen eines TabWins + // OQueryTabWinShowUndoAct - undo class to show a TabWins class OQueryTabWinShowUndoAct : public OQueryTabWinUndoAct { @@ -38,7 +38,7 @@ namespace dbaui }; // ================================================================================================ - // OQueryTabWinDelUndoAct - Undo-Klasse fuer Loeschen eines TabWins + // OQueryTabWinDelUndoAct - undo class to delete a TabWins class OQueryTabWinDelUndoAct : public OQueryTabWinUndoAct { diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx index f7f06b215618..2e3e995b7132 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx @@ -57,7 +57,8 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct() { DBG_DTOR(OQueryTabWinUndoAct ,NULL); 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->IsVisible(), "OQueryTabWinUndoAct::~OQueryTabWinUndoAct() : *m_pTabWin sollte nicht sichtbar sein"); @@ -65,7 +66,7 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct() m_pTabWin->clearListBox(); 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 aEnd = m_vTableConnection.end(); for(;aIter != aEnd;++aIter) diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx index 00eb6d458179..af839edaebb9 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx @@ -26,7 +26,7 @@ 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 OTableConnection; @@ -37,7 +37,7 @@ namespace dbaui ::std::vector<OTableConnection*> m_vTableConnection; OQueryTableWindow* m_pTabWin; 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: OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID); @@ -49,11 +49,11 @@ namespace dbaui virtual void Undo() = 0; virtual void Redo() = 0; - // Zugriff auf das TabWin + // access to the TabWin 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(); } ::std::vector<OTableConnection*>* GetTabConnList() { return &m_vTableConnection; } diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index fb45b3b52d03..94a1b0e21425 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -215,10 +215,10 @@ namespace } pNewConnData->AppendConnLine(*pIter,sRelatedColumn); - // dann die Conn selber dazu + // now add the Conn itself OQueryTableConnection aNewConn(_pView, aNewConnData); - // der Verweis auf die lokale Variable ist unkritisch, da NotifyQueryTabConn eine neue Kopie anlegt - // und mir hinzufuegen (wenn nicht schon existent) + // refering to the local variable is not important, as NotifyQueryTabConn creates a new copy + // to add me (if not existent) _pView->NotifyTabConnection(aNewConn, sal_False); // 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 @@ -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. - ::std::vector<String> arrInvalidTables; TTableWindowData::reverse_iterator aIter = pTabWinDataList->rbegin(); @@ -315,14 +314,15 @@ void OQueryTableView::ReSync() { 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(); sal_Bool bInvalid = ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); strTabExistenceTest = pTabConnData->getReferencedTable()->GetWinName(); bInvalid = bInvalid && ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); 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()); continue; } @@ -352,7 +352,7 @@ OTableWindow* OQueryTableView::createWindow(const TTableWindowData::value_type& void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction) { 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; const ::std::vector<OTableConnection*>* pConnections = getTableConnections(); ::std::vector<OTableConnection*>::const_iterator aEnd = pConnections->end(); @@ -374,10 +374,11 @@ void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, } else pTabConn = static_cast<OQueryTableConnection*>(*aIter); - // nein -> einfuegen + + // no -> insert if (pTabConn == NULL) { - // die neuen Daten ... + // the new data ... OQueryTableConnectionData* pNewData = static_cast< OQueryTableConnectionData*>(rNewConn.GetData()->NewInstance()); pNewData->CopyFrom(*rNewConn.GetData()); TTableConnectionData::value_type aData(pNewData); @@ -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) { DBG_CHKTHIS(OQueryTableView,NULL); - // This is the method inherited from the base class. I send it back to my parent class and my parent - // may build an Alias and send it on to AddTabWin. + // this method has been inherited from the base class, linking back to the parent and which constructs + // an Alias and which passes on to my other AddTabWin - // Unfortunately _rTableName is fully qualified, but OQueryDesignView expects a String consisting - // of the Schema and Table only and not containing a Catalog. + // pity _rTableName is fully qualified, OQueryDesignView expects a string which only + // contains schema and tables but no catalog. Reference< XConnection> xConnection = m_pView->getController().getConnection(); if(!xConnection.is()) return; @@ -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 // 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; TTableWindowData::value_type pNewTabWinData; TTableWindowData* pWindowData = getDesignView()->getController().getTableWindowData(); @@ -625,14 +626,14 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ OTableConnection* pConn = GetTabConn(pSourceWin,pDestWin,true); if ( !pConn ) { - // new Data object + // new data object OQueryTableConnectionData* pNewConnectionData = new OQueryTableConnectionData(pSourceWin->GetData(), pDestWin->GetData()); TTableConnectionData::value_type aNewConnectionData(pNewConnectionData); sal_uInt32 nSourceFieldIndex, nDestFieldIndex; ETableFieldType eSourceFieldType, eDestFieldType; - // Get the name/position/type of both the effected fields... + // Get name/position/type of both affected fields ... // Source nSourceFieldIndex = jxdSource.pListBox->GetModel()->GetAbsPos(jxdSource.pEntry); @@ -644,7 +645,6 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ eDestFieldType = static_cast< OTableFieldInfo*>(jxdDest.pEntry->GetUserData())->GetKeyType(); // ... and set them - pNewConnectionData->SetFieldIndex(JTCS_FROM, nSourceFieldIndex); pNewConnectionData->SetFieldIndex(JTCS_TO, nDestFieldIndex); @@ -655,7 +655,7 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ OQueryTableConnection aNewConnection(this, aNewConnectionData); 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 { @@ -864,7 +864,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc if (m_pLastFocusTabWin == pTabWin) 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; const ::std::vector<OTableConnection*>* pTabConList = getTableConnections(); ::std::vector<OTableConnection*>::const_iterator aIter2 = pTabConList->begin(); @@ -961,7 +961,6 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn } else { - ////////////////////////////////////////////////////////////////// // Initiaisation failed // (for example when the Connection to the database is not available at the moment) pTabWin->clearListBox(); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index 55bf2703bc16..098be93c48ec 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -53,11 +53,11 @@ namespace dbaui class OSelectionBrowseBox : public ::svt::EditBrowseBox { 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; long m_nSeekRow; - BrowserMode m_nMode; // Merken des BrowseModes + BrowserMode m_nMode; // remember the BrowseModes Edit* m_pTextCell; ::svt::CheckBoxControl* m_pVisibleCell; ::svt::ComboBoxControl* m_pFieldCell; @@ -65,13 +65,13 @@ namespace dbaui ::svt::ListBoxControl* m_pTableCell; ::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; - sal_uInt16 m_nVisibleCount; // Anzahl der max sichtbaren Zeilen - sal_uInt32 m_nLastSortColumn; // index of last (highest) sort column + sal_uInt16 m_nVisibleCount; // maximum number of visible rows + sal_uInt32 m_nLastSortColumn; // index of last (highest) sort column sal_Bool m_bOrderByUnRelated; sal_Bool m_bGroupByUnRelated; sal_Bool m_bStopTimer; @@ -91,8 +91,9 @@ namespace dbaui void DeleteFields( const String& rAliasName ); 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 AddCondition( const OTableFieldDescRef& rInfo, const String& rValue, @@ -108,11 +109,11 @@ namespace dbaui sal_uInt16 FieldsCount(); 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); 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; void SetNoneVisbleRow(long nRows); sal_Bool IsRowVisible(sal_uInt16 _nWhich) const; @@ -215,11 +216,13 @@ namespace dbaui private: 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); - // 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 ); Rectangle GetInvalidRect( sal_uInt16 nColId ); diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx index de6d2e32abc8..8f2427a7f2b1 100644 --- a/dbaccess/source/ui/querydesign/TableConnection.cxx +++ b/dbaccess/source/ui/querydesign/TableConnection.cxx @@ -61,7 +61,7 @@ namespace dbaui void OTableConnection::Init() { ////////////////////////////////////////////////////////////////////// - // Linienliste mit Defaults initialisieren + // initialise linelist with defaults OConnectionLineDataVec* pLineData = GetData()->GetConnLineDataList(); OConnectionLineDataVec::const_iterator aIter = pLineData->begin(); OConnectionLineDataVec::const_iterator aEnd = pLineData->end(); @@ -87,7 +87,7 @@ namespace dbaui void OTableConnection::UpdateLineList() { ////////////////////////////////////////////////////////////////////// - // Linienliste loeschen + // delete linelist clearLineData(); Init(); @@ -99,10 +99,10 @@ namespace dbaui if( &rConn == this ) return *this; - // Linienliste loeschen + // delete linelist clearLineData(); - // Linienliste kopieren + // copy linelist if(! rConn.GetConnLineList()->empty() ) { const ::std::vector<OConnectionLine*>* pLine = rConn.GetConnLineList(); @@ -113,9 +113,10 @@ namespace dbaui 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()); - // 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_pParent = rConn.m_pParent; @@ -185,10 +186,10 @@ namespace dbaui Rectangle rcBounding = GetBoundingRect(); rcBounding.Bottom() += 1; rcBounding.Right() += 1; - // ich glaube, dass sich Invalidate und Draw(Rectangle) nicht konsistent verhalten : jedenfalls waere dadurch zu - // erklaeren, warum ohne diesen Fake hier beim Loeschen einer Connection ein Strich an ihrem unteren Ende stehen bleibt : - // Invalidate erfasst dabei offensichtlich eine Pixelzeile weniger als Draw. - // Oder alles haengt ganz anders zusammen ... jedenfalls klappt es so ... + // I believe Invalidate and Draw(Rectangle) do not behave consistent: in any case it + // could explain, why without the fake here when deleting a connection a dash remains at the lower end: + // Invalidate records obviously one pixel line less as Draw. + // Or everything works differently ..... in any case it works .... m_pParent->Invalidate( rcBounding, INVALIDATE_NOCHILDREN ); return true; @@ -198,7 +199,7 @@ namespace dbaui 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 aTempRect; ::std::vector<OConnectionLine*>::const_iterator aEnd = m_vConnLine.end(); @@ -207,7 +208,7 @@ namespace dbaui aTempRect = (*aIter)->GetBoundingRect(); ////////////////////////////////////////////////////////////////////// - // Ist das BoundingRect dieser Linie gueltig? + // is the BoundingRect of this line valid? if( (aTempRect.GetWidth()!=1) && (aTempRect.GetHeight()!=1) ) { if( (aBoundingRect.GetWidth()==1) && (aBoundingRect.GetHeight()==1) ) @@ -224,7 +225,7 @@ namespace dbaui void OTableConnection::Draw( const Rectangle& /*rRect*/ ) { ////////////////////////////////////////////////////////////////////// - // Linien zeichnen + // Draw line ::std::for_each(m_vConnLine.begin(),m_vConnLine.end(),TConnectionLineDrawFunctor(m_pParent)); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index bf38ab7e6545..acfd6ce56cd8 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -49,10 +49,10 @@ OTableConnectionData::OTableConnectionData(const TTableWindowData::value_type& _ void OTableConnectionData::Init() { ////////////////////////////////////////////////////////////////////// - // LineDataList mit Defaults initialisieren + // initialise linedatalist with defaults OSL_ENSURE(m_vConnLineData.empty(), "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !"); ResetConnLines(); - // das legt Defaults an + // this creates the defaults } //------------------------------------------------------------------------ OTableConnectionData::OTableConnectionData( const OTableConnectionData& rConnData ) @@ -64,14 +64,14 @@ OTableConnectionData::OTableConnectionData( const OTableConnectionData& rConnDat void OTableConnectionData::CopyFrom(const OTableConnectionData& 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() { DBG_DTOR(OTableConnectionData,NULL); - // LineDataList loeschen + // delete LineDataList OConnectionLineDataVec().swap(m_vConnLineData); } @@ -88,7 +88,7 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat // clear line list ResetConnLines(); - // und kopieren + // and copy OConnectionLineDataVec* pLineData = const_cast<OTableConnectionData*>(&rConnData)->GetConnLineDataList(); OConnectionLineDataVec::const_iterator aIter = pLineData->begin(); @@ -104,7 +104,8 @@ sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSo { if (sal_uInt16(m_vConnLineData.size()) < nIndex) return sal_False; - // == ist noch erlaubt, das entspricht einem Append + + // == still allowed, this correponds to a Append if (m_vConnLineData.size() == nIndex) return AppendConnLine(rSourceFieldName, rDestFieldName); diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index ab97283db94a..9f4e3cce3064 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -89,7 +89,7 @@ OTableWindowListBox::~OTableWindowListBox() SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText ) { ////////////////////////////////////////////////////////////////////// - // Liste durchiterieren + // iterate through the list SvTreeList* pTreeList = GetModel(); SvTreeListEntry* pEntry = pTreeList->First(); OJoinDesignView* pView = m_pTabWin->getDesignView(); @@ -131,10 +131,11 @@ void OTableWindowListBox::NotifyScrolled() void OTableWindowListBox::NotifyEndScroll() { 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); - // 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; } @@ -249,7 +250,7 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) 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( !m_aScrollTimer.IsActive() ) @@ -259,8 +260,8 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) } } - // Wenn Zeiger auf der oberen ScrollingArea steht, nach unten scrollen - else if( aTopScrollArea.IsInside(m_aMousePos) ) + // scroll down if the pointer is on the lower scroll area + else if( aTopScrollArea.IsInside(m_aMousePos) ) { if( !m_aScrollTimer.IsActive() ) { @@ -274,12 +275,12 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) m_aScrollTimer.Stop(); } - // Beim Drag automatisch den richtigen Eintrag selektieren + // automatically select right entry when dragging if ((FirstSelected() != pEntry) || (FirstSelected() && NextSelected(FirstSelected()))) SelectAll(sal_False); 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()) )) nDND_Action = DND_ACTION_LINK; } @@ -363,7 +364,7 @@ void OTableWindowListBox::GetFocus() //------------------------------------------------------------------------------ IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ ) { - // meinem Elter Bescheid sagen + // tell my parent Window* pParent = Window::GetParent(); OSL_ENSURE(pParent != NULL, "OTableWindowListBox::OnDoubleClick : habe kein Parent !"); diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index 73ebb1316157..6acc2851a60e 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -47,7 +47,7 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) : ,m_pTabWin( pParent ) { DBG_CTOR(OTableWindowTitle,NULL); - // Hintergrund- und Textfarbe setzen + // set background- and text colour StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor()))); SetTextColor(aSystemStyle.GetButtonTextColor()); @@ -84,7 +84,7 @@ void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt ) String aHelpText = m_pTabWin->GetComposedName(); if( aHelpText.Len()) { - // Hilfe anzeigen + // show help Rectangle aItemRect(Point(0,0),GetSizePixel()); aItemRect = LogicToPixel( aItemRect ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); @@ -171,8 +171,7 @@ void OTableWindowTitle::DataChanged(const DataChangedEvent& rDCEvt) { if (rDCEvt.GetType() == DATACHANGED_SETTINGS) { - // nehmen wir den worst-case an : die Farben haben sich geaendert, also - // mich anpassen + // assume worst-case: colours have changed, therefore I have to adept StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor()))); SetTextColor(aSystemStyle.GetButtonTextColor()); diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index a1c3c90c8eb7..74d5715155cb 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -147,23 +147,23 @@ namespace dbaui OUString rString; if (!_pNode->isToken()) { - // Regelnamen als rule: ... + // rule name as rule: ... rString = "RULE_ID: " + OUString::valueOf( (sal_Int32)_pNode->getRuleID() ) + "(" + OSQLParser::RuleIDToStr(_pNode->getRuleID()) + ")"; _pParent = _pBox->InsertEntry(rString,_pParent); - // einmal auswerten wieviel Subtrees dieser Knoten besitzt + // determine how much subtrees this node has sal_uInt32 nStop = _pNode->count(); - // hol dir den ersten Subtree + // fetch first subtree for(sal_uInt32 i=0;i<nStop;++i) insertParseTree(_pBox,_pNode->getChild(i),_pParent); } else { - // ein Token gefunden - // tabs fuer das Einruecken entsprechend nLevel + // token found + // tabs to insert according to nLevel switch (_pNode->getNodeType()) { @@ -177,8 +177,8 @@ namespace dbaui case SQL_NODE_COMPARISON: { - rString += "SQL_COMPARISON:" + _pNode->getTokenValue(); // haenge Nodevalue an - // und beginne neu Zeile + rString += "SQL_COMPARISON:" + _pNode->getTokenValue(); // append Nodevalue + // and start new line break;} case SQL_NODE_NAME: @@ -203,12 +203,12 @@ namespace dbaui case SQL_NODE_PUNCTUATION: { - rString += "SQL_PUNCTUATION:" + _pNode->getTokenValue(); // haenge Nodevalue an + rString += "SQL_PUNCTUATION:" + _pNode->getTokenValue(); // append Nodevalue break;} case SQL_NODE_AMMSC: { - rString += "SQL_AMMSC:" + _pNode->getTokenValue(); // haenge Nodevalue an + rString += "SQL_AMMSC:" + _pNode->getTokenValue(); // append Nodevalue break;} default: diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx index 1e3918320f2c..9854728a5798 100644 --- a/dbaccess/source/ui/querydesign/querydlg.hxx +++ b/dbaccess/source/ui/querydesign/querydlg.hxx @@ -51,7 +51,7 @@ namespace dbaui OQueryTableView* m_pTableView; 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; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; |