[Libreoffice-commits] core.git: oox/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jul 16 09:56:28 UTC 2018


 oox/source/ppt/commonbehaviorcontext.cxx |    5 +++--
 oox/source/ppt/commonbehaviorcontext.hxx |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit f07912624b6c9971c10591d2cf8b5bd61c6c50e7
Author:     Mark Hung <marklh9 at gmail.com>
AuthorDate: Fri Jul 13 23:04:51 2018 +0800
Commit:     Mark Hung <marklh9 at gmail.com>
CommitDate: Mon Jul 16 11:56:04 2018 +0200

    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 at gmail.com>

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;
     };
 
 } }


More information about the Libreoffice-commits mailing list