XML output corrections

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@66422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2010-12-21 11:12:53 +00:00
parent 0d7f162955
commit 83ef06d42e

View File

@@ -294,7 +294,7 @@ bool wxRichTextXMLHandler::ImportStyleDefinition(wxRichTextStyleSheet* sheet, wx
if (child->GetName() == wxT("style")) if (child->GetName() == wxT("style"))
{ {
wxTextAttrEx attr; wxTextAttrEx attr;
GetStyle(attr, child, false); GetStyle(attr, child, true);
def->SetStyle(attr); def->SetStyle(attr);
} }
child = child->GetNext(); child = child->GetNext();
@@ -316,7 +316,7 @@ bool wxRichTextXMLHandler::ImportStyleDefinition(wxRichTextStyleSheet* sheet, wx
if (child->GetName() == wxT("style")) if (child->GetName() == wxT("style"))
{ {
wxTextAttrEx attr; wxTextAttrEx attr;
GetStyle(attr, child, false); GetStyle(attr, child, true);
wxString styleLevel = child->GetPropVal(wxT("level"), wxEmptyString); wxString styleLevel = child->GetPropVal(wxT("level"), wxEmptyString);
if (styleLevel.IsEmpty()) if (styleLevel.IsEmpty())
@@ -895,13 +895,13 @@ bool wxRichTextXMLHandler::ExportStyleDefinition(wxOutputStream& stream, wxMBCon
OutputIndentation(stream, level); OutputIndentation(stream, level);
if (!listDef->GetNextStyle().IsEmpty()) if (!listDef->GetNextStyle().IsEmpty())
baseStyleProp << wxT(" basestyle=\"") << listDef->GetNextStyle() << wxT("\""); baseStyleProp << wxT(" nextstyle=\"") << listDef->GetNextStyle() << wxT("\"");
OutputString(stream, wxT("<liststyle") + baseStyleProp + descrProp + wxT(">"), convMem, convFile); OutputString(stream, wxT("<liststyle") + baseStyleProp + descrProp + wxT(">"), convMem, convFile);
level ++; level ++;
wxString style = CreateStyle(def->GetStyle(), false); wxString style = CreateStyle(def->GetStyle(), true);
OutputIndentation(stream, level); OutputIndentation(stream, level);
OutputString(stream, wxT("<style ") + style + wxT(">"), convMem, convFile); OutputString(stream, wxT("<style ") + style + wxT(">"), convMem, convFile);
@@ -915,7 +915,7 @@ bool wxRichTextXMLHandler::ExportStyleDefinition(wxOutputStream& stream, wxMBCon
wxRichTextAttr* levelAttr = listDef->GetLevelAttributes(i); wxRichTextAttr* levelAttr = listDef->GetLevelAttributes(i);
if (levelAttr) if (levelAttr)
{ {
wxString style = CreateStyle(def->GetStyle(), false); wxString style = CreateStyle(*levelAttr, true);
wxString levelStr = wxString::Format(wxT(" level=\"%d\" "), (i+1)); wxString levelStr = wxString::Format(wxT(" level=\"%d\" "), (i+1));
OutputIndentation(stream, level); OutputIndentation(stream, level);
@@ -936,7 +936,7 @@ bool wxRichTextXMLHandler::ExportStyleDefinition(wxOutputStream& stream, wxMBCon
OutputIndentation(stream, level); OutputIndentation(stream, level);
if (!paraDef->GetNextStyle().IsEmpty()) if (!paraDef->GetNextStyle().IsEmpty())
baseStyleProp << wxT(" basestyle=\"") << paraDef->GetNextStyle() << wxT("\""); baseStyleProp << wxT(" nextstyle=\"") << paraDef->GetNextStyle() << wxT("\"");
OutputString(stream, wxT("<paragraphstyle") + baseStyleProp + descrProp + wxT(">"), convMem, convFile); OutputString(stream, wxT("<paragraphstyle") + baseStyleProp + descrProp + wxT(">"), convMem, convFile);