~ubuntu-branches/ubuntu/raring/wxwidgets2.8/raring

« back to all changes in this revision

Viewing changes to src/richtext/richtextxml.cpp

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2012-06-02 12:33:00 UTC
  • mfrom: (5.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20120602123300-cmj36sgxk0zi6k0h
Tags: 2.8.12.1-11ubuntu1
* Merge from Debian unstable. Remaining changes:
  - debian/rules: re-enable mediactrl. This allows libwx_gtk2u_media-2.8 to be
    built, as this is required by some applications (LP: #632984)
  - debian/control:
    - Build-dep on libxt-dev, libgstreamer-plugins-base0.10-dev,
      and libgconf2-dev for mediactrl.
    - Add conflict on python-wxgtk2.8 (<< 2.8.12.1-6ubuntu1~) to
      python-wxversion to guarantee upgrade ordering when moving from
      pycentral to dh_python2.
* Drop fix-bashism-in-example.patch. (LP: #1005609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
861
861
    wxRichTextListStyleDefinition* listDef = wxDynamicCast(def, wxRichTextListStyleDefinition);
862
862
 
863
863
    wxString baseStyle = def->GetBaseStyle();
864
 
    wxString baseStyleProp;
 
864
    wxString baseStyleProp = wxT(" name=\"") + AttributeToXML(def->GetName()) + wxT("\"");
865
865
    if (!baseStyle.IsEmpty())
866
 
        baseStyleProp = wxT(" basestyle=\"") + baseStyle + wxT("\"");
 
866
        baseStyleProp = wxT(" basestyle=\"") + AttributeToXML(baseStyle) + wxT("\"");
867
867
 
868
868
    wxString descr = def->GetDescription();
869
869
    wxString descrProp;
870
870
    if (!descr.IsEmpty())
871
 
        descrProp = wxT(" description=\"") + descr + wxT("\"");
 
871
        descrProp = wxT(" description=\"") + AttributeToXML(descr) + wxT("\"");
872
872
 
873
873
    if (charDef)
874
874
    {
895
895
        OutputIndentation(stream, level);
896
896
 
897
897
        if (!listDef->GetNextStyle().IsEmpty())
898
 
            baseStyleProp << wxT(" nextstyle=\"") << listDef->GetNextStyle() << wxT("\"");
 
898
            baseStyleProp << wxT(" nextstyle=\"") << AttributeToXML(listDef->GetNextStyle()) << wxT("\"");
899
899
 
900
900
        OutputString(stream, wxT("<liststyle") + baseStyleProp + descrProp + wxT(">"), convMem, convFile);
901
901
 
936
936
        OutputIndentation(stream, level);
937
937
 
938
938
        if (!paraDef->GetNextStyle().IsEmpty())
939
 
            baseStyleProp << wxT(" nextstyle=\"") << paraDef->GetNextStyle() << wxT("\"");
 
939
            baseStyleProp << wxT(" nextstyle=\"") << AttributeToXML(paraDef->GetNextStyle()) << wxT("\"");
940
940
 
941
941
        OutputString(stream, wxT("<paragraphstyle") + baseStyleProp + descrProp + wxT(">"), convMem, convFile);
942
942
 
990
990
            str << wxT(" fontunderlined=\"") << (int) attr.GetFont().GetUnderlined() << wxT("\"");
991
991
 
992
992
        if (attr.HasFontFaceName())
993
 
            str << wxT(" fontface=\"") << attr.GetFont().GetFaceName() << wxT("\"");
 
993
            str << wxT(" fontface=\"") << AttributeToXML(attr.GetFont().GetFaceName()) << wxT("\"");
994
994
    }
995
995
 
996
996
    if (attr.HasTextEffects())
1005
1005
    }
1006
1006
 
1007
1007
    if (!attr.GetCharacterStyleName().empty())
1008
 
        str << wxT(" characterstyle=\"") << wxString(attr.GetCharacterStyleName()) << wxT("\"");
 
1008
        str << wxT(" characterstyle=\"") << AttributeToXML(attr.GetCharacterStyleName()) << wxT("\"");
1009
1009
 
1010
1010
    if (attr.HasURL())
1011
1011
        str << wxT(" url=\"") << AttributeToXML(attr.GetURL()) << wxT("\"");
1046
1046
            if (!attr.GetBulletText().IsEmpty() && (attr.GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_SYMBOL))
1047
1047
                str << wxT(" bulletsymbol=\"") << (int) (attr.GetBulletText()[0]) << wxT("\"");
1048
1048
            else
1049
 
                str << wxT(" bullettext=\"") << attr.GetBulletText() << wxT("\"");
 
1049
                str << wxT(" bullettext=\"") << AttributeToXML(attr.GetBulletText()) << wxT("\"");
1050
1050
 
1051
 
            str << wxT(" bulletfont=\"") << attr.GetBulletFont() << wxT("\"");
 
1051
            str << wxT(" bulletfont=\"") << AttributeToXML(attr.GetBulletFont()) << wxT("\"");
1052
1052
        }
1053
1053
 
1054
1054
        if (attr.HasBulletName())
1055
 
            str << wxT(" bulletname=\"") << attr.GetBulletName() << wxT("\"");
 
1055
            str << wxT(" bulletname=\"") << AttributeToXML(attr.GetBulletName()) << wxT("\"");
1056
1056
 
1057
1057
        if (!attr.GetParagraphStyleName().empty())
1058
 
            str << wxT(" parstyle=\"") << wxString(attr.GetParagraphStyleName()) << wxT("\"");
 
1058
            str << wxT(" parstyle=\"") << AttributeToXML(attr.GetParagraphStyleName()) << wxT("\"");
1059
1059
 
1060
1060
        if (!attr.GetListStyleName().empty())
1061
 
            str << wxT(" liststyle=\"") << wxString(attr.GetListStyleName()) << wxT("\"");
 
1061
            str << wxT(" liststyle=\"") << AttributeToXML(attr.GetListStyleName()) << wxT("\"");
1062
1062
 
1063
1063
        if (attr.HasTabs())
1064
1064
        {