Commit 08fa5dcf authored by Nicolas Dumazet's avatar Nicolas Dumazet

getCell has exactly the same code; just call it directly


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32754 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 57254bdc
...@@ -68,10 +68,10 @@ class XMLMatrix(Folder): ...@@ -68,10 +68,10 @@ class XMLMatrix(Folder):
""" """
Access a cell at row and column Access a cell at row and column
""" """
base_id= kwd.get('base_id', "cell")
if getattr(aq_base(self), 'index', None) is None: if getattr(aq_base(self), 'index', None) is None:
return None return None
base_id = kwd.get('base_id', "cell")
if not self.index.has_key(base_id): if not self.index.has_key(base_id):
return None return None
...@@ -100,18 +100,7 @@ class XMLMatrix(Folder): ...@@ -100,18 +100,7 @@ class XMLMatrix(Folder):
Checks if matrix corresponding to base_id contains cell specified Checks if matrix corresponding to base_id contains cell specified
by *kw coordinates. by *kw coordinates.
""" """
if getattr(aq_base(self), 'index', None) is None: return self.getCell(*kw, **kwd) is not None
return 0
base_id= kwd.get('base_id', "cell")
if not self.index.has_key(base_id):
return 0
cell_id = self.keyToId(kw, base_id = base_id)
if cell_id is None:
return 0
return self.get(cell_id) is not None
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'hasCellContent' ) 'hasCellContent' )
......
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