зеркало из https://github.com/mozilla/gecko-dev.git
bug 145916, add GetDocument to nsITextServicesDocument; r=brade, sr=kin; submitted by Darabos Daniel (cyhawk@sch.bme.hu)
This commit is contained in:
Родитель
6622999c70
Коммит
331fad25c1
|
@ -77,7 +77,7 @@ public:
|
|||
} TSDBlockSelectionStatus;
|
||||
|
||||
/**
|
||||
* Initailizes the text services document to use a particular
|
||||
* Initializes the text services document to use a particular
|
||||
* DOM document.
|
||||
* @param aDOMDocument is the document to use. It is AddRef'd
|
||||
* by this method.
|
||||
|
@ -86,6 +86,12 @@ public:
|
|||
*/
|
||||
NS_IMETHOD InitWithDocument(nsIDOMDocument *aDOMDocument, nsIPresShell *aPresShell) = 0;
|
||||
|
||||
/**
|
||||
* Get the DOM document for the document in use.
|
||||
* @return aDocument the dom document [OUT]
|
||||
*/
|
||||
NS_IMETHOD GetDocument(nsIDOMDocument **aDocument) = 0;
|
||||
|
||||
/**
|
||||
* Initializes the text services document to use a particular
|
||||
* editor. The text services document will use the DOM document
|
||||
|
|
|
@ -391,6 +391,22 @@ nsTextServicesDocument::InitWithEditor(nsIEditor *aEditor)
|
|||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextServicesDocument::GetDocument(nsIDOMDocument **aDoc)
|
||||
{
|
||||
if (!aDoc)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
*aDoc = nsnull; // init out param
|
||||
if (!mDOMDocument)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
*aDoc = mDOMDocument;
|
||||
NS_ADDREF(*aDoc);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextServicesDocument::SetFilter(nsITextServicesFilter *aFilter)
|
||||
{
|
||||
|
|
|
@ -128,6 +128,7 @@ public:
|
|||
/* nsITextServicesDocument method implementations. */
|
||||
NS_IMETHOD InitWithDocument(nsIDOMDocument *aDOMDocument, nsIPresShell *aPresShell);
|
||||
NS_IMETHOD InitWithEditor(nsIEditor *aEditor);
|
||||
NS_IMETHOD GetDocument(nsIDOMDocument **aDoc);
|
||||
NS_IMETHOD SetFilter(nsITextServicesFilter *aFilter);
|
||||
NS_IMETHOD CanEdit(PRBool *aCanEdit);
|
||||
NS_IMETHOD GetCurrentTextBlock(nsString *aStr);
|
||||
|
|
Загрузка…
Ссылка в новой задаче