diff options
Diffstat (limited to 'hwpfilter/source/formula.cxx')
-rw-r--r-- | hwpfilter/source/formula.cxx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx index ec44f7d0ad74..c1903e27f83a 100644 --- a/hwpfilter/source/formula.cxx +++ b/hwpfilter/source/formula.cxx @@ -41,7 +41,6 @@ extern std::list<Node*> nodelist; #include "hcode.h" -static hchar entity[32]; #define ascii(x) OUString::createFromAscii(x) #define rstartEl(x,y) do { if (m_rxDocumentHandler.is()) m_rxDocumentHandler->startElement(x,y); } while(0) #define rendEl(x) do { if (m_rxDocumentHandler.is()) m_rxDocumentHandler->endElement(x); } while(0) @@ -50,7 +49,6 @@ static hchar entity[32]; #define reucstr(x,y) do { if (m_rxDocumentHandler.is()) m_rxDocumentHandler->characters(OUString(x,y, RTL_TEXTENCODING_EUC_KR)); } while(0) #define padd(x,y,z) pList->addAttribute(x,y,z) #else -static char entity[32]; static int indent = 0; #define inds indent++; for(int i = 0 ; i < indent ; i++) fprintf(stderr," ") #define inde for(int i = 0 ; i < indent ; i++) fprintf(stderr," "); indent-- @@ -231,11 +229,12 @@ void Formula::makeIdentifier(Node *res) case ID_IDENTIFIER : #ifdef DEBUG inds; - fprintf(stderr,"<math:mi>%s</math:mi>\n",getMathMLEntity(tmp->value, entity)); + fprintf(stderr,"<math:mi>%s</math:mi>\n", + getMathMLEntity(tmp->value).c_str()); indo; #else rstartEl(ascii("math:mi"), rList); - runistr(getMathMLEntity(tmp->value, entity)); + runistr(getMathMLEntity(tmp->value).c_str()); rendEl(ascii("math:mi")); #endif break; @@ -257,7 +256,7 @@ void Formula::makeIdentifier(Node *res) inds; fprintf(stderr,"<math:mo>%s</math:mo>\n",tmp->value); indo; #else rstartEl(ascii("math:mo"), rList); - runistr(getMathMLEntity(tmp->value,entity)); + runistr(getMathMLEntity(tmp->value).c_str()); rendEl(ascii("math:mo")); #endif break; @@ -413,11 +412,12 @@ void Formula::makeDecoration(Node *res) #ifdef DEBUG inds; - fprintf(stderr,"<math:mo>%s</math:mo>\n", getMathMLEntity(tmp->value,entity)); + fprintf(stderr,"<math:mo>%s</math:mo>\n", + getMathMLEntity(tmp->value).c_str()); indo; #else rstartEl(ascii("math:mo"), rList); - runistr(getMathMLEntity(tmp->value,entity)); + runistr(getMathMLEntity(tmp->value).c_str()); rendEl(ascii("math:mo")); #endif @@ -538,11 +538,14 @@ void Formula::makeFence(Node *res) Node *tmp = res->child; #ifdef DEBUG inds; - fprintf(stderr,"<math:mfenced open=\"%s\" close=\"%s\">\n",getMathMLEntity(tmp->value, entity), - getMathMLEntity(tmp->next->next->value,entity)); + fprintf(stderr,"<math:mfenced open=\"%s\" close=\"%s\">\n", + getMathMLEntity(tmp->value).c_str(), + getMathMLEntity(tmp->next->next->value).c_str()); #else - padd(ascii("open"), ascii("CDATA"), OUString(getMathMLEntity(tmp->value,entity)) ); - padd(ascii("close"), ascii("CDATA"), OUString(getMathMLEntity(tmp->next->next->value,entity)) ); + padd(ascii("open"), ascii("CDATA"), + OUString(getMathMLEntity(tmp->value).c_str()) ); + padd(ascii("close"), ascii("CDATA"), + OUString(getMathMLEntity(tmp->next->next->value).c_str()) ); rstartEl(ascii("math:mfenced"), rList); pList->clear(); #endif |