summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-17 18:47:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:48 +0100
commit552efce640f31130d8e598b1381038b565c81584 (patch)
tree189c52f0f430457e898abb3d3f488f8cd09026a4 /hwpfilter
parentb7c27fef4ee42c17bde6aa05dea583e31d5b32fe (diff)
Some more loplugin:cstylecast: hwpfilter
Change-Id: I0ba3fe95ab6ef317166b286531a718287308f62f
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/grammar.cxx4
-rw-r--r--hwpfilter/source/hiodev.cxx2
-rw-r--r--hwpfilter/source/hwpread.cxx2
-rw-r--r--hwpfilter/source/hwpreader.cxx24
4 files changed, 16 insertions, 16 deletions
diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx
index bc2747b6ae6d..93e732983c0d 100644
--- a/hwpfilter/source/grammar.cxx
+++ b/hwpfilter/source/grammar.cxx
@@ -660,10 +660,10 @@ yynewstate:
yyfree_stacks = 1;
#endif
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1,
+ __yy_memcpy (yyss, yyss1,
size * (unsigned int) sizeof (*yyssp));
yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+ __yy_memcpy (yyvs, yyvs1,
size * (unsigned int) sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index ec25343c87a7..8edba9226c0a 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -247,7 +247,7 @@ int HStreamIODev::skipBlock(int size)
HMemIODev::HMemIODev(char *s, int len)
{
init();
- ptr = (uchar *) s;
+ ptr = reinterpret_cast<uchar *>(s);
length = len;
}
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index 5763a5b757b9..d72e919556eb 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -432,7 +432,7 @@ bool Picture::Read(HWPFile & hwpf)
hwpf.Read1b(follow, follow_block_size);
if (pictype == PICTYPE_DRAW)
{
- hmem = new HMemIODev((char *) follow, follow_block_size);
+ hmem = new HMemIODev(reinterpret_cast<char *>(follow), follow_block_size);
LoadDrawingObjectBlock(this);
style.cell = picinfo.picdraw.hdo;
delete hmem;
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 28733fa61477..484926e7dd5c 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -140,7 +140,7 @@ sal_Bool HwpReader::filter(const Sequence< PropertyValue >& rDescriptor) throw(R
nRead = xInputStream->readBytes(aBuffer, nBlock);
if( nRead == 0 )
break;
- stream->addData( (const byte *)aBuffer.getConstArray(), nRead );
+ stream->addData( reinterpret_cast<const byte *>(aBuffer.getConstArray()), nRead );
nTotal += nRead;
}
@@ -500,7 +500,7 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo )
if( !prop->pictype )
{
padd( "xlink:href", sXML_CDATA,
- hconv(kstr2hstr( (uchar *)urltounix(prop->szPatternFile).c_str()).c_str()));
+ hconv(kstr2hstr( reinterpret_cast<uchar const *>(urltounix(prop->szPatternFile).c_str())).c_str()));
}
else
{
@@ -543,7 +543,7 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo )
else
{
padd( "xlink:href", sXML_CDATA,
- hconv(kstr2hstr( (uchar *)urltounix(prop->szPatternFile).c_str()).c_str()));
+ hconv(kstr2hstr( reinterpret_cast<uchar const *>(urltounix(prop->szPatternFile).c_str())).c_str()));
}
}
@@ -723,7 +723,7 @@ void HwpReader::makeStyles()
for (int ii = 0; ii < hwpstyle.Num(); ii++)
{
- unsigned char *stylename = (unsigned char *) hwpstyle.GetName(ii);
+ unsigned char *stylename = reinterpret_cast<unsigned char *>(hwpstyle.GetName(ii));
padd("style:name", sXML_CDATA, (hconv(kstr2hstr(stylename).c_str())));
padd("style:family", sXML_CDATA, "paragraph");
padd("style:parent-style-name", sXML_CDATA, "Standard");
@@ -1323,7 +1323,7 @@ void HwpReader::parseCharShape(CharShape * cshape)
ascii(Int2Str(cshape->size / 25, "%dpt", buf)));
::std::string const tmp = hstr2ksstr(kstr2hstr(
- (unsigned char *) hwpfont.GetFontName(0, cshape->font[0])).c_str());
+ reinterpret_cast<unsigned char const *>(hwpfont.GetFontName(0, cshape->font[0]))).c_str());
double fRatio = 1.0;
int size = getRepFamilyName(tmp.c_str(), buf, fRatio);
@@ -1709,7 +1709,7 @@ void HwpReader::makePageStyle()
hconv(kstr2hstr((uchar*) urltowin(hwpinfo.back_info.filename).c_str()).c_str()));
#else
padd("xlink:href", sXML_CDATA,
- hconv(kstr2hstr( (uchar *)urltounix(hwpinfo.back_info.filename).c_str()).c_str()));
+ hconv(kstr2hstr( reinterpret_cast<uchar const *>(urltounix(hwpinfo.back_info.filename).c_str())).c_str()));
#endif
padd("xlink:type", sXML_CDATA, "simple");
padd("xlink:actuate", sXML_CDATA, "onLoad");
@@ -1725,7 +1725,7 @@ void HwpReader::makePageStyle()
if( hwpinfo.back_info.type == 2 ){
rstartEl("office:binary-data", rList);
pList->clear();
- boost::shared_ptr<char> pStr(base64_encode_string((unsigned char *) hwpinfo.back_info.data, hwpinfo.back_info.size ), Free<char>());
+ boost::shared_ptr<char> pStr(base64_encode_string(reinterpret_cast<unsigned char *>(hwpinfo.back_info.data), hwpinfo.back_info.size ), Free<char>());
rchars(ascii(pStr.get()));
rendEl("office:binary-data");
}
@@ -3703,13 +3703,13 @@ void HwpReader::makeHyperText(TxtBox * hbox)
HyperText *hypert = hwpfile.GetHyperText();
if( !hypert ) return;
- if( strlen((char *)hypert->filename) > 0 ){
+ if( strlen(reinterpret_cast<char *>(hypert->filename)) > 0 ){
::std::string const tmp = hstr2ksstr(hypert->bookmark);
::std::string const tmp2 = hstr2ksstr(kstr2hstr(
#ifdef _WIN32
(uchar *) urltowin((char *)hypert->filename).c_str()).c_str());
#else
- (uchar *) urltounix((char *)hypert->filename).c_str()).c_str());
+ reinterpret_cast<uchar const *>(urltounix(reinterpret_cast<char *>(hypert->filename)).c_str())).c_str());
#endif
padd("xlink:type", sXML_CDATA, "simple");
if (tmp.size() > 0 && strcmp(tmp.c_str(), "[HTML]")) {
@@ -3811,10 +3811,10 @@ void HwpReader::makePicture(Picture * hbox)
#else
if( hbox->follow[4] != 0 )
padd("xlink:href", sXML_CDATA,
- (hconv(kstr2hstr((uchar *)urltounix((char *)(hbox->follow + 4)).c_str()).c_str())));
+ (hconv(kstr2hstr(reinterpret_cast<uchar const *>(urltounix(reinterpret_cast<char *>(hbox->follow + 4)).c_str())).c_str())));
else
padd("xlink:href", sXML_CDATA,
- (hconv(kstr2hstr((uchar *)urltounix((char *)(hbox->follow + 5)).c_str()).c_str())));
+ (hconv(kstr2hstr(reinterpret_cast<uchar const *>(urltounix(reinterpret_cast<char *>(hbox->follow + 5)).c_str())).c_str())));
#endif
rstartEl("draw:a", rList);
pList->clear();
@@ -3869,7 +3869,7 @@ void HwpReader::makePicture(Picture * hbox)
padd("xlink:href", sXML_CDATA, (hconv(kstr2hstr((uchar *) buf).c_str())));
#else
padd("xlink:href", sXML_CDATA,
- (hconv(kstr2hstr((uchar *) urltounix(hbox->picinfo.picun.path).c_str()).c_str())));
+ (hconv(kstr2hstr(reinterpret_cast<uchar const *>(urltounix(hbox->picinfo.picun.path).c_str())).c_str())));
#endif
padd("xlink:type", sXML_CDATA, "simple");
padd("xlink:show", sXML_CDATA, "embed");