Why the lastRow keeps 0 after writing data in calc table?

When Sheet1 is blank,nothing in it,the value of oCurs.RangeAddress.EndRow is 0, why the lastRow keeps 0 after writing data in calc table?

    oDoc = ThisComponent
    Sheet = oDoc.getSheets().getByName("Sheet1")
    oCurs = Sheet.createCursor()
    oCurs.gotoEndOfUsedArea(True)
    lastRow = oCurs.RangeAddress.EndRow 
    print " when sheet is empty ,the row number is " & lastRow
    Cell = Sheet.getCellByPosition(0,0) 
    Cell.value = 100
    oCurs = Sheet.createCursor()
    oCurs.gotoEndOfUsedArea(True)
    lastRow = oCurs.RangeAddress.EndRow 
    print "after insert data in one line ,the row number is " &  lastRow

I get the output

 when sheet is empty ,the row number is 0
after insert data in one line ,the row number is 0

Why can’t get the below output?

 when sheet is empty ,the row number is 0
after insert data in one line ,the row number is 1

Before looking for the difference between an “empty” or “non-empty” UsedArea, let’s try to understand what you’re actually trying to achieve? Do you want the number of the last non-empty row? Or the number of the first empty row after that?

I want the whole line number in the active sheet.
When worksheet is empty ,no line (no data) in it ,the whole line number in usedrange is 0.
When one line data in the first line ,the whole line number in usedrange is 1.
I find that both lastRow = oCurs.RangeAddress.EndRow and lastRow = oCurs.RangeAddress.EndRow +1 can’t get right answer.
How can get the whole line number used in my case then ?What is the exact meaning for RangeAddress.EndRow ?
If an ods worksheet containing one line data in the first line , RangeAddress.EndRow = 0 ,then an ods worksheet containing nothing , RangeAddress.EndRow = -1 ,otherwise it is un-logical.

I will repeat my question again to make sure I understand your intentions correctly.

In other words - what are you going to do next with this number? Add new data to the table (and then you need the number of the empty row) or read the bottom data in the table (and then you need the number of the non-empty row).
There are many solutions for each of these problems, including the approach with the cursor and defining the last row in the “used range”. The problem with this approach is that on a completely empty sheet you still have a “used range”, it just consists of one empty cell A1. So you need to additionally analyze the contents of the cursor after .gotoEndOfUsedArea(True) - in any way you see fit. But I remind you - .gotoEndOfUsedArea(True) is not the only way to solve such problems.
So once again - what problem are you trying to solve?

I feel that it is un-logical to make RangeAddress.EndRow = 0 whether worksheet contains nothing or worksheet contains only one line.Please give an explanation,

Well, I already explained:

This was agreed upon at the very beginning and now no one will change anything.
I hope you understand that RangeAddress.EndRow = 0 means the FIRST row on the sheet, not “zero”?