summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign/ConnectionLine.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-01-16 14:29:53 +0000
committerOliver Bolte <obo@openoffice.org>2006-01-16 14:29:53 +0000
commit373e7f2be39622d32050146626ff47cffe4d54d5 (patch)
tree8bc15b281168964a906e5162cb77d3f33a20a977 /dbaccess/source/ui/querydesign/ConnectionLine.cxx
parent58a599ee06e1ff696864c0434ddeb8c9c68e7353 (diff)
INTEGRATION: CWS dba202b (1.8.54); FILE MERGED
2005/11/28 10:29:05 oj 1.8.54.1: #125850# check if listbox is null!
Diffstat (limited to 'dbaccess/source/ui/querydesign/ConnectionLine.cxx')
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx30
1 files changed, 16 insertions, 14 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index 04dc170dee5d..3e01a15662b6 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ConnectionLine.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 16:18:06 $
+ * last change: $Author: obo $ $Date: 2006-01-16 15:29:53 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -83,20 +83,22 @@ namespace
OTableWindowListBox* pListBox = _pWin ? _pWin->GetListBox() : NULL;
DBG_ASSERT(_pWin && pListBox, "OConnectionLine::GetSourceTextPos : invalid call !");
- long nRowHeight = pListBox->GetEntryHeight();
-
Rectangle aReturn;
- aReturn.Top() = _aConnPos.Y() - nRowHeight;
- aReturn.Bottom() = aReturn.Top() + nRowHeight;
- if (_aDescrLinePos.X() < _aConnPos.X())
- {
- aReturn.Left() = _aDescrLinePos.X();
- aReturn.Right() = aReturn.Left() + _aConnPos.X() - _aDescrLinePos.X();
- }
- else
+ if ( pListBox )
{
- aReturn.Left() = _aConnPos.X();
- aReturn.Right() = aReturn.Left() + _aDescrLinePos.X() - _aConnPos.X();
+ long nRowHeight = pListBox->GetEntryHeight();
+ aReturn.Top() = _aConnPos.Y() - nRowHeight;
+ aReturn.Bottom() = aReturn.Top() + nRowHeight;
+ if (_aDescrLinePos.X() < _aConnPos.X())
+ {
+ aReturn.Left() = _aDescrLinePos.X();
+ aReturn.Right() = aReturn.Left() + _aConnPos.X() - _aDescrLinePos.X();
+ }
+ else
+ {
+ aReturn.Left() = _aConnPos.X();
+ aReturn.Right() = aReturn.Left() + _aDescrLinePos.X() - _aConnPos.X();
+ }
}
return aReturn;