Added ApplyStyleSheet() method to the various editor interfaces.
git-svn-id: svn://10.0.0.236/trunk@37845 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -90,7 +90,6 @@
|
||||
#include "nsITransferable.h"
|
||||
#include "nsISupportsArray.h"
|
||||
|
||||
|
||||
/* Define Class IDs */
|
||||
static NS_DEFINE_IID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID);
|
||||
static NS_DEFINE_IID(kEditorAppCoreCID, NS_EDITORAPPCORE_CID);
|
||||
@@ -616,6 +615,35 @@ NS_IMETHODIMP nsEditorShell::SetBackgroundColor(const PRUnichar *color)
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsEditorShell::ApplyStyleSheet(const PRUnichar *url)
|
||||
{
|
||||
nsresult result = NS_NOINTERFACE;
|
||||
|
||||
nsAutoString aURL(url);
|
||||
|
||||
switch (mEditorType)
|
||||
{
|
||||
case ePlainTextEditorType:
|
||||
{
|
||||
nsCOMPtr<nsITextEditor> textEditor = do_QueryInterface(mEditor);
|
||||
if (textEditor)
|
||||
result = textEditor->ApplyStyleSheet(aURL);
|
||||
}
|
||||
break;
|
||||
case eHTMLTextEditorType:
|
||||
{
|
||||
nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(mEditor);
|
||||
if (htmlEditor)
|
||||
result = htmlEditor->ApplyStyleSheet(aURL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
result = NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsEditorShell::SetBodyAttribute(const PRUnichar *attr, const PRUnichar *value)
|
||||
{
|
||||
nsresult result = NS_NOINTERFACE;
|
||||
|
||||
Reference in New Issue
Block a user