[Libreoffice-commits] core.git: 3 commits - hwpfilter/source i18npool/source idl/inc idl/source

Noel Grandin noel at peralex.com
Mon Jan 11 03:50:32 PST 2016


 hwpfilter/source/formula.cxx      |    6 ++----
 hwpfilter/source/formula.h        |    2 +-
 hwpfilter/source/hfont.cxx        |    7 +++----
 hwpfilter/source/hfont.h          |    2 +-
 hwpfilter/source/hinfo.cxx        |   29 +++++++++++++----------------
 hwpfilter/source/hinfo.h          |    4 ++--
 hwpfilter/source/hpara.cxx        |   18 ++++++++----------
 hwpfilter/source/hpara.h          |    2 +-
 hwpfilter/source/htags.cxx        |   19 ++++++++-----------
 hwpfilter/source/htags.h          |    4 ++--
 hwpfilter/source/hwpfile.cxx      |   31 +++++++++++++++++--------------
 hwpfilter/source/hwpfile.h        |   14 +++++++-------
 i18npool/source/search/levdis.cxx |    3 +--
 i18npool/source/search/levdis.hxx |    2 +-
 idl/inc/basobj.hxx                |    4 ++--
 idl/inc/bastype.hxx               |   10 +++-------
 idl/inc/database.hxx              |    2 +-
 idl/inc/hash.hxx                  |    4 ----
 idl/source/objects/basobj.cxx     |    3 +--
 idl/source/objects/bastype.cxx    |   14 ++++++--------
 idl/source/prj/database.cxx       |    3 +--
 21 files changed, 81 insertions(+), 102 deletions(-)

New commits:
commit ea5b48e9da1ea750cc4549f7cd76771800101ed2
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jan 11 13:31:24 2016 +0200

    loplugin:unusedmethods unused return value in idl
    
    Change-Id: I790fea8b88ca99d17de14f1e91081671422dd8db

diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index e3ad1e5..0725e6d 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -128,7 +128,7 @@ public:
 
     void            Push( SvMetaObject * pObj )
                     { aList.push_back( pObj ); }
-    SvMetaObject *  Pop() { return aList.pop_back(); }
+    void            Pop() { aList.pop_back(); }
     SvMetaObject *  Get( std::function<bool ( const SvMetaObject* )> isSvMetaObject )
                     {
                         for( SvMetaObjectMemberList::reverse_iterator it = aList.rbegin(); it != aList.rend(); ++it )
@@ -200,7 +200,7 @@ public:
 
     SvMetaModule *      GetModule() const;
 
-    const SvGlobalName &GetUUId() const;
+    void                GetUUId() const;
     void                SetModule( SvIdlDataBase & rBase );
     virtual bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
 
diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx
index 04335fd..f31121a 100644
--- a/idl/inc/bastype.hxx
+++ b/idl/inc/bastype.hxx
@@ -79,8 +79,8 @@ public:
     sal_uInt32  GetValue() const { return nValue; }
     void        SetValue( sal_uInt32 nVal ) { nValue = nVal; }
 
-    bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
-    bool        ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName,
+    void        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+    void        ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName,
                            SvTokenStream & rInStm );
 };
 
@@ -112,7 +112,7 @@ class SvHelpText : public SvString
 {
 public:
                 SvHelpText() {}
-    bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+    void        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
 };
 
 
@@ -139,10 +139,6 @@ public:
                     return (r.nMajorVersion == nMajorVersion)
                              && (r.nMinorVersion == nMinorVersion);
                 }
-    bool        operator != ( const SvVersion & r )
-                {
-                    return !(*this == r);
-                }
 
     bool        ReadSvIdl( SvTokenStream & rInStm );
 };
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 3bf5e0c..f7658b2 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -126,7 +126,7 @@ public:
     SvMetaAttribute *       SearchKnownAttr( const SvIdentifier& );
     SvMetaClass *           ReadKnownClass( SvTokenStream & rInStm );
     void AddDepFile(OUString const& rFileName);
-    bool WriteDepFile(SvFileStream & rStream, OUString const& rTarget);
+    void WriteDepFile(SvFileStream & rStream, OUString const& rTarget);
 };
 
 class SvIdlWorkingBase : public SvIdlDataBase
diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx
index 9a3374b..39fdf76 100644
--- a/idl/inc/hash.hxx
+++ b/idl/inc/hash.hxx
@@ -79,8 +79,6 @@ public:
 
     bool            operator == ( const SvStringHashEntry & rRef )
                     { return nHashId == rRef.nHashId; }
-    bool            operator != ( const SvStringHashEntry & rRef )
-                    { return ! operator == ( rRef ); }
     SvStringHashEntry & operator = ( const SvStringHashEntry & rRef )
         { SvRefBase::operator=( rRef );
           aName   = rRef.aName;
@@ -110,8 +108,6 @@ public:
     bool    Insert( const OString& rStr, sal_uInt32 * pHash ); // insert string
     bool    Test( const OString& rStr, sal_uInt32 * pHash ) const; // test of insert string
     SvStringHashEntry * Get ( sal_uInt32 nIndex ) const; // return pointer to string
-    SvStringHashEntry & operator []( sal_uInt32 nPos ) const
-            { return pEntries[ nPos ]; }
 };
 
 #endif // INCLUDED_IDL_INC_HASH_HXX
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 4af4327..58c08e4 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -176,11 +176,10 @@ SvMetaModule * SvMetaExtern::GetModule() const
     return pModule;
 }
 
-const SvGlobalName & SvMetaExtern::GetUUId() const
+void SvMetaExtern::GetUUId() const
 {
     if( aUUId == SvGlobalName() )
         GetModule()->FillNextName( &const_cast<SvMetaExtern *>(this)->aUUId );
-    return aUUId;
 }
 
 void SvMetaExtern::SetModule( SvIdlDataBase & rBase )
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index 2f7adac..40b317e 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -115,7 +115,7 @@ bool SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm
     return false;
 }
 
-bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
+void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
                                     SvStringHashEntry * pName,
                                     SvTokenStream & rInStm )
 {
@@ -125,7 +125,7 @@ bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
         if( rBase.FindId( getString(), &n ) )
         {
             nValue = n;
-            return true;
+            return;
         }
         else
         {
@@ -135,10 +135,9 @@ bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
             rBase.WriteError( rInStm );
         }
     }
-    return false;
 }
 
-bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
+void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
                                     SvTokenStream & rInStm )
 {
     sal_uInt32 nTokPos = rInStm.Tell();
@@ -151,7 +150,7 @@ bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
         {
             setString(pTok->GetString());
             nValue = n;
-            return true;
+            return;
         }
         else
         {
@@ -162,7 +161,6 @@ bool SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
         }
     }
     rInStm.Seek( nTokPos );
-    return false;
 }
 
 bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
@@ -192,9 +190,9 @@ bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
     return false;
 }
 
-bool SvHelpText::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )
+void SvHelpText::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )
 {
-    return SvString::ReadSvIdl( SvHash_HelpText(), rInStm );
+    SvString::ReadSvIdl( SvHash_HelpText(), rInStm );
 }
 
 bool SvUUId::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 48a3f5e..7703530 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -674,7 +674,7 @@ struct WriteDummy
     }
 };
 
-bool SvIdlDataBase::WriteDepFile(
+void SvIdlDataBase::WriteDepFile(
         SvFileStream & rStream, OUString const& rTarget)
 {
     rStream.WriteCharPtr( OUStringToOString(rTarget, RTL_TEXTENCODING_UTF8).getStr() );
@@ -682,7 +682,6 @@ bool SvIdlDataBase::WriteDepFile(
     ::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDep(rStream));
     rStream.WriteCharPtr( "\n\n" );
     ::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDummy(rStream));
-    return rStream.GetError() == SVSTREAM_OK;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0980a6207dd57f6b64191dcc48cc9c2e987cf940
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jan 11 13:31:15 2016 +0200

    loplugin:unusedmethods unused return value in i18npool
    
    Change-Id: I29844009f8357301265421325fc2070f2c9296bf

diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx
index eca7fbf..c175ccd 100644
--- a/i18npool/source/search/levdis.cxx
+++ b/i18npool/source/search/levdis.cxx
@@ -266,7 +266,7 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
 
 // Calculating      nLimit,   nReplP0,    nInsQ0,     nDelR0,     bSplitCount
 // from user values           nOtherX,    nShorterY,  nLongerZ,   bRelaxed
-int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed )
+void WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed )
 {
     if ( nX < 0 ) nX = 0;       // only positive values
     if ( nY < 0 ) nY = 0;
@@ -286,7 +286,6 @@ int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed )
     nInsQ0 = ( nY ? nLimit / nY : nLimit + 1 );
     nDelR0 = ( nZ ? nLimit / nZ : nLimit + 1 );
     bSplitCount = bRelaxed;
-    return nLimit;
 }
 
 // greatest common divisor according to Euklid (chaindivision)
diff --git a/i18npool/source/search/levdis.hxx b/i18npool/source/search/levdis.hxx
index 47d669b..cf7561d 100644
--- a/i18npool/source/search/levdis.hxx
+++ b/i18npool/source/search/levdis.hxx
@@ -179,7 +179,7 @@ public:
     /** Calculate the internal weighs corresponding to the user input values.
         @returns nLimit for later comparison with WLD()
      */
-    int CalcLPQR( int nOtherX, int nShorterY, int nLongerZ,
+    void CalcLPQR( int nOtherX, int nShorterY, int nLongerZ,
                     bool bRelaxed = true );
 
     inline int GetLimit() const     { return nLimit; }
commit bdeb15881f2439665ec52bbfe7f55712eb57c163
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jan 11 13:31:05 2016 +0200

    loplugin:unusedmethods unused return value in hwpfilter
    
    Change-Id: Ib225db89e60708f6b55b3cb86f8e881386fab86f

diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx
index d12c6cb..0022efe 100644
--- a/hwpfilter/source/formula.cxx
+++ b/hwpfilter/source/formula.cxx
@@ -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()
diff --git a/hwpfilter/source/formula.h b/hwpfilter/source/formula.h
index 22c53f6..a4cddc2 100644
--- a/hwpfilter/source/formula.h
+++ b/hwpfilter/source/formula.h
@@ -55,7 +55,7 @@ public:
         pList = p;
         rList = static_cast<XAttributeList *>(pList);
     }
-    int parse();
+    void parse();
 private:
      void trim();
      void makeMathML(Node *res);
diff --git a/hwpfilter/source/hfont.cxx b/hwpfilter/source/hfont.cxx
index 72746f2..a530f12 100644
--- a/hwpfilter/source/hfont.cxx
+++ b/hwpfilter/source/hfont.cxx
@@ -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;
 }
 
 
diff --git a/hwpfilter/source/hfont.h b/hwpfilter/source/hfont.h
index 1ed8fa6..39aa159 100644
--- a/hwpfilter/source/hfont.h
+++ b/hwpfilter/source/hfont.h
@@ -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
diff --git a/hwpfilter/source/hinfo.cxx b/hwpfilter/source/hinfo.cxx
index 2ca1714..b9d75a6 100644
--- a/hwpfilter/source/hinfo.cxx
+++ b/hwpfilter/source/hinfo.cxx
@@ -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: */
diff --git a/hwpfilter/source/hinfo.h b/hwpfilter/source/hinfo.h
index 565e6a1..884c089 100644
--- a/hwpfilter/source/hinfo.h
+++ b/hwpfilter/source/hinfo.h
@@ -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
diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx
index 7b474bd..9bbd9a3 100644
--- a/hwpfilter/source/hpara.cxx
+++ b/hwpfilter/source/hpara.cxx
@@ -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()
diff --git a/hwpfilter/source/hpara.h b/hwpfilter/source/hpara.h
index e988665..343f08a 100644
--- a/hwpfilter/source/hpara.h
+++ b/hwpfilter/source/hpara.h
@@ -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.
diff --git a/hwpfilter/source/htags.cxx b/hwpfilter/source/htags.cxx
index eb49626..3bc004a 100644
--- a/hwpfilter/source/htags.cxx
+++ b/hwpfilter/source/htags.cxx
@@ -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: */
diff --git a/hwpfilter/source/htags.h b/hwpfilter/source/htags.h
index 303b844..2e07978 100644
--- a/hwpfilter/source/htags.h
+++ b/hwpfilter/source/htags.h
@@ -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
 
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index 1d7eb84..fb989ad 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -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)
diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h
index ea500e1..497593f 100644
--- a/hwpfilter/source/hwpfile.h
+++ b/hwpfilter/source/hwpfile.h
@@ -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


More information about the Libreoffice-commits mailing list