summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-18 14:55:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-19 08:07:18 +0000
commit877774c05731b7505a3d3a947a1dcb528f36df41 (patch)
tree7576ec1fcdd6bb6357b7d96347a720fb82d4ee6e /hwpfilter
parentf019ee7cf9e278cd8a27b1c36172ad4c8124080c (diff)
loplugin:expandablemethodds in hwpfilter..linguistic
Change-Id: If20fd4a6cf8a8e005804dbb7caf41cce73d587a5 Reviewed-on: https://gerrit.libreoffice.org/30016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hbox.h5
-rw-r--r--hwpfilter/source/hwpread.cxx2
-rw-r--r--hwpfilter/source/mzstring.cxx7
-rw-r--r--hwpfilter/source/mzstring.h4
4 files changed, 2 insertions, 16 deletions
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index 064521925f51..3832c7617174 100644
--- a/hwpfilter/source/hbox.h
+++ b/hwpfilter/source/hbox.h
@@ -376,11 +376,6 @@ struct TxtBox: public FBox
TxtBox();
virtual ~TxtBox() override;
-/**
- * @returns Count of cell.
- */
- int NCell() { return nCell; }
-
virtual bool Read(HWPFile &hwpf) override;
};
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index a939b3cb15ad..377c13ee203c 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -281,7 +281,7 @@ bool TxtBox::Read(HWPFile & hwpf)
UpdateBBox(this);
- ncell = NCell();
+ ncell = nCell;
if (!(ncell > 0)){
return hwpf.SetState(HWP_InvalidFileFormat);
}
diff --git a/hwpfilter/source/mzstring.cxx b/hwpfilter/source/mzstring.cxx
index b99b9d0044ee..e5db9967f827 100644
--- a/hwpfilter/source/mzstring.cxx
+++ b/hwpfilter/source/mzstring.cxx
@@ -89,7 +89,7 @@ void MzString::append(const char *s, int slen)
return;
int new_len = Length + slen;
- if (resize(new_len))
+ if (allocate(new_len))
{
memcpy(Data + Length, s, slen);
Length = new_len;
@@ -259,9 +259,4 @@ bool MzString::allocate(int len)
}
-bool MzString::resize(int len)
-{
- return allocate(len);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/hwpfilter/source/mzstring.h b/hwpfilter/source/mzstring.h
index 4afb0e54fb8a..89bd240691d3 100644
--- a/hwpfilter/source/mzstring.h
+++ b/hwpfilter/source/mzstring.h
@@ -88,10 +88,6 @@ class MzString
const char* c_str() const;
operator char*() { return const_cast<char *>(c_str()); }
-// If it is not possible to use the constructor with an initial
-// allocation size, use the following member to set the size.
- bool resize(int len);
-
// Assignment
MzString &operator = (const MzString &s);
MzString &operator = (const char *s);