bool wxRichTextHTMLHandler::CanHandle(const wxString& filename) const
{
wxString path, file, ext;
- wxSplitPath(filename, & path, & file, & ext);
+ wxFileName::SplitPath(filename, & path, & file, & ext);
return (ext.Lower() == wxT("html") || ext.Lower() == wxT("htm"));
}
}
wxRichTextImage* image = wxDynamicCast(obj, wxRichTextImage);
- if( image && !image->IsEmpty())
+ if( image && (!image->IsEmpty() || image->GetImageBlock().GetData()))
WriteImage( image, stream );
node2 = node2->GetNext();
int listType = TypeOfList(thisStyle, tag);
m_listTypes.Add(listType);
- wxString align = GetAlignment(thisStyle);
- str << wxString::Format(wxT("<p align=\"%s\">"), align.c_str());
+ // wxHTML needs an extra <p> before a list when using <p> ... </p> in previous paragraphs.
+ // TODO: pass a flag that indicates we're using wxHTML.
+ str << wxT("<p>\n");
str << tag;
}
stream << wxT("</td></tr></table></p>\n");
m_inTable = false;
}
- else
+ else if (!thisStyle.HasBulletStyle())
stream << wxT("</p>\n");
}