From 252fd7e77b0a820b7994084dffe81a0c4a42049d Mon Sep 17 00:00:00 2001 From: Joshua Richardson Date: Fri, 24 Jun 2011 10:14:17 -0700 Subject: [PATCH] Remove spurious spans and add space before ending single tags, e.g. "
" so that IE is happy! :-) --- utils/HtmlFonts.cc | 15 --------------- utils/HtmlFonts.h | 1 - utils/HtmlOutputDev.cc | 14 ++------------ 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc index 3719db6..3c7787c 100755 --- a/utils/HtmlFonts.cc +++ b/utils/HtmlFonts.cc @@ -297,21 +297,6 @@ int HtmlFontAccu::AddFont(const HtmlFont& font){ return (accu->size()-1); } -// get CSS font name for font #i -GooString* HtmlFontAccu::getCSStyle(GooString* content){ - GooString *tmp; - - if (!xml) { - tmp = new GooString(""); - tmp->append(content); - tmp->append(""); - } else { - tmp = new GooString(""); - tmp->append(content); - } - return tmp; -} - // get CSS font definition for font #i GooString* HtmlFontAccu::CSStyle(int i, int j){ GooString *tmp=new GooString(); diff --git a/utils/HtmlFonts.h b/utils/HtmlFonts.h index ee50070..5d189da 100755 --- a/utils/HtmlFonts.h +++ b/utils/HtmlFonts.h @@ -111,7 +111,6 @@ public: HtmlFont *Get(int i){ return &(*accu)[i]; } - GooString* getCSStyle (GooString* content); GooString* CSStyle(int i, int j = 0); int size() const {return accu->size();} diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc index 2148775..7bc6b56 100755 --- a/utils/HtmlOutputDev.cc +++ b/utils/HtmlOutputDev.cc @@ -746,17 +746,12 @@ void HtmlPage::dumpAsXML(FILE* f,int page){ delete fontCSStyle; } - GooString *str, *str1 = NULL; for(HtmlString *tmp=yxStrings;tmp;tmp=tmp->yxNext){ if (tmp->htext){ - str=new GooString(tmp->htext); fprintf(f,"yMin),xoutRound(tmp->xMin)); fprintf(f,"width=\"%d\" height=\"%d\" ",xoutRound(tmp->xMax-tmp->xMin),xoutRound(tmp->yMax-tmp->yMin)); fprintf(f,"font=\"%d\">", tmp->fontpos); - str1=fonts->getCSStyle(str); - fputs(str1->getCString(),f); - delete str; - delete str1; + fputs(tmp->htext->getCString(),f); fputs("\n",f); } } @@ -850,10 +845,8 @@ void HtmlPage::dumpComplex(FILE *file, int page){ delete tmp; - GooString *str, *str1 = NULL; for(HtmlString *tmp1=yxStrings;tmp1;tmp1=tmp1->yxNext){ if (tmp1->htext){ - str=new GooString(tmp1->htext); fprintf(pageFile, "

yMin), @@ -863,10 +856,7 @@ void HtmlPage::dumpComplex(FILE *file, int page){ else fprintf(pageFile, "%d", page); fprintf(pageFile,"%d\">",tmp1->fontpos); - str1=fonts->getCSStyle(str); - fputs(str1->getCString(),pageFile); - delete str; - delete str1; + fputs(tmp1->htext->getCString(),pageFile); fputs("

\n",pageFile); } } -- 1.7.4.1