summaryrefslogtreecommitdiff
path: root/hwpfilter/source/hpara.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:16:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:27 +0100
commitc3dcdeb1d2bccc3785e3675843a5228e183b307f (patch)
tree857f6a942ba3b535be2baa1b43c5e5bb834aaff5 /hwpfilter/source/hpara.cxx
parent2df257e95e655de7b0f888b033a56cd800d3002e (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Idec97093ca48c14b825c7b87ec050cc99aadc526
Diffstat (limited to 'hwpfilter/source/hpara.cxx')
-rw-r--r--hwpfilter/source/hpara.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx
index e7febc491183..7b474bdba72d 100644
--- a/hwpfilter/source/hpara.cxx
+++ b/hwpfilter/source/hpara.cxx
@@ -67,7 +67,7 @@ bool LineInfo::Read(HWPFile & hwpf, HWPPara *pPara)
}
HWPPara::HWPPara()
- : _next(NULL)
+ : _next(nullptr)
, reuse_shape(0)
, nch(0)
, nline(0)
@@ -78,9 +78,9 @@ HWPPara::HWPPara()
, ctrlflag(0)
, pstyno(0)
, pno(0)
- , linfo(NULL)
- , cshapep(NULL)
- , hhstr(NULL)
+ , linfo(nullptr)
+ , cshapep(nullptr)
+ , hhstr(nullptr)
{
memset(&cshape, 0, sizeof(cshape));
memset(&pshape, 0, sizeof(pshape));
@@ -186,11 +186,11 @@ bool HWPPara::Read(HWPFile & hwpf, unsigned char flag)
hhstr = ::comphelper::newArray_null<HBox *>(nch);
if (!hhstr) { return false; }
for (ii = 0; ii < nch; ii++)
- hhstr[ii] = 0;
+ hhstr[ii] = nullptr;
ii = 0;
while (ii < nch)
{
- if (0 == (hhstr[ii] = readHBox(hwpf)))
+ if (nullptr == (hhstr[ii] = readHBox(hwpf)))
return false;
if (hhstr[ii]->hh == CH_END_PARA)
break;
@@ -218,12 +218,12 @@ HBox *HWPPara::readHBox(HWPFile & hwpf)
{
hchar hh;
if (!hwpf.Read2b(hh))
- return 0;
+ return nullptr;
- HBox *hbox = 0;
+ HBox *hbox = nullptr;
if (hwpf.State() != HWP_NoError)
- return 0;
+ return nullptr;
if (hh > 31 || hh == CH_END_PARA)
hbox = new HBox(hh);
@@ -310,7 +310,7 @@ HBox *HWPPara::readHBox(HWPFile & hwpf)
{
delete hbox;
- return 0;
+ return nullptr;
}
if( hh == CH_TEXT_BOX || hh == CH_PICTURE || hh == CH_LINE )
{