[Libreoffice-commits] .: 16 commits - binfilter/bf_sfx2 binfilter/inc binfilter/legacysmgr filter/source lotuswordpro/prj lotuswordpro/source lotuswordpro/util oox/inc writerfilter/source writerperfect/prj writerperfect/source writerperfect/util

Petr Mladek pmladek at kemper.freedesktop.org
Wed Apr 6 12:26:05 PDT 2011


 binfilter/bf_sfx2/source/appl/sfx2_appuno.cxx                 |   51 ---
 binfilter/inc/legacysmgr/legacy_binfilters_smgr.hxx           |    4 
 binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx |    6 
 filter/source/config/tools/merge/pyAltFCFGMerge               |  158 ++++------
 lotuswordpro/prj/d.lst                                        |    1 
 lotuswordpro/source/filter/genericfilter.cxx                  |   29 -
 lotuswordpro/util/lwpfilter.component                         |    8 
 lotuswordpro/util/makefile.mk                                 |    8 
 oox/inc/oox/helper/graphichelper.hxx                          |    1 
 writerfilter/source/dmapper/FormControlHelper.cxx             |    2 
 writerperfect/prj/d.lst                                       |    2 
 writerperfect/source/wpgimp/wpgimport_genericfilter.cxx       |   29 -
 writerperfect/source/wpsimp/makefile.mk                       |    1 
 writerperfect/source/wpsimp/msworks_genericfilter.cxx         |   29 -
 writerperfect/util/makefile.mk                                |   14 
 writerperfect/util/msworksfilter.component                    |    8 
 writerperfect/util/wpgfilter.component                        |    8 
 17 files changed, 122 insertions(+), 237 deletions(-)

New commits:
commit a6c4f7818aef13a733e7eb21bb86da9e3d1fb543
Merge: c2d2c2b... e28d597...
Author: Petr Mladek <pmladek at suse.cz>
Date:   Wed Apr 6 19:25:24 2011 +0200

    Merge remote-tracking branch 'origin/libreoffice-3-4'

commit e28d597da1048fc83813a08f9958bbdc72e7f7d8
Merge: 070ecd9... 6884ac0...
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Apr 5 18:54:48 2011 +0200

    Merge remote-tracking branch 'origin/libreoffice-3-3' into libreoffice-3-4
    
    Conflicts:
    	oox/prj/d.lst
    	unoxml/source/xpath/nodelist.cxx
    	unoxml/source/xpath/nodelist.hxx
    	unoxml/source/xpath/xpathobject.cxx
    	writerfilter/source/dmapper/DomainMapper_Impl.cxx
    	writerfilter/source/filter/ImportFilter.cxx

commit 070ecd906dc4e34ae10998aa8628ab32bf04e5ae
Author: Andreas Becker <atayoohoo at googlemail.com>
Date:   Mon Apr 4 15:16:31 2011 +0100

    python 3 compatibility fixes

diff --git a/filter/source/config/tools/merge/pyAltFCFGMerge b/filter/source/config/tools/merge/pyAltFCFGMerge
index 0d7666a..fcdbc81 100755
--- a/filter/source/config/tools/merge/pyAltFCFGMerge
+++ b/filter/source/config/tools/merge/pyAltFCFGMerge
@@ -9,7 +9,7 @@
 # there is a java which is available for use by all
 #_____________________________________________
 
-import sys, string, os.path 
+import sys, string, os.path, codecs 
 
 CFGFILE             = os.environ["SOLARVER"] + "/" + os.environ["INPATH"] + "/inc/l10ntools/FCFGMerge.cfg"
 
@@ -66,18 +66,18 @@ Example Usage:
 >>> props = Properties()
 >>> props['one'] = '1'
 >>> props['your name'] = "I don't know"
->>> print '\n'.join(props.keys())
+>>> print('\n'.join(list(props.keys())))
 your name
 one
 >>> from StringIO import StringIO
 >>> buff = StringIO()
 >>> props.store(buff, "a little example...")
 >>> buff.seek(0)
->>> print buff.read()
+>>> print(buff.read())
 # a little example...
 your\ name=I\ don\'t\ know
 one=1
->>> print props['your name']
+>>> print(props['your name'])
 I don't know
 
 $Id: pyAltFCFGMerge,v 1.3 2007-12-07 10:57:44 vg Exp $
@@ -88,13 +88,11 @@ __all__ = ['Properties']
 
 
 def dec2hex(n):
-
     h = hex(n)[2:].upper()
     return '\\u' + '0' * (4 - len(h)) + h
 
 
 def escapestr(s):
-
     buff = []
     # QUESTION: escape leading or trailing spaces?
     for c in s:
@@ -128,7 +126,6 @@ def escapestr(s):
 
 # TODO: add support for \uXXXX?
 def unescapestr(line):
-
     buff = []
     escape = 0
     for i in range(len(line)):
@@ -175,12 +172,10 @@ def unescapestr(line):
     return ''.join(buff)
 
 
-
 class Properties(dict):
-
     def __init__(self, defaults={}):
         dict.__init__(self)
-        for n,v in defaults.items():
+        for n,v in list(defaults.items()):
             self[n] = v
 
     def __getittem__(self,key):
@@ -207,11 +202,10 @@ class Properties(dict):
         Reads properties from a stream (StringIO, file, etc...)
         """
         props = readprops(buff)
-        for n,v in props.iteritems():
+        for n,v in list(props.items()):
             self[n] = v
 
 def readprops(buff):
-
     name,value = None,''
     props = {}
     continued = 0
@@ -258,7 +252,7 @@ def readprops(buff):
             name = unescapestr(line.lstrip())
 
         # skip delimiter
-        while line[i:i+1] in ('\t', ' ', ':', '='):
+        while line[i:i + 1] in ('\t', ' ', ':', '='):
             i += 1
 
         value = unescapestr(line[i:].strip())
@@ -269,7 +263,6 @@ def readprops(buff):
                 break
             value += unescapestr(line.strip())
 
-        #print 'value:',value    ##
         props[name] = value
 
     return props
@@ -299,41 +292,41 @@ def run(sCmdLine):
 
 #prints out a copyright message on stdout.
 def printCopyright():
-    print "FCFGMerge"
-    print "Copyright: 2003 by Red Hat, Inc., based on FCFGMerge.java` by Sun"
-    print "All Rights Reserved."
+    print("FCFGMerge")
+    print("Copyright: 2003 by Red Hat, Inc., based on FCFGMerge.java` by Sun")
+    print("All Rights Reserved.")
 
-#prints out a help message on stdout.
+# Prints out a help message on stdout.
 def printHelp():
-    print "____________________________________________________________"
-    print "usage: FCFGMerge cfg=<file name>"                            
-    print "parameters:"                                                 
-    print "\tcfg=<file name>"                                           
-    print "\t\tmust point to a system file, which contains"             
-    print "\t\tall neccessary configuration data for the merge process."
-    print "\tFurther cou can specify every parameter allowed in the"  
-    print "\tconfig file as command line parameter too, to overwrite" 
-    print "\tthe value from the file."                                
-
-def StringTokenizer(mstring, separators, isSepIncluded=0):
-#Return a list of tokens given a base string and a string of
-#separators, optionally including the separators if asked for"""
-    token=''
-    tokenList=[]
+    print("____________________________________________________________")
+    print("usage: FCFGMerge cfg=<file name>"                            )
+    print("parameters:"                                                 )
+    print("\tcfg=<file name>"                                           )
+    print("\t\tmust point to a system file, which contains"             )
+    print("\t\tall neccessary configuration data for the merge process.")
+    print("\tFurther cou can specify every parameter allowed in the"    )
+    print("\tconfig file as command line parameter too, to overwrite"   )
+    print("\tthe value from the file."                                  )
+
+# Return a list of tokens given a base string and a string of
+# separators, optionally including the separators if asked for"""
+def StringTokenizer(mstring, separators, isSepIncluded = 0):
+    token = ''
+    tokenList = []
     for c in mstring:
         if c in separators:
             if token != '':
                 tokenList.append(token)
-                token=''
+                token = ''
                 if isSepIncluded:
                     tokenList.append(c)
         else:
-            token+=c
+            token += c
     if token:
         tokenList.append(token)
     return tokenList
 
-# can be used to analyze command line parameters
+# Can be used to analyze command line parameters
 # and merge it together with might existing config
 # files. That provides the possibility to overwrite
 # config values via command line parameter.
@@ -356,55 +349,48 @@ class ConfigHelper:
             count = len(lCommandLineArgs)
         self.m_bEmpty = (count < 1)
 
-        print lCommandLineArgs, "and len is", count
+        print(lCommandLineArgs, "and len is", count)
         for arg in range(count):
             # is it a named-value argument?
             # Note: We ignores double "=" signs! => search from left to right
             pos = lCommandLineArgs[arg].find('=')
             if pos != -1:
                 sArg   = lCommandLineArgs[arg][0:pos]
-                sValue = lCommandLineArgs[arg][pos+1:]
+                sValue = lCommandLineArgs[arg][pos + 1:]
                 self.props[sArg] = sValue
                 continue
 
             # is it a boolean argument?
             # Note: Because "--" and "-" will be interpreted as the same
             # we search from right to left!
-            pos = string.rfind(lCommandLineArgs[arg], '-')
+            pos = lCommandLineArgs[arg].rfind('-')
             if pos == -1:
                 pos = lCommandLineArgs[arg].rfind('/')
             if pos != -1:
-                sArg = lCommandLineArgs[arg][pos+1:]
+                sArg = lCommandLineArgs[arg][pos + 1:]
                 self.props[sArg] = 1
                 continue
             
-            raise Exception("Invalid command line detected. The argument \""+\
-                lCommandLineArgs[arg]+"\" use an unsupported format.")
-
-#        for item in self.props:
-#            print item, '->', self.props[item]
+            raise Exception("Invalid command line detected. The argument \"" + \
+                lCommandLineArgs[arg] + "\" use an unsupported format.")
 
     def isHelp(self):
-        return (
-                (self.props.has_key("help")) or
-                (self.props.has_key("?")   ) or
-                (self.props.has_key("h")   )
-               )
+        return ("help" in self.props) or ("?" in self.props) or ("?" in self.props)
 
     def getValue(self, sProp):
-        if not self.props.has_key(sProp):
-            raise Exception("The requested config value \""+sProp+"\" "\
+        if sProp not in self.props:
+            raise Exception("The requested config value \"" + sProp + "\" "\
                 "does not exists!");
         return self.props[sProp];
 
     def getValueWithDefault(self, sProp, default):
-        if not self.props.has_key(sProp):
+        if sProp not in self.props:
             return default;
         return self.props[sProp];
 
     def getStringList(self, sProp, sDelimiter, bTrim, bDecode):
-        if not self.props.has_key(sProp):
-            raise Exception("The requested config value \""+sProp+"\" does "\
+        if sProp not in self.props:
+            raise Exception("The requested config value \"" + sProp + "\" does "\
                 "not exists!");
         sValue = self.props[sProp]
 
@@ -412,11 +398,11 @@ class ConfigHelper:
         lTokens = StringTokenizer(sValue, sDelimiter)
         for sToken in lTokens:
             if bTrim:
-                sToken = string.strip(sToken)
+                sToken = sToken.strip()
             # remove ""
             if ((bDecode) and (sToken.find("\"") == 0) and \
-                (sToken.rfind("\"") == len(sToken)-1)):
-                sToken = sToken[1, len(sToken)-1]
+                (sToken.rfind("\"") == len(sToken) - 1)):
+                sToken = sToken[1, len(sToken) - 1]
             lValue.append(sToken)
 
         return lValue
@@ -448,10 +434,8 @@ def generateHeader(sVersion, sEncoding, sPath, sPackage, bLanguagePack):
 def generateFooter():
     return "</oor:component-data>\n"
 
-# can merge different xml fragments together.
-# 
+# Can merge different xml fragments together.
 #   @author Caolan McNamara converted from the original java by Andreas Schluens
-# 
 class Merger:
     def __init__(self, aCfg):
         self.m_aCfg = aCfg
@@ -486,11 +470,13 @@ class Merger:
         except:
             self.m_lHandlers = []
 
+    # Merges the xml sets returned by getFragments(...), adds an xml header
+    # and footer and writes the result to a file.
     def merge(self):
         sPackage = self.m_aCfg.getValue(PROP_PKG)
 
-        print "create package \""+sPackage+"\" ..."
-        print "generate package header ... "
+        print("create package \"" + sPackage + "\" ...")
+        print("generate package header ... ")
 
         sBuffer = generateHeader(\
                 self.m_aCfg.getValue(PROP_XMLVERSION ),\
@@ -510,25 +496,25 @@ class Merger:
             lFragments = None
 
             try:
-                if i == 0: #types
-                    print "generate set for types ... "
+                if i == 0: # types
+                    print("generate set for types ... ")
                     sSetName = self.m_aCfg.getValue(PROP_SETNAME_TYPES)
-                    sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_TYPES )
+                    sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_TYPES)
                     lFragments = self.m_lTypes
                 elif i == 1: # filters
-                    print "generate set for filter ... "
+                    print("generate set for filter ... ")
                     sSetName = self.m_aCfg.getValue(PROP_SETNAME_FILTERS)
-                    sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_FILTERS )
+                    sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_FILTERS)
                     lFragments = self.m_lFilters
                 elif i == 2: # loaders
-                    print "generate set for frame loader ... "
+                    print("generate set for frame loader ... ")
                     sSetName = self.m_aCfg.getValue(PROP_SETNAME_LOADERS)
-                    sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_LOADERS )
+                    sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_LOADERS)
                     lFragments = self.m_lLoaders
                 elif i == 3: # handlers
-                    print "generate set for content handler ... "
+                    print("generate set for content handler ... ")
                     sSetName = self.m_aCfg.getValue(PROP_SETNAME_HANDLERS)
-                    sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_HANDLERS )
+                    sSubDir = self.m_aCfg.getValue(PROP_SUBDIR_HANDLERS)
                     lFragments = self.m_lHandlers
             except:
                 continue
@@ -539,7 +525,7 @@ class Merger:
                 os.path.join(self.m_aFragmentsDir, sSubDir), \
                 sSetName, lFragments, 1)
 
-        print "generate package footer ... "
+        print("generate package footer ... ")
         sBuffer = sBuffer + generateFooter()
 
         # Attention!
@@ -547,38 +533,38 @@ class Merger:
         # corresponding xml file. We should suppress writing of this file on 
         # disk completly ...
         if nItemCount < 1:
-            print "Package is empty and will not result into a xml file on "\
-                "disk!? Please check configuration file."
+            print("Package is empty and will not result into a xml file on "\
+                "disk!? Please check configuration file.")
             return
-        print "package contains "+str(nItemCount)+" items"
+        print("package contains " + str(nItemCount) + " items")
 
-        aPackage = open(sPackage, 'w')
-        print "write temp package \""+sPackage
+        aPackage = codecs.open(sPackage, 'w', "utf-8")
+        print("write temp package \"" + sPackage)
         aPackage.write(sBuffer)
 
+    # Reads the fragment files with the file names lFragments in directory aDir,
+    # formats them and returns a string that contains the merged fragments.
     def getFragments(self, aDir, sSetName, lFragments, nPrettyTabs):
         sBuffer = '' 
         sExtXcu = self.m_aCfg.getValue(PROP_EXTENSION_XCU);
 
         if len(lFragments) < 1:
             return sBuffer
-        
+
         for tabs in range(nPrettyTabs):
             sBuffer = sBuffer + "\t"
-        sBuffer = sBuffer + "<node oor:name=\""+sSetName+"\">\n"
+        sBuffer = sBuffer + "<node oor:name=\"" + sSetName + "\">\n"
         nPrettyTabs = nPrettyTabs + 1
 
         for sFragment in lFragments:
-            sFragPath = os.path.join(aDir, sFragment+"."+sExtXcu)
+            sFragPath = os.path.join(aDir, sFragment + "." + sExtXcu)
             try:
-                aFragmentFile = open(sFragPath)
+                aFragmentFile = codecs.open(sFragPath, "r", "utf-8")
             except:
                 # handle simple files only and check for existence!
-                raise Exception("fragment \""+sFragPath+"\" does not exists.")
-
-            print "merge fragment \""+sFragPath+"\" ..."
+                raise Exception("fragment \"" + sFragPath + "\" does not exists.")
+            print("merge fragment \"" + sFragPath + "\" ...")
             sBuffer = sBuffer + aFragmentFile.read()
-            
             sBuffer = sBuffer + "\n"
 
         nPrettyTabs = nPrettyTabs - 1
commit ff53bc2f87527178ea5978cc4958e2edb97fd64d
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Mon Apr 4 17:36:31 2011 +0200

    occurrence -> occurence and don't crash anymore

diff --git a/writerperfect/source/filter/DocumentCollector.cxx b/writerperfect/source/filter/DocumentCollector.cxx
index 5093520..cae7736 100644
--- a/writerperfect/source/filter/DocumentCollector.cxx
+++ b/writerperfect/source/filter/DocumentCollector.cxx
@@ -459,7 +459,7 @@ void DocumentCollector::openPageSpan(const WPXPropertyList &propList)
 static bool
 isOccurrenceEven (const WPXPropertyList &propList)
 {
-    const WPXProperty *occurance = propList["libwpd:occurrence"];
+    const WPXProperty *occurance = propList["libwpd:occurence"];
     return occurance && occurance->getStr() == "even";
 }
 
commit b215dd3a121ea54c419b10e22a4a566aea8fe297
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Mon Apr 4 11:51:38 2011 +0100

    fix crasher in header / footnotes with no occurrence set

diff --git a/writerperfect/source/filter/DocumentCollector.cxx b/writerperfect/source/filter/DocumentCollector.cxx
index 94b48bc..5093520 100644
--- a/writerperfect/source/filter/DocumentCollector.cxx
+++ b/writerperfect/source/filter/DocumentCollector.cxx
@@ -456,14 +456,20 @@ void DocumentCollector::openPageSpan(const WPXPropertyList &propList)
     mWriterDocumentStates.top().mbFirstParagraphInPageSpan = true;
 }
 
+static bool
+isOccurrenceEven (const WPXPropertyList &propList)
+{
+    const WPXProperty *occurance = propList["libwpd:occurrence"];
+    return occurance && occurance->getStr() == "even";
+}
+
 void DocumentCollector::openHeader(const WPXPropertyList &propList)
 {
     std::vector<DocumentElement *> * pHeaderFooterContentElements = new std::vector<DocumentElement *>;
-
-    if (propList["libwpd:occurrence"]->getStr() == "even")
-                mpCurrentPageSpan->setHeaderLeftContent(pHeaderFooterContentElements);
-        else
-                mpCurrentPageSpan->setHeaderContent(pHeaderFooterContentElements);
+    if (isOccurrenceEven (propList))
+        mpCurrentPageSpan->setHeaderLeftContent(pHeaderFooterContentElements);
+    else
+        mpCurrentPageSpan->setHeaderContent(pHeaderFooterContentElements);
 
     mpCurrentContentElements = pHeaderFooterContentElements;
 }
@@ -477,10 +483,10 @@ void DocumentCollector::openFooter(const WPXPropertyList &propList)
 {
     std::vector<DocumentElement *> * pHeaderFooterContentElements = new std::vector<DocumentElement *>;
 
-    if (propList["libwpd:occurrence"]->getStr() == "even")
-                mpCurrentPageSpan->setFooterLeftContent(pHeaderFooterContentElements);
-        else
-                mpCurrentPageSpan->setFooterContent(pHeaderFooterContentElements);
+    if (isOccurrenceEven (propList))
+        mpCurrentPageSpan->setFooterLeftContent(pHeaderFooterContentElements);
+    else
+        mpCurrentPageSpan->setFooterContent(pHeaderFooterContentElements);
 
     mpCurrentContentElements = pHeaderFooterContentElements;
 }
commit 9541e903fa1c392377562ab9c99c4087acb51c89
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sun Apr 3 16:45:40 2011 -0500

    remove legacysmgr_component_writeinfo fromt the .map files

diff --git a/binfilter/legacysmgr/source/legacy/gcc3.map b/binfilter/legacysmgr/source/legacy/gcc3.map
index 5c15c86..7ab94d3 100644
--- a/binfilter/legacysmgr/source/legacy/gcc3.map
+++ b/binfilter/legacysmgr/source/legacy/gcc3.map
@@ -1,6 +1,5 @@
 UDK_3_0_0 {
     global:
-        legacysmgr_component_writeInfo;
         legacysmgr_component_getFactory;
         _ZN17legacy_binfilters30getLegacyProcessServiceFactoryEv;
         legcy_setBinfilterInitState;
diff --git a/binfilter/legacysmgr/source/legacy/mingw_intel.map b/binfilter/legacysmgr/source/legacy/mingw_intel.map
index 5c15c86..7ab94d3 100644
--- a/binfilter/legacysmgr/source/legacy/mingw_intel.map
+++ b/binfilter/legacysmgr/source/legacy/mingw_intel.map
@@ -1,6 +1,5 @@
 UDK_3_0_0 {
     global:
-        legacysmgr_component_writeInfo;
         legacysmgr_component_getFactory;
         _ZN17legacy_binfilters30getLegacyProcessServiceFactoryEv;
         legcy_setBinfilterInitState;
diff --git a/binfilter/legacysmgr/source/legacy/msci.map b/binfilter/legacysmgr/source/legacy/msci.map
index e4197ba..2f10520 100644
--- a/binfilter/legacysmgr/source/legacy/msci.map
+++ b/binfilter/legacysmgr/source/legacy/msci.map
@@ -1,6 +1,5 @@
 UDK_3_0_0 {
     global:
-        legacysmgr_component_writeInfo;
         legacysmgr_component_getFactory;
         getLegacyProcessServiceFactory;
         legcy_setBinfilterInitState;
diff --git a/binfilter/legacysmgr/source/legacy/sols.map b/binfilter/legacysmgr/source/legacy/sols.map
index 9d0bef5..ce9c4d2 100644
--- a/binfilter/legacysmgr/source/legacy/sols.map
+++ b/binfilter/legacysmgr/source/legacy/sols.map
@@ -1,6 +1,5 @@
 UDK_3_0_0 {
     global:
-        legacysmgr_component_writeInfo;
         legacysmgr_component_getFactory;
         __1cRlegacy_binfiltersbEgetLegacyProcessServiceFactory6F_rknDcomDsunEstarDunoJReference4n0DElangUXMultiServiceFactory____;
         legcy_setBinfilterInitState;
commit d864fbb7f86e313746600178a883fa63633f876c
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Apr 1 22:33:13 2011 +0100

    remove obsolete component_writeInfo methods

diff --git a/binfilter/bf_sfx2/source/appl/sfx2_appuno.cxx b/binfilter/bf_sfx2/source/appl/sfx2_appuno.cxx
index 090d945..bd1c9aa 100644
--- a/binfilter/bf_sfx2/source/appl/sfx2_appuno.cxx
+++ b/binfilter/bf_sfx2/source/appl/sfx2_appuno.cxx
@@ -887,57 +887,6 @@ static const String sUnpacked  = String::CreateFromAscii( "Unpacked" );
 extern "C" {
 
 /*N*/
-/*N*/ sal_Bool SAL_CALL sfx2_component_writeInfo(	void*	/*pServiceManager*/	,
-/*N*/ 										void*	pRegistryKey	)
-/*N*/ {
-/*N*/ 	::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey >		xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pRegistryKey ) )	;
-/*N*/
-/*N*/     // Eigentliche Implementierung und ihre Services registrieren
-/*N*/     ::rtl::OUString aImpl;
-/*N*/     ::rtl::OUString aTempStr;
-/*N*/     ::rtl::OUString aKeyStr;
-/*N*/     Reference< XRegistryKey > xNewKey;
-/*N*/     Reference< XRegistryKey > xLoaderKey;
-/*N*/
-/*N*/     // global app event broadcaster
-/*N*/     aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
-/*N*/     aImpl += SfxGlobalEvents_Impl::impl_getStaticImplementationName();
-/*N*/
-/*N*/     aTempStr = aImpl;
-/*N*/     aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
-/*N*/     xNewKey = xKey->createKey( aTempStr );
-/*N*/     xNewKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.GlobalEventBroadcaster" )) );
-/*N*/
-/*N*/     // standalone document info
-/*N*/     aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
-/*N*/     aImpl += SfxStandaloneDocumentInfoObject::impl_getStaticImplementationName();
-/*N*/
-/*N*/     aTempStr = aImpl;
-/*N*/     aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
-/*N*/     xNewKey = xKey->createKey( aTempStr );
-/*N*/     xNewKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.StandaloneDocumentInfo" )) );
-/*N*/
-/*N*/ 	// script library container service
-/*N*/     aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
-/*N*/     aImpl += SfxScriptLibraryContainer::impl_getStaticImplementationName();
-/*N*/
-/*N*/     aTempStr = aImpl;
-/*N*/     aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
-/*N*/     xNewKey = xKey->createKey( aTempStr );
-/*N*/     xNewKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.ScriptLibraryContainer" )) );
-/*N*/
-/*N*/ 	// dialog library container service
-/*N*/     aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
-/*N*/     aImpl += SfxDialogLibraryContainer::impl_getStaticImplementationName();
-/*N*/
-/*N*/     aTempStr = aImpl;
-/*N*/     aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
-/*N*/     xNewKey = xKey->createKey( aTempStr );
-/*N*/     xNewKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.DialogLibraryContainer" )) );
-/*N*/
-/*N*/ 	return sal_True;
-/*N*/ }
-/*N*/
 /*N*/ void* SAL_CALL sfx2_component_getFactory(	const	sal_Char*	pImplementationName	,
 /*N*/ 												void*		pServiceManager		,
 /*N*/ 												void*		/*pRegistryKey*/		)
diff --git a/binfilter/inc/legacysmgr/legacy_binfilters_smgr.hxx b/binfilter/inc/legacysmgr/legacy_binfilters_smgr.hxx
index dcae20f..a119523 100644
--- a/binfilter/inc/legacysmgr/legacy_binfilters_smgr.hxx
+++ b/binfilter/inc/legacysmgr/legacy_binfilters_smgr.hxx
@@ -15,12 +15,8 @@ namespace legacy_binfilters
 
 extern "C"
 {
-//==================================================================================================
 void SAL_CALL legacy_component_getImplementationEnvironment(
     sal_Char const ** ppEnvTypeName, uno_Environment ** ppEnv );
-//==================================================================================================
-sal_Bool SAL_CALL legacysmgr_component_writeInfo(
-    ::com::sun::star::lang::XMultiServiceFactory * smgr, ::com::sun::star::registry::XRegistryKey * key );
 void * SAL_CALL legacysmgr_component_getFactory(
     sal_Char const * implName, ::com::sun::star::lang::XMultiServiceFactory * smgr, ::com::sun::star::registry::XRegistryKey * key );
 }
diff --git a/binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx b/binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx
index ddbb52d..bf87dba 100644
--- a/binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx
+++ b/binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx
@@ -1985,12 +1985,6 @@ using namespace ::legacy_binfilters;
 
 extern "C"
 {
-sal_Bool SAL_CALL legacysmgr_component_writeInfo(
-    lang::XMultiServiceFactory * smgr, registry::XRegistryKey * key )
-{
-    // #i30331#
-    return component_writeInfoHelper( smgr, key, s_entries );
-}
 #if defined(SOLARIS) && defined(INTEL)
 #pragma optimize ( "", on )
 #endif
commit 25cd17cd8a94d9a70130a24f8c3c526f69105d14
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Apr 1 22:32:09 2011 +0100

    register msworks and wpg filter components

diff --git a/writerperfect/prj/d.lst b/writerperfect/prj/d.lst
index 8b281c5..c414fc6 100644
--- a/writerperfect/prj/d.lst
+++ b/writerperfect/prj/d.lst
@@ -2,4 +2,4 @@
 ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%
 ..\%__SRC%\bin\wpftgo.dll %_DEST%\bin%_EXT%\wpftgo.dll
 ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
-..\%__SRC%\misc\wpft.component %_DEST%\xml%_EXT%\wpft.component
+..\%__SRC%\misc\*.component %_DEST%\xml%_EXT%\*.component
diff --git a/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx b/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx
index 210d5ef..2ab4fae 100644
--- a/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx
+++ b/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx
@@ -41,40 +41,11 @@ using namespace ::com::sun::star::registry;
 
 extern "C"
 {
-//==================================================================================================
 void SAL_CALL component_getImplementationEnvironment(
     const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
 {
     *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
 }
-//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
-    void * /* pServiceManager */, void * pRegistryKey )
-{
-    if (pRegistryKey)
-    {
-        try
-        {
-            sal_Int32 nPos = 0;
-            Reference< XRegistryKey > xNewKey(
-                reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( WPGImportFilter_getImplementationName() ) );
-            xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
-
-            const Sequence< OUString > & rSNL = WPGImportFilter_getSupportedServiceNames();
-            const OUString * pArray = rSNL.getConstArray();
-            for ( nPos = rSNL.getLength(); nPos--; )
-                xNewKey->createKey( pArray[nPos] );
-
-            return sal_True;
-        }
-        catch (InvalidRegistryException &)
-        {
-            OSL_FAIL( "### InvalidRegistryException!" );
-        }
-    }
-    return sal_False;
-}
-//==================================================================================================
 void * SAL_CALL component_getFactory(
     const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
 {
diff --git a/writerperfect/source/wpsimp/makefile.mk b/writerperfect/source/wpsimp/makefile.mk
index da17e80..c3dfe20 100644
--- a/writerperfect/source/wpsimp/makefile.mk
+++ b/writerperfect/source/wpsimp/makefile.mk
@@ -27,3 +27,4 @@ SLOFILES= \
     $(SLO)$/msworks_genericfilter.obj
 
 .INCLUDE :  target.mk
+
diff --git a/writerperfect/source/wpsimp/msworks_genericfilter.cxx b/writerperfect/source/wpsimp/msworks_genericfilter.cxx
index a736bff..8b37d45 100644
--- a/writerperfect/source/wpsimp/msworks_genericfilter.cxx
+++ b/writerperfect/source/wpsimp/msworks_genericfilter.cxx
@@ -41,40 +41,11 @@ using namespace ::com::sun::star::registry;
 
 extern "C"
 {
-//==================================================================================================
 void SAL_CALL component_getImplementationEnvironment(
     const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
 {
     *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
 }
-//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
-    void * /* pServiceManager */, void * pRegistryKey )
-{
-    if (pRegistryKey)
-    {
-        try
-        {
-            sal_Int32 nPos = 0;
-            Reference< XRegistryKey > xNewKey(
-                reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( MSWorksImportFilter_getImplementationName() ) );
-            xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
-
-            const Sequence< OUString > & rSNL = MSWorksImportFilter_getSupportedServiceNames();
-            const OUString * pArray = rSNL.getConstArray();
-            for ( nPos = rSNL.getLength(); nPos--; )
-                xNewKey->createKey( pArray[nPos] );
-
-            return sal_True;
-        }
-        catch (InvalidRegistryException &)
-        {
-            OSL_FAIL( "### InvalidRegistryException!" );
-        }
-    }
-    return sal_False;
-}
-//==================================================================================================
 void * SAL_CALL component_getFactory(
     const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
 {
diff --git a/writerperfect/util/makefile.mk b/writerperfect/util/makefile.mk
index c202bf3..d5d296d 100644
--- a/writerperfect/util/makefile.mk
+++ b/writerperfect/util/makefile.mk
@@ -120,10 +120,22 @@ DEF3NAME = $(SHL3TARGET)
 
 .INCLUDE :  target.mk
 
-ALLTAR : $(MISC)/wpft.component
+ALLTAR : $(MISC)/wpft.component $(MISC)/wpgfilter.component $(MISC)/msworksfilter.component
 
 $(MISC)/wpft.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
         wpft.component
     $(XSLTPROC) --nonet --stringparam uri \
         '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
         $(SOLARENV)/bin/createcomponent.xslt wpft.component
+
+$(MISC)/wpgfilter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+        wpgfilter.component
+    $(XSLTPROC) --nonet --stringparam uri \
+        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \
+        $(SOLARENV)/bin/createcomponent.xslt wpgfilter.component
+
+$(MISC)/msworksfilter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+        msworksfilter.component
+    $(XSLTPROC) --nonet --stringparam uri \
+        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+        $(SOLARENV)/bin/createcomponent.xslt msworksfilter.component
diff --git a/writerperfect/util/msworksfilter.component b/writerperfect/util/msworksfilter.component
new file mode 100644
index 0000000..769eaf3
--- /dev/null
+++ b/writerperfect/util/msworksfilter.component
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component loader="com.sun.star.loader.SharedLibrary"
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.Writer.MSWorksImportFilter">
+    <service name="com.sun.star.document.ImportFilter"/>
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+  </implementation>
+</component>
diff --git a/writerperfect/util/wpgfilter.component b/writerperfect/util/wpgfilter.component
new file mode 100644
index 0000000..f571959
--- /dev/null
+++ b/writerperfect/util/wpgfilter.component
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component loader="com.sun.star.loader.SharedLibrary"
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.Draw.WPGImportFilter">
+    <service name="com.sun.star.document.ImportFilter"/>
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+  </implementation>
+</component>
commit c1e39ca4de615b4ef4152748d1c90a45eeb2cc92
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Apr 1 22:31:53 2011 +0100

    register lotuswordpro filter component

diff --git a/lotuswordpro/prj/d.lst b/lotuswordpro/prj/d.lst
index 48efbc1..1346575 100644
--- a/lotuswordpro/prj/d.lst
+++ b/lotuswordpro/prj/d.lst
@@ -1,3 +1,4 @@
 ..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so
 ..\%__SRC%\bin\*.dll %_DEST%\lib%_EXT%\*.dll
 ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
+..\%__SRC%\misc\*.component %_DEST%\xml%_EXT%\*.component
diff --git a/lotuswordpro/source/filter/genericfilter.cxx b/lotuswordpro/source/filter/genericfilter.cxx
index 7bec7a6..0594500 100644
--- a/lotuswordpro/source/filter/genericfilter.cxx
+++ b/lotuswordpro/source/filter/genericfilter.cxx
@@ -19,40 +19,11 @@ using namespace ::com::sun::star::registry;
 
 extern "C"
 {
-//==================================================================================================
 void SAL_CALL component_getImplementationEnvironment(
     const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
 {
     *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
 }
-//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
-    void * /*pServiceManager*/, void * pRegistryKey )
-{
-    if (pRegistryKey)
-    {
-        try
-        {
-            sal_Int32 nPos = 0;
-            Reference< XRegistryKey > xNewKey(
-                reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( LotusWordProImportFilter_getImplementationName() ) );
-            xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
-
-            const Sequence< OUString > & rSNL = LotusWordProImportFilter_getSupportedServiceNames();
-            const OUString * pArray = rSNL.getConstArray();
-            for ( nPos = rSNL.getLength(); nPos--; )
-                xNewKey->createKey( pArray[nPos] );
-
-            return sal_True;
-        }
-        catch (InvalidRegistryException &)
-        {
-            OSL_FAIL( "### InvalidRegistryException!" );
-        }
-    }
-    return sal_False;
-}
-//==================================================================================================
 void * SAL_CALL component_getFactory(
     const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
 {
diff --git a/lotuswordpro/util/lwpfilter.component b/lotuswordpro/util/lwpfilter.component
new file mode 100644
index 0000000..030c759
--- /dev/null
+++ b/lotuswordpro/util/lwpfilter.component
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component loader="com.sun.star.loader.SharedLibrary"
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.Writer.LotusWordProImportFilter">
+    <service name="com.sun.star.document.ImportFilter"/>
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+  </implementation>
+</component>
diff --git a/lotuswordpro/util/makefile.mk b/lotuswordpro/util/makefile.mk
index 7b34a03..640ba29 100644
--- a/lotuswordpro/util/makefile.mk
+++ b/lotuswordpro/util/makefile.mk
@@ -35,3 +35,11 @@ SHL1VERSIONMAP=$(TARGET).map
 DEF1NAME=$(SHL1TARGET)
 
 .INCLUDE :  target.mk
+
+ALLTAR : $(MISC)/lwpfilter.component
+
+$(MISC)/lwpfilter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+        lwpfilter.component
+    $(XSLTPROC) --nonet --stringparam uri \
+        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+        $(SOLARENV)/bin/createcomponent.xslt lwpfilter.component
commit 87b2413a0a62abc94bf023089273c5c21d009ead
Author: Petr Mladek <pmladek at suse.cz>
Date:   Fri Apr 1 15:13:15 2011 +0200

    Branch libreoffice-3-4
    
    This is 'libreoffice-3-4' - the stable branch for the 3.4.x releases
    
        + only bug fixes are allowed
        + no approval needed during beta phase (two weeks after branch)
        + 1 approval needed during rc phase and for bugfix releases
        + 2 approvals with different/no affiliation needed for late features
        + regularly merged into master by a selected person when living
    
    Please watch http://wiki.documentfoundation.org/ReleasePlan
    and read announces on libreoffice at lists.freedesktop.org
    
    If you want to build something cool, unstable, and risky, use master.
commit 6884ac007a7cdcc2679dff3de982b3ef117fbafc
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Mar 8 15:31:10 2011 +0100

    Version 3.3.2.1, tag libreoffice-3.3.2.1 (3.3.2-rc1)
commit 94d1b166d9b4214da66546eb2cc288fb6ccdfa59
Author: Petr Mladek <pmladek at suse.cz>
Date:   Mon Mar 7 22:44:35 2011 +0100

    fix build in writerfilter
    
    deliver newly needed oox\helper\graphichelper.hxx

diff --git a/oox/prj/d.lst b/oox/prj/d.lst
index e25a8d8..e2f066c 100644
--- a/oox/prj/d.lst
+++ b/oox/prj/d.lst
@@ -26,6 +26,7 @@ mkdir: %_DEST%\inc%_EXT%\oox\xls
 ..\inc\oox\helper\binarystreambase.hxx %_DEST%\inc%_EXT%\oox\helper\binarystreambase.hxx
 ..\inc\oox\helper\helper.hxx %_DEST%\inc%_EXT%\oox\helper\helper.hxx
 ..\inc\oox\helper\containerhelper.hxx %_DEST%\inc%_EXT%\oox\helper\containerhelper.hxx
+..\inc\oox\helper\graphichelper.hxx %_DEST%\inc%_EXT%\oox\helper\graphichelper.hxx
 ..\inc\oox\helper\storagebase.hxx %_DEST%\inc%_EXT%\oox\helper\storagebase.hxx
 ..\inc\oox\helper\zipstorage.hxx %_DEST%\inc%_EXT%\oox\helper\zipstorage.hxx
 ..\inc\oox\core\filterbase.hxx %_DEST%\inc%_EXT%\oox\core\filterbase.hxx
commit 41148164fb043e7e78fdd5e27001684b278f1f7c
Author: Noel Power <noel.power at novell.com>
Date:   Wed Mar 2 11:20:45 2011 +0000

    resolves fdo#34909
    
    enable import of macros for docxm

diff --git a/oox/inc/oox/helper/graphichelper.hxx b/oox/inc/oox/helper/graphichelper.hxx
index 1a07f23..5134ef6 100644
--- a/oox/inc/oox/helper/graphichelper.hxx
+++ b/oox/inc/oox/helper/graphichelper.hxx
@@ -65,7 +65,7 @@ namespace oox {
     resolves the graphic object from the passed URL and thus prevents it from
     being destroyed.
  */
-class GraphicHelper
+class OOX_DLLPUBLIC GraphicHelper
 {
 public:
     explicit            GraphicHelper(
diff --git a/oox/inc/oox/ole/olestorage.hxx b/oox/inc/oox/ole/olestorage.hxx
index dc97f97..97108a6 100644
--- a/oox/inc/oox/ole/olestorage.hxx
+++ b/oox/inc/oox/ole/olestorage.hxx
@@ -42,7 +42,7 @@ namespace ole {
 // ============================================================================
 
 /** Implements stream access for binary OLE storages. */
-class OleStorage : public StorageBase
+class OOX_DLLPUBLIC OleStorage : public StorageBase
 {
 public:
     explicit            OleStorage(
diff --git a/oox/prj/d.lst b/oox/prj/d.lst
index 0cd6971..e25a8d8 100644
--- a/oox/prj/d.lst
+++ b/oox/prj/d.lst
@@ -40,6 +40,8 @@ mkdir: %_DEST%\inc%_EXT%\oox\xls
 ..\inc\oox\vml\vmlshape.hxx %_DEST%\inc%_EXT%\oox\vml\vmlshape.hxx
 ..\inc\oox\export\*.hxx %_DEST%\inc%_EXT%\oox\export\*.hxx
 ..\inc\oox\ole\oleobjecthelper.hxx %_DEST%\inc%_EXT%\oox\ole\oleobjecthelper.hxx
+..\inc\oox\ole\vbaproject.hxx %_DEST%\inc%_EXT%\oox\ole\vbaproject.hxx
+..\inc\oox\ole\olestorage.hxx %_DEST%\inc%_EXT%\oox\ole\olestorage.hxx
 
 dos: sh -c "if test %OS% = MACOSX; then create-bundle %_DEST%\lib%_EXT%\*.dylib; fi"
 
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index b6d45c5..0566e19 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -84,7 +84,7 @@ class WRITERFILTER_DLLPUBLIC OOXMLStream
 {
 public:
     enum StreamType_t { UNKNOWN, DOCUMENT, STYLES, FONTTABLE, NUMBERING,
-        FOOTNOTES, ENDNOTES, COMMENTS, THEME, SETTINGS };
+        FOOTNOTES, ENDNOTES, COMMENTS, THEME, SETTINGS, VBAPROJECT };
     typedef boost::shared_ptr<OOXMLStream> Pointer_t;
 
     virtual ~OOXMLStream() {}
diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx
index 1dd9f92..c3cf539 100644
--- a/writerfilter/source/filter/ImportFilter.cxx
+++ b/writerfilter/source/filter/ImportFilter.cxx
@@ -42,6 +42,9 @@
 #endif
 
 #include <resourcemodel/TagLogger.hxx>
+#include <oox/ole/olestorage.hxx>
+#include <oox/ole/vbaproject.hxx>
+#include <oox/helper/graphichelper.hxx>
 using namespace ::rtl;
 using namespace ::com::sun::star;
 using ::comphelper::MediaDescriptor;
@@ -125,6 +128,23 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
         pDocument->setDrawPage(xDrawPage);
 
         pDocument->resolve(*pStream);
+        writerfilter::ooxml::OOXMLStream::Pointer_t  pVBAProjectStream(writerfilter::ooxml::OOXMLDocumentFactory::createStream( pDocStream, writerfilter::ooxml::OOXMLStream::VBAPROJECT ));
+        oox::StorageRef xVbaPrjStrg( new ::oox::ole::OleStorage( uno::Reference< lang::XMultiServiceFactory >( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ), pVBAProjectStream->getDocumentStream(), false ) );
+        if( xVbaPrjStrg.get() && xVbaPrjStrg->isStorage() )
+        {
+            ::oox::ole::VbaProject aVbaProject( uno::Reference< lang::XMultiServiceFactory >( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ), xModel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Writer" ) ) );
+            uno::Reference< frame::XFrame > xFrame = aMediaDesc.getUnpackedValueOrDefault(  MediaDescriptor::PROP_FRAME(), uno::Reference< frame::XFrame > () );
+
+            // if no XFrame try fallback to what we can glean from the Model
+            if ( !xFrame.is() )
+            {
+                uno::Reference< frame::XController > xController =  xModel->getCurrentController();
+                xFrame =  xController.is() ? xController->getFrame() : NULL;
+            }
+
+            oox::GraphicHelper gHelper(  uno::Reference< lang::XMultiServiceFactory >( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ), xFrame, xVbaPrjStrg );
+            aVbaProject.importVbaProject( *xVbaPrjStrg, gHelper );
+        }
     }
     else
     {
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index d2c463b..fd1d7d0 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -115,11 +115,15 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess>
     static rtl::OUString sTarget(RTL_CONSTASCII_USTRINGPARAM("Target"));
     static rtl::OUString sTargetMode(RTL_CONSTASCII_USTRINGPARAM("TargetMode"));
     static rtl::OUString sExternal(RTL_CONSTASCII_USTRINGPARAM("External"));
+    static rtl::OUString sVBAProjectType(RTL_CONSTASCII_USTRINGPARAM("http://schemas.microsoft.com/office/2006/relationships/vbaProject"));
 
     rtl::OUString sStreamType;
 
     switch (nStreamType)
     {
+        case VBAPROJECT:
+            sStreamType = sVBAProjectType;
+            break;
         case DOCUMENT:
             sStreamType = sDocumentType;
             break;
commit 2ba830b380e7261626f4e59a1271a3f3ef2b7508
Author: Noel Power <noel.power at novell.com>
Date:   Wed Mar 2 20:31:07 2011 +0000

    resolves #fdo34941
    
    ensure a valid mediatype is set up for the ooxml filters so that ooo::vba::isAlienExcelDoc can give the correct result

diff --git a/filter/source/config/fragments/types/MS_Excel_2007_XML.xcu b/filter/source/config/fragments/types/MS_Excel_2007_XML.xcu
index ab9e409..7216db8 100644
--- a/filter/source/config/fragments/types/MS_Excel_2007_XML.xcu
+++ b/filter/source/config/fragments/types/MS_Excel_2007_XML.xcu
@@ -2,7 +2,7 @@
     <prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
     <prop oor:name="URLPattern"/>
     <prop oor:name="Extensions"><value>xlsx xlsm</value></prop>
-    <prop oor:name="MediaType"/>
+    <prop oor:name="MediaType"><value>application/vnd.ms-excel</value></prop>
     <prop oor:name="Preferred"><value>false</value></prop>
     <prop oor:name="PreferredFilter"><value>Calc MS Excel 2007 XML</value></prop>
     <prop oor:name="UIName"><value xml:lang="x-default">Microsoft Excel 2007 XML</value></prop>
diff --git a/filter/source/config/fragments/types/calc_OOXML.xcu b/filter/source/config/fragments/types/calc_OOXML.xcu
index 40fd3ee..016d322 100644
--- a/filter/source/config/fragments/types/calc_OOXML.xcu
+++ b/filter/source/config/fragments/types/calc_OOXML.xcu
@@ -2,7 +2,7 @@
     <prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
     <prop oor:name="URLPattern"/>
     <prop oor:name="Extensions"><value>xlsx xlsm</value></prop>
-    <prop oor:name="MediaType"/>
+    <prop oor:name="MediaType"><value>application/vnd.ms-excel</value></prop>
     <prop oor:name="Preferred"><value>false</value></prop>
     <prop oor:name="PreferredFilter"><value>Calc Office Open XML</value></prop>
     <prop oor:name="UIName"><value xml:lang="x-default">Office Open XML Spreadsheet</value></prop>
commit e8b22c5b62178de3d3aa8cf23c7583eca393c11e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 2 11:09:41 2011 +0000

    Resolves: fdo#33701 ensure node outlives path
    
    The xpath on destruction needs the xmldoc to exist, so the reference
    to the doc-owning nodelist needs to be the first reference listed
    in the class in order that its dtor is called *after* the xpath
    dtor
    
    Signed-off-by: David Tardon <dtardon at redhat.com>

diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx
index b4e3313..884cf85 100644
--- a/unoxml/source/xpath/nodelist.cxx
+++ b/unoxml/source/xpath/nodelist.cxx
@@ -31,8 +31,8 @@
 
 namespace XPath
 {
-    CNodeList::CNodeList(boost::shared_ptr<xmlXPathObject>& rxpathObj, const Reference< XNode >& contextNode)
-        : m_xContextNode(contextNode)
+    CNodeList::CNodeList(const Reference< XNode >& rContextNode, boost::shared_ptr<xmlXPathObject>& rxpathObj)
+        : m_xContextNode(rContextNode)
         , m_pNodeSet(0)
     {
         if (rxpathObj != NULL && rxpathObj->type == XPATH_NODESET)
diff --git a/unoxml/source/xpath/nodelist.hxx b/unoxml/source/xpath/nodelist.hxx
index 31b9b51..c917a7d 100644
--- a/unoxml/source/xpath/nodelist.hxx
+++ b/unoxml/source/xpath/nodelist.hxx
@@ -53,12 +53,12 @@ namespace XPath
     class CNodeList : public cppu::WeakImplHelper1< XNodeList >
     {
     private:
-        boost::shared_ptr<xmlXPathObject> m_pXPathObj;
         const Reference< XNode > m_xContextNode;
+        boost::shared_ptr<xmlXPathObject> m_pXPathObj;
         xmlNodeSetPtr m_pNodeSet;
 
     public:
-        CNodeList(boost::shared_ptr<xmlXPathObject> &rxpathObj, const Reference< XNode >& contextNode);
+        CNodeList(const Reference< XNode >& contextNode, boost::shared_ptr<xmlXPathObject> &rxpathObj);
         /**
         The number of nodes in the list.
         */
diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx
index 67a8f59..bbb8a5b 100644
--- a/unoxml/source/xpath/xpathobject.cxx
+++ b/unoxml/source/xpath/xpathobject.cxx
@@ -86,7 +86,7 @@ namespace XPath
     */
     Reference< XNodeList > SAL_CALL CXPathObject::getNodeList() throw (RuntimeException)
     {
-        return Reference< XNodeList >(new CNodeList(m_pXPathObj, m_xContextNode));
+        return Reference< XNodeList >(new CNodeList(m_xContextNode, m_pXPathObj));
     }
     
      /**
commit d9f989748b178e12294e16e25cad75456859625c
Author: Noel Power <noel.power at novell.com>
Date:   Thu Feb 24 21:42:01 2011 +0000

    fix for fdo#34664 - prevent null pointer access when no ffdata available
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 57b6bcc..77b09eb 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3077,7 +3077,8 @@ void DomainMapper_Impl::CloseFieldCommand()
                     {
                         FFDataHandler::Pointer_t pFFDataHandler
                             (pContext->getFFDataHandler());
-
+                        if ( !pFFDataHandler )
+                            throw uno::RuntimeException();
                         xFieldProperties->setPropertyValue
                             (rPropNameSupplier.GetName(PROP_HINT),
                             uno::makeAny(pFFDataHandler->getStatusText()));
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
index b47186c..4318567 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -156,6 +156,8 @@ FormControlHelper::~FormControlHelper()
 bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> xTextRange,
                                        const ::rtl::OUString & rControlName)
 {
+    if ( !m_pFFData )
+        return false;
     uno::Reference<lang::XMultiServiceFactory> 
         xServiceFactory(m_pImpl->getServiceFactory());
 


More information about the Libreoffice-commits mailing list