Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /src/Exporters.cxx [a8f970] .. [f3900b] Maximize Restore

  Switch to unified view

a/src/Exporters.cxx b/src/Exporters.cxx
...
...
176
    if (tabSize == 0)
176
    if (tabSize == 0)
177
        tabSize = 4;
177
        tabSize = 4;
178
178
179
    FILE *fp = saveName.Open(GUI_TEXT("wt"));
179
    FILE *fp = saveName.Open(GUI_TEXT("wt"));
180
    if (fp) {
180
    if (fp) {
181
        char styles[STYLE_DEFAULT + 1][MAX_STYLEDEF];
181
        char styles[STYLE_MAX + 1][MAX_STYLEDEF];
182
        char fonts[STYLE_DEFAULT + 1][MAX_FONTDEF];
182
        char fonts[STYLE_MAX + 1][MAX_FONTDEF];
183
        char colors[STYLE_DEFAULT + 1][MAX_COLORDEF];
183
        char colors[STYLE_MAX + 1][MAX_COLORDEF];
184
        char lastStyle[MAX_STYLEDEF], deltaStyle[MAX_STYLEDEF];
184
        char lastStyle[MAX_STYLEDEF], deltaStyle[MAX_STYLEDEF];
185
        int fontCount = 1, colorCount = 2, i;
185
        int fontCount = 1, colorCount = 2, i;
186
        fputs(RTF_HEADEROPEN RTF_FONTDEFOPEN, fp);
186
        fputs(RTF_HEADEROPEN RTF_FONTDEFOPEN, fp);
187
        strncpy(fonts[0], defaultStyle.font.c_str(), MAX_FONTDEF);
187
        strncpy(fonts[0], defaultStyle.font.c_str(), MAX_FONTDEF);
188
        fprintf(fp, RTF_FONTDEF, 0, characterset, defaultStyle.font.c_str());
188
        fprintf(fp, RTF_FONTDEF, 0, characterset, defaultStyle.font.c_str());
189
        strncpy(colors[0], defaultStyle.fore.c_str(), MAX_COLORDEF);
189
        strncpy(colors[0], defaultStyle.fore.c_str(), MAX_COLORDEF);
190
        strncpy(colors[1], defaultStyle.back.c_str(), MAX_COLORDEF);
190
        strncpy(colors[1], defaultStyle.back.c_str(), MAX_COLORDEF);
191
191
192
        for (int istyle = 0; istyle < STYLE_DEFAULT; istyle++) {
192
        for (int istyle = 0; istyle <= STYLE_MAX; istyle++) {
193
            sprintf(key, "style.*.%0d", istyle);
193
            sprintf(key, "style.*.%0d", istyle);
194
            char *valdef = StringDup(props.GetExpanded(key).c_str());
194
            char *valdef = StringDup(props.GetExpanded(key).c_str());
195
            sprintf(key, "style.%s.%0d", language.c_str(), istyle);
195
            sprintf(key, "style.%s.%0d", language.c_str(), istyle);
196
            char *val = StringDup(props.GetExpanded(key).c_str());
196
            char *val = StringDup(props.GetExpanded(key).c_str());
197
197
...
...
274
        TextReader acc(wEditor);
274
        TextReader acc(wEditor);
275
        int column = 0;
275
        int column = 0;
276
        for (i = start; i < end; i++) {
276
        for (i = start; i < end; i++) {
277
            char ch = acc[i];
277
            char ch = acc[i];
278
            int style = acc.StyleAt(i);
278
            int style = acc.StyleAt(i);
279
            if (style > STYLE_DEFAULT)
279
            if (style > STYLE_MAX)
280
                style = 0;
280
                style = 0;
281
            if (style != styleCurrent) {
281
            if (style != styleCurrent) {
282
                GetRTFStyleChange(deltaStyle, lastStyle, styles[style]);
282
                GetRTFStyleChange(deltaStyle, lastStyle, styles[style]);
283
                if (*deltaStyle)
283
                if (*deltaStyle)
284
                    fputs(deltaStyle, fp);
284
                    fputs(deltaStyle, fp);