diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-06-04 09:02:42 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-06-04 09:02:42 +0000 |
commit | d1af3a5fc102f9bb3464541d83ef0fa4bb2ce2a1 (patch) | |
tree | a726a21ba243271e82a98762e3817bee42a20386 /hwpfilter | |
parent | 2ec4fd903a90f02fabd273071ff625c46db9ab94 (diff) |
INTEGRATION: CWS sw30bf04 (1.4.2); FILE MERGED
2008/04/16 14:07:55 ama 1.4.2.1: Patch #i86356#: Remove unused methods
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hgzip.cpp | 54 | ||||
-rw-r--r-- | hwpfilter/source/hgzip.h | 18 | ||||
-rw-r--r-- | hwpfilter/source/hinfo.cpp | 37 | ||||
-rw-r--r-- | hwpfilter/source/hinfo.h | 66 | ||||
-rw-r--r-- | hwpfilter/source/hpara.h | 8 | ||||
-rw-r--r-- | hwpfilter/source/hutil.cpp | 18 | ||||
-rw-r--r-- | hwpfilter/source/hwpfile.h | 36 | ||||
-rw-r--r-- | hwpfilter/source/mzstring.cpp | 136 | ||||
-rw-r--r-- | hwpfilter/source/mzstring.h | 21 |
9 files changed, 39 insertions, 355 deletions
diff --git a/hwpfilter/source/hgzip.cpp b/hwpfilter/source/hgzip.cpp index f547c4f83b77..e504ecadd737 100644 --- a/hwpfilter/source/hgzip.cpp +++ b/hwpfilter/source/hgzip.cpp @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: hgzip.cpp,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -250,46 +250,6 @@ int gz_read(gz_stream * file, voidp buf, unsigned len) return (int) (len - s->stream.avail_out); } - -/* =========================================================================== - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of bytes actually written (0 in case of error). -*/ -int gz_write(gz_stream * file, const voidp buf, unsigned len) -{ - gz_stream *s = (gz_stream *) file; - - if (s == NULL || s->mode != 'w') - return Z_STREAM_ERROR; - - s->stream.next_in = (Bytef *) buf; - s->stream.avail_in = len; - - while (s->stream.avail_in != 0) - { - - if (s->stream.avail_out == 0) - { - - s->stream.next_out = s->outbuf; -/* - if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { - s->z_err = Z_ERRNO; - break; - } - */ - s->stream.avail_out = Z_BUFSIZE; - } - s->z_err = deflate(&(s->stream), Z_NO_FLUSH); - if (s->z_err != Z_OK) - break; - } - s->crc = crc32(s->crc, (Bytef *) buf, len); - - return (int) (len - s->stream.avail_in); -} - - /* =========================================================================== Flushes all pending output into the compressed file. The parameter flush is as in the deflate() function. @@ -378,15 +338,3 @@ int gz_close(gz_stream * file) #endif return destroy(s); } - - -int gz_seek(gz_stream * , long , int ) -{ - return -1; -} - - -long gz_tell(gz_stream * ) -{ - return -1; -} diff --git a/hwpfilter/source/hgzip.h b/hwpfilter/source/hgzip.h index e2378d70d2eb..e442b266cfe2 100644 --- a/hwpfilter/source/hgzip.h +++ b/hwpfilter/source/hgzip.h @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: hgzip.h,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -28,7 +28,7 @@ * ************************************************************************/ -/* $Id: hgzip.h,v 1.4 2008-04-10 12:04:19 rt Exp $ */ +/* $Id: hgzip.h,v 1.5 2008-06-04 09:57:59 vg Exp $ */ #ifndef _HWPGZIP_H_ #define _HWPGZIP_H_ @@ -108,24 +108,10 @@ int gz_close ( gz_stream *file ); */ int gz_read ( gz_stream *file, voidp buf, unsigned len ); /** - * Writes the given number of uncompressed bytes into the compressed file - * This exists for future using. - * @returns The number of bytes actually written - */ -int gz_write ( gz_stream *file, const voidp buf, unsigned len ); -/** * Flushes all pending output into the compressed file * gz_flush should be called only when strictly necessary because it can * degrade compression * @param flush Is as in the deflate() function */ int gz_flush ( gz_stream *file, int flush ); -/** - * Not implemented. - */ -int gz_seek ( gz_stream *file, long offset, int whence ); -/** - * Not implemented. - */ -long gz_tell ( gz_stream *file ); #endif /* _HWPGZIP_H_ */ diff --git a/hwpfilter/source/hinfo.cpp b/hwpfilter/source/hinfo.cpp index 09b7d4ec2a24..3db8d616b872 100644 --- a/hwpfilter/source/hinfo.cpp +++ b/hwpfilter/source/hinfo.cpp @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: hinfo.cpp,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -28,7 +28,7 @@ * ************************************************************************/ -/* $Id: hinfo.cpp,v 1.4 2008-04-10 12:05:04 rt Exp $ */ +/* $Id: hinfo.cpp,v 1.5 2008-06-04 09:58:52 vg Exp $ */ #include "precompile.h" @@ -147,39 +147,6 @@ bool HWPInfo::Read(HWPFile & hwpf) } -hunit HWPInfo::PageWid(void) -{ - if (paper.paper_direction & 1) - return paper.paper_height; - else - return paper.paper_width; -} - - -hunit HWPInfo::PageLen(void) -{ - if (paper.paper_direction & 1) - return paper.paper_width; - else - return paper.paper_height; -} - - -hunit HWPInfo::PageEditWid(void) -{ - return PageWid() - paper.left_margin - - paper.right_margin - paper.gutter_length; -} - - -hunit HWPInfo::PageEditLen(void) -{ - return PageLen() - - (paper.bottom_margin + paper.footer_length) - - (paper.top_margin + paper.header_length); -} - - // Document Summary bool HWPSummary::Read(HWPFile & hwpf) diff --git a/hwpfilter/source/hinfo.h b/hwpfilter/source/hinfo.h index 938793949858..d2ff7a1e5014 100644 --- a/hwpfilter/source/hinfo.h +++ b/hwpfilter/source/hinfo.h @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: hinfo.h,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -28,7 +28,7 @@ * ************************************************************************/ -/* $Id: hinfo.h,v 1.4 2008-04-10 12:05:21 rt Exp $ */ +/* $Id: hinfo.h,v 1.5 2008-06-04 09:59:14 vg Exp $ */ #ifndef _HWPINFO_H_ #define _HWPINFO_H_ @@ -60,26 +60,26 @@ typedef struct hunit gutter_length; } PaperInfo; -/* ÆäÀÌÁö ¹è°æ»ö, ¹è°æ±×¸² Á¤º¸ */ +/* ?????? ??????, ???????? ???? */ typedef struct { char type; // 0- background color, 1 - external image, 2- embeded image char reserved1[8]; - int luminance; /* ¹à±â ( -100 ~ 100 ) */ - int contrast; /* ¸í¾Ï ( -100 ~ 100 ) */ - char effect; /* 0-¿ø·¡±×¸², 1-±×·¹À̽ºÄÉÀÏ, 2-Èæ¹é */ + int luminance; /* ???? ( -100 ~ 100 ) */ + int contrast; /* ???? ( -100 ~ 100 ) */ + char effect; /* 0-????????, 1-????????????, 2-???? */ char reserved2[8]; char filename[260 + 1]; // filename unsigned char color[3]; //0 - red, 1 - green, 2 - blue - unsigned short flag; /* 0 - ¹ÙµÏÆǽÄ, 1 - °¡¿îµ¥·Î, 2 - ÂÊÅ©±â, 3 - ¿ëÁöÅ©±â */ - int range; /* 0-Àüü, 1-ùÆäÀÌÁö, 3-¦¼öÂÊ, 4-Ȧ¼öÂÊ */ + unsigned short flag; /* 0 - ????????, 1 - ????????, 2 - ??????, 3 - ???????? */ + int range; /* 0-????, 1-????????, 3-??????, 4-?????? */ char reserved3[27]; int size; char *data; // image data bool isset; } PaperBackInfo; -/* ¿¬°áÀμâ Á¤º¸ */ +/* ???????? ???? */ /** * Information of printing for chained page */ @@ -90,7 +90,7 @@ typedef struct unsigned char chain_filename[CHAIN_MAX_PATH]; } DocChainInfo; -/* ¹®¼ ¿ä¾à */ +/* ???? ???? */ /** * Summary of document */ @@ -107,13 +107,13 @@ struct HWPSummary }; /** - HWPInfo class´Â HWPFile¿¡ ´ëÇÑ Á¤º¸¸¦ ´ã°í Àִ Ŭ·¡½ºÀÌ´Ù. - Á¾À̳ª ¿©¹é µîÀÇ ·¹À̾ƿô(layout) Á¤º¸´Â Âʸűâ±â¿¡¼ - »ç¿ëÇϸç, ±âŸ ³»ºÎ Á¤º¸¸¦ Æ÷ÇÔÇÏ°í ÀÖ´Ù. \\ + HWPInfo class?? HWPFile?? ???? ?????? ???? ???? ??????????. + ?????? ???? ???? ????????(layout) ?????? ???????????? + ????????, ???? ???? ?????? ???????? ????. \\ - HWPInfo Ŭ·¡½º´Â HWPFileÀÇ #GetHWPInfo()# ÇÔ¼ö¸¦ ÅëÇØ ¾òÀ» ¼ö ÀÖ´Ù. + HWPInfo ???????? HWPFile?? #GetHWPInfo()# ?????? ???? ???? ?? ????. - @memo Hwp ¹®¼ Á¤º¸ + @memo Hwp ???? ???? */ /** * Contains the basic information of the hwp document: @@ -148,12 +148,12 @@ class DLLEXPORT HWPInfo unsigned char annotation[ANNOTATION_LEN]; short encrypted; // unsigned char reserved2[6]; - short beginpagenum; /* ½ÃÀÛÆäÀÌÁö ¹øÈ£ */ + short beginpagenum; /* ?????????? ???? */ /** * Information about footnote */ - short beginfnnum; /* °¢ÁÖ½ÃÀÛ¹øÈ£ */ - short countfn; /* °¢ÁÖ °¹¼ö */ + short beginfnnum; /* ???????????? */ + short countfn; /* ???? ???? */ hunit splinetext, splinefn; hunit spfnfn; unsigned char fnchar; @@ -170,7 +170,7 @@ class DLLEXPORT HWPInfo unsigned char compressed; unsigned char reserved3; short info_block_len; -/* ¿©±â±îÁö°¡ 128 ¹ÙÀÌÆ®ÀÌ´Ù */ +/* ?????????? 128 ?????????? */ /** * Summary of document */ @@ -184,27 +184,9 @@ class DLLEXPORT HWPInfo bool Write(CTextOut &txtf); bool Write(CHTMLOut &html); -/* ¿ëÁö ¹æÇâÀ» °í·ÁÇÑ Á¾ÀÌÀÇ ³ÐÀ̸¦ °è»êÇÑ´Ù. */ -/** - * Returns the width of paper regarding page orientation - */ - hunit PageWid(void); -/* ¿ëÁö ¹æÇâÀ» °í·ÁÇÑ Á¾ÀÌÀÇ ±æÀ̸¦ °è»êÇÑ´Ù. */ -/** - * Returns the length of paper regarding page orientation - */ - hunit PageLen(void); -/** - * Returns the edit-enable width of paper - */ - hunit PageEditWid(void); -/** - * Returns the edit-enable length of paper - */ - hunit PageEditLen(void); }; -/* ±ÛÀÚ ¸ð¾ç ±¸Á¶Ã¼ */ +/* ???? ???? ?????? */ /** * @short Style of character */ @@ -213,14 +195,14 @@ struct CharShape /** * Index of character style */ - int index; /* ½ºÅ¸ÀÏÀÇ À妽º¸¦ ÀúÀå. */ + int index; /* ???????? ???????? ????. */ /** * Font size */ hunit size; unsigned char font[NLanguage]; unsigned char ratio[NLanguage]; - signed char space[NLanguage]; /* ÀÚ°£ */ + signed char space[NLanguage]; /* ???? */ unsigned char color[2]; unsigned char shade; unsigned char attr; @@ -229,7 +211,7 @@ struct CharShape bool Read(HWPFile &); }; -/* ÅÇ ¼³Á¤¿¡ ´ëÇÑ ±¸Á¶Ã¼ */ +/* ?? ?????? ???? ?????? */ #define MAXTABS 40 /** @@ -261,7 +243,7 @@ struct ParaShape /** * Index of paragraph style */ - int index; /* ½ºÅ¸ÀÏÀÇ À妽º¸¦ ÀúÀå */ + int index; /* ???????? ???????? ???? */ hunit left_margin; hunit right_margin; hunit indent; diff --git a/hwpfilter/source/hpara.h b/hwpfilter/source/hpara.h index 7b9842c93b9a..cac8bffba5a0 100644 --- a/hwpfilter/source/hpara.h +++ b/hwpfilter/source/hpara.h @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: hpara.h,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -28,7 +28,7 @@ * ************************************************************************/ -/* $Id: hpara.h,v 1.4 2008-04-10 12:06:26 rt Exp $ */ +/* $Id: hpara.h,v 1.5 2008-06-04 09:59:48 vg Exp $ */ #ifndef _HWPPARA_H_ #define _HWPPARA_H_ @@ -137,10 +137,6 @@ class DLLEXPORT HWPPara /* layoutÀ» À§ÇÑ ÇÔ¼ö */ /** - * Get line information of given line - */ - LineInfo *GetLineInfo(int line); -/** * Returns the character sytle of paragraph. */ CharShape *GetCharShape(int pos); diff --git a/hwpfilter/source/hutil.cpp b/hwpfilter/source/hutil.cpp index edcab2952d18..2e8ec0718978 100644 --- a/hwpfilter/source/hutil.cpp +++ b/hwpfilter/source/hutil.cpp @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: hutil.cpp,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -28,7 +28,7 @@ * ************************************************************************/ -/* $Id: hutil.cpp,v 1.4 2008-04-10 12:08:15 rt Exp $ */ +/* $Id: hutil.cpp,v 1.5 2008-06-04 10:00:16 vg Exp $ */ #include "precompile.h" @@ -102,17 +102,3 @@ int hstrlen(const hchar * s) n++; return (n); } - - -#ifndef _WIN32 - -char *strupr(char *str) -{ - while (*str) - { - *str = toupper(*str); - str++; - } - return str; -} -#endif // _WIN32 diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h index 77e4be6bf1c9..d4ce8fc303a1 100644 --- a/hwpfilter/source/hwpfile.h +++ b/hwpfilter/source/hwpfile.h @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: hwpfile.h,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -32,7 +32,7 @@ // hwpfile.h // (C) 1998 Mizi Research, All rights are reserved // -// $Id: hwpfile.h,v 1.4 2008-04-10 12:09:35 rt Exp $ +// $Id: hwpfile.h,v 1.5 2008-06-04 10:01:33 vg Exp $ // #ifndef _HWPFILE_H_ @@ -96,11 +96,10 @@ struct ColumnInfo{ * There are two way to read hwp information from stream, one is to read all at a time * to use @ref ReadhwpFile() method like above example, other is to read partial information * to use @ref Open(), @ref InfoRead(), @ref FontRead(), @ref StyleRead(), @ref ParaListRead(), @ref TagsRead(), - * @ref Flush() and @ref Close(). * * @short HWP file management object * @author Mizi Reserach - * @version $Id: hwpfile.h,v 1.4 2008-04-10 12:09:35 rt Exp $ + * @version $Id: hwpfile.h,v 1.5 2008-06-04 10:01:33 vg Exp $ */ class DLLEXPORT HWPFile { @@ -109,10 +108,6 @@ class DLLEXPORT HWPFile * Default constructor */ HWPFile( void ); -/** - * Create HWPFile object and call @ref Open() method - */ - HWPFile( HStream& stream ); ~HWPFile( void ); @@ -128,15 +123,6 @@ class DLLEXPORT HWPFile * @see State() */ int Open( HStream & ); -/** - * Flushs the stream of HIODev. - */ - void Flush( void ); - -/** - * Closes the stream of HIODev. - */ - void Close( void ); /** * Say current state @@ -219,16 +205,6 @@ class DLLEXPORT HWPFile */ bool TagsRead(void); -/** - * Get the name of current file - */ - const char *GetFileName(void) const; - -/** - * @returns True if compressed, otherwise false - */ - bool IsCompressedFile() const; - enum Paper { UserPaper = 0, @@ -254,16 +230,10 @@ class DLLEXPORT HWPFile void AddPageNumber(ShowPageNum *); void AddTable(Table *); - enum Paper GetPaperKind() const; - void GetPaperSize(hunit& Width, hunit& Height) const; - bool GetPaperOrientation() const; - ColumnDef* GetColumnDef(int); int GetPageMasterNum(int page); int getCurrentPage(){ return m_nCurrentPage;} - int GetFontCount(int lang); - const char *GetFontName(int lang, int id); HWPInfo *GetHWPInfo(void) { return &_hwpInfo; } HWPFont *GetHWPFont(void) { return &_hwpFont; } HWPStyle *GetHWPStyle(void) { return &_hwpStyle; } diff --git a/hwpfilter/source/mzstring.cpp b/hwpfilter/source/mzstring.cpp index dcc45c44f163..65600addc1cd 100644 --- a/hwpfilter/source/mzstring.cpp +++ b/hwpfilter/source/mzstring.cpp @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: mzstring.cpp,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -28,7 +28,7 @@ * ************************************************************************/ -/* NAME $Id: mzstring.cpp,v 1.4 2008-04-10 12:12:12 rt Exp $ +/* NAME $Id: mzstring.cpp,v 1.5 2008-06-04 10:02:20 vg Exp $ * PURPOSE * supposed to be used instead of std::string * NOTES @@ -80,61 +80,6 @@ MzString::MzString() } -MzString::MzString(int init) -{ - Length = 0; - Allocated = 0; - Data = 0; - allocate(init); -} - - -MzString::MzString(const char *s) -{ - Data = 0; - Allocated = 0; - Length = 0; - if (s) - copy(s, strlen(s)); -} - - -MzString::MzString(const char *s, int len) -{ - Data = 0; - Allocated = 0; - Length = 0; - copy(s, len); -} - - -MzString::MzString(MzString const *s) -{ - Data = 0; - Allocated = 0; - Length = 0; - if (s) - copy(s->Data, s->length()); -} - - -// -// This can be used for performance reasons if it is known the -// MzString will need to grow. -// - -/*? -MzString::MzString(MzString const &s, int len) -{ - Data = 0; - Allocated = 0; - Length = 0; - if (len == 0) // default - len = s.length(); - copy(s.Data, len); -} -*/ - MzString::~MzString() { if (Data) @@ -194,12 +139,6 @@ void MzString::append(const char *s) } -void MzString::append(const char ch) -{ - append(&ch, 1); -} - - int MzString::compare(const char *s) { if (!Data) return -1; @@ -210,21 +149,6 @@ int MzString::compare(const char *s) } -#if 0 -int MzString::find(char *str) -{ - if (Data==NULL) return -1; - int len = strlen(str); - - Data[Length] = '\0'; - for (int ii = 0; ii <= Length - len; ii++) - { - if (strncmp(Data + ii, str, len) == 0) - return ii; - } - return -1; -} -#endif int MzString::find(char ch) { return find(ch,0); @@ -328,42 +252,6 @@ MzString &MzString::operator << (MzString const &s) } -/*? -char MzString::operator >> (char &c) -{ - c = '\0'; - if( Data && *Data ) { - c = Data[Length - 1]; - Data[Length - 1] = '\0'; - Length--; - } - return c; -} -*/ - -/* -char MzString::last() -{ - if (Length > 0) - return Data[Length - 1]; - else - return 0; -} -*/ - -/*? -char &MzString::operator [] (int n) -{ - static char null = 0; - if( n >= Length ) - return null; - else if (n < 0) - return (*this)[Length + n]; - else - return Data[n]; -} -*/ - char MzString::operator [] (int n) { if (Data && 0 <= n && n < Length) @@ -380,15 +268,6 @@ void MzString::replace(int pos, char ch) } -MzString &MzString::chop(int n) -{ - Length -= n; - if (Length < 0) - Length = 0; - return *this; -} - - //------------------------------------------------------------------------ // Private Methods. // @@ -436,14 +315,3 @@ bool MzString::resize(int len) { return allocate(len); } - - -void MzString::copy(const char *s, int len) -{ - if (s==NULL) return; - if (allocate(len)) - { - if (len > 0) memcpy(Data, s, len); - Length = len; - } -} diff --git a/hwpfilter/source/mzstring.h b/hwpfilter/source/mzstring.h index b6b884da4afd..729cd21a6877 100644 --- a/hwpfilter/source/mzstring.h +++ b/hwpfilter/source/mzstring.h @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: mzstring.h,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -97,15 +97,10 @@ class MzString { public: MzString(); // Create an empty string - MzString(int init); // initial allocated length - MzString(const char *s); // from null terminated s - MzString(const char *s, int len); // from s with length len - MzString(MzString const *s); // Copy constructor // if len = 0, len becomes s.length) MzString(MzString const &s, int len = 0); ~MzString(); - bool empty(void) const; int length() const; const char* c_str() const; operator char*() { return (char *)c_str(); } @@ -161,10 +156,6 @@ class MzString void append (MzString const &s); void append (const char *s); void append (const char *s, int n); - void append (const char ch); - -/** ½ºÆ®¸µÀÇ ³¡¿¡¼ ±ÛÀÚ¸¦ Áö¿î´Ù. */ - MzString &chop(int n = 1); private: int Length; // Current Length @@ -174,18 +165,8 @@ class MzString // Allocate some space for the data. // Delete Data if it has been allocated. bool allocate(int len); - void copy(const char *s, int len); }; -// -// Inline methods. -// -inline bool MzString::empty(void) const -{ - return Data == 0L || Data[0] == '\0'; -} - - inline int MzString::length() const { return Length; |