diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-23 10:50:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-23 11:42:34 +0000 |
commit | b641929e69aa5917536fad72644d0da4d67f8adc (patch) | |
tree | 92a95c566651b34b55461d2e8e7d5e1ef65b5e87 /rsc/inc | |
parent | 597d178c2b516ab0cff4e4f86246d47ce9700f18 (diff) |
merge StringNode with RscDefine
Change-Id: Ia64b7419ccbb06ff55907717963864caef2023a8
Reviewed-on: https://gerrit.libreoffice.org/32374
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'rsc/inc')
-rw-r--r-- | rsc/inc/rscdef.hxx | 33 | ||||
-rw-r--r-- | rsc/inc/rsctree.hxx | 17 |
2 files changed, 20 insertions, 30 deletions
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx index 2a218180df84..e336fac9608c 100644 --- a/rsc/inc/rscdef.hxx +++ b/rsc/inc/rscdef.hxx @@ -114,34 +114,41 @@ public: }; /*********** R s c D e f i n e *******************************************/ -class RscDefine : public StringNode +class RscDefine : public NameNode { friend class RscFileTab; friend class RscDefineList; friend class RscDefTree; friend class RscExpression; friend class RscId; + sal_uLong lFileKey; // file the define belongs to sal_uInt32 nRefCount; // reference count to this object sal_Int32 lId; // identifier - RscExpression * pExp; // expression + RscExpression * pExp; // expression + OString m_aName; + + virtual COMPARE Compare( const NameNode * ) const override; + virtual COMPARE Compare( const void * ) const override; + protected: - RscDefine( sal_uLong lFileKey, const OString& rDefName, + RscDefine( sal_uLong lFileKey, const OString& rDefName, sal_Int32 lDefId ); - RscDefine( sal_uLong lFileKey, const OString& rDefName, + RscDefine( sal_uLong lFileKey, const OString& rDefName, RscExpression * pExpression ); - virtual ~RscDefine() override; - void IncRef(){ nRefCount++; } - void DecRef(); - void DefineToNumber(); + virtual ~RscDefine() override; + + void IncRef() { nRefCount++; } + void DecRef(); + void DefineToNumber(); - using StringNode::Search; public: - RscDefine * Search( const char * ); - sal_uLong GetFileKey() const { return lFileKey; } - void Evaluate(); - sal_Int32 GetNumber() const { return lId; } + sal_uLong GetFileKey() const { return lFileKey; } + void Evaluate(); + sal_Int32 GetNumber() const { return lId; } + RscDefine* Search( const char * ) const; + const OString& GetName() const { return m_aName; } }; typedef ::std::vector< RscDefine* > RscSubDefList; diff --git a/rsc/inc/rsctree.hxx b/rsc/inc/rsctree.hxx index 62db17b38296..c6de94993a81 100644 --- a/rsc/inc/rsctree.hxx +++ b/rsc/inc/rsctree.hxx @@ -71,23 +71,6 @@ public: virtual sal_uInt32 GetId() const; }; -class StringNode : public NameNode -{ - virtual COMPARE Compare( const NameNode * ) const override; - virtual COMPARE Compare( const void * ) const override; - -protected: - using NameNode::Search; - - OString m_aName; - -public: - StringNode(const OString& rStr) { m_aName = rStr; } - - StringNode* Search( const char * ) const; - const OString& GetName() const { return m_aName; } -}; - #endif // INCLUDED_RSC_INC_RSCTREE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |