INTEGRATION: CWS sw30bf04 (1.4.2); FILE MERGED

2008/04/16 14:07:55 ama 1.4.2.1: Patch #i86356#: Remove unused methods
This commit is contained in:
Vladimir Glazounov 2008-06-04 09:02:42 +00:00
parent 2ec4fd903a
commit d1af3a5fc1
9 changed files with 39 additions and 355 deletions

View file

@ -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;
}

View file

@ -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_
@ -107,12 +107,6 @@ int gz_close ( gz_stream *file );
* @returns The number of bytes actually read
*/
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
@ -120,12 +114,4 @@ int gz_write ( gz_stream *file, const voidp buf, unsigned len );
* @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_ */

View file

@ -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)

View file

@ -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 classHWPFile에 .
(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;

View file

@ -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_
@ -136,10 +136,6 @@ class DLLEXPORT HWPPara
void SetNext(HWPPara *n) { _next = n; };
/* layoutÀ» À§ÇÑ ÇÔ¼ö */
/**
* Get line information of given line
*/
LineInfo *GetLineInfo(int line);
/**
* Returns the character sytle of paragraph.
*/

View file

@ -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

View file

@ -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; }

View file

@ -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;
}
}

View file

@ -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;