You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/08/20 13:46:47 UTC

svn commit: r1374979 [19/29] - in /incubator/ooo/branches/writer001: ./ ext_libraries/apr-util/ ext_libraries/apr-util/prj/ ext_libraries/apr/ ext_libraries/coinmp/ ext_libraries/hunspell/ ext_libraries/serf/ ext_libraries/serf/prj/ ext_sources/ extras...

Modified: incubator/ooo/branches/writer001/main/hwpfilter/source/hwpreader.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/hwpfilter/source/hwpreader.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/hwpfilter/source/hwpreader.cxx (original)
+++ incubator/ooo/branches/writer001/main/hwpfilter/source/hwpreader.cxx Mon Aug 20 11:46:19 2012
@@ -23,9 +23,13 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_hwpfilter.hxx"
+#define NOMINMAX
 
 #include "hwpreader.hxx"
 #include <math.h>
+
+#include <comphelper/newarray.hxx>
+
 //#ifndef UDK100
 #include "formula.h"
 #include "cspline.h"
@@ -41,7 +45,7 @@ extern int getRepFamilyName(const char* 
 #endif
 
 // To be shorten source code by realking
-#define hconv(x,y) OUString(hstr2ucsstr(x,y))
+#define hconv(x)        OUString(hstr2ucsstr(x).c_str())
 #define ascii(x)        OUString::createFromAscii(x)
 #define rstartEl(x,y)   rDocumentHandler->startElement(x,y)
 #define rendEl(x)       rDocumentHandler->endElement(x)
@@ -74,8 +78,6 @@ extern int getRepFamilyName(const char* 
     rendEl(ascii("text:span")); \
     tstart = false
 
-static hchar gstr[1024];
-static hchar sbuf[256];
 static hchar *field = 0L;
 static char buf[1024];
 
@@ -281,21 +283,21 @@ void HwpReader::makeMeta()
     if (hwpinfo->summary.title[0])
     {
         rstartEl(ascii("dc:title"), rList);
-        rchars((hconv(hwpinfo->summary.title, gstr)));
+        rchars((hconv(hwpinfo->summary.title)));
         rendEl(ascii("dc:title"));
     }
 
     if (hwpinfo->summary.subject[0])
     {
         rstartEl(ascii("dc:subject"), rList);
-        rchars((hconv(hwpinfo->summary.subject, gstr)));
+        rchars((hconv(hwpinfo->summary.subject)));
         rendEl(ascii("dc:subject"));
     }
 
     if (hwpinfo->summary.author[0])
     {
         rstartEl(ascii("meta:initial-creator"), rList);
-        rchars((hconv(hwpinfo->summary.author, gstr)));
+        rchars((hconv(hwpinfo->summary.author)));
         rendEl(ascii("meta:initial-creator"));
     }
 
@@ -372,31 +374,31 @@ void HwpReader::makeMeta()
         if (hwpinfo->summary.keyword[0][0])
         {
             rstartEl(ascii("meta:keyword"), rList);
-            rchars((hconv(hwpinfo->summary.keyword[0], gstr)));
+            rchars((hconv(hwpinfo->summary.keyword[0])));
             rendEl(ascii("meta:keyword"));
         }
         if (hwpinfo->summary.keyword[1][0])
         {
             rstartEl(ascii("meta:keyword"), rList);
-            rchars((hconv(hwpinfo->summary.keyword[1], gstr)));
+            rchars((hconv(hwpinfo->summary.keyword[1])));
             rendEl(ascii("meta:keyword"));
         }
         if (hwpinfo->summary.etc[0][0])
         {
             rstartEl(ascii("meta:keyword"), rList);
-            rchars((hconv(hwpinfo->summary.etc[0], gstr)));
+            rchars((hconv(hwpinfo->summary.etc[0])));
             rendEl(ascii("meta:keyword"));
         }
         if (hwpinfo->summary.etc[1][0])
         {
             rstartEl(ascii("meta:keyword"), rList);
-            rchars((hconv(hwpinfo->summary.etc[1], gstr)));
+            rchars((hconv(hwpinfo->summary.etc[1])));
             rendEl(ascii("meta:keyword"));
         }
         if (hwpinfo->summary.etc[2][0])
         {
             rstartEl(ascii("meta:keyword"), rList);
-            rchars((hconv(hwpinfo->summary.etc[2], gstr)));
+            rchars((hconv(hwpinfo->summary.etc[2])));
             rendEl(ascii("meta:keyword"));
         }
         rendEl(ascii("meta:keywords"));
@@ -405,7 +407,7 @@ void HwpReader::makeMeta()
     padd(ascii("meta:name"), sXML_CDATA, ascii("BBSID"));
     rstartEl(ascii("meta:user-defined"), rList);
     pList->clear();
-    rchars((hconv(hwpinfo->summary.etc[2], gstr)));
+    rchars((hconv(hwpinfo->summary.etc[2])));
     rendEl(ascii("meta:user-defined"));
 
     rstartEl(ascii("dc:language"), rList);
@@ -554,7 +556,7 @@ void HwpReader::makeDrawMiscStyle( HWPDr
                 if( !prop->pictype )
                 {
                     padd( ascii("xlink:href"), sXML_CDATA,
-                        hconv(kstr2hstr( (uchar *)urltounix(prop->szPatternFile, buf), sbuf), gstr));
+                        hconv(kstr2hstr( (uchar *)urltounix(prop->szPatternFile).c_str()).c_str()));
                 }
                 else                              /* ÀÓº£µðµå image·Î¼­ ÆÄÀÏ·Î ÀúÀåÇØ¾ß ÇÑ´Ù. */
                 {
@@ -563,7 +565,7 @@ void HwpReader::makeDrawMiscStyle( HWPDr
                         emp = hwpfile.GetEmPictureByName(prop->szPatternFile);
                     if( emp )
                     {
-                        char filename[128];
+                        char filename[128+17+9];
                         char dirname[128];
                         int fd, res;
 #ifdef _WIN32
@@ -596,7 +598,7 @@ void HwpReader::makeDrawMiscStyle( HWPDr
                     else
                     {
                         padd( ascii("xlink:href"), sXML_CDATA,
-                            hconv(kstr2hstr( (uchar *)urltounix(prop->szPatternFile, buf), sbuf), gstr));
+                            hconv(kstr2hstr( (uchar *)urltounix(prop->szPatternFile).c_str()).c_str()));
                     }
 
                 }
@@ -777,7 +779,7 @@ void HwpReader::makeStyles()
     for (int ii = 0; ii < hwpstyle->Num(); ii++)
     {
         unsigned char *stylename = (unsigned char *) hwpstyle->GetName(ii);
-        padd(ascii("style:name"), sXML_CDATA, (hconv(kstr2hstr(stylename, sbuf), gstr)));
+        padd(ascii("style:name"), sXML_CDATA, (hconv(kstr2hstr(stylename).c_str())));
         padd(ascii("style:family"), sXML_CDATA, ascii("paragraph"));
         padd(ascii("style:parent-style-name"), sXML_CDATA, ascii("Standard"));
 
@@ -995,7 +997,7 @@ void HwpReader::makeMasterStyles()
 
     int i;
     int nMax = hwpfile.getMaxSettedPage();
-    PageSetting *pSet = new PageSetting[nMax + 1];
+    PageSetting *const pSet = ::comphelper::newArray_ex<PageSetting>(nMax + 1);
 
     for( i = 0 ; i < hwpfile.getPageNumberCount() ; i++ )
     {
@@ -1377,10 +1379,10 @@ void HwpReader::parseCharShape(CharShape
     padd(ascii("style:font-size-asian"), sXML_CDATA,
         ascii(Int2Str(cshape->size / 25, "%dpt", buf)));
 
-    char tmp[128];
-    hstr2ksstr(kstr2hstr((unsigned char *) hwpfont->GetFontName(0, cshape->font[0]), sbuf), tmp);
+    ::std::string const tmp = hstr2ksstr(kstr2hstr(
+        (unsigned char *) hwpfont->GetFontName(0, cshape->font[0])).c_str());
     double fRatio = 1.0;
-    int size = getRepFamilyName(tmp,buf, fRatio);
+    int size = getRepFamilyName(tmp.c_str(), buf, fRatio);
 
     padd(ascii("fo:font-family"), sXML_CDATA,
         OUString(buf, size, RTL_TEXTENCODING_EUC_KR));
@@ -1761,10 +1763,10 @@ void HwpReader::makePageStyle()
 			 if( hwpinfo->back_info.type == 1 ){
 #ifdef _WIN32
 				 padd(ascii("xlink:href"), sXML_CDATA,
-					  hconv(kstr2hstr((uchar *) urltowin(hwpinfo->back_info.filename, buf), sbuf), gstr));
+                      hconv(kstr2hstr((uchar*) urltowin(hwpinfo->back_info.filename).c_str()).c_str()));
 #else
 				 padd(ascii("xlink:href"), sXML_CDATA,
-					hconv(kstr2hstr( (uchar *)urltounix(hwpinfo->back_info.filename, buf), sbuf), gstr));
+                    hconv(kstr2hstr( (uchar *)urltounix(hwpinfo->back_info.filename).c_str()).c_str()));
 #endif
 				 padd(ascii("xlink:type"), sXML_CDATA, ascii("simple"));
 				 padd(ascii("xlink:actuate"), sXML_CDATA, ascii("onLoad"));
@@ -1924,10 +1926,9 @@ void HwpReader::makeTableStyle(Table *tb
     rendEl(ascii("style:style"));
 
 // --------------- column ---------------- //
-    int i ;
-    for( i = 0 ; i < tbl->columns.nCount -1 ; i++ )
+    for (size_t i = 0 ; i < tbl->columns.nCount -1 ; i++)
     {
-        sprintf(buf,"Table%d.%c",hbox->style.boxnum, 'A'+i);
+        sprintf(buf,"Table%d.%c",hbox->style.boxnum, static_cast<char>('A'+i));
         padd(ascii("style:name"), sXML_CDATA, ascii( buf ));
         padd(ascii("style:family"), sXML_CDATA,ascii("table-column"));
         rstartEl(ascii("style:style"), rList);
@@ -1941,9 +1942,9 @@ void HwpReader::makeTableStyle(Table *tb
     }
 
 // --------------- row ---------------- //
-    for( i = 0 ; i < tbl->rows.nCount -1 ; i++ )
+    for (size_t i = 0 ; i < tbl->rows.nCount -1 ; i++)
     {
-        sprintf(buf,"Table%d.row%d",hbox->style.boxnum, i + 1);
+        sprintf(buf,"Table%d.row%ld",hbox->style.boxnum, i + 1);
         padd(ascii("style:name"), sXML_CDATA, ascii( buf ));
         padd(ascii("style:family"), sXML_CDATA,ascii("table-row"));
         rstartEl(ascii("style:style"), rList);
@@ -1957,7 +1958,7 @@ void HwpReader::makeTableStyle(Table *tb
     }
 
 // --------------- cell --------------------- //
-    for( i = 0 ; i < tbl->cells.count(); i++ )
+    for (int i = 0 ; i < tbl->cells.count(); i++)
     {
         TCell *tcell = tbl->cells.find(i);
         sprintf(buf,"Table%d.%c%d",hbox->style.boxnum, 'A'+ tcell->nColumnIndex, tcell->nRowIndex +1);
@@ -2742,14 +2743,10 @@ char *HwpReader::getPStyleName(int index
 }
 
 
-//void HwpReader::makeChars(char *str, int size)
-void HwpReader::makeChars(hchar *str, int size)
+void HwpReader::makeChars(hchar_string & rStr)
 {
-    if (size)
-    {
-        str[size] = '\0';
-        rchars(OUString(str));
-    }
+    rchars(OUString(rStr.c_str()));
+    rStr.clear();
 }
 
 
@@ -2758,8 +2755,9 @@ void HwpReader::makeChars(hchar *str, in
  */
 void HwpReader::make_text_p0(HWPPara * para, sal_Bool bParaStart)
 {
+    hchar_string str;
     int n;
-    int l = 0, res;
+    int res;
 	 hchar dest[3];
     unsigned char firstspace = 0;
     if( !bParaStart)
@@ -2793,15 +2791,13 @@ void HwpReader::make_text_p0(HWPPara * p
     {
         if (para->hhstr[n]->hh == CH_SPACE && !firstspace)
         {
-            makeChars(gstr, l);
-            l = 0;
+            makeChars(str);
             rstartEl(ascii("text:s"), rList);
             rendEl(ascii("text:s"));
         }
         else if (para->hhstr[n]->hh == CH_END_PARA)
         {
-            makeChars(gstr, l);
-            l = 0;
+            makeChars(str);
             rendEl(ascii("text:span"));
             rendEl(ascii("text:p"));
             break;
@@ -2814,7 +2810,9 @@ void HwpReader::make_text_p0(HWPPara * p
                 firstspace = 1;
 				res = hcharconv(para->hhstr[n]->hh, dest, UNICODE);
 				for( int j = 0 ; j < res; j++ )
-					gstr[l++] =  dest[j];
+                {
+                    str.push_back(dest[j]);
+                }
         }
     }
 }
@@ -2825,8 +2823,9 @@ void HwpReader::make_text_p0(HWPPara * p
  */
 void HwpReader::make_text_p1(HWPPara * para,sal_Bool bParaStart)
 {
+    hchar_string str;
     int n;
-    int l = 0, res;
+    int res;
 	 hchar dest[3];
     int curr = para->cshape.index;
     unsigned char firstspace = 0;
@@ -2863,8 +2862,7 @@ void HwpReader::make_text_p1(HWPPara * p
     {
         if (para->GetCharShape(n)->index != curr)
         {
-            makeChars(gstr, l);
-            l = 0;
+            makeChars(str);
             rendEl(ascii("text:span"));
             curr = para->GetCharShape(n)->index;
             padd(ascii("text:style-name"), sXML_CDATA,
@@ -2874,15 +2872,13 @@ void HwpReader::make_text_p1(HWPPara * p
         }
         if (para->hhstr[n]->hh == CH_SPACE && !firstspace)
         {
-            makeChars(gstr, l);
-            l = 0;
+            makeChars(str);
             rstartEl(ascii("text:s"), rList);
             rendEl(ascii("text:s"));
         }
         else if (para->hhstr[n]->hh == CH_END_PARA)
         {
-            makeChars(gstr, l);
-            l = 0;
+            makeChars(str);
             rendEl(ascii("text:span"));
             rendEl(ascii("text:p"));
             break;
@@ -2897,7 +2893,9 @@ void HwpReader::make_text_p1(HWPPara * p
                 firstspace = 1;
 				res = hcharconv(para->hhstr[n]->hh, dest, UNICODE);
 				for( int j = 0 ; j < res; j++ )
-					gstr[l++] =  dest[j];
+                {
+                    str.push_back(dest[j]);
+                }
         }
     }
 }
@@ -2908,9 +2906,9 @@ void HwpReader::make_text_p1(HWPPara * p
  */
 void HwpReader::make_text_p3(HWPPara * para,sal_Bool bParaStart)
 {
+    hchar_string str;
     int n, res;
 	 hchar dest[3];
-    size_t l = 0;
     unsigned char firstspace = 0;
     bool pstart = bParaStart;
     bool tstart = false;
@@ -2940,12 +2938,11 @@ void HwpReader::make_text_p3(HWPPara * p
     {
         if( para->hhstr[n]->hh == CH_END_PARA )
         {
-            if( l > 0 )
+            if (str.size() > 0)
             {
                 if( !pstart ){ STARTP;}
                 if( !tstart ){ STARTT;}
-                makeChars(gstr, l);
-                l = 0;
+                makeChars(str);
             }
             if( tstart ){ ENDT;}
             if( !pstart ){ STARTP;}
@@ -2956,8 +2953,7 @@ void HwpReader::make_text_p3(HWPPara * p
         {
             if( !pstart ) {STARTP;}
             if( !tstart ) {STARTT;}
-            makeChars(gstr, l);
-            l = 0;
+            makeChars(str);
             rstartEl(ascii("text:s"), rList);
             pList->clear();
             rendEl(ascii("text:s"));
@@ -2969,9 +2965,8 @@ void HwpReader::make_text_p3(HWPPara * p
 					{
 						 if( !pstart ) {STARTP;}
 						 if( !tstart ) {STARTT;}
-						 makeChars(gstr, l);
+                         makeChars(str);
 						 ENDT;
-						 l = 0;
 					}
             if( para->hhstr[n]->hh == CH_SPACE )
                 firstspace = 0;
@@ -2979,7 +2974,9 @@ void HwpReader::make_text_p3(HWPPara * p
                 firstspace = 1;
 				res = hcharconv(para->hhstr[n]->hh, dest, UNICODE);
 				for( int j = 0 ; j < res; j++ )
-					gstr[l++] =  dest[j];
+                {
+                    str.push_back(dest[j]);
+                }
         }
         else if (para->hhstr[n]->hh == CH_FIELD)
         {
@@ -2988,15 +2985,14 @@ void HwpReader::make_text_p3(HWPPara * p
             {
                 if( !pstart ) {STARTP;}
                 if( !tstart ) {STARTT;}
-                makeChars(gstr, l);
-                l = 0;
+                makeChars(str);
                 firstspace = 1;
 					 if( hbox->type[0] == 4 && hbox->type[1] == 0 )
 					 {
 						 field = hbox->str3;
 					 }
 					 else{
-						 makeFieldCode(hbox);
+                         makeFieldCode(str, hbox);
 					 }
                 infield = true;
             }
@@ -3005,12 +3001,11 @@ void HwpReader::make_text_p3(HWPPara * p
                 firstspace = 1;
 					 if( hbox->type[0] == 4 && hbox->type[1] == 0 )
 					 {
-						 gstr[l] = 0;
-						 makeFieldCode(hbox);
+                         makeFieldCode(str, hbox);
 						 field = 0L;
 					 }
                 infield = false;
-                l = 0;
+                str.clear();
             }
         }
         else
@@ -3020,8 +3015,7 @@ void HwpReader::make_text_p3(HWPPara * p
                 case CH_BOOKMARK:
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
-                    makeChars(gstr, l);
-                    l = 0;
+                    makeChars(str);
                     makeBookmark((Bookmark *) para->hhstr[n]);
                     break;
                 case CH_DATE_FORM:                // 7
@@ -3029,17 +3023,15 @@ void HwpReader::make_text_p3(HWPPara * p
                 case CH_DATE_CODE:                // 8
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
-                    makeChars(gstr, l);
-                    l = 0;
+                    makeChars(str);
                     makeDateCode((DateCode *) para->hhstr[n]);
                     break;
                 case CH_TAB:                      // 9
                     if( !pstart ) {STARTP;}
-                    if( l > 0 )
+                    if (str.size() > 0)
                     {
                         if( !tstart ) {STARTT;}
-                        makeChars(gstr, l);
-                        l = 0;
+                        makeChars(str);
                     }
                     makeTab((Tab *) para->hhstr[n]);
                     break;
@@ -3052,17 +3044,15 @@ void HwpReader::make_text_p3(HWPPara * p
                     {
                         if( !pstart ) {STARTP;}
                         if( !tstart ) {STARTT;}
-                        makeChars(gstr, l);
-                        l = 0;
+                        makeChars(str);
                     }
                     else
                     {
                         if( !pstart ) {STARTP;}
-                        if( l > 0 )
+                        if (str.size() > 0)
                         {
                             if( !tstart ) {STARTT;}
-                            makeChars(gstr, l);
-                            l = 0;
+                            makeChars(str);
                         }
                         if( tstart ) {ENDT;}
                     }
@@ -3087,17 +3077,15 @@ void HwpReader::make_text_p3(HWPPara * p
                     {
                         if( !pstart ) {STARTP;}
                         if( !tstart ) {STARTT;}
-                        makeChars(gstr, l);
-                        l = 0;
+                        makeChars(str);
                     }
                     else
                     {
                         if( !pstart ) {STARTP;}
-                        if( l > 0 )
+                        if (str.size() > 0)
                         {
                             if( !tstart ) {STARTT;}
-                            makeChars(gstr, l);
-                            l = 0;
+                            makeChars(str);
                         }
                         if( tstart ) {ENDT;}
                     }
@@ -3107,12 +3095,11 @@ void HwpReader::make_text_p3(HWPPara * p
                 case CH_LINE:                     // 14
                 {
                     Line *hbox = (Line *) para->hhstr[n];
-                    if( l > 0 )
+                    if (str.size() > 0)
                     {
                         if( !pstart ) {STARTP;}
                         if( !tstart ) {STARTT;}
-                        makeChars(gstr, l);
-                        l = 0;
+                        makeChars(str);
                     }
                     if( tstart ) {ENDT;}
                     if( pstart ) {ENDP;}
@@ -3123,22 +3110,19 @@ void HwpReader::make_text_p3(HWPPara * p
                 case CH_HIDDEN:                   // 15
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
-                    makeChars(gstr, l);
-                    l = 0;
+                    makeChars(str);
                     makeHidden((Hidden *) para->hhstr[n]);
                     break;
                 case CH_FOOTNOTE:                 // 17
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
-                    makeChars(gstr, l);
-                    l = 0;
+                    makeChars(str);
                     makeFootnote((Footnote *) para->hhstr[n]);
                     break;
                 case CH_AUTO_NUM:                 // 18
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
-                    makeChars(gstr, l);
-                    l = 0;
+                    makeChars(str);
                     makeAutoNum((AutoNum *) para->hhstr[n]);
                     break;
                 case CH_NEW_NUM:                  // 19 -skip
@@ -3148,8 +3132,7 @@ void HwpReader::make_text_p3(HWPPara * p
                 case CH_MAIL_MERGE:               // 22
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
-                    makeChars(gstr, l);
-                    l = 0;
+                    makeChars(str);
                     makeMailMerge((MailMerge *) para->hhstr[n]);
                     break;
                 case CH_COMPOSE:                  /* 23 - text overlap */
@@ -3159,27 +3142,24 @@ void HwpReader::make_text_p3(HWPPara * p
                 case CH_TOC_MARK:                 /* 25 Following 3 must work. */
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
-                    makeChars(gstr, l);
-                    l = 0;
+                    makeChars(str);
                     makeTocMark((TocMark *) para->hhstr[n]);
                     break;
                 case CH_INDEX_MARK:               // 26
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
-                    makeChars(gstr, l);
-                    l = 0;
+                    makeChars(str);
                     makeIndexMark((IndexMark *) para->hhstr[n]);
                     break;
                 case CH_OUTLINE:                  // 28
                     if( !pstart ) {STARTP;}
                     if( !tstart ) {STARTT;}
-                    makeChars(gstr, l);
-                    l = 0;
+                    makeChars(str);
                     makeOutline((Outline *) para->hhstr[n]);
                     break;
 					 case CH_FIXED_SPACE:
 					 case CH_KEEP_SPACE:
-						  gstr[l++] = 0x0020;
+                          str.push_back(0x0020);
 						  break;
 				}
         }
@@ -3187,108 +3167,108 @@ void HwpReader::make_text_p3(HWPPara * p
 }
 
 
-void HwpReader::makeFieldCode(FieldCode *hbox)
+void HwpReader::makeFieldCode(hchar_string & rStr, FieldCode *hbox)
 {
 /* Nureumteul*/
     if( hbox->type[0] == 4 && hbox->type[1] == 0 )
     {
         padd(ascii("text:placeholder-type"), sXML_CDATA, ascii("text"));
 		  if( field )
-			  padd(ascii("text:description"), sXML_CDATA, hconv(field, sbuf));
+			  padd(ascii("text:description"), sXML_CDATA, hconv(field));
         rstartEl( ascii("text:placeholder"), rList);
         pList->clear();
-        rchars( OUString(gstr));
+        rchars( OUString(rStr.c_str()) );
         rendEl( ascii("text:placeholder") );
     }
 /* Text Summary */
     else if( hbox->type[0] == 3 && hbox->type[1] == 0 )
     {
-        if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("title")))
+        if (hconv(hbox->str3).equals(OUString::createFromAscii("title")))
         {
             rstartEl( ascii("text:title"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:title") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("subject")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("subject")))
         {
             rstartEl( ascii("text:subject"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:subject") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("author")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("author")))
         {
             rstartEl( ascii("text:author-name"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:author-name") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("keywords")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("keywords")))
         {
             rstartEl( ascii("text:keywords"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:keywords") );
         }
     }
 /* Personal information. */
     else if( hbox->type[0] == 3 && hbox->type[1] == 1 )
     {
-        if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("User")))
+        if (hconv(hbox->str3).equals(OUString::createFromAscii("User")))
         {
             rstartEl( ascii("text:sender-lastname"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:sender-lastname") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("Company")))
+        else if (hconv( hbox->str3).equals(OUString::createFromAscii("Company")))
         {
             rstartEl( ascii("text:sender-company"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:sender-company") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("Position")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("Position")))
         {
             rstartEl( ascii("text:sender-title"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:sender-title") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("Division")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("Division")))
         {
             rstartEl( ascii("text:sender-position"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:sender-position") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("Fax")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("Fax")))
         {
             rstartEl( ascii("text:sender-fax"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:sender-fax") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("Pager")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("Pager")))
         {
             rstartEl( ascii("text:phone-private"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:phone-private") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("E-mail")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("E-mail")))
         {
             rstartEl( ascii("text:sender-email"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:sender-email") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("Zipcode(office)")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("Zipcode(office)")))
         {
             rstartEl( ascii("text:sender-postal-code"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:sender-postal-code") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("Phone(office)")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("Phone(office)")))
         {
             rstartEl( ascii("text:sender-phone-work"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:sender-phone-work") );
         }
-        else if( hconv( hbox->str3, gstr ).equals(OUString::createFromAscii("Address(office)")))
+        else if (hconv(hbox->str3).equals(OUString::createFromAscii("Address(office)")))
         {
             rstartEl( ascii("text:sender-street"), rList );
-            rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
             rendEl( ascii("text:sender-street") );
         }
 
@@ -3300,7 +3280,7 @@ void HwpReader::makeFieldCode(FieldCode 
 					 ascii(Int2Str(hbox->m_pDate->key, "N%d", buf)));
 			rstartEl( ascii("text:creation-date"), rList );
 			pList->clear();
-			rchars(  hconv(hbox->str2, gstr) );
+            rchars(  hconv(hbox->str2) );
 			rendEl( ascii("text:creation-date") );
 	 }
 }
@@ -3314,21 +3294,21 @@ void HwpReader::makeBookmark(Bookmark * 
 {
     if (hbox->type == 0)
     {
-        padd(ascii("text:name"), sXML_CDATA, (hconv(hbox->id, gstr)));
+        padd(ascii("text:name"), sXML_CDATA, (hconv(hbox->id)));
         rstartEl(ascii("text:bookmark"), rList);
         pList->clear();
         rendEl(ascii("text:bookmark"));
     }
     else if (hbox->type == 1)                     /* If the block bukmakeuil has a beginning and an end */
     {
-        padd(ascii("text:name"), sXML_CDATA, (hconv(hbox->id, gstr)));
+        padd(ascii("text:name"), sXML_CDATA, (hconv(hbox->id)));
         rstartEl(ascii("text:bookmark-start"), rList);
         pList->clear();
         rendEl(ascii("text:bookmark-start"));
     }
     else if (hbox->type == 2)
     {
-        padd(ascii("text:name"), sXML_CDATA, (hconv(hbox->id, gstr)));
+        padd(ascii("text:name"), sXML_CDATA, (hconv(hbox->id)));
         rstartEl(ascii("text:bookmark-end"), rList);
         pList->clear();
         rendEl(ascii("text:bookmark-end"));
@@ -3485,10 +3465,11 @@ if( *fmt == '6' ){
 */
                 break;
             default:
+                hchar sbuf[2];
                 sbuf[0] = *fmt;
                 sbuf[1] = 0;
                 rstartEl(ascii("number:text"), rList);
-                rchars((hconv(sbuf, gstr)));
+                rchars((hconv(sbuf)));
                 rendEl(ascii("number:text"));
                 break;
         }
@@ -3504,8 +3485,8 @@ void HwpReader::makeDateCode(DateCode * 
         ascii(Int2Str(hbox->key, "N%d", buf)));
     rstartEl( ascii("text:date"), rList );
     pList->clear();
-    hbox->GetString(sbuf, 255);
-    rchars((hconv(sbuf, gstr)));
+    hchar_string const boxstr = hbox->GetString();
+    rchars((hconv(boxstr.c_str())));
     rendEl( ascii("text:date") );
 }
 
@@ -3528,10 +3509,9 @@ void HwpReader::makeTable(TxtBox * hbox)
 
     Table *tbl = hbox->m_pTable;
 // ----------- column ---------------- //
-    int i ;
-    for( i = 0 ; i < tbl->columns.nCount -1 ; i++ )
+    for (size_t i = 0 ; i < tbl->columns.nCount -1 ; i++)
     {
-        sprintf(buf,"Table%d.%c",hbox->style.boxnum, 'A'+i);
+        sprintf(buf,"Table%d.%c",hbox->style.boxnum, static_cast<char>('A'+i));
         padd(ascii("table:style-name"), sXML_CDATA, ascii( buf ));
         rstartEl(ascii("table:table-column"), rList);
         pList->clear();
@@ -3540,7 +3520,7 @@ void HwpReader::makeTable(TxtBox * hbox)
 
 // ----------- cell ---------------- //
     int j = -1, k = -1;
-    for( i = 0 ; i < tbl->cells.count(); i++ )
+    for (int i = 0 ; i < tbl->cells.count(); i++)
     {
         TCell *tcell = tbl->cells.find(i);
         if( tcell->nRowIndex > j )
@@ -3760,7 +3740,7 @@ void HwpReader::makeFormula(TxtBox * hbo
         {
             if (!cshape)
                 cshape = pPar->GetCharShape(n);
-            if (l >= sizeof(mybuf)-1)
+            if (l >= sizeof(mybuf)-7)
                 break;
 				res = hcharconv(pPar->hhstr[n]->hh, dest, UNICODE);
 				for( int j = 0 ; j < res; j++ ){
@@ -3776,7 +3756,7 @@ void HwpReader::makeFormula(TxtBox * hbo
 					}
 				}
         }
-        if (l >= sizeof(mybuf)-1)
+        if (l >= sizeof(mybuf)-7)
             break;
         mybuf[l++] = '\n';
         pPar = pPar->Next();
@@ -3807,32 +3787,35 @@ void HwpReader::makeHyperText(TxtBox * h
 	 if( !hypert ) return;
 
     if( strlen((char *)hypert->filename) > 0 ){
-			  char tmp[256];
-			  char tmp2[256];
-			  int nSize = hstr2ksstr(hypert->bookmark, tmp);
+              ::std::string const tmp = hstr2ksstr(hypert->bookmark);
+              ::std::string const tmp2 = hstr2ksstr(kstr2hstr(
 #ifdef _WIN32
-        	  int nSize2 = hstr2ksstr(kstr2hstr((uchar *) urltowin((char *)hypert->filename, buf), sbuf), tmp2);
+                  (uchar *) urltowin((char *)hypert->filename).c_str()).c_str());
 #else
-			  int nSize2 = hstr2ksstr(kstr2hstr( (uchar *)urltounix((char *)hypert->filename, buf), sbuf), tmp2);
+                  (uchar *) urltounix((char *)hypert->filename).c_str()).c_str());
 #endif
 		  padd(ascii("xlink:type"), sXML_CDATA, ascii("simple"));
-		  if( strlen(tmp) > 0 && strcmp( tmp, "[HTML]") ){
-			  sprintf( buf, "%s#%s",tmp2, tmp);
-			  padd(ascii("xlink:href"), sXML_CDATA, OUString(buf, nSize2 + nSize+1, RTL_TEXTENCODING_EUC_KR));
+          if (tmp.size() > 0 && strcmp(tmp.c_str(), "[HTML]")) {
+              ::std::string tmp3(tmp2);
+              tmp3.push_back('#');
+              tmp3.append(tmp);
+              padd(ascii("xlink:href"), sXML_CDATA,
+                  OUString(tmp3.c_str(), tmp3.size()+1, RTL_TEXTENCODING_EUC_KR));
 		  }
 		  else{
-			  sprintf( buf, "%s",tmp2);
-			  padd(ascii("xlink:href"), sXML_CDATA, OUString(buf, nSize2, RTL_TEXTENCODING_EUC_KR));
+              padd(ascii("xlink:href"), sXML_CDATA,
+                  OUString(tmp2.c_str(), tmp2.size()+1, RTL_TEXTENCODING_EUC_KR));
 
 		  }
 	 }
     else
     {
-        char tmp[256];
         padd(ascii("xlink:type"), sXML_CDATA, ascii("simple"));
-        int nSize = hstr2ksstr(hypert->bookmark, tmp);
-        sprintf( buf, "#%s", tmp);
-        padd(ascii("xlink:href"), sXML_CDATA, OUString(buf, nSize+1, RTL_TEXTENCODING_EUC_KR));
+        ::std::string tmp;
+        tmp.push_back('#');
+        tmp.append(hstr2ksstr(hypert->bookmark));
+        padd(ascii("xlink:href"), sXML_CDATA,
+                OUString(tmp.c_str(), tmp.size()+1, RTL_TEXTENCODING_EUC_KR));
     }
     rstartEl(ascii("draw:a"), rList);
     pList->clear();
@@ -3907,16 +3890,16 @@ void HwpReader::makePicture(Picture * hb
                 padd(ascii("xlink:type"), sXML_CDATA, ascii("simple"));
 #ifdef _WIN32
                 if( hbox->follow[4] != 0 )
-                    padd(ascii("xlink:href"), sXML_CDATA, (hconv(kstr2hstr(hbox->follow + 4, sbuf), gstr)));
+                    padd(ascii("xlink:href"), sXML_CDATA, (hconv(kstr2hstr(hbox->follow + 4).c_str())));
                 else
-                    padd(ascii("xlink:href"), sXML_CDATA, (hconv(kstr2hstr(hbox->follow + 5, sbuf), gstr)));
+                    padd(ascii("xlink:href"), sXML_CDATA, (hconv(kstr2hstr(hbox->follow + 5).c_str())));
 #else
                 if( hbox->follow[4] != 0 )
                     padd(ascii("xlink:href"), sXML_CDATA,
-                        (hconv(kstr2hstr((uchar *)urltounix((char *)(hbox->follow + 4), buf), sbuf), gstr)));
+                        (hconv(kstr2hstr((uchar *)urltounix((char *)(hbox->follow + 4)).c_str()).c_str())));
                 else
                     padd(ascii("xlink:href"), sXML_CDATA,
-                        (hconv(kstr2hstr((uchar *)urltounix((char *)(hbox->follow + 5), buf), sbuf), gstr)));
+                        (hconv(kstr2hstr((uchar *)urltounix((char *)(hbox->follow + 5)).c_str()).c_str())));
 #endif
                 rstartEl(ascii("draw:a"), rList);
                 pList->clear();
@@ -3974,10 +3957,10 @@ void HwpReader::makePicture(Picture * hb
             if ( hbox->pictype == PICTYPE_FILE ){
 #ifdef _WIN32
                 sprintf(buf, "file:///%s", hbox->picinfo.picun.path );
-                padd(ascii("xlink:href"), sXML_CDATA, (hconv(kstr2hstr((uchar *) buf, sbuf), gstr)));
+                padd(ascii("xlink:href"), sXML_CDATA, (hconv(kstr2hstr((uchar *) buf).c_str())));
 #else
                 padd(ascii("xlink:href"), sXML_CDATA,
-                    (hconv(kstr2hstr((uchar *) urltounix( hbox->picinfo.picun.path, buf), sbuf), gstr)));
+                    (hconv(kstr2hstr((uchar *) urltounix(hbox->picinfo.picun.path).c_str()).c_str())));
 #endif
                 padd(ascii("xlink:type"), sXML_CDATA, ascii("simple"));
                 padd(ascii("xlink:show"), sXML_CDATA, ascii("embed"));
@@ -4440,7 +4423,10 @@ void HwpReader::makePictureDRAW(HWPDrawi
 
                     OUString oustr;
 
-                    if (drawobj->u.freeform.npt > 2){
+                    if ((drawobj->u.freeform.npt > 2) &&
+                        (static_cast<size_t>(drawobj->u.freeform.npt) <
+                         (::std::numeric_limits<int>::max() / sizeof(double))))
+                    {
 							  int n, i;
 							  if( bIsNatural == sal_True )
 								  n = drawobj->u.freeform.npt;
@@ -4682,7 +4668,8 @@ void HwpReader::makeLine(Line *   )
  */
 void HwpReader::makeHidden(Hidden * hbox)
 {
-    int l = 0, res;
+    hchar_string str;
+    int res;
 	 hchar dest[3];
 
     padd(ascii("text:condition"), sXML_CDATA, ascii(""));
@@ -4698,11 +4685,13 @@ void HwpReader::makeHidden(Hidden * hbox
         {
 			  res = hcharconv(para->hhstr[n]->hh, dest, UNICODE);
 			  for( int j = 0 ; j < res ; j++ )
-					gstr[l++] = dest[j];
+              {
+                    str.push_back(dest[j]);
+              }
         }
         para = para->Next();
     }
-    makeChars(gstr, l);
+    makeChars(str);
     rendEl(ascii("text:hidden-text"));
 }
 
@@ -4869,8 +4858,8 @@ void HwpReader::makeShowPageNum()
  */
 void HwpReader::makeMailMerge(MailMerge * hbox)
 {
-    hbox->GetString(sbuf, 255);
-    rchars((hconv(sbuf, gstr)));
+    hchar_string const boxstr = hbox->GetString();
+    rchars((hconv(boxstr.c_str())));
 }
 
 
@@ -4895,7 +4884,7 @@ void HwpReader::makeIndexMark(IndexMark 
 void HwpReader::makeOutline(Outline * hbox)
 {
 	if( hbox->kind == 1 )
-		 rchars(OUString(hbox->GetUnicode(sbuf, 255)));
+        rchars(OUString(hbox->GetUnicode().c_str()));
 }
 
 

Modified: incubator/ooo/branches/writer001/main/hwpfilter/source/hwpreader.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/hwpfilter/source/hwpreader.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/hwpfilter/source/hwpreader.hxx (original)
+++ incubator/ooo/branches/writer001/main/hwpfilter/source/hwpreader.hxx Mon Aug 20 11:46:19 2012
@@ -162,10 +162,10 @@ private:
     void make_text_p3(HWPPara *para, sal_Bool bParaStart = sal_False);
 
     /* -------- rDocument->characters(x) --------- */
-    void makeChars(hchar *, int);
+    void makeChars(hchar_string & rStr);
 
     /* -------- Special Char Parsing --------- */
-    void makeFieldCode(FieldCode *hbox);		//6
+    void makeFieldCode(hchar_string & rStr, FieldCode *hbox);		//6
     void makeBookmark(Bookmark *hbox);		//6
     void makeDateFormat(DateCode *hbox);	//7
     void makeDateCode(DateCode *hbox);		//8

Modified: incubator/ooo/branches/writer001/main/hwpfilter/source/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/hwpfilter/source/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/hwpfilter/source/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/hwpfilter/source/makefile.mk Mon Aug 20 11:46:19 2012
@@ -49,7 +49,6 @@ SLOFILES =	\
 		$(SLO)$/hcode.obj \
 		$(SLO)$/hfont.obj \
 		$(SLO)$/hgzip.obj \
-		$(SLO)$/himgutil.obj \
 		$(SLO)$/hinfo.obj \
 		$(SLO)$/hiodev.obj \
 		$(SLO)$/hpara.obj \

Modified: incubator/ooo/branches/writer001/main/hwpfilter/source/mapping.h
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/hwpfilter/source/mapping.h?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/hwpfilter/source/mapping.h (original)
+++ incubator/ooo/branches/writer001/main/hwpfilter/source/mapping.h Mon Aug 20 11:46:19 2012
@@ -27,7 +27,8 @@
 #include <string.h>
 #include <stdio.h>
 
-typedef unsigned short hchar;
+#include <hwplib.h>
+
 
 struct FormulaEntry{
 	 const char *tex;
@@ -363,30 +364,31 @@ const struct FormulaEntry FormulaMapTab[
 };
 
 #ifndef DEBUG
-hchar *getMathMLEntity(const char *tex, hchar *buf)
+hchar_string getMathMLEntity(const char *tex)
 {
-	 static int tabSize = sizeof( FormulaMapTab ) / sizeof( FormulaMapTab[0] );
-	 int i, len;
-	 
-	 for( i = 0 ; i < tabSize ; i++ ){
+     static size_t tabSize = sizeof(FormulaMapTab) / sizeof(FormulaMapTab[0]);
+
+     hchar_string buf;
+	 for (size_t i = 0 ; i < tabSize ; i++) {
 		  if( !strcmp(tex, FormulaMapTab[i].tex ) ) {
-				buf[0] = FormulaMapTab[i].ucs;
-				buf[1] = '\0';
-				return buf;
+                buf.push_back(FormulaMapTab[i].ucs);
+                return buf;
 		  }
 	 }
-	 len = strlen(tex);
 
-	 for( i = 0 ; i < len ; i++ )
-		  buf[i] = tex[i];
-	 buf[len] = 0;
+     size_t const len = strlen(tex);
+	 for (size_t i = 0 ; i < len ; i++)
+     {
+         buf.push_back(tex[i]);
+     }
 	 return buf;
 }
 
 #else
-char *getMathMLEntity(const char *tex, char *buf)
+::std::string getMathMLEntity(const char *tex)
 {
-	 strcpy(buf,tex);
+     ::std::string buf;
+     buf.append(tex);
 	 return buf;
 }
 #endif

Modified: incubator/ooo/branches/writer001/main/icu/createmak.cfg
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/icu/createmak.cfg?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/icu/createmak.cfg (original)
+++ incubator/ooo/branches/writer001/main/icu/createmak.cfg Mon Aug 20 11:46:19 2012
@@ -133,7 +133,7 @@ CPP_PROJ=-MD -O2 $(CTOOLSFLAGS)
 
 [CommonLinkFlags]
 PDBOUT=/pdb:"<PDBFILE>" /out:"<OUTFILE>"
-COMMONLINKFLAGS=/incremental:no /machine:I386 /nologo $(PDBOUT)
+COMMONLINKFLAGS=/incremental:no /machine:I386 /nologo $(PDBOUT) /SAFESEH /NXCOMPAT /DYNAMICBASE
 COMMONLINKFLAGS_CONSOLE=$(COMMONLINKFLAGS) /subsystem:console
 COMMONLINKFLAGS_DLL=$(COMMONLINKFLAGS) /dll
 

Modified: incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/const.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/const.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/const.py (original)
+++ incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/const.py Mon Aug 20 11:46:19 2012
@@ -29,5 +29,3 @@ class _const:
 
 import sys
 sys.modules[__name__] = _const()
-
-

Modified: incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/l10ntool.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/l10ntool.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/l10ntool.py (original)
+++ incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/l10ntool.py Mon Aug 20 11:46:19 2012
@@ -30,9 +30,9 @@ import shutil
 class AbstractL10nTool:
     _options            = {}
     _args               = ""
-    _resource_type      = "" 
+    _resource_type      = ""
     _source_language    = "en-US"
-   
+
     ##### Implement these abstract methods
 
     ##### Nameing scheme for the output files
@@ -58,9 +58,9 @@ class AbstractL10nTool:
     ################### Extract a single File ######################################################
     def extract_file(self, inputfile):
         pass
-    
+
     ################################################################################################
-     
+
     def format_outputfile(self, filename, language):
         extension = filename[filename.rfind('.')+1:]
         file = filename[:filename.rfind('.')]
@@ -78,26 +78,26 @@ class AbstractL10nTool:
             return ""
         else:
             return self._options.outputfile[:self._options.outputfile.rfind('/')]
-            
+
     def merge(self,  sdfdata):
         langset,forcedset, foundset = PseudoSet(), PseudoSet() , PseudoSet()
 
-        if self._options.languages:       
-            langset = PseudoSet(self._options.languages)  
-        if self._options.forcedlanguages: 
-            forcedset = PseudoSet(self._options.forcedlanguages) 
-        if sdfdata.get_languages_found_in_sdf(): 
-            foundset = sdfdata.get_languages_found_in_sdf() 
-    
-        if self.has_multi_inputfiles(): 
+        if self._options.languages:
+            langset = PseudoSet(self._options.languages)
+        if self._options.forcedlanguages:
+            forcedset = PseudoSet(self._options.forcedlanguages)
+        if sdfdata.get_languages_found_in_sdf():
+            foundset = sdfdata.get_languages_found_in_sdf()
+
+        if self.has_multi_inputfiles():
             filelist = self.read_inputfile_list()
         else:
             filelist = self._options.inputfile
-            
+
         for inputfile in filelist:
             ref = self.parse_file(inputfile)
             # Don't write that files if there is no l10n present
-            if ((langset & foundset) - forcedset):  # all langs given and found in sdf without enforced 
+            if ((langset & foundset) - forcedset):  # all langs given and found in sdf without enforced
                 [self.merge_file(inputfile,self.format_outputfile(inputfile, lang), ref, lang, False, sdfdata) for lang in ((langset & foundset) - forcedset)]
             # Always write those files even if there is no l10n available
             if forcedset: # all enforced langs
@@ -105,15 +105,15 @@ class AbstractL10nTool:
             # In case a big file have to be written
             if ((langset & foundset) | forcedset): # all langs given ,found in sdf and enforced ones
                 self.merge_one_big_file(inputfile, self.format_outputfile(inputfile, lang), ref, ((langset & foundset) | forcedset), sdfdata)
-    
-    def has_multi_inputfiles(self): 
+
+    def has_multi_inputfiles(self):
         return self._options.inputfile[0] == '@'
 
     def copy_file(self, inputfilename, outputfilename):
-        try: 
+        try:
             os.remove(outputfilename)
         except:
-            pass    
+            pass
 
         try:
             os.remove(outputfilename)
@@ -125,7 +125,7 @@ class AbstractL10nTool:
         except IOError:
             print "ERROR: Can not copy file '" + inputfilename + "' to " + "'" + outputfilename + "'"
             sys.exit(-1)
-    
+
     def extract(self):
         try:
             f = open(self._options.outputfile, "w+")
@@ -134,7 +134,7 @@ class AbstractL10nTool:
             print "ERROR: Can not write file " + self._options.outputfile
         else:
             f.close()
-            
+
     # Parse the common options
     def parse_options(self):
         parser = OptionParser()
@@ -147,19 +147,19 @@ class AbstractL10nTool:
         parser.add_option("-r", "--projectroot",     dest="project_root",    metavar="PATH", help=""                              )
         parser.add_option("-f", "--forcedlanguages", dest="forcedlanguages", metavar="ISOCODE[,ISOCODE]", help="Always merge those langs even if no l10n is available for those langs" )
         parser.add_option("-l", "--languages",       dest="languages",       metavar="ISOCODE[,ISOCODE]", help="Merge those langs if l10n is found for each")
-        parser.add_option("-s", "--pattern",         dest="pattern",         metavar="", help=""                                  )        
+        parser.add_option("-s", "--pattern",         dest="pattern",         metavar="", help=""                                  )
         parser.add_option("-q", "--quiet",           action="store_true",    dest="quietmode", help="",default=False)
         (self._options, self.args) = parser.parse_args()
-        
+
         # -l "de,pr,pt-BR" => [ "de" , "pt" , "pt-BR" ]
         parse_complex_arg = lambda arg: arg.split(",")
-        
-        if self._options.forcedlanguages: 
-            self._options.forcedlanguages = parse_complex_arg(self._options.forcedlanguages) 
-        if self._options.languages:       
-            self._options.languages = parse_complex_arg(self._options.languages) 
+
+        if self._options.forcedlanguages:
+            self._options.forcedlanguages = parse_complex_arg(self._options.forcedlanguages)
+        if self._options.languages:
+            self._options.languages = parse_complex_arg(self._options.languages)
         self.test_options()
-        
+
     def __init__(self):
         self.parse_options()
         if self._options.input_sdf_file != None and len(self._options.input_sdf_file):
@@ -183,7 +183,7 @@ class AbstractL10nTool:
             except IOError:
                 print "Error: Can not create dir " + dir
                 sys.exit(-1)
-            
+
     def test_options(self):
         opt = self._options
         is_valid = lambda x: x != None and len(x) > 0
@@ -193,7 +193,7 @@ class AbstractL10nTool:
                 ( is_valid(opt.inputfile) and is_valid(opt.outputFile)) ))))
         print "Strange options ..."
         sys.exit( -1 )
-                     
+
     def read_inputfile_list(self):
         if self.has_multi_inputfiles():
             lines = []
@@ -206,9 +206,8 @@ class AbstractL10nTool:
             else:
                 f.close()
             return lines
-        
+
     def get_filename_string(self, inputfile):
         absfile = os.path.realpath(os.path.abspath(inputfile))
-        absroot = os.path.realpath(os.path.abspath(self._options.project_root)) 
+        absroot = os.path.realpath(os.path.abspath(self._options.project_root))
         return absfile[len(absroot)+1:].replace('/','\\')
-    

Modified: incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/pseudo.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/pseudo.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/pseudo.py (original)
+++ incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/pseudo.py Mon Aug 20 11:46:19 2012
@@ -19,12 +19,12 @@
 #  
 #**************************************************************
 
-# to support macosx baseline machines from Cretaceous period 
+# to support macosx baseline machines from Cretaceous period
 
 # incomplete set() class implementation of Python 2.4
 class PseudoSet:
     _list = []
-   
+
     def __str__(self):
         return str(self._list)
 
@@ -56,10 +56,10 @@ class PseudoSet:
             return PseudoSet(tmplist)
         else:
             print "__and__(None)"
-                    
+
     def __iter__(self):
         return self._list.__iter__()
-    
+
     def __items__(self):
         return self._list.items()
 
@@ -67,16 +67,16 @@ class PseudoSet:
         return keys(self._list)
 
     def _remove_dupes(self, list):
-        tmpdict = {} 
+        tmpdict = {}
         for key in list:
             tmpdict[key] = 1
         return tmpdict.keys()
 
-# incomplete OrderedDict() class implementation 
+# incomplete OrderedDict() class implementation
 class PseudoOrderedDict(dict):
     _keylist        = []
     _valuelist      = []
-    
+
     def __init__(self, defaults={}):
         dict.__init__(self)
         for n,v in defaults.items():
@@ -86,7 +86,7 @@ class PseudoOrderedDict(dict):
         self._keylist.append(key)
         self._valuelist.append(value)
         return dict.__setitem__(self, key, value)
-        
+
     def __delattr__(self, key):
         self._keylist.__delattr__(key)
         self._valuelist.__delattr__(dict[key])
@@ -96,17 +96,17 @@ class PseudoOrderedDict(dict):
         self._keylist.__delitem__(key)
         self._valuelist.__delitem__(dict[key])
         return dict.__delitem__(self, key)
-        
+
     def __iter__(self):
         raise NotImplementedError("__iter__")
-    
+
     def __iterkeys__(self):
         return self._keylist
-    
+
     def iteritems(self):
         #return self._valuelist
         return zip(self._keylist, self._valuelist)
-   
+
     def items(self):
         return zip(self._keylist,self._valuelist)
 
@@ -118,15 +118,15 @@ class PseudoOrderedDict(dict):
 
     def __keysattr__(self):
         return self._keylist
-    
+
     def pop(self, key):
         self._keylist.pop(key)
         self._valuelist.pop(key)
         return dict.__pop__(self, key)
-    
+
     def popitem(self):
         raise NotImplementedError("popitem")
-    
+
 def _testdriver_set():
     list, list1 = [] ,[]
     list.append("a")

Modified: incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/sdf.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/sdf.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/sdf.py (original)
+++ incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/sdf.py Mon Aug 20 11:46:19 2012
@@ -26,35 +26,35 @@ class SdfData:
     _filename        = "";
     _dict            = PseudoOrderedDict()
     _languages_found = [];
-    
+
     def __init__ (self, filename=""):
         self._filename = filename
-    
+
     def __getitem__(self, key):
         if self._dict.has_key(key):
             return self._dict[key]
         else:
             return None
-    
+
     def has_key(self, key):
         return self._dict.has_key(key)
-    
+
     def __setitem__(self, key, value):
         self._dict[key] = value
-    
+
     def get_languages_found_in_sdf(self):
         return PseudoSet(self._languages_found)
 
     def read(self):
         try:
             f = open(self._filename, "r")
-            lines = [line.rstrip('\n') for line in f.readlines()] 
+            lines = [line.rstrip('\n') for line in f.readlines()]
         except IOError:
             print "ERROR: Trying to read "+ self._filename
             raise
         else:
             f.close()
-        for line in lines:        
+        for line in lines:
             entity = SdfEntity()
             entity.set_properties(line)
             self._dict[entity.get_id()] = entity
@@ -62,7 +62,7 @@ class SdfData:
 
     def write(self, filename):
         try:
-            f = open(filename, "w+") 
+            f = open(filename, "w+")
             for value in self._dict.itervalues():
                 #f.write( repr(value)+"\n" )
                 f.write(value + "\n")
@@ -73,7 +73,7 @@ class SdfData:
             f.close()
 
 import sys
-class SdfEntity: 
+class SdfEntity:
     # Sdf format columns
     project         = ""
     source_file     = ""
@@ -90,7 +90,7 @@ class SdfEntity: 
     quickhelptext   = ""
     title           = ""
     date            = ""
-    
+
     import const
     const._PROJECT_POS         = 0
     const._SOURCE_FILE_POS     = 1
@@ -107,8 +107,8 @@ class SdfEntity: 
     const._QUICKHELPTEXT_POS   = 12
     const._TITLE_POS           = 13
     const._DATE_POS            = 14
-        
-    def __init__(self, project="", source_file="", dummy1="0", resource_type="", gid="", lid="", helpid="", platform="", dummy2="0", langid="", 
+
+    def __init__(self, project="", source_file="", dummy1="0", resource_type="", gid="", lid="", helpid="", platform="", dummy2="0", langid="",
                        text="", helptext="", quickhelptext="", title="", date=""):
         self.project        = project;
         self.source_file    = source_file;
@@ -133,32 +133,32 @@ class SdfEntity: 
     def set_properties(self, line):
         splitted = line.split("\t")
         if len(splitted) == 15:
-            self.project        = splitted[ self.const._PROJECT_POS ]             
-            self.source_file    = splitted[ self.const._SOURCE_FILE_POS ]     
-            self.dummy1         = splitted[ self.const._DUMMY1_POS ]         
-            self.resource_type  = splitted[ self.const._RESOURCE_TYPE_POS ] 
-            self.gid            = splitted[ self.const._GID_POS ]             
-            self.lid            = splitted[ self.const._LID_POS ]             
-            self.helpid         = splitted[ self.const._HELPID_POS ]         
-            self.platform       = splitted[ self.const._PLATFORM_POS ]         
-            self.dummy2         = splitted[ self.const._DUMMY2_POS ]         
-            self.langid         = splitted[ self.const._LANGID_POS ]         
-            self.text           = splitted[ self.const._TEXT_POS ]             
-            self.helptext       = splitted[ self.const._HELPTEXT_POS ]         
-            self.quickhelptext  = splitted[ self.const._QUICKHELPTEXT_POS ] 
-            self.title          = splitted[ self.const._TITLE_POS ]         
-            self.date           = splitted[ self.const._DATE_POS ]            
+            self.project        = splitted[ self.const._PROJECT_POS ]
+            self.source_file    = splitted[ self.const._SOURCE_FILE_POS ]
+            self.dummy1         = splitted[ self.const._DUMMY1_POS ]
+            self.resource_type  = splitted[ self.const._RESOURCE_TYPE_POS ]
+            self.gid            = splitted[ self.const._GID_POS ]
+            self.lid            = splitted[ self.const._LID_POS ]
+            self.helpid         = splitted[ self.const._HELPID_POS ]
+            self.platform       = splitted[ self.const._PLATFORM_POS ]
+            self.dummy2         = splitted[ self.const._DUMMY2_POS ]
+            self.langid         = splitted[ self.const._LANGID_POS ]
+            self.text           = splitted[ self.const._TEXT_POS ]
+            self.helptext       = splitted[ self.const._HELPTEXT_POS ]
+            self.quickhelptext  = splitted[ self.const._QUICKHELPTEXT_POS ]
+            self.title          = splitted[ self.const._TITLE_POS ]
+            self.date           = splitted[ self.const._DATE_POS ]
 
     def get_file_id(self):
         return self.project + "\\" + self.source_file
-    
+
     def get_resource_path(self):
-            return self.source_file[0:self.source_file.rfind( "\\" )-1]
-    
+        return self.source_file[0:self.source_file.rfind( "\\" )-1]
+
     def __str__(self):
-        return ''.join([self.project, "\t", self.source_file, "\t", self.dummy1, "\t", self.resource_type, "\t" , 
-            self.gid, "\t", self.lid, "\t", self.helpid, "\t", self.platform, "\t", self.dummy2, "\t" , self.langid, 
+        return ''.join([self.project, "\t", self.source_file, "\t", self.dummy1, "\t", self.resource_type, "\t" ,
+            self.gid, "\t", self.lid, "\t", self.helpid, "\t", self.platform, "\t", self.dummy2, "\t" , self.langid,
             "\t", self.text, "\t", self.helptext, "\t", self.quickhelptext, "\t" , self.title, "\t", self.date ])
-    
+
     def get_id(self):
         return ''.join([self.project, self.gid, self.lid, self.source_file, self.resource_type, self.platform, self.helpid, self.langid])

Modified: incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/xhtex.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/xhtex.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/xhtex.py (original)
+++ incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/xhtex.py Mon Aug 20 11:46:19 2012
@@ -25,25 +25,25 @@ import sys
 import xml.dom.minidom
 
 class Xhtex(AbstractL10nTool):
-    _resource_type = "xht" 
+    _resource_type = "xht"
     _sdfdata       = ()
     _lang          = ""
-   
+
     # Extract methods
     def extract_topic(self, list, inputfile):
         topics = []
-        for elem in list:                        
+        for elem in list:
             if elem.childNodes[0].nodeType == elem.TEXT_NODE and len(elem.childNodes[0].data.strip()):
-                topics.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.childNodes[0].data, inputfile=inputfile))            
+                topics.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.childNodes[0].data, inputfile=inputfile))
         return topics
-            
+
     def extract_title(self, list, inputfile):
         titles = []
         for elem in list:
             if len(elem.getAttribute("title").strip()):
                 titles.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.getAttribute("title").strip(), inputfile=inputfile))
         return titles
-    
+
     # Merge methods
     def merge_topic(self, list, sdfdata, lang, inputfilename, dom):
         for elem in list:
@@ -52,17 +52,17 @@ class Xhtex(AbstractL10nTool):
                 if sdfdata[obj.get_id()]:
                     elem.childNodes[0].data = unicode(str(sdfdata[obj.get_id()].text),"utf8")
 
-                
+
     def merge_title(self, list, sdfdata, lang, inputfilename):
         for elem in list:
             obj = self.prepare_sdf_line(inputfile=inputfilename, lang=lang, id=elem.getAttribute("id").strip())
-            if elem.getAttribute("id").strip() and sdfdata[obj.get_id()]: 
+            if elem.getAttribute("id").strip() and sdfdata[obj.get_id()]:
                 elem.setAttribute("title", unicode(str(sdfdata[obj.get_id()].text),"utf8"))
 
-    # L10N tool       
+    # L10N tool
     def __init__(self):
         AbstractL10nTool.__init__(self)
-        
+
     def parse_file(self, filename):
         document = ""
         try:
@@ -75,16 +75,16 @@ class Xhtex(AbstractL10nTool):
             f.close()
         return xml.dom.minidom.parseString(document)
 
-        
+
     def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang,is_forced_lang, sdfdata):
-        if lang == "en-US":             
-            mod_outputfilename = outputfilename.replace("_en-US",'')            
+        if lang == "en-US":
+            mod_outputfilename = outputfilename.replace("_en-US",'')
             self.make_dirs(mod_outputfilename)
             self.copy_file(inputfilename, mod_outputfilename)
             return
         dom = parsed_file_ref.cloneNode(True)
         #dom = self.parse_file(inputfilename)    # in case cloneNode is buggy just parse it always
-                
+
         self.merge_topic(dom.getElementsByTagName("topic"), sdfdata, lang, inputfilename, dom)
         self.merge_title(dom.getElementsByTagName("node"), sdfdata, lang, inputfilename)
         self.merge_title(dom.getElementsByTagName("help_section"), sdfdata, lang, inputfilename)
@@ -98,7 +98,7 @@ class Xhtex(AbstractL10nTool):
             sys.exit(-1)
         else:
             f.close()
-    
+
     ##### Helper for parse-once-use-often like parsing a xml file is needed implement it here
     def parse_file(self, filename):
         document = ""
@@ -108,23 +108,22 @@ class Xhtex(AbstractL10nTool):
         except IOError:
             print "ERROR: Can not read file " + filename
         else:
-            f.close()        
+            f.close()
         return xml.dom.minidom.parseString(document)
-    
+
     ##### Extract a single File
     def extract_file(self, inputfile):
         sdf_data = []
-        dom = self.parse_file(inputfile)        
+        dom = self.parse_file(inputfile)
         sdf_data.extend(self.extract_topic(dom.getElementsByTagName("topic"), inputfile))
         sdf_data.extend(self.extract_title(dom.getElementsByTagName("help_section"), inputfile))
-        sdf_data.extend(self.extract_title(dom.getElementsByTagName("node"), inputfile))        
-        return ''.join([str(line)+"\n" for line in sdf_data])                      
+        sdf_data.extend(self.extract_title(dom.getElementsByTagName("node"), inputfile))
+        return ''.join([str(line)+"\n" for line in sdf_data])
 
     def prepare_sdf_line(self, inputfile="", lang="" , id="" , text=""):
         if lang == "":
             lang = self._source_language
         return SdfEntity(project=self._options.project_name, source_file=self.get_filename_string(inputfile),
                          resource_type=self._resource_type, gid=id, lid="", langid=lang,text=text)
-        
+
 run = Xhtex()
- 

Modified: incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/xtxex.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/xtxex.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/xtxex.py (original)
+++ incubator/ooo/branches/writer001/main/l10ntools/scripts/tool/xtxex.py Mon Aug 20 11:46:19 2012
@@ -22,21 +22,21 @@
 from l10ntool import AbstractL10nTool
 from sdf import SdfEntity
 import sys
-import shutil 
+import shutil
 
 class Xtxex(AbstractL10nTool):
-    _resource_type       = "xtx" 
-       
+    _resource_type       = "xtx"
+
     def __init__(self):
         AbstractL10nTool.__init__(self)
-        
-    def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang, is_forced_lang, sdfdata): 
+
+    def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang, is_forced_lang, sdfdata):
         # Special handling for en-US files
-        if lang == "en-US":             
+        if lang == "en-US":
             mod_outputfilename = outputfilename
             # mod here if needed
             self.copy_file(inputfilename, mod_outputfilename)
-            return      
+            return
         # merge usual lang
         sdfline = self.prepare_sdf_line(inputfilename,lang)
         if sdfdata.has_key(sdfline.get_id()):
@@ -50,11 +50,11 @@ class Xtxex(AbstractL10nTool):
                 sys.exit(-1)
             else:
                 f.close()
-            return        
+            return
         # no sdf data found then copy en-US source file
         if is_forced_lang:
             self.copy_file(inputfilename, outputfilename)
-               
+
     ##### Extract a single File
     def extract_file(self, inputfile):
         lines = []
@@ -67,7 +67,7 @@ class Xtxex(AbstractL10nTool):
         else:
             f.close()
         # remove legal header
-        lines = [line for line in lines if len(line) > 0 and not line[0] == '#']        
+        lines = [line for line in lines if len(line) > 0 and not line[0] == '#']
         # escape all returns
         lines = [line.replace('\n', "\\n") for line in lines]
         line = ''.join(lines)
@@ -84,5 +84,5 @@ class Xtxex(AbstractL10nTool):
             lang = self._source_language
         return SdfEntity(project=self._options.project_name, source_file=self.get_filename_string(inputfile),
                           resource_type=self._resource_type, gid="none", lid="none", langid=lang,text="")
-         
+
 run = Xtxex()

Modified: incubator/ooo/branches/writer001/main/lingucomponent/source/spellcheck/spell/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/lingucomponent/source/spellcheck/spell/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/lingucomponent/source/spellcheck/spell/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/lingucomponent/source/spellcheck/spell/makefile.mk Mon Aug 20 11:46:19 2012
@@ -73,6 +73,11 @@ SHL1IMPLIB=		i$(REALNAME)
 SHL1DEPN=		$(SHL1LIBS)
 SHL1DEF=		$(MISC)$/$(SHL1TARGET).def
 
+# Hunspell is a static library.  Avoid the definition
+#     LIBHUNSPELL_DLL_EXPORTED __declspec(dllimport)
+#
+CDEFS+=-DHUNSPELL_STATIC
+
 SHL1VERSIONMAP=$(SOLARENV)/src/component.map
 
 # build DEF file

Modified: incubator/ooo/branches/writer001/main/moz/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/moz/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/moz/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/moz/makefile.mk Mon Aug 20 11:46:19 2012
@@ -94,6 +94,7 @@ TARFILE_ROOTDIR=mozilla
 PATCH_FILES = \
     seamonkey-source-$(MOZILLA_VERSION).patch \
     patches/gcc46.patch \
+    patches/gcc47.patch \
     patches/dtoa.patch \
     patches/respect_disable_pango.patch \
     patches/arm_build_fix.patch \

Modified: incubator/ooo/branches/writer001/main/mythes/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/mythes/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/mythes/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/mythes/makefile.mk Mon Aug 20 11:46:19 2012
@@ -39,6 +39,7 @@ TARFILE_MD5=067201ea8b126597670b5eff72e1
 ADDITIONAL_FILES += makefile.mk
 
 PATCH_FILES=mythes-1.2.0-vanilla-th-gen-idx.patch \
+	mythes-1.2.0-overflow.patch \
 	mythes-1.2.0-makefile-mk.patch \
 	mythes-1.2.0-disable-example.patch
 

Modified: incubator/ooo/branches/writer001/main/offapi/com/sun/star/awt/grid/XGridRowSelection.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/offapi/com/sun/star/awt/grid/XGridRowSelection.idl?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/offapi/com/sun/star/awt/grid/XGridRowSelection.idl (original)
+++ incubator/ooo/branches/writer001/main/offapi/com/sun/star/awt/grid/XGridRowSelection.idl Mon Aug 20 11:46:19 2012
@@ -34,8 +34,8 @@ module com {  module sun {  module star 
 
 /** This interfaces provides access to the selection of row for <type>UnoControlGrid</type>. 
 
-    @since OpenOffice.org 3.4
- */     
+    @since OOo 3.4
+ */
 published interface XGridRowSelection
 { 
 	/** Selects all rows.

Modified: incubator/ooo/branches/writer001/main/offapi/com/sun/star/drawing/GraphicExportFilter.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/offapi/com/sun/star/drawing/GraphicExportFilter.idl?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/offapi/com/sun/star/drawing/GraphicExportFilter.idl (original)
+++ incubator/ooo/branches/writer001/main/offapi/com/sun/star/drawing/GraphicExportFilter.idl Mon Aug 20 11:46:19 2012
@@ -42,49 +42,58 @@
 //============================================================================= 
 
 /** a component that supports this service lets you export pages, shapes, or
-	groups of shapes from a DrawingDocument to a file in one of the file formats
-	supported by the component.
+	groups of shapes from a <type>DrawingDocument</type> to a file in one of the 
+	file formats supported by the component.
 */
 published service GraphicExportFilter
 {
-	/** calling <method scope=scope="com::sun::star::document">XFilter::filter
-		</method> starts the export of the graphic file. The following properties
-		from the 		<type scope="com::sun::star::document">MediaDescriptor
-		</type> are supported:<p>
-
-		<member scope="com::sun::star::document">MediaDescriptor::MediaType
-		</member><b>
-		
-		Depending on the export filters supported by this component this is
-		the mime type of the target graphic file. Possible values are<b>
-		image/x-MS-bmp<b>
-		application/dxf<b>
-		application/postscript<b>
-		image/gif<b>
-		image/jpeg<b>
-		image/png<b>
-		image/x-pict<b>
-		image/x-pcx<b>
-		image/x-portable-bitmap<b>
-		image/x-portable-graymap<b>
-		image/x-portable-pixmap<b>
-		image/x-cmu-raster<b>
-		image/targa<b>
-		image/tiff<b>
-		image/x-xbitmap<b>
-		image/x-xpixmap<b>
-		image/svg+xml<p>
-		Ask the interface <type scope="com::sun::star::document">XMimeTypeInfo
-		</type> for all values supported by the component.
+	/** calling <method scope="com::sun::star::document">XFilter::filter</method>
+        starts the export of the graphic file.
 
-		<member scope="com::sun::star::document">MediaDescriptor::URL</member><b>
-		This is the target url of the file that will be created during export.
+        <p>The following properties from the
+        <type scope="com::sun::star::document">MediaDescriptor</type> are
+        supported:</p>
+
+        <ul>
+            <li>
+                <member scope="com::sun::star::document">MediaDescriptor::MediaType</member>
+                <p>Depending on the export filters supported by this component,
+                this is the mime type of the target graphic file.</p>
+                <p>Possible values are:</p>
+                <ul>
+                    <li>image/x-MS-bmp</li>
+                    <li>application/dxf</li>
+                    <li>application/postscript</li>
+                    <li>image/gif</li>
+                    <li>image/jpeg</li>
+                    <li>image/png</li>
+                    <li>image/x-pict</li>
+                    <li>image/x-pcx</li>
+                    <li>image/x-portable-bitmap</li>
+                    <li>image/x-portable-graymap</li>
+                    <li>image/x-portable-pixmap</li>
+                    <li>image/x-cmu-raster</li>
+                    <li>image/targa</li>
+                    <li>image/tiff</li>
+                    <li>image/x-xbitmap</li>
+                    <li>image/x-xpixmap</li>
+                    <li>image/svg+xml</li>
+                </ul>
+                <p>Ask the interface <type scope="com::sun::star::document">XMimeTypeInfo</type>
+                for all values supported by the component.</p>
+            </li>
+            <li>
+                <member scope="com::sun::star::document">MediaDescriptor::URL</member>
+                <p>This is the target url of the file that will be created during export.</p>
+            </li>
+        </ul>
 	*/
 	interface ::com::sun::star::document::XFilter;
 
 	/**	sets the source component for this export filter.
-		This could either be a <type>DrawPage</type>, a <type>Shape</type>
-		or a <type>Shapes</type>.
+
+		<p>This could either be a <type>DrawPage</type>, a <type>Shape</type>
+		or a <type>Shapes</type>.</p>
 	 */
 	interface ::com::sun::star::document::XExporter;
 

Modified: incubator/ooo/branches/writer001/main/offapi/com/sun/star/graphic/GraphicDescriptor.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/offapi/com/sun/star/graphic/GraphicDescriptor.idl?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/offapi/com/sun/star/graphic/GraphicDescriptor.idl (original)
+++ incubator/ooo/branches/writer001/main/offapi/com/sun/star/graphic/GraphicDescriptor.idl Mon Aug 20 11:46:19 2012
@@ -57,7 +57,7 @@ published service GraphicDescriptor
 		case the original mime type is not available anymore</p>
 		
 		<p> Currently, the following mime types are supported for 
-		loaded graphics:<\p>
+		loaded graphics:</p>
 		<ul>
 			<li>image/bmp</li>
 			<li>image/gif</li>

Modified: incubator/ooo/branches/writer001/main/offapi/com/sun/star/presentation/XSlideShow.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/offapi/com/sun/star/presentation/XSlideShow.idl?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/offapi/com/sun/star/presentation/XSlideShow.idl (original)
+++ incubator/ooo/branches/writer001/main/offapi/com/sun/star/presentation/XSlideShow.idl Mon Aug 20 11:46:19 2012
@@ -148,8 +148,7 @@ interface XSlideShow : ::com::sun::star:
         The slide to display.
 
         @param xDrawPages
-	For future use.
-	This parameter can be NULL when the ENABLE_PRESENTER_EXTRA_UI feature is disabled.
+        For future use.
 
         @param xAnimationNode
         The animation node determine the animations to display.

Modified: incubator/ooo/branches/writer001/main/offapi/com/sun/star/text/ViewSettings.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/offapi/com/sun/star/text/ViewSettings.idl?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/offapi/com/sun/star/text/ViewSettings.idl (original)
+++ incubator/ooo/branches/writer001/main/offapi/com/sun/star/text/ViewSettings.idl Mon Aug 20 11:46:19 2012
@@ -325,7 +325,7 @@ published service ViewSettings
      */
     [optional, property] boolean ShowHiddenCharacters;
     //-------------------------------------------------------------------------
-    /** If this proeperty is <TRUE/>, the settings of nonprinting characters are applied.
+    /** If this property is <TRUE/>, the settings of nonprinting characters are applied.
 
         <p>This option controls the use of the settings ShowHiddenCharacters,
         ShowTabstops, ShowSpaces, ShowBreaks and ShowParaBreaks </p>
@@ -349,6 +349,13 @@ published service ViewSettings
         @since OOo 3.1
      */
     [optional, property] long VerticalRulerMetric;
+    //-------------------------------------------------------------------------
+    /** If this property is <TRUE/>, tips for document content are shown,
+        typically in a help balloon when the mouse is over the content.
+
+        @since Apache OpenOffice 3.5
+     */
+    [optional, property] boolean ShowContentTips;
 };
 
 //=============================================================================

Modified: incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu (original)
+++ incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu Mon Aug 20 11:46:19 2012
@@ -1239,7 +1239,7 @@
             </node>
             <node oor:name=".uno:DataMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Data</value>
+                    <value xml:lang="en-US">~Data</value>
                 </prop>
             </node>
             <node oor:name=".uno:DataPilotMenu" oor:op="replace">

Modified: incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu (original)
+++ incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu Mon Aug 20 11:46:19 2012
@@ -1563,7 +1563,7 @@
             </node>
             <node oor:name=".uno:ModifyMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Modify</value>
+                    <value xml:lang="en-US">~Modify</value>
                 </prop>
             </node>
             <node oor:name=".uno:PreviewDisplayQualityMenu" oor:op="replace">
@@ -1578,7 +1578,7 @@
             </node>
             <node oor:name=".uno:SlideShowMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Slide Show</value>
+                    <value xml:lang="en-US">~Slide Show</value>
                 </prop>
             </node>
             <node oor:name=".uno:SnapLinesMenu" oor:op="replace">

Modified: incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu (original)
+++ incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu Mon Aug 20 11:46:19 2012
@@ -3517,6 +3517,14 @@
                     <value>1</value>
                 </prop>
             </node>
+            <node oor:name=".uno:LineArrowEnd" oor:op="replace">
+                <prop oor:name="Label" oor:type="xs:string">
+                    <value xml:lang="en-US">Line Ends with Arrow</value>
+                </prop>
+                <prop oor:name="Properties" oor:type="xs:int">
+                    <value>1</value>
+                </prop>
+            </node>
             <node oor:name=".uno:LineDash" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="en-US">Line Dash/Dot</value>
@@ -5755,7 +5763,7 @@
             </node>
             <node oor:name=".uno:EditMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Edit</value>
+                    <value xml:lang="en-US">~Edit</value>
                 </prop>
             </node>
             <node oor:name=".uno:FieldMenu" oor:op="replace">
@@ -5770,7 +5778,7 @@
             </node>
             <node oor:name=".uno:FormatMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Format</value>
+                    <value xml:lang="en-US">F~ormat</value>
                 </prop>
             </node>
             <node oor:name=".uno:FormattingMarkMenu" oor:op="replace">
@@ -5790,7 +5798,7 @@
             </node>
             <node oor:name=".uno:HelpMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Help</value>
+                    <value xml:lang="en-US">~Help</value>
                 </prop>
                 <prop oor:name="Properties" oor:type="xs:int">
                     <value>1</value>
@@ -5798,7 +5806,7 @@
             </node>
             <node oor:name=".uno:InsertMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Insert</value>
+                    <value xml:lang="en-US">~Insert</value>
                 </prop>
             </node>
             <node oor:name=".uno:LanguageMenu" oor:op="replace">
@@ -5826,7 +5834,7 @@
             </node>
             <node oor:name=".uno:PickList" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">File</value>
+                    <value xml:lang="en-US">~File</value>
                 </prop>
             </node>
             <node oor:name=".uno:PolyFormen" oor:op="replace">
@@ -5876,7 +5884,7 @@
             </node>
             <node oor:name=".uno:ToolsMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Tools</value>
+                    <value xml:lang="en-US">~Tools</value>
                 </prop>
             </node>
             <node oor:name=".uno:TransliterateMenu" oor:op="replace">
@@ -5886,12 +5894,12 @@
             </node>
             <node oor:name=".uno:ViewMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">View</value>
+                    <value xml:lang="en-US">~View</value>
                 </prop>
             </node>
             <node oor:name=".uno:WindowList" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Window</value>
+                    <value xml:lang="en-US">~Window</value>
                 </prop>
             </node>
         </node>

Modified: incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu (original)
+++ incubator/ooo/branches/writer001/main/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu Mon Aug 20 11:46:19 2012
@@ -1805,7 +1805,7 @@
             </node>
             <node oor:name=".uno:TableMenu" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
-                    <value xml:lang="en-US">Table</value>
+                    <value xml:lang="en-US">T~able</value>
                 </prop>
             </node>
             <node oor:name=".uno:TableSelectMenu" oor:op="replace">

Modified: incubator/ooo/branches/writer001/main/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/officecfg/registry/schema/org/openoffice/Office/Writer.xcs?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/officecfg/registry/schema/org/openoffice/Office/Writer.xcs (original)
+++ incubator/ooo/branches/writer001/main/officecfg/registry/schema/org/openoffice/Office/Writer.xcs Mon Aug 20 11:46:19 2012
@@ -1095,14 +1095,15 @@
 					</info>
 					<value>true</value>
 				</prop>
-				<prop oor:name="PreventTips" oor:type="xs:boolean">
+				<prop oor:name="ShowContentTips" oor:type="xs:boolean">
+                    <!-- OldPath: Writer/Content/Display/PreventTips -->
 					<!-- UIHints: Not accessible via user interface -->
 					<info>
 						<author>OS</author>
-						<desc>Enables the writer to prevent the display of help tips programmatically.</desc>
-						<label>Prevent help tips</label>
+						<desc>Enables the writer to prevent the display of tips for document content programmatically.</desc>
+						<label>Show document content tips</label>
 					</info>
-					<value>false</value>
+					<value>true</value>
 				</prop>
 			</group>
 			<group oor:name="NonprintingCharacter">

Modified: incubator/ooo/branches/writer001/main/package/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/package/prj/build.lst?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/package/prj/build.lst (original)
+++ incubator/ooo/branches/writer001/main/package/prj/build.lst Mon Aug 20 11:46:19 2012
@@ -1,4 +1,4 @@
-pk	package	:	cppu cppuhelper comphelper ucbhelper sal ZLIB:zlib LIBXSLT:libxslt NULL
+pk	package	:	cppu cppuhelper comphelper ucbhelper sal sax ZLIB:zlib LIBXSLT:libxslt NULL
 pk	package									usr1	-	all	pk_mkout NULL
 pk	package\inc								nmake	-	all	pk_inc NULL
 pk	package\source\zipapi					nmake	-	all	pk_zipapi pk_inc NULL