[Libreoffice-commits] core.git: hwpfilter/source i18npool/source idlc/inc idlc/source idl/inc idl/source l10ntools/inc l10ntools/source linguistic/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Oct 19 08:07:42 UTC 2016


 hwpfilter/source/hbox.h                   |    5 -----
 hwpfilter/source/hwpread.cxx              |    2 +-
 hwpfilter/source/mzstring.cxx             |    7 +------
 hwpfilter/source/mzstring.h               |    4 ----
 i18npool/source/localedata/LocaleNode.cxx |    8 ++------
 i18npool/source/localedata/LocaleNode.hxx |    3 ---
 idl/inc/slot.hxx                          |    4 ----
 idl/source/objects/slot.cxx               |    6 ------
 idlc/inc/astattribute.hxx                 |    2 --
 idlc/inc/astexpression.hxx                |    2 --
 idlc/source/astdump.cxx                   |    2 +-
 idlc/source/astexpression.cxx             |    2 +-
 l10ntools/inc/cfgmerge.hxx                |    2 --
 l10ntools/source/cfgmerge.cxx             |    7 +------
 linguistic/source/convdicxml.cxx          |    3 +--
 15 files changed, 8 insertions(+), 51 deletions(-)

New commits:
commit 877774c05731b7505a3d3a947a1dcb528f36df41
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Oct 18 14:55:26 2016 +0200

    loplugin:expandablemethodds in hwpfilter..linguistic
    
    Change-Id: If20fd4a6cf8a8e005804dbb7caf41cce73d587a5
    Reviewed-on: https://gerrit.libreoffice.org/30016
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index 0645219..3832c76 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 a939b3c..377c13e 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 b99b9d0..e5db996 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 4afb0e5..89bd240 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);
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 1aad3d4..26f0e69 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -84,18 +84,14 @@ void LocaleNode::addChild ( LocaleNode * node) {
         children = arrN;
     }
     children[nChildren++] = node;
-    node->setParent (this);
-}
-
-void LocaleNode::setParent ( LocaleNode * node) {
-    parent = node;
+    node->parent = this;
 }
 
 const LocaleNode* LocaleNode::getRoot() const
 {
     const LocaleNode* pRoot = nullptr;
     const LocaleNode* pParent = this;
-    while ( (pParent = pParent->getParent()) != nullptr )
+    while ( (pParent = pParent->parent) != nullptr )
         pRoot = pParent;
     return pRoot;
 }
diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx
index 226d257..00e24be 100644
--- a/i18npool/source/localedata/LocaleNode.hxx
+++ b/i18npool/source/localedata/LocaleNode.hxx
@@ -88,8 +88,6 @@ class LocaleNode
     sal_Int32 nChildren;
     sal_Int32 childArrSize;
 
-    void setParent ( LocaleNode*  node);
-
 protected:
     mutable int nError;
 
@@ -106,7 +104,6 @@ public:
     void printR () const;
     virtual ~LocaleNode();
     void addChild (  LocaleNode * node);
-    const LocaleNode* getParent() const { return parent; };
     const LocaleNode* getRoot() const;
     int getError() const;
     virtual void generateCode (const OFileWriter &of) const;
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index e3e8c19..87118d6 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -68,9 +68,6 @@ public:
     bool            IsVariable() const;
     bool            IsMethod() const;
 
-    void    SetToggle( bool bSet ) { aToggle = bSet; }
-    void    SetAutoUpdate( bool bSet ) { aAutoUpdate = bSet; }
-    void    SetAsynchron( bool bSet ) { aAsynchron = bSet; }
     void    SetRecordPerItem( bool bSet )
             {
                 aRecordPerItem = bSet;
@@ -89,7 +86,6 @@ public:
                 if( bSet )
                     aRecordPerItem = aRecordPerSet = false;
             }
-    void    SetRecordAbsolute( bool bSet ) { aRecordAbsolute = bSet; }
 
 public:
             SvMetaObject *  MakeClone() const;
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index d72e996..eee05ad 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -237,24 +237,18 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase,
 
     if( aToggle.ReadSvIdl( SvHash_Toggle(), rInStm ) )
     {
-        SetToggle( aToggle );
         bOk = true;
     }
     if( aAutoUpdate.ReadSvIdl( SvHash_AutoUpdate(), rInStm ) )
     {
-        SetAutoUpdate( aAutoUpdate );
         bOk = true;
     }
-
     if( aAsynchron.ReadSvIdl( SvHash_Asynchron(), rInStm ) )
     {
-        SetAsynchron( aAsynchron );
         bOk = true;
     }
-
     if( aRecordAbsolute.ReadSvIdl( SvHash_RecordAbsolute(), rInStm ) )
     {
-        SetRecordAbsolute( aRecordAbsolute);
         bOk = true;
     }
     if( aRecordPerItem.ReadSvIdl( SvHash_RecordPerItem(), rInStm ) )
diff --git a/idlc/inc/astattribute.hxx b/idlc/inc/astattribute.hxx
index e4bbd51..273e420 100644
--- a/idlc/inc/astattribute.hxx
+++ b/idlc/inc/astattribute.hxx
@@ -67,8 +67,6 @@ public:
     DeclList::size_type getSetExceptionCount() const
     { return m_setExceptions.size(); }
 
-    AstType const * getType() const
-        { return m_pType; }
     bool isReadonly() const
         { return ((m_flags & AF_READONLY) == AF_READONLY); }
     bool isOptional() const
diff --git a/idlc/inc/astexpression.hxx b/idlc/inc/astexpression.hxx
index 9bc1b90..e64b314 100644
--- a/idlc/inc/astexpression.hxx
+++ b/idlc/inc/astexpression.hxx
@@ -103,8 +103,6 @@ public:
     virtual ~AstExpression();
 
     // Data Accessors
-    ExprComb getCombOperator()
-        { return m_combOperator; }
     AstExprValue* getExprValue()
         { return m_exprValue; }
 
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx
index 9c84e54..4847b4f 100644
--- a/idlc/source/astdump.cxx
+++ b/idlc/source/astdump.cxx
@@ -372,7 +372,7 @@ bool AstAttribute::dumpBlob(
     OUString name(OStringToOUString(getLocalName(), RTL_TEXTENCODING_UTF8));
     rBlob.setFieldData(
         index, getDocumentation(), OUString(), accessMode, name,
-        OStringToOUString(getType()->getRelativName(), RTL_TEXTENCODING_UTF8),
+        OStringToOUString(m_pType->getRelativName(), RTL_TEXTENCODING_UTF8),
         RTConstValue());
     dumpExceptions(
         rBlob, m_getDocumentation, m_getExceptions, RTMethodMode::ATTRIBUTE_GET,
diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx
index 0953c9b..d180662 100644
--- a/idlc/source/astexpression.cxx
+++ b/idlc/source/astexpression.cxx
@@ -761,7 +761,7 @@ bool AstExpression::coerce(ExprType t)
 bool AstExpression::compareLong(AstExpression *pExpr)
 {
     bool bRet = false;
-    if (m_combOperator != pExpr->getCombOperator())
+    if (m_combOperator != pExpr->m_combOperator)
         return bRet;
     evaluate();
     pExpr->evaluate();
diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx
index 2b43598..3d2162a 100644
--- a/l10ntools/inc/cfgmerge.hxx
+++ b/l10ntools/inc/cfgmerge.hxx
@@ -111,8 +111,6 @@ protected:
 
     virtual void Output(const OString & rOutput)=0;
 
-    static void Error(const OString &rError);
-
 private:
     void ExecuteAnalyzedToken( int nToken, char *pToken );
     void AddText(
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 3ea9230..20a6f0d 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -266,7 +266,7 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
                 sError += sToken;
                 sError += sInFile;
                 sError += global::inputPathname;
-                Error( sError );
+                yyerror(sError.getStr());
                 std::exit(EXIT_FAILURE);
             }
         }
@@ -331,11 +331,6 @@ void CfgParser::Execute( int nToken, char * pToken )
     ExecuteAnalyzedToken( nToken, pToken );
 }
 
-void CfgParser::Error(const OString& rError)
-{
-    yyerror(rError.getStr());
-}
-
 
 // class CfgExport
 
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index b4ccd20..3f364e1 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -170,7 +170,6 @@ public:
 
     const OUString &    GetRightText() const    { return aRightText; }
     const OUString &    GetLeftText() const     { return rEntryContext.GetLeftText(); }
-    ConvDic *           GetDic()                { return GetConvDicImport().GetDic(); }
 };
 
 
@@ -282,7 +281,7 @@ void ConvDicXMLRightTextContext_Impl::Characters( const OUString &rChars )
 
 void ConvDicXMLRightTextContext_Impl::EndElement()
 {
-    ConvDic *pDic = GetDic();
+    ConvDic *pDic = GetConvDicImport().GetDic();
     if (pDic)
         pDic->AddEntry( GetLeftText(), GetRightText() );
 }


More information about the Libreoffice-commits mailing list