mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Added method to nsITableCellLayout. Fixed QI bug
This commit is contained in:
parent
c33e5d92b5
commit
cb1417e9fa
@ -37,6 +37,9 @@ public:
|
||||
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ITABLECELLAYOUT_IID; return iid; }
|
||||
|
||||
/** return the mapped cell's row and column indexes (starting at 0 for each) */
|
||||
NS_IMETHOD GetCellIndexes(PRInt32 &aRowIndex, PRInt32 &aColIndex)=0;
|
||||
|
||||
/** return the mapped cell's row index (starting at 0 for the first row) */
|
||||
virtual nsresult GetRowIndex(PRInt32 &aRowIndex)=0;
|
||||
|
||||
|
@ -1050,13 +1050,27 @@ nsresult nsTableCellFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
if (aIID.Equals(nsITableCellLayout::GetIID())) {
|
||||
*aInstancePtr = (void*)this;
|
||||
*aInstancePtr = (void*) (nsITableCellLayout *)this;
|
||||
return NS_OK;
|
||||
} else {
|
||||
return nsHTMLContainerFrame::QueryInterface(aIID, aInstancePtr);
|
||||
}
|
||||
}
|
||||
|
||||
/* This is primarily for editor access via nsITableLayout */
|
||||
NS_IMETHODIMP
|
||||
nsTableCellFrame::GetCellIndexes(PRInt32 &aRowIndex, PRInt32 &aColIndex)
|
||||
{
|
||||
nsresult res = GetRowIndex(aRowIndex);
|
||||
if (NS_FAILED(res))
|
||||
{
|
||||
aColIndex = 0;
|
||||
return res;
|
||||
}
|
||||
aColIndex = mColIndex;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
NS_NewTableCellFrame(nsIFrame** aNewFrame)
|
||||
{
|
||||
|
@ -130,7 +130,11 @@ public:
|
||||
/**
|
||||
* return the cell's starting row index (starting at 0 for the first row).
|
||||
* for continued cell frames the row index is that of the cell's first-in-flow
|
||||
* and the column index (starting at 0 for the first column
|
||||
*/
|
||||
NS_IMETHOD GetCellIndexes(PRInt32 &aRowIndex, PRInt32 &aColIndex);
|
||||
|
||||
/** return the mapped cell's row index (starting at 0 for the first row) */
|
||||
virtual nsresult GetRowIndex(PRInt32 &aRowIndex);
|
||||
|
||||
/**
|
||||
|
@ -37,6 +37,9 @@ public:
|
||||
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ITABLECELLAYOUT_IID; return iid; }
|
||||
|
||||
/** return the mapped cell's row and column indexes (starting at 0 for each) */
|
||||
NS_IMETHOD GetCellIndexes(PRInt32 &aRowIndex, PRInt32 &aColIndex)=0;
|
||||
|
||||
/** return the mapped cell's row index (starting at 0 for the first row) */
|
||||
virtual nsresult GetRowIndex(PRInt32 &aRowIndex)=0;
|
||||
|
||||
|
@ -1050,13 +1050,27 @@ nsresult nsTableCellFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
if (aIID.Equals(nsITableCellLayout::GetIID())) {
|
||||
*aInstancePtr = (void*)this;
|
||||
*aInstancePtr = (void*) (nsITableCellLayout *)this;
|
||||
return NS_OK;
|
||||
} else {
|
||||
return nsHTMLContainerFrame::QueryInterface(aIID, aInstancePtr);
|
||||
}
|
||||
}
|
||||
|
||||
/* This is primarily for editor access via nsITableLayout */
|
||||
NS_IMETHODIMP
|
||||
nsTableCellFrame::GetCellIndexes(PRInt32 &aRowIndex, PRInt32 &aColIndex)
|
||||
{
|
||||
nsresult res = GetRowIndex(aRowIndex);
|
||||
if (NS_FAILED(res))
|
||||
{
|
||||
aColIndex = 0;
|
||||
return res;
|
||||
}
|
||||
aColIndex = mColIndex;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
NS_NewTableCellFrame(nsIFrame** aNewFrame)
|
||||
{
|
||||
|
@ -130,7 +130,11 @@ public:
|
||||
/**
|
||||
* return the cell's starting row index (starting at 0 for the first row).
|
||||
* for continued cell frames the row index is that of the cell's first-in-flow
|
||||
* and the column index (starting at 0 for the first column
|
||||
*/
|
||||
NS_IMETHOD GetCellIndexes(PRInt32 &aRowIndex, PRInt32 &aColIndex);
|
||||
|
||||
/** return the mapped cell's row index (starting at 0 for the first row) */
|
||||
virtual nsresult GetRowIndex(PRInt32 &aRowIndex);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user