XTextContent thisCompareRangeTable = thisCompareRangeCell.getTextTable().getXTextContent();
XTextContent textRangeToCompareTable = textRangeToCompareCell.getTextTable().getXTextContent();
boolean sameTable = UnoRuntime.areSame(
thisCompareRangeTable,textRangeToCompareTable);
if(sameTable) {
ITextTableCellName thisCompareRangeCellName = thisCompareRangeCell.getName();
ITextTableCellName textRangeToCompareCellName = textRangeToCompareCell.getName();
int thisCompareRangeCellRow = thisCompareRangeCellName.getRowIndex();
int thisCompareRangeCellCol = thisCompareRangeCellName.getColumnIndex();
int textRangeToCompareCellRow = textRangeToCompareCellName.getRowIndex();
int textRangeToCompareCellCol = textRangeToCompareCellName.getColumnIndex();
if(thisCompareRangeCellRow < textRangeToCompareCellRow)
return 1;
else if(thisCompareRangeCellRow > textRangeToCompareCellRow)
return -1;
else {