compilerplugins/clang/mergeclasses.results |    2 --
 rsc/inc/rscconst.hxx                       |   22 ++++++++--------------
 rsc/inc/rscdb.hxx                          |    4 ++--
 rsc/source/parser/rscibas.cxx              |    4 ++--
 rsc/source/res/rscarray.cxx                |    2 +-
 rsc/source/res/rscconst.cxx                |   17 ++++++-----------
 6 files changed, 19 insertions(+), 32 deletions(-)

New commits:
commit 76a3df733ebe016d8adf681d1cf591970d6f2a64
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Thu Apr 20 14:05:07 2017 +0200

    loplugin:mergeclasses RscConst with RscEnum
    
    Change-Id: I7bd35df0751c9ffce076848edd5373e00815dbc5
    Reviewed-on: https://gerrit.libreoffice.org/36772
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/compilerplugins/clang/mergeclasses.results 
b/compilerplugins/clang/mergeclasses.results
index 7031a522f436..59bf4effa157 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -135,7 +135,6 @@ merge StarSymbolToMSMultiFont with 
StarSymbolToMSMultiFontImpl
 merge StgAvlIterator with StgIterator
 merge StgAvlNode with StgDirEntry
 merge StgCache with StgIo
-merge StgReader with WW8Reader
 merge SvListView with SvTreeListBox
 merge SvXMLExportItemMapper with SwXMLTableItemMapper_Impl
 merge SvXMLImportItemMapper with SwXMLImportTableItemMapper_Impl
@@ -357,7 +356,6 @@ merge sw::util::WrtRedlineAuthor with WW8_WrtRedlineAuthor
 merge unographic::GraphicTransformer with unographic::Graphic
 merge vcl::DeletionNotifier with SalFrame
 merge vcl::ExtOutDevData with vcl::PDFExtOutDevData
-merge vcl::IPrioritable with VclContainer
 merge vcl::SolarThreadExecutor with 
vcl::solarthread::detail::GenericSolarThreadExecutor
 merge vclcanvas::Sprite with vclcanvas::CanvasCustomSpriteSpriteBase_Base
 merge webdav_ucp::DAVAuthListener with webdav_ucp::DAVAuthListener_Impl
diff --git a/rsc/inc/rscconst.hxx b/rsc/inc/rscconst.hxx
index b9678751e452..a9ce5040a168 100644
--- a/rsc/inc/rscconst.hxx
+++ b/rsc/inc/rscconst.hxx
@@ -25,9 +25,13 @@
 #include <rsctop.hxx>
 #include <tools/resid.hxx>
 
-class RscConst : public RscTop
+class RscEnum : public RscTop
 {
-protected:
+    struct RscEnumInst
+    {
+        sal_uInt32  nValue; // constant position in the array
+        bool        bDflt;  // is default
+    };
     struct VarEle
     {
         Atom    nId;    // constant name
@@ -36,24 +40,14 @@ protected:
     VarEle *        pVarArray;  // pointer to the field with constant
     sal_uInt32      nEntries;   // number of entries in field
 public:
-                    RscConst( Atom nId, RESOURCE_TYPE nTypId );
-                    virtual ~RscConst() override;
+                    RscEnum( Atom nId, RESOURCE_TYPE nTypId );
+                    virtual ~RscEnum() override;
                     // sets the allowed values
     void            SetConstant( Atom nVarName, sal_Int32 lValue );
     bool            GetConstValue( Atom nConstId, sal_Int32 * pVal ) const;
     bool            GetValueConst( sal_Int32 nValue, Atom  * pConstId ) const;
     sal_uInt32      GetConstPos( Atom nConstId );
-};
 
-class RscEnum : public RscConst
-{
-    struct RscEnumInst
-    {
-        sal_uInt32  nValue; // constant position in the array
-        bool        bDflt;  // is default
-    };
-public:
-                    RscEnum( Atom nId, RESOURCE_TYPE nTypId );
     RSCINST         Create( RSCINST * pInst, const RSCINST & rDfltInst, bool 
bOwnClass = false ) override;
     sal_uInt32      Size() const override { return 
ALIGNED_SIZE(sizeof(RscEnumInst)); }
 
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index d9b222154c9a..0fbe8064fc9d 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -77,8 +77,8 @@ class RscTypCont
                         aSysLst;            // list of system resources
 
     void        Init();         // initializes classes and tables
-    void        SETCONST( RscConst *, const char *, sal_uInt32 );
-    void        SETCONST( RscConst *, Atom, sal_uInt32 );
+    void        SETCONST( RscEnum *, const char *, sal_uInt32 );
+    void        SETCONST( RscEnum *, Atom, sal_uInt32 );
     RscEnum *   InitFieldUnitsType();
     RscTupel *  InitStringLongTupel();
     static RscCont  *  InitStringLongTupelList( RscTupel * pStringLongTupel );
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index 8aea89f93937..a0b677e7a1e6 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -44,7 +44,7 @@
 
 #include <unordered_map>
 
-void RscTypCont::SETCONST( RscConst * pClass, const char * szString, 
sal_uInt32 nVal )
+void RscTypCont::SETCONST( RscEnum * pClass, const char * szString, sal_uInt32 
nVal )
 {
 #if OSL_DEBUG_LEVEL > 2
     fprintf( stderr, "setconst : %s\n", szString );
@@ -53,7 +53,7 @@ void RscTypCont::SETCONST( RscConst * pClass, const char * 
szString, sal_uInt32
                          CONSTNAME, nVal ), nVal );
 }
 
-void RscTypCont::SETCONST( RscConst * pClass, Atom nName, sal_uInt32 nVal )
+void RscTypCont::SETCONST( RscEnum * pClass, Atom nName, sal_uInt32 nVal )
 {
 #if OSL_DEBUG_LEVEL > 2
     fprintf( stderr, "setconst hash: %u\n", (unsigned int)nName );
diff --git a/rsc/source/res/rscarray.cxx b/rsc/source/res/rscarray.cxx
index 3efd01a3dad0..08dd08d4b8cc 100644
--- a/rsc/source/res/rscarray.cxx
+++ b/rsc/source/res/rscarray.cxx
@@ -339,7 +339,7 @@ void RscArray::WriteSrcHeader( const RSCINST & rInst, FILE 
* fOutput,
 
 static void WriteSrc( RscInstNode * pNode, FILE * fOutput, RscTypCont * pTC,
                       sal_uInt32 nTab, const char * pVarName,
-                      CLASS_DATA pDfltData, RscConst * pTypeClass )
+                      CLASS_DATA pDfltData, RscEnum * pTypeClass )
 {
     if( pNode )
     {
diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx
index 281c8b02ad3b..f791eb2b6b63 100644
--- a/rsc/source/res/rscconst.cxx
+++ b/rsc/source/res/rscconst.cxx
@@ -26,19 +26,19 @@
 #include <rschash.hxx>
 #include <tools/resid.hxx>
 
-RscConst::RscConst( Atom nId, RESOURCE_TYPE nTypeId )
+RscEnum::RscEnum( Atom nId, RESOURCE_TYPE nTypeId )
     : RscTop( nId, nTypeId )
     , pVarArray(nullptr), nEntries(0)
 {
 }
 
-RscConst::~RscConst()
+RscEnum::~RscEnum()
 {
     if( pVarArray )
         rtl_freeMemory( static_cast<void *>(pVarArray) );
 }
 
-void RscConst::SetConstant( Atom nVarName, sal_Int32 lValue )
+void RscEnum::SetConstant( Atom nVarName, sal_Int32 lValue )
 {
     if( pVarArray )
         pVarArray = static_cast<VarEle *>(rtl_reallocateMemory( 
static_cast<void *>(pVarArray),
@@ -50,7 +50,7 @@ void RscConst::SetConstant( Atom nVarName, sal_Int32 lValue )
     nEntries++;
 }
 
-bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const
+bool RscEnum::GetConstValue( Atom nConst, sal_Int32 * pValue ) const
 {
     sal_uInt32 i = 0;
 
@@ -65,7 +65,7 @@ bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue 
) const
     return false;
 }
 
-bool RscConst::GetValueConst( sal_Int32 lValue, Atom * pConst ) const
+bool RscEnum::GetValueConst( sal_Int32 lValue, Atom * pConst ) const
 {
     sal_uInt32 i = 0;
 
@@ -80,7 +80,7 @@ bool RscConst::GetValueConst( sal_Int32 lValue, Atom * pConst 
) const
     return false;
 }
 
-sal_uInt32 RscConst::GetConstPos( Atom nConst )
+sal_uInt32 RscEnum::GetConstPos( Atom nConst )
 {
     sal_uInt32 i = 0;
 
@@ -93,11 +93,6 @@ sal_uInt32 RscConst::GetConstPos( Atom nConst )
     return nEntries;
 }
 
-RscEnum::RscEnum( Atom nId, RESOURCE_TYPE nTypeId )
-    : RscConst( nId, nTypeId )
-{
-}
-
 ERRTYPE RscEnum::SetConst( const RSCINST & rInst, Atom nConst, sal_Int32 
/*nVal*/ )
 {
     sal_uInt32 i = 0;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to