diff options
author | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2011-05-31 00:14:23 +0700 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-05-30 19:09:24 +0100 |
commit | 6630b196941390019b2f015e94c0ce63dd0983f6 (patch) | |
tree | 10a975b4135e29d5aaf3011de3e7776b85b27c61 /hwpfilter | |
parent | set link text properties (diff) | |
download | core-6630b196941390019b2f015e94c0ce63dd0983f6.tar.gz core-6630b196941390019b2f015e94c0ce63dd0983f6.zip |
Code Cleanup in filters
* Fix typos in comments
* Remove bogus comments
* Remove dead codes
Released under LGPLv3+/MPL
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hcode.cpp | 17 | ||||
-rw-r--r-- | hwpfilter/source/hwpfile.cpp | 2 | ||||
-rw-r--r-- | hwpfilter/source/hwpreader.cxx | 24 | ||||
-rw-r--r-- | hwpfilter/source/lexer.cpp | 46 |
4 files changed, 4 insertions, 85 deletions
diff --git a/hwpfilter/source/hcode.cpp b/hwpfilter/source/hcode.cpp index 02651926d0de..728d9e077ccb 100644 --- a/hwpfilter/source/hcode.cpp +++ b/hwpfilter/source/hcode.cpp @@ -405,23 +405,6 @@ static unsigned hhtg_tg[] = 0xD4D8, 0xD4F7, 0xD4FA, 0xD4FE, 0xD4DC, 0xD4DD, 0xD4DE, 0xD4DF }; -/* os: unused -static unsigned compatible_jamo[] = -{ - 0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007, - 0x8008, 0x8009, 0x800a, 0x800b, 0x800c, 0x800d, 0x800e, 0x800f, - 0x8010, 0x8011, 0x8012, 0x8013, 0x8014, 0x8015, 0x8016, 0x8017, - 0x8018, 0x8019, 0x801a, 0x801b, 0x801c, 0x801d, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x8441, 0x840d, 0x840e, 0x8410, - 0x8411, 0x8415, 0x8417, 0x841c, 0x8800, 0x8409, 0x8805, 0x8806, - 0x8808, 0x880b, 0x801e, 0x801f, 0x880e, 0x880f, 0x8400, 0x8814, - 0x8406, 0x8817, 0x8401, 0x8818, 0x8402, 0x8403, 0x8404, 0x8407, - 0x8c0e, 0x8408, 0x8c14, 0x8c15, 0x9000, 0x8405, 0x9005, 0x9014, - 0x9015, 0x8621, 0x8701, 0x9400, 0x8721, 0x87c1, 0x87e1 -};*/ - #define LINEBASE 0x3013 // ? diff --git a/hwpfilter/source/hwpfile.cpp b/hwpfilter/source/hwpfile.cpp index af458bea444f..088fcc5883ec 100644 --- a/hwpfilter/source/hwpfile.cpp +++ b/hwpfilter/source/hwpfile.cpp @@ -418,8 +418,6 @@ ColumnDef *HWPFile::GetColumnDef(int num) int HWPFile::GetPageMasterNum(int page) { LinkedListIterator<ColumnInfo> it(&columnlist); - //os: unused - //ColumnInfo *prev = 0; ColumnInfo *now = 0; int i; diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 76f318b2a77f..9906680ab99d 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -3622,8 +3622,6 @@ void HwpReader::makeTextBox(TxtBox * hbox) case PAGE_ANCHOR: case PAPER_ANCHOR: { - // os unused - // HWPInfo *hwpinfo = hwpfile.GetHWPInfo(); padd(ascii("text:anchor-type"), sXML_CDATA, ascii("page")); padd(ascii("text:anchor-page-number"), sXML_CDATA, ascii(Int2Str(hbox->pgno +1, "%d", buf))); @@ -3656,8 +3654,6 @@ void HwpReader::makeTextBox(TxtBox * hbox) ascii(Int2Str(hbox->zorder, "%d", buf))); } - // os unused - // static int draw_name_id = 0; padd(ascii("draw:style-name"), sXML_CDATA, ascii(Int2Str(hbox->style.boxnum, "Txtbox%d", buf))); padd(ascii("draw:name"), sXML_CDATA, @@ -3678,8 +3674,6 @@ void HwpReader::makeTextBox(TxtBox * hbox) case PAGE_ANCHOR: case PAPER_ANCHOR: { - // os unused - // HWPInfo *hwpinfo = hwpfile.GetHWPInfo(); padd(ascii("text:anchor-type"), sXML_CDATA, ascii("page")); padd(ascii("text:anchor-page-number"), sXML_CDATA, ascii(Int2Str(hbox->pgno +1, "%d", buf))); @@ -3889,8 +3883,6 @@ void HwpReader::makePicture(Picture * hbox) case PAGE_ANCHOR: case PAPER_ANCHOR: { - // os unused - // HWPInfo *hwpinfo = hwpfile.GetHWPInfo(); padd(ascii("text:anchor-type"), sXML_CDATA, ascii("page")); padd(ascii("text:anchor-page-number"), sXML_CDATA, ascii(Int2Str(hbox->pgno +1, "%d", buf))); @@ -3942,10 +3934,6 @@ void HwpReader::makePicture(Picture * hbox) padd(ascii("draw:name"), sXML_CDATA, ascii(Int2Str(hbox->style.boxnum, "Image%d", buf))); - // os unused - // int x = 0; - // int y = 0; - if( hbox->style.cap_len <= 0 ) { padd(ascii("draw:z-index"), sXML_CDATA, @@ -3961,8 +3949,6 @@ void HwpReader::makePicture(Picture * hbox) case PAGE_ANCHOR: case PAPER_ANCHOR: { - // os unused - // HWPInfo *hwpinfo = hwpfile.GetHWPInfo(); padd(ascii("text:anchor-type"), sXML_CDATA, ascii("page")); padd(ascii("text:anchor-page-number"), sXML_CDATA, ascii(Int2Str(hbox->pgno +1, "%d", buf))); @@ -4438,12 +4424,10 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox) } case HWPDO_CURVE: /* ???? : ?????????? ????. */ { - sal_Bool bIsNatural = sal_True; - // os unused - // int nCount = drawobj->u.freeform.npt; - if( drawobj->property.flag >> 5 & 0x01){ - bIsNatural = sal_False; - } + sal_Bool bIsNatural = sal_True; + if( drawobj->property.flag >> 5 & 0x01){ + bIsNatural = sal_False; + } if( !bIsRotate ) { padd(ascii("svg:x"), sXML_CDATA, diff --git a/hwpfilter/source/lexer.cpp b/hwpfilter/source/lexer.cpp index 690cda7eb076..3c73a66ff48e 100644 --- a/hwpfilter/source/lexer.cpp +++ b/hwpfilter/source/lexer.cpp @@ -1836,52 +1836,6 @@ yy_state_type yy_current_state; return yy_is_jam ? 0 : yy_current_state; } -/* yyunput unused -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; - - // undo effects of setting up yytext - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { // need to shift things up to make room - // +2 for EOB chars. - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif // ifndef YY_NO_UNPUT -*/ - #ifdef __cplusplus static int yyinput() #else |