mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
Ender reload and new toolbar code
This commit is contained in:
parent
157a586f8c
commit
465c5b414a
@ -1809,6 +1809,21 @@ EDT_ClipboardResult EDT_SetDefaultText( MWContext *pContext, char *pText ) {
|
||||
}
|
||||
return EDT_COP_DOCUMENT_BUSY;
|
||||
}
|
||||
|
||||
EDT_ClipboardResult EDT_SetDefaultHTML( MWContext *pContext, char *pHTML ) {
|
||||
CEditBuffer* pEditBuffer = LO_GetEDBuffer( pContext );
|
||||
if (pEditBuffer && pHTML)
|
||||
{
|
||||
if (!CEditBuffer::IsAlive(pEditBuffer) || !pEditBuffer->IsReady() || !pEditBuffer->IsWritable() )
|
||||
{ //set up the default data for finishedload2
|
||||
pEditBuffer->m_pImportedHTMLStream=XP_STRDUP(pHTML);
|
||||
return EDT_COP_OK;
|
||||
}
|
||||
else
|
||||
return EDT_PasteHTML(pContext,pHTML,ED_PASTE_NORMAL);
|
||||
}
|
||||
return EDT_COP_DOCUMENT_BUSY;
|
||||
}
|
||||
#endif //ENDER
|
||||
|
||||
EDT_ClipboardResult EDT_PasteQuoteBegin( MWContext *pContext, XP_Bool bHTML ) {
|
||||
|
@ -3059,6 +3059,7 @@ public:
|
||||
char *m_pBodyExtra;
|
||||
#ifdef ENDER
|
||||
char *m_pImportedStream; //dont forget to XP_FREE this memory //ENDER
|
||||
char *m_pImportedHTMLStream; //dont forget to XP_FREE this memory //ENDER
|
||||
#endif //ENDER
|
||||
CEditImageLoader *m_pLoadingImage;
|
||||
CFileSaveObject *m_pSaveObject;
|
||||
|
@ -1526,6 +1526,7 @@ CEditBuffer::CEditBuffer(MWContext *pContext, XP_Bool bImportText):
|
||||
m_pBodyExtra(0),
|
||||
#ifdef ENDER
|
||||
m_pImportedStream(0), //ENDER
|
||||
m_pImportedHTMLStream(0), //ENDER
|
||||
#endif //ENDER
|
||||
m_pLoadingImage(0),
|
||||
m_pSaveObject(0),
|
||||
@ -10216,7 +10217,22 @@ void CEditBuffer::FinishedLoad2()
|
||||
|
||||
m_pCreationCursor = NULL;
|
||||
|
||||
// protect empty SOME empty lines! //i.e. list items with nothing in their containers
|
||||
#ifdef ENDER
|
||||
XP_Bool isEmbedded = FALSE;
|
||||
if (m_pImportedHTMLStream && XP_STRLEN(m_pImportedHTMLStream))//ENDER
|
||||
{
|
||||
char *t_ptr=m_pImportedHTMLStream;
|
||||
m_pImportedHTMLStream = NULL;
|
||||
if (m_pImportedStream)
|
||||
{
|
||||
XP_FREE(m_pImportedStream);
|
||||
m_pImportedStream=NULL;
|
||||
}
|
||||
ReadFromBuffer(t_ptr);
|
||||
return;
|
||||
}
|
||||
#endif //ENDER
|
||||
// protect empty SOME empty lines! //i.e. list items with nothing in their containers
|
||||
Protect( m_pRoot );
|
||||
// Get rid of empty items.
|
||||
Reduce( m_pRoot );
|
||||
@ -10276,8 +10292,7 @@ void CEditBuffer::FinishedLoad2()
|
||||
&& !GetCommandLog()->InReload();
|
||||
|
||||
#if ENDER
|
||||
XP_Bool isEmbedded = FALSE;
|
||||
if (m_pImportedStream)//ENDER
|
||||
if (m_pImportedStream && (!m_pImportedHTMLStream || !XP_STRLEN(m_pImportedHTMLStream)) )//ENDER
|
||||
{
|
||||
isEmbedded = TRUE;
|
||||
PasteText( m_pImportedStream, FALSE, FALSE, TRUE ,TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user