[Libreoffice-commits] .: oox/inc sc/source

Noel Power noelp at kemper.freedesktop.org
Tue Jun 5 08:45:35 PDT 2012


 oox/inc/oox/core/fragmenthandler2.hxx      |    3 +--
 sc/source/filter/oox/worksheetfragment.cxx |    4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit afbb2d8f7d72292532a9ea54fa2e6757b6d548c2
Author: Noel Power <noel.power at novell.com>
Date:   Tue Jun 5 16:41:53 2012 +0100

    fix missing ole and form control(s) on xlsx import
    
    chang the visibility of aMceState in order to access that member to filter out reading and parsing of ./xl/ctrlProps/ctrlProp[N].xml fragments for 'controls' & 'oleObjects' elements nested withing 'mc:AlternateContent' elements
    
    Change-Id: I6892db7e3302b9977f0fdaabbe3ac1444315e011

diff --git a/oox/inc/oox/core/fragmenthandler2.hxx b/oox/inc/oox/core/fragmenthandler2.hxx
index 781ed85..70ded85 100644
--- a/oox/inc/oox/core/fragmenthandler2.hxx
+++ b/oox/inc/oox/core/fragmenthandler2.hxx
@@ -41,7 +41,7 @@ namespace core {
 
 class OOX_DLLPUBLIC FragmentHandler2 : public FragmentHandler, public ContextHandler2Helper
 {
-private:
+protected:
     enum MCE_STATE
     {
         MCE_UNUSED,
@@ -50,7 +50,6 @@ private:
     };
     ::std::vector<MCE_STATE>           aMceState;
 
-private:
     bool                prepareMceContext( sal_Int32 nElement, const AttributeList& rAttribs );
 
 
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index be41a16..8616305 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -332,10 +332,10 @@ ContextHandlerRef WorksheetFragment::onCreateContext( sal_Int32 nElement, const
         break;
 
         case XLS_TOKEN( oleObjects ):
-            if( nElement == XLS_TOKEN( oleObject ) ) importOleObject( rAttribs );
+            if( nElement == XLS_TOKEN( oleObject ) && aMceState.empty() ) importOleObject( rAttribs );
         break;
         case XLS_TOKEN( controls ):
-            if( nElement == XLS_TOKEN( control ) ) importControl( rAttribs );
+            if( nElement == XLS_TOKEN( control ) && aMceState.empty() ) importControl( rAttribs );
         break;
     }
     return 0;


More information about the Libreoffice-commits mailing list