diff options
author | Mark Hung <marklh9@gmail.com> | 2018-07-13 23:04:51 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2018-07-16 11:56:04 +0200 |
commit | f07912624b6c9971c10591d2cf8b5bd61c6c50e7 (patch) | |
tree | c1ba11ada373a7717e897f523edf0a0e3bba3cc6 | |
parent | df3168e84dc30b5cbe993ec41b521486736065a7 (diff) |
oox: refactor CommonBehaviorContext to inherit from FragmentHandler2.
Although it's convenient to inherit from TimeNodeContext, but only
mpNode is used so it's really not necessary.
Change-Id: I922774df4c420ee9982f1c31e720f4fd85991e02
Reviewed-on: https://gerrit.libreoffice.org/57395
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
-rw-r--r-- | oox/source/ppt/commonbehaviorcontext.cxx | 5 | ||||
-rw-r--r-- | oox/source/ppt/commonbehaviorcontext.hxx | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/oox/source/ppt/commonbehaviorcontext.cxx b/oox/source/ppt/commonbehaviorcontext.cxx index 844c81803e03..8de59ce06728 100644 --- a/oox/source/ppt/commonbehaviorcontext.cxx +++ b/oox/source/ppt/commonbehaviorcontext.cxx @@ -39,10 +39,11 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace ppt { CommonBehaviorContext::CommonBehaviorContext( FragmentHandler2 const & rParent, - const TimeNodePtr & pNode ) - : TimeNodeContext( rParent, PPT_TOKEN( cBhvr ), pNode ) + const TimeNodePtr & pNode) + : FragmentHandler2(rParent) , mbInAttrList( false ) , mbIsInAttrName( false ) + , mpNode(pNode) { } diff --git a/oox/source/ppt/commonbehaviorcontext.hxx b/oox/source/ppt/commonbehaviorcontext.hxx index 5cb45f1c5dbd..f1fef4103db3 100644 --- a/oox/source/ppt/commonbehaviorcontext.hxx +++ b/oox/source/ppt/commonbehaviorcontext.hxx @@ -36,7 +36,7 @@ namespace oox { namespace ppt { /** CT_TLCommonBehaviorData */ class CommonBehaviorContext - : public TimeNodeContext + : public ::oox::core::FragmentHandler2 { public: CommonBehaviorContext( ::oox::core::FragmentHandler2 const & rParent, @@ -55,6 +55,7 @@ namespace oox { namespace ppt { bool mbIsInAttrName; std::vector< Attribute > maAttributes; OUString msCurrentAttribute; + const TimeNodePtr& mpNode; }; } } |