Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
bdeb1588
Kaydet (Commit)
bdeb1588
authored
Ock 11, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:unusedmethods unused return value in hwpfilter
Change-Id: Ib225db89e60708f6b55b3cb86f8e881386fab86f
üst
0f3a3c38
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
65 additions
and
73 deletions
+65
-73
formula.cxx
hwpfilter/source/formula.cxx
+2
-4
formula.h
hwpfilter/source/formula.h
+1
-1
hfont.cxx
hwpfilter/source/hfont.cxx
+3
-4
hfont.h
hwpfilter/source/hfont.h
+1
-1
hinfo.cxx
hwpfilter/source/hinfo.cxx
+13
-16
hinfo.h
hwpfilter/source/hinfo.h
+2
-2
hpara.cxx
hwpfilter/source/hpara.cxx
+8
-10
hpara.h
hwpfilter/source/hpara.h
+1
-1
htags.cxx
hwpfilter/source/htags.cxx
+8
-11
htags.h
hwpfilter/source/htags.h
+2
-2
hwpfile.cxx
hwpfilter/source/hwpfile.cxx
+17
-14
hwpfile.h
hwpfilter/source/hwpfile.h
+7
-7
No files found.
hwpfilter/source/formula.cxx
Dosyayı görüntüle @
bdeb1588
...
...
@@ -568,10 +568,10 @@ void Formula::makeBlock(Node *res)
#endif
}
int
Formula
::
parse
()
void
Formula
::
parse
()
{
Node
*
res
=
nullptr
;
if
(
!
eq
)
return
0
;
if
(
!
eq
)
return
;
if
(
isHwpEQ
){
MzString
a
;
// fprintf(stderr,"\n\n[BEFORE]\n[%s]\n",eq);
...
...
@@ -627,8 +627,6 @@ int Formula::parse()
nodelist
.
pop_front
();
delete
tmpNode
;
}
return
0
;
}
void
Formula
::
trim
()
...
...
hwpfilter/source/formula.h
Dosyayı görüntüle @
bdeb1588
...
...
@@ -55,7 +55,7 @@ public:
pList
=
p
;
rList
=
static_cast
<
XAttributeList
*>
(
pList
);
}
int
parse
();
void
parse
();
private
:
void
trim
();
void
makeMathML
(
Node
*
res
);
...
...
hwpfilter/source/hfont.cxx
Dosyayı görüntüle @
bdeb1588
...
...
@@ -43,18 +43,17 @@ HWPFont::~HWPFont()
}
int
HWPFont
::
AddFont
(
int
lang
,
const
char
*
font
)
void
HWPFont
::
AddFont
(
int
lang
,
const
char
*
font
)
{
int
nfonts
;
if
(
!
(
lang
>=
0
&&
lang
<
NLanguage
))
return
0
;
return
;
nfonts
=
nFonts
[
lang
];
if
(
MAXFONTS
<=
nfonts
)
return
0
;
return
;
strncpy
(
fontnames
[
lang
]
+
FONTNAMELEN
*
nfonts
,
font
,
FONTNAMELEN
-
1
);
nFonts
[
lang
]
++
;
return
nfonts
;
}
...
...
hwpfilter/source/hfont.h
Dosyayı görüntüle @
bdeb1588
...
...
@@ -54,7 +54,7 @@ class DLLEXPORT HWPFont
* @param lang Language index
* @param font Name of font family
*/
int
AddFont
(
int
lang
,
const
char
*
font
);
void
AddFont
(
int
lang
,
const
char
*
font
);
/**
* @param lang Language index
* @param id Index of font
...
...
hwpfilter/source/hinfo.cxx
Dosyayı görüntüle @
bdeb1588
...
...
@@ -197,24 +197,24 @@ bool HWPSummary::Read(HWPFile & hwpf)
}
bool
ParaShape
::
Read
(
HWPFile
&
hwpf
)
void
ParaShape
::
Read
(
HWPFile
&
hwpf
)
{
pagebreak
=
0
;
unsigned
short
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
left_margin
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
right_margin
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
indent
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
lspacing
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
pspacing_next
=
tmp16
;
hwpf
.
Read1b
(
&
condense
,
1
);
...
...
@@ -224,37 +224,36 @@ bool ParaShape::Read(HWPFile & hwpf)
hwpf
.
Read1b
(
&
tabs
[
ii
].
type
,
1
);
hwpf
.
Read1b
(
&
tabs
[
ii
].
dot_continue
,
1
);
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
tabs
[
ii
].
position
=
tmp16
;
}
hwpf
.
Read1b
(
&
coldef
.
ncols
,
1
);
hwpf
.
Read1b
(
&
coldef
.
separator
,
1
);
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
coldef
.
spacing
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
coldef
.
columnlen
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
coldef
.
columnlen0
=
tmp16
;
hwpf
.
Read1b
(
&
shade
,
1
);
hwpf
.
Read1b
(
&
outline
,
1
);
hwpf
.
Read1b
(
&
outline_continue
,
1
);
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
pspacing_prev
=
tmp16
;
hwpf
.
Read1b
(
reserved
,
2
);
return
(
!
hwpf
.
State
());
}
bool
CharShape
::
Read
(
HWPFile
&
hwpf
)
void
CharShape
::
Read
(
HWPFile
&
hwpf
)
{
unsigned
short
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
size
=
tmp16
;
hwpf
.
Read1b
(
font
,
NLanguage
);
hwpf
.
Read1b
(
ratio
,
NLanguage
);
...
...
@@ -263,8 +262,6 @@ bool CharShape::Read(HWPFile & hwpf)
hwpf
.
Read1b
(
&
shade
,
1
);
hwpf
.
Read1b
(
&
attr
,
1
);
hwpf
.
Read1b
(
reserved
,
4
);
return
(
!
hwpf
.
State
());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
hwpfilter/source/hinfo.h
Dosyayı görüntüle @
bdeb1588
...
...
@@ -231,7 +231,7 @@ struct CharShape
unsigned
char
attr
;
unsigned
char
reserved
[
4
];
bool
Read
(
HWPFile
&
);
void
Read
(
HWPFile
&
);
};
/* ?? ?????? ???? ?????? */
...
...
@@ -284,7 +284,7 @@ struct ParaShape
CharShape
*
cshape
;
unsigned
char
pagebreak
;
bool
Read
(
HWPFile
&
);
void
Read
(
HWPFile
&
);
// virtual ~ParaShape();
};
#endif // INCLUDED_HWPFILTER_SOURCE_HINFO_H
...
...
hwpfilter/source/hpara.cxx
Dosyayı görüntüle @
bdeb1588
...
...
@@ -29,29 +29,29 @@
#include "hbox.h"
#include "hutil.h"
bool
LineInfo
::
Read
(
HWPFile
&
hwpf
,
HWPPara
*
pPara
)
void
LineInfo
::
Read
(
HWPFile
&
hwpf
,
HWPPara
*
pPara
)
{
if
(
!
hwpf
.
Read2b
(
pos
))
return
false
;
return
;
unsigned
short
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
space_width
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
height
=
tmp16
;
// internal information
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
pgy
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
sx
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
psx
=
tmp16
;
if
(
!
hwpf
.
Read2b
(
tmp16
))
return
false
;
return
;
pex
=
tmp16
;
height_sp
=
0
;
...
...
@@ -62,8 +62,6 @@ bool LineInfo::Read(HWPFile & hwpf, HWPPara *pPara)
pPara
->
pshape
.
reserved
[
0
]
=
sal
::
static_int_cast
<
unsigned
char
>
(
pex
&
0x01
);
pPara
->
pshape
.
reserved
[
1
]
=
sal
::
static_int_cast
<
unsigned
char
>
(
pex
&
0x02
);
}
return
(
!
hwpf
.
State
());
}
HWPPara
::
HWPPara
()
...
...
hwpfilter/source/hpara.h
Dosyayı görüntüle @
bdeb1588
...
...
@@ -68,7 +68,7 @@ struct LineInfo
hunit
height_sp
;
unsigned
short
softbreak
;
// column, page, section
bool
Read
(
HWPFile
&
hwpf
,
HWPPara
*
para
);
void
Read
(
HWPFile
&
hwpf
,
HWPPara
*
para
);
};
/**
* It represents the paragraph.
...
...
hwpfilter/source/htags.cxx
Dosyayı görüntüle @
bdeb1588
...
...
@@ -25,7 +25,7 @@
#include "hwpfile.h"
#include "htags.h"
bool
HyperText
::
Read
(
HWPFile
&
hwpf
)
void
HyperText
::
Read
(
HWPFile
&
hwpf
)
{
hwpf
.
Read1b
(
filename
,
256
);
hwpf
.
Read2b
(
bookmark
,
16
);
...
...
@@ -41,7 +41,6 @@ bool HyperText::Read(HWPFile & hwpf)
break
;
}
}
return
true
;
}
...
...
@@ -101,21 +100,21 @@ OlePicture::~OlePicture()
#define FILESTG_SIGNATURE_NORMAL 0xF8995568
bool
OlePicture
::
Read
(
HWPFile
&
hwpf
)
void
OlePicture
::
Read
(
HWPFile
&
hwpf
)
{
if
(
size
<=
0
)
return
false
;
return
;
// We process only FILESTG_SIGNATURE_NORMAL.
hwpf
.
Read4b
(
&
signature
,
1
);
if
(
signature
!=
FILESTG_SIGNATURE_NORMAL
)
return
false
;
return
;
#ifdef WIN32
char
*
data
=
new
char
[
size
];
if
(
hwpf
.
ReadBlock
(
data
,
size
)
==
0
)
{
delete
[]
data
;
return
false
;
return
;
}
FILE
*
fp
;
char
tname
[
200
];
...
...
@@ -124,7 +123,7 @@ bool OlePicture::Read(HWPFile & hwpf)
if
(
0
==
(
fp
=
fopen
(
tname
,
"wb"
)))
{
delete
[]
data
;
return
false
;
return
;
}
fwrite
(
data
,
size
,
1
,
fp
);
delete
[]
data
;
...
...
@@ -135,15 +134,13 @@ bool OlePicture::Read(HWPFile & hwpf)
NULL
,
0
,
&
pis
)
!=
S_OK
)
{
pis
=
0
;
unlink
(
tname
);
return
false
;
return
;
}
unlink
(
tname
);
#else
if
(
pis
==
nullptr
||
hwpf
.
ReadBlock
(
pis
,
size
)
==
0
)
return
false
;
return
;
#endif
return
true
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
hwpfilter/source/htags.h
Dosyayı görüntüle @
bdeb1588
...
...
@@ -46,7 +46,7 @@ struct HyperText
char
macro
[
325
];
uchar
type
;
char
reserve
[
3
];
bool
Read
(
HWPFile
&
hwpf
);
void
Read
(
HWPFile
&
hwpf
);
};
/**
* @short Win32 OLE object
...
...
@@ -63,7 +63,7 @@ struct OlePicture
explicit
OlePicture
(
int
tsize
);
~
OlePicture
(
void
);
bool
Read
(
HWPFile
&
hwpf
);
void
Read
(
HWPFile
&
hwpf
);
};
#endif // INCLUDED_HWPFILTER_SOURCE_HTAGS_H
...
...
hwpfilter/source/hwpfile.cxx
Dosyayı görüntüle @
bdeb1588
...
...
@@ -176,15 +176,17 @@ int HWPFile::Read1b(void *ptr, size_t nmemb)
return
hiodev
?
hiodev
->
read1b
(
ptr
,
nmemb
)
:
0
;
}
int
HWPFile
::
Read2b
(
void
*
ptr
,
size_t
nmemb
)
void
HWPFile
::
Read2b
(
void
*
ptr
,
size_t
nmemb
)
{
return
hiodev
?
hiodev
->
read2b
(
ptr
,
nmemb
)
:
0
;
if
(
hiodev
)
hiodev
->
read2b
(
ptr
,
nmemb
);
}
int
HWPFile
::
Read4b
(
void
*
ptr
,
size_t
nmemb
)
void
HWPFile
::
Read4b
(
void
*
ptr
,
size_t
nmemb
)
{
return
hiodev
?
hiodev
->
read4b
(
ptr
,
nmemb
)
:
0
;
if
(
hiodev
)
hiodev
->
read4b
(
ptr
,
nmemb
);
}
...
...
@@ -200,9 +202,10 @@ size_t HWPFile::SkipBlock(size_t size)
}
bool
HWPFile
::
SetCompressed
(
bool
flag
)
void
HWPFile
::
SetCompressed
(
bool
flag
)
{
return
hiodev
&&
hiodev
->
setCompressed
(
flag
);
if
(
hiodev
)
hiodev
->
setCompressed
(
flag
);
}
...
...
@@ -218,27 +221,27 @@ HIODev *HWPFile::SetIODevice(HIODev * new_hiodev)
// end of HIODev wrapper
bool
HWPFile
::
InfoRead
()
void
HWPFile
::
InfoRead
()
{
return
_hwpInfo
.
Read
(
*
this
);
_hwpInfo
.
Read
(
*
this
);
}
bool
HWPFile
::
FontRead
()
void
HWPFile
::
FontRead
()
{
return
_hwpFont
.
Read
(
*
this
);
_hwpFont
.
Read
(
*
this
);
}
bool
HWPFile
::
StyleRead
()
void
HWPFile
::
StyleRead
()
{
return
_hwpStyle
.
Read
(
*
this
);
_hwpStyle
.
Read
(
*
this
);
}
bool
HWPFile
::
ParaListRead
()
void
HWPFile
::
ParaListRead
()
{
return
ReadParaList
(
plist
);
ReadParaList
(
plist
);
}
bool
HWPFile
::
ReadParaList
(
std
::
list
<
HWPPara
*
>
&
aplist
,
unsigned
char
flag
)
...
...
hwpfilter/source/hwpfile.h
Dosyayı görüntüle @
bdeb1588
...
...
@@ -142,11 +142,11 @@ class DLLEXPORT HWPFile
/**
* Reads nmemb short type array from HIODev
*/
int
Read2b
(
void
*
ptr
,
size_t
nmemb
);
void
Read2b
(
void
*
ptr
,
size_t
nmemb
);
/**
* Reads nmemb long type array from HIODev
*/
int
Read4b
(
void
*
ptr
,
size_t
nmemb
);
void
Read4b
(
void
*
ptr
,
size_t
nmemb
);
/**
* Reads some bytes from HIODev not regarding endian's way
* @param size Amount for reading
...
...
@@ -163,7 +163,7 @@ class DLLEXPORT HWPFile
/**
* Sets if the stream is compressed
*/
bool
SetCompressed
(
bool
);
void
SetCompressed
(
bool
);
/**
* Sets current HIODev
*/
...
...
@@ -176,19 +176,19 @@ class DLLEXPORT HWPFile
/**
* Reads document information of hwp file from HIODev
*/
bool
InfoRead
(
void
);
void
InfoRead
(
void
);
/**
* Reads font list of hwp file from HIODev
*/
bool
FontRead
(
void
);
void
FontRead
(
void
);
/**
* Reads style list of hwp file from HIODev
*/
bool
StyleRead
(
void
);
void
StyleRead
(
void
);
/**
* Reads paragraph list of hwp file from HIODev
*/
bool
ParaListRead
();
void
ParaListRead
();
/* 그림 등의 추가 정보를 읽는다. */
/**
* Reads additional information like embedded image of hwp file from HIODev
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment